Merge tag 'go1.15.6' into HEAD
Change-Id: I2a074e855463ce9a77d6d554c490c2633b0a4430
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
index 0000000..0ccec3d
--- /dev/null
+++ b/BUILD.gn
@@ -0,0 +1,216 @@
+# Copyright 2016 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/go/go_test.gni")
+import("//build/host.gni")
+import("//src/sys/build/components.gni")
+
+if (current_toolchain == target_toolchain) {
+ _go_root = "$host_tools_dir/goroot"
+
+ compiled_action("makeroot") {
+ visibility = [ ":makefuchsia" ]
+
+ depfile = "$target_gen_dir/$target_name.d"
+ outputs = [ "$target_gen_dir/$target_name.stamp" ]
+
+ tool = "makeroot"
+ args = [
+ "-source-goroot",
+ rebase_path(".", root_build_dir),
+ "-target-goroot",
+ rebase_path(_go_root, root_build_dir),
+
+ "-depfile",
+ rebase_path(depfile, root_build_dir),
+ "-stamp-file",
+ rebase_path(outputs[0], root_build_dir),
+ ]
+ }
+
+ compiled_action("makefuchsia") {
+ visibility = [ ":go_runtime" ]
+ deps = [ ":makeroot" ]
+
+ depfile = "$target_gen_dir/$target_name.d"
+ outputs = [ "$target_gen_dir/$target_name.stamp" ]
+
+ tool = "makefuchsia"
+ args = [
+ "-bootstrap-goroot",
+ rebase_path("//prebuilt/third_party/go/${host_platform}"),
+ "-gocache",
+ gocache_dir,
+ "-goroot",
+ rebase_path(_go_root, root_build_dir),
+
+ "-depfile",
+ rebase_path(depfile, root_build_dir),
+ "-stamp-file",
+ rebase_path(outputs[0], root_build_dir),
+ ]
+ }
+}
+
+group("go_runtime") {
+ public_deps = [ ":makefuchsia(${target_toolchain})" ]
+}
+
+go_test("go_exec_test") {
+ gopackages = [ "os/exec" ]
+}
+
+go_test("go_net_test") {
+ gopackages = [ "net" ]
+}
+
+go_test("go_os_test") {
+ gopackages = [ "os" ]
+}
+
+go_test("go_pprof_test") {
+ gopackages = [ "runtime/pprof" ]
+}
+
+go_test("go_zx_test") {
+ gopackages = [ "syscall/zx" ]
+}
+
+go_test("go_zxwait_test") {
+ gopackages = [ "syscall/zx/zxwait" ]
+}
+
+fuchsia_component("go-exec-test") {
+ testonly = true
+ manifest = "meta/go_exec_test.cmx"
+ deps = [
+ ":go_exec_test",
+ "//third_party/sbase:cat",
+ "//third_party/sbase:echo",
+ ]
+}
+
+fuchsia_component("go-net-test") {
+ testonly = true
+ manifest = "meta/go_net_test.cmx"
+ deps = [ ":go_net_test" ]
+}
+
+fuchsia_component("go-os-test") {
+ testonly = true
+ manifest = "meta/go_os_test.cmx"
+ deps = [ ":go_os_test" ]
+}
+
+fuchsia_component("go-pprof-test") {
+ testonly = true
+ manifest = "meta/go_pprof_test.cmx"
+ deps = [ ":go_pprof_test" ]
+}
+
+fuchsia_component("go-zx-test") {
+ testonly = true
+ manifest = "meta/go_zx_test.cmx"
+ deps = [ ":go_zx_test" ]
+}
+
+fuchsia_component("go-zxwait-test") {
+ testonly = true
+ manifest = "meta/go_zxwait_test.cmx"
+ deps = [ ":go_zxwait_test" ]
+}
+
+fuchsia_test_package("go-stdlib-tests") {
+ test_components = [
+ ":go-exec-test",
+ ":go-net-test",
+ ":go-os-test",
+ ":go-pprof-test",
+ ":go-zx-test",
+ ":go-zxwait-test",
+ ]
+
+ deps = [ "//src/connectivity/network/netstack:component-debug" ]
+
+ test_specs = {
+ environments = [ emu_env ]
+ }
+}
+
+go_test("go_unsafevalue_test") {
+ gopackages = [ "syscall/zx/fidl/internal/unsafevalue" ]
+
+ # This runs both on target device and as a host test.
+ # In both cases, it needs to build a go toolchain rather than using a prebuilt because
+ # it is testing the fidl package, which is implemented in the toolcahin itself.
+ use_prebuilt_go = false
+}
+
+go_test("go_fidl_test") {
+ gopackages = [ "syscall/zx/fidl" ]
+}
+
+go_test("go_extended_fidl_test") {
+ # N.B. these tests are not in the fidl package to avoid having to rebuild the
+ # go toolchain while iterating on them.
+ gopackages = [ "syscall/zx/fidl/fidl_test" ]
+ # TODO(pascallouis): Currently, while we take a dependency, the output of
+ # this FIDL rule is not directly used, rather the generated bindings were
+ # copied and checked in.
+ #
+ # Not being able to depend on automated generation is due to where code is
+ # placed, and how this relates to the tree structure of the toolchain.
+ # Disabling while fidlgen table generation is pending.
+ # Use regen-fidl to generate this file.
+ # deps = [
+ # "src/syscall/zx/fidl/internal/bindingstest($go_toolchain)",
+ # ]
+}
+
+fuchsia_component("go-unsafevalue-test") {
+ testonly = true
+ manifest = "meta/go_unsafevalue_test.cmx"
+ deps = [ ":go_unsafevalue_test" ]
+}
+
+fuchsia_component("go-fidl-test") {
+ testonly = true
+ manifest = "meta/go_fidl_test.cmx"
+ deps = [ ":go_fidl_test" ]
+}
+
+fuchsia_component("go-extended-fidl-test") {
+ testonly = true
+ manifest = "meta/go_extended_fidl_test.cmx"
+ deps = [ ":go_extended_fidl_test" ]
+}
+
+fuchsia_test_package("go-fidl-tests") {
+ test_components = [
+ ":go-unsafevalue-test",
+ ":go-extended-fidl-test",
+ ":go-fidl-test",
+ ]
+
+ test_specs = {
+ environments = [ emu_env ]
+ }
+}
+
+group("fidl-tests") {
+ testonly = true
+ deps = [
+ ":go-fidl-tests",
+ ":go_extended_fidl_test($host_toolchain)",
+ ":go_unsafevalue_test($host_toolchain)",
+ ]
+}
+
+group("tests") {
+ testonly = true
+ deps = [
+ ":fidl-tests",
+ ":go-stdlib-tests",
+ ]
+}
diff --git a/api/README b/api/README
index ce24efc..d8746d3 100644
--- a/api/README
+++ b/api/README
@@ -11,3 +11,8 @@
next.txt is the only file intended to be mutated. It's a list of
features that may be added to the next version. It only affects
warning output from the go api tool.
+
+fuchsia.txt lists Fuchsia specific features. After a full build, this
+list can be regenerated with
+
+ $(fx get-build-dir)/host-tools/goroot/bin/go tool api | grep -e '^pkg syscall/zx' > ${FUCHSIA_DIR}/third_party/go/api/fuchsia.txt
diff --git a/api/fuchsia.txt b/api/fuchsia.txt
new file mode 100644
index 0000000..fc53bad
--- /dev/null
+++ b/api/fuchsia.txt
@@ -0,0 +1,5721 @@
+pkg syscall/zx, const ChannelMaxMessageBytes = 65536
+pkg syscall/zx, const ChannelMaxMessageBytes ideal-int
+pkg syscall/zx, const ChannelMaxMessageHandles = 64
+pkg syscall/zx, const ChannelMaxMessageHandles ideal-int
+pkg syscall/zx, const ErrAccessDenied = -30
+pkg syscall/zx, const ErrAccessDenied Status
+pkg syscall/zx, const ErrAddressInUse = -72
+pkg syscall/zx, const ErrAddressInUse Status
+pkg syscall/zx, const ErrAddressUnreachable = -71
+pkg syscall/zx, const ErrAddressUnreachable Status
+pkg syscall/zx, const ErrAlreadyBound = -27
+pkg syscall/zx, const ErrAlreadyBound Status
+pkg syscall/zx, const ErrAlreadyExists = -26
+pkg syscall/zx, const ErrAlreadyExists Status
+pkg syscall/zx, const ErrBadHandle = -11
+pkg syscall/zx, const ErrBadHandle Status
+pkg syscall/zx, const ErrBadPath = -50
+pkg syscall/zx, const ErrBadPath Status
+pkg syscall/zx, const ErrBadState = -20
+pkg syscall/zx, const ErrBadState Status
+pkg syscall/zx, const ErrBadSyscall = -13
+pkg syscall/zx, const ErrBadSyscall Status
+pkg syscall/zx, const ErrBufferTooSmall = -15
+pkg syscall/zx, const ErrBufferTooSmall Status
+pkg syscall/zx, const ErrCallFailed = -5
+pkg syscall/zx, const ErrCallFailed Status
+pkg syscall/zx, const ErrCanceled = -23
+pkg syscall/zx, const ErrCanceled Status
+pkg syscall/zx, const ErrConnectionAborted = -76
+pkg syscall/zx, const ErrConnectionAborted Status
+pkg syscall/zx, const ErrConnectionRefused = -74
+pkg syscall/zx, const ErrConnectionRefused Status
+pkg syscall/zx, const ErrConnectionReset = -75
+pkg syscall/zx, const ErrConnectionReset Status
+pkg syscall/zx, const ErrFileBig = -53
+pkg syscall/zx, const ErrFileBig Status
+pkg syscall/zx, const ErrHandleClosed = -23
+pkg syscall/zx, const ErrHandleClosed Status
+pkg syscall/zx, const ErrIO = -40
+pkg syscall/zx, const ErrIO Status
+pkg syscall/zx, const ErrIODataIntegrity = -42
+pkg syscall/zx, const ErrIODataIntegrity Status
+pkg syscall/zx, const ErrIODataLoss = -43
+pkg syscall/zx, const ErrIODataLoss Status
+pkg syscall/zx, const ErrIORefused = -41
+pkg syscall/zx, const ErrIORefused Status
+pkg syscall/zx, const ErrInternal = -1
+pkg syscall/zx, const ErrInternal Status
+pkg syscall/zx, const ErrInterruptedRetry = -6
+pkg syscall/zx, const ErrInterruptedRetry Status
+pkg syscall/zx, const ErrInvalidArgs = -10
+pkg syscall/zx, const ErrInvalidArgs Status
+pkg syscall/zx, const ErrNext = -61
+pkg syscall/zx, const ErrNext Status
+pkg syscall/zx, const ErrNoMemory = -4
+pkg syscall/zx, const ErrNoMemory Status
+pkg syscall/zx, const ErrNoResources = -3
+pkg syscall/zx, const ErrNoResources Status
+pkg syscall/zx, const ErrNoSpace = -54
+pkg syscall/zx, const ErrNoSpace Status
+pkg syscall/zx, const ErrNotConnected = -73
+pkg syscall/zx, const ErrNotConnected Status
+pkg syscall/zx, const ErrNotDir = -51
+pkg syscall/zx, const ErrNotDir Status
+pkg syscall/zx, const ErrNotEmpty = -55
+pkg syscall/zx, const ErrNotEmpty Status
+pkg syscall/zx, const ErrNotFile = -52
+pkg syscall/zx, const ErrNotFile Status
+pkg syscall/zx, const ErrNotFound = -25
+pkg syscall/zx, const ErrNotFound Status
+pkg syscall/zx, const ErrNotSupported = -2
+pkg syscall/zx, const ErrNotSupported Status
+pkg syscall/zx, const ErrOk = 0
+pkg syscall/zx, const ErrOk Status
+pkg syscall/zx, const ErrOutOfRange = -14
+pkg syscall/zx, const ErrOutOfRange Status
+pkg syscall/zx, const ErrPeerClosed = -24
+pkg syscall/zx, const ErrPeerClosed Status
+pkg syscall/zx, const ErrProtocolNotSupported = -70
+pkg syscall/zx, const ErrProtocolNotSupported Status
+pkg syscall/zx, const ErrRemoteClosed = -24
+pkg syscall/zx, const ErrRemoteClosed Status
+pkg syscall/zx, const ErrShouldWait = -22
+pkg syscall/zx, const ErrShouldWait Status
+pkg syscall/zx, const ErrStop = -60
+pkg syscall/zx, const ErrStop Status
+pkg syscall/zx, const ErrTimedOut = -21
+pkg syscall/zx, const ErrTimedOut Status
+pkg syscall/zx, const ErrUnavailable = -28
+pkg syscall/zx, const ErrUnavailable Status
+pkg syscall/zx, const ErrWrongType = -12
+pkg syscall/zx, const ErrWrongType Status
+pkg syscall/zx, const HANDLE_INVALID = 0
+pkg syscall/zx, const HANDLE_INVALID Handle
+pkg syscall/zx, const HandleInvalid = 0
+pkg syscall/zx, const HandleInvalid Handle
+pkg syscall/zx, const HandleOpDuplicate = 1
+pkg syscall/zx, const HandleOpDuplicate HandleOp
+pkg syscall/zx, const HandleOpMove = 0
+pkg syscall/zx, const HandleOpMove HandleOp
+pkg syscall/zx, const HandleSize = 4
+pkg syscall/zx, const HandleSize uint64
+pkg syscall/zx, const ObjectInfoBTI = 20
+pkg syscall/zx, const ObjectInfoBTI ideal-int
+pkg syscall/zx, const ObjectInfoCpUStats = 16
+pkg syscall/zx, const ObjectInfoCpUStats ideal-int
+pkg syscall/zx, const ObjectInfoHandleBasic = 2
+pkg syscall/zx, const ObjectInfoHandleBasic ideal-int
+pkg syscall/zx, const ObjectInfoHandleCount = 19
+pkg syscall/zx, const ObjectInfoHandleCount ideal-int
+pkg syscall/zx, const ObjectInfoHandleNone = 0
+pkg syscall/zx, const ObjectInfoHandleNone ideal-int
+pkg syscall/zx, const ObjectInfoHandleValid = 1
+pkg syscall/zx, const ObjectInfoHandleValid ideal-int
+pkg syscall/zx, const ObjectInfoJobChildren = 8
+pkg syscall/zx, const ObjectInfoJobChildren ideal-int
+pkg syscall/zx, const ObjectInfoJobProcesses = 9
+pkg syscall/zx, const ObjectInfoJobProcesses ideal-int
+pkg syscall/zx, const ObjectInfoKMemStats = 17
+pkg syscall/zx, const ObjectInfoKMemStats ideal-int
+pkg syscall/zx, const ObjectInfoProcess = 3
+pkg syscall/zx, const ObjectInfoProcess ideal-int
+pkg syscall/zx, const ObjectInfoProcessHandleStats = 21
+pkg syscall/zx, const ObjectInfoProcessHandleStats ideal-int
+pkg syscall/zx, const ObjectInfoProcessMaps = 13
+pkg syscall/zx, const ObjectInfoProcessMaps ideal-int
+pkg syscall/zx, const ObjectInfoProcessThreads = 4
+pkg syscall/zx, const ObjectInfoProcessThreads ideal-int
+pkg syscall/zx, const ObjectInfoProcessVMOs = 268435470
+pkg syscall/zx, const ObjectInfoProcessVMOs ideal-int
+pkg syscall/zx, const ObjectInfoProcessVMOs_V1 = 14
+pkg syscall/zx, const ObjectInfoProcessVMOs_V1 ideal-int
+pkg syscall/zx, const ObjectInfoResource = 18
+pkg syscall/zx, const ObjectInfoResource ideal-int
+pkg syscall/zx, const ObjectInfoResourceChildren = 5
+pkg syscall/zx, const ObjectInfoResourceChildren ideal-int
+pkg syscall/zx, const ObjectInfoResourceRecords = 6
+pkg syscall/zx, const ObjectInfoResourceRecords ideal-int
+pkg syscall/zx, const ObjectInfoSocket = 22
+pkg syscall/zx, const ObjectInfoSocket ideal-int
+pkg syscall/zx, const ObjectInfoTaskStats = 12
+pkg syscall/zx, const ObjectInfoTaskStats ideal-int
+pkg syscall/zx, const ObjectInfoThread = 10
+pkg syscall/zx, const ObjectInfoThread ideal-int
+pkg syscall/zx, const ObjectInfoThreadExceptionReport = 11
+pkg syscall/zx, const ObjectInfoThreadExceptionReport ideal-int
+pkg syscall/zx, const ObjectInfoThreadStats = 15
+pkg syscall/zx, const ObjectInfoThreadStats ideal-int
+pkg syscall/zx, const ObjectInfoVMAR = 7
+pkg syscall/zx, const ObjectInfoVMAR ideal-int
+pkg syscall/zx, const ObjectInfoVMO = 268435479
+pkg syscall/zx, const ObjectInfoVMO ideal-int
+pkg syscall/zx, const ObjectInfoVMO_V1 = 23
+pkg syscall/zx, const ObjectInfoVMO_V1 ideal-int
+pkg syscall/zx, const ObjectTypeBti = 24
+pkg syscall/zx, const ObjectTypeBti ObjectType
+pkg syscall/zx, const ObjectTypeChannel = 4
+pkg syscall/zx, const ObjectTypeChannel ObjectType
+pkg syscall/zx, const ObjectTypeEvent = 5
+pkg syscall/zx, const ObjectTypeEvent ObjectType
+pkg syscall/zx, const ObjectTypeEventPair = 16
+pkg syscall/zx, const ObjectTypeEventPair ObjectType
+pkg syscall/zx, const ObjectTypeFifo = 19
+pkg syscall/zx, const ObjectTypeFifo ObjectType
+pkg syscall/zx, const ObjectTypeGuest = 20
+pkg syscall/zx, const ObjectTypeGuest ObjectType
+pkg syscall/zx, const ObjectTypeInterrupt = 9
+pkg syscall/zx, const ObjectTypeInterrupt ObjectType
+pkg syscall/zx, const ObjectTypeIommu = 23
+pkg syscall/zx, const ObjectTypeIommu ObjectType
+pkg syscall/zx, const ObjectTypeJob = 17
+pkg syscall/zx, const ObjectTypeJob ObjectType
+pkg syscall/zx, const ObjectTypeLog = 12
+pkg syscall/zx, const ObjectTypeLog ObjectType
+pkg syscall/zx, const ObjectTypeNone = 0
+pkg syscall/zx, const ObjectTypeNone ObjectType
+pkg syscall/zx, const ObjectTypePager = 28
+pkg syscall/zx, const ObjectTypePager ObjectType
+pkg syscall/zx, const ObjectTypePciDevice = 11
+pkg syscall/zx, const ObjectTypePciDevice ObjectType
+pkg syscall/zx, const ObjectTypePmt = 26
+pkg syscall/zx, const ObjectTypePmt ObjectType
+pkg syscall/zx, const ObjectTypePort = 6
+pkg syscall/zx, const ObjectTypePort ObjectType
+pkg syscall/zx, const ObjectTypeProcess = 1
+pkg syscall/zx, const ObjectTypeProcess ObjectType
+pkg syscall/zx, const ObjectTypeProfile = 25
+pkg syscall/zx, const ObjectTypeProfile ObjectType
+pkg syscall/zx, const ObjectTypeResource = 15
+pkg syscall/zx, const ObjectTypeResource ObjectType
+pkg syscall/zx, const ObjectTypeSocket = 14
+pkg syscall/zx, const ObjectTypeSocket ObjectType
+pkg syscall/zx, const ObjectTypeSuspendToken = 27
+pkg syscall/zx, const ObjectTypeSuspendToken ObjectType
+pkg syscall/zx, const ObjectTypeThread = 2
+pkg syscall/zx, const ObjectTypeThread ObjectType
+pkg syscall/zx, const ObjectTypeTimer = 22
+pkg syscall/zx, const ObjectTypeTimer ObjectType
+pkg syscall/zx, const ObjectTypeVcpu = 21
+pkg syscall/zx, const ObjectTypeVcpu ObjectType
+pkg syscall/zx, const ObjectTypeVmar = 18
+pkg syscall/zx, const ObjectTypeVmar ObjectType
+pkg syscall/zx, const ObjectTypeVmo = 3
+pkg syscall/zx, const ObjectTypeVmo ObjectType
+pkg syscall/zx, const PropJobMaxHeight = 7
+pkg syscall/zx, const PropJobMaxHeight ideal-int
+pkg syscall/zx, const PropName = 3
+pkg syscall/zx, const PropName ideal-int
+pkg syscall/zx, const PropNumStateKinds = 2
+pkg syscall/zx, const PropNumStateKinds ideal-int
+pkg syscall/zx, const PropProcessDebugAddr = 5
+pkg syscall/zx, const PropProcessDebugAddr ideal-int
+pkg syscall/zx, const PropProcessVDSOBaseAddress = 6
+pkg syscall/zx, const PropProcessVDSOBaseAddress ideal-int
+pkg syscall/zx, const PropRegisterFS = 4
+pkg syscall/zx, const PropRegisterFS ideal-int
+pkg syscall/zx, const RightApplyPolicy = 524288
+pkg syscall/zx, const RightApplyPolicy Rights
+pkg syscall/zx, const RightDestroy = 512
+pkg syscall/zx, const RightDestroy Rights
+pkg syscall/zx, const RightDuplicate = 1
+pkg syscall/zx, const RightDuplicate Rights
+pkg syscall/zx, const RightEnumerate = 256
+pkg syscall/zx, const RightEnumerate Rights
+pkg syscall/zx, const RightExecute = 16
+pkg syscall/zx, const RightExecute Rights
+pkg syscall/zx, const RightGetPolicy = 1024
+pkg syscall/zx, const RightGetPolicy Rights
+pkg syscall/zx, const RightGetProperty = 64
+pkg syscall/zx, const RightGetProperty Rights
+pkg syscall/zx, const RightInspect = 32768
+pkg syscall/zx, const RightInspect Rights
+pkg syscall/zx, const RightManageJob = 65536
+pkg syscall/zx, const RightManageJob Rights
+pkg syscall/zx, const RightManageProcess = 131072
+pkg syscall/zx, const RightManageProcess Rights
+pkg syscall/zx, const RightManageThread = 262144
+pkg syscall/zx, const RightManageThread Rights
+pkg syscall/zx, const RightMap = 32
+pkg syscall/zx, const RightMap Rights
+pkg syscall/zx, const RightNone = 0
+pkg syscall/zx, const RightNone Rights
+pkg syscall/zx, const RightRead = 4
+pkg syscall/zx, const RightRead Rights
+pkg syscall/zx, const RightSameRights = 2147483648
+pkg syscall/zx, const RightSameRights Rights
+pkg syscall/zx, const RightSetPolicy = 2048
+pkg syscall/zx, const RightSetPolicy Rights
+pkg syscall/zx, const RightSetProperty = 128
+pkg syscall/zx, const RightSetProperty Rights
+pkg syscall/zx, const RightSignal = 4096
+pkg syscall/zx, const RightSignal Rights
+pkg syscall/zx, const RightSignalPeer = 8192
+pkg syscall/zx, const RightSignalPeer Rights
+pkg syscall/zx, const RightTransfer = 2
+pkg syscall/zx, const RightTransfer Rights
+pkg syscall/zx, const RightWait = 16384
+pkg syscall/zx, const RightWait Rights
+pkg syscall/zx, const RightWrite = 8
+pkg syscall/zx, const RightWrite Rights
+pkg syscall/zx, const RightsBasic = 49155
+pkg syscall/zx, const RightsBasic Rights
+pkg syscall/zx, const RightsIO = 12
+pkg syscall/zx, const RightsIO Rights
+pkg syscall/zx, const RightsPolicy = 3072
+pkg syscall/zx, const RightsPolicy Rights
+pkg syscall/zx, const RightsProperty = 192
+pkg syscall/zx, const RightsProperty Rights
+pkg syscall/zx, const SignalChannelPeerClosed = 4
+pkg syscall/zx, const SignalChannelPeerClosed ideal-int
+pkg syscall/zx, const SignalChannelReadable = 1
+pkg syscall/zx, const SignalChannelReadable ideal-int
+pkg syscall/zx, const SignalChannelWritable = 2
+pkg syscall/zx, const SignalChannelWritable ideal-int
+pkg syscall/zx, const SignalEpairPeerClosed = 4
+pkg syscall/zx, const SignalEpairPeerClosed ideal-int
+pkg syscall/zx, const SignalEpairSignaled = 8
+pkg syscall/zx, const SignalEpairSignaled ideal-int
+pkg syscall/zx, const SignalEventMask = 248
+pkg syscall/zx, const SignalEventMask Signals
+pkg syscall/zx, const SignalEventSignaled = 8
+pkg syscall/zx, const SignalEventSignaled ideal-int
+pkg syscall/zx, const SignalFIFOPeerClosed = 4
+pkg syscall/zx, const SignalFIFOPeerClosed ideal-int
+pkg syscall/zx, const SignalFIFOReadable = 1
+pkg syscall/zx, const SignalFIFOReadable ideal-int
+pkg syscall/zx, const SignalFIFOSignalMask = 7
+pkg syscall/zx, const SignalFIFOSignalMask ideal-int
+pkg syscall/zx, const SignalFIFOWritable = 2
+pkg syscall/zx, const SignalFIFOWritable ideal-int
+pkg syscall/zx, const SignalHandleClosed = 8388608
+pkg syscall/zx, const SignalHandleClosed ideal-int
+pkg syscall/zx, const SignalJobSignaled = 8
+pkg syscall/zx, const SignalJobSignaled ideal-int
+pkg syscall/zx, const SignalNone = 0
+pkg syscall/zx, const SignalNone Signals
+pkg syscall/zx, const SignalObject0 = 1
+pkg syscall/zx, const SignalObject0 ideal-int
+pkg syscall/zx, const SignalObject1 = 2
+pkg syscall/zx, const SignalObject1 ideal-int
+pkg syscall/zx, const SignalObject10 = 1024
+pkg syscall/zx, const SignalObject10 ideal-int
+pkg syscall/zx, const SignalObject11 = 2048
+pkg syscall/zx, const SignalObject11 ideal-int
+pkg syscall/zx, const SignalObject12 = 4096
+pkg syscall/zx, const SignalObject12 ideal-int
+pkg syscall/zx, const SignalObject13 = 8192
+pkg syscall/zx, const SignalObject13 ideal-int
+pkg syscall/zx, const SignalObject14 = 16384
+pkg syscall/zx, const SignalObject14 ideal-int
+pkg syscall/zx, const SignalObject15 = 32768
+pkg syscall/zx, const SignalObject15 ideal-int
+pkg syscall/zx, const SignalObject16 = 65536
+pkg syscall/zx, const SignalObject16 ideal-int
+pkg syscall/zx, const SignalObject17 = 131072
+pkg syscall/zx, const SignalObject17 ideal-int
+pkg syscall/zx, const SignalObject18 = 262144
+pkg syscall/zx, const SignalObject18 ideal-int
+pkg syscall/zx, const SignalObject19 = 524288
+pkg syscall/zx, const SignalObject19 ideal-int
+pkg syscall/zx, const SignalObject2 = 4
+pkg syscall/zx, const SignalObject2 ideal-int
+pkg syscall/zx, const SignalObject20 = 1048576
+pkg syscall/zx, const SignalObject20 ideal-int
+pkg syscall/zx, const SignalObject21 = 2097152
+pkg syscall/zx, const SignalObject21 ideal-int
+pkg syscall/zx, const SignalObject22 = 4194304
+pkg syscall/zx, const SignalObject22 ideal-int
+pkg syscall/zx, const SignalObject23 = 8388608
+pkg syscall/zx, const SignalObject23 ideal-int
+pkg syscall/zx, const SignalObject3 = 8
+pkg syscall/zx, const SignalObject3 ideal-int
+pkg syscall/zx, const SignalObject4 = 16
+pkg syscall/zx, const SignalObject4 ideal-int
+pkg syscall/zx, const SignalObject5 = 32
+pkg syscall/zx, const SignalObject5 ideal-int
+pkg syscall/zx, const SignalObject6 = 64
+pkg syscall/zx, const SignalObject6 ideal-int
+pkg syscall/zx, const SignalObject7 = 128
+pkg syscall/zx, const SignalObject7 ideal-int
+pkg syscall/zx, const SignalObject8 = 256
+pkg syscall/zx, const SignalObject8 ideal-int
+pkg syscall/zx, const SignalObject9 = 512
+pkg syscall/zx, const SignalObject9 ideal-int
+pkg syscall/zx, const SignalObjectAll = 1048575
+pkg syscall/zx, const SignalObjectAll ideal-int
+pkg syscall/zx, const SignalPortPeerClosed = 4
+pkg syscall/zx, const SignalPortPeerClosed ideal-int
+pkg syscall/zx, const SignalPortReadable = 1
+pkg syscall/zx, const SignalPortReadable ideal-int
+pkg syscall/zx, const SignalPortSignaled = 8
+pkg syscall/zx, const SignalPortSignaled ideal-int
+pkg syscall/zx, const SignalProccessSignaled = 8
+pkg syscall/zx, const SignalProccessSignaled ideal-int
+pkg syscall/zx, const SignalResourceChildAdded = 4
+pkg syscall/zx, const SignalResourceChildAdded ideal-int
+pkg syscall/zx, const SignalResourceReadable = 1
+pkg syscall/zx, const SignalResourceReadable ideal-int
+pkg syscall/zx, const SignalResourceWritable = 2
+pkg syscall/zx, const SignalResourceWritable ideal-int
+pkg syscall/zx, const SignalSocketPeerClosed = 4
+pkg syscall/zx, const SignalSocketPeerClosed ideal-int
+pkg syscall/zx, const SignalSocketPeerWriteDisabled = 16
+pkg syscall/zx, const SignalSocketPeerWriteDisabled ideal-int
+pkg syscall/zx, const SignalSocketReadable = 1
+pkg syscall/zx, const SignalSocketReadable ideal-int
+pkg syscall/zx, const SignalSocketWritable = 2
+pkg syscall/zx, const SignalSocketWritable ideal-int
+pkg syscall/zx, const SignalSocketWriteDisabled = 32
+pkg syscall/zx, const SignalSocketWriteDisabled ideal-int
+pkg syscall/zx, const SignalTaskSignalMask = 8
+pkg syscall/zx, const SignalTaskSignalMask ideal-int
+pkg syscall/zx, const SignalTaskTerminated = 8
+pkg syscall/zx, const SignalTaskTerminated ideal-int
+pkg syscall/zx, const SignalThreadSignaled = 8
+pkg syscall/zx, const SignalThreadSignaled ideal-int
+pkg syscall/zx, const SignalUser0 = 16777216
+pkg syscall/zx, const SignalUser0 ideal-int
+pkg syscall/zx, const SignalUser1 = 33554432
+pkg syscall/zx, const SignalUser1 ideal-int
+pkg syscall/zx, const SignalUser2 = 67108864
+pkg syscall/zx, const SignalUser2 ideal-int
+pkg syscall/zx, const SignalUser3 = 134217728
+pkg syscall/zx, const SignalUser3 ideal-int
+pkg syscall/zx, const SignalUser4 = 268435456
+pkg syscall/zx, const SignalUser4 ideal-int
+pkg syscall/zx, const SignalUser5 = 536870912
+pkg syscall/zx, const SignalUser5 ideal-int
+pkg syscall/zx, const SignalUser6 = 1073741824
+pkg syscall/zx, const SignalUser6 ideal-int
+pkg syscall/zx, const SignalUser7 = 2147483648
+pkg syscall/zx, const SignalUser7 ideal-int
+pkg syscall/zx, const SignalUserAll = 240
+pkg syscall/zx, const SignalUserAll Signals
+pkg syscall/zx, const SocketDatagram = 1
+pkg syscall/zx, const SocketDatagram ideal-int
+pkg syscall/zx, const SocketShutdownRead = 2
+pkg syscall/zx, const SocketShutdownRead ideal-int
+pkg syscall/zx, const SocketShutdownWrite = 1
+pkg syscall/zx, const SocketShutdownWrite ideal-int
+pkg syscall/zx, const SocketStream = 0
+pkg syscall/zx, const SocketStream ideal-int
+pkg syscall/zx, const TimensecInfinite = 9223372036854775807
+pkg syscall/zx, const TimensecInfinite Time
+pkg syscall/zx, const VMFlagCanMapExecute = 512
+pkg syscall/zx, const VMFlagCanMapExecute VMFlag
+pkg syscall/zx, const VMFlagCanMapRead = 128
+pkg syscall/zx, const VMFlagCanMapRead VMFlag
+pkg syscall/zx, const VMFlagCanMapSpecific = 64
+pkg syscall/zx, const VMFlagCanMapSpecific VMFlag
+pkg syscall/zx, const VMFlagCanMapWrite = 256
+pkg syscall/zx, const VMFlagCanMapWrite VMFlag
+pkg syscall/zx, const VMFlagCompact = 8
+pkg syscall/zx, const VMFlagCompact VMFlag
+pkg syscall/zx, const VMFlagPermExecute = 4
+pkg syscall/zx, const VMFlagPermExecute VMFlag
+pkg syscall/zx, const VMFlagPermRead = 1
+pkg syscall/zx, const VMFlagPermRead VMFlag
+pkg syscall/zx, const VMFlagPermWrite = 2
+pkg syscall/zx, const VMFlagPermWrite VMFlag
+pkg syscall/zx, const VMFlagSpecific = 16
+pkg syscall/zx, const VMFlagSpecific VMFlag
+pkg syscall/zx, const VMFlagSpecificOverwrite = 32
+pkg syscall/zx, const VMFlagSpecificOverwrite VMFlag
+pkg syscall/zx, const VMOChildOptionCopyOnWrite = 16
+pkg syscall/zx, const VMOChildOptionCopyOnWrite ideal-int
+pkg syscall/zx, const VMOChildOptionNoWrite = 32
+pkg syscall/zx, const VMOChildOptionNoWrite ideal-int
+pkg syscall/zx, const VMOChildOptionPrivatePagerCopy = 16
+pkg syscall/zx, const VMOChildOptionPrivatePagerCopy ideal-int
+pkg syscall/zx, const VMOChildOptionResizable = 4
+pkg syscall/zx, const VMOChildOptionResizable ideal-int
+pkg syscall/zx, const VMOChildOptionSlice = 8
+pkg syscall/zx, const VMOChildOptionSlice ideal-int
+pkg syscall/zx, const VMOChildOptionSnapshot = 1
+pkg syscall/zx, const VMOChildOptionSnapshot VMOChildOption
+pkg syscall/zx, const VMOChildOptionSnapshotAtLeastOnWrite = 16
+pkg syscall/zx, const VMOChildOptionSnapshotAtLeastOnWrite ideal-int
+pkg syscall/zx, const VMOOptionResizable = 2
+pkg syscall/zx, const VMOOptionResizable VMOOption
+pkg syscall/zx, const ZX_MAX_NAME_LEN = 32
+pkg syscall/zx, const ZX_MAX_NAME_LEN ideal-int
+pkg syscall/zx, const ZX_RACT_DISABLE = 2
+pkg syscall/zx, const ZX_RACT_DISABLE ideal-int
+pkg syscall/zx, const ZX_RACT_ENABLE = 1
+pkg syscall/zx, const ZX_RACT_ENABLE ideal-int
+pkg syscall/zx, const ZX_RREC_DATA = 2
+pkg syscall/zx, const ZX_RREC_DATA ideal-int
+pkg syscall/zx, const ZX_RREC_DELETED = 0
+pkg syscall/zx, const ZX_RREC_DELETED ideal-int
+pkg syscall/zx, const ZX_RREC_IOPORT = 5
+pkg syscall/zx, const ZX_RREC_IOPORT ideal-int
+pkg syscall/zx, const ZX_RREC_IRQ = 3
+pkg syscall/zx, const ZX_RREC_IRQ ideal-int
+pkg syscall/zx, const ZX_RREC_MMIO = 4
+pkg syscall/zx, const ZX_RREC_MMIO ideal-int
+pkg syscall/zx, const ZX_RREC_SELF = 1
+pkg syscall/zx, const ZX_RREC_SELF ideal-int
+pkg syscall/zx, const ZX_RREC_SELF_GENERIC = 0
+pkg syscall/zx, const ZX_RREC_SELF_GENERIC ideal-int
+pkg syscall/zx, const ZX_RREC_SELF_ROOT = 1
+pkg syscall/zx, const ZX_RREC_SELF_ROOT ideal-int
+pkg syscall/zx, method (*Channel) Handle() *Handle
+pkg syscall/zx, method (*Event) Handle() *Handle
+pkg syscall/zx, method (*Handle) IsValid() bool
+pkg syscall/zx, method (*Log) Handle() *Handle
+pkg syscall/zx, method (*Port) Handle() *Handle
+pkg syscall/zx, method (*Rrec) Box() RrecValue
+pkg syscall/zx, method (*Socket) Handle() *Handle
+pkg syscall/zx, method (*VMO) Handle() *Handle
+pkg syscall/zx, method (Rights) StrictSubsetOf(Rights) bool
+pkg syscall/zx, method (Rights) StrictSupersetOf(Rights) bool
+pkg syscall/zx, method (Rights) SubsetOf(Rights) bool
+pkg syscall/zx, method (Rights) Subtract(Rights) Rights
+pkg syscall/zx, method (Rights) SupersetOf(Rights) bool
+pkg syscall/zx, method (Status) String() string
+pkg syscall/zx, type Channel uint32
+pkg syscall/zx, type ChannelCallArgs struct
+pkg syscall/zx, type ChannelCallArgs struct, ReadBytes unsafe.Pointer
+pkg syscall/zx, type ChannelCallArgs struct, ReadHandles *Handle
+pkg syscall/zx, type ChannelCallArgs struct, ReadNumBytes uint32
+pkg syscall/zx, type ChannelCallArgs struct, ReadNumHandles uint32
+pkg syscall/zx, type ChannelCallArgs struct, WriteBytes unsafe.Pointer
+pkg syscall/zx, type ChannelCallArgs struct, WriteHandles *Handle
+pkg syscall/zx, type ChannelCallArgs struct, WriteNumBytes uint32
+pkg syscall/zx, type ChannelCallArgs struct, WriteNumHandles uint32
+pkg syscall/zx, type ChannelCallEtcArgs struct
+pkg syscall/zx, type ChannelCallEtcArgs struct, ReadBytes unsafe.Pointer
+pkg syscall/zx, type ChannelCallEtcArgs struct, ReadHandles *HandleInfo
+pkg syscall/zx, type ChannelCallEtcArgs struct, ReadNumBytes uint32
+pkg syscall/zx, type ChannelCallEtcArgs struct, ReadNumHandles uint32
+pkg syscall/zx, type ChannelCallEtcArgs struct, WriteBytes unsafe.Pointer
+pkg syscall/zx, type ChannelCallEtcArgs struct, WriteHandles *HandleDisposition
+pkg syscall/zx, type ChannelCallEtcArgs struct, WriteNumBytes uint32
+pkg syscall/zx, type ChannelCallEtcArgs struct, WriteNumHandles uint32
+pkg syscall/zx, type Clock uint32
+pkg syscall/zx, type Duration int64
+pkg syscall/zx, type Event uint32
+pkg syscall/zx, type FIFOState struct
+pkg syscall/zx, type Handle uint32
+pkg syscall/zx, type HandleDisposition struct
+pkg syscall/zx, type HandleDisposition struct, Handle Handle
+pkg syscall/zx, type HandleDisposition struct, Operation HandleOp
+pkg syscall/zx, type HandleDisposition struct, Result Status
+pkg syscall/zx, type HandleDisposition struct, Rights Rights
+pkg syscall/zx, type HandleDisposition struct, Type ObjectType
+pkg syscall/zx, type HandleInfo struct
+pkg syscall/zx, type HandleInfo struct, Handle Handle
+pkg syscall/zx, type HandleInfo struct, Rights Rights
+pkg syscall/zx, type HandleInfo struct, Type ObjectType
+pkg syscall/zx, type HandleInfo struct, Unused uint32
+pkg syscall/zx, type HandleOp uint32
+pkg syscall/zx, type InfoHandleBasic struct
+pkg syscall/zx, type InfoHandleBasic struct, Koid uint64
+pkg syscall/zx, type InfoHandleBasic struct, Props uint32
+pkg syscall/zx, type InfoHandleBasic struct, RelatedKoid uint64
+pkg syscall/zx, type InfoHandleBasic struct, Rights Rights
+pkg syscall/zx, type InfoHandleBasic struct, Type ObjectType
+pkg syscall/zx, type InfoSocket struct
+pkg syscall/zx, type InfoSocket struct, Options uint32
+pkg syscall/zx, type InfoSocket struct, RXBufAvailable int
+pkg syscall/zx, type InfoSocket struct, RXBufMax int
+pkg syscall/zx, type InfoSocket struct, RXBufSize int
+pkg syscall/zx, type InfoSocket struct, TXBufMax int
+pkg syscall/zx, type InfoSocket struct, TXBufSize int
+pkg syscall/zx, type Log uint32
+pkg syscall/zx, type ObjectType uint32
+pkg syscall/zx, type Paddr uintptr
+pkg syscall/zx, type Port uint32
+pkg syscall/zx, type Rights uint32
+pkg syscall/zx, type Rrec struct
+pkg syscall/zx, type RrecData struct
+pkg syscall/zx, type RrecData struct, Data [56]uint8
+pkg syscall/zx, type RrecData struct, Options uint32
+pkg syscall/zx, type RrecData struct, Subtype uint16
+pkg syscall/zx, type RrecData struct, Type uint16
+pkg syscall/zx, type RrecIOPort struct
+pkg syscall/zx, type RrecIOPort struct, Options uint32
+pkg syscall/zx, type RrecIOPort struct, PortBase uint32
+pkg syscall/zx, type RrecIOPort struct, PortCount uint32
+pkg syscall/zx, type RrecIOPort struct, Subtype uint16
+pkg syscall/zx, type RrecIOPort struct, Type uint16
+pkg syscall/zx, type RrecIRQ struct
+pkg syscall/zx, type RrecIRQ struct, IRQBase uint32
+pkg syscall/zx, type RrecIRQ struct, IRQCount uint32
+pkg syscall/zx, type RrecIRQ struct, Options uint32
+pkg syscall/zx, type RrecIRQ struct, Subtype uint16
+pkg syscall/zx, type RrecIRQ struct, Type uint16
+pkg syscall/zx, type RrecMMIO struct
+pkg syscall/zx, type RrecMMIO struct, Options uint32
+pkg syscall/zx, type RrecMMIO struct, PhysBase uint64
+pkg syscall/zx, type RrecMMIO struct, PhysSize uint64
+pkg syscall/zx, type RrecMMIO struct, Subtype uint16
+pkg syscall/zx, type RrecMMIO struct, Type uint16
+pkg syscall/zx, type RrecSelf struct
+pkg syscall/zx, type RrecSelf struct, ChildCount uint32
+pkg syscall/zx, type RrecSelf struct, Koid uint64
+pkg syscall/zx, type RrecSelf struct, Name [32]uint8
+pkg syscall/zx, type RrecSelf struct, Options uint32
+pkg syscall/zx, type RrecSelf struct, RecordCount uint32
+pkg syscall/zx, type RrecSelf struct, Subtype uint16
+pkg syscall/zx, type RrecSelf struct, Type uint16
+pkg syscall/zx, type RrecValue interface, unexported methods
+pkg syscall/zx, type SMCParameters struct
+pkg syscall/zx, type SMCResult struct
+pkg syscall/zx, type Signals uint32
+pkg syscall/zx, type Socket uint32
+pkg syscall/zx, type Status int32
+pkg syscall/zx, type Time int64
+pkg syscall/zx, type VMAR uint32
+pkg syscall/zx, type VMFlag uint32
+pkg syscall/zx, type VMO uint32
+pkg syscall/zx, type VMOChildOption uint32
+pkg syscall/zx, type VMOOption int
+pkg syscall/zx, type Vaddr uintptr
+pkg syscall/zx, type WaitItem struct
+pkg syscall/zx, type WaitItem struct, Handle Handle
+pkg syscall/zx, type WaitItem struct, Pending Signals
+pkg syscall/zx, type WaitItem struct, WaitFor Signals
+pkg syscall/zx, var EOF error
+pkg syscall/zx, var EPIPE error
+pkg syscall/zx/diagnostics, const ArchiveAccessorName = "fuchsia.diagnostics.ArchiveAccessor"
+pkg syscall/zx/diagnostics, const ArchiveAccessorName ideal-string
+pkg syscall/zx/diagnostics, const ArchiveAccessorStreamDiagnosticsOrdinal = 2361924900314496062
+pkg syscall/zx/diagnostics, const ArchiveAccessorStreamDiagnosticsOrdinal uint64
+pkg syscall/zx/diagnostics, const BatchIteratorGetNextOrdinal = 8654095804583269541
+pkg syscall/zx/diagnostics, const BatchIteratorGetNextOrdinal uint64
+pkg syscall/zx/diagnostics, const BatchIteratorGetNextResultErr = 2
+pkg syscall/zx/diagnostics, const BatchIteratorGetNextResultErr ideal-int
+pkg syscall/zx/diagnostics, const BatchIteratorGetNextResultResponse = 1
+pkg syscall/zx/diagnostics, const BatchIteratorGetNextResultResponse ideal-int
+pkg syscall/zx/diagnostics, const ClientSelectorConfigurationSelectAll = 2
+pkg syscall/zx/diagnostics, const ClientSelectorConfigurationSelectAll ideal-int
+pkg syscall/zx/diagnostics, const ClientSelectorConfigurationSelectors = 1
+pkg syscall/zx/diagnostics, const ClientSelectorConfigurationSelectors ideal-int
+pkg syscall/zx/diagnostics, const ClientSelectorConfiguration_unknownData = 0
+pkg syscall/zx/diagnostics, const ClientSelectorConfiguration_unknownData ideal-int
+pkg syscall/zx/diagnostics, const DataTypeInspect = 1
+pkg syscall/zx/diagnostics, const DataTypeInspect DataType
+pkg syscall/zx/diagnostics, const DataTypeLifecycle = 2
+pkg syscall/zx/diagnostics, const DataTypeLifecycle DataType
+pkg syscall/zx/diagnostics, const DataTypeLogs = 3
+pkg syscall/zx/diagnostics, const DataTypeLogs DataType
+pkg syscall/zx/diagnostics, const FormatJson = 1
+pkg syscall/zx/diagnostics, const FormatJson Format
+pkg syscall/zx/diagnostics, const FormatText = 2
+pkg syscall/zx/diagnostics, const FormatText Format
+pkg syscall/zx/diagnostics, const FormattedContentJson = 1
+pkg syscall/zx/diagnostics, const FormattedContentJson ideal-int
+pkg syscall/zx/diagnostics, const FormattedContentText = 2
+pkg syscall/zx/diagnostics, const FormattedContentText ideal-int
+pkg syscall/zx/diagnostics, const FormattedContent_unknownData = 0
+pkg syscall/zx/diagnostics, const FormattedContent_unknownData ideal-int
+pkg syscall/zx/diagnostics, const MaxDataHierarchyDepth = 100
+pkg syscall/zx/diagnostics, const MaxDataHierarchyDepth uint16
+pkg syscall/zx/diagnostics, const MaxMonikerSegments = 25
+pkg syscall/zx/diagnostics, const MaxMonikerSegments uint16
+pkg syscall/zx/diagnostics, const MaxStringSelectorLength = 100
+pkg syscall/zx/diagnostics, const MaxStringSelectorLength uint16
+pkg syscall/zx/diagnostics, const MaximumEntriesPerBatch = 64
+pkg syscall/zx/diagnostics, const MaximumEntriesPerBatch uint16
+pkg syscall/zx/diagnostics, const MaximumRawSelectorLength = 1024
+pkg syscall/zx/diagnostics, const MaximumRawSelectorLength uint16
+pkg syscall/zx/diagnostics, const ReaderErrorIo = 1
+pkg syscall/zx/diagnostics, const ReaderErrorIo ReaderError
+pkg syscall/zx/diagnostics, const SelectorArgumentRawSelector = 2
+pkg syscall/zx/diagnostics, const SelectorArgumentRawSelector ideal-int
+pkg syscall/zx/diagnostics, const SelectorArgumentStructuredSelector = 1
+pkg syscall/zx/diagnostics, const SelectorArgumentStructuredSelector ideal-int
+pkg syscall/zx/diagnostics, const SelectorArgument_unknownData = 0
+pkg syscall/zx/diagnostics, const SelectorArgument_unknownData ideal-int
+pkg syscall/zx/diagnostics, const SeverityDebug = 32
+pkg syscall/zx/diagnostics, const SeverityDebug Severity
+pkg syscall/zx/diagnostics, const SeverityError = 80
+pkg syscall/zx/diagnostics, const SeverityError Severity
+pkg syscall/zx/diagnostics, const SeverityFatal = 96
+pkg syscall/zx/diagnostics, const SeverityFatal Severity
+pkg syscall/zx/diagnostics, const SeverityInfo = 48
+pkg syscall/zx/diagnostics, const SeverityInfo Severity
+pkg syscall/zx/diagnostics, const SeverityTrace = 16
+pkg syscall/zx/diagnostics, const SeverityTrace Severity
+pkg syscall/zx/diagnostics, const SeverityWarn = 64
+pkg syscall/zx/diagnostics, const SeverityWarn Severity
+pkg syscall/zx/diagnostics, const StreamModeSnapshot = 1
+pkg syscall/zx/diagnostics, const StreamModeSnapshot StreamMode
+pkg syscall/zx/diagnostics, const StreamModeSnapshotThenSubscribe = 2
+pkg syscall/zx/diagnostics, const StreamModeSnapshotThenSubscribe StreamMode
+pkg syscall/zx/diagnostics, const StreamModeSubscribe = 3
+pkg syscall/zx/diagnostics, const StreamModeSubscribe StreamMode
+pkg syscall/zx/diagnostics, const StringSelectorExactMatch = 2
+pkg syscall/zx/diagnostics, const StringSelectorExactMatch ideal-int
+pkg syscall/zx/diagnostics, const StringSelectorStringPattern = 1
+pkg syscall/zx/diagnostics, const StringSelectorStringPattern ideal-int
+pkg syscall/zx/diagnostics, const StringSelector_unknownData = 0
+pkg syscall/zx/diagnostics, const StringSelector_unknownData ideal-int
+pkg syscall/zx/diagnostics, const TreeSelectorPropertySelector = 2
+pkg syscall/zx/diagnostics, const TreeSelectorPropertySelector ideal-int
+pkg syscall/zx/diagnostics, const TreeSelectorSubtreeSelector = 1
+pkg syscall/zx/diagnostics, const TreeSelectorSubtreeSelector ideal-int
+pkg syscall/zx/diagnostics, const TreeSelector_unknownData = 0
+pkg syscall/zx/diagnostics, const TreeSelector_unknownData ideal-int
+pkg syscall/zx/diagnostics, func BatchIteratorGetNextResultWithErr(ReaderError) BatchIteratorGetNextResult
+pkg syscall/zx/diagnostics, func BatchIteratorGetNextResultWithResponse(BatchIteratorGetNextResponse) BatchIteratorGetNextResult
+pkg syscall/zx/diagnostics, func ClientSelectorConfigurationWithSelectAll(bool) ClientSelectorConfiguration
+pkg syscall/zx/diagnostics, func ClientSelectorConfigurationWithSelectors([]SelectorArgument) ClientSelectorConfiguration
+pkg syscall/zx/diagnostics, func FormattedContentWithJson(mem.Buffer) FormattedContent
+pkg syscall/zx/diagnostics, func FormattedContentWithText(mem.Buffer) FormattedContent
+pkg syscall/zx/diagnostics, func NewArchiveAccessorWithCtxInterfaceRequest() (ArchiveAccessorWithCtxInterfaceRequest, *ArchiveAccessorWithCtxInterface, error)
+pkg syscall/zx/diagnostics, func NewBatchIteratorWithCtxInterfaceRequest() (BatchIteratorWithCtxInterfaceRequest, *BatchIteratorWithCtxInterface, error)
+pkg syscall/zx/diagnostics, func SelectorArgumentWithRawSelector(string) SelectorArgument
+pkg syscall/zx/diagnostics, func SelectorArgumentWithStructuredSelector(Selector) SelectorArgument
+pkg syscall/zx/diagnostics, func StringSelectorWithExactMatch(string) StringSelector
+pkg syscall/zx/diagnostics, func StringSelectorWithStringPattern(string) StringSelector
+pkg syscall/zx/diagnostics, func TreeSelectorWithPropertySelector(PropertySelector) TreeSelector
+pkg syscall/zx/diagnostics, func TreeSelectorWithSubtreeSelector(SubtreeSelector) TreeSelector
+pkg syscall/zx/diagnostics, method (*ArchiveAccessorEventProxy) Handle() *zx.Handle
+pkg syscall/zx/diagnostics, method (*ArchiveAccessorWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/diagnostics, method (*ArchiveAccessorWithCtxInterface) StreamDiagnostics(context.Context, StreamParameters, BatchIteratorWithCtxInterfaceRequest) error
+pkg syscall/zx/diagnostics, method (*ArchiveAccessorWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/diagnostics, method (*ArchiveAccessorWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/diagnostics, method (*BatchIteratorEventProxy) Handle() *zx.Handle
+pkg syscall/zx/diagnostics, method (*BatchIteratorGetNextResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/diagnostics, method (*BatchIteratorGetNextResult) Ordinal() uint64
+pkg syscall/zx/diagnostics, method (*BatchIteratorGetNextResult) SetErr(ReaderError)
+pkg syscall/zx/diagnostics, method (*BatchIteratorGetNextResult) SetResponse(BatchIteratorGetNextResponse)
+pkg syscall/zx/diagnostics, method (*BatchIteratorGetNextResult) Which() I_batchIteratorGetNextResultTag
+pkg syscall/zx/diagnostics, method (*BatchIteratorWithCtxInterface) GetNext(context.Context) (BatchIteratorGetNextResult, error)
+pkg syscall/zx/diagnostics, method (*BatchIteratorWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/diagnostics, method (*BatchIteratorWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/diagnostics, method (*BatchIteratorWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/diagnostics, method (*ClientSelectorConfiguration) GetUnknownData() fidl.UnknownData
+pkg syscall/zx/diagnostics, method (*ClientSelectorConfiguration) Ordinal() uint64
+pkg syscall/zx/diagnostics, method (*ClientSelectorConfiguration) SetSelectAll(bool)
+pkg syscall/zx/diagnostics, method (*ClientSelectorConfiguration) SetSelectors([]SelectorArgument)
+pkg syscall/zx/diagnostics, method (*ClientSelectorConfiguration) Which() I_clientSelectorConfigurationTag
+pkg syscall/zx/diagnostics, method (*ComponentSelector) ClearMonikerSegments()
+pkg syscall/zx/diagnostics, method (*ComponentSelector) GetMonikerSegments() []StringSelector
+pkg syscall/zx/diagnostics, method (*ComponentSelector) GetMonikerSegmentsWithDefault([]StringSelector) []StringSelector
+pkg syscall/zx/diagnostics, method (*ComponentSelector) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/diagnostics, method (*ComponentSelector) HasMonikerSegments() bool
+pkg syscall/zx/diagnostics, method (*ComponentSelector) HasUnknownData() bool
+pkg syscall/zx/diagnostics, method (*ComponentSelector) SetMonikerSegments([]StringSelector)
+pkg syscall/zx/diagnostics, method (*FormattedContent) GetUnknownData() fidl.UnknownData
+pkg syscall/zx/diagnostics, method (*FormattedContent) Ordinal() uint64
+pkg syscall/zx/diagnostics, method (*FormattedContent) SetJson(mem.Buffer)
+pkg syscall/zx/diagnostics, method (*FormattedContent) SetText(mem.Buffer)
+pkg syscall/zx/diagnostics, method (*FormattedContent) Which() I_formattedContentTag
+pkg syscall/zx/diagnostics, method (*Interest) ClearMinSeverity()
+pkg syscall/zx/diagnostics, method (*Interest) GetMinSeverity() Severity
+pkg syscall/zx/diagnostics, method (*Interest) GetMinSeverityWithDefault(Severity) Severity
+pkg syscall/zx/diagnostics, method (*Interest) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/diagnostics, method (*Interest) HasMinSeverity() bool
+pkg syscall/zx/diagnostics, method (*Interest) HasUnknownData() bool
+pkg syscall/zx/diagnostics, method (*Interest) SetMinSeverity(Severity)
+pkg syscall/zx/diagnostics, method (*PropertySelector) Marshaler() fidl.Marshaler
+pkg syscall/zx/diagnostics, method (*Selector) ClearComponentSelector()
+pkg syscall/zx/diagnostics, method (*Selector) ClearTreeSelector()
+pkg syscall/zx/diagnostics, method (*Selector) GetComponentSelector() ComponentSelector
+pkg syscall/zx/diagnostics, method (*Selector) GetComponentSelectorWithDefault(ComponentSelector) ComponentSelector
+pkg syscall/zx/diagnostics, method (*Selector) GetTreeSelector() TreeSelector
+pkg syscall/zx/diagnostics, method (*Selector) GetTreeSelectorWithDefault(TreeSelector) TreeSelector
+pkg syscall/zx/diagnostics, method (*Selector) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/diagnostics, method (*Selector) HasComponentSelector() bool
+pkg syscall/zx/diagnostics, method (*Selector) HasTreeSelector() bool
+pkg syscall/zx/diagnostics, method (*Selector) HasUnknownData() bool
+pkg syscall/zx/diagnostics, method (*Selector) SetComponentSelector(ComponentSelector)
+pkg syscall/zx/diagnostics, method (*Selector) SetTreeSelector(TreeSelector)
+pkg syscall/zx/diagnostics, method (*SelectorArgument) GetUnknownData() fidl.UnknownData
+pkg syscall/zx/diagnostics, method (*SelectorArgument) Ordinal() uint64
+pkg syscall/zx/diagnostics, method (*SelectorArgument) SetRawSelector(string)
+pkg syscall/zx/diagnostics, method (*SelectorArgument) SetStructuredSelector(Selector)
+pkg syscall/zx/diagnostics, method (*SelectorArgument) Which() I_selectorArgumentTag
+pkg syscall/zx/diagnostics, method (*StreamParameters) ClearBatchRetrievalTimeoutSeconds()
+pkg syscall/zx/diagnostics, method (*StreamParameters) ClearClientSelectorConfiguration()
+pkg syscall/zx/diagnostics, method (*StreamParameters) ClearDataType()
+pkg syscall/zx/diagnostics, method (*StreamParameters) ClearFormat()
+pkg syscall/zx/diagnostics, method (*StreamParameters) ClearStreamMode()
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetBatchRetrievalTimeoutSeconds() int64
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetBatchRetrievalTimeoutSecondsWithDefault(int64) int64
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetClientSelectorConfiguration() ClientSelectorConfiguration
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetClientSelectorConfigurationWithDefault(ClientSelectorConfiguration) ClientSelectorConfiguration
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetDataType() DataType
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetDataTypeWithDefault(DataType) DataType
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetFormat() Format
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetFormatWithDefault(Format) Format
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetStreamMode() StreamMode
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetStreamModeWithDefault(StreamMode) StreamMode
+pkg syscall/zx/diagnostics, method (*StreamParameters) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/diagnostics, method (*StreamParameters) HasBatchRetrievalTimeoutSeconds() bool
+pkg syscall/zx/diagnostics, method (*StreamParameters) HasClientSelectorConfiguration() bool
+pkg syscall/zx/diagnostics, method (*StreamParameters) HasDataType() bool
+pkg syscall/zx/diagnostics, method (*StreamParameters) HasFormat() bool
+pkg syscall/zx/diagnostics, method (*StreamParameters) HasStreamMode() bool
+pkg syscall/zx/diagnostics, method (*StreamParameters) HasUnknownData() bool
+pkg syscall/zx/diagnostics, method (*StreamParameters) SetBatchRetrievalTimeoutSeconds(int64)
+pkg syscall/zx/diagnostics, method (*StreamParameters) SetClientSelectorConfiguration(ClientSelectorConfiguration)
+pkg syscall/zx/diagnostics, method (*StreamParameters) SetDataType(DataType)
+pkg syscall/zx/diagnostics, method (*StreamParameters) SetFormat(Format)
+pkg syscall/zx/diagnostics, method (*StreamParameters) SetStreamMode(StreamMode)
+pkg syscall/zx/diagnostics, method (*StringSelector) GetUnknownData() fidl.UnknownData
+pkg syscall/zx/diagnostics, method (*StringSelector) Ordinal() uint64
+pkg syscall/zx/diagnostics, method (*StringSelector) SetExactMatch(string)
+pkg syscall/zx/diagnostics, method (*StringSelector) SetStringPattern(string)
+pkg syscall/zx/diagnostics, method (*StringSelector) Which() I_stringSelectorTag
+pkg syscall/zx/diagnostics, method (*SubtreeSelector) Marshaler() fidl.Marshaler
+pkg syscall/zx/diagnostics, method (*TreeSelector) GetUnknownData() fidl.UnknownData
+pkg syscall/zx/diagnostics, method (*TreeSelector) Ordinal() uint64
+pkg syscall/zx/diagnostics, method (*TreeSelector) SetPropertySelector(PropertySelector)
+pkg syscall/zx/diagnostics, method (*TreeSelector) SetSubtreeSelector(SubtreeSelector)
+pkg syscall/zx/diagnostics, method (*TreeSelector) Which() I_treeSelectorTag
+pkg syscall/zx/diagnostics, method (ArchiveAccessorWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/diagnostics, method (ArchiveAccessorWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/diagnostics, method (DataType) I_EnumIsStrict() bool
+pkg syscall/zx/diagnostics, method (DataType) I_EnumValues() []DataType
+pkg syscall/zx/diagnostics, method (DataType) IsUnknown() bool
+pkg syscall/zx/diagnostics, method (DataType) String() string
+pkg syscall/zx/diagnostics, method (Format) I_EnumIsStrict() bool
+pkg syscall/zx/diagnostics, method (Format) I_EnumValues() []Format
+pkg syscall/zx/diagnostics, method (Format) IsUnknown() bool
+pkg syscall/zx/diagnostics, method (Format) String() string
+pkg syscall/zx/diagnostics, method (ReaderError) I_EnumIsStrict() bool
+pkg syscall/zx/diagnostics, method (ReaderError) I_EnumValues() []ReaderError
+pkg syscall/zx/diagnostics, method (ReaderError) IsUnknown() bool
+pkg syscall/zx/diagnostics, method (ReaderError) String() string
+pkg syscall/zx/diagnostics, method (Severity) I_EnumIsStrict() bool
+pkg syscall/zx/diagnostics, method (Severity) I_EnumValues() []Severity
+pkg syscall/zx/diagnostics, method (Severity) IsUnknown() bool
+pkg syscall/zx/diagnostics, method (Severity) String() string
+pkg syscall/zx/diagnostics, method (StreamMode) I_EnumIsStrict() bool
+pkg syscall/zx/diagnostics, method (StreamMode) I_EnumValues() []StreamMode
+pkg syscall/zx/diagnostics, method (StreamMode) IsUnknown() bool
+pkg syscall/zx/diagnostics, method (StreamMode) String() string
+pkg syscall/zx/diagnostics, type ArchiveAccessorEventProxy struct
+pkg syscall/zx/diagnostics, type ArchiveAccessorEventProxy struct, embedded zx.Channel
+pkg syscall/zx/diagnostics, type ArchiveAccessorWithCtx interface { StreamDiagnostics }
+pkg syscall/zx/diagnostics, type ArchiveAccessorWithCtx interface, StreamDiagnostics(context.Context, StreamParameters, BatchIteratorWithCtxInterfaceRequest) error
+pkg syscall/zx/diagnostics, type ArchiveAccessorWithCtxInterface struct
+pkg syscall/zx/diagnostics, type ArchiveAccessorWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/diagnostics, type ArchiveAccessorWithCtxInterfaceRequest struct
+pkg syscall/zx/diagnostics, type ArchiveAccessorWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/diagnostics, type ArchiveAccessorWithCtxStub struct
+pkg syscall/zx/diagnostics, type ArchiveAccessorWithCtxStub struct, Impl ArchiveAccessorWithCtx
+pkg syscall/zx/diagnostics, type ArchiveAccessorWithCtxTransitionalBase struct
+pkg syscall/zx/diagnostics, type BatchIteratorEventProxy struct
+pkg syscall/zx/diagnostics, type BatchIteratorEventProxy struct, embedded zx.Channel
+pkg syscall/zx/diagnostics, type BatchIteratorGetNextResponse struct
+pkg syscall/zx/diagnostics, type BatchIteratorGetNextResponse struct, Batch []FormattedContent
+pkg syscall/zx/diagnostics, type BatchIteratorGetNextResult struct
+pkg syscall/zx/diagnostics, type BatchIteratorGetNextResult struct, Err ReaderError
+pkg syscall/zx/diagnostics, type BatchIteratorGetNextResult struct, Response BatchIteratorGetNextResponse
+pkg syscall/zx/diagnostics, type BatchIteratorGetNextResult struct, embedded I_batchIteratorGetNextResultTag
+pkg syscall/zx/diagnostics, type BatchIteratorWithCtx interface { GetNext }
+pkg syscall/zx/diagnostics, type BatchIteratorWithCtx interface, GetNext(context.Context) (BatchIteratorGetNextResult, error)
+pkg syscall/zx/diagnostics, type BatchIteratorWithCtxInterface struct
+pkg syscall/zx/diagnostics, type BatchIteratorWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/diagnostics, type BatchIteratorWithCtxInterfaceRequest struct
+pkg syscall/zx/diagnostics, type BatchIteratorWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/diagnostics, type BatchIteratorWithCtxStub struct
+pkg syscall/zx/diagnostics, type BatchIteratorWithCtxStub struct, Impl BatchIteratorWithCtx
+pkg syscall/zx/diagnostics, type BatchIteratorWithCtxTransitionalBase struct
+pkg syscall/zx/diagnostics, type ClientSelectorConfiguration struct
+pkg syscall/zx/diagnostics, type ClientSelectorConfiguration struct, I_unknownData interface{}
+pkg syscall/zx/diagnostics, type ClientSelectorConfiguration struct, SelectAll bool
+pkg syscall/zx/diagnostics, type ClientSelectorConfiguration struct, Selectors []SelectorArgument
+pkg syscall/zx/diagnostics, type ClientSelectorConfiguration struct, embedded I_clientSelectorConfigurationTag
+pkg syscall/zx/diagnostics, type ComponentSelector struct
+pkg syscall/zx/diagnostics, type ComponentSelector struct, I_unknownData interface{}
+pkg syscall/zx/diagnostics, type ComponentSelector struct, MonikerSegments []StringSelector
+pkg syscall/zx/diagnostics, type ComponentSelector struct, MonikerSegmentsPresent bool
+pkg syscall/zx/diagnostics, type DataType uint8
+pkg syscall/zx/diagnostics, type Format uint32
+pkg syscall/zx/diagnostics, type FormattedContent struct
+pkg syscall/zx/diagnostics, type FormattedContent struct, I_unknownData interface{}
+pkg syscall/zx/diagnostics, type FormattedContent struct, Json mem.Buffer
+pkg syscall/zx/diagnostics, type FormattedContent struct, Text mem.Buffer
+pkg syscall/zx/diagnostics, type FormattedContent struct, embedded I_formattedContentTag
+pkg syscall/zx/diagnostics, type I_batchIteratorGetNextResultTag uint64
+pkg syscall/zx/diagnostics, type I_clientSelectorConfigurationTag uint64
+pkg syscall/zx/diagnostics, type I_formattedContentTag uint64
+pkg syscall/zx/diagnostics, type I_selectorArgumentTag uint64
+pkg syscall/zx/diagnostics, type I_stringSelectorTag uint64
+pkg syscall/zx/diagnostics, type I_treeSelectorTag uint64
+pkg syscall/zx/diagnostics, type Interest struct
+pkg syscall/zx/diagnostics, type Interest struct, I_unknownData interface{}
+pkg syscall/zx/diagnostics, type Interest struct, MinSeverity Severity
+pkg syscall/zx/diagnostics, type Interest struct, MinSeverityPresent bool
+pkg syscall/zx/diagnostics, type PropertySelector struct
+pkg syscall/zx/diagnostics, type PropertySelector struct, NodePath []StringSelector
+pkg syscall/zx/diagnostics, type PropertySelector struct, TargetProperties StringSelector
+pkg syscall/zx/diagnostics, type ReaderError uint32
+pkg syscall/zx/diagnostics, type Selector struct
+pkg syscall/zx/diagnostics, type Selector struct, ComponentSelector ComponentSelector
+pkg syscall/zx/diagnostics, type Selector struct, ComponentSelectorPresent bool
+pkg syscall/zx/diagnostics, type Selector struct, I_unknownData interface{}
+pkg syscall/zx/diagnostics, type Selector struct, TreeSelector TreeSelector
+pkg syscall/zx/diagnostics, type Selector struct, TreeSelectorPresent bool
+pkg syscall/zx/diagnostics, type SelectorArgument struct
+pkg syscall/zx/diagnostics, type SelectorArgument struct, I_unknownData interface{}
+pkg syscall/zx/diagnostics, type SelectorArgument struct, RawSelector string
+pkg syscall/zx/diagnostics, type SelectorArgument struct, StructuredSelector Selector
+pkg syscall/zx/diagnostics, type SelectorArgument struct, embedded I_selectorArgumentTag
+pkg syscall/zx/diagnostics, type Severity uint8
+pkg syscall/zx/diagnostics, type StreamMode uint8
+pkg syscall/zx/diagnostics, type StreamParameters struct
+pkg syscall/zx/diagnostics, type StreamParameters struct, BatchRetrievalTimeoutSeconds int64
+pkg syscall/zx/diagnostics, type StreamParameters struct, BatchRetrievalTimeoutSecondsPresent bool
+pkg syscall/zx/diagnostics, type StreamParameters struct, ClientSelectorConfiguration ClientSelectorConfiguration
+pkg syscall/zx/diagnostics, type StreamParameters struct, ClientSelectorConfigurationPresent bool
+pkg syscall/zx/diagnostics, type StreamParameters struct, DataType DataType
+pkg syscall/zx/diagnostics, type StreamParameters struct, DataTypePresent bool
+pkg syscall/zx/diagnostics, type StreamParameters struct, Format Format
+pkg syscall/zx/diagnostics, type StreamParameters struct, FormatPresent bool
+pkg syscall/zx/diagnostics, type StreamParameters struct, I_unknownData interface{}
+pkg syscall/zx/diagnostics, type StreamParameters struct, StreamMode StreamMode
+pkg syscall/zx/diagnostics, type StreamParameters struct, StreamModePresent bool
+pkg syscall/zx/diagnostics, type StringSelector struct
+pkg syscall/zx/diagnostics, type StringSelector struct, ExactMatch string
+pkg syscall/zx/diagnostics, type StringSelector struct, I_unknownData interface{}
+pkg syscall/zx/diagnostics, type StringSelector struct, StringPattern string
+pkg syscall/zx/diagnostics, type StringSelector struct, embedded I_stringSelectorTag
+pkg syscall/zx/diagnostics, type SubtreeSelector struct
+pkg syscall/zx/diagnostics, type SubtreeSelector struct, NodePath []StringSelector
+pkg syscall/zx/diagnostics, type TreeSelector struct
+pkg syscall/zx/diagnostics, type TreeSelector struct, I_unknownData interface{}
+pkg syscall/zx/diagnostics, type TreeSelector struct, PropertySelector PropertySelector
+pkg syscall/zx/diagnostics, type TreeSelector struct, SubtreeSelector SubtreeSelector
+pkg syscall/zx/diagnostics, type TreeSelector struct, embedded I_treeSelectorTag
+pkg syscall/zx/fdio, const HandleTypeFileDescriptor = 48
+pkg syscall/zx/fdio, const HandleTypeFileDescriptor ideal-int
+pkg syscall/zx/fdio, const HandleTypeLogger = 53
+pkg syscall/zx/fdio, const HandleTypeLogger ideal-int
+pkg syscall/zx/fdio, const HandleTypeRemote = 50
+pkg syscall/zx/fdio, const HandleTypeRemote ideal-int
+pkg syscall/zx/fdio, const HandleTypeSocket = 54
+pkg syscall/zx/fdio, const HandleTypeSocket ideal-int
+pkg syscall/zx/fdio, const S_IFDIR = 16384
+pkg syscall/zx/fdio, const S_IFDIR ideal-int
+pkg syscall/zx/fdio, const S_IFIFO = 4096
+pkg syscall/zx/fdio, const S_IFIFO ideal-int
+pkg syscall/zx/fdio, const S_IFMT = 61440
+pkg syscall/zx/fdio, const S_IFMT ideal-int
+pkg syscall/zx/fdio, const S_IFREG = 32768
+pkg syscall/zx/fdio, const S_IFREG ideal-int
+pkg syscall/zx/fdio, const VtypeBdev = 24576
+pkg syscall/zx/fdio, const VtypeBdev Vtype
+pkg syscall/zx/fdio, const VtypeCdev = 8192
+pkg syscall/zx/fdio, const VtypeCdev Vtype
+pkg syscall/zx/fdio, const VtypeDir = 16384
+pkg syscall/zx/fdio, const VtypeDir Vtype
+pkg syscall/zx/fdio, const VtypeFile = 32768
+pkg syscall/zx/fdio, const VtypeFile Vtype
+pkg syscall/zx/fdio, const VtypeIRGRP = 32
+pkg syscall/zx/fdio, const VtypeIRGRP Vtype
+pkg syscall/zx/fdio, const VtypeIROTH = 4
+pkg syscall/zx/fdio, const VtypeIROTH Vtype
+pkg syscall/zx/fdio, const VtypeIRUSR = 256
+pkg syscall/zx/fdio, const VtypeIRUSR Vtype
+pkg syscall/zx/fdio, const VtypeIRWXG = 56
+pkg syscall/zx/fdio, const VtypeIRWXG Vtype
+pkg syscall/zx/fdio, const VtypeIRWXO = 7
+pkg syscall/zx/fdio, const VtypeIRWXO Vtype
+pkg syscall/zx/fdio, const VtypeIRWXU = 448
+pkg syscall/zx/fdio, const VtypeIRWXU Vtype
+pkg syscall/zx/fdio, const VtypeISGID = 1024
+pkg syscall/zx/fdio, const VtypeISGID Vtype
+pkg syscall/zx/fdio, const VtypeISUID = 2048
+pkg syscall/zx/fdio, const VtypeISUID Vtype
+pkg syscall/zx/fdio, const VtypeISVTX = 512
+pkg syscall/zx/fdio, const VtypeISVTX Vtype
+pkg syscall/zx/fdio, const VtypeIWGRP = 16
+pkg syscall/zx/fdio, const VtypeIWGRP Vtype
+pkg syscall/zx/fdio, const VtypeIWOTH = 2
+pkg syscall/zx/fdio, const VtypeIWOTH Vtype
+pkg syscall/zx/fdio, const VtypeIWUSR = 128
+pkg syscall/zx/fdio, const VtypeIWUSR Vtype
+pkg syscall/zx/fdio, const VtypeIXGRP = 8
+pkg syscall/zx/fdio, const VtypeIXGRP Vtype
+pkg syscall/zx/fdio, const VtypeIXOTH = 1
+pkg syscall/zx/fdio, const VtypeIXOTH Vtype
+pkg syscall/zx/fdio, const VtypeIXUSR = 64
+pkg syscall/zx/fdio, const VtypeIXUSR Vtype
+pkg syscall/zx/fdio, const VtypeLink = 40960
+pkg syscall/zx/fdio, const VtypeLink Vtype
+pkg syscall/zx/fdio, const VtypeMask = 61440
+pkg syscall/zx/fdio, const VtypeMask Vtype
+pkg syscall/zx/fdio, const VtypePipe = 4096
+pkg syscall/zx/fdio, const VtypePipe Vtype
+pkg syscall/zx/fdio, const VtypeSock = 49152
+pkg syscall/zx/fdio, const VtypeSock Vtype
+pkg syscall/zx/fdio, type FDIO interface { Clone, Close, GetAttr, Handles, Link, Open, Read, ReadAt, ReadDirents, Rename, Rewind, Seek, SetAttr, Sync, Truncate, Unlink, Write, WriteAt }
+pkg syscall/zx/fdio, type FDIO interface, Clone() (FDIO, error)
+pkg syscall/zx/fdio, type FDIO interface, Close() error
+pkg syscall/zx/fdio, type FDIO interface, GetAttr() (io.NodeAttributes, error)
+pkg syscall/zx/fdio, type FDIO interface, Handles() []zx.Handle
+pkg syscall/zx/fdio, type FDIO interface, Link(string, string) error
+pkg syscall/zx/fdio, type FDIO interface, Open(string, uint32, uint32) (FDIO, error)
+pkg syscall/zx/fdio, type FDIO interface, Read([]uint8) (int, error)
+pkg syscall/zx/fdio, type FDIO interface, ReadAt([]uint8, int64) (int, error)
+pkg syscall/zx/fdio, type FDIO interface, ReadDirents(uint64) ([]uint8, error)
+pkg syscall/zx/fdio, type FDIO interface, Rename(string, string) error
+pkg syscall/zx/fdio, type FDIO interface, Rewind() error
+pkg syscall/zx/fdio, type FDIO interface, Seek(int64, int) (int64, error)
+pkg syscall/zx/fdio, type FDIO interface, SetAttr(uint32, io.NodeAttributes) error
+pkg syscall/zx/fdio, type FDIO interface, Sync() error
+pkg syscall/zx/fdio, type FDIO interface, Truncate(uint64) error
+pkg syscall/zx/fdio, type FDIO interface, Unlink(string) error
+pkg syscall/zx/fdio, type FDIO interface, Write([]uint8) (int, error)
+pkg syscall/zx/fdio, type FDIO interface, WriteAt([]uint8, int64) (int, error)
+pkg syscall/zx/fdio, type Vtype uint32
+pkg syscall/zx/fidl, const ErrBadHandleEncoding = 12
+pkg syscall/zx/fidl, const ErrBadHandleEncoding ErrorCode
+pkg syscall/zx/fidl, const ErrBadRefEncoding = 14
+pkg syscall/zx/fidl, const ErrBadRefEncoding ErrorCode
+pkg syscall/zx/fidl, const ErrDuplicateTxidReceived = 31
+pkg syscall/zx/fidl, const ErrDuplicateTxidReceived ErrorCode
+pkg syscall/zx/fidl, const ErrDuplicateTxidWaiting = 32
+pkg syscall/zx/fidl, const ErrDuplicateTxidWaiting ErrorCode
+pkg syscall/zx/fidl, const ErrIncorrectHandleType = 33
+pkg syscall/zx/fidl, const ErrIncorrectHandleType ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidBitsValue = 18
+pkg syscall/zx/fidl, const ErrInvalidBitsValue ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidBoolValue = 9
+pkg syscall/zx/fidl, const ErrInvalidBoolValue ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidEmptyStruct = 21
+pkg syscall/zx/fidl, const ErrInvalidEmptyStruct ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidEnumValue = 19
+pkg syscall/zx/fidl, const ErrInvalidEnumValue ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidInlineType = 2
+pkg syscall/zx/fidl, const ErrInvalidInlineType ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidPointerType = 3
+pkg syscall/zx/fidl, const ErrInvalidPointerType ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidUnionTag = 16
+pkg syscall/zx/fidl, const ErrInvalidUnionTag ErrorCode
+pkg syscall/zx/fidl, const ErrInvalidXUnionTag = 17
+pkg syscall/zx/fidl, const ErrInvalidXUnionTag ErrorCode
+pkg syscall/zx/fidl, const ErrMissingMarshalerContext = 29
+pkg syscall/zx/fidl, const ErrMissingMarshalerContext ErrorCode
+pkg syscall/zx/fidl, const ErrMissingRequiredHandleRights = 26
+pkg syscall/zx/fidl, const ErrMissingRequiredHandleRights ErrorCode
+pkg syscall/zx/fidl, const ErrNonZeroPadding = 13
+pkg syscall/zx/fidl, const ErrNonZeroPadding ErrorCode
+pkg syscall/zx/fidl, const ErrNotEnoughHandles = 10
+pkg syscall/zx/fidl, const ErrNotEnoughHandles ErrorCode
+pkg syscall/zx/fidl, const ErrPayloadTooSmall = 20
+pkg syscall/zx/fidl, const ErrPayloadTooSmall ErrorCode
+pkg syscall/zx/fidl, const ErrResponseWithoutRequest = 30
+pkg syscall/zx/fidl, const ErrResponseWithoutRequest ErrorCode
+pkg syscall/zx/fidl, const ErrStringNotUTF8 = 24
+pkg syscall/zx/fidl, const ErrStringNotUTF8 ErrorCode
+pkg syscall/zx/fidl, const ErrStringTooLong = 5
+pkg syscall/zx/fidl, const ErrStringTooLong ErrorCode
+pkg syscall/zx/fidl, const ErrStructIsNotPayload = 15
+pkg syscall/zx/fidl, const ErrStructIsNotPayload ErrorCode
+pkg syscall/zx/fidl, const ErrTooManyHandles = 11
+pkg syscall/zx/fidl, const ErrTooManyHandles ErrorCode
+pkg syscall/zx/fidl, const ErrUnableToReduceHandleRights = 27
+pkg syscall/zx/fidl, const ErrUnableToReduceHandleRights ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedNullHandle = 7
+pkg syscall/zx/fidl, const ErrUnexpectedNullHandle ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedNullRef = 8
+pkg syscall/zx/fidl, const ErrUnexpectedNullRef ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedNumBytes = 22
+pkg syscall/zx/fidl, const ErrUnexpectedNumBytes ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedNumHandles = 23
+pkg syscall/zx/fidl, const ErrUnexpectedNumHandles ErrorCode
+pkg syscall/zx/fidl, const ErrUnexpectedOrdinal = 6
+pkg syscall/zx/fidl, const ErrUnexpectedOrdinal ErrorCode
+pkg syscall/zx/fidl, const ErrUnknownMagic = 25
+pkg syscall/zx/fidl, const ErrUnknownMagic ErrorCode
+pkg syscall/zx/fidl, const ErrUnknownOrdinal = 1
+pkg syscall/zx/fidl, const ErrUnknownOrdinal ErrorCode
+pkg syscall/zx/fidl, const ErrUnspecifiedHandleRights = 28
+pkg syscall/zx/fidl, const ErrUnspecifiedHandleRights ErrorCode
+pkg syscall/zx/fidl, const ErrUnspecifiedHandleType = 34
+pkg syscall/zx/fidl, const ErrUnspecifiedHandleType ErrorCode
+pkg syscall/zx/fidl, const ErrValueTypeHandles = 35
+pkg syscall/zx/fidl, const ErrValueTypeHandles ErrorCode
+pkg syscall/zx/fidl, const ErrVectorTooLong = 4
+pkg syscall/zx/fidl, const ErrVectorTooLong ErrorCode
+pkg syscall/zx/fidl, const FidlWireFormatMagicNumberInitial = 1
+pkg syscall/zx/fidl, const FidlWireFormatMagicNumberInitial ideal-int
+pkg syscall/zx/fidl, const Invalid = 0
+pkg syscall/zx/fidl, const Invalid ErrorCode
+pkg syscall/zx/fidl, const ProtocolRights = 61454
+pkg syscall/zx/fidl, const ProtocolRights zx.Rights
+pkg syscall/zx/fidl, func CreateLazyMarshaler(interface{}) Marshaler
+pkg syscall/zx/fidl, func CreateMarshaler(interface{}) (Marshaler, error)
+pkg syscall/zx/fidl, func GetMarshalerContext(context.Context) (MarshalerContext, bool)
+pkg syscall/zx/fidl, func Marshal(Message, []uint8, []zx.HandleDisposition) (int, int, error)
+pkg syscall/zx/fidl, func MarshalHeaderThenMessage(*MessageHeader, Message, []uint8, []zx.HandleDisposition) (int, int, error)
+pkg syscall/zx/fidl, func MarshalWithContext(MarshalerContext, Message, []uint8, []zx.HandleDisposition) (int, int, error)
+pkg syscall/zx/fidl, func MustCreateMarshaler(interface{}) Marshaler
+pkg syscall/zx/fidl, func NewInterfaceRequest() (InterfaceRequest, *ChannelProxy, error)
+pkg syscall/zx/fidl, func Unmarshal([]uint8, []zx.HandleInfo, Message) (int, int, error)
+pkg syscall/zx/fidl, func UnmarshalHeaderThenMessage([]uint8, []zx.HandleInfo, *MessageHeader, Message) error
+pkg syscall/zx/fidl, func UnmarshalWithContext(MarshalerContext, []uint8, []zx.Handle, Message) (int, int, error)
+pkg syscall/zx/fidl, func UnmarshalWithContext2(MarshalerContext, []uint8, []zx.HandleInfo, Message) (int, int, error)
+pkg syscall/zx/fidl, func WithMarshalerContext(context.Context, MarshalerContext) context.Context
+pkg syscall/zx/fidl, method (*ChannelProxy) Call(uint64, Message, Message) error
+pkg syscall/zx/fidl, method (*ChannelProxy) Handle() *zx.Handle
+pkg syscall/zx/fidl, method (*ChannelProxy) IsValid() bool
+pkg syscall/zx/fidl, method (*ChannelProxy) Recv(uint64, Message) error
+pkg syscall/zx/fidl, method (*ChannelProxy) Send(uint64, Message) error
+pkg syscall/zx/fidl, method (*InterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/fidl, method (*MessageHeader) IsSupportedVersion() bool
+pkg syscall/zx/fidl, method (*MessageHeader) Marshaler() Marshaler
+pkg syscall/zx/fidl, method (*MessageHeader) NewCtx() MarshalerContext
+pkg syscall/zx/fidl, method (ErrorCode) Code() ErrorCode
+pkg syscall/zx/fidl, method (ErrorCode) Error() string
+pkg syscall/zx/fidl, method (ErrorCode) String() string
+pkg syscall/zx/fidl, method (MarshalerContext) NewHeader() MessageHeader
+pkg syscall/zx/fidl, type Bits interface { GetUnknownBits, HasUnknownBits }
+pkg syscall/zx/fidl, type Bits interface, GetUnknownBits() uint64
+pkg syscall/zx/fidl, type Bits interface, HasUnknownBits() bool
+pkg syscall/zx/fidl, type ChannelProxy struct
+pkg syscall/zx/fidl, type ChannelProxy struct, embedded zx.Channel
+pkg syscall/zx/fidl, type Context interface { Done, Err, Value }
+pkg syscall/zx/fidl, type Context interface, Done() <-chan struct
+pkg syscall/zx/fidl, type Context interface, Err() error
+pkg syscall/zx/fidl, type Context interface, Value(interface{}) interface{}
+pkg syscall/zx/fidl, type DispatchArgs struct
+pkg syscall/zx/fidl, type DispatchArgs struct, Bytes []uint8
+pkg syscall/zx/fidl, type DispatchArgs struct, Ctx context.Context
+pkg syscall/zx/fidl, type DispatchArgs struct, HandleInfos []zx.HandleInfo
+pkg syscall/zx/fidl, type DispatchArgs struct, Ordinal uint64
+pkg syscall/zx/fidl, type Enum interface { IsUnknown }
+pkg syscall/zx/fidl, type Enum interface, IsUnknown() bool
+pkg syscall/zx/fidl, type ErrorCode uint32
+pkg syscall/zx/fidl, type InterfaceRequest struct
+pkg syscall/zx/fidl, type InterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/fidl, type Marshaler interface, unexported methods
+pkg syscall/zx/fidl, type MarshalerContext struct
+pkg syscall/zx/fidl, type Message interface { Marshaler }
+pkg syscall/zx/fidl, type Message interface, Marshaler() Marshaler
+pkg syscall/zx/fidl, type MessageHeader struct
+pkg syscall/zx/fidl, type MessageHeader struct, Flags [3]uint8
+pkg syscall/zx/fidl, type MessageHeader struct, Magic uint8
+pkg syscall/zx/fidl, type MessageHeader struct, Ordinal uint64
+pkg syscall/zx/fidl, type MessageHeader struct, Txid uint32
+pkg syscall/zx/fidl, type Proxy interface { Call, IsValid, Recv, Send }
+pkg syscall/zx/fidl, type Proxy interface, Call(uint64, Message, Message) error
+pkg syscall/zx/fidl, type Proxy interface, IsValid() bool
+pkg syscall/zx/fidl, type Proxy interface, Recv(uint64, Message) error
+pkg syscall/zx/fidl, type Proxy interface, Send(uint64, Message) error
+pkg syscall/zx/fidl, type ServiceRequest interface { Name, ToChannel }
+pkg syscall/zx/fidl, type ServiceRequest interface, Name() string
+pkg syscall/zx/fidl, type ServiceRequest interface, ToChannel() zx.Channel
+pkg syscall/zx/fidl, type Stub interface { Dispatch }
+pkg syscall/zx/fidl, type Stub interface, Dispatch(DispatchArgs) (Message, bool, error)
+pkg syscall/zx/fidl, type UnknownData struct
+pkg syscall/zx/fidl, type UnknownData struct, Bytes []uint8
+pkg syscall/zx/fidl, type UnknownData struct, Handles []zx.HandleInfo
+pkg syscall/zx/fidl, type ValidationError interface { Code, Error }
+pkg syscall/zx/fidl, type ValidationError interface, Code() ErrorCode
+pkg syscall/zx/fidl, type ValidationError interface, Error() string
+pkg syscall/zx/fidl, var MessageHeaderSize int
+pkg syscall/zx/hardware/ethernet, const DeviceConfigMulticastAddMacOrdinal = 6691024185581582264
+pkg syscall/zx/hardware/ethernet, const DeviceConfigMulticastAddMacOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceConfigMulticastDeleteMacOrdinal = 6057140368139090439
+pkg syscall/zx/hardware/ethernet, const DeviceConfigMulticastDeleteMacOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceConfigMulticastSetPromiscuousModeOrdinal = 6040657827550980378
+pkg syscall/zx/hardware/ethernet, const DeviceConfigMulticastSetPromiscuousModeOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceConfigMulticastTestFilterOrdinal = 6522233624121135779
+pkg syscall/zx/hardware/ethernet, const DeviceConfigMulticastTestFilterOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceDumpRegistersOrdinal = 4875422596427420276
+pkg syscall/zx/hardware/ethernet, const DeviceDumpRegistersOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceGetFifosOrdinal = 6310191874621580128
+pkg syscall/zx/hardware/ethernet, const DeviceGetFifosOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceGetInfoOrdinal = 9191453823555626018
+pkg syscall/zx/hardware/ethernet, const DeviceGetInfoOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceGetStatusOrdinal = 4006619088237154624
+pkg syscall/zx/hardware/ethernet, const DeviceGetStatusOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceListenStartOrdinal = 180809355703175517
+pkg syscall/zx/hardware/ethernet, const DeviceListenStartOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceListenStopOrdinal = 1165516780639240250
+pkg syscall/zx/hardware/ethernet, const DeviceListenStopOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceSetClientNameOrdinal = 1594957020784730113
+pkg syscall/zx/hardware/ethernet, const DeviceSetClientNameOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceSetIoBufferOrdinal = 7399144008073018792
+pkg syscall/zx/hardware/ethernet, const DeviceSetIoBufferOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceSetPromiscuousModeOrdinal = 7703939675883370821
+pkg syscall/zx/hardware/ethernet, const DeviceSetPromiscuousModeOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceStartOrdinal = 7951590831807512117
+pkg syscall/zx/hardware/ethernet, const DeviceStartOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const DeviceStatusOnline = 1
+pkg syscall/zx/hardware/ethernet, const DeviceStatusOnline DeviceStatus
+pkg syscall/zx/hardware/ethernet, const DeviceStatus_Mask = 1
+pkg syscall/zx/hardware/ethernet, const DeviceStatus_Mask DeviceStatus
+pkg syscall/zx/hardware/ethernet, const DeviceStopOrdinal = 5470300822424641531
+pkg syscall/zx/hardware/ethernet, const DeviceStopOrdinal uint64
+pkg syscall/zx/hardware/ethernet, const FeaturesLoopback = 4
+pkg syscall/zx/hardware/ethernet, const FeaturesLoopback Features
+pkg syscall/zx/hardware/ethernet, const FeaturesSynthetic = 2
+pkg syscall/zx/hardware/ethernet, const FeaturesSynthetic Features
+pkg syscall/zx/hardware/ethernet, const FeaturesWlan = 1
+pkg syscall/zx/hardware/ethernet, const FeaturesWlan Features
+pkg syscall/zx/hardware/ethernet, const Features_Mask = 7
+pkg syscall/zx/hardware/ethernet, const Features_Mask Features
+pkg syscall/zx/hardware/ethernet, const MaxClientNameLen = 15
+pkg syscall/zx/hardware/ethernet, const MaxClientNameLen uint32
+pkg syscall/zx/hardware/ethernet, const SetClientNameMaxLen = 16
+pkg syscall/zx/hardware/ethernet, const SetClientNameMaxLen uint32
+pkg syscall/zx/hardware/ethernet, const SignalStatus = 16777216
+pkg syscall/zx/hardware/ethernet, const SignalStatus uint32
+pkg syscall/zx/hardware/ethernet, func NewDeviceWithCtxInterfaceRequest() (DeviceWithCtxInterfaceRequest, *DeviceWithCtxInterface, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceEventProxy) Handle() *zx.Handle
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) ConfigMulticastAddMac(context.Context, MacAddress) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) ConfigMulticastDeleteMac(context.Context, MacAddress) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) ConfigMulticastSetPromiscuousMode(context.Context, bool) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) ConfigMulticastTestFilter(context.Context) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) DumpRegisters(context.Context) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) GetFifos(context.Context) (int32, *Fifos, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) GetInfo(context.Context) (Info, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) GetStatus(context.Context) (DeviceStatus, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) ListenStart(context.Context) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) ListenStop(context.Context) error
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) SetClientName(context.Context, string) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) SetIoBuffer(context.Context, zx.VMO) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) SetPromiscuousMode(context.Context, bool) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) Start(context.Context) (int32, error)
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterface) Stop(context.Context) error
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/hardware/ethernet, method (*DeviceWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/hardware/ethernet, method (*Fifos) Marshaler() fidl.Marshaler
+pkg syscall/zx/hardware/ethernet, method (*Info) Marshaler() fidl.Marshaler
+pkg syscall/zx/hardware/ethernet, method (*MacAddress) Marshaler() fidl.Marshaler
+pkg syscall/zx/hardware/ethernet, method (DeviceStatus) ClearBits(DeviceStatus) DeviceStatus
+pkg syscall/zx/hardware/ethernet, method (DeviceStatus) GetUnknownBits() uint64
+pkg syscall/zx/hardware/ethernet, method (DeviceStatus) HasBits(DeviceStatus) bool
+pkg syscall/zx/hardware/ethernet, method (DeviceStatus) HasUnknownBits() bool
+pkg syscall/zx/hardware/ethernet, method (DeviceStatus) I_BitsIsStrict() bool
+pkg syscall/zx/hardware/ethernet, method (DeviceStatus) I_BitsMask() DeviceStatus
+pkg syscall/zx/hardware/ethernet, method (DeviceStatus) InvertBits() DeviceStatus
+pkg syscall/zx/hardware/ethernet, method (DeviceStatus) String() string
+pkg syscall/zx/hardware/ethernet, method (Features) ClearBits(Features) Features
+pkg syscall/zx/hardware/ethernet, method (Features) GetUnknownBits() uint64
+pkg syscall/zx/hardware/ethernet, method (Features) HasBits(Features) bool
+pkg syscall/zx/hardware/ethernet, method (Features) HasUnknownBits() bool
+pkg syscall/zx/hardware/ethernet, method (Features) I_BitsIsStrict() bool
+pkg syscall/zx/hardware/ethernet, method (Features) I_BitsMask() Features
+pkg syscall/zx/hardware/ethernet, method (Features) InvertBits() Features
+pkg syscall/zx/hardware/ethernet, method (Features) String() string
+pkg syscall/zx/hardware/ethernet, type DeviceEventProxy struct
+pkg syscall/zx/hardware/ethernet, type DeviceEventProxy struct, embedded zx.Channel
+pkg syscall/zx/hardware/ethernet, type DeviceStatus uint32
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface { ConfigMulticastAddMac, ConfigMulticastDeleteMac, ConfigMulticastSetPromiscuousMode, ConfigMulticastTestFilter, DumpRegisters, GetFifos, GetInfo, GetStatus, ListenStart, ListenStop, SetClientName, SetIoBuffer, SetPromiscuousMode, Start, Stop }
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, ConfigMulticastAddMac(context.Context, MacAddress) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, ConfigMulticastDeleteMac(context.Context, MacAddress) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, ConfigMulticastSetPromiscuousMode(context.Context, bool) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, ConfigMulticastTestFilter(context.Context) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, DumpRegisters(context.Context) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, GetFifos(context.Context) (int32, *Fifos, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, GetInfo(context.Context) (Info, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, GetStatus(context.Context) (DeviceStatus, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, ListenStart(context.Context) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, ListenStop(context.Context) error
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, SetClientName(context.Context, string) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, SetIoBuffer(context.Context, zx.VMO) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, SetPromiscuousMode(context.Context, bool) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, Start(context.Context) (int32, error)
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtx interface, Stop(context.Context) error
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtxInterface struct
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtxInterfaceRequest struct
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtxStub struct
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtxStub struct, Impl DeviceWithCtx
+pkg syscall/zx/hardware/ethernet, type DeviceWithCtxTransitionalBase struct
+pkg syscall/zx/hardware/ethernet, type Features uint32
+pkg syscall/zx/hardware/ethernet, type Fifos struct
+pkg syscall/zx/hardware/ethernet, type Fifos struct, Rx zx.Handle
+pkg syscall/zx/hardware/ethernet, type Fifos struct, RxDepth uint32
+pkg syscall/zx/hardware/ethernet, type Fifos struct, Tx zx.Handle
+pkg syscall/zx/hardware/ethernet, type Fifos struct, TxDepth uint32
+pkg syscall/zx/hardware/ethernet, type Info struct
+pkg syscall/zx/hardware/ethernet, type Info struct, Features Features
+pkg syscall/zx/hardware/ethernet, type Info struct, Mac MacAddress
+pkg syscall/zx/hardware/ethernet, type Info struct, Mtu uint32
+pkg syscall/zx/hardware/ethernet, type MacAddress struct
+pkg syscall/zx/hardware/ethernet, type MacAddress struct, Octets [6]uint8
+pkg syscall/zx/hardware/network, const DeviceClassBridge = 4
+pkg syscall/zx/hardware/network, const DeviceClassBridge DeviceClass
+pkg syscall/zx/hardware/network, const DeviceClassEthernet = 1
+pkg syscall/zx/hardware/network, const DeviceClassEthernet DeviceClass
+pkg syscall/zx/hardware/network, const DeviceClassPpp = 3
+pkg syscall/zx/hardware/network, const DeviceClassPpp DeviceClass
+pkg syscall/zx/hardware/network, const DeviceClassUnknown = 0
+pkg syscall/zx/hardware/network, const DeviceClassUnknown DeviceClass
+pkg syscall/zx/hardware/network, const DeviceClassWlan = 2
+pkg syscall/zx/hardware/network, const DeviceClassWlan DeviceClass
+pkg syscall/zx/hardware/network, const DeviceGetInfoOrdinal = 4345987561275952982
+pkg syscall/zx/hardware/network, const DeviceGetInfoOrdinal uint64
+pkg syscall/zx/hardware/network, const DeviceGetStatusOrdinal = 4473703101842353389
+pkg syscall/zx/hardware/network, const DeviceGetStatusOrdinal uint64
+pkg syscall/zx/hardware/network, const DeviceGetStatusWatcherOrdinal = 7279952903171608931
+pkg syscall/zx/hardware/network, const DeviceGetStatusWatcherOrdinal uint64
+pkg syscall/zx/hardware/network, const DeviceInstanceGetDeviceOrdinal = 8598058163296915191
+pkg syscall/zx/hardware/network, const DeviceInstanceGetDeviceOrdinal uint64
+pkg syscall/zx/hardware/network, const DeviceInstanceGetMacAddressingOrdinal = 6079418549123906658
+pkg syscall/zx/hardware/network, const DeviceInstanceGetMacAddressingOrdinal uint64
+pkg syscall/zx/hardware/network, const DeviceName = "fuchsia.hardware.network.Device"
+pkg syscall/zx/hardware/network, const DeviceName ideal-string
+pkg syscall/zx/hardware/network, const DeviceOpenSessionOrdinal = 2707801929272905575
+pkg syscall/zx/hardware/network, const DeviceOpenSessionOrdinal uint64
+pkg syscall/zx/hardware/network, const DeviceOpenSessionResultErr = 2
+pkg syscall/zx/hardware/network, const DeviceOpenSessionResultErr ideal-int
+pkg syscall/zx/hardware/network, const DeviceOpenSessionResultResponse = 1
+pkg syscall/zx/hardware/network, const DeviceOpenSessionResultResponse ideal-int
+pkg syscall/zx/hardware/network, const EthernetFeaturesE8021Q = 4
+pkg syscall/zx/hardware/network, const EthernetFeaturesE8021Q EthernetFeatures
+pkg syscall/zx/hardware/network, const EthernetFeaturesE8021QInQ = 8
+pkg syscall/zx/hardware/network, const EthernetFeaturesE8021QInQ EthernetFeatures
+pkg syscall/zx/hardware/network, const EthernetFeaturesE8023LlcSnap = 16
+pkg syscall/zx/hardware/network, const EthernetFeaturesE8023LlcSnap EthernetFeatures
+pkg syscall/zx/hardware/network, const EthernetFeaturesEthernetIi = 2
+pkg syscall/zx/hardware/network, const EthernetFeaturesEthernetIi EthernetFeatures
+pkg syscall/zx/hardware/network, const EthernetFeaturesRaw = 1
+pkg syscall/zx/hardware/network, const EthernetFeaturesRaw EthernetFeatures
+pkg syscall/zx/hardware/network, const EthernetFeatures_Mask = 31
+pkg syscall/zx/hardware/network, const EthernetFeatures_Mask EthernetFeatures
+pkg syscall/zx/hardware/network, const FrameFeaturesRaw = 1
+pkg syscall/zx/hardware/network, const FrameFeaturesRaw uint32
+pkg syscall/zx/hardware/network, const FrameTypeEthernet = 1
+pkg syscall/zx/hardware/network, const FrameTypeEthernet FrameType
+pkg syscall/zx/hardware/network, const FrameTypeIpv4 = 2
+pkg syscall/zx/hardware/network, const FrameTypeIpv4 FrameType
+pkg syscall/zx/hardware/network, const FrameTypeIpv6 = 3
+pkg syscall/zx/hardware/network, const FrameTypeIpv6 FrameType
+pkg syscall/zx/hardware/network, const InfoTypeNoInfo = 0
+pkg syscall/zx/hardware/network, const InfoTypeNoInfo InfoType
+pkg syscall/zx/hardware/network, const MacAddressingAddMulticastAddressOrdinal = 1105132327221005349
+pkg syscall/zx/hardware/network, const MacAddressingAddMulticastAddressOrdinal uint64
+pkg syscall/zx/hardware/network, const MacAddressingGetUnicastAddressOrdinal = 3197758227283422910
+pkg syscall/zx/hardware/network, const MacAddressingGetUnicastAddressOrdinal uint64
+pkg syscall/zx/hardware/network, const MacAddressingName = "fuchsia.hardware.network.MacAddressing"
+pkg syscall/zx/hardware/network, const MacAddressingName ideal-string
+pkg syscall/zx/hardware/network, const MacAddressingRemoveMulticastAddressOrdinal = 6763831474300790112
+pkg syscall/zx/hardware/network, const MacAddressingRemoveMulticastAddressOrdinal uint64
+pkg syscall/zx/hardware/network, const MacAddressingSetModeOrdinal = 444021886998005132
+pkg syscall/zx/hardware/network, const MacAddressingSetModeOrdinal uint64
+pkg syscall/zx/hardware/network, const MacFilterModeMulticastFilter = 0
+pkg syscall/zx/hardware/network, const MacFilterModeMulticastFilter MacFilterMode
+pkg syscall/zx/hardware/network, const MacFilterModeMulticastPromiscuous = 1
+pkg syscall/zx/hardware/network, const MacFilterModeMulticastPromiscuous MacFilterMode
+pkg syscall/zx/hardware/network, const MacFilterModePromiscuous = 2
+pkg syscall/zx/hardware/network, const MacFilterModePromiscuous MacFilterMode
+pkg syscall/zx/hardware/network, const MaxAccelFlags = 16
+pkg syscall/zx/hardware/network, const MaxAccelFlags uint32
+pkg syscall/zx/hardware/network, const MaxDescriptorChain = 4
+pkg syscall/zx/hardware/network, const MaxDescriptorChain uint8
+pkg syscall/zx/hardware/network, const MaxFrameTypes = 4
+pkg syscall/zx/hardware/network, const MaxFrameTypes uint32
+pkg syscall/zx/hardware/network, const MaxSessionName = 64
+pkg syscall/zx/hardware/network, const MaxSessionName uint32
+pkg syscall/zx/hardware/network, const MaxStatusBuffer = 50
+pkg syscall/zx/hardware/network, const MaxStatusBuffer uint32
+pkg syscall/zx/hardware/network, const RxAccelerationValidatedEthernetFcs = 0
+pkg syscall/zx/hardware/network, const RxAccelerationValidatedEthernetFcs RxAcceleration
+pkg syscall/zx/hardware/network, const RxAccelerationValidatedIpv4Checksum = 1
+pkg syscall/zx/hardware/network, const RxAccelerationValidatedIpv4Checksum RxAcceleration
+pkg syscall/zx/hardware/network, const RxAccelerationValidatedTcpChecksum = 2
+pkg syscall/zx/hardware/network, const RxAccelerationValidatedTcpChecksum RxAcceleration
+pkg syscall/zx/hardware/network, const RxAccelerationValidatedUdpChecksum = 3
+pkg syscall/zx/hardware/network, const RxAccelerationValidatedUdpChecksum RxAcceleration
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel0 = 1
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel0 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel1 = 2
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel1 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel10 = 1024
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel10 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel11 = 2048
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel11 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel12 = 4096
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel12 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel13 = 8192
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel13 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel14 = 16384
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel14 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel15 = 32768
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel15 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel2 = 4
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel2 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel3 = 8
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel3 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel4 = 16
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel4 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel5 = 32
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel5 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel6 = 64
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel6 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel7 = 128
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel7 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel8 = 256
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel8 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel9 = 512
+pkg syscall/zx/hardware/network, const RxFlagsRxAccel9 RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxEchoedTx = 2147483648
+pkg syscall/zx/hardware/network, const RxFlagsRxEchoedTx RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxOverrun = 536870912
+pkg syscall/zx/hardware/network, const RxFlagsRxOverrun RxFlags
+pkg syscall/zx/hardware/network, const RxFlagsRxValidationError = 1073741824
+pkg syscall/zx/hardware/network, const RxFlagsRxValidationError RxFlags
+pkg syscall/zx/hardware/network, const RxFlags_Mask = 3758161919
+pkg syscall/zx/hardware/network, const RxFlags_Mask RxFlags
+pkg syscall/zx/hardware/network, const SessionCloseOrdinal = 4124541276668990198
+pkg syscall/zx/hardware/network, const SessionCloseOrdinal uint64
+pkg syscall/zx/hardware/network, const SessionFlagsListenTx = 2
+pkg syscall/zx/hardware/network, const SessionFlagsListenTx SessionFlags
+pkg syscall/zx/hardware/network, const SessionFlagsPrimary = 1
+pkg syscall/zx/hardware/network, const SessionFlagsPrimary SessionFlags
+pkg syscall/zx/hardware/network, const SessionFlagsReportInvalidRx = 4
+pkg syscall/zx/hardware/network, const SessionFlagsReportInvalidRx SessionFlags
+pkg syscall/zx/hardware/network, const SessionFlags_Mask = 7
+pkg syscall/zx/hardware/network, const SessionFlags_Mask SessionFlags
+pkg syscall/zx/hardware/network, const SessionSetPausedOrdinal = 5061588926438155864
+pkg syscall/zx/hardware/network, const SessionSetPausedOrdinal uint64
+pkg syscall/zx/hardware/network, const StatusFlagsOnline = 1
+pkg syscall/zx/hardware/network, const StatusFlagsOnline StatusFlags
+pkg syscall/zx/hardware/network, const StatusFlags_Mask = 1
+pkg syscall/zx/hardware/network, const StatusFlags_Mask StatusFlags
+pkg syscall/zx/hardware/network, const StatusWatcherWatchStatusOrdinal = 1398833956082180793
+pkg syscall/zx/hardware/network, const StatusWatcherWatchStatusOrdinal uint64
+pkg syscall/zx/hardware/network, const TxAccelerationComputeEthernetFcs = 0
+pkg syscall/zx/hardware/network, const TxAccelerationComputeEthernetFcs TxAcceleration
+pkg syscall/zx/hardware/network, const TxAccelerationComputeIpv4Checksum = 1
+pkg syscall/zx/hardware/network, const TxAccelerationComputeIpv4Checksum TxAcceleration
+pkg syscall/zx/hardware/network, const TxAccelerationComputeTcpChecksum = 2
+pkg syscall/zx/hardware/network, const TxAccelerationComputeTcpChecksum TxAcceleration
+pkg syscall/zx/hardware/network, const TxAccelerationComputeUdpChecksum = 3
+pkg syscall/zx/hardware/network, const TxAccelerationComputeUdpChecksum TxAcceleration
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel0 = 1
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel0 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel1 = 2
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel1 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel10 = 1024
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel10 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel11 = 2048
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel11 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel12 = 4096
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel12 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel13 = 8192
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel13 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel14 = 16384
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel14 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel15 = 32768
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel15 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel2 = 4
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel2 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel3 = 8
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel3 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel4 = 16
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel4 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel5 = 32
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel5 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel6 = 64
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel6 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel7 = 128
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel7 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel8 = 256
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel8 TxFlags
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel9 = 512
+pkg syscall/zx/hardware/network, const TxFlagsTxAccel9 TxFlags
+pkg syscall/zx/hardware/network, const TxFlags_Mask = 65535
+pkg syscall/zx/hardware/network, const TxFlags_Mask TxFlags
+pkg syscall/zx/hardware/network, const TxReturnFlagsTxRetError = 2147483648
+pkg syscall/zx/hardware/network, const TxReturnFlagsTxRetError TxReturnFlags
+pkg syscall/zx/hardware/network, const TxReturnFlagsTxRetNotAvailable = 4
+pkg syscall/zx/hardware/network, const TxReturnFlagsTxRetNotAvailable TxReturnFlags
+pkg syscall/zx/hardware/network, const TxReturnFlagsTxRetNotSupported = 1
+pkg syscall/zx/hardware/network, const TxReturnFlagsTxRetNotSupported TxReturnFlags
+pkg syscall/zx/hardware/network, const TxReturnFlagsTxRetOutOfResources = 2
+pkg syscall/zx/hardware/network, const TxReturnFlagsTxRetOutOfResources TxReturnFlags
+pkg syscall/zx/hardware/network, const TxReturnFlags_Mask = 2147483655
+pkg syscall/zx/hardware/network, const TxReturnFlags_Mask TxReturnFlags
+pkg syscall/zx/hardware/network, func DeviceOpenSessionResultWithErr(int32) DeviceOpenSessionResult
+pkg syscall/zx/hardware/network, func DeviceOpenSessionResultWithResponse(DeviceOpenSessionResponse) DeviceOpenSessionResult
+pkg syscall/zx/hardware/network, func NewDeviceInstanceWithCtxInterfaceRequest() (DeviceInstanceWithCtxInterfaceRequest, *DeviceInstanceWithCtxInterface, error)
+pkg syscall/zx/hardware/network, func NewDeviceWithCtxInterfaceRequest() (DeviceWithCtxInterfaceRequest, *DeviceWithCtxInterface, error)
+pkg syscall/zx/hardware/network, func NewMacAddressingWithCtxInterfaceRequest() (MacAddressingWithCtxInterfaceRequest, *MacAddressingWithCtxInterface, error)
+pkg syscall/zx/hardware/network, func NewSessionWithCtxInterfaceRequest() (SessionWithCtxInterfaceRequest, *SessionWithCtxInterface, error)
+pkg syscall/zx/hardware/network, func NewStatusWatcherWithCtxInterfaceRequest() (StatusWatcherWithCtxInterfaceRequest, *StatusWatcherWithCtxInterface, error)
+pkg syscall/zx/hardware/network, method (*DeviceEventProxy) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*DeviceInstanceEventProxy) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*DeviceInstanceWithCtxInterface) GetDevice(context.Context, DeviceWithCtxInterfaceRequest) error
+pkg syscall/zx/hardware/network, method (*DeviceInstanceWithCtxInterface) GetMacAddressing(context.Context, MacAddressingWithCtxInterfaceRequest) error
+pkg syscall/zx/hardware/network, method (*DeviceInstanceWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*DeviceInstanceWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*DeviceInstanceWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/hardware/network, method (*DeviceOpenSessionResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/hardware/network, method (*DeviceOpenSessionResult) Ordinal() uint64
+pkg syscall/zx/hardware/network, method (*DeviceOpenSessionResult) SetErr(int32)
+pkg syscall/zx/hardware/network, method (*DeviceOpenSessionResult) SetResponse(DeviceOpenSessionResponse)
+pkg syscall/zx/hardware/network, method (*DeviceOpenSessionResult) Which() I_deviceOpenSessionResultTag
+pkg syscall/zx/hardware/network, method (*DeviceWithCtxInterface) GetInfo(context.Context) (Info, error)
+pkg syscall/zx/hardware/network, method (*DeviceWithCtxInterface) GetStatus(context.Context) (Status, error)
+pkg syscall/zx/hardware/network, method (*DeviceWithCtxInterface) GetStatusWatcher(context.Context, StatusWatcherWithCtxInterfaceRequest, uint32) error
+pkg syscall/zx/hardware/network, method (*DeviceWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*DeviceWithCtxInterface) OpenSession(context.Context, string, SessionInfo) (DeviceOpenSessionResult, error)
+pkg syscall/zx/hardware/network, method (*DeviceWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*DeviceWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/hardware/network, method (*Fifos) Marshaler() fidl.Marshaler
+pkg syscall/zx/hardware/network, method (*FrameTypeSupport) Marshaler() fidl.Marshaler
+pkg syscall/zx/hardware/network, method (*Info) Marshaler() fidl.Marshaler
+pkg syscall/zx/hardware/network, method (*MacAddressingEventProxy) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*MacAddressingWithCtxInterface) AddMulticastAddress(context.Context, net.MacAddress) (int32, error)
+pkg syscall/zx/hardware/network, method (*MacAddressingWithCtxInterface) GetUnicastAddress(context.Context) (net.MacAddress, error)
+pkg syscall/zx/hardware/network, method (*MacAddressingWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*MacAddressingWithCtxInterface) RemoveMulticastAddress(context.Context, net.MacAddress) (int32, error)
+pkg syscall/zx/hardware/network, method (*MacAddressingWithCtxInterface) SetMode(context.Context, MacFilterMode) (int32, error)
+pkg syscall/zx/hardware/network, method (*MacAddressingWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*MacAddressingWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/hardware/network, method (*SessionEventProxy) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*SessionInfo) Marshaler() fidl.Marshaler
+pkg syscall/zx/hardware/network, method (*SessionWithCtxInterface) Close(context.Context) error
+pkg syscall/zx/hardware/network, method (*SessionWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*SessionWithCtxInterface) SetPaused(context.Context, bool) error
+pkg syscall/zx/hardware/network, method (*SessionWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*SessionWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/hardware/network, method (*Status) ClearFlags()
+pkg syscall/zx/hardware/network, method (*Status) ClearMtu()
+pkg syscall/zx/hardware/network, method (*Status) GetFlags() StatusFlags
+pkg syscall/zx/hardware/network, method (*Status) GetFlagsWithDefault(StatusFlags) StatusFlags
+pkg syscall/zx/hardware/network, method (*Status) GetMtu() uint32
+pkg syscall/zx/hardware/network, method (*Status) GetMtuWithDefault(uint32) uint32
+pkg syscall/zx/hardware/network, method (*Status) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/hardware/network, method (*Status) HasFlags() bool
+pkg syscall/zx/hardware/network, method (*Status) HasMtu() bool
+pkg syscall/zx/hardware/network, method (*Status) HasUnknownData() bool
+pkg syscall/zx/hardware/network, method (*Status) SetFlags(StatusFlags)
+pkg syscall/zx/hardware/network, method (*Status) SetMtu(uint32)
+pkg syscall/zx/hardware/network, method (*StatusWatcherEventProxy) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*StatusWatcherWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*StatusWatcherWithCtxInterface) WatchStatus(context.Context) (Status, error)
+pkg syscall/zx/hardware/network, method (*StatusWatcherWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/hardware/network, method (*StatusWatcherWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/hardware/network, method (DeviceClass) I_EnumIsStrict() bool
+pkg syscall/zx/hardware/network, method (DeviceClass) I_EnumValues() []DeviceClass
+pkg syscall/zx/hardware/network, method (DeviceClass) IsUnknown() bool
+pkg syscall/zx/hardware/network, method (DeviceClass) String() string
+pkg syscall/zx/hardware/network, method (DeviceWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/hardware/network, method (DeviceWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/hardware/network, method (EthernetFeatures) ClearBits(EthernetFeatures) EthernetFeatures
+pkg syscall/zx/hardware/network, method (EthernetFeatures) GetUnknownBits() uint64
+pkg syscall/zx/hardware/network, method (EthernetFeatures) HasBits(EthernetFeatures) bool
+pkg syscall/zx/hardware/network, method (EthernetFeatures) HasUnknownBits() bool
+pkg syscall/zx/hardware/network, method (EthernetFeatures) I_BitsIsStrict() bool
+pkg syscall/zx/hardware/network, method (EthernetFeatures) I_BitsMask() EthernetFeatures
+pkg syscall/zx/hardware/network, method (EthernetFeatures) InvertBits() EthernetFeatures
+pkg syscall/zx/hardware/network, method (EthernetFeatures) String() string
+pkg syscall/zx/hardware/network, method (FrameType) I_EnumIsStrict() bool
+pkg syscall/zx/hardware/network, method (FrameType) I_EnumValues() []FrameType
+pkg syscall/zx/hardware/network, method (FrameType) IsUnknown() bool
+pkg syscall/zx/hardware/network, method (FrameType) String() string
+pkg syscall/zx/hardware/network, method (InfoType) I_EnumIsStrict() bool
+pkg syscall/zx/hardware/network, method (InfoType) I_EnumValues() []InfoType
+pkg syscall/zx/hardware/network, method (InfoType) IsUnknown() bool
+pkg syscall/zx/hardware/network, method (InfoType) String() string
+pkg syscall/zx/hardware/network, method (MacAddressingWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/hardware/network, method (MacAddressingWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/hardware/network, method (MacFilterMode) I_EnumIsStrict() bool
+pkg syscall/zx/hardware/network, method (MacFilterMode) I_EnumValues() []MacFilterMode
+pkg syscall/zx/hardware/network, method (MacFilterMode) IsUnknown() bool
+pkg syscall/zx/hardware/network, method (MacFilterMode) String() string
+pkg syscall/zx/hardware/network, method (RxAcceleration) I_EnumIsStrict() bool
+pkg syscall/zx/hardware/network, method (RxAcceleration) I_EnumValues() []RxAcceleration
+pkg syscall/zx/hardware/network, method (RxAcceleration) IsUnknown() bool
+pkg syscall/zx/hardware/network, method (RxAcceleration) String() string
+pkg syscall/zx/hardware/network, method (RxFlags) ClearBits(RxFlags) RxFlags
+pkg syscall/zx/hardware/network, method (RxFlags) GetUnknownBits() uint64
+pkg syscall/zx/hardware/network, method (RxFlags) HasBits(RxFlags) bool
+pkg syscall/zx/hardware/network, method (RxFlags) HasUnknownBits() bool
+pkg syscall/zx/hardware/network, method (RxFlags) I_BitsIsStrict() bool
+pkg syscall/zx/hardware/network, method (RxFlags) I_BitsMask() RxFlags
+pkg syscall/zx/hardware/network, method (RxFlags) InvertBits() RxFlags
+pkg syscall/zx/hardware/network, method (RxFlags) String() string
+pkg syscall/zx/hardware/network, method (SessionFlags) ClearBits(SessionFlags) SessionFlags
+pkg syscall/zx/hardware/network, method (SessionFlags) GetUnknownBits() uint64
+pkg syscall/zx/hardware/network, method (SessionFlags) HasBits(SessionFlags) bool
+pkg syscall/zx/hardware/network, method (SessionFlags) HasUnknownBits() bool
+pkg syscall/zx/hardware/network, method (SessionFlags) I_BitsIsStrict() bool
+pkg syscall/zx/hardware/network, method (SessionFlags) I_BitsMask() SessionFlags
+pkg syscall/zx/hardware/network, method (SessionFlags) InvertBits() SessionFlags
+pkg syscall/zx/hardware/network, method (SessionFlags) String() string
+pkg syscall/zx/hardware/network, method (StatusFlags) ClearBits(StatusFlags) StatusFlags
+pkg syscall/zx/hardware/network, method (StatusFlags) GetUnknownBits() uint64
+pkg syscall/zx/hardware/network, method (StatusFlags) HasBits(StatusFlags) bool
+pkg syscall/zx/hardware/network, method (StatusFlags) HasUnknownBits() bool
+pkg syscall/zx/hardware/network, method (StatusFlags) I_BitsIsStrict() bool
+pkg syscall/zx/hardware/network, method (StatusFlags) I_BitsMask() StatusFlags
+pkg syscall/zx/hardware/network, method (StatusFlags) InvertBits() StatusFlags
+pkg syscall/zx/hardware/network, method (StatusFlags) String() string
+pkg syscall/zx/hardware/network, method (TxAcceleration) I_EnumIsStrict() bool
+pkg syscall/zx/hardware/network, method (TxAcceleration) I_EnumValues() []TxAcceleration
+pkg syscall/zx/hardware/network, method (TxAcceleration) IsUnknown() bool
+pkg syscall/zx/hardware/network, method (TxAcceleration) String() string
+pkg syscall/zx/hardware/network, method (TxFlags) ClearBits(TxFlags) TxFlags
+pkg syscall/zx/hardware/network, method (TxFlags) GetUnknownBits() uint64
+pkg syscall/zx/hardware/network, method (TxFlags) HasBits(TxFlags) bool
+pkg syscall/zx/hardware/network, method (TxFlags) HasUnknownBits() bool
+pkg syscall/zx/hardware/network, method (TxFlags) I_BitsIsStrict() bool
+pkg syscall/zx/hardware/network, method (TxFlags) I_BitsMask() TxFlags
+pkg syscall/zx/hardware/network, method (TxFlags) InvertBits() TxFlags
+pkg syscall/zx/hardware/network, method (TxFlags) String() string
+pkg syscall/zx/hardware/network, method (TxReturnFlags) ClearBits(TxReturnFlags) TxReturnFlags
+pkg syscall/zx/hardware/network, method (TxReturnFlags) GetUnknownBits() uint64
+pkg syscall/zx/hardware/network, method (TxReturnFlags) HasBits(TxReturnFlags) bool
+pkg syscall/zx/hardware/network, method (TxReturnFlags) HasUnknownBits() bool
+pkg syscall/zx/hardware/network, method (TxReturnFlags) I_BitsIsStrict() bool
+pkg syscall/zx/hardware/network, method (TxReturnFlags) I_BitsMask() TxReturnFlags
+pkg syscall/zx/hardware/network, method (TxReturnFlags) InvertBits() TxReturnFlags
+pkg syscall/zx/hardware/network, method (TxReturnFlags) String() string
+pkg syscall/zx/hardware/network, type DeviceClass uint16
+pkg syscall/zx/hardware/network, type DeviceEventProxy struct
+pkg syscall/zx/hardware/network, type DeviceEventProxy struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type DeviceInstanceEventProxy struct
+pkg syscall/zx/hardware/network, type DeviceInstanceEventProxy struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtx interface { GetDevice, GetMacAddressing }
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtx interface, GetDevice(context.Context, DeviceWithCtxInterfaceRequest) error
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtx interface, GetMacAddressing(context.Context, MacAddressingWithCtxInterfaceRequest) error
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtxInterface struct
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtxInterfaceRequest struct
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtxStub struct
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtxStub struct, Impl DeviceInstanceWithCtx
+pkg syscall/zx/hardware/network, type DeviceInstanceWithCtxTransitionalBase struct
+pkg syscall/zx/hardware/network, type DeviceOpenSessionResponse struct
+pkg syscall/zx/hardware/network, type DeviceOpenSessionResponse struct, Fifos Fifos
+pkg syscall/zx/hardware/network, type DeviceOpenSessionResponse struct, Session SessionWithCtxInterface
+pkg syscall/zx/hardware/network, type DeviceOpenSessionResult struct
+pkg syscall/zx/hardware/network, type DeviceOpenSessionResult struct, Err int32
+pkg syscall/zx/hardware/network, type DeviceOpenSessionResult struct, Response DeviceOpenSessionResponse
+pkg syscall/zx/hardware/network, type DeviceOpenSessionResult struct, embedded I_deviceOpenSessionResultTag
+pkg syscall/zx/hardware/network, type DeviceWithCtx interface { GetInfo, GetStatus, GetStatusWatcher, OpenSession }
+pkg syscall/zx/hardware/network, type DeviceWithCtx interface, GetInfo(context.Context) (Info, error)
+pkg syscall/zx/hardware/network, type DeviceWithCtx interface, GetStatus(context.Context) (Status, error)
+pkg syscall/zx/hardware/network, type DeviceWithCtx interface, GetStatusWatcher(context.Context, StatusWatcherWithCtxInterfaceRequest, uint32) error
+pkg syscall/zx/hardware/network, type DeviceWithCtx interface, OpenSession(context.Context, string, SessionInfo) (DeviceOpenSessionResult, error)
+pkg syscall/zx/hardware/network, type DeviceWithCtxInterface struct
+pkg syscall/zx/hardware/network, type DeviceWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type DeviceWithCtxInterfaceRequest struct
+pkg syscall/zx/hardware/network, type DeviceWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type DeviceWithCtxStub struct
+pkg syscall/zx/hardware/network, type DeviceWithCtxStub struct, Impl DeviceWithCtx
+pkg syscall/zx/hardware/network, type DeviceWithCtxTransitionalBase struct
+pkg syscall/zx/hardware/network, type EthernetFeatures uint32
+pkg syscall/zx/hardware/network, type Fifos struct
+pkg syscall/zx/hardware/network, type Fifos struct, Rx zx.Handle
+pkg syscall/zx/hardware/network, type Fifos struct, Tx zx.Handle
+pkg syscall/zx/hardware/network, type FrameType uint8
+pkg syscall/zx/hardware/network, type FrameTypeSupport struct
+pkg syscall/zx/hardware/network, type FrameTypeSupport struct, Features uint32
+pkg syscall/zx/hardware/network, type FrameTypeSupport struct, SupportedFlags TxFlags
+pkg syscall/zx/hardware/network, type FrameTypeSupport struct, Type FrameType
+pkg syscall/zx/hardware/network, type I_deviceOpenSessionResultTag uint64
+pkg syscall/zx/hardware/network, type Info struct
+pkg syscall/zx/hardware/network, type Info struct, BufferAlignment uint32
+pkg syscall/zx/hardware/network, type Info struct, Class DeviceClass
+pkg syscall/zx/hardware/network, type Info struct, DescriptorVersion uint8
+pkg syscall/zx/hardware/network, type Info struct, MaxBufferLength uint32
+pkg syscall/zx/hardware/network, type Info struct, MinDescriptorLength uint8
+pkg syscall/zx/hardware/network, type Info struct, MinRxBufferLength uint32
+pkg syscall/zx/hardware/network, type Info struct, MinTxBufferHead uint16
+pkg syscall/zx/hardware/network, type Info struct, MinTxBufferLength uint32
+pkg syscall/zx/hardware/network, type Info struct, MinTxBufferTail uint16
+pkg syscall/zx/hardware/network, type Info struct, RxAccel []RxAcceleration
+pkg syscall/zx/hardware/network, type Info struct, RxDepth uint16
+pkg syscall/zx/hardware/network, type Info struct, RxTypes []FrameType
+pkg syscall/zx/hardware/network, type Info struct, TxAccel []TxAcceleration
+pkg syscall/zx/hardware/network, type Info struct, TxDepth uint16
+pkg syscall/zx/hardware/network, type Info struct, TxTypes []FrameTypeSupport
+pkg syscall/zx/hardware/network, type InfoType uint32
+pkg syscall/zx/hardware/network, type MacAddressingEventProxy struct
+pkg syscall/zx/hardware/network, type MacAddressingEventProxy struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type MacAddressingWithCtx interface { AddMulticastAddress, GetUnicastAddress, RemoveMulticastAddress, SetMode }
+pkg syscall/zx/hardware/network, type MacAddressingWithCtx interface, AddMulticastAddress(context.Context, net.MacAddress) (int32, error)
+pkg syscall/zx/hardware/network, type MacAddressingWithCtx interface, GetUnicastAddress(context.Context) (net.MacAddress, error)
+pkg syscall/zx/hardware/network, type MacAddressingWithCtx interface, RemoveMulticastAddress(context.Context, net.MacAddress) (int32, error)
+pkg syscall/zx/hardware/network, type MacAddressingWithCtx interface, SetMode(context.Context, MacFilterMode) (int32, error)
+pkg syscall/zx/hardware/network, type MacAddressingWithCtxInterface struct
+pkg syscall/zx/hardware/network, type MacAddressingWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type MacAddressingWithCtxInterfaceRequest struct
+pkg syscall/zx/hardware/network, type MacAddressingWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type MacAddressingWithCtxStub struct
+pkg syscall/zx/hardware/network, type MacAddressingWithCtxStub struct, Impl MacAddressingWithCtx
+pkg syscall/zx/hardware/network, type MacAddressingWithCtxTransitionalBase struct
+pkg syscall/zx/hardware/network, type MacFilterMode uint32
+pkg syscall/zx/hardware/network, type RxAcceleration uint8
+pkg syscall/zx/hardware/network, type RxFlags uint32
+pkg syscall/zx/hardware/network, type SessionEventProxy struct
+pkg syscall/zx/hardware/network, type SessionEventProxy struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type SessionFlags uint16
+pkg syscall/zx/hardware/network, type SessionInfo struct
+pkg syscall/zx/hardware/network, type SessionInfo struct, Data zx.VMO
+pkg syscall/zx/hardware/network, type SessionInfo struct, DescriptorCount uint16
+pkg syscall/zx/hardware/network, type SessionInfo struct, DescriptorLength uint8
+pkg syscall/zx/hardware/network, type SessionInfo struct, DescriptorVersion uint8
+pkg syscall/zx/hardware/network, type SessionInfo struct, Descriptors zx.VMO
+pkg syscall/zx/hardware/network, type SessionInfo struct, Options SessionFlags
+pkg syscall/zx/hardware/network, type SessionInfo struct, RxFrames []FrameType
+pkg syscall/zx/hardware/network, type SessionWithCtx interface { Close, SetPaused }
+pkg syscall/zx/hardware/network, type SessionWithCtx interface, Close(context.Context) error
+pkg syscall/zx/hardware/network, type SessionWithCtx interface, SetPaused(context.Context, bool) error
+pkg syscall/zx/hardware/network, type SessionWithCtxInterface struct
+pkg syscall/zx/hardware/network, type SessionWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type SessionWithCtxInterfaceRequest struct
+pkg syscall/zx/hardware/network, type SessionWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type SessionWithCtxStub struct
+pkg syscall/zx/hardware/network, type SessionWithCtxStub struct, Impl SessionWithCtx
+pkg syscall/zx/hardware/network, type SessionWithCtxTransitionalBase struct
+pkg syscall/zx/hardware/network, type Status struct
+pkg syscall/zx/hardware/network, type Status struct, Flags StatusFlags
+pkg syscall/zx/hardware/network, type Status struct, FlagsPresent bool
+pkg syscall/zx/hardware/network, type Status struct, I_unknownData interface{}
+pkg syscall/zx/hardware/network, type Status struct, Mtu uint32
+pkg syscall/zx/hardware/network, type Status struct, MtuPresent bool
+pkg syscall/zx/hardware/network, type StatusFlags uint32
+pkg syscall/zx/hardware/network, type StatusWatcherEventProxy struct
+pkg syscall/zx/hardware/network, type StatusWatcherEventProxy struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type StatusWatcherWithCtx interface { WatchStatus }
+pkg syscall/zx/hardware/network, type StatusWatcherWithCtx interface, WatchStatus(context.Context) (Status, error)
+pkg syscall/zx/hardware/network, type StatusWatcherWithCtxInterface struct
+pkg syscall/zx/hardware/network, type StatusWatcherWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type StatusWatcherWithCtxInterfaceRequest struct
+pkg syscall/zx/hardware/network, type StatusWatcherWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/hardware/network, type StatusWatcherWithCtxStub struct
+pkg syscall/zx/hardware/network, type StatusWatcherWithCtxStub struct, Impl StatusWatcherWithCtx
+pkg syscall/zx/hardware/network, type StatusWatcherWithCtxTransitionalBase struct
+pkg syscall/zx/hardware/network, type TxAcceleration uint8
+pkg syscall/zx/hardware/network, type TxFlags uint32
+pkg syscall/zx/hardware/network, type TxReturnFlags uint32
+pkg syscall/zx/io, const CloneFlagSameRights = 67108864
+pkg syscall/zx/io, const CloneFlagSameRights uint32
+pkg syscall/zx/io, const DeviceSignalError = 134217728
+pkg syscall/zx/io, const DeviceSignalError uint32
+pkg syscall/zx/io, const DeviceSignalHangup = 268435456
+pkg syscall/zx/io, const DeviceSignalHangup uint32
+pkg syscall/zx/io, const DeviceSignalOob = 33554432
+pkg syscall/zx/io, const DeviceSignalOob uint32
+pkg syscall/zx/io, const DeviceSignalReadable = 16777216
+pkg syscall/zx/io, const DeviceSignalReadable uint32
+pkg syscall/zx/io, const DeviceSignalWritable = 67108864
+pkg syscall/zx/io, const DeviceSignalWritable uint32
+pkg syscall/zx/io, const DirectoryAdminCloneOrdinal = 6512600400724287855
+pkg syscall/zx/io, const DirectoryAdminCloneOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminCloseOrdinal = 5983530995951066180
+pkg syscall/zx/io, const DirectoryAdminCloseOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminDescribeOrdinal = 1152055232528178848
+pkg syscall/zx/io, const DirectoryAdminDescribeOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminGetAttrOrdinal = 8689798978500614909
+pkg syscall/zx/io, const DirectoryAdminGetAttrOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminGetDevicePathOrdinal = 8571163485535175003
+pkg syscall/zx/io, const DirectoryAdminGetDevicePathOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminGetTokenOrdinal = 2787337947777369685
+pkg syscall/zx/io, const DirectoryAdminGetTokenOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminLinkOrdinal = 8360374984291987687
+pkg syscall/zx/io, const DirectoryAdminLinkOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminMountAndCreateOrdinal = 8919240678700135347
+pkg syscall/zx/io, const DirectoryAdminMountAndCreateOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminMountOrdinal = 1126294431032158160
+pkg syscall/zx/io, const DirectoryAdminMountOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminNodeGetFlagsOrdinal = 6595803110182632097
+pkg syscall/zx/io, const DirectoryAdminNodeGetFlagsOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminNodeSetFlagsOrdinal = 5950864159036794675
+pkg syscall/zx/io, const DirectoryAdminNodeSetFlagsOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminOnOpenOrdinal = 9207534335756671346
+pkg syscall/zx/io, const DirectoryAdminOnOpenOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminOpenOrdinal = 3193127272456937152
+pkg syscall/zx/io, const DirectoryAdminOpenOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminQueryFilesystemOrdinal = 5370424362196764509
+pkg syscall/zx/io, const DirectoryAdminQueryFilesystemOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminReadDirentsOrdinal = 3855785432100874762
+pkg syscall/zx/io, const DirectoryAdminReadDirentsOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminRenameOrdinal = 760546084064053509
+pkg syscall/zx/io, const DirectoryAdminRenameOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminRewindOrdinal = 1635123508515392625
+pkg syscall/zx/io, const DirectoryAdminRewindOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminSetAttrOrdinal = 4721673413776871238
+pkg syscall/zx/io, const DirectoryAdminSetAttrOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminSyncOrdinal = 1773723578397144345
+pkg syscall/zx/io, const DirectoryAdminSyncOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminUnlinkOrdinal = 6489679398145932323
+pkg syscall/zx/io, const DirectoryAdminUnlinkOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminUnmountNodeOrdinal = 2790500101479437275
+pkg syscall/zx/io, const DirectoryAdminUnmountNodeOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminUnmountOrdinal = 9053463840573213092
+pkg syscall/zx/io, const DirectoryAdminUnmountOrdinal uint64
+pkg syscall/zx/io, const DirectoryAdminWatchOrdinal = 6275512344170098065
+pkg syscall/zx/io, const DirectoryAdminWatchOrdinal uint64
+pkg syscall/zx/io, const DirectoryCloneOrdinal = 6512600400724287855
+pkg syscall/zx/io, const DirectoryCloneOrdinal uint64
+pkg syscall/zx/io, const DirectoryCloseOrdinal = 5983530995951066180
+pkg syscall/zx/io, const DirectoryCloseOrdinal uint64
+pkg syscall/zx/io, const DirectoryDescribeOrdinal = 1152055232528178848
+pkg syscall/zx/io, const DirectoryDescribeOrdinal uint64
+pkg syscall/zx/io, const DirectoryGetAttrOrdinal = 8689798978500614909
+pkg syscall/zx/io, const DirectoryGetAttrOrdinal uint64
+pkg syscall/zx/io, const DirectoryGetTokenOrdinal = 2787337947777369685
+pkg syscall/zx/io, const DirectoryGetTokenOrdinal uint64
+pkg syscall/zx/io, const DirectoryLinkOrdinal = 8360374984291987687
+pkg syscall/zx/io, const DirectoryLinkOrdinal uint64
+pkg syscall/zx/io, const DirectoryNodeGetFlagsOrdinal = 6595803110182632097
+pkg syscall/zx/io, const DirectoryNodeGetFlagsOrdinal uint64
+pkg syscall/zx/io, const DirectoryNodeSetFlagsOrdinal = 5950864159036794675
+pkg syscall/zx/io, const DirectoryNodeSetFlagsOrdinal uint64
+pkg syscall/zx/io, const DirectoryOnOpenOrdinal = 9207534335756671346
+pkg syscall/zx/io, const DirectoryOnOpenOrdinal uint64
+pkg syscall/zx/io, const DirectoryOpenOrdinal = 3193127272456937152
+pkg syscall/zx/io, const DirectoryOpenOrdinal uint64
+pkg syscall/zx/io, const DirectoryReadDirentsOrdinal = 3855785432100874762
+pkg syscall/zx/io, const DirectoryReadDirentsOrdinal uint64
+pkg syscall/zx/io, const DirectoryRenameOrdinal = 760546084064053509
+pkg syscall/zx/io, const DirectoryRenameOrdinal uint64
+pkg syscall/zx/io, const DirectoryRewindOrdinal = 1635123508515392625
+pkg syscall/zx/io, const DirectoryRewindOrdinal uint64
+pkg syscall/zx/io, const DirectorySetAttrOrdinal = 4721673413776871238
+pkg syscall/zx/io, const DirectorySetAttrOrdinal uint64
+pkg syscall/zx/io, const DirectorySyncOrdinal = 1773723578397144345
+pkg syscall/zx/io, const DirectorySyncOrdinal uint64
+pkg syscall/zx/io, const DirectoryUnlinkOrdinal = 6489679398145932323
+pkg syscall/zx/io, const DirectoryUnlinkOrdinal uint64
+pkg syscall/zx/io, const DirectoryWatchOrdinal = 6275512344170098065
+pkg syscall/zx/io, const DirectoryWatchOrdinal uint64
+pkg syscall/zx/io, const DirectoryWatcherOnEventOrdinal = 4122940494123843882
+pkg syscall/zx/io, const DirectoryWatcherOnEventOrdinal uint64
+pkg syscall/zx/io, const DirentTypeBlockDevice = 6
+pkg syscall/zx/io, const DirentTypeBlockDevice uint8
+pkg syscall/zx/io, const DirentTypeDirectory = 4
+pkg syscall/zx/io, const DirentTypeDirectory uint8
+pkg syscall/zx/io, const DirentTypeFile = 8
+pkg syscall/zx/io, const DirentTypeFile uint8
+pkg syscall/zx/io, const DirentTypeService = 16
+pkg syscall/zx/io, const DirentTypeService uint8
+pkg syscall/zx/io, const DirentTypeSocket = 12
+pkg syscall/zx/io, const DirentTypeSocket uint8
+pkg syscall/zx/io, const DirentTypeUnknown = 0
+pkg syscall/zx/io, const DirentTypeUnknown uint8
+pkg syscall/zx/io, const FileAdvisoryLockOrdinal = 7158728121514993402
+pkg syscall/zx/io, const FileAdvisoryLockOrdinal uint64
+pkg syscall/zx/io, const FileCloneOrdinal = 6512600400724287855
+pkg syscall/zx/io, const FileCloneOrdinal uint64
+pkg syscall/zx/io, const FileCloseOrdinal = 5983530995951066180
+pkg syscall/zx/io, const FileCloseOrdinal uint64
+pkg syscall/zx/io, const FileDescribeOrdinal = 1152055232528178848
+pkg syscall/zx/io, const FileDescribeOrdinal uint64
+pkg syscall/zx/io, const FileGetAttrOrdinal = 8689798978500614909
+pkg syscall/zx/io, const FileGetAttrOrdinal uint64
+pkg syscall/zx/io, const FileGetBufferOrdinal = 5445898995516234065
+pkg syscall/zx/io, const FileGetBufferOrdinal uint64
+pkg syscall/zx/io, const FileGetFlagsOrdinal = 2309194512404294550
+pkg syscall/zx/io, const FileGetFlagsOrdinal uint64
+pkg syscall/zx/io, const FileNodeGetFlagsOrdinal = 6595803110182632097
+pkg syscall/zx/io, const FileNodeGetFlagsOrdinal uint64
+pkg syscall/zx/io, const FileNodeSetFlagsOrdinal = 5950864159036794675
+pkg syscall/zx/io, const FileNodeSetFlagsOrdinal uint64
+pkg syscall/zx/io, const FileOnOpenOrdinal = 9207534335756671346
+pkg syscall/zx/io, const FileOnOpenOrdinal uint64
+pkg syscall/zx/io, const FileReadAtOrdinal = 7289056479437150025
+pkg syscall/zx/io, const FileReadAtOrdinal uint64
+pkg syscall/zx/io, const FileReadOrdinal = 3004665143387037836
+pkg syscall/zx/io, const FileReadOrdinal uint64
+pkg syscall/zx/io, const FileSeekOrdinal = 3623542728230495124
+pkg syscall/zx/io, const FileSeekOrdinal uint64
+pkg syscall/zx/io, const FileSetAttrOrdinal = 4721673413776871238
+pkg syscall/zx/io, const FileSetAttrOrdinal uint64
+pkg syscall/zx/io, const FileSetFlagsOrdinal = 8160301876628623681
+pkg syscall/zx/io, const FileSetFlagsOrdinal uint64
+pkg syscall/zx/io, const FileSignalReadable = 16777216
+pkg syscall/zx/io, const FileSignalReadable uint32
+pkg syscall/zx/io, const FileSignalWritable = 33554432
+pkg syscall/zx/io, const FileSignalWritable uint32
+pkg syscall/zx/io, const FileSyncOrdinal = 1773723578397144345
+pkg syscall/zx/io, const FileSyncOrdinal uint64
+pkg syscall/zx/io, const FileTruncateOrdinal = 6829976253355404763
+pkg syscall/zx/io, const FileTruncateOrdinal uint64
+pkg syscall/zx/io, const FileWriteAtOrdinal = 5416107795679508964
+pkg syscall/zx/io, const FileWriteAtOrdinal uint64
+pkg syscall/zx/io, const FileWriteOrdinal = 4279601575788552795
+pkg syscall/zx/io, const FileWriteOrdinal uint64
+pkg syscall/zx/io, const InoUnknown = 18446744073709551615
+pkg syscall/zx/io, const InoUnknown uint64
+pkg syscall/zx/io, const MaxBuf = 8192
+pkg syscall/zx/io, const MaxBuf uint64
+pkg syscall/zx/io, const MaxFilename = 255
+pkg syscall/zx/io, const MaxFilename uint64
+pkg syscall/zx/io, const MaxFsNameBuffer = 32
+pkg syscall/zx/io, const MaxFsNameBuffer uint64
+pkg syscall/zx/io, const MaxPath = 4096
+pkg syscall/zx/io, const MaxPath uint64
+pkg syscall/zx/io, const ModeProtectionMask = 4095
+pkg syscall/zx/io, const ModeProtectionMask uint32
+pkg syscall/zx/io, const ModeTypeBlockDevice = 24576
+pkg syscall/zx/io, const ModeTypeBlockDevice uint32
+pkg syscall/zx/io, const ModeTypeDirectory = 16384
+pkg syscall/zx/io, const ModeTypeDirectory uint32
+pkg syscall/zx/io, const ModeTypeFile = 32768
+pkg syscall/zx/io, const ModeTypeFile uint32
+pkg syscall/zx/io, const ModeTypeMask = 1044480
+pkg syscall/zx/io, const ModeTypeMask uint32
+pkg syscall/zx/io, const ModeTypeService = 65536
+pkg syscall/zx/io, const ModeTypeService uint32
+pkg syscall/zx/io, const ModeTypeSocket = 49152
+pkg syscall/zx/io, const ModeTypeSocket uint32
+pkg syscall/zx/io, const MountCreateFlagReplace = 1
+pkg syscall/zx/io, const MountCreateFlagReplace uint32
+pkg syscall/zx/io, const NodeAttributeFlagCreationTime = 1
+pkg syscall/zx/io, const NodeAttributeFlagCreationTime uint32
+pkg syscall/zx/io, const NodeAttributeFlagModificationTime = 2
+pkg syscall/zx/io, const NodeAttributeFlagModificationTime uint32
+pkg syscall/zx/io, const NodeCloneOrdinal = 6512600400724287855
+pkg syscall/zx/io, const NodeCloneOrdinal uint64
+pkg syscall/zx/io, const NodeCloseOrdinal = 5983530995951066180
+pkg syscall/zx/io, const NodeCloseOrdinal uint64
+pkg syscall/zx/io, const NodeDescribeOrdinal = 1152055232528178848
+pkg syscall/zx/io, const NodeDescribeOrdinal uint64
+pkg syscall/zx/io, const NodeGetAttrOrdinal = 8689798978500614909
+pkg syscall/zx/io, const NodeGetAttrOrdinal uint64
+pkg syscall/zx/io, const NodeInfoDatagramSocket = 9
+pkg syscall/zx/io, const NodeInfoDatagramSocket ideal-int
+pkg syscall/zx/io, const NodeInfoDevice = 6
+pkg syscall/zx/io, const NodeInfoDevice ideal-int
+pkg syscall/zx/io, const NodeInfoDirectory = 3
+pkg syscall/zx/io, const NodeInfoDirectory ideal-int
+pkg syscall/zx/io, const NodeInfoFile = 2
+pkg syscall/zx/io, const NodeInfoFile ideal-int
+pkg syscall/zx/io, const NodeInfoPipe = 4
+pkg syscall/zx/io, const NodeInfoPipe ideal-int
+pkg syscall/zx/io, const NodeInfoService = 1
+pkg syscall/zx/io, const NodeInfoService ideal-int
+pkg syscall/zx/io, const NodeInfoStreamSocket = 10
+pkg syscall/zx/io, const NodeInfoStreamSocket ideal-int
+pkg syscall/zx/io, const NodeInfoTty = 7
+pkg syscall/zx/io, const NodeInfoTty ideal-int
+pkg syscall/zx/io, const NodeInfoVmofile = 5
+pkg syscall/zx/io, const NodeInfoVmofile ideal-int
+pkg syscall/zx/io, const NodeNodeGetFlagsOrdinal = 6595803110182632097
+pkg syscall/zx/io, const NodeNodeGetFlagsOrdinal uint64
+pkg syscall/zx/io, const NodeNodeSetFlagsOrdinal = 5950864159036794675
+pkg syscall/zx/io, const NodeNodeSetFlagsOrdinal uint64
+pkg syscall/zx/io, const NodeOnOpenOrdinal = 9207534335756671346
+pkg syscall/zx/io, const NodeOnOpenOrdinal uint64
+pkg syscall/zx/io, const NodeSetAttrOrdinal = 4721673413776871238
+pkg syscall/zx/io, const NodeSetAttrOrdinal uint64
+pkg syscall/zx/io, const NodeSyncOrdinal = 1773723578397144345
+pkg syscall/zx/io, const NodeSyncOrdinal uint64
+pkg syscall/zx/io, const OpenFlagAppend = 1048576
+pkg syscall/zx/io, const OpenFlagAppend uint32
+pkg syscall/zx/io, const OpenFlagCreate = 65536
+pkg syscall/zx/io, const OpenFlagCreate uint32
+pkg syscall/zx/io, const OpenFlagCreateIfAbsent = 131072
+pkg syscall/zx/io, const OpenFlagCreateIfAbsent uint32
+pkg syscall/zx/io, const OpenFlagDescribe = 8388608
+pkg syscall/zx/io, const OpenFlagDescribe uint32
+pkg syscall/zx/io, const OpenFlagDirectory = 524288
+pkg syscall/zx/io, const OpenFlagDirectory uint32
+pkg syscall/zx/io, const OpenFlagNoRemote = 2097152
+pkg syscall/zx/io, const OpenFlagNoRemote uint32
+pkg syscall/zx/io, const OpenFlagNodeReference = 4194304
+pkg syscall/zx/io, const OpenFlagNodeReference uint32
+pkg syscall/zx/io, const OpenFlagNotDirectory = 33554432
+pkg syscall/zx/io, const OpenFlagNotDirectory uint32
+pkg syscall/zx/io, const OpenFlagPosix = 16777216
+pkg syscall/zx/io, const OpenFlagPosix uint32
+pkg syscall/zx/io, const OpenFlagTruncate = 262144
+pkg syscall/zx/io, const OpenFlagTruncate uint32
+pkg syscall/zx/io, const OpenFlagsAllowedWithNodeReference = 46661632
+pkg syscall/zx/io, const OpenFlagsAllowedWithNodeReference uint32
+pkg syscall/zx/io, const OpenRightAdmin = 4
+pkg syscall/zx/io, const OpenRightAdmin uint32
+pkg syscall/zx/io, const OpenRightExecutable = 8
+pkg syscall/zx/io, const OpenRightExecutable uint32
+pkg syscall/zx/io, const OpenRightReadable = 1
+pkg syscall/zx/io, const OpenRightReadable uint32
+pkg syscall/zx/io, const OpenRightWritable = 2
+pkg syscall/zx/io, const OpenRightWritable uint32
+pkg syscall/zx/io, const SeekOriginCurrent = 1
+pkg syscall/zx/io, const SeekOriginCurrent SeekOrigin
+pkg syscall/zx/io, const SeekOriginEnd = 2
+pkg syscall/zx/io, const SeekOriginEnd SeekOrigin
+pkg syscall/zx/io, const SeekOriginStart = 0
+pkg syscall/zx/io, const SeekOriginStart SeekOrigin
+pkg syscall/zx/io, const VmoFlagExact = 131072
+pkg syscall/zx/io, const VmoFlagExact uint32
+pkg syscall/zx/io, const VmoFlagExec = 4
+pkg syscall/zx/io, const VmoFlagExec uint32
+pkg syscall/zx/io, const VmoFlagPrivate = 65536
+pkg syscall/zx/io, const VmoFlagPrivate uint32
+pkg syscall/zx/io, const VmoFlagRead = 1
+pkg syscall/zx/io, const VmoFlagRead uint32
+pkg syscall/zx/io, const VmoFlagWrite = 2
+pkg syscall/zx/io, const VmoFlagWrite uint32
+pkg syscall/zx/io, const WatchEventAdded = 1
+pkg syscall/zx/io, const WatchEventAdded uint8
+pkg syscall/zx/io, const WatchEventDeleted = 0
+pkg syscall/zx/io, const WatchEventDeleted uint8
+pkg syscall/zx/io, const WatchEventExisting = 3
+pkg syscall/zx/io, const WatchEventExisting uint8
+pkg syscall/zx/io, const WatchEventIdle = 4
+pkg syscall/zx/io, const WatchEventIdle uint8
+pkg syscall/zx/io, const WatchEventRemoved = 2
+pkg syscall/zx/io, const WatchEventRemoved uint8
+pkg syscall/zx/io, const WatchMaskAdded = 2
+pkg syscall/zx/io, const WatchMaskAdded uint32
+pkg syscall/zx/io, const WatchMaskAll = 31
+pkg syscall/zx/io, const WatchMaskAll uint32
+pkg syscall/zx/io, const WatchMaskDeleted = 1
+pkg syscall/zx/io, const WatchMaskDeleted uint32
+pkg syscall/zx/io, const WatchMaskExisting = 8
+pkg syscall/zx/io, const WatchMaskExisting uint32
+pkg syscall/zx/io, const WatchMaskIdle = 16
+pkg syscall/zx/io, const WatchMaskIdle uint32
+pkg syscall/zx/io, const WatchMaskRemoved = 4
+pkg syscall/zx/io, const WatchMaskRemoved uint32
+pkg syscall/zx/io, func NewDirectoryAdminWithCtxInterfaceRequest() (DirectoryAdminWithCtxInterfaceRequest, *DirectoryAdminWithCtxInterface, error)
+pkg syscall/zx/io, func NewDirectoryWatcherWithCtxInterfaceRequest() (DirectoryWatcherWithCtxInterfaceRequest, *DirectoryWatcherWithCtxInterface, error)
+pkg syscall/zx/io, func NewDirectoryWithCtxInterfaceRequest() (DirectoryWithCtxInterfaceRequest, *DirectoryWithCtxInterface, error)
+pkg syscall/zx/io, func NewFileWithCtxInterfaceRequest() (FileWithCtxInterfaceRequest, *FileWithCtxInterface, error)
+pkg syscall/zx/io, func NewNodeWithCtxInterfaceRequest() (NodeWithCtxInterfaceRequest, *NodeWithCtxInterface, error)
+pkg syscall/zx/io, func NodeInfoWithDatagramSocket(DatagramSocket) NodeInfo
+pkg syscall/zx/io, func NodeInfoWithDevice(Device) NodeInfo
+pkg syscall/zx/io, func NodeInfoWithDirectory(DirectoryObject) NodeInfo
+pkg syscall/zx/io, func NodeInfoWithFile(FileObject) NodeInfo
+pkg syscall/zx/io, func NodeInfoWithPipe(Pipe) NodeInfo
+pkg syscall/zx/io, func NodeInfoWithService(Service) NodeInfo
+pkg syscall/zx/io, func NodeInfoWithStreamSocket(StreamSocket) NodeInfo
+pkg syscall/zx/io, func NodeInfoWithTty(Tty) NodeInfo
+pkg syscall/zx/io, func NodeInfoWithVmofile(Vmofile) NodeInfo
+pkg syscall/zx/io, method (*DatagramSocket) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*Device) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*DirectoryAdminEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io, method (*DirectoryAdminEventProxy) OnOpen(int32, *NodeInfo) error
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Clone(context.Context, uint32, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Close(context.Context) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Describe(context.Context) (NodeInfo, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) ExpectOnOpen(context.Context) (int32, *NodeInfo, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) GetAttr(context.Context) (int32, NodeAttributes, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) GetDevicePath(context.Context) (int32, *string, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) GetToken(context.Context) (int32, zx.Handle, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Link(context.Context, string, zx.Handle, string) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Mount(context.Context, DirectoryWithCtxInterface) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) MountAndCreate(context.Context, DirectoryWithCtxInterface, string, uint32) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Open(context.Context, uint32, uint32, string, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) QueryFilesystem(context.Context) (int32, *FilesystemInfo, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) ReadDirents(context.Context, uint64) (int32, []uint8, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Rename(context.Context, string, zx.Handle, string) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Rewind(context.Context) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) SetAttr(context.Context, uint32, NodeAttributes) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Sync(context.Context) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Unlink(context.Context, string) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Unmount(context.Context) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) UnmountNode(context.Context) (int32, DirectoryWithCtxInterface, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterface) Watch(context.Context, uint32, uint32, zx.Channel) (int32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxTransitionalBase) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, method (*DirectoryAdminWithCtxTransitionalBase) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, method (*DirectoryEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io, method (*DirectoryEventProxy) OnOpen(int32, *NodeInfo) error
+pkg syscall/zx/io, method (*DirectoryObject) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*DirectoryWatcherEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io, method (*DirectoryWatcherWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io, method (*DirectoryWatcherWithCtxInterface) OnEvent(context.Context, []uint8) error
+pkg syscall/zx/io, method (*DirectoryWatcherWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io, method (*DirectoryWatcherWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Clone(context.Context, uint32, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Close(context.Context) (int32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Describe(context.Context) (NodeInfo, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) ExpectOnOpen(context.Context) (int32, *NodeInfo, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) GetAttr(context.Context) (int32, NodeAttributes, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) GetToken(context.Context) (int32, zx.Handle, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Link(context.Context, string, zx.Handle, string) (int32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Open(context.Context, uint32, uint32, string, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) ReadDirents(context.Context, uint64) (int32, []uint8, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Rename(context.Context, string, zx.Handle, string) (int32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Rewind(context.Context) (int32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) SetAttr(context.Context, uint32, NodeAttributes) (int32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Sync(context.Context) (int32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Unlink(context.Context, string) (int32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterface) Watch(context.Context, uint32, uint32, zx.Channel) (int32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io, method (*DirectoryWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxTransitionalBase) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, method (*DirectoryWithCtxTransitionalBase) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, method (*FileEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io, method (*FileEventProxy) OnOpen(int32, *NodeInfo) error
+pkg syscall/zx/io, method (*FileObject) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*FileWithCtxInterface) AdvisoryLock(context.Context, io2.AdvisoryLockRequest) (io2.AdvisoryLockingAdvisoryLockResult, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) Clone(context.Context, uint32, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, method (*FileWithCtxInterface) Close(context.Context) (int32, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) Describe(context.Context) (NodeInfo, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) ExpectOnOpen(context.Context) (int32, *NodeInfo, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) GetAttr(context.Context) (int32, NodeAttributes, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) GetBuffer(context.Context, uint32) (int32, *mem.Buffer, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) GetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io, method (*FileWithCtxInterface) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) Read(context.Context, uint64) (int32, []uint8, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) ReadAt(context.Context, uint64, uint64) (int32, []uint8, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) Seek(context.Context, int64, SeekOrigin) (int32, uint64, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) SetAttr(context.Context, uint32, NodeAttributes) (int32, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) SetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) Sync(context.Context) (int32, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) Truncate(context.Context, uint64) (int32, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) Write(context.Context, []uint8) (int32, uint64, error)
+pkg syscall/zx/io, method (*FileWithCtxInterface) WriteAt(context.Context, []uint8, uint64) (int32, uint64, error)
+pkg syscall/zx/io, method (*FileWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io, method (*FileWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io, method (*FileWithCtxTransitionalBase) AdvisoryLock(context.Context, io2.AdvisoryLockRequest) (io2.AdvisoryLockingAdvisoryLockResult, error)
+pkg syscall/zx/io, method (*FileWithCtxTransitionalBase) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, method (*FileWithCtxTransitionalBase) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, method (*FilesystemInfo) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*NodeAttributes) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*NodeEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io, method (*NodeEventProxy) OnOpen(int32, *NodeInfo) error
+pkg syscall/zx/io, method (*NodeInfo) Ordinal() uint64
+pkg syscall/zx/io, method (*NodeInfo) SetDatagramSocket(DatagramSocket)
+pkg syscall/zx/io, method (*NodeInfo) SetDevice(Device)
+pkg syscall/zx/io, method (*NodeInfo) SetDirectory(DirectoryObject)
+pkg syscall/zx/io, method (*NodeInfo) SetFile(FileObject)
+pkg syscall/zx/io, method (*NodeInfo) SetPipe(Pipe)
+pkg syscall/zx/io, method (*NodeInfo) SetService(Service)
+pkg syscall/zx/io, method (*NodeInfo) SetStreamSocket(StreamSocket)
+pkg syscall/zx/io, method (*NodeInfo) SetTty(Tty)
+pkg syscall/zx/io, method (*NodeInfo) SetVmofile(Vmofile)
+pkg syscall/zx/io, method (*NodeInfo) Which() I_nodeInfoTag
+pkg syscall/zx/io, method (*NodeWithCtxInterface) Clone(context.Context, uint32, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, method (*NodeWithCtxInterface) Close(context.Context) (int32, error)
+pkg syscall/zx/io, method (*NodeWithCtxInterface) Describe(context.Context) (NodeInfo, error)
+pkg syscall/zx/io, method (*NodeWithCtxInterface) ExpectOnOpen(context.Context) (int32, *NodeInfo, error)
+pkg syscall/zx/io, method (*NodeWithCtxInterface) GetAttr(context.Context) (int32, NodeAttributes, error)
+pkg syscall/zx/io, method (*NodeWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io, method (*NodeWithCtxInterface) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, method (*NodeWithCtxInterface) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, method (*NodeWithCtxInterface) SetAttr(context.Context, uint32, NodeAttributes) (int32, error)
+pkg syscall/zx/io, method (*NodeWithCtxInterface) Sync(context.Context) (int32, error)
+pkg syscall/zx/io, method (*NodeWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io, method (*NodeWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io, method (*NodeWithCtxTransitionalBase) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, method (*NodeWithCtxTransitionalBase) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, method (*Pipe) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*Service) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*StreamSocket) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*Tty) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*Vmofile) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (*WatchedEvent) Marshaler() fidl.Marshaler
+pkg syscall/zx/io, method (SeekOrigin) I_EnumIsStrict() bool
+pkg syscall/zx/io, method (SeekOrigin) I_EnumValues() []SeekOrigin
+pkg syscall/zx/io, method (SeekOrigin) IsUnknown() bool
+pkg syscall/zx/io, method (SeekOrigin) String() string
+pkg syscall/zx/io, type DatagramSocket struct
+pkg syscall/zx/io, type DatagramSocket struct, Event zx.Handle
+pkg syscall/zx/io, type Device struct
+pkg syscall/zx/io, type Device struct, Event zx.Handle
+pkg syscall/zx/io, type DirectoryAdminEventProxy struct
+pkg syscall/zx/io, type DirectoryAdminEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface { Clone, Close, Describe, GetAttr, GetDevicePath, GetToken, Link, Mount, MountAndCreate, NodeGetFlags, NodeSetFlags, Open, QueryFilesystem, ReadDirents, Rename, Rewind, SetAttr, Sync, Unlink, Unmount, UnmountNode, Watch }
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Clone(context.Context, uint32, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Close(context.Context) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Describe(context.Context) (NodeInfo, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, GetAttr(context.Context) (int32, NodeAttributes, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, GetDevicePath(context.Context) (int32, *string, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, GetToken(context.Context) (int32, zx.Handle, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Link(context.Context, string, zx.Handle, string) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Mount(context.Context, DirectoryWithCtxInterface) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, MountAndCreate(context.Context, DirectoryWithCtxInterface, string, uint32) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Open(context.Context, uint32, uint32, string, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, QueryFilesystem(context.Context) (int32, *FilesystemInfo, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, ReadDirents(context.Context, uint64) (int32, []uint8, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Rename(context.Context, string, zx.Handle, string) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Rewind(context.Context) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, SetAttr(context.Context, uint32, NodeAttributes) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Sync(context.Context) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Unlink(context.Context, string) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Unmount(context.Context) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, UnmountNode(context.Context) (int32, DirectoryWithCtxInterface, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtx interface, Watch(context.Context, uint32, uint32, zx.Channel) (int32, error)
+pkg syscall/zx/io, type DirectoryAdminWithCtxInterface struct
+pkg syscall/zx/io, type DirectoryAdminWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io, type DirectoryAdminWithCtxInterfaceRequest struct
+pkg syscall/zx/io, type DirectoryAdminWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io, type DirectoryAdminWithCtxStub struct
+pkg syscall/zx/io, type DirectoryAdminWithCtxStub struct, Impl DirectoryAdminWithCtx
+pkg syscall/zx/io, type DirectoryAdminWithCtxTransitionalBase struct
+pkg syscall/zx/io, type DirectoryEventProxy struct
+pkg syscall/zx/io, type DirectoryEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io, type DirectoryObject struct
+pkg syscall/zx/io, type DirectoryWatcherEventProxy struct
+pkg syscall/zx/io, type DirectoryWatcherEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io, type DirectoryWatcherWithCtx interface { OnEvent }
+pkg syscall/zx/io, type DirectoryWatcherWithCtx interface, OnEvent(context.Context, []uint8) error
+pkg syscall/zx/io, type DirectoryWatcherWithCtxInterface struct
+pkg syscall/zx/io, type DirectoryWatcherWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io, type DirectoryWatcherWithCtxInterfaceRequest struct
+pkg syscall/zx/io, type DirectoryWatcherWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io, type DirectoryWatcherWithCtxStub struct
+pkg syscall/zx/io, type DirectoryWatcherWithCtxStub struct, Impl DirectoryWatcherWithCtx
+pkg syscall/zx/io, type DirectoryWatcherWithCtxTransitionalBase struct
+pkg syscall/zx/io, type DirectoryWithCtx interface { Clone, Close, Describe, GetAttr, GetToken, Link, NodeGetFlags, NodeSetFlags, Open, ReadDirents, Rename, Rewind, SetAttr, Sync, Unlink, Watch }
+pkg syscall/zx/io, type DirectoryWithCtx interface, Clone(context.Context, uint32, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, type DirectoryWithCtx interface, Close(context.Context) (int32, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, Describe(context.Context) (NodeInfo, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, GetAttr(context.Context) (int32, NodeAttributes, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, GetToken(context.Context) (int32, zx.Handle, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, Link(context.Context, string, zx.Handle, string) (int32, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, Open(context.Context, uint32, uint32, string, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, type DirectoryWithCtx interface, ReadDirents(context.Context, uint64) (int32, []uint8, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, Rename(context.Context, string, zx.Handle, string) (int32, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, Rewind(context.Context) (int32, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, SetAttr(context.Context, uint32, NodeAttributes) (int32, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, Sync(context.Context) (int32, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, Unlink(context.Context, string) (int32, error)
+pkg syscall/zx/io, type DirectoryWithCtx interface, Watch(context.Context, uint32, uint32, zx.Channel) (int32, error)
+pkg syscall/zx/io, type DirectoryWithCtxInterface struct
+pkg syscall/zx/io, type DirectoryWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io, type DirectoryWithCtxInterfaceRequest struct
+pkg syscall/zx/io, type DirectoryWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io, type DirectoryWithCtxStub struct
+pkg syscall/zx/io, type DirectoryWithCtxStub struct, Impl DirectoryWithCtx
+pkg syscall/zx/io, type DirectoryWithCtxTransitionalBase struct
+pkg syscall/zx/io, type FileEventProxy struct
+pkg syscall/zx/io, type FileEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io, type FileObject struct
+pkg syscall/zx/io, type FileObject struct, Event zx.Event
+pkg syscall/zx/io, type FileObject struct, Stream zx.Handle
+pkg syscall/zx/io, type FileWithCtx interface { AdvisoryLock, Clone, Close, Describe, GetAttr, GetBuffer, GetFlags, NodeGetFlags, NodeSetFlags, Read, ReadAt, Seek, SetAttr, SetFlags, Sync, Truncate, Write, WriteAt }
+pkg syscall/zx/io, type FileWithCtx interface, AdvisoryLock(context.Context, io2.AdvisoryLockRequest) (io2.AdvisoryLockingAdvisoryLockResult, error)
+pkg syscall/zx/io, type FileWithCtx interface, Clone(context.Context, uint32, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, type FileWithCtx interface, Close(context.Context) (int32, error)
+pkg syscall/zx/io, type FileWithCtx interface, Describe(context.Context) (NodeInfo, error)
+pkg syscall/zx/io, type FileWithCtx interface, GetAttr(context.Context) (int32, NodeAttributes, error)
+pkg syscall/zx/io, type FileWithCtx interface, GetBuffer(context.Context, uint32) (int32, *mem.Buffer, error)
+pkg syscall/zx/io, type FileWithCtx interface, GetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, type FileWithCtx interface, NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, type FileWithCtx interface, NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, type FileWithCtx interface, Read(context.Context, uint64) (int32, []uint8, error)
+pkg syscall/zx/io, type FileWithCtx interface, ReadAt(context.Context, uint64, uint64) (int32, []uint8, error)
+pkg syscall/zx/io, type FileWithCtx interface, Seek(context.Context, int64, SeekOrigin) (int32, uint64, error)
+pkg syscall/zx/io, type FileWithCtx interface, SetAttr(context.Context, uint32, NodeAttributes) (int32, error)
+pkg syscall/zx/io, type FileWithCtx interface, SetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, type FileWithCtx interface, Sync(context.Context) (int32, error)
+pkg syscall/zx/io, type FileWithCtx interface, Truncate(context.Context, uint64) (int32, error)
+pkg syscall/zx/io, type FileWithCtx interface, Write(context.Context, []uint8) (int32, uint64, error)
+pkg syscall/zx/io, type FileWithCtx interface, WriteAt(context.Context, []uint8, uint64) (int32, uint64, error)
+pkg syscall/zx/io, type FileWithCtxInterface struct
+pkg syscall/zx/io, type FileWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io, type FileWithCtxInterfaceRequest struct
+pkg syscall/zx/io, type FileWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io, type FileWithCtxStub struct
+pkg syscall/zx/io, type FileWithCtxStub struct, Impl FileWithCtx
+pkg syscall/zx/io, type FileWithCtxTransitionalBase struct
+pkg syscall/zx/io, type FilesystemInfo struct
+pkg syscall/zx/io, type FilesystemInfo struct, BlockSize uint32
+pkg syscall/zx/io, type FilesystemInfo struct, FreeSharedPoolBytes uint64
+pkg syscall/zx/io, type FilesystemInfo struct, FsId uint64
+pkg syscall/zx/io, type FilesystemInfo struct, FsType uint32
+pkg syscall/zx/io, type FilesystemInfo struct, MaxFilenameSize uint32
+pkg syscall/zx/io, type FilesystemInfo struct, Name [32]int8
+pkg syscall/zx/io, type FilesystemInfo struct, Padding uint32
+pkg syscall/zx/io, type FilesystemInfo struct, TotalBytes uint64
+pkg syscall/zx/io, type FilesystemInfo struct, TotalNodes uint64
+pkg syscall/zx/io, type FilesystemInfo struct, UsedBytes uint64
+pkg syscall/zx/io, type FilesystemInfo struct, UsedNodes uint64
+pkg syscall/zx/io, type I_nodeInfoTag uint64
+pkg syscall/zx/io, type NodeAttributes struct
+pkg syscall/zx/io, type NodeAttributes struct, ContentSize uint64
+pkg syscall/zx/io, type NodeAttributes struct, CreationTime uint64
+pkg syscall/zx/io, type NodeAttributes struct, Id uint64
+pkg syscall/zx/io, type NodeAttributes struct, LinkCount uint64
+pkg syscall/zx/io, type NodeAttributes struct, Mode uint32
+pkg syscall/zx/io, type NodeAttributes struct, ModificationTime uint64
+pkg syscall/zx/io, type NodeAttributes struct, StorageSize uint64
+pkg syscall/zx/io, type NodeEventProxy struct
+pkg syscall/zx/io, type NodeEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io, type NodeInfo struct
+pkg syscall/zx/io, type NodeInfo struct, DatagramSocket DatagramSocket
+pkg syscall/zx/io, type NodeInfo struct, Device Device
+pkg syscall/zx/io, type NodeInfo struct, Directory DirectoryObject
+pkg syscall/zx/io, type NodeInfo struct, File FileObject
+pkg syscall/zx/io, type NodeInfo struct, Pipe Pipe
+pkg syscall/zx/io, type NodeInfo struct, Service Service
+pkg syscall/zx/io, type NodeInfo struct, StreamSocket StreamSocket
+pkg syscall/zx/io, type NodeInfo struct, Tty Tty
+pkg syscall/zx/io, type NodeInfo struct, Vmofile Vmofile
+pkg syscall/zx/io, type NodeInfo struct, embedded I_nodeInfoTag
+pkg syscall/zx/io, type NodeWithCtx interface { Clone, Close, Describe, GetAttr, NodeGetFlags, NodeSetFlags, SetAttr, Sync }
+pkg syscall/zx/io, type NodeWithCtx interface, Clone(context.Context, uint32, NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/io, type NodeWithCtx interface, Close(context.Context) (int32, error)
+pkg syscall/zx/io, type NodeWithCtx interface, Describe(context.Context) (NodeInfo, error)
+pkg syscall/zx/io, type NodeWithCtx interface, GetAttr(context.Context) (int32, NodeAttributes, error)
+pkg syscall/zx/io, type NodeWithCtx interface, NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/io, type NodeWithCtx interface, NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/io, type NodeWithCtx interface, SetAttr(context.Context, uint32, NodeAttributes) (int32, error)
+pkg syscall/zx/io, type NodeWithCtx interface, Sync(context.Context) (int32, error)
+pkg syscall/zx/io, type NodeWithCtxInterface struct
+pkg syscall/zx/io, type NodeWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io, type NodeWithCtxInterfaceRequest struct
+pkg syscall/zx/io, type NodeWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io, type NodeWithCtxStub struct
+pkg syscall/zx/io, type NodeWithCtxStub struct, Impl NodeWithCtx
+pkg syscall/zx/io, type NodeWithCtxTransitionalBase struct
+pkg syscall/zx/io, type Pipe struct
+pkg syscall/zx/io, type Pipe struct, Socket zx.Socket
+pkg syscall/zx/io, type SeekOrigin uint32
+pkg syscall/zx/io, type Service struct
+pkg syscall/zx/io, type StreamSocket struct
+pkg syscall/zx/io, type StreamSocket struct, Socket zx.Socket
+pkg syscall/zx/io, type Tty struct
+pkg syscall/zx/io, type Tty struct, Event zx.Handle
+pkg syscall/zx/io, type Vmofile struct
+pkg syscall/zx/io, type Vmofile struct, Length uint64
+pkg syscall/zx/io, type Vmofile struct, Offset uint64
+pkg syscall/zx/io, type Vmofile struct, Vmo zx.VMO
+pkg syscall/zx/io, type WatchedEvent struct
+pkg syscall/zx/io, type WatchedEvent struct, Event uint8
+pkg syscall/zx/io, type WatchedEvent struct, Len uint8
+pkg syscall/zx/io, type WatchedEvent struct, Name []uint8
+pkg syscall/zx/io2, const AdvisoryLockTypeRead = 1
+pkg syscall/zx/io2, const AdvisoryLockTypeRead AdvisoryLockType
+pkg syscall/zx/io2, const AdvisoryLockTypeUnlock = 3
+pkg syscall/zx/io2, const AdvisoryLockTypeUnlock AdvisoryLockType
+pkg syscall/zx/io2, const AdvisoryLockTypeWrite = 2
+pkg syscall/zx/io2, const AdvisoryLockTypeWrite AdvisoryLockType
+pkg syscall/zx/io2, const AdvisoryLockingAdvisoryLockOrdinal = 7158728121514993402
+pkg syscall/zx/io2, const AdvisoryLockingAdvisoryLockOrdinal uint64
+pkg syscall/zx/io2, const AdvisoryLockingAdvisoryLockResultErr = 2
+pkg syscall/zx/io2, const AdvisoryLockingAdvisoryLockResultErr ideal-int
+pkg syscall/zx/io2, const AdvisoryLockingAdvisoryLockResultResponse = 1
+pkg syscall/zx/io2, const AdvisoryLockingAdvisoryLockResultResponse ideal-int
+pkg syscall/zx/io2, const ConnectionFlagsAppend = 4
+pkg syscall/zx/io2, const ConnectionFlagsAppend ConnectionFlags
+pkg syscall/zx/io2, const ConnectionFlagsConnect = 2
+pkg syscall/zx/io2, const ConnectionFlagsConnect ConnectionFlags
+pkg syscall/zx/io2, const ConnectionFlagsGetConnectionInfo = 1
+pkg syscall/zx/io2, const ConnectionFlagsGetConnectionInfo ConnectionFlags
+pkg syscall/zx/io2, const ConnectionFlagsTruncate = 8
+pkg syscall/zx/io2, const ConnectionFlagsTruncate ConnectionFlags
+pkg syscall/zx/io2, const ConnectionFlags_Mask = 15
+pkg syscall/zx/io2, const ConnectionFlags_Mask ConnectionFlags
+pkg syscall/zx/io2, const ConnectionInfoQueryAvailableOperations = 4
+pkg syscall/zx/io2, const ConnectionInfoQueryAvailableOperations ConnectionInfoQuery
+pkg syscall/zx/io2, const ConnectionInfoQueryRepresentation = 1
+pkg syscall/zx/io2, const ConnectionInfoQueryRepresentation ConnectionInfoQuery
+pkg syscall/zx/io2, const ConnectionInfoQueryRights = 2
+pkg syscall/zx/io2, const ConnectionInfoQueryRights ConnectionInfoQuery
+pkg syscall/zx/io2, const ConnectionInfoQuery_Mask = 7
+pkg syscall/zx/io2, const ConnectionInfoQuery_Mask ConnectionInfoQuery
+pkg syscall/zx/io2, const DebuglogCloseOrdinal = 3309063910701555048
+pkg syscall/zx/io2, const DebuglogCloseOrdinal uint64
+pkg syscall/zx/io2, const DebuglogDescribeOrdinal = 5380773581678861359
+pkg syscall/zx/io2, const DebuglogDescribeOrdinal uint64
+pkg syscall/zx/io2, const DebuglogGetAttributesOrdinal = 7448424316484899300
+pkg syscall/zx/io2, const DebuglogGetAttributesOrdinal uint64
+pkg syscall/zx/io2, const DebuglogGetTokenOrdinal = 5704694899098900708
+pkg syscall/zx/io2, const DebuglogGetTokenOrdinal uint64
+pkg syscall/zx/io2, const DebuglogOnConnectionInfoOrdinal = 7365633083752227895
+pkg syscall/zx/io2, const DebuglogOnConnectionInfoOrdinal uint64
+pkg syscall/zx/io2, const DebuglogReopenOrdinal = 8365171012830086815
+pkg syscall/zx/io2, const DebuglogReopenOrdinal uint64
+pkg syscall/zx/io2, const DebuglogSyncOrdinal = 775649110452626349
+pkg syscall/zx/io2, const DebuglogSyncOrdinal uint64
+pkg syscall/zx/io2, const DebuglogUpdateAttributesOrdinal = 9032487194756522421
+pkg syscall/zx/io2, const DebuglogUpdateAttributesOrdinal uint64
+pkg syscall/zx/io2, const DeviceSignalError = 67108864
+pkg syscall/zx/io2, const DeviceSignalError DeviceSignal
+pkg syscall/zx/io2, const DeviceSignalHangup = 134217728
+pkg syscall/zx/io2, const DeviceSignalHangup DeviceSignal
+pkg syscall/zx/io2, const DeviceSignalOob = 268435456
+pkg syscall/zx/io2, const DeviceSignalOob DeviceSignal
+pkg syscall/zx/io2, const DeviceSignalReadable = 16777216
+pkg syscall/zx/io2, const DeviceSignalReadable DeviceSignal
+pkg syscall/zx/io2, const DeviceSignalWritable = 33554432
+pkg syscall/zx/io2, const DeviceSignalWritable DeviceSignal
+pkg syscall/zx/io2, const DeviceSignal_Mask = 520093696
+pkg syscall/zx/io2, const DeviceSignal_Mask DeviceSignal
+pkg syscall/zx/io2, const DirectoryCloseOrdinal = 3309063910701555048
+pkg syscall/zx/io2, const DirectoryCloseOrdinal uint64
+pkg syscall/zx/io2, const DirectoryDescribeOrdinal = 5380773581678861359
+pkg syscall/zx/io2, const DirectoryDescribeOrdinal uint64
+pkg syscall/zx/io2, const DirectoryEnumerateOrdinal = 856049564156234339
+pkg syscall/zx/io2, const DirectoryEnumerateOrdinal uint64
+pkg syscall/zx/io2, const DirectoryGetAttributesOrdinal = 7448424316484899300
+pkg syscall/zx/io2, const DirectoryGetAttributesOrdinal uint64
+pkg syscall/zx/io2, const DirectoryGetTokenOrdinal = 5704694899098900708
+pkg syscall/zx/io2, const DirectoryGetTokenOrdinal uint64
+pkg syscall/zx/io2, const DirectoryIteratorGetNextOrdinal = 6710478736528213084
+pkg syscall/zx/io2, const DirectoryIteratorGetNextOrdinal uint64
+pkg syscall/zx/io2, const DirectoryIteratorGetNextResultErr = 2
+pkg syscall/zx/io2, const DirectoryIteratorGetNextResultErr ideal-int
+pkg syscall/zx/io2, const DirectoryIteratorGetNextResultResponse = 1
+pkg syscall/zx/io2, const DirectoryIteratorGetNextResultResponse ideal-int
+pkg syscall/zx/io2, const DirectoryLinkOrdinal = 4783754133017656780
+pkg syscall/zx/io2, const DirectoryLinkOrdinal uint64
+pkg syscall/zx/io2, const DirectoryLinkResultErr = 2
+pkg syscall/zx/io2, const DirectoryLinkResultErr ideal-int
+pkg syscall/zx/io2, const DirectoryLinkResultResponse = 1
+pkg syscall/zx/io2, const DirectoryLinkResultResponse ideal-int
+pkg syscall/zx/io2, const DirectoryOnConnectionInfoOrdinal = 7365633083752227895
+pkg syscall/zx/io2, const DirectoryOnConnectionInfoOrdinal uint64
+pkg syscall/zx/io2, const DirectoryOpenOrdinal = 4055276793586922067
+pkg syscall/zx/io2, const DirectoryOpenOrdinal uint64
+pkg syscall/zx/io2, const DirectoryRenameOrdinal = 2296886357278540471
+pkg syscall/zx/io2, const DirectoryRenameOrdinal uint64
+pkg syscall/zx/io2, const DirectoryRenameResultErr = 2
+pkg syscall/zx/io2, const DirectoryRenameResultErr ideal-int
+pkg syscall/zx/io2, const DirectoryRenameResultResponse = 1
+pkg syscall/zx/io2, const DirectoryRenameResultResponse ideal-int
+pkg syscall/zx/io2, const DirectoryReopenOrdinal = 8365171012830086815
+pkg syscall/zx/io2, const DirectoryReopenOrdinal uint64
+pkg syscall/zx/io2, const DirectorySyncOrdinal = 775649110452626349
+pkg syscall/zx/io2, const DirectorySyncOrdinal uint64
+pkg syscall/zx/io2, const DirectoryUnlinkOrdinal = 7813140061152029915
+pkg syscall/zx/io2, const DirectoryUnlinkOrdinal uint64
+pkg syscall/zx/io2, const DirectoryUnlinkResultErr = 2
+pkg syscall/zx/io2, const DirectoryUnlinkResultErr ideal-int
+pkg syscall/zx/io2, const DirectoryUnlinkResultResponse = 1
+pkg syscall/zx/io2, const DirectoryUnlinkResultResponse ideal-int
+pkg syscall/zx/io2, const DirectoryUpdateAttributesOrdinal = 9032487194756522421
+pkg syscall/zx/io2, const DirectoryUpdateAttributesOrdinal uint64
+pkg syscall/zx/io2, const DirectoryWatchMaskAdded = 4
+pkg syscall/zx/io2, const DirectoryWatchMaskAdded DirectoryWatchMask
+pkg syscall/zx/io2, const DirectoryWatchMaskExisting = 1
+pkg syscall/zx/io2, const DirectoryWatchMaskExisting DirectoryWatchMask
+pkg syscall/zx/io2, const DirectoryWatchMaskIdle = 2
+pkg syscall/zx/io2, const DirectoryWatchMaskIdle DirectoryWatchMask
+pkg syscall/zx/io2, const DirectoryWatchMaskRemoved = 8
+pkg syscall/zx/io2, const DirectoryWatchMaskRemoved DirectoryWatchMask
+pkg syscall/zx/io2, const DirectoryWatchMask_Mask = 15
+pkg syscall/zx/io2, const DirectoryWatchMask_Mask DirectoryWatchMask
+pkg syscall/zx/io2, const DirectoryWatchOrdinal = 9189783658495477272
+pkg syscall/zx/io2, const DirectoryWatchOrdinal uint64
+pkg syscall/zx/io2, const DirectoryWatchedEventAdded = 3
+pkg syscall/zx/io2, const DirectoryWatchedEventAdded ideal-int
+pkg syscall/zx/io2, const DirectoryWatchedEventExisting = 1
+pkg syscall/zx/io2, const DirectoryWatchedEventExisting ideal-int
+pkg syscall/zx/io2, const DirectoryWatchedEventIdle = 2
+pkg syscall/zx/io2, const DirectoryWatchedEventIdle ideal-int
+pkg syscall/zx/io2, const DirectoryWatchedEventRemoved = 4
+pkg syscall/zx/io2, const DirectoryWatchedEventRemoved ideal-int
+pkg syscall/zx/io2, const DirectoryWatchedEvent_unknownData = 0
+pkg syscall/zx/io2, const DirectoryWatchedEvent_unknownData ideal-int
+pkg syscall/zx/io2, const DirectoryWatcherGetNextOrdinal = 8421233887539678071
+pkg syscall/zx/io2, const DirectoryWatcherGetNextOrdinal uint64
+pkg syscall/zx/io2, const FileAdvisoryLockOrdinal = 7158728121514993402
+pkg syscall/zx/io2, const FileAdvisoryLockOrdinal uint64
+pkg syscall/zx/io2, const FileCloseOrdinal = 3309063910701555048
+pkg syscall/zx/io2, const FileCloseOrdinal uint64
+pkg syscall/zx/io2, const FileDescribeOrdinal = 5380773581678861359
+pkg syscall/zx/io2, const FileDescribeOrdinal uint64
+pkg syscall/zx/io2, const FileGetAttributesOrdinal = 7448424316484899300
+pkg syscall/zx/io2, const FileGetAttributesOrdinal uint64
+pkg syscall/zx/io2, const FileGetMemRangeOrdinal = 6017980577408079531
+pkg syscall/zx/io2, const FileGetMemRangeOrdinal uint64
+pkg syscall/zx/io2, const FileGetMemRangeResultErr = 2
+pkg syscall/zx/io2, const FileGetMemRangeResultErr ideal-int
+pkg syscall/zx/io2, const FileGetMemRangeResultResponse = 1
+pkg syscall/zx/io2, const FileGetMemRangeResultResponse ideal-int
+pkg syscall/zx/io2, const FileGetTokenOrdinal = 5704694899098900708
+pkg syscall/zx/io2, const FileGetTokenOrdinal uint64
+pkg syscall/zx/io2, const FileOnConnectionInfoOrdinal = 7365633083752227895
+pkg syscall/zx/io2, const FileOnConnectionInfoOrdinal uint64
+pkg syscall/zx/io2, const FileReadAtOrdinal = 8595287894587635882
+pkg syscall/zx/io2, const FileReadAtOrdinal uint64
+pkg syscall/zx/io2, const FileReadAtResultErr = 2
+pkg syscall/zx/io2, const FileReadAtResultErr ideal-int
+pkg syscall/zx/io2, const FileReadAtResultResponse = 1
+pkg syscall/zx/io2, const FileReadAtResultResponse ideal-int
+pkg syscall/zx/io2, const FileReadOrdinal = 7687841281776557936
+pkg syscall/zx/io2, const FileReadOrdinal uint64
+pkg syscall/zx/io2, const FileReadResultErr = 2
+pkg syscall/zx/io2, const FileReadResultErr ideal-int
+pkg syscall/zx/io2, const FileReadResultResponse = 1
+pkg syscall/zx/io2, const FileReadResultResponse ideal-int
+pkg syscall/zx/io2, const FileReopenOrdinal = 8365171012830086815
+pkg syscall/zx/io2, const FileReopenOrdinal uint64
+pkg syscall/zx/io2, const FileResizeOrdinal = 6334691519906097692
+pkg syscall/zx/io2, const FileResizeOrdinal uint64
+pkg syscall/zx/io2, const FileResizeResultErr = 2
+pkg syscall/zx/io2, const FileResizeResultErr ideal-int
+pkg syscall/zx/io2, const FileResizeResultResponse = 1
+pkg syscall/zx/io2, const FileResizeResultResponse ideal-int
+pkg syscall/zx/io2, const FileSeekOrdinal = 7842946169382958670
+pkg syscall/zx/io2, const FileSeekOrdinal uint64
+pkg syscall/zx/io2, const FileSeekResultErr = 2
+pkg syscall/zx/io2, const FileSeekResultErr ideal-int
+pkg syscall/zx/io2, const FileSeekResultResponse = 1
+pkg syscall/zx/io2, const FileSeekResultResponse ideal-int
+pkg syscall/zx/io2, const FileSignalReadable = 16777216
+pkg syscall/zx/io2, const FileSignalReadable FileSignal
+pkg syscall/zx/io2, const FileSignalWritable = 33554432
+pkg syscall/zx/io2, const FileSignalWritable FileSignal
+pkg syscall/zx/io2, const FileSignal_Mask = 50331648
+pkg syscall/zx/io2, const FileSignal_Mask FileSignal
+pkg syscall/zx/io2, const FileSyncOrdinal = 775649110452626349
+pkg syscall/zx/io2, const FileSyncOrdinal uint64
+pkg syscall/zx/io2, const FileUpdateAttributesOrdinal = 9032487194756522421
+pkg syscall/zx/io2, const FileUpdateAttributesOrdinal uint64
+pkg syscall/zx/io2, const FileWriteAtOrdinal = 8875177937047458450
+pkg syscall/zx/io2, const FileWriteAtOrdinal uint64
+pkg syscall/zx/io2, const FileWriteAtResultErr = 2
+pkg syscall/zx/io2, const FileWriteAtResultErr ideal-int
+pkg syscall/zx/io2, const FileWriteAtResultResponse = 1
+pkg syscall/zx/io2, const FileWriteAtResultResponse ideal-int
+pkg syscall/zx/io2, const FileWriteOrdinal = 1695376302891228673
+pkg syscall/zx/io2, const FileWriteOrdinal uint64
+pkg syscall/zx/io2, const FileWriteResultErr = 2
+pkg syscall/zx/io2, const FileWriteResultErr ideal-int
+pkg syscall/zx/io2, const FileWriteResultResponse = 1
+pkg syscall/zx/io2, const FileWriteResultResponse ideal-int
+pkg syscall/zx/io2, const MaxDirectoryBatchSize = 8192
+pkg syscall/zx/io2, const MaxDirectoryBatchSize uint64
+pkg syscall/zx/io2, const MaxNameLength = 255
+pkg syscall/zx/io2, const MaxNameLength uint64
+pkg syscall/zx/io2, const MaxPathLength = 4095
+pkg syscall/zx/io2, const MaxPathLength uint64
+pkg syscall/zx/io2, const MaxTransferSize = 8192
+pkg syscall/zx/io2, const MaxTransferSize uint64
+pkg syscall/zx/io2, const MemoryCloseOrdinal = 3309063910701555048
+pkg syscall/zx/io2, const MemoryCloseOrdinal uint64
+pkg syscall/zx/io2, const MemoryDescribeOrdinal = 5380773581678861359
+pkg syscall/zx/io2, const MemoryDescribeOrdinal uint64
+pkg syscall/zx/io2, const MemoryGetAttributesOrdinal = 7448424316484899300
+pkg syscall/zx/io2, const MemoryGetAttributesOrdinal uint64
+pkg syscall/zx/io2, const MemoryGetTokenOrdinal = 5704694899098900708
+pkg syscall/zx/io2, const MemoryGetTokenOrdinal uint64
+pkg syscall/zx/io2, const MemoryOnConnectionInfoOrdinal = 7365633083752227895
+pkg syscall/zx/io2, const MemoryOnConnectionInfoOrdinal uint64
+pkg syscall/zx/io2, const MemoryReopenOrdinal = 8365171012830086815
+pkg syscall/zx/io2, const MemoryReopenOrdinal uint64
+pkg syscall/zx/io2, const MemorySyncOrdinal = 775649110452626349
+pkg syscall/zx/io2, const MemorySyncOrdinal uint64
+pkg syscall/zx/io2, const MemoryUpdateAttributesOrdinal = 9032487194756522421
+pkg syscall/zx/io2, const MemoryUpdateAttributesOrdinal uint64
+pkg syscall/zx/io2, const NodeAttributesQueryAbilities = 2
+pkg syscall/zx/io2, const NodeAttributesQueryAbilities NodeAttributesQuery
+pkg syscall/zx/io2, const NodeAttributesQueryContentSize = 4
+pkg syscall/zx/io2, const NodeAttributesQueryContentSize NodeAttributesQuery
+pkg syscall/zx/io2, const NodeAttributesQueryCreationTime = 32
+pkg syscall/zx/io2, const NodeAttributesQueryCreationTime NodeAttributesQuery
+pkg syscall/zx/io2, const NodeAttributesQueryId = 128
+pkg syscall/zx/io2, const NodeAttributesQueryId NodeAttributesQuery
+pkg syscall/zx/io2, const NodeAttributesQueryLinkCount = 16
+pkg syscall/zx/io2, const NodeAttributesQueryLinkCount NodeAttributesQuery
+pkg syscall/zx/io2, const NodeAttributesQueryModificationTime = 64
+pkg syscall/zx/io2, const NodeAttributesQueryModificationTime NodeAttributesQuery
+pkg syscall/zx/io2, const NodeAttributesQueryProtocols = 1
+pkg syscall/zx/io2, const NodeAttributesQueryProtocols NodeAttributesQuery
+pkg syscall/zx/io2, const NodeAttributesQueryStorageSize = 8
+pkg syscall/zx/io2, const NodeAttributesQueryStorageSize NodeAttributesQuery
+pkg syscall/zx/io2, const NodeAttributesQuery_Mask = 255
+pkg syscall/zx/io2, const NodeAttributesQuery_Mask NodeAttributesQuery
+pkg syscall/zx/io2, const NodeCloseOrdinal = 3309063910701555048
+pkg syscall/zx/io2, const NodeCloseOrdinal uint64
+pkg syscall/zx/io2, const NodeDescribeOrdinal = 5380773581678861359
+pkg syscall/zx/io2, const NodeDescribeOrdinal uint64
+pkg syscall/zx/io2, const NodeGetAttributesOrdinal = 7448424316484899300
+pkg syscall/zx/io2, const NodeGetAttributesOrdinal uint64
+pkg syscall/zx/io2, const NodeGetAttributesResultErr = 2
+pkg syscall/zx/io2, const NodeGetAttributesResultErr ideal-int
+pkg syscall/zx/io2, const NodeGetAttributesResultResponse = 1
+pkg syscall/zx/io2, const NodeGetAttributesResultResponse ideal-int
+pkg syscall/zx/io2, const NodeGetTokenOrdinal = 5704694899098900708
+pkg syscall/zx/io2, const NodeGetTokenOrdinal uint64
+pkg syscall/zx/io2, const NodeGetTokenResultErr = 2
+pkg syscall/zx/io2, const NodeGetTokenResultErr ideal-int
+pkg syscall/zx/io2, const NodeGetTokenResultResponse = 1
+pkg syscall/zx/io2, const NodeGetTokenResultResponse ideal-int
+pkg syscall/zx/io2, const NodeOnConnectionInfoOrdinal = 7365633083752227895
+pkg syscall/zx/io2, const NodeOnConnectionInfoOrdinal uint64
+pkg syscall/zx/io2, const NodeProtocolsConnector = 1
+pkg syscall/zx/io2, const NodeProtocolsConnector NodeProtocols
+pkg syscall/zx/io2, const NodeProtocolsDebuglog = 64
+pkg syscall/zx/io2, const NodeProtocolsDebuglog NodeProtocols
+pkg syscall/zx/io2, const NodeProtocolsDevice = 268435456
+pkg syscall/zx/io2, const NodeProtocolsDevice NodeProtocols
+pkg syscall/zx/io2, const NodeProtocolsDirectory = 2
+pkg syscall/zx/io2, const NodeProtocolsDirectory NodeProtocols
+pkg syscall/zx/io2, const NodeProtocolsFile = 4
+pkg syscall/zx/io2, const NodeProtocolsFile NodeProtocols
+pkg syscall/zx/io2, const NodeProtocolsMemory = 8
+pkg syscall/zx/io2, const NodeProtocolsMemory NodeProtocols
+pkg syscall/zx/io2, const NodeProtocolsPipe = 32
+pkg syscall/zx/io2, const NodeProtocolsPipe NodeProtocols
+pkg syscall/zx/io2, const NodeProtocolsPosixSocket = 16
+pkg syscall/zx/io2, const NodeProtocolsPosixSocket NodeProtocols
+pkg syscall/zx/io2, const NodeProtocolsTty = 536870912
+pkg syscall/zx/io2, const NodeProtocolsTty NodeProtocols
+pkg syscall/zx/io2, const NodeProtocols_Mask = 805306495
+pkg syscall/zx/io2, const NodeProtocols_Mask NodeProtocols
+pkg syscall/zx/io2, const NodeReopenOrdinal = 8365171012830086815
+pkg syscall/zx/io2, const NodeReopenOrdinal uint64
+pkg syscall/zx/io2, const NodeSyncOrdinal = 775649110452626349
+pkg syscall/zx/io2, const NodeSyncOrdinal uint64
+pkg syscall/zx/io2, const NodeSyncResultErr = 2
+pkg syscall/zx/io2, const NodeSyncResultErr ideal-int
+pkg syscall/zx/io2, const NodeSyncResultResponse = 1
+pkg syscall/zx/io2, const NodeSyncResultResponse ideal-int
+pkg syscall/zx/io2, const NodeUpdateAttributesOrdinal = 9032487194756522421
+pkg syscall/zx/io2, const NodeUpdateAttributesOrdinal uint64
+pkg syscall/zx/io2, const NodeUpdateAttributesResultErr = 2
+pkg syscall/zx/io2, const NodeUpdateAttributesResultErr ideal-int
+pkg syscall/zx/io2, const NodeUpdateAttributesResultResponse = 1
+pkg syscall/zx/io2, const NodeUpdateAttributesResultResponse ideal-int
+pkg syscall/zx/io2, const OpenModeAlwaysCreate = 3
+pkg syscall/zx/io2, const OpenModeAlwaysCreate OpenMode
+pkg syscall/zx/io2, const OpenModeMaybeCreate = 2
+pkg syscall/zx/io2, const OpenModeMaybeCreate OpenMode
+pkg syscall/zx/io2, const OpenModeOpenExisting = 1
+pkg syscall/zx/io2, const OpenModeOpenExisting OpenMode
+pkg syscall/zx/io2, const OpenModeOpenMountPoint = 268435456
+pkg syscall/zx/io2, const OpenModeOpenMountPoint OpenMode
+pkg syscall/zx/io2, const OperationsAdmin = 72057594037927936
+pkg syscall/zx/io2, const OperationsAdmin Operations
+pkg syscall/zx/io2, const OperationsConnect = 1
+pkg syscall/zx/io2, const OperationsConnect Operations
+pkg syscall/zx/io2, const OperationsEnumerate = 64
+pkg syscall/zx/io2, const OperationsEnumerate Operations
+pkg syscall/zx/io2, const OperationsExecute = 8
+pkg syscall/zx/io2, const OperationsExecute Operations
+pkg syscall/zx/io2, const OperationsGetAttributes = 16
+pkg syscall/zx/io2, const OperationsGetAttributes Operations
+pkg syscall/zx/io2, const OperationsModifyDirectory = 256
+pkg syscall/zx/io2, const OperationsModifyDirectory Operations
+pkg syscall/zx/io2, const OperationsReadBytes = 2
+pkg syscall/zx/io2, const OperationsReadBytes Operations
+pkg syscall/zx/io2, const OperationsTraverse = 128
+pkg syscall/zx/io2, const OperationsTraverse Operations
+pkg syscall/zx/io2, const OperationsUpdateAttributes = 32
+pkg syscall/zx/io2, const OperationsUpdateAttributes Operations
+pkg syscall/zx/io2, const OperationsWriteBytes = 4
+pkg syscall/zx/io2, const OperationsWriteBytes Operations
+pkg syscall/zx/io2, const Operations_Mask = 72057594037928447
+pkg syscall/zx/io2, const Operations_Mask Operations
+pkg syscall/zx/io2, const PipeCloseOrdinal = 3309063910701555048
+pkg syscall/zx/io2, const PipeCloseOrdinal uint64
+pkg syscall/zx/io2, const PipeDescribeOrdinal = 5380773581678861359
+pkg syscall/zx/io2, const PipeDescribeOrdinal uint64
+pkg syscall/zx/io2, const PipeGetAttributesOrdinal = 7448424316484899300
+pkg syscall/zx/io2, const PipeGetAttributesOrdinal uint64
+pkg syscall/zx/io2, const PipeGetTokenOrdinal = 5704694899098900708
+pkg syscall/zx/io2, const PipeGetTokenOrdinal uint64
+pkg syscall/zx/io2, const PipeOnConnectionInfoOrdinal = 7365633083752227895
+pkg syscall/zx/io2, const PipeOnConnectionInfoOrdinal uint64
+pkg syscall/zx/io2, const PipeReopenOrdinal = 8365171012830086815
+pkg syscall/zx/io2, const PipeReopenOrdinal uint64
+pkg syscall/zx/io2, const PipeSyncOrdinal = 775649110452626349
+pkg syscall/zx/io2, const PipeSyncOrdinal uint64
+pkg syscall/zx/io2, const PipeUpdateAttributesOrdinal = 9032487194756522421
+pkg syscall/zx/io2, const PipeUpdateAttributesOrdinal uint64
+pkg syscall/zx/io2, const RStarDir = 211
+pkg syscall/zx/io2, const RStarDir uint64
+pkg syscall/zx/io2, const RepresentationConnector = 1
+pkg syscall/zx/io2, const RepresentationConnector ideal-int
+pkg syscall/zx/io2, const RepresentationDebuglog = 7
+pkg syscall/zx/io2, const RepresentationDebuglog ideal-int
+pkg syscall/zx/io2, const RepresentationDevice = 8
+pkg syscall/zx/io2, const RepresentationDevice ideal-int
+pkg syscall/zx/io2, const RepresentationDirectory = 2
+pkg syscall/zx/io2, const RepresentationDirectory ideal-int
+pkg syscall/zx/io2, const RepresentationFile = 3
+pkg syscall/zx/io2, const RepresentationFile ideal-int
+pkg syscall/zx/io2, const RepresentationMemory = 4
+pkg syscall/zx/io2, const RepresentationMemory ideal-int
+pkg syscall/zx/io2, const RepresentationPipe = 6
+pkg syscall/zx/io2, const RepresentationPipe ideal-int
+pkg syscall/zx/io2, const RepresentationPosixSocket = 5
+pkg syscall/zx/io2, const RepresentationPosixSocket ideal-int
+pkg syscall/zx/io2, const RepresentationTty = 9
+pkg syscall/zx/io2, const RepresentationTty ideal-int
+pkg syscall/zx/io2, const Representation_unknownData = 0
+pkg syscall/zx/io2, const Representation_unknownData ideal-int
+pkg syscall/zx/io2, const RightsResolutionMaximize = 1
+pkg syscall/zx/io2, const RightsResolutionMaximize RightsResolution
+pkg syscall/zx/io2, const RightsResolutionPosix = 2
+pkg syscall/zx/io2, const RightsResolutionPosix RightsResolution
+pkg syscall/zx/io2, const RwStarDir = 503
+pkg syscall/zx/io2, const RwStarDir uint64
+pkg syscall/zx/io2, const RxStarDir = 219
+pkg syscall/zx/io2, const RxStarDir uint64
+pkg syscall/zx/io2, const SeekOriginCurrent = 1
+pkg syscall/zx/io2, const SeekOriginCurrent SeekOrigin
+pkg syscall/zx/io2, const SeekOriginEnd = 2
+pkg syscall/zx/io2, const SeekOriginEnd SeekOrigin
+pkg syscall/zx/io2, const SeekOriginStart = 0
+pkg syscall/zx/io2, const SeekOriginStart SeekOrigin
+pkg syscall/zx/io2, const VmoFlagsExecute = 4
+pkg syscall/zx/io2, const VmoFlagsExecute VmoFlags
+pkg syscall/zx/io2, const VmoFlagsPrivateClone = 65536
+pkg syscall/zx/io2, const VmoFlagsPrivateClone VmoFlags
+pkg syscall/zx/io2, const VmoFlagsRead = 1
+pkg syscall/zx/io2, const VmoFlagsRead VmoFlags
+pkg syscall/zx/io2, const VmoFlagsSharedBuffer = 131072
+pkg syscall/zx/io2, const VmoFlagsSharedBuffer VmoFlags
+pkg syscall/zx/io2, const VmoFlagsWrite = 2
+pkg syscall/zx/io2, const VmoFlagsWrite VmoFlags
+pkg syscall/zx/io2, const VmoFlags_Mask = 196615
+pkg syscall/zx/io2, const VmoFlags_Mask VmoFlags
+pkg syscall/zx/io2, const WStarDir = 485
+pkg syscall/zx/io2, const WStarDir uint64
+pkg syscall/zx/io2, const XStarDir = 201
+pkg syscall/zx/io2, const XStarDir uint64
+pkg syscall/zx/io2, func AdvisoryLockingAdvisoryLockResultWithErr(int32) AdvisoryLockingAdvisoryLockResult
+pkg syscall/zx/io2, func AdvisoryLockingAdvisoryLockResultWithResponse(AdvisoryLockingAdvisoryLockResponse) AdvisoryLockingAdvisoryLockResult
+pkg syscall/zx/io2, func DirectoryIteratorGetNextResultWithErr(int32) DirectoryIteratorGetNextResult
+pkg syscall/zx/io2, func DirectoryIteratorGetNextResultWithResponse(DirectoryIteratorGetNextResponse) DirectoryIteratorGetNextResult
+pkg syscall/zx/io2, func DirectoryLinkResultWithErr(int32) DirectoryLinkResult
+pkg syscall/zx/io2, func DirectoryLinkResultWithResponse(DirectoryLinkResponse) DirectoryLinkResult
+pkg syscall/zx/io2, func DirectoryRenameResultWithErr(int32) DirectoryRenameResult
+pkg syscall/zx/io2, func DirectoryRenameResultWithResponse(DirectoryRenameResponse) DirectoryRenameResult
+pkg syscall/zx/io2, func DirectoryUnlinkResultWithErr(int32) DirectoryUnlinkResult
+pkg syscall/zx/io2, func DirectoryUnlinkResultWithResponse(DirectoryUnlinkResponse) DirectoryUnlinkResult
+pkg syscall/zx/io2, func DirectoryWatchedEventWithAdded(DirectoryEntry) DirectoryWatchedEvent
+pkg syscall/zx/io2, func DirectoryWatchedEventWithExisting(DirectoryEntry) DirectoryWatchedEvent
+pkg syscall/zx/io2, func DirectoryWatchedEventWithIdle(IdleEvent) DirectoryWatchedEvent
+pkg syscall/zx/io2, func DirectoryWatchedEventWithRemoved(string) DirectoryWatchedEvent
+pkg syscall/zx/io2, func FileGetMemRangeResultWithErr(int32) FileGetMemRangeResult
+pkg syscall/zx/io2, func FileGetMemRangeResultWithResponse(FileGetMemRangeResponse) FileGetMemRangeResult
+pkg syscall/zx/io2, func FileReadAtResultWithErr(int32) FileReadAtResult
+pkg syscall/zx/io2, func FileReadAtResultWithResponse(FileReadAtResponse) FileReadAtResult
+pkg syscall/zx/io2, func FileReadResultWithErr(int32) FileReadResult
+pkg syscall/zx/io2, func FileReadResultWithResponse(FileReadResponse) FileReadResult
+pkg syscall/zx/io2, func FileResizeResultWithErr(int32) FileResizeResult
+pkg syscall/zx/io2, func FileResizeResultWithResponse(FileResizeResponse) FileResizeResult
+pkg syscall/zx/io2, func FileSeekResultWithErr(int32) FileSeekResult
+pkg syscall/zx/io2, func FileSeekResultWithResponse(FileSeekResponse) FileSeekResult
+pkg syscall/zx/io2, func FileWriteAtResultWithErr(int32) FileWriteAtResult
+pkg syscall/zx/io2, func FileWriteAtResultWithResponse(FileWriteAtResponse) FileWriteAtResult
+pkg syscall/zx/io2, func FileWriteResultWithErr(int32) FileWriteResult
+pkg syscall/zx/io2, func FileWriteResultWithResponse(FileWriteResponse) FileWriteResult
+pkg syscall/zx/io2, func NewAdvisoryLockingWithCtxInterfaceRequest() (AdvisoryLockingWithCtxInterfaceRequest, *AdvisoryLockingWithCtxInterface, error)
+pkg syscall/zx/io2, func NewDebuglogWithCtxInterfaceRequest() (DebuglogWithCtxInterfaceRequest, *DebuglogWithCtxInterface, error)
+pkg syscall/zx/io2, func NewDirectoryIteratorWithCtxInterfaceRequest() (DirectoryIteratorWithCtxInterfaceRequest, *DirectoryIteratorWithCtxInterface, error)
+pkg syscall/zx/io2, func NewDirectoryWatcherWithCtxInterfaceRequest() (DirectoryWatcherWithCtxInterfaceRequest, *DirectoryWatcherWithCtxInterface, error)
+pkg syscall/zx/io2, func NewDirectoryWithCtxInterfaceRequest() (DirectoryWithCtxInterfaceRequest, *DirectoryWithCtxInterface, error)
+pkg syscall/zx/io2, func NewFileWithCtxInterfaceRequest() (FileWithCtxInterfaceRequest, *FileWithCtxInterface, error)
+pkg syscall/zx/io2, func NewMemoryWithCtxInterfaceRequest() (MemoryWithCtxInterfaceRequest, *MemoryWithCtxInterface, error)
+pkg syscall/zx/io2, func NewNodeWithCtxInterfaceRequest() (NodeWithCtxInterfaceRequest, *NodeWithCtxInterface, error)
+pkg syscall/zx/io2, func NewPipeWithCtxInterfaceRequest() (PipeWithCtxInterfaceRequest, *PipeWithCtxInterface, error)
+pkg syscall/zx/io2, func NodeGetAttributesResultWithErr(int32) NodeGetAttributesResult
+pkg syscall/zx/io2, func NodeGetAttributesResultWithResponse(NodeGetAttributesResponse) NodeGetAttributesResult
+pkg syscall/zx/io2, func NodeGetTokenResultWithErr(int32) NodeGetTokenResult
+pkg syscall/zx/io2, func NodeGetTokenResultWithResponse(NodeGetTokenResponse) NodeGetTokenResult
+pkg syscall/zx/io2, func NodeSyncResultWithErr(int32) NodeSyncResult
+pkg syscall/zx/io2, func NodeSyncResultWithResponse(NodeSyncResponse) NodeSyncResult
+pkg syscall/zx/io2, func NodeUpdateAttributesResultWithErr(int32) NodeUpdateAttributesResult
+pkg syscall/zx/io2, func NodeUpdateAttributesResultWithResponse(NodeUpdateAttributesResponse) NodeUpdateAttributesResult
+pkg syscall/zx/io2, func RepresentationWithConnector(ConnectorInfo) Representation
+pkg syscall/zx/io2, func RepresentationWithDebuglog(DebuglogInfo) Representation
+pkg syscall/zx/io2, func RepresentationWithDevice(DeviceInfo) Representation
+pkg syscall/zx/io2, func RepresentationWithDirectory(DirectoryInfo) Representation
+pkg syscall/zx/io2, func RepresentationWithFile(FileInfo) Representation
+pkg syscall/zx/io2, func RepresentationWithMemory(MemoryInfo) Representation
+pkg syscall/zx/io2, func RepresentationWithPipe(PipeInfo) Representation
+pkg syscall/zx/io2, func RepresentationWithPosixSocket(PosixSocketInfo) Representation
+pkg syscall/zx/io2, func RepresentationWithTty(TtyInfo) Representation
+pkg syscall/zx/io2, method (*AdvisoryLockRange) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) ClearRange()
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) ClearType()
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) ClearWait()
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) GetRange() AdvisoryLockRange
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) GetRangeWithDefault(AdvisoryLockRange) AdvisoryLockRange
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) GetType() AdvisoryLockType
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) GetTypeWithDefault(AdvisoryLockType) AdvisoryLockType
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) GetWait() bool
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) GetWaitWithDefault(bool) bool
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) HasRange() bool
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) HasType() bool
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) HasUnknownData() bool
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) HasWait() bool
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) SetRange(AdvisoryLockRange)
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) SetType(AdvisoryLockType)
+pkg syscall/zx/io2, method (*AdvisoryLockRequest) SetWait(bool)
+pkg syscall/zx/io2, method (*AdvisoryLockingAdvisoryLockResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*AdvisoryLockingAdvisoryLockResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*AdvisoryLockingAdvisoryLockResult) SetErr(int32)
+pkg syscall/zx/io2, method (*AdvisoryLockingAdvisoryLockResult) SetResponse(AdvisoryLockingAdvisoryLockResponse)
+pkg syscall/zx/io2, method (*AdvisoryLockingAdvisoryLockResult) Which() I_advisoryLockingAdvisoryLockResultTag
+pkg syscall/zx/io2, method (*AdvisoryLockingEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*AdvisoryLockingWithCtxInterface) AdvisoryLock(context.Context, AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error)
+pkg syscall/zx/io2, method (*AdvisoryLockingWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*AdvisoryLockingWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*AdvisoryLockingWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io2, method (*AdvisoryLockingWithCtxTransitionalBase) AdvisoryLock(context.Context, AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error)
+pkg syscall/zx/io2, method (*ConnectionInfo) ClearAvailableOperations()
+pkg syscall/zx/io2, method (*ConnectionInfo) ClearRepresentation()
+pkg syscall/zx/io2, method (*ConnectionInfo) ClearRights()
+pkg syscall/zx/io2, method (*ConnectionInfo) GetAvailableOperations() Operations
+pkg syscall/zx/io2, method (*ConnectionInfo) GetAvailableOperationsWithDefault(Operations) Operations
+pkg syscall/zx/io2, method (*ConnectionInfo) GetRepresentation() Representation
+pkg syscall/zx/io2, method (*ConnectionInfo) GetRepresentationWithDefault(Representation) Representation
+pkg syscall/zx/io2, method (*ConnectionInfo) GetRights() Operations
+pkg syscall/zx/io2, method (*ConnectionInfo) GetRightsWithDefault(Operations) Operations
+pkg syscall/zx/io2, method (*ConnectionInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*ConnectionInfo) HasAvailableOperations() bool
+pkg syscall/zx/io2, method (*ConnectionInfo) HasRepresentation() bool
+pkg syscall/zx/io2, method (*ConnectionInfo) HasRights() bool
+pkg syscall/zx/io2, method (*ConnectionInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*ConnectionInfo) SetAvailableOperations(Operations)
+pkg syscall/zx/io2, method (*ConnectionInfo) SetRepresentation(Representation)
+pkg syscall/zx/io2, method (*ConnectionInfo) SetRights(Operations)
+pkg syscall/zx/io2, method (*ConnectionOptions) ClearFlags()
+pkg syscall/zx/io2, method (*ConnectionOptions) ClearProtocols()
+pkg syscall/zx/io2, method (*ConnectionOptions) ClearRightsRequest()
+pkg syscall/zx/io2, method (*ConnectionOptions) GetFlags() ConnectionFlags
+pkg syscall/zx/io2, method (*ConnectionOptions) GetFlagsWithDefault(ConnectionFlags) ConnectionFlags
+pkg syscall/zx/io2, method (*ConnectionOptions) GetProtocols() NodeProtocols
+pkg syscall/zx/io2, method (*ConnectionOptions) GetProtocolsWithDefault(NodeProtocols) NodeProtocols
+pkg syscall/zx/io2, method (*ConnectionOptions) GetRightsRequest() RightsRequest
+pkg syscall/zx/io2, method (*ConnectionOptions) GetRightsRequestWithDefault(RightsRequest) RightsRequest
+pkg syscall/zx/io2, method (*ConnectionOptions) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*ConnectionOptions) HasFlags() bool
+pkg syscall/zx/io2, method (*ConnectionOptions) HasProtocols() bool
+pkg syscall/zx/io2, method (*ConnectionOptions) HasRightsRequest() bool
+pkg syscall/zx/io2, method (*ConnectionOptions) HasUnknownData() bool
+pkg syscall/zx/io2, method (*ConnectionOptions) SetFlags(ConnectionFlags)
+pkg syscall/zx/io2, method (*ConnectionOptions) SetProtocols(NodeProtocols)
+pkg syscall/zx/io2, method (*ConnectionOptions) SetRightsRequest(RightsRequest)
+pkg syscall/zx/io2, method (*ConnectorInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*ConnectorInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*DebuglogEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DebuglogEventProxy) OnConnectionInfo(ConnectionInfo) error
+pkg syscall/zx/io2, method (*DebuglogInfo) ClearDebuglog()
+pkg syscall/zx/io2, method (*DebuglogInfo) GetDebuglog() zx.Log
+pkg syscall/zx/io2, method (*DebuglogInfo) GetDebuglogWithDefault(zx.Log) zx.Log
+pkg syscall/zx/io2, method (*DebuglogInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*DebuglogInfo) HasDebuglog() bool
+pkg syscall/zx/io2, method (*DebuglogInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*DebuglogInfo) SetDebuglog(zx.Log)
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterface) Close(context.Context) error
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterface) Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterface) ExpectOnConnectionInfo(context.Context) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterface) GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterface) GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterface) Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterface) Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterface) UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, method (*DebuglogWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DebuglogWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io2, method (*DeviceInfo) ClearEvent()
+pkg syscall/zx/io2, method (*DeviceInfo) GetEvent() zx.Handle
+pkg syscall/zx/io2, method (*DeviceInfo) GetEventWithDefault(zx.Handle) zx.Handle
+pkg syscall/zx/io2, method (*DeviceInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*DeviceInfo) HasEvent() bool
+pkg syscall/zx/io2, method (*DeviceInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*DeviceInfo) SetEvent(zx.Handle)
+pkg syscall/zx/io2, method (*DirectoryEntry) ClearAbilities()
+pkg syscall/zx/io2, method (*DirectoryEntry) ClearId()
+pkg syscall/zx/io2, method (*DirectoryEntry) ClearName()
+pkg syscall/zx/io2, method (*DirectoryEntry) ClearProtocols()
+pkg syscall/zx/io2, method (*DirectoryEntry) GetAbilities() Operations
+pkg syscall/zx/io2, method (*DirectoryEntry) GetAbilitiesWithDefault(Operations) Operations
+pkg syscall/zx/io2, method (*DirectoryEntry) GetId() uint64
+pkg syscall/zx/io2, method (*DirectoryEntry) GetIdWithDefault(uint64) uint64
+pkg syscall/zx/io2, method (*DirectoryEntry) GetName() string
+pkg syscall/zx/io2, method (*DirectoryEntry) GetNameWithDefault(string) string
+pkg syscall/zx/io2, method (*DirectoryEntry) GetProtocols() NodeProtocols
+pkg syscall/zx/io2, method (*DirectoryEntry) GetProtocolsWithDefault(NodeProtocols) NodeProtocols
+pkg syscall/zx/io2, method (*DirectoryEntry) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*DirectoryEntry) HasAbilities() bool
+pkg syscall/zx/io2, method (*DirectoryEntry) HasId() bool
+pkg syscall/zx/io2, method (*DirectoryEntry) HasName() bool
+pkg syscall/zx/io2, method (*DirectoryEntry) HasProtocols() bool
+pkg syscall/zx/io2, method (*DirectoryEntry) HasUnknownData() bool
+pkg syscall/zx/io2, method (*DirectoryEntry) SetAbilities(Operations)
+pkg syscall/zx/io2, method (*DirectoryEntry) SetId(uint64)
+pkg syscall/zx/io2, method (*DirectoryEntry) SetName(string)
+pkg syscall/zx/io2, method (*DirectoryEntry) SetProtocols(NodeProtocols)
+pkg syscall/zx/io2, method (*DirectoryEnumerateOptions) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*DirectoryEnumerateOptions) HasUnknownData() bool
+pkg syscall/zx/io2, method (*DirectoryEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DirectoryEventProxy) OnConnectionInfo(ConnectionInfo) error
+pkg syscall/zx/io2, method (*DirectoryInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*DirectoryInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*DirectoryIteratorEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DirectoryIteratorGetNextResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*DirectoryIteratorGetNextResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*DirectoryIteratorGetNextResult) SetErr(int32)
+pkg syscall/zx/io2, method (*DirectoryIteratorGetNextResult) SetResponse(DirectoryIteratorGetNextResponse)
+pkg syscall/zx/io2, method (*DirectoryIteratorGetNextResult) Which() I_directoryIteratorGetNextResultTag
+pkg syscall/zx/io2, method (*DirectoryIteratorWithCtxInterface) GetNext(context.Context) (DirectoryIteratorGetNextResult, error)
+pkg syscall/zx/io2, method (*DirectoryIteratorWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DirectoryIteratorWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DirectoryIteratorWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io2, method (*DirectoryLinkResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*DirectoryLinkResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*DirectoryLinkResult) SetErr(int32)
+pkg syscall/zx/io2, method (*DirectoryLinkResult) SetResponse(DirectoryLinkResponse)
+pkg syscall/zx/io2, method (*DirectoryLinkResult) Which() I_directoryLinkResultTag
+pkg syscall/zx/io2, method (*DirectoryRenameResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*DirectoryRenameResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*DirectoryRenameResult) SetErr(int32)
+pkg syscall/zx/io2, method (*DirectoryRenameResult) SetResponse(DirectoryRenameResponse)
+pkg syscall/zx/io2, method (*DirectoryRenameResult) Which() I_directoryRenameResultTag
+pkg syscall/zx/io2, method (*DirectoryUnlinkResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*DirectoryUnlinkResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*DirectoryUnlinkResult) SetErr(int32)
+pkg syscall/zx/io2, method (*DirectoryUnlinkResult) SetResponse(DirectoryUnlinkResponse)
+pkg syscall/zx/io2, method (*DirectoryUnlinkResult) Which() I_directoryUnlinkResultTag
+pkg syscall/zx/io2, method (*DirectoryWatchOptions) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*DirectoryWatchOptions) HasUnknownData() bool
+pkg syscall/zx/io2, method (*DirectoryWatchedEvent) GetUnknownData() fidl.UnknownData
+pkg syscall/zx/io2, method (*DirectoryWatchedEvent) Ordinal() uint64
+pkg syscall/zx/io2, method (*DirectoryWatchedEvent) SetAdded(DirectoryEntry)
+pkg syscall/zx/io2, method (*DirectoryWatchedEvent) SetExisting(DirectoryEntry)
+pkg syscall/zx/io2, method (*DirectoryWatchedEvent) SetIdle(IdleEvent)
+pkg syscall/zx/io2, method (*DirectoryWatchedEvent) SetRemoved(string)
+pkg syscall/zx/io2, method (*DirectoryWatchedEvent) Which() I_directoryWatchedEventTag
+pkg syscall/zx/io2, method (*DirectoryWatcherEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DirectoryWatcherWithCtxInterface) GetNext(context.Context) ([]DirectoryWatchedEvent, error)
+pkg syscall/zx/io2, method (*DirectoryWatcherWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DirectoryWatcherWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DirectoryWatcherWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Close(context.Context) error
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Enumerate(context.Context, DirectoryEnumerateOptions, DirectoryIteratorWithCtxInterfaceRequest) error
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) ExpectOnConnectionInfo(context.Context) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Link(context.Context, string, zx.Event, string) (DirectoryLinkResult, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Open(context.Context, string, OpenMode, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Rename(context.Context, string, zx.Event, string) (DirectoryRenameResult, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Unlink(context.Context, string) (DirectoryUnlinkResult, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterface) Watch(context.Context, DirectoryWatchMask, DirectoryWatchOptions, DirectoryWatcherWithCtxInterfaceRequest) error
+pkg syscall/zx/io2, method (*DirectoryWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*DirectoryWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io2, method (*FileEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*FileEventProxy) OnConnectionInfo(ConnectionInfo) error
+pkg syscall/zx/io2, method (*FileGetMemRangeResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*FileGetMemRangeResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*FileGetMemRangeResult) SetErr(int32)
+pkg syscall/zx/io2, method (*FileGetMemRangeResult) SetResponse(FileGetMemRangeResponse)
+pkg syscall/zx/io2, method (*FileGetMemRangeResult) Which() I_fileGetMemRangeResultTag
+pkg syscall/zx/io2, method (*FileInfo) ClearIsAppend()
+pkg syscall/zx/io2, method (*FileInfo) ClearObserver()
+pkg syscall/zx/io2, method (*FileInfo) ClearStream()
+pkg syscall/zx/io2, method (*FileInfo) GetIsAppend() bool
+pkg syscall/zx/io2, method (*FileInfo) GetIsAppendWithDefault(bool) bool
+pkg syscall/zx/io2, method (*FileInfo) GetObserver() zx.Event
+pkg syscall/zx/io2, method (*FileInfo) GetObserverWithDefault(zx.Event) zx.Event
+pkg syscall/zx/io2, method (*FileInfo) GetStream() zx.Handle
+pkg syscall/zx/io2, method (*FileInfo) GetStreamWithDefault(zx.Handle) zx.Handle
+pkg syscall/zx/io2, method (*FileInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*FileInfo) HasIsAppend() bool
+pkg syscall/zx/io2, method (*FileInfo) HasObserver() bool
+pkg syscall/zx/io2, method (*FileInfo) HasStream() bool
+pkg syscall/zx/io2, method (*FileInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*FileInfo) SetIsAppend(bool)
+pkg syscall/zx/io2, method (*FileInfo) SetObserver(zx.Event)
+pkg syscall/zx/io2, method (*FileInfo) SetStream(zx.Handle)
+pkg syscall/zx/io2, method (*FileReadAtResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*FileReadAtResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*FileReadAtResult) SetErr(int32)
+pkg syscall/zx/io2, method (*FileReadAtResult) SetResponse(FileReadAtResponse)
+pkg syscall/zx/io2, method (*FileReadAtResult) Which() I_fileReadAtResultTag
+pkg syscall/zx/io2, method (*FileReadResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*FileReadResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*FileReadResult) SetErr(int32)
+pkg syscall/zx/io2, method (*FileReadResult) SetResponse(FileReadResponse)
+pkg syscall/zx/io2, method (*FileReadResult) Which() I_fileReadResultTag
+pkg syscall/zx/io2, method (*FileResizeResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*FileResizeResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*FileResizeResult) SetErr(int32)
+pkg syscall/zx/io2, method (*FileResizeResult) SetResponse(FileResizeResponse)
+pkg syscall/zx/io2, method (*FileResizeResult) Which() I_fileResizeResultTag
+pkg syscall/zx/io2, method (*FileSeekResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*FileSeekResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*FileSeekResult) SetErr(int32)
+pkg syscall/zx/io2, method (*FileSeekResult) SetResponse(FileSeekResponse)
+pkg syscall/zx/io2, method (*FileSeekResult) Which() I_fileSeekResultTag
+pkg syscall/zx/io2, method (*FileWithCtxInterface) AdvisoryLock(context.Context, AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) Close(context.Context) error
+pkg syscall/zx/io2, method (*FileWithCtxInterface) Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) ExpectOnConnectionInfo(context.Context) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) GetMemRange(context.Context, VmoFlags) (FileGetMemRangeResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*FileWithCtxInterface) Read(context.Context, uint64) (FileReadResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) ReadAt(context.Context, uint64, uint64) (FileReadAtResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, method (*FileWithCtxInterface) Resize(context.Context, uint64) (FileResizeResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) Seek(context.Context, SeekOrigin, int64) (FileSeekResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) Write(context.Context, []uint8) (FileWriteResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterface) WriteAt(context.Context, []uint8, uint64) (FileWriteAtResult, error)
+pkg syscall/zx/io2, method (*FileWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*FileWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io2, method (*FileWithCtxTransitionalBase) AdvisoryLock(context.Context, AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error)
+pkg syscall/zx/io2, method (*FileWriteAtResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*FileWriteAtResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*FileWriteAtResult) SetErr(int32)
+pkg syscall/zx/io2, method (*FileWriteAtResult) SetResponse(FileWriteAtResponse)
+pkg syscall/zx/io2, method (*FileWriteAtResult) Which() I_fileWriteAtResultTag
+pkg syscall/zx/io2, method (*FileWriteResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*FileWriteResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*FileWriteResult) SetErr(int32)
+pkg syscall/zx/io2, method (*FileWriteResult) SetResponse(FileWriteResponse)
+pkg syscall/zx/io2, method (*FileWriteResult) Which() I_fileWriteResultTag
+pkg syscall/zx/io2, method (*IdleEvent) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*MemoryEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*MemoryEventProxy) OnConnectionInfo(ConnectionInfo) error
+pkg syscall/zx/io2, method (*MemoryInfo) ClearBuffer()
+pkg syscall/zx/io2, method (*MemoryInfo) GetBuffer() mem.Range
+pkg syscall/zx/io2, method (*MemoryInfo) GetBufferWithDefault(mem.Range) mem.Range
+pkg syscall/zx/io2, method (*MemoryInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*MemoryInfo) HasBuffer() bool
+pkg syscall/zx/io2, method (*MemoryInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*MemoryInfo) SetBuffer(mem.Range)
+pkg syscall/zx/io2, method (*MemoryWithCtxInterface) Close(context.Context) error
+pkg syscall/zx/io2, method (*MemoryWithCtxInterface) Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*MemoryWithCtxInterface) ExpectOnConnectionInfo(context.Context) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*MemoryWithCtxInterface) GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, method (*MemoryWithCtxInterface) GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, method (*MemoryWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*MemoryWithCtxInterface) Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, method (*MemoryWithCtxInterface) Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, method (*MemoryWithCtxInterface) UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, method (*MemoryWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*MemoryWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io2, method (*NodeAttributes) ClearAbilities()
+pkg syscall/zx/io2, method (*NodeAttributes) ClearContentSize()
+pkg syscall/zx/io2, method (*NodeAttributes) ClearCreationTime()
+pkg syscall/zx/io2, method (*NodeAttributes) ClearId()
+pkg syscall/zx/io2, method (*NodeAttributes) ClearLinkCount()
+pkg syscall/zx/io2, method (*NodeAttributes) ClearModificationTime()
+pkg syscall/zx/io2, method (*NodeAttributes) ClearProtocols()
+pkg syscall/zx/io2, method (*NodeAttributes) ClearStorageSize()
+pkg syscall/zx/io2, method (*NodeAttributes) GetAbilities() Operations
+pkg syscall/zx/io2, method (*NodeAttributes) GetAbilitiesWithDefault(Operations) Operations
+pkg syscall/zx/io2, method (*NodeAttributes) GetContentSize() uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetContentSizeWithDefault(uint64) uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetCreationTime() uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetCreationTimeWithDefault(uint64) uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetId() uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetIdWithDefault(uint64) uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetLinkCount() uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetLinkCountWithDefault(uint64) uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetModificationTime() uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetModificationTimeWithDefault(uint64) uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetProtocols() NodeProtocols
+pkg syscall/zx/io2, method (*NodeAttributes) GetProtocolsWithDefault(NodeProtocols) NodeProtocols
+pkg syscall/zx/io2, method (*NodeAttributes) GetStorageSize() uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetStorageSizeWithDefault(uint64) uint64
+pkg syscall/zx/io2, method (*NodeAttributes) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*NodeAttributes) HasAbilities() bool
+pkg syscall/zx/io2, method (*NodeAttributes) HasContentSize() bool
+pkg syscall/zx/io2, method (*NodeAttributes) HasCreationTime() bool
+pkg syscall/zx/io2, method (*NodeAttributes) HasId() bool
+pkg syscall/zx/io2, method (*NodeAttributes) HasLinkCount() bool
+pkg syscall/zx/io2, method (*NodeAttributes) HasModificationTime() bool
+pkg syscall/zx/io2, method (*NodeAttributes) HasProtocols() bool
+pkg syscall/zx/io2, method (*NodeAttributes) HasStorageSize() bool
+pkg syscall/zx/io2, method (*NodeAttributes) HasUnknownData() bool
+pkg syscall/zx/io2, method (*NodeAttributes) SetAbilities(Operations)
+pkg syscall/zx/io2, method (*NodeAttributes) SetContentSize(uint64)
+pkg syscall/zx/io2, method (*NodeAttributes) SetCreationTime(uint64)
+pkg syscall/zx/io2, method (*NodeAttributes) SetId(uint64)
+pkg syscall/zx/io2, method (*NodeAttributes) SetLinkCount(uint64)
+pkg syscall/zx/io2, method (*NodeAttributes) SetModificationTime(uint64)
+pkg syscall/zx/io2, method (*NodeAttributes) SetProtocols(NodeProtocols)
+pkg syscall/zx/io2, method (*NodeAttributes) SetStorageSize(uint64)
+pkg syscall/zx/io2, method (*NodeEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*NodeEventProxy) OnConnectionInfo(ConnectionInfo) error
+pkg syscall/zx/io2, method (*NodeGetAttributesResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*NodeGetAttributesResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*NodeGetAttributesResult) SetErr(int32)
+pkg syscall/zx/io2, method (*NodeGetAttributesResult) SetResponse(NodeGetAttributesResponse)
+pkg syscall/zx/io2, method (*NodeGetAttributesResult) Which() I_nodeGetAttributesResultTag
+pkg syscall/zx/io2, method (*NodeGetTokenResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*NodeGetTokenResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*NodeGetTokenResult) SetErr(int32)
+pkg syscall/zx/io2, method (*NodeGetTokenResult) SetResponse(NodeGetTokenResponse)
+pkg syscall/zx/io2, method (*NodeGetTokenResult) Which() I_nodeGetTokenResultTag
+pkg syscall/zx/io2, method (*NodeSyncResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*NodeSyncResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*NodeSyncResult) SetErr(int32)
+pkg syscall/zx/io2, method (*NodeSyncResult) SetResponse(NodeSyncResponse)
+pkg syscall/zx/io2, method (*NodeSyncResult) Which() I_nodeSyncResultTag
+pkg syscall/zx/io2, method (*NodeUpdateAttributesResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*NodeUpdateAttributesResult) Ordinal() uint64
+pkg syscall/zx/io2, method (*NodeUpdateAttributesResult) SetErr(int32)
+pkg syscall/zx/io2, method (*NodeUpdateAttributesResult) SetResponse(NodeUpdateAttributesResponse)
+pkg syscall/zx/io2, method (*NodeUpdateAttributesResult) Which() I_nodeUpdateAttributesResultTag
+pkg syscall/zx/io2, method (*NodeWithCtxInterface) Close(context.Context) error
+pkg syscall/zx/io2, method (*NodeWithCtxInterface) Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*NodeWithCtxInterface) ExpectOnConnectionInfo(context.Context) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*NodeWithCtxInterface) GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, method (*NodeWithCtxInterface) GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, method (*NodeWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*NodeWithCtxInterface) Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, method (*NodeWithCtxInterface) Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, method (*NodeWithCtxInterface) UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, method (*NodeWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*NodeWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io2, method (*PipeEventProxy) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*PipeEventProxy) OnConnectionInfo(ConnectionInfo) error
+pkg syscall/zx/io2, method (*PipeInfo) ClearSocket()
+pkg syscall/zx/io2, method (*PipeInfo) GetSocket() zx.Socket
+pkg syscall/zx/io2, method (*PipeInfo) GetSocketWithDefault(zx.Socket) zx.Socket
+pkg syscall/zx/io2, method (*PipeInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*PipeInfo) HasSocket() bool
+pkg syscall/zx/io2, method (*PipeInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*PipeInfo) SetSocket(zx.Socket)
+pkg syscall/zx/io2, method (*PipeWithCtxInterface) Close(context.Context) error
+pkg syscall/zx/io2, method (*PipeWithCtxInterface) Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*PipeWithCtxInterface) ExpectOnConnectionInfo(context.Context) (ConnectionInfo, error)
+pkg syscall/zx/io2, method (*PipeWithCtxInterface) GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, method (*PipeWithCtxInterface) GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, method (*PipeWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*PipeWithCtxInterface) Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, method (*PipeWithCtxInterface) Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, method (*PipeWithCtxInterface) UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, method (*PipeWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/io2, method (*PipeWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/io2, method (*PosixSocketInfo) ClearSocket()
+pkg syscall/zx/io2, method (*PosixSocketInfo) GetSocket() zx.Socket
+pkg syscall/zx/io2, method (*PosixSocketInfo) GetSocketWithDefault(zx.Socket) zx.Socket
+pkg syscall/zx/io2, method (*PosixSocketInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*PosixSocketInfo) HasSocket() bool
+pkg syscall/zx/io2, method (*PosixSocketInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*PosixSocketInfo) SetSocket(zx.Socket)
+pkg syscall/zx/io2, method (*Representation) GetUnknownData() fidl.UnknownData
+pkg syscall/zx/io2, method (*Representation) Ordinal() uint64
+pkg syscall/zx/io2, method (*Representation) SetConnector(ConnectorInfo)
+pkg syscall/zx/io2, method (*Representation) SetDebuglog(DebuglogInfo)
+pkg syscall/zx/io2, method (*Representation) SetDevice(DeviceInfo)
+pkg syscall/zx/io2, method (*Representation) SetDirectory(DirectoryInfo)
+pkg syscall/zx/io2, method (*Representation) SetFile(FileInfo)
+pkg syscall/zx/io2, method (*Representation) SetMemory(MemoryInfo)
+pkg syscall/zx/io2, method (*Representation) SetPipe(PipeInfo)
+pkg syscall/zx/io2, method (*Representation) SetPosixSocket(PosixSocketInfo)
+pkg syscall/zx/io2, method (*Representation) SetTty(TtyInfo)
+pkg syscall/zx/io2, method (*Representation) Which() I_representationTag
+pkg syscall/zx/io2, method (*RightsRequest) Marshaler() fidl.Marshaler
+pkg syscall/zx/io2, method (*TtyInfo) ClearEvent()
+pkg syscall/zx/io2, method (*TtyInfo) GetEvent() zx.Handle
+pkg syscall/zx/io2, method (*TtyInfo) GetEventWithDefault(zx.Handle) zx.Handle
+pkg syscall/zx/io2, method (*TtyInfo) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/io2, method (*TtyInfo) HasEvent() bool
+pkg syscall/zx/io2, method (*TtyInfo) HasUnknownData() bool
+pkg syscall/zx/io2, method (*TtyInfo) SetEvent(zx.Handle)
+pkg syscall/zx/io2, method (AdvisoryLockType) I_EnumIsStrict() bool
+pkg syscall/zx/io2, method (AdvisoryLockType) I_EnumValues() []AdvisoryLockType
+pkg syscall/zx/io2, method (AdvisoryLockType) IsUnknown() bool
+pkg syscall/zx/io2, method (AdvisoryLockType) String() string
+pkg syscall/zx/io2, method (ConnectionFlags) ClearBits(ConnectionFlags) ConnectionFlags
+pkg syscall/zx/io2, method (ConnectionFlags) GetUnknownBits() uint64
+pkg syscall/zx/io2, method (ConnectionFlags) HasBits(ConnectionFlags) bool
+pkg syscall/zx/io2, method (ConnectionFlags) HasUnknownBits() bool
+pkg syscall/zx/io2, method (ConnectionFlags) I_BitsIsStrict() bool
+pkg syscall/zx/io2, method (ConnectionFlags) I_BitsMask() ConnectionFlags
+pkg syscall/zx/io2, method (ConnectionFlags) InvertBits() ConnectionFlags
+pkg syscall/zx/io2, method (ConnectionFlags) String() string
+pkg syscall/zx/io2, method (ConnectionInfoQuery) ClearBits(ConnectionInfoQuery) ConnectionInfoQuery
+pkg syscall/zx/io2, method (ConnectionInfoQuery) GetUnknownBits() uint64
+pkg syscall/zx/io2, method (ConnectionInfoQuery) HasBits(ConnectionInfoQuery) bool
+pkg syscall/zx/io2, method (ConnectionInfoQuery) HasUnknownBits() bool
+pkg syscall/zx/io2, method (ConnectionInfoQuery) I_BitsIsStrict() bool
+pkg syscall/zx/io2, method (ConnectionInfoQuery) I_BitsMask() ConnectionInfoQuery
+pkg syscall/zx/io2, method (ConnectionInfoQuery) InvertBits() ConnectionInfoQuery
+pkg syscall/zx/io2, method (ConnectionInfoQuery) String() string
+pkg syscall/zx/io2, method (DeviceSignal) ClearBits(DeviceSignal) DeviceSignal
+pkg syscall/zx/io2, method (DeviceSignal) GetUnknownBits() uint64
+pkg syscall/zx/io2, method (DeviceSignal) HasBits(DeviceSignal) bool
+pkg syscall/zx/io2, method (DeviceSignal) HasUnknownBits() bool
+pkg syscall/zx/io2, method (DeviceSignal) I_BitsIsStrict() bool
+pkg syscall/zx/io2, method (DeviceSignal) I_BitsMask() DeviceSignal
+pkg syscall/zx/io2, method (DeviceSignal) InvertBits() DeviceSignal
+pkg syscall/zx/io2, method (DeviceSignal) String() string
+pkg syscall/zx/io2, method (DirectoryWatchMask) ClearBits(DirectoryWatchMask) DirectoryWatchMask
+pkg syscall/zx/io2, method (DirectoryWatchMask) GetUnknownBits() uint64
+pkg syscall/zx/io2, method (DirectoryWatchMask) HasBits(DirectoryWatchMask) bool
+pkg syscall/zx/io2, method (DirectoryWatchMask) HasUnknownBits() bool
+pkg syscall/zx/io2, method (DirectoryWatchMask) I_BitsIsStrict() bool
+pkg syscall/zx/io2, method (DirectoryWatchMask) I_BitsMask() DirectoryWatchMask
+pkg syscall/zx/io2, method (DirectoryWatchMask) InvertBits() DirectoryWatchMask
+pkg syscall/zx/io2, method (DirectoryWatchMask) String() string
+pkg syscall/zx/io2, method (FileSignal) ClearBits(FileSignal) FileSignal
+pkg syscall/zx/io2, method (FileSignal) GetUnknownBits() uint64
+pkg syscall/zx/io2, method (FileSignal) HasBits(FileSignal) bool
+pkg syscall/zx/io2, method (FileSignal) HasUnknownBits() bool
+pkg syscall/zx/io2, method (FileSignal) I_BitsIsStrict() bool
+pkg syscall/zx/io2, method (FileSignal) I_BitsMask() FileSignal
+pkg syscall/zx/io2, method (FileSignal) InvertBits() FileSignal
+pkg syscall/zx/io2, method (FileSignal) String() string
+pkg syscall/zx/io2, method (NodeAttributesQuery) ClearBits(NodeAttributesQuery) NodeAttributesQuery
+pkg syscall/zx/io2, method (NodeAttributesQuery) GetUnknownBits() uint64
+pkg syscall/zx/io2, method (NodeAttributesQuery) HasBits(NodeAttributesQuery) bool
+pkg syscall/zx/io2, method (NodeAttributesQuery) HasUnknownBits() bool
+pkg syscall/zx/io2, method (NodeAttributesQuery) I_BitsIsStrict() bool
+pkg syscall/zx/io2, method (NodeAttributesQuery) I_BitsMask() NodeAttributesQuery
+pkg syscall/zx/io2, method (NodeAttributesQuery) InvertBits() NodeAttributesQuery
+pkg syscall/zx/io2, method (NodeAttributesQuery) String() string
+pkg syscall/zx/io2, method (NodeProtocols) ClearBits(NodeProtocols) NodeProtocols
+pkg syscall/zx/io2, method (NodeProtocols) GetUnknownBits() uint64
+pkg syscall/zx/io2, method (NodeProtocols) HasBits(NodeProtocols) bool
+pkg syscall/zx/io2, method (NodeProtocols) HasUnknownBits() bool
+pkg syscall/zx/io2, method (NodeProtocols) I_BitsIsStrict() bool
+pkg syscall/zx/io2, method (NodeProtocols) I_BitsMask() NodeProtocols
+pkg syscall/zx/io2, method (NodeProtocols) InvertBits() NodeProtocols
+pkg syscall/zx/io2, method (NodeProtocols) String() string
+pkg syscall/zx/io2, method (OpenMode) I_EnumIsStrict() bool
+pkg syscall/zx/io2, method (OpenMode) I_EnumValues() []OpenMode
+pkg syscall/zx/io2, method (OpenMode) IsUnknown() bool
+pkg syscall/zx/io2, method (OpenMode) String() string
+pkg syscall/zx/io2, method (Operations) ClearBits(Operations) Operations
+pkg syscall/zx/io2, method (Operations) GetUnknownBits() uint64
+pkg syscall/zx/io2, method (Operations) HasBits(Operations) bool
+pkg syscall/zx/io2, method (Operations) HasUnknownBits() bool
+pkg syscall/zx/io2, method (Operations) I_BitsIsStrict() bool
+pkg syscall/zx/io2, method (Operations) I_BitsMask() Operations
+pkg syscall/zx/io2, method (Operations) InvertBits() Operations
+pkg syscall/zx/io2, method (Operations) String() string
+pkg syscall/zx/io2, method (RightsResolution) I_EnumIsStrict() bool
+pkg syscall/zx/io2, method (RightsResolution) I_EnumValues() []RightsResolution
+pkg syscall/zx/io2, method (RightsResolution) IsUnknown() bool
+pkg syscall/zx/io2, method (RightsResolution) String() string
+pkg syscall/zx/io2, method (SeekOrigin) I_EnumIsStrict() bool
+pkg syscall/zx/io2, method (SeekOrigin) I_EnumValues() []SeekOrigin
+pkg syscall/zx/io2, method (SeekOrigin) IsUnknown() bool
+pkg syscall/zx/io2, method (SeekOrigin) String() string
+pkg syscall/zx/io2, method (VmoFlags) ClearBits(VmoFlags) VmoFlags
+pkg syscall/zx/io2, method (VmoFlags) GetUnknownBits() uint64
+pkg syscall/zx/io2, method (VmoFlags) HasBits(VmoFlags) bool
+pkg syscall/zx/io2, method (VmoFlags) HasUnknownBits() bool
+pkg syscall/zx/io2, method (VmoFlags) I_BitsIsStrict() bool
+pkg syscall/zx/io2, method (VmoFlags) I_BitsMask() VmoFlags
+pkg syscall/zx/io2, method (VmoFlags) InvertBits() VmoFlags
+pkg syscall/zx/io2, method (VmoFlags) String() string
+pkg syscall/zx/io2, type AdvisoryLockRange struct
+pkg syscall/zx/io2, type AdvisoryLockRange struct, Length int64
+pkg syscall/zx/io2, type AdvisoryLockRange struct, Offset int64
+pkg syscall/zx/io2, type AdvisoryLockRange struct, Origin SeekOrigin
+pkg syscall/zx/io2, type AdvisoryLockRequest struct
+pkg syscall/zx/io2, type AdvisoryLockRequest struct, I_unknownData interface{}
+pkg syscall/zx/io2, type AdvisoryLockRequest struct, Range AdvisoryLockRange
+pkg syscall/zx/io2, type AdvisoryLockRequest struct, RangePresent bool
+pkg syscall/zx/io2, type AdvisoryLockRequest struct, Type AdvisoryLockType
+pkg syscall/zx/io2, type AdvisoryLockRequest struct, TypePresent bool
+pkg syscall/zx/io2, type AdvisoryLockRequest struct, Wait bool
+pkg syscall/zx/io2, type AdvisoryLockRequest struct, WaitPresent bool
+pkg syscall/zx/io2, type AdvisoryLockType uint32
+pkg syscall/zx/io2, type AdvisoryLockingAdvisoryLockResponse struct
+pkg syscall/zx/io2, type AdvisoryLockingAdvisoryLockResult struct
+pkg syscall/zx/io2, type AdvisoryLockingAdvisoryLockResult struct, Err int32
+pkg syscall/zx/io2, type AdvisoryLockingAdvisoryLockResult struct, Response AdvisoryLockingAdvisoryLockResponse
+pkg syscall/zx/io2, type AdvisoryLockingAdvisoryLockResult struct, embedded I_advisoryLockingAdvisoryLockResultTag
+pkg syscall/zx/io2, type AdvisoryLockingEventProxy struct
+pkg syscall/zx/io2, type AdvisoryLockingEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io2, type AdvisoryLockingWithCtx interface { AdvisoryLock }
+pkg syscall/zx/io2, type AdvisoryLockingWithCtx interface, AdvisoryLock(context.Context, AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error)
+pkg syscall/zx/io2, type AdvisoryLockingWithCtxInterface struct
+pkg syscall/zx/io2, type AdvisoryLockingWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io2, type AdvisoryLockingWithCtxInterfaceRequest struct
+pkg syscall/zx/io2, type AdvisoryLockingWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io2, type AdvisoryLockingWithCtxStub struct
+pkg syscall/zx/io2, type AdvisoryLockingWithCtxStub struct, Impl AdvisoryLockingWithCtx
+pkg syscall/zx/io2, type AdvisoryLockingWithCtxTransitionalBase struct
+pkg syscall/zx/io2, type ConnectionFlags uint64
+pkg syscall/zx/io2, type ConnectionInfo struct
+pkg syscall/zx/io2, type ConnectionInfo struct, AvailableOperations Operations
+pkg syscall/zx/io2, type ConnectionInfo struct, AvailableOperationsPresent bool
+pkg syscall/zx/io2, type ConnectionInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type ConnectionInfo struct, Representation Representation
+pkg syscall/zx/io2, type ConnectionInfo struct, RepresentationPresent bool
+pkg syscall/zx/io2, type ConnectionInfo struct, Rights Operations
+pkg syscall/zx/io2, type ConnectionInfo struct, RightsPresent bool
+pkg syscall/zx/io2, type ConnectionInfoQuery uint64
+pkg syscall/zx/io2, type ConnectionOptions struct
+pkg syscall/zx/io2, type ConnectionOptions struct, Flags ConnectionFlags
+pkg syscall/zx/io2, type ConnectionOptions struct, FlagsPresent bool
+pkg syscall/zx/io2, type ConnectionOptions struct, I_unknownData interface{}
+pkg syscall/zx/io2, type ConnectionOptions struct, Protocols NodeProtocols
+pkg syscall/zx/io2, type ConnectionOptions struct, ProtocolsPresent bool
+pkg syscall/zx/io2, type ConnectionOptions struct, RightsRequest RightsRequest
+pkg syscall/zx/io2, type ConnectionOptions struct, RightsRequestPresent bool
+pkg syscall/zx/io2, type ConnectorInfo struct
+pkg syscall/zx/io2, type ConnectorInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type DebuglogEventProxy struct
+pkg syscall/zx/io2, type DebuglogEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io2, type DebuglogInfo struct
+pkg syscall/zx/io2, type DebuglogInfo struct, Debuglog zx.Log
+pkg syscall/zx/io2, type DebuglogInfo struct, DebuglogPresent bool
+pkg syscall/zx/io2, type DebuglogInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type DebuglogWithCtx interface { Close, Describe, GetAttributes, GetToken, Reopen, Sync, UpdateAttributes }
+pkg syscall/zx/io2, type DebuglogWithCtx interface, Close(context.Context) error
+pkg syscall/zx/io2, type DebuglogWithCtx interface, Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, type DebuglogWithCtx interface, GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, type DebuglogWithCtx interface, GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, type DebuglogWithCtx interface, Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, type DebuglogWithCtx interface, Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, type DebuglogWithCtx interface, UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, type DebuglogWithCtxInterface struct
+pkg syscall/zx/io2, type DebuglogWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io2, type DebuglogWithCtxInterfaceRequest struct
+pkg syscall/zx/io2, type DebuglogWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io2, type DebuglogWithCtxStub struct
+pkg syscall/zx/io2, type DebuglogWithCtxStub struct, Impl DebuglogWithCtx
+pkg syscall/zx/io2, type DebuglogWithCtxTransitionalBase struct
+pkg syscall/zx/io2, type DeviceInfo struct
+pkg syscall/zx/io2, type DeviceInfo struct, Event zx.Handle
+pkg syscall/zx/io2, type DeviceInfo struct, EventPresent bool
+pkg syscall/zx/io2, type DeviceInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type DeviceSignal uint32
+pkg syscall/zx/io2, type DirectoryEntry struct
+pkg syscall/zx/io2, type DirectoryEntry struct, Abilities Operations
+pkg syscall/zx/io2, type DirectoryEntry struct, AbilitiesPresent bool
+pkg syscall/zx/io2, type DirectoryEntry struct, I_unknownData interface{}
+pkg syscall/zx/io2, type DirectoryEntry struct, Id uint64
+pkg syscall/zx/io2, type DirectoryEntry struct, IdPresent bool
+pkg syscall/zx/io2, type DirectoryEntry struct, Name string
+pkg syscall/zx/io2, type DirectoryEntry struct, NamePresent bool
+pkg syscall/zx/io2, type DirectoryEntry struct, Protocols NodeProtocols
+pkg syscall/zx/io2, type DirectoryEntry struct, ProtocolsPresent bool
+pkg syscall/zx/io2, type DirectoryEnumerateOptions struct
+pkg syscall/zx/io2, type DirectoryEnumerateOptions struct, I_unknownData interface{}
+pkg syscall/zx/io2, type DirectoryEventProxy struct
+pkg syscall/zx/io2, type DirectoryEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io2, type DirectoryInfo struct
+pkg syscall/zx/io2, type DirectoryInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type DirectoryIteratorEventProxy struct
+pkg syscall/zx/io2, type DirectoryIteratorEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io2, type DirectoryIteratorGetNextResponse struct
+pkg syscall/zx/io2, type DirectoryIteratorGetNextResponse struct, Entries []DirectoryEntry
+pkg syscall/zx/io2, type DirectoryIteratorGetNextResult struct
+pkg syscall/zx/io2, type DirectoryIteratorGetNextResult struct, Err int32
+pkg syscall/zx/io2, type DirectoryIteratorGetNextResult struct, Response DirectoryIteratorGetNextResponse
+pkg syscall/zx/io2, type DirectoryIteratorGetNextResult struct, embedded I_directoryIteratorGetNextResultTag
+pkg syscall/zx/io2, type DirectoryIteratorWithCtx interface { GetNext }
+pkg syscall/zx/io2, type DirectoryIteratorWithCtx interface, GetNext(context.Context) (DirectoryIteratorGetNextResult, error)
+pkg syscall/zx/io2, type DirectoryIteratorWithCtxInterface struct
+pkg syscall/zx/io2, type DirectoryIteratorWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io2, type DirectoryIteratorWithCtxInterfaceRequest struct
+pkg syscall/zx/io2, type DirectoryIteratorWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io2, type DirectoryIteratorWithCtxStub struct
+pkg syscall/zx/io2, type DirectoryIteratorWithCtxStub struct, Impl DirectoryIteratorWithCtx
+pkg syscall/zx/io2, type DirectoryIteratorWithCtxTransitionalBase struct
+pkg syscall/zx/io2, type DirectoryLinkResponse struct
+pkg syscall/zx/io2, type DirectoryLinkResult struct
+pkg syscall/zx/io2, type DirectoryLinkResult struct, Err int32
+pkg syscall/zx/io2, type DirectoryLinkResult struct, Response DirectoryLinkResponse
+pkg syscall/zx/io2, type DirectoryLinkResult struct, embedded I_directoryLinkResultTag
+pkg syscall/zx/io2, type DirectoryRenameResponse struct
+pkg syscall/zx/io2, type DirectoryRenameResult struct
+pkg syscall/zx/io2, type DirectoryRenameResult struct, Err int32
+pkg syscall/zx/io2, type DirectoryRenameResult struct, Response DirectoryRenameResponse
+pkg syscall/zx/io2, type DirectoryRenameResult struct, embedded I_directoryRenameResultTag
+pkg syscall/zx/io2, type DirectoryUnlinkResponse struct
+pkg syscall/zx/io2, type DirectoryUnlinkResult struct
+pkg syscall/zx/io2, type DirectoryUnlinkResult struct, Err int32
+pkg syscall/zx/io2, type DirectoryUnlinkResult struct, Response DirectoryUnlinkResponse
+pkg syscall/zx/io2, type DirectoryUnlinkResult struct, embedded I_directoryUnlinkResultTag
+pkg syscall/zx/io2, type DirectoryWatchMask uint64
+pkg syscall/zx/io2, type DirectoryWatchOptions struct
+pkg syscall/zx/io2, type DirectoryWatchOptions struct, I_unknownData interface{}
+pkg syscall/zx/io2, type DirectoryWatchedEvent struct
+pkg syscall/zx/io2, type DirectoryWatchedEvent struct, Added DirectoryEntry
+pkg syscall/zx/io2, type DirectoryWatchedEvent struct, Existing DirectoryEntry
+pkg syscall/zx/io2, type DirectoryWatchedEvent struct, I_unknownData interface{}
+pkg syscall/zx/io2, type DirectoryWatchedEvent struct, Idle IdleEvent
+pkg syscall/zx/io2, type DirectoryWatchedEvent struct, Removed string
+pkg syscall/zx/io2, type DirectoryWatchedEvent struct, embedded I_directoryWatchedEventTag
+pkg syscall/zx/io2, type DirectoryWatcherEventProxy struct
+pkg syscall/zx/io2, type DirectoryWatcherEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io2, type DirectoryWatcherWithCtx interface { GetNext }
+pkg syscall/zx/io2, type DirectoryWatcherWithCtx interface, GetNext(context.Context) ([]DirectoryWatchedEvent, error)
+pkg syscall/zx/io2, type DirectoryWatcherWithCtxInterface struct
+pkg syscall/zx/io2, type DirectoryWatcherWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io2, type DirectoryWatcherWithCtxInterfaceRequest struct
+pkg syscall/zx/io2, type DirectoryWatcherWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io2, type DirectoryWatcherWithCtxStub struct
+pkg syscall/zx/io2, type DirectoryWatcherWithCtxStub struct, Impl DirectoryWatcherWithCtx
+pkg syscall/zx/io2, type DirectoryWatcherWithCtxTransitionalBase struct
+pkg syscall/zx/io2, type DirectoryWithCtx interface { Close, Describe, Enumerate, GetAttributes, GetToken, Link, Open, Rename, Reopen, Sync, Unlink, UpdateAttributes, Watch }
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Close(context.Context) error
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Enumerate(context.Context, DirectoryEnumerateOptions, DirectoryIteratorWithCtxInterfaceRequest) error
+pkg syscall/zx/io2, type DirectoryWithCtx interface, GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, type DirectoryWithCtx interface, GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Link(context.Context, string, zx.Event, string) (DirectoryLinkResult, error)
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Open(context.Context, string, OpenMode, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Rename(context.Context, string, zx.Event, string) (DirectoryRenameResult, error)
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Unlink(context.Context, string) (DirectoryUnlinkResult, error)
+pkg syscall/zx/io2, type DirectoryWithCtx interface, UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, type DirectoryWithCtx interface, Watch(context.Context, DirectoryWatchMask, DirectoryWatchOptions, DirectoryWatcherWithCtxInterfaceRequest) error
+pkg syscall/zx/io2, type DirectoryWithCtxInterface struct
+pkg syscall/zx/io2, type DirectoryWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io2, type DirectoryWithCtxInterfaceRequest struct
+pkg syscall/zx/io2, type DirectoryWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io2, type DirectoryWithCtxStub struct
+pkg syscall/zx/io2, type DirectoryWithCtxStub struct, Impl DirectoryWithCtx
+pkg syscall/zx/io2, type DirectoryWithCtxTransitionalBase struct
+pkg syscall/zx/io2, type FileEventProxy struct
+pkg syscall/zx/io2, type FileEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io2, type FileGetMemRangeResponse struct
+pkg syscall/zx/io2, type FileGetMemRangeResponse struct, Buffer mem.Range
+pkg syscall/zx/io2, type FileGetMemRangeResult struct
+pkg syscall/zx/io2, type FileGetMemRangeResult struct, Err int32
+pkg syscall/zx/io2, type FileGetMemRangeResult struct, Response FileGetMemRangeResponse
+pkg syscall/zx/io2, type FileGetMemRangeResult struct, embedded I_fileGetMemRangeResultTag
+pkg syscall/zx/io2, type FileInfo struct
+pkg syscall/zx/io2, type FileInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type FileInfo struct, IsAppend bool
+pkg syscall/zx/io2, type FileInfo struct, IsAppendPresent bool
+pkg syscall/zx/io2, type FileInfo struct, Observer zx.Event
+pkg syscall/zx/io2, type FileInfo struct, ObserverPresent bool
+pkg syscall/zx/io2, type FileInfo struct, Stream zx.Handle
+pkg syscall/zx/io2, type FileInfo struct, StreamPresent bool
+pkg syscall/zx/io2, type FileReadAtResponse struct
+pkg syscall/zx/io2, type FileReadAtResponse struct, Data []uint8
+pkg syscall/zx/io2, type FileReadAtResult struct
+pkg syscall/zx/io2, type FileReadAtResult struct, Err int32
+pkg syscall/zx/io2, type FileReadAtResult struct, Response FileReadAtResponse
+pkg syscall/zx/io2, type FileReadAtResult struct, embedded I_fileReadAtResultTag
+pkg syscall/zx/io2, type FileReadResponse struct
+pkg syscall/zx/io2, type FileReadResponse struct, Data []uint8
+pkg syscall/zx/io2, type FileReadResult struct
+pkg syscall/zx/io2, type FileReadResult struct, Err int32
+pkg syscall/zx/io2, type FileReadResult struct, Response FileReadResponse
+pkg syscall/zx/io2, type FileReadResult struct, embedded I_fileReadResultTag
+pkg syscall/zx/io2, type FileResizeResponse struct
+pkg syscall/zx/io2, type FileResizeResult struct
+pkg syscall/zx/io2, type FileResizeResult struct, Err int32
+pkg syscall/zx/io2, type FileResizeResult struct, Response FileResizeResponse
+pkg syscall/zx/io2, type FileResizeResult struct, embedded I_fileResizeResultTag
+pkg syscall/zx/io2, type FileSeekResponse struct
+pkg syscall/zx/io2, type FileSeekResponse struct, OffsetFromStart uint64
+pkg syscall/zx/io2, type FileSeekResult struct
+pkg syscall/zx/io2, type FileSeekResult struct, Err int32
+pkg syscall/zx/io2, type FileSeekResult struct, Response FileSeekResponse
+pkg syscall/zx/io2, type FileSeekResult struct, embedded I_fileSeekResultTag
+pkg syscall/zx/io2, type FileSignal uint32
+pkg syscall/zx/io2, type FileWithCtx interface { AdvisoryLock, Close, Describe, GetAttributes, GetMemRange, GetToken, Read, ReadAt, Reopen, Resize, Seek, Sync, UpdateAttributes, Write, WriteAt }
+pkg syscall/zx/io2, type FileWithCtx interface, AdvisoryLock(context.Context, AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, Close(context.Context) error
+pkg syscall/zx/io2, type FileWithCtx interface, Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, type FileWithCtx interface, GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, GetMemRange(context.Context, VmoFlags) (FileGetMemRangeResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, Read(context.Context, uint64) (FileReadResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, ReadAt(context.Context, uint64, uint64) (FileReadAtResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, type FileWithCtx interface, Resize(context.Context, uint64) (FileResizeResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, Seek(context.Context, SeekOrigin, int64) (FileSeekResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, Write(context.Context, []uint8) (FileWriteResult, error)
+pkg syscall/zx/io2, type FileWithCtx interface, WriteAt(context.Context, []uint8, uint64) (FileWriteAtResult, error)
+pkg syscall/zx/io2, type FileWithCtxInterface struct
+pkg syscall/zx/io2, type FileWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io2, type FileWithCtxInterfaceRequest struct
+pkg syscall/zx/io2, type FileWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io2, type FileWithCtxStub struct
+pkg syscall/zx/io2, type FileWithCtxStub struct, Impl FileWithCtx
+pkg syscall/zx/io2, type FileWithCtxTransitionalBase struct
+pkg syscall/zx/io2, type FileWriteAtResponse struct
+pkg syscall/zx/io2, type FileWriteAtResponse struct, ActualCount uint64
+pkg syscall/zx/io2, type FileWriteAtResult struct
+pkg syscall/zx/io2, type FileWriteAtResult struct, Err int32
+pkg syscall/zx/io2, type FileWriteAtResult struct, Response FileWriteAtResponse
+pkg syscall/zx/io2, type FileWriteAtResult struct, embedded I_fileWriteAtResultTag
+pkg syscall/zx/io2, type FileWriteResponse struct
+pkg syscall/zx/io2, type FileWriteResponse struct, ActualCount uint64
+pkg syscall/zx/io2, type FileWriteResult struct
+pkg syscall/zx/io2, type FileWriteResult struct, Err int32
+pkg syscall/zx/io2, type FileWriteResult struct, Response FileWriteResponse
+pkg syscall/zx/io2, type FileWriteResult struct, embedded I_fileWriteResultTag
+pkg syscall/zx/io2, type I_advisoryLockingAdvisoryLockResultTag uint64
+pkg syscall/zx/io2, type I_directoryIteratorGetNextResultTag uint64
+pkg syscall/zx/io2, type I_directoryLinkResultTag uint64
+pkg syscall/zx/io2, type I_directoryRenameResultTag uint64
+pkg syscall/zx/io2, type I_directoryUnlinkResultTag uint64
+pkg syscall/zx/io2, type I_directoryWatchedEventTag uint64
+pkg syscall/zx/io2, type I_fileGetMemRangeResultTag uint64
+pkg syscall/zx/io2, type I_fileReadAtResultTag uint64
+pkg syscall/zx/io2, type I_fileReadResultTag uint64
+pkg syscall/zx/io2, type I_fileResizeResultTag uint64
+pkg syscall/zx/io2, type I_fileSeekResultTag uint64
+pkg syscall/zx/io2, type I_fileWriteAtResultTag uint64
+pkg syscall/zx/io2, type I_fileWriteResultTag uint64
+pkg syscall/zx/io2, type I_nodeGetAttributesResultTag uint64
+pkg syscall/zx/io2, type I_nodeGetTokenResultTag uint64
+pkg syscall/zx/io2, type I_nodeSyncResultTag uint64
+pkg syscall/zx/io2, type I_nodeUpdateAttributesResultTag uint64
+pkg syscall/zx/io2, type I_representationTag uint64
+pkg syscall/zx/io2, type IdleEvent struct
+pkg syscall/zx/io2, type MemoryEventProxy struct
+pkg syscall/zx/io2, type MemoryEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io2, type MemoryInfo struct
+pkg syscall/zx/io2, type MemoryInfo struct, Buffer mem.Range
+pkg syscall/zx/io2, type MemoryInfo struct, BufferPresent bool
+pkg syscall/zx/io2, type MemoryInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type MemoryWithCtx interface { Close, Describe, GetAttributes, GetToken, Reopen, Sync, UpdateAttributes }
+pkg syscall/zx/io2, type MemoryWithCtx interface, Close(context.Context) error
+pkg syscall/zx/io2, type MemoryWithCtx interface, Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, type MemoryWithCtx interface, GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, type MemoryWithCtx interface, GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, type MemoryWithCtx interface, Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, type MemoryWithCtx interface, Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, type MemoryWithCtx interface, UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, type MemoryWithCtxInterface struct
+pkg syscall/zx/io2, type MemoryWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io2, type MemoryWithCtxInterfaceRequest struct
+pkg syscall/zx/io2, type MemoryWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io2, type MemoryWithCtxStub struct
+pkg syscall/zx/io2, type MemoryWithCtxStub struct, Impl MemoryWithCtx
+pkg syscall/zx/io2, type MemoryWithCtxTransitionalBase struct
+pkg syscall/zx/io2, type NodeAttributes struct
+pkg syscall/zx/io2, type NodeAttributes struct, Abilities Operations
+pkg syscall/zx/io2, type NodeAttributes struct, AbilitiesPresent bool
+pkg syscall/zx/io2, type NodeAttributes struct, ContentSize uint64
+pkg syscall/zx/io2, type NodeAttributes struct, ContentSizePresent bool
+pkg syscall/zx/io2, type NodeAttributes struct, CreationTime uint64
+pkg syscall/zx/io2, type NodeAttributes struct, CreationTimePresent bool
+pkg syscall/zx/io2, type NodeAttributes struct, I_unknownData interface{}
+pkg syscall/zx/io2, type NodeAttributes struct, Id uint64
+pkg syscall/zx/io2, type NodeAttributes struct, IdPresent bool
+pkg syscall/zx/io2, type NodeAttributes struct, LinkCount uint64
+pkg syscall/zx/io2, type NodeAttributes struct, LinkCountPresent bool
+pkg syscall/zx/io2, type NodeAttributes struct, ModificationTime uint64
+pkg syscall/zx/io2, type NodeAttributes struct, ModificationTimePresent bool
+pkg syscall/zx/io2, type NodeAttributes struct, Protocols NodeProtocols
+pkg syscall/zx/io2, type NodeAttributes struct, ProtocolsPresent bool
+pkg syscall/zx/io2, type NodeAttributes struct, StorageSize uint64
+pkg syscall/zx/io2, type NodeAttributes struct, StorageSizePresent bool
+pkg syscall/zx/io2, type NodeAttributesQuery uint64
+pkg syscall/zx/io2, type NodeEventProxy struct
+pkg syscall/zx/io2, type NodeEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io2, type NodeGetAttributesResponse struct
+pkg syscall/zx/io2, type NodeGetAttributesResponse struct, Attributes NodeAttributes
+pkg syscall/zx/io2, type NodeGetAttributesResult struct
+pkg syscall/zx/io2, type NodeGetAttributesResult struct, Err int32
+pkg syscall/zx/io2, type NodeGetAttributesResult struct, Response NodeGetAttributesResponse
+pkg syscall/zx/io2, type NodeGetAttributesResult struct, embedded I_nodeGetAttributesResultTag
+pkg syscall/zx/io2, type NodeGetTokenResponse struct
+pkg syscall/zx/io2, type NodeGetTokenResponse struct, Token zx.Event
+pkg syscall/zx/io2, type NodeGetTokenResult struct
+pkg syscall/zx/io2, type NodeGetTokenResult struct, Err int32
+pkg syscall/zx/io2, type NodeGetTokenResult struct, Response NodeGetTokenResponse
+pkg syscall/zx/io2, type NodeGetTokenResult struct, embedded I_nodeGetTokenResultTag
+pkg syscall/zx/io2, type NodeProtocols uint64
+pkg syscall/zx/io2, type NodeSyncResponse struct
+pkg syscall/zx/io2, type NodeSyncResult struct
+pkg syscall/zx/io2, type NodeSyncResult struct, Err int32
+pkg syscall/zx/io2, type NodeSyncResult struct, Response NodeSyncResponse
+pkg syscall/zx/io2, type NodeSyncResult struct, embedded I_nodeSyncResultTag
+pkg syscall/zx/io2, type NodeUpdateAttributesResponse struct
+pkg syscall/zx/io2, type NodeUpdateAttributesResult struct
+pkg syscall/zx/io2, type NodeUpdateAttributesResult struct, Err int32
+pkg syscall/zx/io2, type NodeUpdateAttributesResult struct, Response NodeUpdateAttributesResponse
+pkg syscall/zx/io2, type NodeUpdateAttributesResult struct, embedded I_nodeUpdateAttributesResultTag
+pkg syscall/zx/io2, type NodeWithCtx interface { Close, Describe, GetAttributes, GetToken, Reopen, Sync, UpdateAttributes }
+pkg syscall/zx/io2, type NodeWithCtx interface, Close(context.Context) error
+pkg syscall/zx/io2, type NodeWithCtx interface, Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, type NodeWithCtx interface, GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, type NodeWithCtx interface, GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, type NodeWithCtx interface, Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, type NodeWithCtx interface, Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, type NodeWithCtx interface, UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, type NodeWithCtxInterface struct
+pkg syscall/zx/io2, type NodeWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io2, type NodeWithCtxInterfaceRequest struct
+pkg syscall/zx/io2, type NodeWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io2, type NodeWithCtxStub struct
+pkg syscall/zx/io2, type NodeWithCtxStub struct, Impl NodeWithCtx
+pkg syscall/zx/io2, type NodeWithCtxTransitionalBase struct
+pkg syscall/zx/io2, type OpenMode uint32
+pkg syscall/zx/io2, type Operations uint64
+pkg syscall/zx/io2, type PipeEventProxy struct
+pkg syscall/zx/io2, type PipeEventProxy struct, embedded zx.Channel
+pkg syscall/zx/io2, type PipeInfo struct
+pkg syscall/zx/io2, type PipeInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type PipeInfo struct, Socket zx.Socket
+pkg syscall/zx/io2, type PipeInfo struct, SocketPresent bool
+pkg syscall/zx/io2, type PipeWithCtx interface { Close, Describe, GetAttributes, GetToken, Reopen, Sync, UpdateAttributes }
+pkg syscall/zx/io2, type PipeWithCtx interface, Close(context.Context) error
+pkg syscall/zx/io2, type PipeWithCtx interface, Describe(context.Context, ConnectionInfoQuery) (ConnectionInfo, error)
+pkg syscall/zx/io2, type PipeWithCtx interface, GetAttributes(context.Context, NodeAttributesQuery) (NodeGetAttributesResult, error)
+pkg syscall/zx/io2, type PipeWithCtx interface, GetToken(context.Context) (NodeGetTokenResult, error)
+pkg syscall/zx/io2, type PipeWithCtx interface, Reopen(context.Context, ConnectionOptions, zx.Channel) error
+pkg syscall/zx/io2, type PipeWithCtx interface, Sync(context.Context) (NodeSyncResult, error)
+pkg syscall/zx/io2, type PipeWithCtx interface, UpdateAttributes(context.Context, NodeAttributes) (NodeUpdateAttributesResult, error)
+pkg syscall/zx/io2, type PipeWithCtxInterface struct
+pkg syscall/zx/io2, type PipeWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/io2, type PipeWithCtxInterfaceRequest struct
+pkg syscall/zx/io2, type PipeWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/io2, type PipeWithCtxStub struct
+pkg syscall/zx/io2, type PipeWithCtxStub struct, Impl PipeWithCtx
+pkg syscall/zx/io2, type PipeWithCtxTransitionalBase struct
+pkg syscall/zx/io2, type PosixSocketInfo struct
+pkg syscall/zx/io2, type PosixSocketInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type PosixSocketInfo struct, Socket zx.Socket
+pkg syscall/zx/io2, type PosixSocketInfo struct, SocketPresent bool
+pkg syscall/zx/io2, type Representation struct
+pkg syscall/zx/io2, type Representation struct, Connector ConnectorInfo
+pkg syscall/zx/io2, type Representation struct, Debuglog DebuglogInfo
+pkg syscall/zx/io2, type Representation struct, Device DeviceInfo
+pkg syscall/zx/io2, type Representation struct, Directory DirectoryInfo
+pkg syscall/zx/io2, type Representation struct, File FileInfo
+pkg syscall/zx/io2, type Representation struct, I_unknownData interface{}
+pkg syscall/zx/io2, type Representation struct, Memory MemoryInfo
+pkg syscall/zx/io2, type Representation struct, Pipe PipeInfo
+pkg syscall/zx/io2, type Representation struct, PosixSocket PosixSocketInfo
+pkg syscall/zx/io2, type Representation struct, Tty TtyInfo
+pkg syscall/zx/io2, type Representation struct, embedded I_representationTag
+pkg syscall/zx/io2, type RightsRequest struct
+pkg syscall/zx/io2, type RightsRequest struct, AtLeast Operations
+pkg syscall/zx/io2, type RightsRequest struct, AtMost Operations
+pkg syscall/zx/io2, type RightsRequest struct, Resolution RightsResolution
+pkg syscall/zx/io2, type RightsResolution uint32
+pkg syscall/zx/io2, type SeekOrigin uint32
+pkg syscall/zx/io2, type TtyInfo struct
+pkg syscall/zx/io2, type TtyInfo struct, Event zx.Handle
+pkg syscall/zx/io2, type TtyInfo struct, EventPresent bool
+pkg syscall/zx/io2, type TtyInfo struct, I_unknownData interface{}
+pkg syscall/zx/io2, type VmoFlags uint64
+pkg syscall/zx/logger, const ComponentNamePlaceholderTag = "COMPONENT_NAME"
+pkg syscall/zx/logger, const ComponentNamePlaceholderTag string
+pkg syscall/zx/logger, const LogDumpLogsOrdinal = 5677235824019750106
+pkg syscall/zx/logger, const LogDumpLogsOrdinal uint64
+pkg syscall/zx/logger, const LogDumpLogsSafeOrdinal = 1505222195749004569
+pkg syscall/zx/logger, const LogDumpLogsSafeOrdinal uint64
+pkg syscall/zx/logger, const LogLevelDefault = 48
+pkg syscall/zx/logger, const LogLevelDefault uint8
+pkg syscall/zx/logger, const LogLevelFilterAll = -127
+pkg syscall/zx/logger, const LogLevelFilterAll LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterDebug = 32
+pkg syscall/zx/logger, const LogLevelFilterDebug LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedError = 2
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedError LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedFatal = 3
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedFatal LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedInfo = 0
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedInfo LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedNone = -1
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedNone LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedWarn = 1
+pkg syscall/zx/logger, const LogLevelFilterDeprecatedWarn LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterError = 80
+pkg syscall/zx/logger, const LogLevelFilterError LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterFatal = 96
+pkg syscall/zx/logger, const LogLevelFilterFatal LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterInfo = 48
+pkg syscall/zx/logger, const LogLevelFilterInfo LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterNone = 127
+pkg syscall/zx/logger, const LogLevelFilterNone LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterTrace = 16
+pkg syscall/zx/logger, const LogLevelFilterTrace LogLevelFilter
+pkg syscall/zx/logger, const LogLevelFilterWarn = 64
+pkg syscall/zx/logger, const LogLevelFilterWarn LogLevelFilter
+pkg syscall/zx/logger, const LogListenOrdinal = 5193530230735566936
+pkg syscall/zx/logger, const LogListenOrdinal uint64
+pkg syscall/zx/logger, const LogListenSafeOrdinal = 5643638173917143473
+pkg syscall/zx/logger, const LogListenSafeOrdinal uint64
+pkg syscall/zx/logger, const LogListenSafeWithSelectorsOrdinal = 1960844265602547838
+pkg syscall/zx/logger, const LogListenSafeWithSelectorsOrdinal uint64
+pkg syscall/zx/logger, const LogListenerDoneOrdinal = 7003223644078344410
+pkg syscall/zx/logger, const LogListenerDoneOrdinal uint64
+pkg syscall/zx/logger, const LogListenerLogManyOrdinal = 1744077432328283308
+pkg syscall/zx/logger, const LogListenerLogManyOrdinal uint64
+pkg syscall/zx/logger, const LogListenerLogOrdinal = 4791601185092618936
+pkg syscall/zx/logger, const LogListenerLogOrdinal uint64
+pkg syscall/zx/logger, const LogListenerSafeDoneOrdinal = 3789886091192272056
+pkg syscall/zx/logger, const LogListenerSafeDoneOrdinal uint64
+pkg syscall/zx/logger, const LogListenerSafeLogManyOrdinal = 139706434677727850
+pkg syscall/zx/logger, const LogListenerSafeLogManyOrdinal uint64
+pkg syscall/zx/logger, const LogListenerSafeLogOrdinal = 5882719137999207690
+pkg syscall/zx/logger, const LogListenerSafeLogOrdinal uint64
+pkg syscall/zx/logger, const LogName = "fuchsia.logger.Log"
+pkg syscall/zx/logger, const LogName ideal-string
+pkg syscall/zx/logger, const LogSeverityMaxStep = 6
+pkg syscall/zx/logger, const LogSeverityMaxStep uint8
+pkg syscall/zx/logger, const LogSeverityStepSize = 16
+pkg syscall/zx/logger, const LogSeverityStepSize uint8
+pkg syscall/zx/logger, const LogSinkConnectOrdinal = 7263263143300023835
+pkg syscall/zx/logger, const LogSinkConnectOrdinal uint64
+pkg syscall/zx/logger, const LogSinkConnectStructuredOrdinal = 7157386067685058380
+pkg syscall/zx/logger, const LogSinkConnectStructuredOrdinal uint64
+pkg syscall/zx/logger, const LogSinkName = "fuchsia.logger.LogSink"
+pkg syscall/zx/logger, const LogSinkName ideal-string
+pkg syscall/zx/logger, const LogSinkOnInterestChangedOrdinal = 463821611711065918
+pkg syscall/zx/logger, const LogSinkOnInterestChangedOrdinal uint64
+pkg syscall/zx/logger, const LogSinkOnRegisterInterestOrdinal = 2117597943223397047
+pkg syscall/zx/logger, const LogSinkOnRegisterInterestOrdinal uint64
+pkg syscall/zx/logger, const LogVerbosityStepSize = 1
+pkg syscall/zx/logger, const LogVerbosityStepSize uint8
+pkg syscall/zx/logger, const MaxDatagramLenBytes = 32768
+pkg syscall/zx/logger, const MaxDatagramLenBytes uint32
+pkg syscall/zx/logger, const MaxLogManySizeBytes = 16384
+pkg syscall/zx/logger, const MaxLogManySizeBytes uint64
+pkg syscall/zx/logger, const MaxLogSelectors = 5
+pkg syscall/zx/logger, const MaxLogSelectors uint8
+pkg syscall/zx/logger, const MaxTagLenBytes = 63
+pkg syscall/zx/logger, const MaxTagLenBytes uint8
+pkg syscall/zx/logger, const MaxTags = 8
+pkg syscall/zx/logger, const MaxTags uint8
+pkg syscall/zx/logger, const MaxTagsPerLogMessage = 5
+pkg syscall/zx/logger, const MaxTagsPerLogMessage uint8
+pkg syscall/zx/logger, func NewLogListenerSafeWithCtxInterfaceRequest() (LogListenerSafeWithCtxInterfaceRequest, *LogListenerSafeWithCtxInterface, error)
+pkg syscall/zx/logger, func NewLogListenerWithCtxInterfaceRequest() (LogListenerWithCtxInterfaceRequest, *LogListenerWithCtxInterface, error)
+pkg syscall/zx/logger, func NewLogSinkWithCtxInterfaceRequest() (LogSinkWithCtxInterfaceRequest, *LogSinkWithCtxInterface, error)
+pkg syscall/zx/logger, func NewLogWithCtxInterfaceRequest() (LogWithCtxInterfaceRequest, *LogWithCtxInterface, error)
+pkg syscall/zx/logger, method (*LogEventProxy) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogFilterOptions) Marshaler() fidl.Marshaler
+pkg syscall/zx/logger, method (*LogInterestSelector) Marshaler() fidl.Marshaler
+pkg syscall/zx/logger, method (*LogListenerEventProxy) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogListenerSafeEventProxy) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogListenerSafeWithCtxInterface) Done(context.Context) error
+pkg syscall/zx/logger, method (*LogListenerSafeWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogListenerSafeWithCtxInterface) Log(context.Context, LogMessage) error
+pkg syscall/zx/logger, method (*LogListenerSafeWithCtxInterface) LogMany(context.Context, []LogMessage) error
+pkg syscall/zx/logger, method (*LogListenerSafeWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogListenerSafeWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/logger, method (*LogListenerWithCtxInterface) Done(context.Context) error
+pkg syscall/zx/logger, method (*LogListenerWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogListenerWithCtxInterface) Log(context.Context, LogMessage) error
+pkg syscall/zx/logger, method (*LogListenerWithCtxInterface) LogMany(context.Context, []LogMessage) error
+pkg syscall/zx/logger, method (*LogListenerWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogListenerWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/logger, method (*LogMessage) Marshaler() fidl.Marshaler
+pkg syscall/zx/logger, method (*LogSinkEventProxy) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogSinkEventProxy) OnInterestChanged(diagnostics.Interest) error
+pkg syscall/zx/logger, method (*LogSinkEventProxy) OnRegisterInterest(diagnostics.Interest) error
+pkg syscall/zx/logger, method (*LogSinkWithCtxInterface) Connect(context.Context, zx.Socket) error
+pkg syscall/zx/logger, method (*LogSinkWithCtxInterface) ConnectStructured(context.Context, zx.Socket) error
+pkg syscall/zx/logger, method (*LogSinkWithCtxInterface) ExpectOnInterestChanged(context.Context) (diagnostics.Interest, error)
+pkg syscall/zx/logger, method (*LogSinkWithCtxInterface) ExpectOnRegisterInterest(context.Context) (diagnostics.Interest, error)
+pkg syscall/zx/logger, method (*LogSinkWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogSinkWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogSinkWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/logger, method (*LogSinkWithCtxTransitionalBase) ConnectStructured(context.Context, zx.Socket) error
+pkg syscall/zx/logger, method (*LogWithCtxInterface) DumpLogs(context.Context, LogListenerWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, method (*LogWithCtxInterface) DumpLogsSafe(context.Context, LogListenerSafeWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, method (*LogWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogWithCtxInterface) Listen(context.Context, LogListenerWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, method (*LogWithCtxInterface) ListenSafe(context.Context, LogListenerSafeWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, method (*LogWithCtxInterface) ListenSafeWithSelectors(context.Context, LogListenerSafeWithCtxInterface, *LogFilterOptions, []LogInterestSelector) error
+pkg syscall/zx/logger, method (*LogWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/logger, method (*LogWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/logger, method (*LogWithCtxTransitionalBase) DumpLogsSafe(context.Context, LogListenerSafeWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, method (*LogWithCtxTransitionalBase) ListenSafe(context.Context, LogListenerSafeWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, method (*LogWithCtxTransitionalBase) ListenSafeWithSelectors(context.Context, LogListenerSafeWithCtxInterface, *LogFilterOptions, []LogInterestSelector) error
+pkg syscall/zx/logger, method (LogLevelFilter) I_EnumIsStrict() bool
+pkg syscall/zx/logger, method (LogLevelFilter) I_EnumValues() []LogLevelFilter
+pkg syscall/zx/logger, method (LogLevelFilter) IsUnknown() bool
+pkg syscall/zx/logger, method (LogLevelFilter) String() string
+pkg syscall/zx/logger, method (LogSinkWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/logger, method (LogSinkWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/logger, method (LogWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/logger, method (LogWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/logger, type LogEventProxy struct
+pkg syscall/zx/logger, type LogEventProxy struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogFilterOptions struct
+pkg syscall/zx/logger, type LogFilterOptions struct, FilterByPid bool
+pkg syscall/zx/logger, type LogFilterOptions struct, FilterByTid bool
+pkg syscall/zx/logger, type LogFilterOptions struct, MinSeverity LogLevelFilter
+pkg syscall/zx/logger, type LogFilterOptions struct, Pid uint64
+pkg syscall/zx/logger, type LogFilterOptions struct, Tags []string
+pkg syscall/zx/logger, type LogFilterOptions struct, Tid uint64
+pkg syscall/zx/logger, type LogFilterOptions struct, Verbosity uint8
+pkg syscall/zx/logger, type LogInterestSelector struct
+pkg syscall/zx/logger, type LogInterestSelector struct, Interest diagnostics.Interest
+pkg syscall/zx/logger, type LogInterestSelector struct, Selector diagnostics.ComponentSelector
+pkg syscall/zx/logger, type LogLevelFilter int8
+pkg syscall/zx/logger, type LogListenerEventProxy struct
+pkg syscall/zx/logger, type LogListenerEventProxy struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogListenerSafeEventProxy struct
+pkg syscall/zx/logger, type LogListenerSafeEventProxy struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogListenerSafeWithCtx interface { Done, Log, LogMany }
+pkg syscall/zx/logger, type LogListenerSafeWithCtx interface, Done(context.Context) error
+pkg syscall/zx/logger, type LogListenerSafeWithCtx interface, Log(context.Context, LogMessage) error
+pkg syscall/zx/logger, type LogListenerSafeWithCtx interface, LogMany(context.Context, []LogMessage) error
+pkg syscall/zx/logger, type LogListenerSafeWithCtxInterface struct
+pkg syscall/zx/logger, type LogListenerSafeWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogListenerSafeWithCtxInterfaceRequest struct
+pkg syscall/zx/logger, type LogListenerSafeWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogListenerSafeWithCtxStub struct
+pkg syscall/zx/logger, type LogListenerSafeWithCtxStub struct, Impl LogListenerSafeWithCtx
+pkg syscall/zx/logger, type LogListenerSafeWithCtxTransitionalBase struct
+pkg syscall/zx/logger, type LogListenerWithCtx interface { Done, Log, LogMany }
+pkg syscall/zx/logger, type LogListenerWithCtx interface, Done(context.Context) error
+pkg syscall/zx/logger, type LogListenerWithCtx interface, Log(context.Context, LogMessage) error
+pkg syscall/zx/logger, type LogListenerWithCtx interface, LogMany(context.Context, []LogMessage) error
+pkg syscall/zx/logger, type LogListenerWithCtxInterface struct
+pkg syscall/zx/logger, type LogListenerWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogListenerWithCtxInterfaceRequest struct
+pkg syscall/zx/logger, type LogListenerWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogListenerWithCtxStub struct
+pkg syscall/zx/logger, type LogListenerWithCtxStub struct, Impl LogListenerWithCtx
+pkg syscall/zx/logger, type LogListenerWithCtxTransitionalBase struct
+pkg syscall/zx/logger, type LogMessage struct
+pkg syscall/zx/logger, type LogMessage struct, DroppedLogs uint32
+pkg syscall/zx/logger, type LogMessage struct, Msg string
+pkg syscall/zx/logger, type LogMessage struct, Pid uint64
+pkg syscall/zx/logger, type LogMessage struct, Severity int32
+pkg syscall/zx/logger, type LogMessage struct, Tags []string
+pkg syscall/zx/logger, type LogMessage struct, Tid uint64
+pkg syscall/zx/logger, type LogMessage struct, Time int64
+pkg syscall/zx/logger, type LogSinkEventProxy struct
+pkg syscall/zx/logger, type LogSinkEventProxy struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogSinkWithCtx interface { Connect, ConnectStructured }
+pkg syscall/zx/logger, type LogSinkWithCtx interface, Connect(context.Context, zx.Socket) error
+pkg syscall/zx/logger, type LogSinkWithCtx interface, ConnectStructured(context.Context, zx.Socket) error
+pkg syscall/zx/logger, type LogSinkWithCtxInterface struct
+pkg syscall/zx/logger, type LogSinkWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogSinkWithCtxInterfaceRequest struct
+pkg syscall/zx/logger, type LogSinkWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogSinkWithCtxStub struct
+pkg syscall/zx/logger, type LogSinkWithCtxStub struct, Impl LogSinkWithCtx
+pkg syscall/zx/logger, type LogSinkWithCtxTransitionalBase struct
+pkg syscall/zx/logger, type LogWithCtx interface { DumpLogs, DumpLogsSafe, Listen, ListenSafe, ListenSafeWithSelectors }
+pkg syscall/zx/logger, type LogWithCtx interface, DumpLogs(context.Context, LogListenerWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, type LogWithCtx interface, DumpLogsSafe(context.Context, LogListenerSafeWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, type LogWithCtx interface, Listen(context.Context, LogListenerWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, type LogWithCtx interface, ListenSafe(context.Context, LogListenerSafeWithCtxInterface, *LogFilterOptions) error
+pkg syscall/zx/logger, type LogWithCtx interface, ListenSafeWithSelectors(context.Context, LogListenerSafeWithCtxInterface, *LogFilterOptions, []LogInterestSelector) error
+pkg syscall/zx/logger, type LogWithCtxInterface struct
+pkg syscall/zx/logger, type LogWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogWithCtxInterfaceRequest struct
+pkg syscall/zx/logger, type LogWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/logger, type LogWithCtxStub struct
+pkg syscall/zx/logger, type LogWithCtxStub struct, Impl LogWithCtx
+pkg syscall/zx/logger, type LogWithCtxTransitionalBase struct
+pkg syscall/zx/mem, const DataBuffer = 2
+pkg syscall/zx/mem, const DataBuffer ideal-int
+pkg syscall/zx/mem, const DataBytes = 1
+pkg syscall/zx/mem, const DataBytes ideal-int
+pkg syscall/zx/mem, const Data_unknownData = 0
+pkg syscall/zx/mem, const Data_unknownData ideal-int
+pkg syscall/zx/mem, func DataWithBuffer(Buffer) Data
+pkg syscall/zx/mem, func DataWithBytes([]uint8) Data
+pkg syscall/zx/mem, method (*Buffer) Marshaler() fidl.Marshaler
+pkg syscall/zx/mem, method (*Data) GetUnknownData() fidl.UnknownData
+pkg syscall/zx/mem, method (*Data) Ordinal() uint64
+pkg syscall/zx/mem, method (*Data) SetBuffer(Buffer)
+pkg syscall/zx/mem, method (*Data) SetBytes([]uint8)
+pkg syscall/zx/mem, method (*Data) Which() I_dataTag
+pkg syscall/zx/mem, method (*Range) Marshaler() fidl.Marshaler
+pkg syscall/zx/mem, type Buffer struct
+pkg syscall/zx/mem, type Buffer struct, Size uint64
+pkg syscall/zx/mem, type Buffer struct, Vmo zx.VMO
+pkg syscall/zx/mem, type Data struct
+pkg syscall/zx/mem, type Data struct, Buffer Buffer
+pkg syscall/zx/mem, type Data struct, Bytes []uint8
+pkg syscall/zx/mem, type Data struct, I_unknownData interface{}
+pkg syscall/zx/mem, type Data struct, embedded I_dataTag
+pkg syscall/zx/mem, type I_dataTag uint64
+pkg syscall/zx/mem, type Range struct
+pkg syscall/zx/mem, type Range struct, Offset uint64
+pkg syscall/zx/mem, type Range struct, Size uint64
+pkg syscall/zx/mem, type Range struct, Vmo zx.VMO
+pkg syscall/zx/net, const IpAddressIpv4 = 1
+pkg syscall/zx/net, const IpAddressIpv4 ideal-int
+pkg syscall/zx/net, const IpAddressIpv6 = 2
+pkg syscall/zx/net, const IpAddressIpv6 ideal-int
+pkg syscall/zx/net, const LookupErrorInternalError = 4
+pkg syscall/zx/net, const LookupErrorInternalError LookupError
+pkg syscall/zx/net, const LookupErrorInvalidArgs = 3
+pkg syscall/zx/net, const LookupErrorInvalidArgs LookupError
+pkg syscall/zx/net, const LookupErrorNotFound = 1
+pkg syscall/zx/net, const LookupErrorNotFound LookupError
+pkg syscall/zx/net, const LookupErrorTransient = 2
+pkg syscall/zx/net, const LookupErrorTransient LookupError
+pkg syscall/zx/net, const LookupIpOptionsCnameLookup = 4
+pkg syscall/zx/net, const LookupIpOptionsCnameLookup LookupIpOptions
+pkg syscall/zx/net, const LookupIpOptionsV4Addrs = 1
+pkg syscall/zx/net, const LookupIpOptionsV4Addrs LookupIpOptions
+pkg syscall/zx/net, const LookupIpOptionsV6Addrs = 2
+pkg syscall/zx/net, const LookupIpOptionsV6Addrs LookupIpOptions
+pkg syscall/zx/net, const LookupIpOptions_Mask = 7
+pkg syscall/zx/net, const LookupIpOptions_Mask LookupIpOptions
+pkg syscall/zx/net, const MaxHostnameSize = 255
+pkg syscall/zx/net, const MaxHostnameSize uint64
+pkg syscall/zx/net, const MaxLookupIps = 256
+pkg syscall/zx/net, const MaxLookupIps uint64
+pkg syscall/zx/net, const NameLookupLookupHostnameOrdinal = 6773037474956398858
+pkg syscall/zx/net, const NameLookupLookupHostnameOrdinal uint64
+pkg syscall/zx/net, const NameLookupLookupHostnameResultErr = 2
+pkg syscall/zx/net, const NameLookupLookupHostnameResultErr ideal-int
+pkg syscall/zx/net, const NameLookupLookupHostnameResultResponse = 1
+pkg syscall/zx/net, const NameLookupLookupHostnameResultResponse ideal-int
+pkg syscall/zx/net, const NameLookupLookupIp2Ordinal = 7893054727488534356
+pkg syscall/zx/net, const NameLookupLookupIp2Ordinal uint64
+pkg syscall/zx/net, const NameLookupLookupIp2ResultErr = 2
+pkg syscall/zx/net, const NameLookupLookupIp2ResultErr ideal-int
+pkg syscall/zx/net, const NameLookupLookupIp2ResultResponse = 1
+pkg syscall/zx/net, const NameLookupLookupIp2ResultResponse ideal-int
+pkg syscall/zx/net, const NameLookupLookupIpOrdinal = 6365675835475431218
+pkg syscall/zx/net, const NameLookupLookupIpOrdinal uint64
+pkg syscall/zx/net, const NameLookupLookupIpResultErr = 2
+pkg syscall/zx/net, const NameLookupLookupIpResultErr ideal-int
+pkg syscall/zx/net, const NameLookupLookupIpResultResponse = 1
+pkg syscall/zx/net, const NameLookupLookupIpResultResponse ideal-int
+pkg syscall/zx/net, const NameLookupName = "fuchsia.net.NameLookup"
+pkg syscall/zx/net, const NameLookupName ideal-string
+pkg syscall/zx/net, const SocketAddressIpv4 = 1
+pkg syscall/zx/net, const SocketAddressIpv4 ideal-int
+pkg syscall/zx/net, const SocketAddressIpv6 = 2
+pkg syscall/zx/net, const SocketAddressIpv6 ideal-int
+pkg syscall/zx/net, func IpAddressWithIpv4(Ipv4Address) IpAddress
+pkg syscall/zx/net, func IpAddressWithIpv6(Ipv6Address) IpAddress
+pkg syscall/zx/net, func NameLookupLookupHostnameResultWithErr(LookupError) NameLookupLookupHostnameResult
+pkg syscall/zx/net, func NameLookupLookupHostnameResultWithResponse(NameLookupLookupHostnameResponse) NameLookupLookupHostnameResult
+pkg syscall/zx/net, func NameLookupLookupIp2ResultWithErr(LookupError) NameLookupLookupIp2Result
+pkg syscall/zx/net, func NameLookupLookupIp2ResultWithResponse(NameLookupLookupIp2Response) NameLookupLookupIp2Result
+pkg syscall/zx/net, func NameLookupLookupIpResultWithErr(LookupError) NameLookupLookupIpResult
+pkg syscall/zx/net, func NameLookupLookupIpResultWithResponse(NameLookupLookupIpResponse) NameLookupLookupIpResult
+pkg syscall/zx/net, func NewNameLookupWithCtxInterfaceRequest() (NameLookupWithCtxInterfaceRequest, *NameLookupWithCtxInterface, error)
+pkg syscall/zx/net, func SocketAddressWithIpv4(Ipv4SocketAddress) SocketAddress
+pkg syscall/zx/net, func SocketAddressWithIpv6(Ipv6SocketAddress) SocketAddress
+pkg syscall/zx/net, method (*IpAddress) Ordinal() uint64
+pkg syscall/zx/net, method (*IpAddress) SetIpv4(Ipv4Address)
+pkg syscall/zx/net, method (*IpAddress) SetIpv6(Ipv6Address)
+pkg syscall/zx/net, method (*IpAddress) Which() I_ipAddressTag
+pkg syscall/zx/net, method (*IpAddressInfo) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (*Ipv4Address) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (*Ipv4SocketAddress) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (*Ipv6Address) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (*Ipv6SocketAddress) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (*LookupIpOptions2) ClearIpv4Lookup()
+pkg syscall/zx/net, method (*LookupIpOptions2) ClearIpv6Lookup()
+pkg syscall/zx/net, method (*LookupIpOptions2) ClearSortAddresses()
+pkg syscall/zx/net, method (*LookupIpOptions2) GetIpv4Lookup() bool
+pkg syscall/zx/net, method (*LookupIpOptions2) GetIpv4LookupWithDefault(bool) bool
+pkg syscall/zx/net, method (*LookupIpOptions2) GetIpv6Lookup() bool
+pkg syscall/zx/net, method (*LookupIpOptions2) GetIpv6LookupWithDefault(bool) bool
+pkg syscall/zx/net, method (*LookupIpOptions2) GetSortAddresses() bool
+pkg syscall/zx/net, method (*LookupIpOptions2) GetSortAddressesWithDefault(bool) bool
+pkg syscall/zx/net, method (*LookupIpOptions2) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/net, method (*LookupIpOptions2) HasIpv4Lookup() bool
+pkg syscall/zx/net, method (*LookupIpOptions2) HasIpv6Lookup() bool
+pkg syscall/zx/net, method (*LookupIpOptions2) HasSortAddresses() bool
+pkg syscall/zx/net, method (*LookupIpOptions2) HasUnknownData() bool
+pkg syscall/zx/net, method (*LookupIpOptions2) SetIpv4Lookup(bool)
+pkg syscall/zx/net, method (*LookupIpOptions2) SetIpv6Lookup(bool)
+pkg syscall/zx/net, method (*LookupIpOptions2) SetSortAddresses(bool)
+pkg syscall/zx/net, method (*LookupResult) ClearAddresses()
+pkg syscall/zx/net, method (*LookupResult) GetAddresses() []IpAddress
+pkg syscall/zx/net, method (*LookupResult) GetAddressesWithDefault([]IpAddress) []IpAddress
+pkg syscall/zx/net, method (*LookupResult) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/net, method (*LookupResult) HasAddresses() bool
+pkg syscall/zx/net, method (*LookupResult) HasUnknownData() bool
+pkg syscall/zx/net, method (*LookupResult) SetAddresses([]IpAddress)
+pkg syscall/zx/net, method (*MacAddress) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (*NameLookupEventProxy) Handle() *zx.Handle
+pkg syscall/zx/net, method (*NameLookupLookupHostnameResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (*NameLookupLookupHostnameResult) Ordinal() uint64
+pkg syscall/zx/net, method (*NameLookupLookupHostnameResult) SetErr(LookupError)
+pkg syscall/zx/net, method (*NameLookupLookupHostnameResult) SetResponse(NameLookupLookupHostnameResponse)
+pkg syscall/zx/net, method (*NameLookupLookupHostnameResult) Which() I_nameLookupLookupHostnameResultTag
+pkg syscall/zx/net, method (*NameLookupLookupIp2Response) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (*NameLookupLookupIp2Result) Ordinal() uint64
+pkg syscall/zx/net, method (*NameLookupLookupIp2Result) SetErr(LookupError)
+pkg syscall/zx/net, method (*NameLookupLookupIp2Result) SetResponse(NameLookupLookupIp2Response)
+pkg syscall/zx/net, method (*NameLookupLookupIp2Result) Which() I_nameLookupLookupIp2ResultTag
+pkg syscall/zx/net, method (*NameLookupLookupIpResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (*NameLookupLookupIpResult) Ordinal() uint64
+pkg syscall/zx/net, method (*NameLookupLookupIpResult) SetErr(LookupError)
+pkg syscall/zx/net, method (*NameLookupLookupIpResult) SetResponse(NameLookupLookupIpResponse)
+pkg syscall/zx/net, method (*NameLookupLookupIpResult) Which() I_nameLookupLookupIpResultTag
+pkg syscall/zx/net, method (*NameLookupWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/net, method (*NameLookupWithCtxInterface) LookupHostname(context.Context, IpAddress) (NameLookupLookupHostnameResult, error)
+pkg syscall/zx/net, method (*NameLookupWithCtxInterface) LookupIp(context.Context, string, LookupIpOptions) (NameLookupLookupIpResult, error)
+pkg syscall/zx/net, method (*NameLookupWithCtxInterface) LookupIp2(context.Context, string, LookupIpOptions2) (NameLookupLookupIp2Result, error)
+pkg syscall/zx/net, method (*NameLookupWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/net, method (*NameLookupWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/net, method (*SocketAddress) Ordinal() uint64
+pkg syscall/zx/net, method (*SocketAddress) SetIpv4(Ipv4SocketAddress)
+pkg syscall/zx/net, method (*SocketAddress) SetIpv6(Ipv6SocketAddress)
+pkg syscall/zx/net, method (*SocketAddress) Which() I_socketAddressTag
+pkg syscall/zx/net, method (*Subnet) Marshaler() fidl.Marshaler
+pkg syscall/zx/net, method (LookupError) I_EnumIsStrict() bool
+pkg syscall/zx/net, method (LookupError) I_EnumValues() []LookupError
+pkg syscall/zx/net, method (LookupError) IsUnknown() bool
+pkg syscall/zx/net, method (LookupError) String() string
+pkg syscall/zx/net, method (LookupIpOptions) ClearBits(LookupIpOptions) LookupIpOptions
+pkg syscall/zx/net, method (LookupIpOptions) GetUnknownBits() uint64
+pkg syscall/zx/net, method (LookupIpOptions) HasBits(LookupIpOptions) bool
+pkg syscall/zx/net, method (LookupIpOptions) HasUnknownBits() bool
+pkg syscall/zx/net, method (LookupIpOptions) I_BitsIsStrict() bool
+pkg syscall/zx/net, method (LookupIpOptions) I_BitsMask() LookupIpOptions
+pkg syscall/zx/net, method (LookupIpOptions) InvertBits() LookupIpOptions
+pkg syscall/zx/net, method (LookupIpOptions) String() string
+pkg syscall/zx/net, method (NameLookupWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/net, method (NameLookupWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/net, type I_ipAddressTag uint64
+pkg syscall/zx/net, type I_nameLookupLookupHostnameResultTag uint64
+pkg syscall/zx/net, type I_nameLookupLookupIp2ResultTag uint64
+pkg syscall/zx/net, type I_nameLookupLookupIpResultTag uint64
+pkg syscall/zx/net, type I_socketAddressTag uint64
+pkg syscall/zx/net, type IpAddress struct
+pkg syscall/zx/net, type IpAddress struct, Ipv4 Ipv4Address
+pkg syscall/zx/net, type IpAddress struct, Ipv6 Ipv6Address
+pkg syscall/zx/net, type IpAddress struct, embedded I_ipAddressTag
+pkg syscall/zx/net, type IpAddressInfo struct
+pkg syscall/zx/net, type IpAddressInfo struct, CanonicalName *string
+pkg syscall/zx/net, type IpAddressInfo struct, Ipv4Addrs []Ipv4Address
+pkg syscall/zx/net, type IpAddressInfo struct, Ipv6Addrs []Ipv6Address
+pkg syscall/zx/net, type Ipv4Address struct
+pkg syscall/zx/net, type Ipv4Address struct, Addr [4]uint8
+pkg syscall/zx/net, type Ipv4SocketAddress struct
+pkg syscall/zx/net, type Ipv4SocketAddress struct, Address Ipv4Address
+pkg syscall/zx/net, type Ipv4SocketAddress struct, Port uint16
+pkg syscall/zx/net, type Ipv6Address struct
+pkg syscall/zx/net, type Ipv6Address struct, Addr [16]uint8
+pkg syscall/zx/net, type Ipv6SocketAddress struct
+pkg syscall/zx/net, type Ipv6SocketAddress struct, Address Ipv6Address
+pkg syscall/zx/net, type Ipv6SocketAddress struct, Port uint16
+pkg syscall/zx/net, type Ipv6SocketAddress struct, ZoneIndex uint64
+pkg syscall/zx/net, type LookupError uint32
+pkg syscall/zx/net, type LookupIpOptions uint8
+pkg syscall/zx/net, type LookupIpOptions2 struct
+pkg syscall/zx/net, type LookupIpOptions2 struct, I_unknownData interface{}
+pkg syscall/zx/net, type LookupIpOptions2 struct, Ipv4Lookup bool
+pkg syscall/zx/net, type LookupIpOptions2 struct, Ipv4LookupPresent bool
+pkg syscall/zx/net, type LookupIpOptions2 struct, Ipv6Lookup bool
+pkg syscall/zx/net, type LookupIpOptions2 struct, Ipv6LookupPresent bool
+pkg syscall/zx/net, type LookupIpOptions2 struct, SortAddresses bool
+pkg syscall/zx/net, type LookupIpOptions2 struct, SortAddressesPresent bool
+pkg syscall/zx/net, type LookupResult struct
+pkg syscall/zx/net, type LookupResult struct, Addresses []IpAddress
+pkg syscall/zx/net, type LookupResult struct, AddressesPresent bool
+pkg syscall/zx/net, type LookupResult struct, I_unknownData interface{}
+pkg syscall/zx/net, type MacAddress struct
+pkg syscall/zx/net, type MacAddress struct, Octets [6]uint8
+pkg syscall/zx/net, type NameLookupEventProxy struct
+pkg syscall/zx/net, type NameLookupEventProxy struct, embedded zx.Channel
+pkg syscall/zx/net, type NameLookupLookupHostnameResponse struct
+pkg syscall/zx/net, type NameLookupLookupHostnameResponse struct, Hostname string
+pkg syscall/zx/net, type NameLookupLookupHostnameResult struct
+pkg syscall/zx/net, type NameLookupLookupHostnameResult struct, Err LookupError
+pkg syscall/zx/net, type NameLookupLookupHostnameResult struct, Response NameLookupLookupHostnameResponse
+pkg syscall/zx/net, type NameLookupLookupHostnameResult struct, embedded I_nameLookupLookupHostnameResultTag
+pkg syscall/zx/net, type NameLookupLookupIp2Response struct
+pkg syscall/zx/net, type NameLookupLookupIp2Response struct, Result LookupResult
+pkg syscall/zx/net, type NameLookupLookupIp2Result struct
+pkg syscall/zx/net, type NameLookupLookupIp2Result struct, Err LookupError
+pkg syscall/zx/net, type NameLookupLookupIp2Result struct, Response NameLookupLookupIp2Response
+pkg syscall/zx/net, type NameLookupLookupIp2Result struct, embedded I_nameLookupLookupIp2ResultTag
+pkg syscall/zx/net, type NameLookupLookupIpResponse struct
+pkg syscall/zx/net, type NameLookupLookupIpResponse struct, Addr IpAddressInfo
+pkg syscall/zx/net, type NameLookupLookupIpResult struct
+pkg syscall/zx/net, type NameLookupLookupIpResult struct, Err LookupError
+pkg syscall/zx/net, type NameLookupLookupIpResult struct, Response NameLookupLookupIpResponse
+pkg syscall/zx/net, type NameLookupLookupIpResult struct, embedded I_nameLookupLookupIpResultTag
+pkg syscall/zx/net, type NameLookupWithCtx interface { LookupHostname, LookupIp, LookupIp2 }
+pkg syscall/zx/net, type NameLookupWithCtx interface, LookupHostname(context.Context, IpAddress) (NameLookupLookupHostnameResult, error)
+pkg syscall/zx/net, type NameLookupWithCtx interface, LookupIp(context.Context, string, LookupIpOptions) (NameLookupLookupIpResult, error)
+pkg syscall/zx/net, type NameLookupWithCtx interface, LookupIp2(context.Context, string, LookupIpOptions2) (NameLookupLookupIp2Result, error)
+pkg syscall/zx/net, type NameLookupWithCtxInterface struct
+pkg syscall/zx/net, type NameLookupWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/net, type NameLookupWithCtxInterfaceRequest struct
+pkg syscall/zx/net, type NameLookupWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/net, type NameLookupWithCtxStub struct
+pkg syscall/zx/net, type NameLookupWithCtxStub struct, Impl NameLookupWithCtx
+pkg syscall/zx/net, type NameLookupWithCtxTransitionalBase struct
+pkg syscall/zx/net, type SocketAddress struct
+pkg syscall/zx/net, type SocketAddress struct, Ipv4 Ipv4SocketAddress
+pkg syscall/zx/net, type SocketAddress struct, Ipv6 Ipv6SocketAddress
+pkg syscall/zx/net, type SocketAddress struct, embedded I_socketAddressTag
+pkg syscall/zx/net, type Subnet struct
+pkg syscall/zx/net, type Subnet struct, Addr IpAddress
+pkg syscall/zx/net, type Subnet struct, PrefixLen uint8
+pkg syscall/zx/net/name, const DnsServerSourceDhcp = 2
+pkg syscall/zx/net/name, const DnsServerSourceDhcp ideal-int
+pkg syscall/zx/net/name, const DnsServerSourceDhcpv6 = 4
+pkg syscall/zx/net/name, const DnsServerSourceDhcpv6 ideal-int
+pkg syscall/zx/net/name, const DnsServerSourceNdp = 3
+pkg syscall/zx/net/name, const DnsServerSourceNdp ideal-int
+pkg syscall/zx/net/name, const DnsServerSourceStaticSource = 1
+pkg syscall/zx/net/name, const DnsServerSourceStaticSource ideal-int
+pkg syscall/zx/net/name, const DnsServerWatcherWatchServersOrdinal = 6289435752595043890
+pkg syscall/zx/net/name, const DnsServerWatcherWatchServersOrdinal uint64
+pkg syscall/zx/net/name, const LookupAdminGetDnsServersOrdinal = 7008449565845288975
+pkg syscall/zx/net/name, const LookupAdminGetDnsServersOrdinal uint64
+pkg syscall/zx/net/name, const LookupAdminName = "fuchsia.net.name.LookupAdmin"
+pkg syscall/zx/net/name, const LookupAdminName ideal-string
+pkg syscall/zx/net/name, const LookupAdminSetDnsServersOrdinal = 6188713333289893526
+pkg syscall/zx/net/name, const LookupAdminSetDnsServersOrdinal uint64
+pkg syscall/zx/net/name, const LookupAdminSetDnsServersResultErr = 2
+pkg syscall/zx/net/name, const LookupAdminSetDnsServersResultErr ideal-int
+pkg syscall/zx/net/name, const LookupAdminSetDnsServersResultResponse = 1
+pkg syscall/zx/net/name, const LookupAdminSetDnsServersResultResponse ideal-int
+pkg syscall/zx/net/name, func DnsServerSourceWithDhcp(DhcpDnsServerSource) DnsServerSource
+pkg syscall/zx/net/name, func DnsServerSourceWithDhcpv6(Dhcpv6DnsServerSource) DnsServerSource
+pkg syscall/zx/net/name, func DnsServerSourceWithNdp(NdpDnsServerSource) DnsServerSource
+pkg syscall/zx/net/name, func DnsServerSourceWithStaticSource(StaticDnsServerSource) DnsServerSource
+pkg syscall/zx/net/name, func LookupAdminSetDnsServersResultWithErr(int32) LookupAdminSetDnsServersResult
+pkg syscall/zx/net/name, func LookupAdminSetDnsServersResultWithResponse(LookupAdminSetDnsServersResponse) LookupAdminSetDnsServersResult
+pkg syscall/zx/net/name, func NewDnsServerWatcherWithCtxInterfaceRequest() (DnsServerWatcherWithCtxInterfaceRequest, *DnsServerWatcherWithCtxInterface, error)
+pkg syscall/zx/net/name, func NewLookupAdminWithCtxInterfaceRequest() (LookupAdminWithCtxInterfaceRequest, *LookupAdminWithCtxInterface, error)
+pkg syscall/zx/net/name, method (*DhcpDnsServerSource) ClearSourceInterface()
+pkg syscall/zx/net/name, method (*DhcpDnsServerSource) GetSourceInterface() uint64
+pkg syscall/zx/net/name, method (*DhcpDnsServerSource) GetSourceInterfaceWithDefault(uint64) uint64
+pkg syscall/zx/net/name, method (*DhcpDnsServerSource) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/net/name, method (*DhcpDnsServerSource) HasSourceInterface() bool
+pkg syscall/zx/net/name, method (*DhcpDnsServerSource) HasUnknownData() bool
+pkg syscall/zx/net/name, method (*DhcpDnsServerSource) SetSourceInterface(uint64)
+pkg syscall/zx/net/name, method (*Dhcpv6DnsServerSource) ClearSourceInterface()
+pkg syscall/zx/net/name, method (*Dhcpv6DnsServerSource) GetSourceInterface() uint64
+pkg syscall/zx/net/name, method (*Dhcpv6DnsServerSource) GetSourceInterfaceWithDefault(uint64) uint64
+pkg syscall/zx/net/name, method (*Dhcpv6DnsServerSource) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/net/name, method (*Dhcpv6DnsServerSource) HasSourceInterface() bool
+pkg syscall/zx/net/name, method (*Dhcpv6DnsServerSource) HasUnknownData() bool
+pkg syscall/zx/net/name, method (*Dhcpv6DnsServerSource) SetSourceInterface(uint64)
+pkg syscall/zx/net/name, method (*DnsServer) ClearAddress()
+pkg syscall/zx/net/name, method (*DnsServer) ClearSource()
+pkg syscall/zx/net/name, method (*DnsServer) GetAddress() net.SocketAddress
+pkg syscall/zx/net/name, method (*DnsServer) GetAddressWithDefault(net.SocketAddress) net.SocketAddress
+pkg syscall/zx/net/name, method (*DnsServer) GetSource() DnsServerSource
+pkg syscall/zx/net/name, method (*DnsServer) GetSourceWithDefault(DnsServerSource) DnsServerSource
+pkg syscall/zx/net/name, method (*DnsServer) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/net/name, method (*DnsServer) HasAddress() bool
+pkg syscall/zx/net/name, method (*DnsServer) HasSource() bool
+pkg syscall/zx/net/name, method (*DnsServer) HasUnknownData() bool
+pkg syscall/zx/net/name, method (*DnsServer) SetAddress(net.SocketAddress)
+pkg syscall/zx/net/name, method (*DnsServer) SetSource(DnsServerSource)
+pkg syscall/zx/net/name, method (*DnsServerSource) Ordinal() uint64
+pkg syscall/zx/net/name, method (*DnsServerSource) SetDhcp(DhcpDnsServerSource)
+pkg syscall/zx/net/name, method (*DnsServerSource) SetDhcpv6(Dhcpv6DnsServerSource)
+pkg syscall/zx/net/name, method (*DnsServerSource) SetNdp(NdpDnsServerSource)
+pkg syscall/zx/net/name, method (*DnsServerSource) SetStaticSource(StaticDnsServerSource)
+pkg syscall/zx/net/name, method (*DnsServerSource) Which() I_dnsServerSourceTag
+pkg syscall/zx/net/name, method (*DnsServerWatcherEventProxy) Handle() *zx.Handle
+pkg syscall/zx/net/name, method (*DnsServerWatcherWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/net/name, method (*DnsServerWatcherWithCtxInterface) WatchServers(context.Context) ([]DnsServer, error)
+pkg syscall/zx/net/name, method (*DnsServerWatcherWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/net/name, method (*DnsServerWatcherWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/net/name, method (*LookupAdminEventProxy) Handle() *zx.Handle
+pkg syscall/zx/net/name, method (*LookupAdminSetDnsServersResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/name, method (*LookupAdminSetDnsServersResult) Ordinal() uint64
+pkg syscall/zx/net/name, method (*LookupAdminSetDnsServersResult) SetErr(int32)
+pkg syscall/zx/net/name, method (*LookupAdminSetDnsServersResult) SetResponse(LookupAdminSetDnsServersResponse)
+pkg syscall/zx/net/name, method (*LookupAdminSetDnsServersResult) Which() I_lookupAdminSetDnsServersResultTag
+pkg syscall/zx/net/name, method (*LookupAdminWithCtxInterface) GetDnsServers(context.Context) ([]net.SocketAddress, error)
+pkg syscall/zx/net/name, method (*LookupAdminWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/net/name, method (*LookupAdminWithCtxInterface) SetDnsServers(context.Context, []net.SocketAddress) (LookupAdminSetDnsServersResult, error)
+pkg syscall/zx/net/name, method (*LookupAdminWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/net/name, method (*LookupAdminWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/net/name, method (*NdpDnsServerSource) ClearSourceInterface()
+pkg syscall/zx/net/name, method (*NdpDnsServerSource) GetSourceInterface() uint64
+pkg syscall/zx/net/name, method (*NdpDnsServerSource) GetSourceInterfaceWithDefault(uint64) uint64
+pkg syscall/zx/net/name, method (*NdpDnsServerSource) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/net/name, method (*NdpDnsServerSource) HasSourceInterface() bool
+pkg syscall/zx/net/name, method (*NdpDnsServerSource) HasUnknownData() bool
+pkg syscall/zx/net/name, method (*NdpDnsServerSource) SetSourceInterface(uint64)
+pkg syscall/zx/net/name, method (*StaticDnsServerSource) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/net/name, method (*StaticDnsServerSource) HasUnknownData() bool
+pkg syscall/zx/net/name, method (LookupAdminWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/net/name, method (LookupAdminWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/net/name, type DhcpDnsServerSource struct
+pkg syscall/zx/net/name, type DhcpDnsServerSource struct, I_unknownData interface{}
+pkg syscall/zx/net/name, type DhcpDnsServerSource struct, SourceInterface uint64
+pkg syscall/zx/net/name, type DhcpDnsServerSource struct, SourceInterfacePresent bool
+pkg syscall/zx/net/name, type Dhcpv6DnsServerSource struct
+pkg syscall/zx/net/name, type Dhcpv6DnsServerSource struct, I_unknownData interface{}
+pkg syscall/zx/net/name, type Dhcpv6DnsServerSource struct, SourceInterface uint64
+pkg syscall/zx/net/name, type Dhcpv6DnsServerSource struct, SourceInterfacePresent bool
+pkg syscall/zx/net/name, type DnsServer struct
+pkg syscall/zx/net/name, type DnsServer struct, Address net.SocketAddress
+pkg syscall/zx/net/name, type DnsServer struct, AddressPresent bool
+pkg syscall/zx/net/name, type DnsServer struct, I_unknownData interface{}
+pkg syscall/zx/net/name, type DnsServer struct, Source DnsServerSource
+pkg syscall/zx/net/name, type DnsServer struct, SourcePresent bool
+pkg syscall/zx/net/name, type DnsServerSource struct
+pkg syscall/zx/net/name, type DnsServerSource struct, Dhcp DhcpDnsServerSource
+pkg syscall/zx/net/name, type DnsServerSource struct, Dhcpv6 Dhcpv6DnsServerSource
+pkg syscall/zx/net/name, type DnsServerSource struct, Ndp NdpDnsServerSource
+pkg syscall/zx/net/name, type DnsServerSource struct, StaticSource StaticDnsServerSource
+pkg syscall/zx/net/name, type DnsServerSource struct, embedded I_dnsServerSourceTag
+pkg syscall/zx/net/name, type DnsServerWatcherEventProxy struct
+pkg syscall/zx/net/name, type DnsServerWatcherEventProxy struct, embedded zx.Channel
+pkg syscall/zx/net/name, type DnsServerWatcherWithCtx interface { WatchServers }
+pkg syscall/zx/net/name, type DnsServerWatcherWithCtx interface, WatchServers(context.Context) ([]DnsServer, error)
+pkg syscall/zx/net/name, type DnsServerWatcherWithCtxInterface struct
+pkg syscall/zx/net/name, type DnsServerWatcherWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/net/name, type DnsServerWatcherWithCtxInterfaceRequest struct
+pkg syscall/zx/net/name, type DnsServerWatcherWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/net/name, type DnsServerWatcherWithCtxStub struct
+pkg syscall/zx/net/name, type DnsServerWatcherWithCtxStub struct, Impl DnsServerWatcherWithCtx
+pkg syscall/zx/net/name, type DnsServerWatcherWithCtxTransitionalBase struct
+pkg syscall/zx/net/name, type I_dnsServerSourceTag uint64
+pkg syscall/zx/net/name, type I_lookupAdminSetDnsServersResultTag uint64
+pkg syscall/zx/net/name, type LookupAdminEventProxy struct
+pkg syscall/zx/net/name, type LookupAdminEventProxy struct, embedded zx.Channel
+pkg syscall/zx/net/name, type LookupAdminSetDnsServersResponse struct
+pkg syscall/zx/net/name, type LookupAdminSetDnsServersResult struct
+pkg syscall/zx/net/name, type LookupAdminSetDnsServersResult struct, Err int32
+pkg syscall/zx/net/name, type LookupAdminSetDnsServersResult struct, Response LookupAdminSetDnsServersResponse
+pkg syscall/zx/net/name, type LookupAdminSetDnsServersResult struct, embedded I_lookupAdminSetDnsServersResultTag
+pkg syscall/zx/net/name, type LookupAdminWithCtx interface { GetDnsServers, SetDnsServers }
+pkg syscall/zx/net/name, type LookupAdminWithCtx interface, GetDnsServers(context.Context) ([]net.SocketAddress, error)
+pkg syscall/zx/net/name, type LookupAdminWithCtx interface, SetDnsServers(context.Context, []net.SocketAddress) (LookupAdminSetDnsServersResult, error)
+pkg syscall/zx/net/name, type LookupAdminWithCtxInterface struct
+pkg syscall/zx/net/name, type LookupAdminWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/net/name, type LookupAdminWithCtxInterfaceRequest struct
+pkg syscall/zx/net/name, type LookupAdminWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/net/name, type LookupAdminWithCtxStub struct
+pkg syscall/zx/net/name, type LookupAdminWithCtxStub struct, Impl LookupAdminWithCtx
+pkg syscall/zx/net/name, type LookupAdminWithCtxTransitionalBase struct
+pkg syscall/zx/net/name, type NdpDnsServerSource struct
+pkg syscall/zx/net/name, type NdpDnsServerSource struct, I_unknownData interface{}
+pkg syscall/zx/net/name, type NdpDnsServerSource struct, SourceInterface uint64
+pkg syscall/zx/net/name, type NdpDnsServerSource struct, SourceInterfacePresent bool
+pkg syscall/zx/net/name, type StaticDnsServerSource struct
+pkg syscall/zx/net/name, type StaticDnsServerSource struct, I_unknownData interface{}
+pkg syscall/zx/net/stack, const AdministrativeStatusDisabled = 1
+pkg syscall/zx/net/stack, const AdministrativeStatusDisabled AdministrativeStatus
+pkg syscall/zx/net/stack, const AdministrativeStatusEnabled = 2
+pkg syscall/zx/net/stack, const AdministrativeStatusEnabled AdministrativeStatus
+pkg syscall/zx/net/stack, const DeviceDefinitionEthernet = 2
+pkg syscall/zx/net/stack, const DeviceDefinitionEthernet ideal-int
+pkg syscall/zx/net/stack, const DeviceDefinitionIp = 1
+pkg syscall/zx/net/stack, const DeviceDefinitionIp ideal-int
+pkg syscall/zx/net/stack, const ErrorAlreadyExists = 7
+pkg syscall/zx/net/stack, const ErrorAlreadyExists Error
+pkg syscall/zx/net/stack, const ErrorBadState = 4
+pkg syscall/zx/net/stack, const ErrorBadState Error
+pkg syscall/zx/net/stack, const ErrorInternal = 1
+pkg syscall/zx/net/stack, const ErrorInternal Error
+pkg syscall/zx/net/stack, const ErrorInvalidArgs = 3
+pkg syscall/zx/net/stack, const ErrorInvalidArgs Error
+pkg syscall/zx/net/stack, const ErrorIo = 8
+pkg syscall/zx/net/stack, const ErrorIo Error
+pkg syscall/zx/net/stack, const ErrorNotFound = 6
+pkg syscall/zx/net/stack, const ErrorNotFound Error
+pkg syscall/zx/net/stack, const ErrorNotSupported = 2
+pkg syscall/zx/net/stack, const ErrorNotSupported Error
+pkg syscall/zx/net/stack, const ErrorTimeOut = 5
+pkg syscall/zx/net/stack, const ErrorTimeOut Error
+pkg syscall/zx/net/stack, const ForwardingDestinationDeviceId = 1
+pkg syscall/zx/net/stack, const ForwardingDestinationDeviceId ideal-int
+pkg syscall/zx/net/stack, const ForwardingDestinationNextHop = 2
+pkg syscall/zx/net/stack, const ForwardingDestinationNextHop ideal-int
+pkg syscall/zx/net/stack, const InterfaceStatusAdministrative = 3
+pkg syscall/zx/net/stack, const InterfaceStatusAdministrative ideal-int
+pkg syscall/zx/net/stack, const InterfaceStatusPhysical = 2
+pkg syscall/zx/net/stack, const InterfaceStatusPhysical ideal-int
+pkg syscall/zx/net/stack, const InterfaceStatusPresence = 1
+pkg syscall/zx/net/stack, const InterfaceStatusPresence ideal-int
+pkg syscall/zx/net/stack, const LogName = "fuchsia.net.stack.Log"
+pkg syscall/zx/net/stack, const LogName ideal-string
+pkg syscall/zx/net/stack, const LogSetLogLevelOrdinal = 6911347848628159824
+pkg syscall/zx/net/stack, const LogSetLogLevelOrdinal uint64
+pkg syscall/zx/net/stack, const LogSetLogLevelResultErr = 2
+pkg syscall/zx/net/stack, const LogSetLogLevelResultErr ideal-int
+pkg syscall/zx/net/stack, const LogSetLogLevelResultResponse = 1
+pkg syscall/zx/net/stack, const LogSetLogLevelResultResponse ideal-int
+pkg syscall/zx/net/stack, const LogSetLogPacketsOrdinal = 2411119378094307214
+pkg syscall/zx/net/stack, const LogSetLogPacketsOrdinal uint64
+pkg syscall/zx/net/stack, const PhysicalStatusDown = 1
+pkg syscall/zx/net/stack, const PhysicalStatusDown PhysicalStatus
+pkg syscall/zx/net/stack, const PhysicalStatusUp = 2
+pkg syscall/zx/net/stack, const PhysicalStatusUp PhysicalStatus
+pkg syscall/zx/net/stack, const PresenceStatusAdded = 1
+pkg syscall/zx/net/stack, const PresenceStatusAdded PresenceStatus
+pkg syscall/zx/net/stack, const PresenceStatusRemoved = 2
+pkg syscall/zx/net/stack, const PresenceStatusRemoved PresenceStatus
+pkg syscall/zx/net/stack, const StackAddEthernetInterfaceOrdinal = 6870016835876846171
+pkg syscall/zx/net/stack, const StackAddEthernetInterfaceOrdinal uint64
+pkg syscall/zx/net/stack, const StackAddEthernetInterfaceResultErr = 2
+pkg syscall/zx/net/stack, const StackAddEthernetInterfaceResultErr ideal-int
+pkg syscall/zx/net/stack, const StackAddEthernetInterfaceResultResponse = 1
+pkg syscall/zx/net/stack, const StackAddEthernetInterfaceResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackAddForwardingEntryOrdinal = 6909087013720324361
+pkg syscall/zx/net/stack, const StackAddForwardingEntryOrdinal uint64
+pkg syscall/zx/net/stack, const StackAddForwardingEntryResultErr = 2
+pkg syscall/zx/net/stack, const StackAddForwardingEntryResultErr ideal-int
+pkg syscall/zx/net/stack, const StackAddForwardingEntryResultResponse = 1
+pkg syscall/zx/net/stack, const StackAddForwardingEntryResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackAddInterfaceAddressOrdinal = 7791732415791509155
+pkg syscall/zx/net/stack, const StackAddInterfaceAddressOrdinal uint64
+pkg syscall/zx/net/stack, const StackAddInterfaceAddressResultErr = 2
+pkg syscall/zx/net/stack, const StackAddInterfaceAddressResultErr ideal-int
+pkg syscall/zx/net/stack, const StackAddInterfaceAddressResultResponse = 1
+pkg syscall/zx/net/stack, const StackAddInterfaceAddressResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackAddInterfaceOrdinal = 1641334633485935305
+pkg syscall/zx/net/stack, const StackAddInterfaceOrdinal uint64
+pkg syscall/zx/net/stack, const StackAddInterfaceResultErr = 2
+pkg syscall/zx/net/stack, const StackAddInterfaceResultErr ideal-int
+pkg syscall/zx/net/stack, const StackAddInterfaceResultResponse = 1
+pkg syscall/zx/net/stack, const StackAddInterfaceResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackDelEthernetInterfaceOrdinal = 2197540151352338667
+pkg syscall/zx/net/stack, const StackDelEthernetInterfaceOrdinal uint64
+pkg syscall/zx/net/stack, const StackDelEthernetInterfaceResultErr = 2
+pkg syscall/zx/net/stack, const StackDelEthernetInterfaceResultErr ideal-int
+pkg syscall/zx/net/stack, const StackDelEthernetInterfaceResultResponse = 1
+pkg syscall/zx/net/stack, const StackDelEthernetInterfaceResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackDelForwardingEntryOrdinal = 6201238179434680765
+pkg syscall/zx/net/stack, const StackDelForwardingEntryOrdinal uint64
+pkg syscall/zx/net/stack, const StackDelForwardingEntryResultErr = 2
+pkg syscall/zx/net/stack, const StackDelForwardingEntryResultErr ideal-int
+pkg syscall/zx/net/stack, const StackDelForwardingEntryResultResponse = 1
+pkg syscall/zx/net/stack, const StackDelForwardingEntryResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackDelInterfaceAddressOrdinal = 8292708660070809325
+pkg syscall/zx/net/stack, const StackDelInterfaceAddressOrdinal uint64
+pkg syscall/zx/net/stack, const StackDelInterfaceAddressResultErr = 2
+pkg syscall/zx/net/stack, const StackDelInterfaceAddressResultErr ideal-int
+pkg syscall/zx/net/stack, const StackDelInterfaceAddressResultResponse = 1
+pkg syscall/zx/net/stack, const StackDelInterfaceAddressResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackDisableInterfaceOrdinal = 1658386580839026055
+pkg syscall/zx/net/stack, const StackDisableInterfaceOrdinal uint64
+pkg syscall/zx/net/stack, const StackDisableInterfaceResultErr = 2
+pkg syscall/zx/net/stack, const StackDisableInterfaceResultErr ideal-int
+pkg syscall/zx/net/stack, const StackDisableInterfaceResultResponse = 1
+pkg syscall/zx/net/stack, const StackDisableInterfaceResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackDisableIpForwardingOrdinal = 5151906024393601524
+pkg syscall/zx/net/stack, const StackDisableIpForwardingOrdinal uint64
+pkg syscall/zx/net/stack, const StackDisablePacketFilterOrdinal = 4644404475518437475
+pkg syscall/zx/net/stack, const StackDisablePacketFilterOrdinal uint64
+pkg syscall/zx/net/stack, const StackDisablePacketFilterResultErr = 2
+pkg syscall/zx/net/stack, const StackDisablePacketFilterResultErr ideal-int
+pkg syscall/zx/net/stack, const StackDisablePacketFilterResultResponse = 1
+pkg syscall/zx/net/stack, const StackDisablePacketFilterResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackEnableInterfaceOrdinal = 2820352783247255794
+pkg syscall/zx/net/stack, const StackEnableInterfaceOrdinal uint64
+pkg syscall/zx/net/stack, const StackEnableInterfaceResultErr = 2
+pkg syscall/zx/net/stack, const StackEnableInterfaceResultErr ideal-int
+pkg syscall/zx/net/stack, const StackEnableInterfaceResultResponse = 1
+pkg syscall/zx/net/stack, const StackEnableInterfaceResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackEnableIpForwardingOrdinal = 2945795449612107372
+pkg syscall/zx/net/stack, const StackEnableIpForwardingOrdinal uint64
+pkg syscall/zx/net/stack, const StackEnablePacketFilterOrdinal = 2287079607274353053
+pkg syscall/zx/net/stack, const StackEnablePacketFilterOrdinal uint64
+pkg syscall/zx/net/stack, const StackEnablePacketFilterResultErr = 2
+pkg syscall/zx/net/stack, const StackEnablePacketFilterResultErr ideal-int
+pkg syscall/zx/net/stack, const StackEnablePacketFilterResultResponse = 1
+pkg syscall/zx/net/stack, const StackEnablePacketFilterResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackGetDnsServerWatcherOrdinal = 1499426100045738886
+pkg syscall/zx/net/stack, const StackGetDnsServerWatcherOrdinal uint64
+pkg syscall/zx/net/stack, const StackGetForwardingTableOrdinal = 7921890673159623407
+pkg syscall/zx/net/stack, const StackGetForwardingTableOrdinal uint64
+pkg syscall/zx/net/stack, const StackGetInterfaceInfoOrdinal = 6149228131642639155
+pkg syscall/zx/net/stack, const StackGetInterfaceInfoOrdinal uint64
+pkg syscall/zx/net/stack, const StackGetInterfaceInfoResultErr = 2
+pkg syscall/zx/net/stack, const StackGetInterfaceInfoResultErr ideal-int
+pkg syscall/zx/net/stack, const StackGetInterfaceInfoResultResponse = 1
+pkg syscall/zx/net/stack, const StackGetInterfaceInfoResultResponse ideal-int
+pkg syscall/zx/net/stack, const StackListInterfacesOrdinal = 8671789085580757092
+pkg syscall/zx/net/stack, const StackListInterfacesOrdinal uint64
+pkg syscall/zx/net/stack, const StackName = "fuchsia.net.stack.Stack"
+pkg syscall/zx/net/stack, const StackName ideal-string
+pkg syscall/zx/net/stack, const StackOnInterfaceStatusChangeOrdinal = 7732013461409440254
+pkg syscall/zx/net/stack, const StackOnInterfaceStatusChangeOrdinal uint64
+pkg syscall/zx/net/stack, func DeviceDefinitionWithEthernet(EthernetDeviceDefinition) DeviceDefinition
+pkg syscall/zx/net/stack, func DeviceDefinitionWithIp(network.DeviceWithCtxInterface) DeviceDefinition
+pkg syscall/zx/net/stack, func ForwardingDestinationWithDeviceId(uint64) ForwardingDestination
+pkg syscall/zx/net/stack, func ForwardingDestinationWithNextHop(net.IpAddress) ForwardingDestination
+pkg syscall/zx/net/stack, func InterfaceStatusWithAdministrative(AdministrativeStatus) InterfaceStatus
+pkg syscall/zx/net/stack, func InterfaceStatusWithPhysical(PhysicalStatus) InterfaceStatus
+pkg syscall/zx/net/stack, func InterfaceStatusWithPresence(PresenceStatus) InterfaceStatus
+pkg syscall/zx/net/stack, func LogSetLogLevelResultWithErr(Error) LogSetLogLevelResult
+pkg syscall/zx/net/stack, func LogSetLogLevelResultWithResponse(LogSetLogLevelResponse) LogSetLogLevelResult
+pkg syscall/zx/net/stack, func NewLogWithCtxInterfaceRequest() (LogWithCtxInterfaceRequest, *LogWithCtxInterface, error)
+pkg syscall/zx/net/stack, func NewStackWithCtxInterfaceRequest() (StackWithCtxInterfaceRequest, *StackWithCtxInterface, error)
+pkg syscall/zx/net/stack, func StackAddEthernetInterfaceResultWithErr(Error) StackAddEthernetInterfaceResult
+pkg syscall/zx/net/stack, func StackAddEthernetInterfaceResultWithResponse(StackAddEthernetInterfaceResponse) StackAddEthernetInterfaceResult
+pkg syscall/zx/net/stack, func StackAddForwardingEntryResultWithErr(Error) StackAddForwardingEntryResult
+pkg syscall/zx/net/stack, func StackAddForwardingEntryResultWithResponse(StackAddForwardingEntryResponse) StackAddForwardingEntryResult
+pkg syscall/zx/net/stack, func StackAddInterfaceAddressResultWithErr(Error) StackAddInterfaceAddressResult
+pkg syscall/zx/net/stack, func StackAddInterfaceAddressResultWithResponse(StackAddInterfaceAddressResponse) StackAddInterfaceAddressResult
+pkg syscall/zx/net/stack, func StackAddInterfaceResultWithErr(Error) StackAddInterfaceResult
+pkg syscall/zx/net/stack, func StackAddInterfaceResultWithResponse(StackAddInterfaceResponse) StackAddInterfaceResult
+pkg syscall/zx/net/stack, func StackDelEthernetInterfaceResultWithErr(Error) StackDelEthernetInterfaceResult
+pkg syscall/zx/net/stack, func StackDelEthernetInterfaceResultWithResponse(StackDelEthernetInterfaceResponse) StackDelEthernetInterfaceResult
+pkg syscall/zx/net/stack, func StackDelForwardingEntryResultWithErr(Error) StackDelForwardingEntryResult
+pkg syscall/zx/net/stack, func StackDelForwardingEntryResultWithResponse(StackDelForwardingEntryResponse) StackDelForwardingEntryResult
+pkg syscall/zx/net/stack, func StackDelInterfaceAddressResultWithErr(Error) StackDelInterfaceAddressResult
+pkg syscall/zx/net/stack, func StackDelInterfaceAddressResultWithResponse(StackDelInterfaceAddressResponse) StackDelInterfaceAddressResult
+pkg syscall/zx/net/stack, func StackDisableInterfaceResultWithErr(Error) StackDisableInterfaceResult
+pkg syscall/zx/net/stack, func StackDisableInterfaceResultWithResponse(StackDisableInterfaceResponse) StackDisableInterfaceResult
+pkg syscall/zx/net/stack, func StackDisablePacketFilterResultWithErr(Error) StackDisablePacketFilterResult
+pkg syscall/zx/net/stack, func StackDisablePacketFilterResultWithResponse(StackDisablePacketFilterResponse) StackDisablePacketFilterResult
+pkg syscall/zx/net/stack, func StackEnableInterfaceResultWithErr(Error) StackEnableInterfaceResult
+pkg syscall/zx/net/stack, func StackEnableInterfaceResultWithResponse(StackEnableInterfaceResponse) StackEnableInterfaceResult
+pkg syscall/zx/net/stack, func StackEnablePacketFilterResultWithErr(Error) StackEnablePacketFilterResult
+pkg syscall/zx/net/stack, func StackEnablePacketFilterResultWithResponse(StackEnablePacketFilterResponse) StackEnablePacketFilterResult
+pkg syscall/zx/net/stack, func StackGetInterfaceInfoResultWithErr(Error) StackGetInterfaceInfoResult
+pkg syscall/zx/net/stack, func StackGetInterfaceInfoResultWithResponse(StackGetInterfaceInfoResponse) StackGetInterfaceInfoResult
+pkg syscall/zx/net/stack, method (*DeviceDefinition) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*DeviceDefinition) SetEthernet(EthernetDeviceDefinition)
+pkg syscall/zx/net/stack, method (*DeviceDefinition) SetIp(network.DeviceWithCtxInterface)
+pkg syscall/zx/net/stack, method (*DeviceDefinition) Which() I_deviceDefinitionTag
+pkg syscall/zx/net/stack, method (*EthernetDeviceDefinition) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*ForwardingDestination) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*ForwardingDestination) SetDeviceId(uint64)
+pkg syscall/zx/net/stack, method (*ForwardingDestination) SetNextHop(net.IpAddress)
+pkg syscall/zx/net/stack, method (*ForwardingDestination) Which() I_forwardingDestinationTag
+pkg syscall/zx/net/stack, method (*ForwardingEntry) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*InterfaceConfig) ClearMetric()
+pkg syscall/zx/net/stack, method (*InterfaceConfig) ClearName()
+pkg syscall/zx/net/stack, method (*InterfaceConfig) ClearTopopath()
+pkg syscall/zx/net/stack, method (*InterfaceConfig) GetMetric() uint32
+pkg syscall/zx/net/stack, method (*InterfaceConfig) GetMetricWithDefault(uint32) uint32
+pkg syscall/zx/net/stack, method (*InterfaceConfig) GetName() string
+pkg syscall/zx/net/stack, method (*InterfaceConfig) GetNameWithDefault(string) string
+pkg syscall/zx/net/stack, method (*InterfaceConfig) GetTopopath() string
+pkg syscall/zx/net/stack, method (*InterfaceConfig) GetTopopathWithDefault(string) string
+pkg syscall/zx/net/stack, method (*InterfaceConfig) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/net/stack, method (*InterfaceConfig) HasMetric() bool
+pkg syscall/zx/net/stack, method (*InterfaceConfig) HasName() bool
+pkg syscall/zx/net/stack, method (*InterfaceConfig) HasTopopath() bool
+pkg syscall/zx/net/stack, method (*InterfaceConfig) HasUnknownData() bool
+pkg syscall/zx/net/stack, method (*InterfaceConfig) SetMetric(uint32)
+pkg syscall/zx/net/stack, method (*InterfaceConfig) SetName(string)
+pkg syscall/zx/net/stack, method (*InterfaceConfig) SetTopopath(string)
+pkg syscall/zx/net/stack, method (*InterfaceInfo) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*InterfaceProperties) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*InterfaceStatus) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*InterfaceStatus) SetAdministrative(AdministrativeStatus)
+pkg syscall/zx/net/stack, method (*InterfaceStatus) SetPhysical(PhysicalStatus)
+pkg syscall/zx/net/stack, method (*InterfaceStatus) SetPresence(PresenceStatus)
+pkg syscall/zx/net/stack, method (*InterfaceStatus) Which() I_interfaceStatusTag
+pkg syscall/zx/net/stack, method (*InterfaceStatusChange) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*LogEventProxy) Handle() *zx.Handle
+pkg syscall/zx/net/stack, method (*LogSetLogLevelResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*LogSetLogLevelResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*LogSetLogLevelResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*LogSetLogLevelResult) SetResponse(LogSetLogLevelResponse)
+pkg syscall/zx/net/stack, method (*LogSetLogLevelResult) Which() I_logSetLogLevelResultTag
+pkg syscall/zx/net/stack, method (*LogWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/net/stack, method (*LogWithCtxInterface) SetLogLevel(context.Context, logger.LogLevelFilter) (LogSetLogLevelResult, error)
+pkg syscall/zx/net/stack, method (*LogWithCtxInterface) SetLogPackets(context.Context, bool) error
+pkg syscall/zx/net/stack, method (*LogWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/net/stack, method (*LogWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/net/stack, method (*StackAddEthernetInterfaceResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackAddEthernetInterfaceResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackAddEthernetInterfaceResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackAddEthernetInterfaceResult) SetResponse(StackAddEthernetInterfaceResponse)
+pkg syscall/zx/net/stack, method (*StackAddEthernetInterfaceResult) Which() I_stackAddEthernetInterfaceResultTag
+pkg syscall/zx/net/stack, method (*StackAddForwardingEntryResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackAddForwardingEntryResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackAddForwardingEntryResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackAddForwardingEntryResult) SetResponse(StackAddForwardingEntryResponse)
+pkg syscall/zx/net/stack, method (*StackAddForwardingEntryResult) Which() I_stackAddForwardingEntryResultTag
+pkg syscall/zx/net/stack, method (*StackAddInterfaceAddressResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackAddInterfaceAddressResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackAddInterfaceAddressResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackAddInterfaceAddressResult) SetResponse(StackAddInterfaceAddressResponse)
+pkg syscall/zx/net/stack, method (*StackAddInterfaceAddressResult) Which() I_stackAddInterfaceAddressResultTag
+pkg syscall/zx/net/stack, method (*StackAddInterfaceResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackAddInterfaceResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackAddInterfaceResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackAddInterfaceResult) SetResponse(StackAddInterfaceResponse)
+pkg syscall/zx/net/stack, method (*StackAddInterfaceResult) Which() I_stackAddInterfaceResultTag
+pkg syscall/zx/net/stack, method (*StackDelEthernetInterfaceResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackDelEthernetInterfaceResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackDelEthernetInterfaceResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackDelEthernetInterfaceResult) SetResponse(StackDelEthernetInterfaceResponse)
+pkg syscall/zx/net/stack, method (*StackDelEthernetInterfaceResult) Which() I_stackDelEthernetInterfaceResultTag
+pkg syscall/zx/net/stack, method (*StackDelForwardingEntryResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackDelForwardingEntryResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackDelForwardingEntryResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackDelForwardingEntryResult) SetResponse(StackDelForwardingEntryResponse)
+pkg syscall/zx/net/stack, method (*StackDelForwardingEntryResult) Which() I_stackDelForwardingEntryResultTag
+pkg syscall/zx/net/stack, method (*StackDelInterfaceAddressResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackDelInterfaceAddressResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackDelInterfaceAddressResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackDelInterfaceAddressResult) SetResponse(StackDelInterfaceAddressResponse)
+pkg syscall/zx/net/stack, method (*StackDelInterfaceAddressResult) Which() I_stackDelInterfaceAddressResultTag
+pkg syscall/zx/net/stack, method (*StackDisableInterfaceResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackDisableInterfaceResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackDisableInterfaceResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackDisableInterfaceResult) SetResponse(StackDisableInterfaceResponse)
+pkg syscall/zx/net/stack, method (*StackDisableInterfaceResult) Which() I_stackDisableInterfaceResultTag
+pkg syscall/zx/net/stack, method (*StackDisablePacketFilterResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackDisablePacketFilterResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackDisablePacketFilterResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackDisablePacketFilterResult) SetResponse(StackDisablePacketFilterResponse)
+pkg syscall/zx/net/stack, method (*StackDisablePacketFilterResult) Which() I_stackDisablePacketFilterResultTag
+pkg syscall/zx/net/stack, method (*StackEnableInterfaceResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackEnableInterfaceResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackEnableInterfaceResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackEnableInterfaceResult) SetResponse(StackEnableInterfaceResponse)
+pkg syscall/zx/net/stack, method (*StackEnableInterfaceResult) Which() I_stackEnableInterfaceResultTag
+pkg syscall/zx/net/stack, method (*StackEnablePacketFilterResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackEnablePacketFilterResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackEnablePacketFilterResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackEnablePacketFilterResult) SetResponse(StackEnablePacketFilterResponse)
+pkg syscall/zx/net/stack, method (*StackEnablePacketFilterResult) Which() I_stackEnablePacketFilterResultTag
+pkg syscall/zx/net/stack, method (*StackEventProxy) Handle() *zx.Handle
+pkg syscall/zx/net/stack, method (*StackEventProxy) OnInterfaceStatusChange(InterfaceStatusChange) error
+pkg syscall/zx/net/stack, method (*StackGetInterfaceInfoResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/net/stack, method (*StackGetInterfaceInfoResult) Ordinal() uint64
+pkg syscall/zx/net/stack, method (*StackGetInterfaceInfoResult) SetErr(Error)
+pkg syscall/zx/net/stack, method (*StackGetInterfaceInfoResult) SetResponse(StackGetInterfaceInfoResponse)
+pkg syscall/zx/net/stack, method (*StackGetInterfaceInfoResult) Which() I_stackGetInterfaceInfoResultTag
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) AddEthernetInterface(context.Context, string, ethernet.DeviceWithCtxInterface) (StackAddEthernetInterfaceResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) AddForwardingEntry(context.Context, ForwardingEntry) (StackAddForwardingEntryResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) AddInterface(context.Context, InterfaceConfig, DeviceDefinition) (StackAddInterfaceResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) AddInterfaceAddress(context.Context, uint64, net.Subnet) (StackAddInterfaceAddressResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) DelEthernetInterface(context.Context, uint64) (StackDelEthernetInterfaceResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) DelForwardingEntry(context.Context, net.Subnet) (StackDelForwardingEntryResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) DelInterfaceAddress(context.Context, uint64, net.Subnet) (StackDelInterfaceAddressResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) DisableInterface(context.Context, uint64) (StackDisableInterfaceResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) DisableIpForwarding(context.Context) error
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) DisablePacketFilter(context.Context, uint64) (StackDisablePacketFilterResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) EnableInterface(context.Context, uint64) (StackEnableInterfaceResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) EnableIpForwarding(context.Context) error
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) EnablePacketFilter(context.Context, uint64) (StackEnablePacketFilterResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) ExpectOnInterfaceStatusChange(context.Context) (InterfaceStatusChange, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) GetDnsServerWatcher(context.Context, name.DnsServerWatcherWithCtxInterfaceRequest) error
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) GetForwardingTable(context.Context) ([]ForwardingEntry, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) GetInterfaceInfo(context.Context, uint64) (StackGetInterfaceInfoResult, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/net/stack, method (*StackWithCtxInterface) ListInterfaces(context.Context) ([]InterfaceInfo, error)
+pkg syscall/zx/net/stack, method (*StackWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/net/stack, method (*StackWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/net/stack, method (AdministrativeStatus) I_EnumIsStrict() bool
+pkg syscall/zx/net/stack, method (AdministrativeStatus) I_EnumValues() []AdministrativeStatus
+pkg syscall/zx/net/stack, method (AdministrativeStatus) IsUnknown() bool
+pkg syscall/zx/net/stack, method (AdministrativeStatus) String() string
+pkg syscall/zx/net/stack, method (Error) I_EnumIsStrict() bool
+pkg syscall/zx/net/stack, method (Error) I_EnumValues() []Error
+pkg syscall/zx/net/stack, method (Error) IsUnknown() bool
+pkg syscall/zx/net/stack, method (Error) String() string
+pkg syscall/zx/net/stack, method (LogWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/net/stack, method (LogWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/net/stack, method (PhysicalStatus) I_EnumIsStrict() bool
+pkg syscall/zx/net/stack, method (PhysicalStatus) I_EnumValues() []PhysicalStatus
+pkg syscall/zx/net/stack, method (PhysicalStatus) IsUnknown() bool
+pkg syscall/zx/net/stack, method (PhysicalStatus) String() string
+pkg syscall/zx/net/stack, method (PresenceStatus) I_EnumIsStrict() bool
+pkg syscall/zx/net/stack, method (PresenceStatus) I_EnumValues() []PresenceStatus
+pkg syscall/zx/net/stack, method (PresenceStatus) IsUnknown() bool
+pkg syscall/zx/net/stack, method (PresenceStatus) String() string
+pkg syscall/zx/net/stack, method (StackWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/net/stack, method (StackWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/net/stack, type AdministrativeStatus uint32
+pkg syscall/zx/net/stack, type DeviceDefinition struct
+pkg syscall/zx/net/stack, type DeviceDefinition struct, Ethernet EthernetDeviceDefinition
+pkg syscall/zx/net/stack, type DeviceDefinition struct, Ip network.DeviceWithCtxInterface
+pkg syscall/zx/net/stack, type DeviceDefinition struct, embedded I_deviceDefinitionTag
+pkg syscall/zx/net/stack, type Error uint32
+pkg syscall/zx/net/stack, type EthernetDeviceDefinition struct
+pkg syscall/zx/net/stack, type EthernetDeviceDefinition struct, Mac network.MacAddressingWithCtxInterface
+pkg syscall/zx/net/stack, type EthernetDeviceDefinition struct, NetworkDevice network.DeviceWithCtxInterface
+pkg syscall/zx/net/stack, type ForwardingDestination struct
+pkg syscall/zx/net/stack, type ForwardingDestination struct, DeviceId uint64
+pkg syscall/zx/net/stack, type ForwardingDestination struct, NextHop net.IpAddress
+pkg syscall/zx/net/stack, type ForwardingDestination struct, embedded I_forwardingDestinationTag
+pkg syscall/zx/net/stack, type ForwardingEntry struct
+pkg syscall/zx/net/stack, type ForwardingEntry struct, Destination ForwardingDestination
+pkg syscall/zx/net/stack, type ForwardingEntry struct, Subnet net.Subnet
+pkg syscall/zx/net/stack, type I_deviceDefinitionTag uint64
+pkg syscall/zx/net/stack, type I_forwardingDestinationTag uint64
+pkg syscall/zx/net/stack, type I_interfaceStatusTag uint64
+pkg syscall/zx/net/stack, type I_logSetLogLevelResultTag uint64
+pkg syscall/zx/net/stack, type I_stackAddEthernetInterfaceResultTag uint64
+pkg syscall/zx/net/stack, type I_stackAddForwardingEntryResultTag uint64
+pkg syscall/zx/net/stack, type I_stackAddInterfaceAddressResultTag uint64
+pkg syscall/zx/net/stack, type I_stackAddInterfaceResultTag uint64
+pkg syscall/zx/net/stack, type I_stackDelEthernetInterfaceResultTag uint64
+pkg syscall/zx/net/stack, type I_stackDelForwardingEntryResultTag uint64
+pkg syscall/zx/net/stack, type I_stackDelInterfaceAddressResultTag uint64
+pkg syscall/zx/net/stack, type I_stackDisableInterfaceResultTag uint64
+pkg syscall/zx/net/stack, type I_stackDisablePacketFilterResultTag uint64
+pkg syscall/zx/net/stack, type I_stackEnableInterfaceResultTag uint64
+pkg syscall/zx/net/stack, type I_stackEnablePacketFilterResultTag uint64
+pkg syscall/zx/net/stack, type I_stackGetInterfaceInfoResultTag uint64
+pkg syscall/zx/net/stack, type InterfaceConfig struct
+pkg syscall/zx/net/stack, type InterfaceConfig struct, I_unknownData interface{}
+pkg syscall/zx/net/stack, type InterfaceConfig struct, Metric uint32
+pkg syscall/zx/net/stack, type InterfaceConfig struct, MetricPresent bool
+pkg syscall/zx/net/stack, type InterfaceConfig struct, Name string
+pkg syscall/zx/net/stack, type InterfaceConfig struct, NamePresent bool
+pkg syscall/zx/net/stack, type InterfaceConfig struct, Topopath string
+pkg syscall/zx/net/stack, type InterfaceConfig struct, TopopathPresent bool
+pkg syscall/zx/net/stack, type InterfaceInfo struct
+pkg syscall/zx/net/stack, type InterfaceInfo struct, Id uint64
+pkg syscall/zx/net/stack, type InterfaceInfo struct, Properties InterfaceProperties
+pkg syscall/zx/net/stack, type InterfaceProperties struct
+pkg syscall/zx/net/stack, type InterfaceProperties struct, Addresses []net.Subnet
+pkg syscall/zx/net/stack, type InterfaceProperties struct, AdministrativeStatus AdministrativeStatus
+pkg syscall/zx/net/stack, type InterfaceProperties struct, Features ethernet.Features
+pkg syscall/zx/net/stack, type InterfaceProperties struct, Filepath string
+pkg syscall/zx/net/stack, type InterfaceProperties struct, Mac *ethernet.MacAddress
+pkg syscall/zx/net/stack, type InterfaceProperties struct, Mtu uint32
+pkg syscall/zx/net/stack, type InterfaceProperties struct, Name string
+pkg syscall/zx/net/stack, type InterfaceProperties struct, PhysicalStatus PhysicalStatus
+pkg syscall/zx/net/stack, type InterfaceProperties struct, Topopath string
+pkg syscall/zx/net/stack, type InterfaceStatus struct
+pkg syscall/zx/net/stack, type InterfaceStatus struct, Administrative AdministrativeStatus
+pkg syscall/zx/net/stack, type InterfaceStatus struct, Physical PhysicalStatus
+pkg syscall/zx/net/stack, type InterfaceStatus struct, Presence PresenceStatus
+pkg syscall/zx/net/stack, type InterfaceStatus struct, embedded I_interfaceStatusTag
+pkg syscall/zx/net/stack, type InterfaceStatusChange struct
+pkg syscall/zx/net/stack, type InterfaceStatusChange struct, Id uint64
+pkg syscall/zx/net/stack, type InterfaceStatusChange struct, Status InterfaceStatus
+pkg syscall/zx/net/stack, type LogEventProxy struct
+pkg syscall/zx/net/stack, type LogEventProxy struct, embedded zx.Channel
+pkg syscall/zx/net/stack, type LogSetLogLevelResponse struct
+pkg syscall/zx/net/stack, type LogSetLogLevelResult struct
+pkg syscall/zx/net/stack, type LogSetLogLevelResult struct, Err Error
+pkg syscall/zx/net/stack, type LogSetLogLevelResult struct, Response LogSetLogLevelResponse
+pkg syscall/zx/net/stack, type LogSetLogLevelResult struct, embedded I_logSetLogLevelResultTag
+pkg syscall/zx/net/stack, type LogWithCtx interface { SetLogLevel, SetLogPackets }
+pkg syscall/zx/net/stack, type LogWithCtx interface, SetLogLevel(context.Context, logger.LogLevelFilter) (LogSetLogLevelResult, error)
+pkg syscall/zx/net/stack, type LogWithCtx interface, SetLogPackets(context.Context, bool) error
+pkg syscall/zx/net/stack, type LogWithCtxInterface struct
+pkg syscall/zx/net/stack, type LogWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/net/stack, type LogWithCtxInterfaceRequest struct
+pkg syscall/zx/net/stack, type LogWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/net/stack, type LogWithCtxStub struct
+pkg syscall/zx/net/stack, type LogWithCtxStub struct, Impl LogWithCtx
+pkg syscall/zx/net/stack, type LogWithCtxTransitionalBase struct
+pkg syscall/zx/net/stack, type PhysicalStatus uint32
+pkg syscall/zx/net/stack, type PresenceStatus uint32
+pkg syscall/zx/net/stack, type StackAddEthernetInterfaceResponse struct
+pkg syscall/zx/net/stack, type StackAddEthernetInterfaceResponse struct, Id uint64
+pkg syscall/zx/net/stack, type StackAddEthernetInterfaceResult struct
+pkg syscall/zx/net/stack, type StackAddEthernetInterfaceResult struct, Err Error
+pkg syscall/zx/net/stack, type StackAddEthernetInterfaceResult struct, Response StackAddEthernetInterfaceResponse
+pkg syscall/zx/net/stack, type StackAddEthernetInterfaceResult struct, embedded I_stackAddEthernetInterfaceResultTag
+pkg syscall/zx/net/stack, type StackAddForwardingEntryResponse struct
+pkg syscall/zx/net/stack, type StackAddForwardingEntryResult struct
+pkg syscall/zx/net/stack, type StackAddForwardingEntryResult struct, Err Error
+pkg syscall/zx/net/stack, type StackAddForwardingEntryResult struct, Response StackAddForwardingEntryResponse
+pkg syscall/zx/net/stack, type StackAddForwardingEntryResult struct, embedded I_stackAddForwardingEntryResultTag
+pkg syscall/zx/net/stack, type StackAddInterfaceAddressResponse struct
+pkg syscall/zx/net/stack, type StackAddInterfaceAddressResult struct
+pkg syscall/zx/net/stack, type StackAddInterfaceAddressResult struct, Err Error
+pkg syscall/zx/net/stack, type StackAddInterfaceAddressResult struct, Response StackAddInterfaceAddressResponse
+pkg syscall/zx/net/stack, type StackAddInterfaceAddressResult struct, embedded I_stackAddInterfaceAddressResultTag
+pkg syscall/zx/net/stack, type StackAddInterfaceResponse struct
+pkg syscall/zx/net/stack, type StackAddInterfaceResponse struct, Id uint64
+pkg syscall/zx/net/stack, type StackAddInterfaceResult struct
+pkg syscall/zx/net/stack, type StackAddInterfaceResult struct, Err Error
+pkg syscall/zx/net/stack, type StackAddInterfaceResult struct, Response StackAddInterfaceResponse
+pkg syscall/zx/net/stack, type StackAddInterfaceResult struct, embedded I_stackAddInterfaceResultTag
+pkg syscall/zx/net/stack, type StackDelEthernetInterfaceResponse struct
+pkg syscall/zx/net/stack, type StackDelEthernetInterfaceResult struct
+pkg syscall/zx/net/stack, type StackDelEthernetInterfaceResult struct, Err Error
+pkg syscall/zx/net/stack, type StackDelEthernetInterfaceResult struct, Response StackDelEthernetInterfaceResponse
+pkg syscall/zx/net/stack, type StackDelEthernetInterfaceResult struct, embedded I_stackDelEthernetInterfaceResultTag
+pkg syscall/zx/net/stack, type StackDelForwardingEntryResponse struct
+pkg syscall/zx/net/stack, type StackDelForwardingEntryResult struct
+pkg syscall/zx/net/stack, type StackDelForwardingEntryResult struct, Err Error
+pkg syscall/zx/net/stack, type StackDelForwardingEntryResult struct, Response StackDelForwardingEntryResponse
+pkg syscall/zx/net/stack, type StackDelForwardingEntryResult struct, embedded I_stackDelForwardingEntryResultTag
+pkg syscall/zx/net/stack, type StackDelInterfaceAddressResponse struct
+pkg syscall/zx/net/stack, type StackDelInterfaceAddressResult struct
+pkg syscall/zx/net/stack, type StackDelInterfaceAddressResult struct, Err Error
+pkg syscall/zx/net/stack, type StackDelInterfaceAddressResult struct, Response StackDelInterfaceAddressResponse
+pkg syscall/zx/net/stack, type StackDelInterfaceAddressResult struct, embedded I_stackDelInterfaceAddressResultTag
+pkg syscall/zx/net/stack, type StackDisableInterfaceResponse struct
+pkg syscall/zx/net/stack, type StackDisableInterfaceResult struct
+pkg syscall/zx/net/stack, type StackDisableInterfaceResult struct, Err Error
+pkg syscall/zx/net/stack, type StackDisableInterfaceResult struct, Response StackDisableInterfaceResponse
+pkg syscall/zx/net/stack, type StackDisableInterfaceResult struct, embedded I_stackDisableInterfaceResultTag
+pkg syscall/zx/net/stack, type StackDisablePacketFilterResponse struct
+pkg syscall/zx/net/stack, type StackDisablePacketFilterResult struct
+pkg syscall/zx/net/stack, type StackDisablePacketFilterResult struct, Err Error
+pkg syscall/zx/net/stack, type StackDisablePacketFilterResult struct, Response StackDisablePacketFilterResponse
+pkg syscall/zx/net/stack, type StackDisablePacketFilterResult struct, embedded I_stackDisablePacketFilterResultTag
+pkg syscall/zx/net/stack, type StackEnableInterfaceResponse struct
+pkg syscall/zx/net/stack, type StackEnableInterfaceResult struct
+pkg syscall/zx/net/stack, type StackEnableInterfaceResult struct, Err Error
+pkg syscall/zx/net/stack, type StackEnableInterfaceResult struct, Response StackEnableInterfaceResponse
+pkg syscall/zx/net/stack, type StackEnableInterfaceResult struct, embedded I_stackEnableInterfaceResultTag
+pkg syscall/zx/net/stack, type StackEnablePacketFilterResponse struct
+pkg syscall/zx/net/stack, type StackEnablePacketFilterResult struct
+pkg syscall/zx/net/stack, type StackEnablePacketFilterResult struct, Err Error
+pkg syscall/zx/net/stack, type StackEnablePacketFilterResult struct, Response StackEnablePacketFilterResponse
+pkg syscall/zx/net/stack, type StackEnablePacketFilterResult struct, embedded I_stackEnablePacketFilterResultTag
+pkg syscall/zx/net/stack, type StackEventProxy struct
+pkg syscall/zx/net/stack, type StackEventProxy struct, embedded zx.Channel
+pkg syscall/zx/net/stack, type StackGetInterfaceInfoResponse struct
+pkg syscall/zx/net/stack, type StackGetInterfaceInfoResponse struct, Info InterfaceInfo
+pkg syscall/zx/net/stack, type StackGetInterfaceInfoResult struct
+pkg syscall/zx/net/stack, type StackGetInterfaceInfoResult struct, Err Error
+pkg syscall/zx/net/stack, type StackGetInterfaceInfoResult struct, Response StackGetInterfaceInfoResponse
+pkg syscall/zx/net/stack, type StackGetInterfaceInfoResult struct, embedded I_stackGetInterfaceInfoResultTag
+pkg syscall/zx/net/stack, type StackWithCtx interface { AddEthernetInterface, AddForwardingEntry, AddInterface, AddInterfaceAddress, DelEthernetInterface, DelForwardingEntry, DelInterfaceAddress, DisableInterface, DisableIpForwarding, DisablePacketFilter, EnableInterface, EnableIpForwarding, EnablePacketFilter, GetDnsServerWatcher, GetForwardingTable, GetInterfaceInfo, ListInterfaces }
+pkg syscall/zx/net/stack, type StackWithCtx interface, AddEthernetInterface(context.Context, string, ethernet.DeviceWithCtxInterface) (StackAddEthernetInterfaceResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, AddForwardingEntry(context.Context, ForwardingEntry) (StackAddForwardingEntryResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, AddInterface(context.Context, InterfaceConfig, DeviceDefinition) (StackAddInterfaceResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, AddInterfaceAddress(context.Context, uint64, net.Subnet) (StackAddInterfaceAddressResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, DelEthernetInterface(context.Context, uint64) (StackDelEthernetInterfaceResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, DelForwardingEntry(context.Context, net.Subnet) (StackDelForwardingEntryResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, DelInterfaceAddress(context.Context, uint64, net.Subnet) (StackDelInterfaceAddressResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, DisableInterface(context.Context, uint64) (StackDisableInterfaceResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, DisableIpForwarding(context.Context) error
+pkg syscall/zx/net/stack, type StackWithCtx interface, DisablePacketFilter(context.Context, uint64) (StackDisablePacketFilterResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, EnableInterface(context.Context, uint64) (StackEnableInterfaceResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, EnableIpForwarding(context.Context) error
+pkg syscall/zx/net/stack, type StackWithCtx interface, EnablePacketFilter(context.Context, uint64) (StackEnablePacketFilterResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, GetDnsServerWatcher(context.Context, name.DnsServerWatcherWithCtxInterfaceRequest) error
+pkg syscall/zx/net/stack, type StackWithCtx interface, GetForwardingTable(context.Context) ([]ForwardingEntry, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, GetInterfaceInfo(context.Context, uint64) (StackGetInterfaceInfoResult, error)
+pkg syscall/zx/net/stack, type StackWithCtx interface, ListInterfaces(context.Context) ([]InterfaceInfo, error)
+pkg syscall/zx/net/stack, type StackWithCtxInterface struct
+pkg syscall/zx/net/stack, type StackWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/net/stack, type StackWithCtxInterfaceRequest struct
+pkg syscall/zx/net/stack, type StackWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/net/stack, type StackWithCtxStub struct
+pkg syscall/zx/net/stack, type StackWithCtxStub struct, Impl StackWithCtx
+pkg syscall/zx/net/stack, type StackWithCtxTransitionalBase struct
+pkg syscall/zx/posix, const Edeadlock = 35
+pkg syscall/zx/posix, const Edeadlock Errno
+pkg syscall/zx/posix, const Enotsup = 95
+pkg syscall/zx/posix, const Enotsup Errno
+pkg syscall/zx/posix, const ErrnoE2Big = 7
+pkg syscall/zx/posix, const ErrnoE2Big Errno
+pkg syscall/zx/posix, const ErrnoEacces = 13
+pkg syscall/zx/posix, const ErrnoEacces Errno
+pkg syscall/zx/posix, const ErrnoEaddrinuse = 98
+pkg syscall/zx/posix, const ErrnoEaddrinuse Errno
+pkg syscall/zx/posix, const ErrnoEaddrnotavail = 99
+pkg syscall/zx/posix, const ErrnoEaddrnotavail Errno
+pkg syscall/zx/posix, const ErrnoEadv = 68
+pkg syscall/zx/posix, const ErrnoEadv Errno
+pkg syscall/zx/posix, const ErrnoEafnosupport = 97
+pkg syscall/zx/posix, const ErrnoEafnosupport Errno
+pkg syscall/zx/posix, const ErrnoEagain = 11
+pkg syscall/zx/posix, const ErrnoEagain Errno
+pkg syscall/zx/posix, const ErrnoEalready = 114
+pkg syscall/zx/posix, const ErrnoEalready Errno
+pkg syscall/zx/posix, const ErrnoEbade = 52
+pkg syscall/zx/posix, const ErrnoEbade Errno
+pkg syscall/zx/posix, const ErrnoEbadf = 9
+pkg syscall/zx/posix, const ErrnoEbadf Errno
+pkg syscall/zx/posix, const ErrnoEbadfd = 77
+pkg syscall/zx/posix, const ErrnoEbadfd Errno
+pkg syscall/zx/posix, const ErrnoEbadmsg = 74
+pkg syscall/zx/posix, const ErrnoEbadmsg Errno
+pkg syscall/zx/posix, const ErrnoEbadr = 53
+pkg syscall/zx/posix, const ErrnoEbadr Errno
+pkg syscall/zx/posix, const ErrnoEbadrqc = 56
+pkg syscall/zx/posix, const ErrnoEbadrqc Errno
+pkg syscall/zx/posix, const ErrnoEbadslt = 57
+pkg syscall/zx/posix, const ErrnoEbadslt Errno
+pkg syscall/zx/posix, const ErrnoEbfont = 59
+pkg syscall/zx/posix, const ErrnoEbfont Errno
+pkg syscall/zx/posix, const ErrnoEbusy = 16
+pkg syscall/zx/posix, const ErrnoEbusy Errno
+pkg syscall/zx/posix, const ErrnoEcanceled = 125
+pkg syscall/zx/posix, const ErrnoEcanceled Errno
+pkg syscall/zx/posix, const ErrnoEchild = 10
+pkg syscall/zx/posix, const ErrnoEchild Errno
+pkg syscall/zx/posix, const ErrnoEchrng = 44
+pkg syscall/zx/posix, const ErrnoEchrng Errno
+pkg syscall/zx/posix, const ErrnoEcomm = 70
+pkg syscall/zx/posix, const ErrnoEcomm Errno
+pkg syscall/zx/posix, const ErrnoEconnaborted = 103
+pkg syscall/zx/posix, const ErrnoEconnaborted Errno
+pkg syscall/zx/posix, const ErrnoEconnrefused = 111
+pkg syscall/zx/posix, const ErrnoEconnrefused Errno
+pkg syscall/zx/posix, const ErrnoEconnreset = 104
+pkg syscall/zx/posix, const ErrnoEconnreset Errno
+pkg syscall/zx/posix, const ErrnoEdeadlk = 35
+pkg syscall/zx/posix, const ErrnoEdeadlk Errno
+pkg syscall/zx/posix, const ErrnoEdestaddrreq = 89
+pkg syscall/zx/posix, const ErrnoEdestaddrreq Errno
+pkg syscall/zx/posix, const ErrnoEdom = 33
+pkg syscall/zx/posix, const ErrnoEdom Errno
+pkg syscall/zx/posix, const ErrnoEdotdot = 73
+pkg syscall/zx/posix, const ErrnoEdotdot Errno
+pkg syscall/zx/posix, const ErrnoEdquot = 122
+pkg syscall/zx/posix, const ErrnoEdquot Errno
+pkg syscall/zx/posix, const ErrnoEexist = 17
+pkg syscall/zx/posix, const ErrnoEexist Errno
+pkg syscall/zx/posix, const ErrnoEfault = 14
+pkg syscall/zx/posix, const ErrnoEfault Errno
+pkg syscall/zx/posix, const ErrnoEfbig = 27
+pkg syscall/zx/posix, const ErrnoEfbig Errno
+pkg syscall/zx/posix, const ErrnoEhostdown = 112
+pkg syscall/zx/posix, const ErrnoEhostdown Errno
+pkg syscall/zx/posix, const ErrnoEhostunreach = 113
+pkg syscall/zx/posix, const ErrnoEhostunreach Errno
+pkg syscall/zx/posix, const ErrnoEhwpoison = 133
+pkg syscall/zx/posix, const ErrnoEhwpoison Errno
+pkg syscall/zx/posix, const ErrnoEidrm = 43
+pkg syscall/zx/posix, const ErrnoEidrm Errno
+pkg syscall/zx/posix, const ErrnoEilseq = 84
+pkg syscall/zx/posix, const ErrnoEilseq Errno
+pkg syscall/zx/posix, const ErrnoEinprogress = 115
+pkg syscall/zx/posix, const ErrnoEinprogress Errno
+pkg syscall/zx/posix, const ErrnoEintr = 4
+pkg syscall/zx/posix, const ErrnoEintr Errno
+pkg syscall/zx/posix, const ErrnoEinval = 22
+pkg syscall/zx/posix, const ErrnoEinval Errno
+pkg syscall/zx/posix, const ErrnoEio = 5
+pkg syscall/zx/posix, const ErrnoEio Errno
+pkg syscall/zx/posix, const ErrnoEisconn = 106
+pkg syscall/zx/posix, const ErrnoEisconn Errno
+pkg syscall/zx/posix, const ErrnoEisdir = 21
+pkg syscall/zx/posix, const ErrnoEisdir Errno
+pkg syscall/zx/posix, const ErrnoEisnam = 120
+pkg syscall/zx/posix, const ErrnoEisnam Errno
+pkg syscall/zx/posix, const ErrnoEkeyexpired = 127
+pkg syscall/zx/posix, const ErrnoEkeyexpired Errno
+pkg syscall/zx/posix, const ErrnoEkeyrejected = 129
+pkg syscall/zx/posix, const ErrnoEkeyrejected Errno
+pkg syscall/zx/posix, const ErrnoEkeyrevoked = 128
+pkg syscall/zx/posix, const ErrnoEkeyrevoked Errno
+pkg syscall/zx/posix, const ErrnoEl2Hlt = 51
+pkg syscall/zx/posix, const ErrnoEl2Hlt Errno
+pkg syscall/zx/posix, const ErrnoEl2Nsync = 45
+pkg syscall/zx/posix, const ErrnoEl2Nsync Errno
+pkg syscall/zx/posix, const ErrnoEl3Hlt = 46
+pkg syscall/zx/posix, const ErrnoEl3Hlt Errno
+pkg syscall/zx/posix, const ErrnoEl3Rst = 47
+pkg syscall/zx/posix, const ErrnoEl3Rst Errno
+pkg syscall/zx/posix, const ErrnoElibacc = 79
+pkg syscall/zx/posix, const ErrnoElibacc Errno
+pkg syscall/zx/posix, const ErrnoElibbad = 80
+pkg syscall/zx/posix, const ErrnoElibbad Errno
+pkg syscall/zx/posix, const ErrnoElibexec = 83
+pkg syscall/zx/posix, const ErrnoElibexec Errno
+pkg syscall/zx/posix, const ErrnoElibmax = 82
+pkg syscall/zx/posix, const ErrnoElibmax Errno
+pkg syscall/zx/posix, const ErrnoElibscn = 81
+pkg syscall/zx/posix, const ErrnoElibscn Errno
+pkg syscall/zx/posix, const ErrnoElnrng = 48
+pkg syscall/zx/posix, const ErrnoElnrng Errno
+pkg syscall/zx/posix, const ErrnoEloop = 40
+pkg syscall/zx/posix, const ErrnoEloop Errno
+pkg syscall/zx/posix, const ErrnoEmediumtype = 124
+pkg syscall/zx/posix, const ErrnoEmediumtype Errno
+pkg syscall/zx/posix, const ErrnoEmfile = 24
+pkg syscall/zx/posix, const ErrnoEmfile Errno
+pkg syscall/zx/posix, const ErrnoEmlink = 31
+pkg syscall/zx/posix, const ErrnoEmlink Errno
+pkg syscall/zx/posix, const ErrnoEmsgsize = 90
+pkg syscall/zx/posix, const ErrnoEmsgsize Errno
+pkg syscall/zx/posix, const ErrnoEmultihop = 72
+pkg syscall/zx/posix, const ErrnoEmultihop Errno
+pkg syscall/zx/posix, const ErrnoEnametoolong = 36
+pkg syscall/zx/posix, const ErrnoEnametoolong Errno
+pkg syscall/zx/posix, const ErrnoEnavail = 119
+pkg syscall/zx/posix, const ErrnoEnavail Errno
+pkg syscall/zx/posix, const ErrnoEnetdown = 100
+pkg syscall/zx/posix, const ErrnoEnetdown Errno
+pkg syscall/zx/posix, const ErrnoEnetreset = 102
+pkg syscall/zx/posix, const ErrnoEnetreset Errno
+pkg syscall/zx/posix, const ErrnoEnetunreach = 101
+pkg syscall/zx/posix, const ErrnoEnetunreach Errno
+pkg syscall/zx/posix, const ErrnoEnfile = 23
+pkg syscall/zx/posix, const ErrnoEnfile Errno
+pkg syscall/zx/posix, const ErrnoEnoano = 55
+pkg syscall/zx/posix, const ErrnoEnoano Errno
+pkg syscall/zx/posix, const ErrnoEnobufs = 105
+pkg syscall/zx/posix, const ErrnoEnobufs Errno
+pkg syscall/zx/posix, const ErrnoEnocsi = 50
+pkg syscall/zx/posix, const ErrnoEnocsi Errno
+pkg syscall/zx/posix, const ErrnoEnodata = 61
+pkg syscall/zx/posix, const ErrnoEnodata Errno
+pkg syscall/zx/posix, const ErrnoEnodev = 19
+pkg syscall/zx/posix, const ErrnoEnodev Errno
+pkg syscall/zx/posix, const ErrnoEnoent = 2
+pkg syscall/zx/posix, const ErrnoEnoent Errno
+pkg syscall/zx/posix, const ErrnoEnoexec = 8
+pkg syscall/zx/posix, const ErrnoEnoexec Errno
+pkg syscall/zx/posix, const ErrnoEnokey = 126
+pkg syscall/zx/posix, const ErrnoEnokey Errno
+pkg syscall/zx/posix, const ErrnoEnolck = 37
+pkg syscall/zx/posix, const ErrnoEnolck Errno
+pkg syscall/zx/posix, const ErrnoEnolink = 67
+pkg syscall/zx/posix, const ErrnoEnolink Errno
+pkg syscall/zx/posix, const ErrnoEnomedium = 123
+pkg syscall/zx/posix, const ErrnoEnomedium Errno
+pkg syscall/zx/posix, const ErrnoEnomem = 12
+pkg syscall/zx/posix, const ErrnoEnomem Errno
+pkg syscall/zx/posix, const ErrnoEnomsg = 42
+pkg syscall/zx/posix, const ErrnoEnomsg Errno
+pkg syscall/zx/posix, const ErrnoEnonet = 64
+pkg syscall/zx/posix, const ErrnoEnonet Errno
+pkg syscall/zx/posix, const ErrnoEnopkg = 65
+pkg syscall/zx/posix, const ErrnoEnopkg Errno
+pkg syscall/zx/posix, const ErrnoEnoprotoopt = 92
+pkg syscall/zx/posix, const ErrnoEnoprotoopt Errno
+pkg syscall/zx/posix, const ErrnoEnospc = 28
+pkg syscall/zx/posix, const ErrnoEnospc Errno
+pkg syscall/zx/posix, const ErrnoEnosr = 63
+pkg syscall/zx/posix, const ErrnoEnosr Errno
+pkg syscall/zx/posix, const ErrnoEnostr = 60
+pkg syscall/zx/posix, const ErrnoEnostr Errno
+pkg syscall/zx/posix, const ErrnoEnosys = 38
+pkg syscall/zx/posix, const ErrnoEnosys Errno
+pkg syscall/zx/posix, const ErrnoEnotblk = 15
+pkg syscall/zx/posix, const ErrnoEnotblk Errno
+pkg syscall/zx/posix, const ErrnoEnotconn = 107
+pkg syscall/zx/posix, const ErrnoEnotconn Errno
+pkg syscall/zx/posix, const ErrnoEnotdir = 20
+pkg syscall/zx/posix, const ErrnoEnotdir Errno
+pkg syscall/zx/posix, const ErrnoEnotempty = 39
+pkg syscall/zx/posix, const ErrnoEnotempty Errno
+pkg syscall/zx/posix, const ErrnoEnotnam = 118
+pkg syscall/zx/posix, const ErrnoEnotnam Errno
+pkg syscall/zx/posix, const ErrnoEnotrecoverable = 131
+pkg syscall/zx/posix, const ErrnoEnotrecoverable Errno
+pkg syscall/zx/posix, const ErrnoEnotsock = 88
+pkg syscall/zx/posix, const ErrnoEnotsock Errno
+pkg syscall/zx/posix, const ErrnoEnotty = 25
+pkg syscall/zx/posix, const ErrnoEnotty Errno
+pkg syscall/zx/posix, const ErrnoEnotuniq = 76
+pkg syscall/zx/posix, const ErrnoEnotuniq Errno
+pkg syscall/zx/posix, const ErrnoEnxio = 6
+pkg syscall/zx/posix, const ErrnoEnxio Errno
+pkg syscall/zx/posix, const ErrnoEopnotsupp = 95
+pkg syscall/zx/posix, const ErrnoEopnotsupp Errno
+pkg syscall/zx/posix, const ErrnoEoverflow = 75
+pkg syscall/zx/posix, const ErrnoEoverflow Errno
+pkg syscall/zx/posix, const ErrnoEownerdead = 130
+pkg syscall/zx/posix, const ErrnoEownerdead Errno
+pkg syscall/zx/posix, const ErrnoEperm = 1
+pkg syscall/zx/posix, const ErrnoEperm Errno
+pkg syscall/zx/posix, const ErrnoEpfnosupport = 96
+pkg syscall/zx/posix, const ErrnoEpfnosupport Errno
+pkg syscall/zx/posix, const ErrnoEpipe = 32
+pkg syscall/zx/posix, const ErrnoEpipe Errno
+pkg syscall/zx/posix, const ErrnoEproto = 71
+pkg syscall/zx/posix, const ErrnoEproto Errno
+pkg syscall/zx/posix, const ErrnoEprotonosupport = 93
+pkg syscall/zx/posix, const ErrnoEprotonosupport Errno
+pkg syscall/zx/posix, const ErrnoEprototype = 91
+pkg syscall/zx/posix, const ErrnoEprototype Errno
+pkg syscall/zx/posix, const ErrnoErange = 34
+pkg syscall/zx/posix, const ErrnoErange Errno
+pkg syscall/zx/posix, const ErrnoEremchg = 78
+pkg syscall/zx/posix, const ErrnoEremchg Errno
+pkg syscall/zx/posix, const ErrnoEremote = 66
+pkg syscall/zx/posix, const ErrnoEremote Errno
+pkg syscall/zx/posix, const ErrnoEremoteio = 121
+pkg syscall/zx/posix, const ErrnoEremoteio Errno
+pkg syscall/zx/posix, const ErrnoErestart = 85
+pkg syscall/zx/posix, const ErrnoErestart Errno
+pkg syscall/zx/posix, const ErrnoErfkill = 132
+pkg syscall/zx/posix, const ErrnoErfkill Errno
+pkg syscall/zx/posix, const ErrnoErofs = 30
+pkg syscall/zx/posix, const ErrnoErofs Errno
+pkg syscall/zx/posix, const ErrnoEshutdown = 108
+pkg syscall/zx/posix, const ErrnoEshutdown Errno
+pkg syscall/zx/posix, const ErrnoEsocktnosupport = 94
+pkg syscall/zx/posix, const ErrnoEsocktnosupport Errno
+pkg syscall/zx/posix, const ErrnoEspipe = 29
+pkg syscall/zx/posix, const ErrnoEspipe Errno
+pkg syscall/zx/posix, const ErrnoEsrch = 3
+pkg syscall/zx/posix, const ErrnoEsrch Errno
+pkg syscall/zx/posix, const ErrnoEsrmnt = 69
+pkg syscall/zx/posix, const ErrnoEsrmnt Errno
+pkg syscall/zx/posix, const ErrnoEstale = 116
+pkg syscall/zx/posix, const ErrnoEstale Errno
+pkg syscall/zx/posix, const ErrnoEstrpipe = 86
+pkg syscall/zx/posix, const ErrnoEstrpipe Errno
+pkg syscall/zx/posix, const ErrnoEtime = 62
+pkg syscall/zx/posix, const ErrnoEtime Errno
+pkg syscall/zx/posix, const ErrnoEtimedout = 110
+pkg syscall/zx/posix, const ErrnoEtimedout Errno
+pkg syscall/zx/posix, const ErrnoEtoomanyrefs = 109
+pkg syscall/zx/posix, const ErrnoEtoomanyrefs Errno
+pkg syscall/zx/posix, const ErrnoEtxtbsy = 26
+pkg syscall/zx/posix, const ErrnoEtxtbsy Errno
+pkg syscall/zx/posix, const ErrnoEuclean = 117
+pkg syscall/zx/posix, const ErrnoEuclean Errno
+pkg syscall/zx/posix, const ErrnoEunatch = 49
+pkg syscall/zx/posix, const ErrnoEunatch Errno
+pkg syscall/zx/posix, const ErrnoEusers = 87
+pkg syscall/zx/posix, const ErrnoEusers Errno
+pkg syscall/zx/posix, const ErrnoExdev = 18
+pkg syscall/zx/posix, const ErrnoExdev Errno
+pkg syscall/zx/posix, const ErrnoExfull = 54
+pkg syscall/zx/posix, const ErrnoExfull Errno
+pkg syscall/zx/posix, const Ewouldblock = 11
+pkg syscall/zx/posix, const Ewouldblock Errno
+pkg syscall/zx/posix, method (Errno) I_EnumIsStrict() bool
+pkg syscall/zx/posix, method (Errno) I_EnumValues() []Errno
+pkg syscall/zx/posix, method (Errno) IsUnknown() bool
+pkg syscall/zx/posix, method (Errno) String() string
+pkg syscall/zx/posix, type Errno int32
+pkg syscall/zx/posix/socket, const BaseSocketBindOrdinal = 1118115255807776188
+pkg syscall/zx/posix/socket, const BaseSocketBindOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketBindResultErr = 2
+pkg syscall/zx/posix/socket, const BaseSocketBindResultErr ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketBindResultResponse = 1
+pkg syscall/zx/posix/socket, const BaseSocketBindResultResponse ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketCloneOrdinal = 6512600400724287855
+pkg syscall/zx/posix/socket, const BaseSocketCloneOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketCloseOrdinal = 5983530995951066180
+pkg syscall/zx/posix/socket, const BaseSocketCloseOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketConnectOrdinal = 1705719532842400689
+pkg syscall/zx/posix/socket, const BaseSocketConnectOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketConnectResultErr = 2
+pkg syscall/zx/posix/socket, const BaseSocketConnectResultErr ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketConnectResultResponse = 1
+pkg syscall/zx/posix/socket, const BaseSocketConnectResultResponse ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketDescribeOrdinal = 1152055232528178848
+pkg syscall/zx/posix/socket, const BaseSocketDescribeOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketDisconnectOrdinal = 2371969537656451236
+pkg syscall/zx/posix/socket, const BaseSocketDisconnectOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketDisconnectResultErr = 2
+pkg syscall/zx/posix/socket, const BaseSocketDisconnectResultErr ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketDisconnectResultResponse = 1
+pkg syscall/zx/posix/socket, const BaseSocketDisconnectResultResponse ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketGetAttrOrdinal = 8689798978500614909
+pkg syscall/zx/posix/socket, const BaseSocketGetAttrOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketGetPeerNameOrdinal = 4614448585615564437
+pkg syscall/zx/posix/socket, const BaseSocketGetPeerNameOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketGetPeerNameResultErr = 2
+pkg syscall/zx/posix/socket, const BaseSocketGetPeerNameResultErr ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketGetPeerNameResultResponse = 1
+pkg syscall/zx/posix/socket, const BaseSocketGetPeerNameResultResponse ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketGetSockNameOrdinal = 4730495873806049181
+pkg syscall/zx/posix/socket, const BaseSocketGetSockNameOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketGetSockNameResultErr = 2
+pkg syscall/zx/posix/socket, const BaseSocketGetSockNameResultErr ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketGetSockNameResultResponse = 1
+pkg syscall/zx/posix/socket, const BaseSocketGetSockNameResultResponse ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketGetSockOptOrdinal = 7924918138357155140
+pkg syscall/zx/posix/socket, const BaseSocketGetSockOptOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketGetSockOptResultErr = 2
+pkg syscall/zx/posix/socket, const BaseSocketGetSockOptResultErr ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketGetSockOptResultResponse = 1
+pkg syscall/zx/posix/socket, const BaseSocketGetSockOptResultResponse ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketNodeGetFlagsOrdinal = 6595803110182632097
+pkg syscall/zx/posix/socket, const BaseSocketNodeGetFlagsOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketNodeSetFlagsOrdinal = 5950864159036794675
+pkg syscall/zx/posix/socket, const BaseSocketNodeSetFlagsOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketOnOpenOrdinal = 9207534335756671346
+pkg syscall/zx/posix/socket, const BaseSocketOnOpenOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketSetAttrOrdinal = 4721673413776871238
+pkg syscall/zx/posix/socket, const BaseSocketSetAttrOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketSetSockOptOrdinal = 665529441061168881
+pkg syscall/zx/posix/socket, const BaseSocketSetSockOptOrdinal uint64
+pkg syscall/zx/posix/socket, const BaseSocketSetSockOptResultErr = 2
+pkg syscall/zx/posix/socket, const BaseSocketSetSockOptResultErr ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketSetSockOptResultResponse = 1
+pkg syscall/zx/posix/socket, const BaseSocketSetSockOptResultResponse ideal-int
+pkg syscall/zx/posix/socket, const BaseSocketSyncOrdinal = 1773723578397144345
+pkg syscall/zx/posix/socket, const BaseSocketSyncOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketBindOrdinal = 1118115255807776188
+pkg syscall/zx/posix/socket, const DatagramSocketBindOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketCloneOrdinal = 6512600400724287855
+pkg syscall/zx/posix/socket, const DatagramSocketCloneOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketCloseOrdinal = 5983530995951066180
+pkg syscall/zx/posix/socket, const DatagramSocketCloseOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketConnectOrdinal = 1705719532842400689
+pkg syscall/zx/posix/socket, const DatagramSocketConnectOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketDescribeOrdinal = 1152055232528178848
+pkg syscall/zx/posix/socket, const DatagramSocketDescribeOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketDisconnectOrdinal = 2371969537656451236
+pkg syscall/zx/posix/socket, const DatagramSocketDisconnectOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketGetAttrOrdinal = 8689798978500614909
+pkg syscall/zx/posix/socket, const DatagramSocketGetAttrOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketGetPeerNameOrdinal = 4614448585615564437
+pkg syscall/zx/posix/socket, const DatagramSocketGetPeerNameOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketGetSockNameOrdinal = 4730495873806049181
+pkg syscall/zx/posix/socket, const DatagramSocketGetSockNameOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketGetSockOptOrdinal = 7924918138357155140
+pkg syscall/zx/posix/socket, const DatagramSocketGetSockOptOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketNodeGetFlagsOrdinal = 6595803110182632097
+pkg syscall/zx/posix/socket, const DatagramSocketNodeGetFlagsOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketNodeSetFlagsOrdinal = 5950864159036794675
+pkg syscall/zx/posix/socket, const DatagramSocketNodeSetFlagsOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketOnOpenOrdinal = 9207534335756671346
+pkg syscall/zx/posix/socket, const DatagramSocketOnOpenOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketProtocolIcmpEcho = 2
+pkg syscall/zx/posix/socket, const DatagramSocketProtocolIcmpEcho DatagramSocketProtocol
+pkg syscall/zx/posix/socket, const DatagramSocketProtocolUdp = 1
+pkg syscall/zx/posix/socket, const DatagramSocketProtocolUdp DatagramSocketProtocol
+pkg syscall/zx/posix/socket, const DatagramSocketRecvMsgOrdinal = 8165942820816825210
+pkg syscall/zx/posix/socket, const DatagramSocketRecvMsgOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketRecvMsgResultErr = 2
+pkg syscall/zx/posix/socket, const DatagramSocketRecvMsgResultErr ideal-int
+pkg syscall/zx/posix/socket, const DatagramSocketRecvMsgResultResponse = 1
+pkg syscall/zx/posix/socket, const DatagramSocketRecvMsgResultResponse ideal-int
+pkg syscall/zx/posix/socket, const DatagramSocketSendMsgOrdinal = 3862789327346463099
+pkg syscall/zx/posix/socket, const DatagramSocketSendMsgOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketSendMsgResultErr = 2
+pkg syscall/zx/posix/socket, const DatagramSocketSendMsgResultErr ideal-int
+pkg syscall/zx/posix/socket, const DatagramSocketSendMsgResultResponse = 1
+pkg syscall/zx/posix/socket, const DatagramSocketSendMsgResultResponse ideal-int
+pkg syscall/zx/posix/socket, const DatagramSocketSetAttrOrdinal = 4721673413776871238
+pkg syscall/zx/posix/socket, const DatagramSocketSetAttrOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketSetSockOptOrdinal = 665529441061168881
+pkg syscall/zx/posix/socket, const DatagramSocketSetSockOptOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketShutdownOrdinal = 4350574647411923264
+pkg syscall/zx/posix/socket, const DatagramSocketShutdownOrdinal uint64
+pkg syscall/zx/posix/socket, const DatagramSocketShutdownResultErr = 2
+pkg syscall/zx/posix/socket, const DatagramSocketShutdownResultErr ideal-int
+pkg syscall/zx/posix/socket, const DatagramSocketShutdownResultResponse = 1
+pkg syscall/zx/posix/socket, const DatagramSocketShutdownResultResponse ideal-int
+pkg syscall/zx/posix/socket, const DatagramSocketSyncOrdinal = 1773723578397144345
+pkg syscall/zx/posix/socket, const DatagramSocketSyncOrdinal uint64
+pkg syscall/zx/posix/socket, const DomainIpv4 = 0
+pkg syscall/zx/posix/socket, const DomainIpv4 Domain
+pkg syscall/zx/posix/socket, const DomainIpv6 = 1
+pkg syscall/zx/posix/socket, const DomainIpv6 Domain
+pkg syscall/zx/posix/socket, const InterfaceFlagsAllmulti = 512
+pkg syscall/zx/posix/socket, const InterfaceFlagsAllmulti InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsAutomedia = 16384
+pkg syscall/zx/posix/socket, const InterfaceFlagsAutomedia InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsBroadcast = 2
+pkg syscall/zx/posix/socket, const InterfaceFlagsBroadcast InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsDebug = 4
+pkg syscall/zx/posix/socket, const InterfaceFlagsDebug InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsDynamic = 32768
+pkg syscall/zx/posix/socket, const InterfaceFlagsDynamic InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsFollower = 2048
+pkg syscall/zx/posix/socket, const InterfaceFlagsFollower InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsLeader = 1024
+pkg syscall/zx/posix/socket, const InterfaceFlagsLeader InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsLoopback = 8
+pkg syscall/zx/posix/socket, const InterfaceFlagsLoopback InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsMulticast = 4096
+pkg syscall/zx/posix/socket, const InterfaceFlagsMulticast InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsNoarp = 128
+pkg syscall/zx/posix/socket, const InterfaceFlagsNoarp InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsNotrailers = 32
+pkg syscall/zx/posix/socket, const InterfaceFlagsNotrailers InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsPointtopoint = 16
+pkg syscall/zx/posix/socket, const InterfaceFlagsPointtopoint InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsPortsel = 8192
+pkg syscall/zx/posix/socket, const InterfaceFlagsPortsel InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsPromisc = 256
+pkg syscall/zx/posix/socket, const InterfaceFlagsPromisc InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsRunning = 64
+pkg syscall/zx/posix/socket, const InterfaceFlagsRunning InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlagsUp = 1
+pkg syscall/zx/posix/socket, const InterfaceFlagsUp InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceFlags_Mask = 65535
+pkg syscall/zx/posix/socket, const InterfaceFlags_Mask InterfaceFlags
+pkg syscall/zx/posix/socket, const InterfaceNameLength = 15
+pkg syscall/zx/posix/socket, const InterfaceNameLength uint8
+pkg syscall/zx/posix/socket, const ProviderDatagramSocketOrdinal = 4073343718529375409
+pkg syscall/zx/posix/socket, const ProviderDatagramSocketOrdinal uint64
+pkg syscall/zx/posix/socket, const ProviderDatagramSocketResultErr = 2
+pkg syscall/zx/posix/socket, const ProviderDatagramSocketResultErr ideal-int
+pkg syscall/zx/posix/socket, const ProviderDatagramSocketResultResponse = 1
+pkg syscall/zx/posix/socket, const ProviderDatagramSocketResultResponse ideal-int
+pkg syscall/zx/posix/socket, const ProviderGetInterfaceAddressesOrdinal = 209340051571066992
+pkg syscall/zx/posix/socket, const ProviderGetInterfaceAddressesOrdinal uint64
+pkg syscall/zx/posix/socket, const ProviderInterfaceIndexToNameOrdinal = 5573668875546404655
+pkg syscall/zx/posix/socket, const ProviderInterfaceIndexToNameOrdinal uint64
+pkg syscall/zx/posix/socket, const ProviderInterfaceIndexToNameResultErr = 2
+pkg syscall/zx/posix/socket, const ProviderInterfaceIndexToNameResultErr ideal-int
+pkg syscall/zx/posix/socket, const ProviderInterfaceIndexToNameResultResponse = 1
+pkg syscall/zx/posix/socket, const ProviderInterfaceIndexToNameResultResponse ideal-int
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToFlagsOrdinal = 2724941441366694411
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToFlagsOrdinal uint64
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToFlagsResultErr = 2
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToFlagsResultErr ideal-int
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToFlagsResultResponse = 1
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToFlagsResultResponse ideal-int
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToIndexOrdinal = 7569663474231824632
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToIndexOrdinal uint64
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToIndexResultErr = 2
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToIndexResultErr ideal-int
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToIndexResultResponse = 1
+pkg syscall/zx/posix/socket, const ProviderInterfaceNameToIndexResultResponse ideal-int
+pkg syscall/zx/posix/socket, const ProviderName = "fuchsia.posix.socket.Provider"
+pkg syscall/zx/posix/socket, const ProviderName ideal-string
+pkg syscall/zx/posix/socket, const ProviderStreamSocketOrdinal = 2865230672234370373
+pkg syscall/zx/posix/socket, const ProviderStreamSocketOrdinal uint64
+pkg syscall/zx/posix/socket, const ProviderStreamSocketResultErr = 2
+pkg syscall/zx/posix/socket, const ProviderStreamSocketResultErr ideal-int
+pkg syscall/zx/posix/socket, const ProviderStreamSocketResultResponse = 1
+pkg syscall/zx/posix/socket, const ProviderStreamSocketResultResponse ideal-int
+pkg syscall/zx/posix/socket, const RecvMsgFlagsPeek = 2
+pkg syscall/zx/posix/socket, const RecvMsgFlagsPeek RecvMsgFlags
+pkg syscall/zx/posix/socket, const RecvMsgFlags_Mask = 2
+pkg syscall/zx/posix/socket, const RecvMsgFlags_Mask RecvMsgFlags
+pkg syscall/zx/posix/socket, const SendMsgFlagsReserved = 32768
+pkg syscall/zx/posix/socket, const SendMsgFlagsReserved SendMsgFlags
+pkg syscall/zx/posix/socket, const SendMsgFlags_Mask = 32768
+pkg syscall/zx/posix/socket, const SendMsgFlags_Mask SendMsgFlags
+pkg syscall/zx/posix/socket, const ShutdownModeRead = 1
+pkg syscall/zx/posix/socket, const ShutdownModeRead ShutdownMode
+pkg syscall/zx/posix/socket, const ShutdownModeWrite = 2
+pkg syscall/zx/posix/socket, const ShutdownModeWrite ShutdownMode
+pkg syscall/zx/posix/socket, const ShutdownMode_Mask = 3
+pkg syscall/zx/posix/socket, const ShutdownMode_Mask ShutdownMode
+pkg syscall/zx/posix/socket, const StreamSocketAcceptOrdinal = 6536884020639482211
+pkg syscall/zx/posix/socket, const StreamSocketAcceptOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketAcceptResultErr = 2
+pkg syscall/zx/posix/socket, const StreamSocketAcceptResultErr ideal-int
+pkg syscall/zx/posix/socket, const StreamSocketAcceptResultResponse = 1
+pkg syscall/zx/posix/socket, const StreamSocketAcceptResultResponse ideal-int
+pkg syscall/zx/posix/socket, const StreamSocketBindOrdinal = 1118115255807776188
+pkg syscall/zx/posix/socket, const StreamSocketBindOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketCloneOrdinal = 6512600400724287855
+pkg syscall/zx/posix/socket, const StreamSocketCloneOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketCloseOrdinal = 5983530995951066180
+pkg syscall/zx/posix/socket, const StreamSocketCloseOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketConnectOrdinal = 1705719532842400689
+pkg syscall/zx/posix/socket, const StreamSocketConnectOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketDescribeOrdinal = 1152055232528178848
+pkg syscall/zx/posix/socket, const StreamSocketDescribeOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketDisconnectOrdinal = 2371969537656451236
+pkg syscall/zx/posix/socket, const StreamSocketDisconnectOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketGetAttrOrdinal = 8689798978500614909
+pkg syscall/zx/posix/socket, const StreamSocketGetAttrOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketGetPeerNameOrdinal = 4614448585615564437
+pkg syscall/zx/posix/socket, const StreamSocketGetPeerNameOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketGetSockNameOrdinal = 4730495873806049181
+pkg syscall/zx/posix/socket, const StreamSocketGetSockNameOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketGetSockOptOrdinal = 7924918138357155140
+pkg syscall/zx/posix/socket, const StreamSocketGetSockOptOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketListenOrdinal = 4398439925072068872
+pkg syscall/zx/posix/socket, const StreamSocketListenOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketListenResultErr = 2
+pkg syscall/zx/posix/socket, const StreamSocketListenResultErr ideal-int
+pkg syscall/zx/posix/socket, const StreamSocketListenResultResponse = 1
+pkg syscall/zx/posix/socket, const StreamSocketListenResultResponse ideal-int
+pkg syscall/zx/posix/socket, const StreamSocketNodeGetFlagsOrdinal = 6595803110182632097
+pkg syscall/zx/posix/socket, const StreamSocketNodeGetFlagsOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketNodeSetFlagsOrdinal = 5950864159036794675
+pkg syscall/zx/posix/socket, const StreamSocketNodeSetFlagsOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketOnOpenOrdinal = 9207534335756671346
+pkg syscall/zx/posix/socket, const StreamSocketOnOpenOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketProtocolTcp = 0
+pkg syscall/zx/posix/socket, const StreamSocketProtocolTcp StreamSocketProtocol
+pkg syscall/zx/posix/socket, const StreamSocketSetAttrOrdinal = 4721673413776871238
+pkg syscall/zx/posix/socket, const StreamSocketSetAttrOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketSetSockOptOrdinal = 665529441061168881
+pkg syscall/zx/posix/socket, const StreamSocketSetSockOptOrdinal uint64
+pkg syscall/zx/posix/socket, const StreamSocketSyncOrdinal = 1773723578397144345
+pkg syscall/zx/posix/socket, const StreamSocketSyncOrdinal uint64
+pkg syscall/zx/posix/socket, func BaseSocketBindResultWithErr(posix.Errno) BaseSocketBindResult
+pkg syscall/zx/posix/socket, func BaseSocketBindResultWithResponse(BaseSocketBindResponse) BaseSocketBindResult
+pkg syscall/zx/posix/socket, func BaseSocketConnectResultWithErr(posix.Errno) BaseSocketConnectResult
+pkg syscall/zx/posix/socket, func BaseSocketConnectResultWithResponse(BaseSocketConnectResponse) BaseSocketConnectResult
+pkg syscall/zx/posix/socket, func BaseSocketDisconnectResultWithErr(posix.Errno) BaseSocketDisconnectResult
+pkg syscall/zx/posix/socket, func BaseSocketDisconnectResultWithResponse(BaseSocketDisconnectResponse) BaseSocketDisconnectResult
+pkg syscall/zx/posix/socket, func BaseSocketGetPeerNameResultWithErr(posix.Errno) BaseSocketGetPeerNameResult
+pkg syscall/zx/posix/socket, func BaseSocketGetPeerNameResultWithResponse(BaseSocketGetPeerNameResponse) BaseSocketGetPeerNameResult
+pkg syscall/zx/posix/socket, func BaseSocketGetSockNameResultWithErr(posix.Errno) BaseSocketGetSockNameResult
+pkg syscall/zx/posix/socket, func BaseSocketGetSockNameResultWithResponse(BaseSocketGetSockNameResponse) BaseSocketGetSockNameResult
+pkg syscall/zx/posix/socket, func BaseSocketGetSockOptResultWithErr(posix.Errno) BaseSocketGetSockOptResult
+pkg syscall/zx/posix/socket, func BaseSocketGetSockOptResultWithResponse(BaseSocketGetSockOptResponse) BaseSocketGetSockOptResult
+pkg syscall/zx/posix/socket, func BaseSocketSetSockOptResultWithErr(posix.Errno) BaseSocketSetSockOptResult
+pkg syscall/zx/posix/socket, func BaseSocketSetSockOptResultWithResponse(BaseSocketSetSockOptResponse) BaseSocketSetSockOptResult
+pkg syscall/zx/posix/socket, func DatagramSocketRecvMsgResultWithErr(posix.Errno) DatagramSocketRecvMsgResult
+pkg syscall/zx/posix/socket, func DatagramSocketRecvMsgResultWithResponse(DatagramSocketRecvMsgResponse) DatagramSocketRecvMsgResult
+pkg syscall/zx/posix/socket, func DatagramSocketSendMsgResultWithErr(posix.Errno) DatagramSocketSendMsgResult
+pkg syscall/zx/posix/socket, func DatagramSocketSendMsgResultWithResponse(DatagramSocketSendMsgResponse) DatagramSocketSendMsgResult
+pkg syscall/zx/posix/socket, func DatagramSocketShutdownResultWithErr(posix.Errno) DatagramSocketShutdownResult
+pkg syscall/zx/posix/socket, func DatagramSocketShutdownResultWithResponse(DatagramSocketShutdownResponse) DatagramSocketShutdownResult
+pkg syscall/zx/posix/socket, func NewBaseSocketWithCtxInterfaceRequest() (BaseSocketWithCtxInterfaceRequest, *BaseSocketWithCtxInterface, error)
+pkg syscall/zx/posix/socket, func NewDatagramSocketWithCtxInterfaceRequest() (DatagramSocketWithCtxInterfaceRequest, *DatagramSocketWithCtxInterface, error)
+pkg syscall/zx/posix/socket, func NewProviderWithCtxInterfaceRequest() (ProviderWithCtxInterfaceRequest, *ProviderWithCtxInterface, error)
+pkg syscall/zx/posix/socket, func NewStreamSocketWithCtxInterfaceRequest() (StreamSocketWithCtxInterfaceRequest, *StreamSocketWithCtxInterface, error)
+pkg syscall/zx/posix/socket, func ProviderDatagramSocketResultWithErr(posix.Errno) ProviderDatagramSocketResult
+pkg syscall/zx/posix/socket, func ProviderDatagramSocketResultWithResponse(ProviderDatagramSocketResponse) ProviderDatagramSocketResult
+pkg syscall/zx/posix/socket, func ProviderInterfaceIndexToNameResultWithErr(int32) ProviderInterfaceIndexToNameResult
+pkg syscall/zx/posix/socket, func ProviderInterfaceIndexToNameResultWithResponse(ProviderInterfaceIndexToNameResponse) ProviderInterfaceIndexToNameResult
+pkg syscall/zx/posix/socket, func ProviderInterfaceNameToFlagsResultWithErr(int32) ProviderInterfaceNameToFlagsResult
+pkg syscall/zx/posix/socket, func ProviderInterfaceNameToFlagsResultWithResponse(ProviderInterfaceNameToFlagsResponse) ProviderInterfaceNameToFlagsResult
+pkg syscall/zx/posix/socket, func ProviderInterfaceNameToIndexResultWithErr(int32) ProviderInterfaceNameToIndexResult
+pkg syscall/zx/posix/socket, func ProviderInterfaceNameToIndexResultWithResponse(ProviderInterfaceNameToIndexResponse) ProviderInterfaceNameToIndexResult
+pkg syscall/zx/posix/socket, func ProviderStreamSocketResultWithErr(posix.Errno) ProviderStreamSocketResult
+pkg syscall/zx/posix/socket, func ProviderStreamSocketResultWithResponse(ProviderStreamSocketResponse) ProviderStreamSocketResult
+pkg syscall/zx/posix/socket, func StreamSocketAcceptResultWithErr(posix.Errno) StreamSocketAcceptResult
+pkg syscall/zx/posix/socket, func StreamSocketAcceptResultWithResponse(StreamSocketAcceptResponse) StreamSocketAcceptResult
+pkg syscall/zx/posix/socket, func StreamSocketListenResultWithErr(posix.Errno) StreamSocketListenResult
+pkg syscall/zx/posix/socket, func StreamSocketListenResultWithResponse(StreamSocketListenResponse) StreamSocketListenResult
+pkg syscall/zx/posix/socket, method (*BaseSocketBindResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*BaseSocketBindResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*BaseSocketBindResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*BaseSocketBindResult) SetResponse(BaseSocketBindResponse)
+pkg syscall/zx/posix/socket, method (*BaseSocketBindResult) Which() I_baseSocketBindResultTag
+pkg syscall/zx/posix/socket, method (*BaseSocketConnectResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*BaseSocketConnectResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*BaseSocketConnectResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*BaseSocketConnectResult) SetResponse(BaseSocketConnectResponse)
+pkg syscall/zx/posix/socket, method (*BaseSocketConnectResult) Which() I_baseSocketConnectResultTag
+pkg syscall/zx/posix/socket, method (*BaseSocketDisconnectResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*BaseSocketDisconnectResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*BaseSocketDisconnectResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*BaseSocketDisconnectResult) SetResponse(BaseSocketDisconnectResponse)
+pkg syscall/zx/posix/socket, method (*BaseSocketDisconnectResult) Which() I_baseSocketDisconnectResultTag
+pkg syscall/zx/posix/socket, method (*BaseSocketEventProxy) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*BaseSocketEventProxy) OnOpen(int32, *io.NodeInfo) error
+pkg syscall/zx/posix/socket, method (*BaseSocketGetPeerNameResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*BaseSocketGetPeerNameResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*BaseSocketGetPeerNameResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*BaseSocketGetPeerNameResult) SetResponse(BaseSocketGetPeerNameResponse)
+pkg syscall/zx/posix/socket, method (*BaseSocketGetPeerNameResult) Which() I_baseSocketGetPeerNameResultTag
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockNameResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockNameResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockNameResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockNameResult) SetResponse(BaseSocketGetSockNameResponse)
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockNameResult) Which() I_baseSocketGetSockNameResultTag
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockOptResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockOptResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockOptResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockOptResult) SetResponse(BaseSocketGetSockOptResponse)
+pkg syscall/zx/posix/socket, method (*BaseSocketGetSockOptResult) Which() I_baseSocketGetSockOptResultTag
+pkg syscall/zx/posix/socket, method (*BaseSocketSetSockOptResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*BaseSocketSetSockOptResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*BaseSocketSetSockOptResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*BaseSocketSetSockOptResult) SetResponse(BaseSocketSetSockOptResponse)
+pkg syscall/zx/posix/socket, method (*BaseSocketSetSockOptResult) Which() I_baseSocketSetSockOptResultTag
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) Bind(context.Context, net.SocketAddress) (BaseSocketBindResult, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) Clone(context.Context, uint32, io.NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) Close(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) Connect(context.Context, net.SocketAddress) (BaseSocketConnectResult, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) Describe(context.Context) (io.NodeInfo, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) Disconnect(context.Context) (BaseSocketDisconnectResult, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) ExpectOnOpen(context.Context) (int32, *io.NodeInfo, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) GetAttr(context.Context) (int32, io.NodeAttributes, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) GetPeerName(context.Context) (BaseSocketGetPeerNameResult, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) GetSockName(context.Context) (BaseSocketGetSockNameResult, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) GetSockOpt(context.Context, int16, int16) (BaseSocketGetSockOptResult, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) SetAttr(context.Context, uint32, io.NodeAttributes) (int32, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) SetSockOpt(context.Context, int16, int16, []uint8) (BaseSocketSetSockOptResult, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterface) Sync(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxTransitionalBase) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/posix/socket, method (*BaseSocketWithCtxTransitionalBase) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketEventProxy) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*DatagramSocketEventProxy) OnOpen(int32, *io.NodeInfo) error
+pkg syscall/zx/posix/socket, method (*DatagramSocketRecvMsgResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*DatagramSocketRecvMsgResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*DatagramSocketRecvMsgResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*DatagramSocketRecvMsgResult) SetResponse(DatagramSocketRecvMsgResponse)
+pkg syscall/zx/posix/socket, method (*DatagramSocketRecvMsgResult) Which() I_datagramSocketRecvMsgResultTag
+pkg syscall/zx/posix/socket, method (*DatagramSocketSendMsgResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*DatagramSocketSendMsgResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*DatagramSocketSendMsgResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*DatagramSocketSendMsgResult) SetResponse(DatagramSocketSendMsgResponse)
+pkg syscall/zx/posix/socket, method (*DatagramSocketSendMsgResult) Which() I_datagramSocketSendMsgResultTag
+pkg syscall/zx/posix/socket, method (*DatagramSocketShutdownResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*DatagramSocketShutdownResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*DatagramSocketShutdownResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*DatagramSocketShutdownResult) SetResponse(DatagramSocketShutdownResponse)
+pkg syscall/zx/posix/socket, method (*DatagramSocketShutdownResult) Which() I_datagramSocketShutdownResultTag
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) Bind(context.Context, net.SocketAddress) (BaseSocketBindResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) Clone(context.Context, uint32, io.NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) Close(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) Connect(context.Context, net.SocketAddress) (BaseSocketConnectResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) Describe(context.Context) (io.NodeInfo, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) Disconnect(context.Context) (BaseSocketDisconnectResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) ExpectOnOpen(context.Context) (int32, *io.NodeInfo, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) GetAttr(context.Context) (int32, io.NodeAttributes, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) GetPeerName(context.Context) (BaseSocketGetPeerNameResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) GetSockName(context.Context) (BaseSocketGetSockNameResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) GetSockOpt(context.Context, int16, int16) (BaseSocketGetSockOptResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) RecvMsg(context.Context, bool, uint32, bool, RecvMsgFlags) (DatagramSocketRecvMsgResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) SendMsg(context.Context, *net.SocketAddress, []uint8, SendControlData, SendMsgFlags) (DatagramSocketSendMsgResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) SetAttr(context.Context, uint32, io.NodeAttributes) (int32, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) SetSockOpt(context.Context, int16, int16, []uint8) (BaseSocketSetSockOptResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) Shutdown(context.Context, ShutdownMode) (DatagramSocketShutdownResult, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterface) Sync(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxTransitionalBase) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/posix/socket, method (*DatagramSocketWithCtxTransitionalBase) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/posix/socket, method (*Empty) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) ClearAddresses()
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) ClearFlags()
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) ClearId()
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) ClearInterfaceFlags()
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) ClearName()
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetAddresses() []net.Subnet
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetAddressesWithDefault([]net.Subnet) []net.Subnet
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetFlags() uint32
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetFlagsWithDefault(uint32) uint32
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetId() uint64
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetIdWithDefault(uint64) uint64
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetInterfaceFlags() InterfaceFlags
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetInterfaceFlagsWithDefault(InterfaceFlags) InterfaceFlags
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetName() string
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetNameWithDefault(string) string
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) HasAddresses() bool
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) HasFlags() bool
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) HasId() bool
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) HasInterfaceFlags() bool
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) HasName() bool
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) HasUnknownData() bool
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) SetAddresses([]net.Subnet)
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) SetFlags(uint32)
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) SetId(uint64)
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) SetInterfaceFlags(InterfaceFlags)
+pkg syscall/zx/posix/socket, method (*InterfaceAddresses) SetName(string)
+pkg syscall/zx/posix/socket, method (*ProviderDatagramSocketResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*ProviderDatagramSocketResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*ProviderDatagramSocketResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*ProviderDatagramSocketResult) SetResponse(ProviderDatagramSocketResponse)
+pkg syscall/zx/posix/socket, method (*ProviderDatagramSocketResult) Which() I_providerDatagramSocketResultTag
+pkg syscall/zx/posix/socket, method (*ProviderEventProxy) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceIndexToNameResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceIndexToNameResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceIndexToNameResult) SetErr(int32)
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceIndexToNameResult) SetResponse(ProviderInterfaceIndexToNameResponse)
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceIndexToNameResult) Which() I_providerInterfaceIndexToNameResultTag
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToFlagsResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToFlagsResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToFlagsResult) SetErr(int32)
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToFlagsResult) SetResponse(ProviderInterfaceNameToFlagsResponse)
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToFlagsResult) Which() I_providerInterfaceNameToFlagsResultTag
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToIndexResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToIndexResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToIndexResult) SetErr(int32)
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToIndexResult) SetResponse(ProviderInterfaceNameToIndexResponse)
+pkg syscall/zx/posix/socket, method (*ProviderInterfaceNameToIndexResult) Which() I_providerInterfaceNameToIndexResultTag
+pkg syscall/zx/posix/socket, method (*ProviderStreamSocketResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*ProviderStreamSocketResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*ProviderStreamSocketResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*ProviderStreamSocketResult) SetResponse(ProviderStreamSocketResponse)
+pkg syscall/zx/posix/socket, method (*ProviderStreamSocketResult) Which() I_providerStreamSocketResultTag
+pkg syscall/zx/posix/socket, method (*ProviderWithCtxInterface) DatagramSocket(context.Context, Domain, DatagramSocketProtocol) (ProviderDatagramSocketResult, error)
+pkg syscall/zx/posix/socket, method (*ProviderWithCtxInterface) GetInterfaceAddresses(context.Context) ([]InterfaceAddresses, error)
+pkg syscall/zx/posix/socket, method (*ProviderWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*ProviderWithCtxInterface) InterfaceIndexToName(context.Context, uint64) (ProviderInterfaceIndexToNameResult, error)
+pkg syscall/zx/posix/socket, method (*ProviderWithCtxInterface) InterfaceNameToFlags(context.Context, string) (ProviderInterfaceNameToFlagsResult, error)
+pkg syscall/zx/posix/socket, method (*ProviderWithCtxInterface) InterfaceNameToIndex(context.Context, string) (ProviderInterfaceNameToIndexResult, error)
+pkg syscall/zx/posix/socket, method (*ProviderWithCtxInterface) StreamSocket(context.Context, Domain, StreamSocketProtocol) (ProviderStreamSocketResult, error)
+pkg syscall/zx/posix/socket, method (*ProviderWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*ProviderWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/posix/socket, method (*RecvControlData) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/posix/socket, method (*RecvControlData) HasUnknownData() bool
+pkg syscall/zx/posix/socket, method (*SendControlData) GetUnknownData() map[uint64]fidl.UnknownData
+pkg syscall/zx/posix/socket, method (*SendControlData) HasUnknownData() bool
+pkg syscall/zx/posix/socket, method (*StreamSocketAcceptResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*StreamSocketAcceptResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*StreamSocketAcceptResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*StreamSocketAcceptResult) SetResponse(StreamSocketAcceptResponse)
+pkg syscall/zx/posix/socket, method (*StreamSocketAcceptResult) Which() I_streamSocketAcceptResultTag
+pkg syscall/zx/posix/socket, method (*StreamSocketEventProxy) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*StreamSocketEventProxy) OnOpen(int32, *io.NodeInfo) error
+pkg syscall/zx/posix/socket, method (*StreamSocketListenResponse) Marshaler() fidl.Marshaler
+pkg syscall/zx/posix/socket, method (*StreamSocketListenResult) Ordinal() uint64
+pkg syscall/zx/posix/socket, method (*StreamSocketListenResult) SetErr(posix.Errno)
+pkg syscall/zx/posix/socket, method (*StreamSocketListenResult) SetResponse(StreamSocketListenResponse)
+pkg syscall/zx/posix/socket, method (*StreamSocketListenResult) Which() I_streamSocketListenResultTag
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Accept(context.Context, bool) (StreamSocketAcceptResult, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Bind(context.Context, net.SocketAddress) (BaseSocketBindResult, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Clone(context.Context, uint32, io.NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Close(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Connect(context.Context, net.SocketAddress) (BaseSocketConnectResult, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Describe(context.Context) (io.NodeInfo, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Disconnect(context.Context) (BaseSocketDisconnectResult, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) ExpectOnOpen(context.Context) (int32, *io.NodeInfo, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) GetAttr(context.Context) (int32, io.NodeAttributes, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) GetPeerName(context.Context) (BaseSocketGetPeerNameResult, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) GetSockName(context.Context) (BaseSocketGetSockNameResult, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) GetSockOpt(context.Context, int16, int16) (BaseSocketGetSockOptResult, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Listen(context.Context, int16) (StreamSocketListenResult, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) SetAttr(context.Context, uint32, io.NodeAttributes) (int32, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) SetSockOpt(context.Context, int16, int16, []uint8) (BaseSocketSetSockOptResult, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterface) Sync(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxInterfaceRequest) Handle() *zx.Handle
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxStub) Dispatch(fidl.DispatchArgs) (fidl.Message, bool, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxTransitionalBase) NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/posix/socket, method (*StreamSocketWithCtxTransitionalBase) NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/posix/socket, method (DatagramSocketProtocol) I_EnumIsStrict() bool
+pkg syscall/zx/posix/socket, method (DatagramSocketProtocol) I_EnumValues() []DatagramSocketProtocol
+pkg syscall/zx/posix/socket, method (DatagramSocketProtocol) IsUnknown() bool
+pkg syscall/zx/posix/socket, method (DatagramSocketProtocol) String() string
+pkg syscall/zx/posix/socket, method (Domain) I_EnumIsStrict() bool
+pkg syscall/zx/posix/socket, method (Domain) I_EnumValues() []Domain
+pkg syscall/zx/posix/socket, method (Domain) IsUnknown() bool
+pkg syscall/zx/posix/socket, method (Domain) String() string
+pkg syscall/zx/posix/socket, method (InterfaceFlags) ClearBits(InterfaceFlags) InterfaceFlags
+pkg syscall/zx/posix/socket, method (InterfaceFlags) GetUnknownBits() uint64
+pkg syscall/zx/posix/socket, method (InterfaceFlags) HasBits(InterfaceFlags) bool
+pkg syscall/zx/posix/socket, method (InterfaceFlags) HasUnknownBits() bool
+pkg syscall/zx/posix/socket, method (InterfaceFlags) I_BitsIsStrict() bool
+pkg syscall/zx/posix/socket, method (InterfaceFlags) I_BitsMask() InterfaceFlags
+pkg syscall/zx/posix/socket, method (InterfaceFlags) InvertBits() InterfaceFlags
+pkg syscall/zx/posix/socket, method (InterfaceFlags) String() string
+pkg syscall/zx/posix/socket, method (ProviderWithCtxInterfaceRequest) Name() string
+pkg syscall/zx/posix/socket, method (ProviderWithCtxInterfaceRequest) ToChannel() zx.Channel
+pkg syscall/zx/posix/socket, method (RecvMsgFlags) ClearBits(RecvMsgFlags) RecvMsgFlags
+pkg syscall/zx/posix/socket, method (RecvMsgFlags) GetUnknownBits() uint64
+pkg syscall/zx/posix/socket, method (RecvMsgFlags) HasBits(RecvMsgFlags) bool
+pkg syscall/zx/posix/socket, method (RecvMsgFlags) HasUnknownBits() bool
+pkg syscall/zx/posix/socket, method (RecvMsgFlags) I_BitsIsStrict() bool
+pkg syscall/zx/posix/socket, method (RecvMsgFlags) I_BitsMask() RecvMsgFlags
+pkg syscall/zx/posix/socket, method (RecvMsgFlags) InvertBits() RecvMsgFlags
+pkg syscall/zx/posix/socket, method (RecvMsgFlags) String() string
+pkg syscall/zx/posix/socket, method (SendMsgFlags) ClearBits(SendMsgFlags) SendMsgFlags
+pkg syscall/zx/posix/socket, method (SendMsgFlags) GetUnknownBits() uint64
+pkg syscall/zx/posix/socket, method (SendMsgFlags) HasBits(SendMsgFlags) bool
+pkg syscall/zx/posix/socket, method (SendMsgFlags) HasUnknownBits() bool
+pkg syscall/zx/posix/socket, method (SendMsgFlags) I_BitsIsStrict() bool
+pkg syscall/zx/posix/socket, method (SendMsgFlags) I_BitsMask() SendMsgFlags
+pkg syscall/zx/posix/socket, method (SendMsgFlags) InvertBits() SendMsgFlags
+pkg syscall/zx/posix/socket, method (SendMsgFlags) String() string
+pkg syscall/zx/posix/socket, method (ShutdownMode) ClearBits(ShutdownMode) ShutdownMode
+pkg syscall/zx/posix/socket, method (ShutdownMode) GetUnknownBits() uint64
+pkg syscall/zx/posix/socket, method (ShutdownMode) HasBits(ShutdownMode) bool
+pkg syscall/zx/posix/socket, method (ShutdownMode) HasUnknownBits() bool
+pkg syscall/zx/posix/socket, method (ShutdownMode) I_BitsIsStrict() bool
+pkg syscall/zx/posix/socket, method (ShutdownMode) I_BitsMask() ShutdownMode
+pkg syscall/zx/posix/socket, method (ShutdownMode) InvertBits() ShutdownMode
+pkg syscall/zx/posix/socket, method (ShutdownMode) String() string
+pkg syscall/zx/posix/socket, method (StreamSocketProtocol) I_EnumIsStrict() bool
+pkg syscall/zx/posix/socket, method (StreamSocketProtocol) I_EnumValues() []StreamSocketProtocol
+pkg syscall/zx/posix/socket, method (StreamSocketProtocol) IsUnknown() bool
+pkg syscall/zx/posix/socket, method (StreamSocketProtocol) String() string
+pkg syscall/zx/posix/socket, type BaseSocketBindResponse struct
+pkg syscall/zx/posix/socket, type BaseSocketBindResult struct
+pkg syscall/zx/posix/socket, type BaseSocketBindResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type BaseSocketBindResult struct, Response BaseSocketBindResponse
+pkg syscall/zx/posix/socket, type BaseSocketBindResult struct, embedded I_baseSocketBindResultTag
+pkg syscall/zx/posix/socket, type BaseSocketConnectResponse struct
+pkg syscall/zx/posix/socket, type BaseSocketConnectResult struct
+pkg syscall/zx/posix/socket, type BaseSocketConnectResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type BaseSocketConnectResult struct, Response BaseSocketConnectResponse
+pkg syscall/zx/posix/socket, type BaseSocketConnectResult struct, embedded I_baseSocketConnectResultTag
+pkg syscall/zx/posix/socket, type BaseSocketDisconnectResponse struct
+pkg syscall/zx/posix/socket, type BaseSocketDisconnectResult struct
+pkg syscall/zx/posix/socket, type BaseSocketDisconnectResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type BaseSocketDisconnectResult struct, Response BaseSocketDisconnectResponse
+pkg syscall/zx/posix/socket, type BaseSocketDisconnectResult struct, embedded I_baseSocketDisconnectResultTag
+pkg syscall/zx/posix/socket, type BaseSocketEventProxy struct
+pkg syscall/zx/posix/socket, type BaseSocketEventProxy struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type BaseSocketGetPeerNameResponse struct
+pkg syscall/zx/posix/socket, type BaseSocketGetPeerNameResponse struct, Addr net.SocketAddress
+pkg syscall/zx/posix/socket, type BaseSocketGetPeerNameResult struct
+pkg syscall/zx/posix/socket, type BaseSocketGetPeerNameResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type BaseSocketGetPeerNameResult struct, Response BaseSocketGetPeerNameResponse
+pkg syscall/zx/posix/socket, type BaseSocketGetPeerNameResult struct, embedded I_baseSocketGetPeerNameResultTag
+pkg syscall/zx/posix/socket, type BaseSocketGetSockNameResponse struct
+pkg syscall/zx/posix/socket, type BaseSocketGetSockNameResponse struct, Addr net.SocketAddress
+pkg syscall/zx/posix/socket, type BaseSocketGetSockNameResult struct
+pkg syscall/zx/posix/socket, type BaseSocketGetSockNameResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type BaseSocketGetSockNameResult struct, Response BaseSocketGetSockNameResponse
+pkg syscall/zx/posix/socket, type BaseSocketGetSockNameResult struct, embedded I_baseSocketGetSockNameResultTag
+pkg syscall/zx/posix/socket, type BaseSocketGetSockOptResponse struct
+pkg syscall/zx/posix/socket, type BaseSocketGetSockOptResponse struct, Optval []uint8
+pkg syscall/zx/posix/socket, type BaseSocketGetSockOptResult struct
+pkg syscall/zx/posix/socket, type BaseSocketGetSockOptResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type BaseSocketGetSockOptResult struct, Response BaseSocketGetSockOptResponse
+pkg syscall/zx/posix/socket, type BaseSocketGetSockOptResult struct, embedded I_baseSocketGetSockOptResultTag
+pkg syscall/zx/posix/socket, type BaseSocketSetSockOptResponse struct
+pkg syscall/zx/posix/socket, type BaseSocketSetSockOptResult struct
+pkg syscall/zx/posix/socket, type BaseSocketSetSockOptResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type BaseSocketSetSockOptResult struct, Response BaseSocketSetSockOptResponse
+pkg syscall/zx/posix/socket, type BaseSocketSetSockOptResult struct, embedded I_baseSocketSetSockOptResultTag
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface { Bind, Clone, Close, Connect, Describe, Disconnect, GetAttr, GetPeerName, GetSockName, GetSockOpt, NodeGetFlags, NodeSetFlags, SetAttr, SetSockOpt, Sync }
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, Bind(context.Context, net.SocketAddress) (BaseSocketBindResult, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, Clone(context.Context, uint32, io.NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, Close(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, Connect(context.Context, net.SocketAddress) (BaseSocketConnectResult, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, Describe(context.Context) (io.NodeInfo, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, Disconnect(context.Context) (BaseSocketDisconnectResult, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, GetAttr(context.Context) (int32, io.NodeAttributes, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, GetPeerName(context.Context) (BaseSocketGetPeerNameResult, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, GetSockName(context.Context) (BaseSocketGetSockNameResult, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, GetSockOpt(context.Context, int16, int16) (BaseSocketGetSockOptResult, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, SetAttr(context.Context, uint32, io.NodeAttributes) (int32, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, SetSockOpt(context.Context, int16, int16, []uint8) (BaseSocketSetSockOptResult, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtx interface, Sync(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, type BaseSocketWithCtxInterface struct
+pkg syscall/zx/posix/socket, type BaseSocketWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type BaseSocketWithCtxInterfaceRequest struct
+pkg syscall/zx/posix/socket, type BaseSocketWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type BaseSocketWithCtxStub struct
+pkg syscall/zx/posix/socket, type BaseSocketWithCtxStub struct, Impl BaseSocketWithCtx
+pkg syscall/zx/posix/socket, type BaseSocketWithCtxTransitionalBase struct
+pkg syscall/zx/posix/socket, type DatagramSocketEventProxy struct
+pkg syscall/zx/posix/socket, type DatagramSocketEventProxy struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type DatagramSocketProtocol uint32
+pkg syscall/zx/posix/socket, type DatagramSocketRecvMsgResponse struct
+pkg syscall/zx/posix/socket, type DatagramSocketRecvMsgResponse struct, Addr *net.SocketAddress
+pkg syscall/zx/posix/socket, type DatagramSocketRecvMsgResponse struct, Control RecvControlData
+pkg syscall/zx/posix/socket, type DatagramSocketRecvMsgResponse struct, Data []uint8
+pkg syscall/zx/posix/socket, type DatagramSocketRecvMsgResponse struct, Truncated uint32
+pkg syscall/zx/posix/socket, type DatagramSocketRecvMsgResult struct
+pkg syscall/zx/posix/socket, type DatagramSocketRecvMsgResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type DatagramSocketRecvMsgResult struct, Response DatagramSocketRecvMsgResponse
+pkg syscall/zx/posix/socket, type DatagramSocketRecvMsgResult struct, embedded I_datagramSocketRecvMsgResultTag
+pkg syscall/zx/posix/socket, type DatagramSocketSendMsgResponse struct
+pkg syscall/zx/posix/socket, type DatagramSocketSendMsgResponse struct, Len int64
+pkg syscall/zx/posix/socket, type DatagramSocketSendMsgResult struct
+pkg syscall/zx/posix/socket, type DatagramSocketSendMsgResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type DatagramSocketSendMsgResult struct, Response DatagramSocketSendMsgResponse
+pkg syscall/zx/posix/socket, type DatagramSocketSendMsgResult struct, embedded I_datagramSocketSendMsgResultTag
+pkg syscall/zx/posix/socket, type DatagramSocketShutdownResponse struct
+pkg syscall/zx/posix/socket, type DatagramSocketShutdownResult struct
+pkg syscall/zx/posix/socket, type DatagramSocketShutdownResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type DatagramSocketShutdownResult struct, Response DatagramSocketShutdownResponse
+pkg syscall/zx/posix/socket, type DatagramSocketShutdownResult struct, embedded I_datagramSocketShutdownResultTag
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface { Bind, Clone, Close, Connect, Describe, Disconnect, GetAttr, GetPeerName, GetSockName, GetSockOpt, NodeGetFlags, NodeSetFlags, RecvMsg, SendMsg, SetAttr, SetSockOpt, Shutdown, Sync }
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, Bind(context.Context, net.SocketAddress) (BaseSocketBindResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, Clone(context.Context, uint32, io.NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, Close(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, Connect(context.Context, net.SocketAddress) (BaseSocketConnectResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, Describe(context.Context) (io.NodeInfo, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, Disconnect(context.Context) (BaseSocketDisconnectResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, GetAttr(context.Context) (int32, io.NodeAttributes, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, GetPeerName(context.Context) (BaseSocketGetPeerNameResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, GetSockName(context.Context) (BaseSocketGetSockNameResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, GetSockOpt(context.Context, int16, int16) (BaseSocketGetSockOptResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, RecvMsg(context.Context, bool, uint32, bool, RecvMsgFlags) (DatagramSocketRecvMsgResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, SendMsg(context.Context, *net.SocketAddress, []uint8, SendControlData, SendMsgFlags) (DatagramSocketSendMsgResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, SetAttr(context.Context, uint32, io.NodeAttributes) (int32, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, SetSockOpt(context.Context, int16, int16, []uint8) (BaseSocketSetSockOptResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, Shutdown(context.Context, ShutdownMode) (DatagramSocketShutdownResult, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtx interface, Sync(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtxInterface struct
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtxInterfaceRequest struct
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtxStub struct
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtxStub struct, Impl DatagramSocketWithCtx
+pkg syscall/zx/posix/socket, type DatagramSocketWithCtxTransitionalBase struct
+pkg syscall/zx/posix/socket, type Domain int16
+pkg syscall/zx/posix/socket, type Empty struct
+pkg syscall/zx/posix/socket, type I_baseSocketBindResultTag uint64
+pkg syscall/zx/posix/socket, type I_baseSocketConnectResultTag uint64
+pkg syscall/zx/posix/socket, type I_baseSocketDisconnectResultTag uint64
+pkg syscall/zx/posix/socket, type I_baseSocketGetPeerNameResultTag uint64
+pkg syscall/zx/posix/socket, type I_baseSocketGetSockNameResultTag uint64
+pkg syscall/zx/posix/socket, type I_baseSocketGetSockOptResultTag uint64
+pkg syscall/zx/posix/socket, type I_baseSocketSetSockOptResultTag uint64
+pkg syscall/zx/posix/socket, type I_datagramSocketRecvMsgResultTag uint64
+pkg syscall/zx/posix/socket, type I_datagramSocketSendMsgResultTag uint64
+pkg syscall/zx/posix/socket, type I_datagramSocketShutdownResultTag uint64
+pkg syscall/zx/posix/socket, type I_providerDatagramSocketResultTag uint64
+pkg syscall/zx/posix/socket, type I_providerInterfaceIndexToNameResultTag uint64
+pkg syscall/zx/posix/socket, type I_providerInterfaceNameToFlagsResultTag uint64
+pkg syscall/zx/posix/socket, type I_providerInterfaceNameToIndexResultTag uint64
+pkg syscall/zx/posix/socket, type I_providerStreamSocketResultTag uint64
+pkg syscall/zx/posix/socket, type I_streamSocketAcceptResultTag uint64
+pkg syscall/zx/posix/socket, type I_streamSocketListenResultTag uint64
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, Addresses []net.Subnet
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, AddressesPresent bool
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, Flags uint32
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, FlagsPresent bool
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, I_unknownData interface{}
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, Id uint64
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, IdPresent bool
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, InterfaceFlags InterfaceFlags
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, InterfaceFlagsPresent bool
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, Name string
+pkg syscall/zx/posix/socket, type InterfaceAddresses struct, NamePresent bool
+pkg syscall/zx/posix/socket, type InterfaceFlags uint16
+pkg syscall/zx/posix/socket, type ProviderDatagramSocketResponse struct
+pkg syscall/zx/posix/socket, type ProviderDatagramSocketResponse struct, S DatagramSocketWithCtxInterface
+pkg syscall/zx/posix/socket, type ProviderDatagramSocketResult struct
+pkg syscall/zx/posix/socket, type ProviderDatagramSocketResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type ProviderDatagramSocketResult struct, Response ProviderDatagramSocketResponse
+pkg syscall/zx/posix/socket, type ProviderDatagramSocketResult struct, embedded I_providerDatagramSocketResultTag
+pkg syscall/zx/posix/socket, type ProviderEventProxy struct
+pkg syscall/zx/posix/socket, type ProviderEventProxy struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type ProviderInterfaceIndexToNameResponse struct
+pkg syscall/zx/posix/socket, type ProviderInterfaceIndexToNameResponse struct, Name string
+pkg syscall/zx/posix/socket, type ProviderInterfaceIndexToNameResult struct
+pkg syscall/zx/posix/socket, type ProviderInterfaceIndexToNameResult struct, Err int32
+pkg syscall/zx/posix/socket, type ProviderInterfaceIndexToNameResult struct, Response ProviderInterfaceIndexToNameResponse
+pkg syscall/zx/posix/socket, type ProviderInterfaceIndexToNameResult struct, embedded I_providerInterfaceIndexToNameResultTag
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToFlagsResponse struct
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToFlagsResponse struct, Flags InterfaceFlags
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToFlagsResult struct
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToFlagsResult struct, Err int32
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToFlagsResult struct, Response ProviderInterfaceNameToFlagsResponse
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToFlagsResult struct, embedded I_providerInterfaceNameToFlagsResultTag
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToIndexResponse struct
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToIndexResponse struct, Index uint64
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToIndexResult struct
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToIndexResult struct, Err int32
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToIndexResult struct, Response ProviderInterfaceNameToIndexResponse
+pkg syscall/zx/posix/socket, type ProviderInterfaceNameToIndexResult struct, embedded I_providerInterfaceNameToIndexResultTag
+pkg syscall/zx/posix/socket, type ProviderStreamSocketResponse struct
+pkg syscall/zx/posix/socket, type ProviderStreamSocketResponse struct, S StreamSocketWithCtxInterface
+pkg syscall/zx/posix/socket, type ProviderStreamSocketResult struct
+pkg syscall/zx/posix/socket, type ProviderStreamSocketResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type ProviderStreamSocketResult struct, Response ProviderStreamSocketResponse
+pkg syscall/zx/posix/socket, type ProviderStreamSocketResult struct, embedded I_providerStreamSocketResultTag
+pkg syscall/zx/posix/socket, type ProviderWithCtx interface { DatagramSocket, GetInterfaceAddresses, InterfaceIndexToName, InterfaceNameToFlags, InterfaceNameToIndex, StreamSocket }
+pkg syscall/zx/posix/socket, type ProviderWithCtx interface, DatagramSocket(context.Context, Domain, DatagramSocketProtocol) (ProviderDatagramSocketResult, error)
+pkg syscall/zx/posix/socket, type ProviderWithCtx interface, GetInterfaceAddresses(context.Context) ([]InterfaceAddresses, error)
+pkg syscall/zx/posix/socket, type ProviderWithCtx interface, InterfaceIndexToName(context.Context, uint64) (ProviderInterfaceIndexToNameResult, error)
+pkg syscall/zx/posix/socket, type ProviderWithCtx interface, InterfaceNameToFlags(context.Context, string) (ProviderInterfaceNameToFlagsResult, error)
+pkg syscall/zx/posix/socket, type ProviderWithCtx interface, InterfaceNameToIndex(context.Context, string) (ProviderInterfaceNameToIndexResult, error)
+pkg syscall/zx/posix/socket, type ProviderWithCtx interface, StreamSocket(context.Context, Domain, StreamSocketProtocol) (ProviderStreamSocketResult, error)
+pkg syscall/zx/posix/socket, type ProviderWithCtxInterface struct
+pkg syscall/zx/posix/socket, type ProviderWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type ProviderWithCtxInterfaceRequest struct
+pkg syscall/zx/posix/socket, type ProviderWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type ProviderWithCtxStub struct
+pkg syscall/zx/posix/socket, type ProviderWithCtxStub struct, Impl ProviderWithCtx
+pkg syscall/zx/posix/socket, type ProviderWithCtxTransitionalBase struct
+pkg syscall/zx/posix/socket, type RecvControlData struct
+pkg syscall/zx/posix/socket, type RecvControlData struct, I_unknownData interface{}
+pkg syscall/zx/posix/socket, type RecvMsgFlags uint16
+pkg syscall/zx/posix/socket, type SendControlData struct
+pkg syscall/zx/posix/socket, type SendControlData struct, I_unknownData interface{}
+pkg syscall/zx/posix/socket, type SendMsgFlags uint16
+pkg syscall/zx/posix/socket, type ShutdownMode uint16
+pkg syscall/zx/posix/socket, type StreamSocketAcceptResponse struct
+pkg syscall/zx/posix/socket, type StreamSocketAcceptResponse struct, Addr *net.SocketAddress
+pkg syscall/zx/posix/socket, type StreamSocketAcceptResponse struct, S StreamSocketWithCtxInterface
+pkg syscall/zx/posix/socket, type StreamSocketAcceptResult struct
+pkg syscall/zx/posix/socket, type StreamSocketAcceptResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type StreamSocketAcceptResult struct, Response StreamSocketAcceptResponse
+pkg syscall/zx/posix/socket, type StreamSocketAcceptResult struct, embedded I_streamSocketAcceptResultTag
+pkg syscall/zx/posix/socket, type StreamSocketEventProxy struct
+pkg syscall/zx/posix/socket, type StreamSocketEventProxy struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type StreamSocketListenResponse struct
+pkg syscall/zx/posix/socket, type StreamSocketListenResult struct
+pkg syscall/zx/posix/socket, type StreamSocketListenResult struct, Err posix.Errno
+pkg syscall/zx/posix/socket, type StreamSocketListenResult struct, Response StreamSocketListenResponse
+pkg syscall/zx/posix/socket, type StreamSocketListenResult struct, embedded I_streamSocketListenResultTag
+pkg syscall/zx/posix/socket, type StreamSocketProtocol uint32
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface { Accept, Bind, Clone, Close, Connect, Describe, Disconnect, GetAttr, GetPeerName, GetSockName, GetSockOpt, Listen, NodeGetFlags, NodeSetFlags, SetAttr, SetSockOpt, Sync }
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, Accept(context.Context, bool) (StreamSocketAcceptResult, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, Bind(context.Context, net.SocketAddress) (BaseSocketBindResult, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, Clone(context.Context, uint32, io.NodeWithCtxInterfaceRequest) error
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, Close(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, Connect(context.Context, net.SocketAddress) (BaseSocketConnectResult, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, Describe(context.Context) (io.NodeInfo, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, Disconnect(context.Context) (BaseSocketDisconnectResult, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, GetAttr(context.Context) (int32, io.NodeAttributes, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, GetPeerName(context.Context) (BaseSocketGetPeerNameResult, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, GetSockName(context.Context) (BaseSocketGetSockNameResult, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, GetSockOpt(context.Context, int16, int16) (BaseSocketGetSockOptResult, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, Listen(context.Context, int16) (StreamSocketListenResult, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, NodeGetFlags(context.Context) (int32, uint32, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, NodeSetFlags(context.Context, uint32) (int32, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, SetAttr(context.Context, uint32, io.NodeAttributes) (int32, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, SetSockOpt(context.Context, int16, int16, []uint8) (BaseSocketSetSockOptResult, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtx interface, Sync(context.Context) (int32, error)
+pkg syscall/zx/posix/socket, type StreamSocketWithCtxInterface struct
+pkg syscall/zx/posix/socket, type StreamSocketWithCtxInterface struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type StreamSocketWithCtxInterfaceRequest struct
+pkg syscall/zx/posix/socket, type StreamSocketWithCtxInterfaceRequest struct, embedded zx.Channel
+pkg syscall/zx/posix/socket, type StreamSocketWithCtxStub struct
+pkg syscall/zx/posix/socket, type StreamSocketWithCtxStub struct, Impl StreamSocketWithCtx
+pkg syscall/zx/posix/socket, type StreamSocketWithCtxTransitionalBase struct
diff --git a/makefuchsia/BUILD.gn b/makefuchsia/BUILD.gn
new file mode 100644
index 0000000..ae1666e
--- /dev/null
+++ b/makefuchsia/BUILD.gn
@@ -0,0 +1,19 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/go/go_binary.gni")
+import("//build/go/go_library.gni")
+
+go_library("makefuchsia_lib") {
+ name = "makefuchsia"
+ sources = [
+ "makefuchsia.go",
+ ]
+}
+
+go_binary("makefuchsia") {
+ gopackage = "makefuchsia"
+
+ deps = [ ":makefuchsia_lib" ]
+}
diff --git a/makefuchsia/makefuchsia.go b/makefuchsia/makefuchsia.go
new file mode 100644
index 0000000..e1ee17e
--- /dev/null
+++ b/makefuchsia/makefuchsia.go
@@ -0,0 +1,86 @@
+// Copyright 2017 The Fuchsia 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 makefuchsia.go script builds a GOROOT in the out/ build directory
+// using sources from third_party/go.
+package main
+
+import (
+ "bytes"
+ "flag"
+ "io/ioutil"
+ "log"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "time"
+)
+
+var (
+ bootstrapGoroot = flag.String("bootstrap-goroot", "", "Path to go root used for bootstrap")
+ gocache = flag.String("gocache", "", "Path to GOCACHE")
+ goroot = flag.String("goroot", "", "Path to the output GOROOT")
+
+ depfilePath = flag.String("depfile", "", "depfile to write into")
+ stampPath = flag.String("stamp-file", "", "Path of a file to create upon completion")
+)
+
+func main() {
+ log.SetFlags(log.Lshortfile)
+ flag.Parse()
+
+ src := filepath.Join(*goroot, "src")
+
+ abs, err := filepath.Abs(filepath.Join(src, "make.bash"))
+ if err != nil {
+ log.Fatal(err)
+ }
+ cmd := exec.Command(abs)
+ cmd.Dir = src
+ cmd.Env = []string{
+ "PATH=" + os.Getenv("PATH"),
+ "GOROOT_BOOTSTRAP=" + *bootstrapGoroot,
+ "GOCACHE=" + *gocache,
+ }
+ if tmp, ok := os.LookupEnv("TMPDIR"); ok {
+ cmd.Env = append(cmd.Env, "TMPDIR=" + tmp)
+ }
+ if out, err := cmd.CombinedOutput(); err != nil {
+ log.Fatalf("%s failed: %s\n%s", cmd.Args, err, out)
+ }
+
+ var buf bytes.Buffer
+ buf.WriteString(*stampPath)
+ buf.WriteByte(':')
+ if err := filepath.Walk(*goroot, func(path string, info os.FileInfo, err error) error {
+ if err != nil {
+ return err
+ }
+ if !info.IsDir() {
+ buf.WriteByte(' ')
+ buf.WriteString(path)
+ }
+ return nil
+ }); err != nil {
+ log.Fatal(err)
+ }
+
+ buf.WriteByte('\n')
+
+ if err := ioutil.WriteFile(*depfilePath, buf.Bytes(), os.ModePerm); err != nil {
+ log.Fatal(err)
+ }
+
+ f, err := os.OpenFile(*stampPath, os.O_CREATE|os.O_TRUNC, os.ModePerm)
+ if err != nil {
+ log.Fatal(err)
+ }
+ if err := f.Close(); err != nil {
+ log.Fatal(err)
+ }
+ now := time.Now()
+ if err := os.Chtimes(*stampPath, now, now); err != nil {
+ log.Fatal(err)
+ }
+}
diff --git a/makeroot/BUILD.gn b/makeroot/BUILD.gn
new file mode 100644
index 0000000..0a5fca0
--- /dev/null
+++ b/makeroot/BUILD.gn
@@ -0,0 +1,19 @@
+# Copyright 2019 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/go/go_binary.gni")
+import("//build/go/go_library.gni")
+
+go_library("makeroot_lib") {
+ name = "makeroot"
+ sources = [
+ "makeroot.go",
+ ]
+}
+
+go_binary("makeroot") {
+ gopackage = "makeroot"
+
+ deps = [ ":makeroot_lib" ]
+}
diff --git a/makeroot/makeroot.go b/makeroot/makeroot.go
new file mode 100644
index 0000000..64a8ade
--- /dev/null
+++ b/makeroot/makeroot.go
@@ -0,0 +1,119 @@
+// Copyright 2018 The Fuchsia 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 makeroot.go script copies a GOROOT. It is a precursor to makefuchsia.go,
+// used to stage a clean GOROOT into the build directory.
+// Note: this script exists because the `go` tool globs for inputs, as such, a
+// copy tool is required that will actively remove files that are not found in
+// the source.
+
+package main
+
+import (
+ "bytes"
+ "flag"
+ "io"
+ "io/ioutil"
+ "log"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "time"
+)
+
+var (
+ sourceGoroot = flag.String("source-goroot", "", "GOROOT to copy from")
+ targetGoroot = flag.String("target-goroot", "", "GOROOT to copy into")
+ depfilePath = flag.String("depfile", "", "depfile to write into")
+ stampPath = flag.String("stamp-file", "", "Path of a file to create upon completion")
+)
+
+func main() {
+ log.SetFlags(log.Lshortfile)
+ flag.Parse()
+
+ if err := os.RemoveAll(*targetGoroot); err != nil {
+ log.Fatal(err)
+ }
+
+ var buf bytes.Buffer
+ buf.WriteString(*stampPath)
+ buf.WriteByte(':')
+
+ cmd := exec.Command("git", "ls-files", "--cached", "--others", "--exclude-standard", "-z")
+ cmd.Dir = *sourceGoroot
+ cmd.Env = []string{
+ "PATH=" + os.Getenv("PATH"),
+ }
+ out, err := cmd.Output()
+ if err != nil {
+ log.Fatal(err)
+ }
+ for _, path := range bytes.Split(out, []byte{0}) {
+ if len(path) == 0 {
+ continue
+ }
+ path := string(path)
+ src := filepath.Join(*sourceGoroot, path)
+ dst := filepath.Join(*targetGoroot, path)
+ srcFile, err := os.Open(src)
+ if err != nil {
+ // Renaming or deleting files will cause git ls-files to return the old (or deleted)
+ // paths unless the change is staged, so ignore these errors.
+ if os.IsNotExist(err) {
+ log.Print("could not open file: ", src)
+ continue
+ }
+ log.Fatal(err)
+ }
+ dstDir := filepath.Dir(dst)
+ if _, err := os.Stat(dstDir); os.IsNotExist(err) {
+ info, err := os.Stat(filepath.Dir(src))
+ if err != nil {
+ log.Fatal(err)
+ }
+ if err := os.MkdirAll(dstDir, info.Mode()); err != nil {
+ log.Fatal(err)
+ }
+ } else if err != nil {
+ log.Fatal(err)
+ }
+ info, err := srcFile.Stat()
+ if err != nil {
+ log.Fatal(err)
+ }
+ dstFile, err := os.OpenFile(dst, os.O_WRONLY|os.O_CREATE|os.O_EXCL, info.Mode())
+ if err != nil {
+ log.Fatal(err)
+ }
+ if _, err := io.Copy(dstFile, srcFile); err != nil {
+ log.Fatal(err)
+ }
+ if err := dstFile.Close(); err != nil {
+ log.Fatal(err)
+ }
+ if err := srcFile.Close(); err != nil {
+ log.Fatal(err)
+ }
+ buf.WriteByte(' ')
+ buf.WriteString(src)
+ }
+ buf.WriteByte('\n')
+
+ if err := ioutil.WriteFile(*depfilePath, buf.Bytes(), os.ModePerm); err != nil {
+ log.Fatal(err)
+ }
+
+ f, err := os.OpenFile(*stampPath, os.O_CREATE|os.O_TRUNC, os.ModePerm)
+ if err != nil {
+ log.Fatal(err)
+ }
+ if err := f.Close(); err != nil {
+ log.Fatal(err)
+ }
+ now := time.Now()
+ if err := os.Chtimes(*stampPath, now, now); err != nil {
+ log.Fatal(err)
+ }
+}
diff --git a/meta/go_exec_test.cmx b/meta/go_exec_test.cmx
new file mode 100644
index 0000000..7fd9ba2
--- /dev/null
+++ b/meta/go_exec_test.cmx
@@ -0,0 +1,24 @@
+{
+ "program": {
+ "args": [
+ "--test.timeout",
+ "2m"
+ ],
+ "binary": "test/go_exec_test"
+ },
+ "sandbox": {
+ "boot": [
+ "bin",
+ "lib"
+ ],
+ "dev": [
+ "null"
+ ],
+ "features": [
+ "isolated-temp"
+ ],
+ "services": [
+ "fuchsia.process.Launcher"
+ ]
+ }
+}
diff --git a/meta/go_extended_fidl_test.cmx b/meta/go_extended_fidl_test.cmx
new file mode 100644
index 0000000..c780119
--- /dev/null
+++ b/meta/go_extended_fidl_test.cmx
@@ -0,0 +1,14 @@
+{
+ "program": {
+ "args": [
+ "--test.timeout",
+ "2m"
+ ],
+ "binary": "test/go_extended_fidl_test"
+ },
+ "sandbox": {
+ "features": [
+ "isolated-persistent-storage"
+ ]
+ }
+}
diff --git a/meta/go_fidl_test.cmx b/meta/go_fidl_test.cmx
new file mode 100644
index 0000000..84c9944
--- /dev/null
+++ b/meta/go_fidl_test.cmx
@@ -0,0 +1,14 @@
+{
+ "program": {
+ "args": [
+ "--test.timeout",
+ "2m"
+ ],
+ "binary": "test/go_fidl_test"
+ },
+ "sandbox": {
+ "features": [
+ "isolated-persistent-storage"
+ ]
+ }
+}
diff --git a/meta/go_net_test.cmx b/meta/go_net_test.cmx
new file mode 100644
index 0000000..ba9803f
--- /dev/null
+++ b/meta/go_net_test.cmx
@@ -0,0 +1,26 @@
+{
+ "facets": {
+ "fuchsia.test": {
+ "injected-services": {
+ "fuchsia.net.stack.Stack": "fuchsia-pkg://fuchsia.com/go-stdlib-tests#meta/netstack-debug.cmx",
+ "fuchsia.posix.socket.Provider": "fuchsia-pkg://fuchsia.com/go-stdlib-tests#meta/netstack-debug.cmx"
+ }
+ }
+ },
+ "program": {
+ "args": [
+ "--test.timeout",
+ "2m"
+ ],
+ "binary": "test/go_net_test"
+ },
+ "sandbox": {
+ "features": [
+ "isolated-temp"
+ ],
+ "services": [
+ "fuchsia.net.stack.Stack",
+ "fuchsia.posix.socket.Provider"
+ ]
+ }
+}
diff --git a/meta/go_os_test.cmx b/meta/go_os_test.cmx
new file mode 100644
index 0000000..2d7be35
--- /dev/null
+++ b/meta/go_os_test.cmx
@@ -0,0 +1,24 @@
+{
+ "program": {
+ "args": [
+ "--test.timeout",
+ "2m"
+ ],
+ "binary": "test/go_os_test"
+ },
+ "sandbox": {
+ "boot": [
+ "bin",
+ "lib"
+ ],
+ "dev": [
+ "null"
+ ],
+ "features": [
+ "isolated-temp"
+ ],
+ "services": [
+ "fuchsia.process.Launcher"
+ ]
+ }
+}
diff --git a/meta/go_pprof_test.cmx b/meta/go_pprof_test.cmx
new file mode 100644
index 0000000..f616f0b
--- /dev/null
+++ b/meta/go_pprof_test.cmx
@@ -0,0 +1,18 @@
+{
+ "program": {
+ "args": [
+ "--test.v",
+ "--test.timeout",
+ "2m"
+ ],
+ "binary": "test/go_pprof_test"
+ },
+ "sandbox": {
+ "features": [
+ "isolated-temp"
+ ],
+ "services": [
+ "fuchsia.process.Launcher"
+ ]
+ }
+}
diff --git a/meta/go_unsafevalue_test.cmx b/meta/go_unsafevalue_test.cmx
new file mode 100644
index 0000000..5255783
--- /dev/null
+++ b/meta/go_unsafevalue_test.cmx
@@ -0,0 +1,9 @@
+{
+ "program": {
+ "args": [
+ "--test.timeout",
+ "2m"
+ ],
+ "binary": "test/go_unsafevalue_test"
+ }
+}
diff --git a/meta/go_zx_test.cmx b/meta/go_zx_test.cmx
new file mode 100644
index 0000000..c2581e8
--- /dev/null
+++ b/meta/go_zx_test.cmx
@@ -0,0 +1,9 @@
+{
+ "program": {
+ "args": [
+ "--test.timeout",
+ "2m"
+ ],
+ "binary": "test/go_zx_test"
+ }
+}
diff --git a/meta/go_zxwait_test.cmx b/meta/go_zxwait_test.cmx
new file mode 100644
index 0000000..d8330fc
--- /dev/null
+++ b/meta/go_zxwait_test.cmx
@@ -0,0 +1,9 @@
+{
+ "program": {
+ "args": [
+ "--test.timeout",
+ "2m"
+ ],
+ "binary": "test/go_zxwait_test"
+ }
+}
diff --git a/misc/fuchsia/README.md b/misc/fuchsia/README.md
new file mode 100644
index 0000000..e26e84b
--- /dev/null
+++ b/misc/fuchsia/README.md
@@ -0,0 +1,47 @@
+Go on Fuchsia
+=========
+
+To build a toolchain on Linux for Fuchsia, first follow the
+instructions on
+
+ https://fuchsia.googlesource.com/manifest/
+
+Then,
+* Set the SDK environment variable to the location of the Fuchsia SDK:
+ If you downloaded fuchsia to your ${HOME} directory:
+ ```
+ export SDK=${HOME}/fuchsia/buildtools
+ ```
+
+* Identify where a host version of go exists, with:
+ ```
+ export GOROOT_BOOTSTRAP=`path to directory containing go`
+ ```
+ On my machine, `which go` returned /usr/lib/golang/bin/go, so I set
+ GOROOT_BOOTSTRAP=/usr/lib/golang/
+
+* Build Go in `fuchsia/third_party/go/src` using
+ ```
+ GOOS=fuchsia CC_FOR_TARGET=../misc/fuchsia/clangwrap.sh ./make.bash
+ ```
+
+* To build a program, junk.go in go/src, use:
+ ```
+ GOOS=fuchsia ../bin/go build junk.go
+ ```
+ This program can be put in a bootfs and run on qemu with:
+ ```
+ echo bin/junk=junk > junk.manifest
+ fuchsia/buildtools/mkbootfs -o junk.bootfs junk.manifest
+ ./scripts/run-zircon-x64 -x path/to/fuchsia/third_party/go/src/junk.bootfs
+ ```
+ A cgo variant can be build by adding CGO_ENABLED=1 to both
+ the make.bash command and the go build command.
+
+* To build a program using just the zircon prebuild toolchain
+ (useful for debugging if the fuchsia sysroot is out of sync
+ with your zircon) set the environment variable ZIRCON to
+ the location of your zircon and build with the gccwrap.sh
+ script:
+ ```
+ ZIRCON=$HOME/zircon CGO_ENABLED=1 CC_FOR_TARGET=$(pwd)/../misc/fuchsia/gccwrap.sh GOOS=fuchsia ./make.bash
diff --git a/misc/fuchsia/clangwrap.sh b/misc/fuchsia/clangwrap.sh
new file mode 100755
index 0000000..3339260
--- /dev/null
+++ b/misc/fuchsia/clangwrap.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+set -eu
+
+clangbin="clang"
+if [[ -n ${CLANG_PREFIX} ]]; then
+ clangbin="${CLANG_PREFIX}/${clangbin}"
+fi
+
+if [[ ${GOOS} != "fuchsia" ]]; then
+ exec "${clangbin}" "$@"
+fi
+
+case "${GOARCH}" in
+arm64)
+ CLANG_TRIPLE="aarch64-fuchsia"
+ ;;
+amd64)
+ CLANG_TRIPLE="x86_64-fuchsia"
+ ;;
+*)
+ echo >&2 "Unsupported architecture: ${GOARCH}"
+ exit 1
+ ;;
+esac
+
+declare -a extra_args
+# -Qunused-arguments is used to avoid issues with intermediate builds that don't directly link fdio.
+extra_args+=(-Qunused-arguments)
+extra_args+=("--sysroot=${ZIRCON_SYSROOT}")
+extra_args+=("-I${FDIO_INCLUDE}")
+extra_args+=("-L${FUCHSIA_SHARED_LIBS}")
+
+exec "${clangbin}" --target="${CLANG_TRIPLE}" "${extra_args[@]}" "$@"
diff --git a/misc/fuchsia/gccwrap.sh b/misc/fuchsia/gccwrap.sh
new file mode 100755
index 0000000..93c86cd
--- /dev/null
+++ b/misc/fuchsia/gccwrap.sh
@@ -0,0 +1,66 @@
+#!/bin/bash
+# This uses the zircon prebuild C++ toolchain
+
+if [ -z "${ZIRCON}" ]; then
+ echo "gccwrap.sh: missing ZIRCON env variable" >&2
+ exit 1
+fi
+
+zirconsysroot="${ZIRCON_SYSROOT}"
+if [ -z "${zirconsysroot}" ]; then
+ echo "gccwrap.sh: missing ZIRCON_SYSROOT env variable" >&2
+ exit 1
+fi
+
+if [ -z "${FUCHSIA_ROOT_OUT_DIR}" ]; then
+ echo "gccwrap.sh: missing FUCHSIA_ROOT_OUT_DIR env variable" >&2
+ exit 1
+fi
+
+if [ "$GOARCH" == "amd64" ]; then
+ libdir="x64-shared"
+ gccbin="$ZIRCON/prebuilt/downloads/gcc/bin/x86_64-elf-gcc"
+elif [ "$GOARCH" == "arm64" ]; then
+ libdir="arm64-shared"
+ gccbin="$ZIRCON/prebuilt/downloads/gcc/bin/aarch64-elf-gcc"
+else
+ echo "gccwrap.sh: unsupported GOARCH: $GOARCH" >&2
+ exit 1
+fi
+
+compiler=false
+extra_args=""
+
+for var in "$@"
+do
+ if [[ "$var" == "-r" || "$var" == "-c" ]]; then
+ compiler=true
+ fi
+done
+
+if ! $compiler; then
+ extra_args="-lc $zirconsysroot/lib/Scrt1.o $zirconsysroot/lib/libzircon.so -lfdio"
+fi
+
+exec $gccbin \
+ --sysroot=$zirconsysroot \
+ -I$zirconsysroot/include \
+ -I${ZIRCON}/system/ulib/fdio/include \
+ -L$zirconsysroot/lib \
+ -L${FUCHSIA_ROOT_OUT_DIR}/${libdir} \
+ -nostdlib \
+ -fuse-ld=gold \
+ -fno-use-linker-plugin \
+ -Wl,-nostdlib \
+ -Wl,--build-id \
+ -Wl,-z,max-page-size=4096 \
+ -Wl,-z,combreloc \
+ -Wl,-z,relro \
+ -Wl,-z,now \
+ -Wl,-z,text \
+ -Wl,-z,noexecstack \
+ -Wl,--hash-style=gnu \
+ -Wl,--eh-frame-hdr \
+ -Wl,-dynamic-linker=ld.so.1 \
+ $extra_args \
+ "$@"
diff --git a/misc/fuchsia/go_stdlib_tests.json b/misc/fuchsia/go_stdlib_tests.json
new file mode 100644
index 0000000..e52c708
--- /dev/null
+++ b/misc/fuchsia/go_stdlib_tests.json
@@ -0,0 +1,8 @@
+{
+ "tests":[
+ {
+ "name":"go_os_test",
+ "exec":"/system/bin/report_result /system/test/go_os_test"
+ }
+ ]
+}
diff --git a/regen-fidl b/regen-fidl
new file mode 100755
index 0000000..4df5819
--- /dev/null
+++ b/regen-fidl
@@ -0,0 +1,126 @@
+#!/usr/bin/env bash
+
+# TODO(pascallouis): better automate this.
+
+set -euxo pipefail
+
+if [ ! -x "${FUCHSIA_DIR}" ]; then
+ echo "error: did you fx exec? missing \$FUCHSIA_DIR" 1>&2
+ exit 1
+fi
+
+if [ ! -x "${FUCHSIA_BUILD_DIR}" ]; then
+ echo "error: did you fx exec? missing \$FUCHSIA_BUILD_DIR" 1>&2
+ exit 1
+fi
+
+pushd "$FUCHSIA_DIR"
+
+FIDLC=$( fx list-build-artifacts --expect-one --name fidlc tools )
+FIDLGEN_GO=$( fx list-build-artifacts --expect-one --name fidlgen_go tools )
+
+fx ninja -C "${FUCHSIA_BUILD_DIR}" $FIDLC $FIDLGEN_GO
+
+tmpout=$(mktemp -d 2>/dev/null || mktemp -d -t 'tmpout')
+ir_file="${tmpout}/out.json"
+
+trap 'rm -rf -- "${tmpout}" && popd > /dev/null' EXIT
+
+# Parameters:
+# $1 = directory where fidl file is found.
+# $2 = output of subdirectory of syscall/zx
+# $3..n = additional arguments needed to generate this target.
+function generate_file {
+ local source_dir=$1
+ shift
+ local package_dir=$1
+ shift
+ out_file=third_party/go/src/syscall/zx/"${package_dir}"/impl.go
+ copyright_line=$(grep -E "^// Copyright [0-9]+" "${out_file}" || \
+ echo "// Copyright $(date +%Y) The Fuchsia Authors. All rights reserved.")
+ "${FUCHSIA_BUILD_DIR}"/$FIDLC \
+ --json "${ir_file}" \
+ "$@" \
+ --files "${source_dir}"/*.fidl
+ "${FUCHSIA_BUILD_DIR}"/$FIDLGEN_GO \
+ -json "${ir_file}" \
+ -output-impl "${tmpout}/impl.go"
+
+ tmpfile=$(mktemp "${tmpout}/tmp.XXXXXXXX")
+ echo "${copyright_line}" > "${tmpfile}"
+ cat << EOF >> "${tmpfile}"
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+EOF
+ cat "${tmpout}"/impl.go >> "${tmpfile}"
+ perl -pi -e 's|^// Code generated by fidlgen; DO NOT EDIT.\n$||' "${tmpfile}"
+ perl -pi -e 's|fidl/fuchsia/|syscall/zx/|' "${tmpfile}"
+ ./prebuilt/third_party/go/linux-x64/bin/gofmt -s -w "${tmpfile}"
+ mv -- "${tmpfile}" "${out_file}"
+}
+
+generate_file {third_party/go/src/syscall/zx/,}fidl/internal/bindingstest \
+ --experimental enable_handle_rights \
+ --files zircon/vdso/zx_common.fidl
+
+generate_file sdk/fidl/fuchsia.mem mem \
+ --files zircon/vdso/zx_common.fidl
+
+generate_file sdk/fidl/fuchsia.io2 io2 \
+ --files zircon/vdso/zx_common.fidl \
+ --files sdk/fidl/fuchsia.mem/*.fidl
+
+generate_file sdk/fidl/fuchsia.io io \
+ --files zircon/vdso/zx_common.fidl \
+ --files sdk/fidl/fuchsia.mem/*.fidl \
+ --files sdk/fidl/fuchsia.io2/*.fidl
+
+generate_file sdk/fidl/fuchsia.posix posix
+
+generate_file sdk/fidl/fuchsia.posix.socket posix/socket \
+ --files zircon/vdso/zx_common.fidl \
+ --files sdk/fidl/fuchsia.posix/*.fidl \
+ --files sdk/fidl/fuchsia.net/*.fidl \
+ --files sdk/fidl/fuchsia.mem/*.fidl \
+ --files sdk/fidl/fuchsia.io2/*.fidl \
+ --files sdk/fidl/fuchsia.io/*.fidl
+
+generate_file sdk/fidl/fuchsia.hardware.ethernet hardware/ethernet \
+ --files zircon/vdso/zx_common.fidl
+
+generate_file sdk/fidl/fuchsia.hardware.network hardware/network \
+ --files zircon/vdso/zx_common.fidl \
+ --files sdk/fidl/fuchsia.net/*.fidl
+
+generate_file sdk/fidl/fuchsia.net.name net/name \
+ --files zircon/vdso/zx_common.fidl \
+ --files sdk/fidl/fuchsia.net/*.fidl
+
+generate_file sdk/fidl/fuchsia.net net
+
+generate_file sdk/fidl/fuchsia.diagnostics diagnostics \
+ --files zircon/vdso/zx_common.fidl \
+ --files sdk/fidl/fuchsia.mem/*.fidl
+
+generate_file sdk/fidl/fuchsia.logger logger \
+ --files zircon/vdso/zx_common.fidl \
+ --files sdk/fidl/fuchsia.mem/*.fidl \
+ --files sdk/fidl/fuchsia.diagnostics/*.fidl
+
+generate_file sdk/fidl/fuchsia.net.stack net/stack \
+ --files zircon/vdso/zx_common.fidl \
+ --files sdk/fidl/fuchsia.mem/*.fidl \
+ --files sdk/fidl/fuchsia.io2/*.fidl \
+ --files sdk/fidl/fuchsia.io/*.fidl \
+ --files sdk/fidl/fuchsia.diagnostics/*.fidl \
+ --files sdk/fidl/fuchsia.logger/*.fidl \
+ --files sdk/fidl/fuchsia.net/*.fidl \
+ --files sdk/fidl/fuchsia.net.name/*.fidl \
+ --files sdk/fidl/fuchsia.hardware.ethernet/*.fidl \
+ --files sdk/fidl/fuchsia.hardware.network/*.fidl \
+ --files sdk/fidl/fuchsia.posix/*.fidl \
+ --files sdk/fidl/fuchsia.posix.socket/*.fidl
+
diff --git a/regen-syscalls b/regen-syscalls
new file mode 100755
index 0000000..1aee185
--- /dev/null
+++ b/regen-syscalls
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+set -euxo pipefail
+
+if [ ! -x "${FUCHSIA_BUILD_DIR}" ]; then
+ echo "error: did you fx exec? missing \$FUCHSIA_BUILD_DIR" 1>&2
+ exit 1
+fi
+
+FIDLC=$( fx get-build-artifacts --expect-one --no-build --name fidlc tools )
+KAZOO=$( fx get-build-artifacts --expect-one --no-build --name kazoo tools )
+
+fx ninja -C "${FUCHSIA_BUILD_DIR}" $FIDLC $KAZOO
+
+"${FUCHSIA_BUILD_DIR}"/$FIDLC \
+ --json /tmp/syscalls.json \
+ --files ../../zircon/vdso/*.fidl
+
+readonly syscall_stubs=src/syscall/zx/syscalls_fuchsia.go
+readonly vdso_keys=src/runtime/vdso_keys_fuchsia.go
+
+"${FUCHSIA_BUILD_DIR}"/$KAZOO \
+ --go-syscall-arm64-asm=src/syscall/zx/syscalls_fuchsia_arm64.s \
+ --go-syscall-stubs=$syscall_stubs \
+ --go-syscall-x86-asm=src/syscall/zx/syscalls_fuchsia_amd64.s \
+ --go-vdso-arm64-calls=src/runtime/vdsocalls_fuchsia_arm64.s \
+ --go-vdso-keys=$vdso_keys \
+ --go-vdso-x86-calls=src/runtime/vdsocalls_fuchsia_amd64.s \
+ /tmp/syscalls.json
+
+gofmt -s -w $syscall_stubs $vdso_keys
diff --git a/src/cmd/api/run.go b/src/cmd/api/run.go
index a36f117..bbb9ce4 100644
--- a/src/cmd/api/run.go
+++ b/src/cmd/api/run.go
@@ -64,7 +64,7 @@
}
var apiFiles []string
for _, fn := range fs {
- if strings.HasPrefix(fn, "go1") {
+ if strings.HasPrefix(fn, "go1") || strings.HasPrefix(fn, "fuchsia") {
apiFiles = append(apiFiles, filepath.Join(apiDir, fn))
}
}
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index 9e2b4f3..17f5eb4 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -85,6 +85,7 @@
"android",
"solaris",
"freebsd",
+ "fuchsia",
"nacl", // keep;
"netbsd",
"openbsd",
@@ -1522,6 +1523,8 @@
"freebsd/amd64": true,
"freebsd/arm": true,
"freebsd/arm64": true,
+ "fuchsia/amd64": true,
+ "fuchsia/arm64": true,
"illumos/amd64": true,
"linux/386": true,
"linux/amd64": true,
diff --git a/src/cmd/go/internal/base/signal_notunix.go b/src/cmd/go/internal/base/signal_notunix.go
index 9e869b0..a8e5a34 100644
--- a/src/cmd/go/internal/base/signal_notunix.go
+++ b/src/cmd/go/internal/base/signal_notunix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build plan9 windows
+// +build plan9 fuchsia windows
package base
diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go
index 2b5fbb1..76c5660 100644
--- a/src/cmd/go/internal/load/pkg.go
+++ b/src/cmd/go/internal/load/pkg.go
@@ -1927,6 +1927,11 @@
// LinkerDeps returns the list of linker-induced dependencies for main package p.
func LinkerDeps(p *Package) []string {
+ // Don't add deps to Fuchsia internal syscall stuff.
+ if p != nil && p.ImportPath == "syscall/zx" {
+ return nil
+ }
+
// Everything links runtime.
deps := []string{"runtime"}
@@ -1963,6 +1968,8 @@
if cfg.BuildContext.GOARCH == "arm64" {
return true
}
+ case "fuchsia":
+ return true
}
if !cfg.BuildContext.CgoEnabled {
diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go
index dc0c4fc..ea96441 100644
--- a/src/cmd/go/internal/work/exec.go
+++ b/src/cmd/go/internal/work/exec.go
@@ -2361,6 +2361,7 @@
switch cfg.Goos {
case "windows":
a = append(a, "-mthreads")
+ case "fuchsia":
default:
a = append(a, "-pthread")
}
diff --git a/src/cmd/go/internal/work/gccgo.go b/src/cmd/go/internal/work/gccgo.go
index 4c1f36d..6ce5b34 100644
--- a/src/cmd/go/internal/work/gccgo.go
+++ b/src/cmd/go/internal/work/gccgo.go
@@ -453,7 +453,12 @@
// split-stack and non-split-stack code in a single -r
// link, and libgo picks up non-split-stack code from
// libffi.
- ldflags = append(ldflags, "-Wl,-r", "-nostdlib")
+ if cfg.Goos == "fuchsia" {
+ ldflags = append(ldflags, "-r")
+ } else {
+ ldflags = append(ldflags, "-Wl,-r")
+ }
+ ldflags = append(ldflags, "-nostdlib")
ldflags = append(ldflags, goLibBegin...)
if nopie := b.gccNoPie([]string{tools.linker()}); nopie != "" {
diff --git a/src/cmd/go/internal/work/init.go b/src/cmd/go/internal/work/init.go
index c168364..0b00504 100644
--- a/src/cmd/go/internal/work/init.go
+++ b/src/cmd/go/internal/work/init.go
@@ -127,7 +127,7 @@
codegenArg = "-shared"
}
- case "dragonfly", "freebsd", "illumos", "linux", "netbsd", "openbsd", "solaris":
+ case "dragonfly", "freebsd", "fuchsia", "illumos", "linux", "netbsd", "openbsd", "solaris":
// Use -shared so that the result is
// suitable for inclusion in a PIE or
// shared library.
@@ -152,7 +152,7 @@
ldBuildmode = "c-shared"
case "default":
switch cfg.Goos {
- case "android":
+ case "android", "fuchsia":
codegenArg = "-shared"
ldBuildmode = "pie"
case "windows":
diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go
index 82a2e6a..dbc2856 100644
--- a/src/cmd/internal/obj/x86/asm6.go
+++ b/src/cmd/internal/obj/x86/asm6.go
@@ -2526,6 +2526,9 @@
return 0x64 // FS
}
+ case objabi.Hfuchsia:
+ log.Fatalf("unknown TLS base register, fuchsia requires PIC code")
+
case objabi.Hdragonfly,
objabi.Hfreebsd,
objabi.Hnetbsd,
@@ -5148,7 +5151,7 @@
default:
log.Fatalf("unknown TLS base location for %v", ctxt.Headtype)
- case objabi.Hlinux, objabi.Hfreebsd:
+ case objabi.Hlinux, objabi.Hfreebsd, objabi.Hfuchsia:
if !ctxt.Flag_shared {
log.Fatalf("unknown TLS base location for linux/freebsd without -shared")
}
diff --git a/src/cmd/internal/obj/x86/obj6.go b/src/cmd/internal/obj/x86/obj6.go
index c1e5bea..505febb 100644
--- a/src/cmd/internal/obj/x86/obj6.go
+++ b/src/cmd/internal/obj/x86/obj6.go
@@ -61,6 +61,8 @@
return false
case objabi.Hlinux, objabi.Hfreebsd:
return !ctxt.Flag_shared
+ case objabi.Hfuchsia:
+ return false
}
return true
diff --git a/src/cmd/internal/objabi/head.go b/src/cmd/internal/objabi/head.go
index 95b8db3..c04f9ae 100644
--- a/src/cmd/internal/objabi/head.go
+++ b/src/cmd/internal/objabi/head.go
@@ -40,6 +40,7 @@
Hdarwin
Hdragonfly
Hfreebsd
+ Hfuchsia
Hjs
Hlinux
Hnetbsd
@@ -60,6 +61,8 @@
*h = Hdragonfly
case "freebsd":
*h = Hfreebsd
+ case "fuchsia":
+ *h = Hfuchsia
case "js":
*h = Hjs
case "linux", "android":
@@ -90,6 +93,8 @@
return "dragonfly"
case Hfreebsd:
return "freebsd"
+ case Hfuchsia:
+ return "fuchsia"
case Hjs:
return "js"
case Hlinux:
diff --git a/src/cmd/link/internal/amd64/asm.go b/src/cmd/link/internal/amd64/asm.go
index b8dc0fc..52dde3b 100644
--- a/src/cmd/link/internal/amd64/asm.go
+++ b/src/cmd/link/internal/amd64/asm.go
@@ -38,6 +38,7 @@
"cmd/link/internal/sym"
"debug/elf"
"log"
+ "strings"
"sync"
)
@@ -440,6 +441,8 @@
if siz == 4 {
if xsym.Type == sym.SDYNIMPORT && xsym.ElfType() == elf.STT_FUNC {
ctxt.Out.Write64(uint64(elf.R_X86_64_PLT32) | uint64(elfsym)<<32)
+ } else if xsym.Type == sym.SDYNIMPORT && ctxt.HeadType == objabi.Hfuchsia && strings.HasPrefix(xsym.Name, "vdso_") {
+ ctxt.Out.Write64(uint64(elf.R_X86_64_GOTPCREL) | uint64(elfsym)<<32)
} else {
ctxt.Out.Write64(uint64(elf.R_X86_64_PC32) | uint64(elfsym)<<32)
}
@@ -739,6 +742,7 @@
case objabi.Hlinux,
objabi.Hfreebsd,
+ objabi.Hfuchsia,
objabi.Hnetbsd,
objabi.Hopenbsd,
objabi.Hdragonfly,
@@ -765,6 +769,7 @@
case objabi.Hlinux,
objabi.Hfreebsd,
+ objabi.Hfuchsia,
objabi.Hnetbsd,
objabi.Hopenbsd,
objabi.Hdragonfly,
@@ -832,6 +837,7 @@
case objabi.Hlinux,
objabi.Hfreebsd,
+ objabi.Hfuchsia,
objabi.Hnetbsd,
objabi.Hopenbsd,
objabi.Hdragonfly,
diff --git a/src/cmd/link/internal/amd64/obj.go b/src/cmd/link/internal/amd64/obj.go
index 705827d..f7f7dca 100644
--- a/src/cmd/link/internal/amd64/obj.go
+++ b/src/cmd/link/internal/amd64/obj.go
@@ -101,6 +101,7 @@
case objabi.Hlinux, /* elf64 executable */
objabi.Hfreebsd, /* freebsd */
+ objabi.Hfuchsia, /* fuchsia */
objabi.Hnetbsd, /* netbsd */
objabi.Hopenbsd, /* openbsd */
objabi.Hdragonfly, /* dragonfly */
diff --git a/src/cmd/link/internal/arm64/asm.go b/src/cmd/link/internal/arm64/asm.go
index 417e4b1..23db0dd 100644
--- a/src/cmd/link/internal/arm64/asm.go
+++ b/src/cmd/link/internal/arm64/asm.go
@@ -929,6 +929,7 @@
case objabi.Hlinux,
objabi.Hfreebsd,
+ objabi.Hfuchsia,
objabi.Hnetbsd,
objabi.Hopenbsd:
ld.Asmbelf(ctxt, int64(symo))
diff --git a/src/cmd/link/internal/arm64/obj.go b/src/cmd/link/internal/arm64/obj.go
index 20426c5..7899667 100644
--- a/src/cmd/link/internal/arm64/obj.go
+++ b/src/cmd/link/internal/arm64/obj.go
@@ -87,6 +87,7 @@
case objabi.Hlinux, /* arm64 elf */
objabi.Hfreebsd,
+ objabi.Hfuchsia,
objabi.Hnetbsd,
objabi.Hopenbsd:
ld.Elfinit(ctxt)
diff --git a/src/cmd/link/internal/ld/config.go b/src/cmd/link/internal/ld/config.go
index 2373b50..ebc644e 100644
--- a/src/cmd/link/internal/ld/config.go
+++ b/src/cmd/link/internal/ld/config.go
@@ -35,10 +35,13 @@
default:
return fmt.Errorf("invalid buildmode: %q", s)
case "exe":
+ if objabi.GOOS == "fuchsia" {
+ return badmode()
+ }
*mode = BuildModeExe
case "pie":
switch objabi.GOOS {
- case "aix", "android", "linux", "windows":
+ case "aix", "android", "linux", "fuchsia", "windows":
case "darwin", "freebsd":
switch objabi.GOARCH {
case "amd64":
@@ -51,7 +54,7 @@
*mode = BuildModePIE
case "c-archive":
switch objabi.GOOS {
- case "aix", "darwin", "linux":
+ case "aix", "darwin", "linux", "fuchsia":
case "freebsd":
switch objabi.GOARCH {
case "amd64":
diff --git a/src/cmd/link/internal/ld/data.go b/src/cmd/link/internal/ld/data.go
index d3f308c..99bbf36 100644
--- a/src/cmd/link/internal/ld/data.go
+++ b/src/cmd/link/internal/ld/data.go
@@ -211,8 +211,8 @@
}
// We need to be able to reference dynimport symbols when linking against
- // shared libraries, and Solaris, Darwin and AIX need it always
- if !target.IsSolaris() && !target.IsDarwin() && !target.IsAIX() && rs != 0 && rst == sym.SDYNIMPORT && !target.IsDynlinkingGo() && !ldr.AttrSubSymbol(rs) {
+ // shared libraries, and Solaris, Darwin, AIX, and Fuchsia need it always
+ if !target.IsSolaris() && !target.IsDarwin() && !target.IsAIX() && !target.IsFuchsia() && rs != 0 && rst == sym.SDYNIMPORT && !target.IsDynlinkingGo() && !ldr.AttrSubSymbol(rs) {
if !(target.IsPPC64() && target.IsExternal() && ldr.SymName(rs) == ".TOC.") {
st.err.Errorf(s, "unhandled relocation for %s (type %d (%s) rtype %d (%s))", ldr.SymName(rs), rst, rst, rt, sym.RelocName(target.Arch, rt))
}
diff --git a/src/cmd/link/internal/ld/data2.go b/src/cmd/link/internal/ld/data2.go
index d4503a4..f685b4b 100644
--- a/src/cmd/link/internal/ld/data2.go
+++ b/src/cmd/link/internal/ld/data2.go
@@ -102,8 +102,8 @@
}
// We need to be able to reference dynimport symbols when linking against
- // shared libraries, and Solaris, Darwin and AIX need it always
- if !target.IsSolaris() && !target.IsDarwin() && !target.IsAIX() && r.Sym != nil && r.Sym.Type == sym.SDYNIMPORT && !target.IsDynlinkingGo() && !r.Sym.Attr.SubSymbol() {
+ // shared libraries, and Solaris, Darwin, AIX, and Fuchsia need it always
+ if !target.IsSolaris() && !target.IsDarwin() && !target.IsAIX() && !target.IsFuchsia() && r.Sym != nil && r.Sym.Type == sym.SDYNIMPORT && !target.IsDynlinkingGo() && !r.Sym.Attr.SubSymbol() {
if !(target.IsPPC64() && target.IsExternal() && r.Sym.Name == ".TOC.") {
Errorf(s, "unhandled relocation for %s (type %d (%s) rtype %d (%s))", r.Sym.Name, r.Sym.Type, r.Sym.Type, r.Type, sym.RelocName(target.Arch, r.Type))
}
diff --git a/src/cmd/link/internal/ld/elf.go b/src/cmd/link/internal/ld/elf.go
index 78298be..a4d8f78 100644
--- a/src/cmd/link/internal/ld/elf.go
+++ b/src/cmd/link/internal/ld/elf.go
@@ -1939,6 +1939,9 @@
case objabi.Hfreebsd:
interpreter = thearch.Freebsddynld
+ case objabi.Hfuchsia:
+ interpreter = "lib/ld.so.1"
+
case objabi.Hnetbsd:
interpreter = thearch.Netbsddynld
@@ -2185,7 +2188,7 @@
}
}
- if ctxt.HeadType == objabi.Hlinux {
+ if ctxt.HeadType == objabi.Hlinux || ctxt.HeadType == objabi.Hfuchsia {
ph := newElfPhdr()
ph.type_ = PT_GNU_STACK
ph.flags = PF_W + PF_R
diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go
index 0366bc7..40be715 100644
--- a/src/cmd/link/internal/ld/lib.go
+++ b/src/cmd/link/internal/ld/lib.go
@@ -1545,7 +1545,10 @@
}
// Force global symbols to be exported for dlopen, etc.
- if ctxt.IsELF {
+ if ctxt.HeadType == objabi.Hfuchsia && !strings.Contains(argv[0], "clang") {
+ // Find libgcc
+ argv = append(argv, ctxt.findLibPathCmd("--print-libgcc-file-name", "libgcc"))
+ } else if ctxt.IsELF {
argv = append(argv, "-rdynamic")
}
if ctxt.HeadType == objabi.Haix {
@@ -1669,6 +1672,9 @@
argv = append(argv, "-Wl,--start-group", "-lmingwex", "-lmingw32", "-Wl,--end-group")
argv = append(argv, peimporteddlls()...)
}
+ if ctxt.HeadType == objabi.Hfuchsia && strings.Contains(argv[0], "clang") {
+ argv = append(argv, "-lzircon", "-lfdio")
+ }
if ctxt.Debugvlog != 0 {
ctxt.Logf("host link:")
diff --git a/src/cmd/link/internal/ld/sym.go b/src/cmd/link/internal/ld/sym.go
index 1b7d9d5..a5acf5c 100644
--- a/src/cmd/link/internal/ld/sym.go
+++ b/src/cmd/link/internal/ld/sym.go
@@ -78,6 +78,7 @@
case objabi.Hlinux,
objabi.Hfreebsd,
+ objabi.Hfuchsia,
objabi.Hnetbsd,
objabi.Hopenbsd,
objabi.Hdragonfly,
diff --git a/src/cmd/link/internal/ld/target.go b/src/cmd/link/internal/ld/target.go
index 102b6c5..247354b 100644
--- a/src/cmd/link/internal/ld/target.go
+++ b/src/cmd/link/internal/ld/target.go
@@ -138,6 +138,11 @@
return t.HeadType == objabi.Hdarwin
}
+func (t *Target) IsFuchsia() bool {
+ t.mustSetHeadType()
+ return t.HeadType == objabi.Hfuchsia
+}
+
func (t *Target) IsWindows() bool {
t.mustSetHeadType()
return t.HeadType == objabi.Hwindows
diff --git a/src/cmd/oldlink/internal/ld/data.go b/src/cmd/oldlink/internal/ld/data.go
index 02230cb..0c60073 100644
--- a/src/cmd/oldlink/internal/ld/data.go
+++ b/src/cmd/oldlink/internal/ld/data.go
@@ -179,8 +179,8 @@
}
// We need to be able to reference dynimport symbols when linking against
- // shared libraries, and Solaris, Darwin and AIX need it always
- if ctxt.HeadType != objabi.Hsolaris && ctxt.HeadType != objabi.Hdarwin && ctxt.HeadType != objabi.Haix && r.Sym != nil && r.Sym.Type == sym.SDYNIMPORT && !ctxt.DynlinkingGo() && !r.Sym.Attr.SubSymbol() {
+ // shared libraries, and Solaris, Darwin, AIX, and Fuchsia need it always
+ if ctxt.HeadType != objabi.Hsolaris && ctxt.HeadType != objabi.Hdarwin && ctxt.HeadType != objabi.Haix && ctxt.HeadType != objabi.Hfuchsia && r.Sym != nil && r.Sym.Type == sym.SDYNIMPORT && !ctxt.DynlinkingGo() && !r.Sym.Attr.SubSymbol() {
if !(ctxt.Arch.Family == sys.PPC64 && ctxt.LinkMode == LinkExternal && r.Sym.Name == ".TOC.") {
Errorf(s, "unhandled relocation for %s (type %d (%s) rtype %d (%s))", r.Sym.Name, r.Sym.Type, r.Sym.Type, r.Type, sym.RelocName(ctxt.Arch, r.Type))
}
diff --git a/src/crypto/rand/rand_fuchsia.go b/src/crypto/rand/rand_fuchsia.go
new file mode 100644
index 0000000..1ce3446
--- /dev/null
+++ b/src/crypto/rand/rand_fuchsia.go
@@ -0,0 +1,23 @@
+// 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 rand
+
+import "syscall/zx"
+
+func init() {
+ Reader = new(cprngReader)
+}
+
+// cprngReader uses the PRNG exposed by zircon syscall.
+//
+// TODO(crawshaw): does it perform as well as /dev/urandom?
+// If not, borrow newReader from rand_unix.go and use this
+// as the entropy source.
+type cprngReader struct{}
+
+func (r *cprngReader) Read(b []byte) (n int, err error) {
+ zx.RandRead(b)
+ return len(b), nil
+}
diff --git a/src/crypto/x509/root_fuchsia.go b/src/crypto/x509/root_fuchsia.go
new file mode 100644
index 0000000..baa0677
--- /dev/null
+++ b/src/crypto/x509/root_fuchsia.go
@@ -0,0 +1,8 @@
+// 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 x509
+
+// Possible certificate files; stop after finding one.
+var certFiles = []string{"/config/ssl/cert.pem"}
diff --git a/src/crypto/x509/root_unix.go b/src/crypto/x509/root_unix.go
index b48e618..7341b0a 100644
--- a/src/crypto/x509/root_unix.go
+++ b/src/crypto/x509/root_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
package x509
diff --git a/src/go/build/deps_test.go b/src/go/build/deps_test.go
index fa8ecf1..e0aef41 100644
--- a/src/go/build/deps_test.go
+++ b/src/go/build/deps_test.go
@@ -522,6 +522,7 @@
// provide access to every source file.
t.Skipf("skipping on %s/%s, missing full GOROOT", runtime.GOOS, runtime.GOARCH)
}
+ t.Skip("fuchsia dependencies need reworking")
ctxt := Default
all, err := listStdPkgs(ctxt.GOROOT)
diff --git a/src/go/build/syslist.go b/src/go/build/syslist.go
index fbfe4c4..2a70a1d 100644
--- a/src/go/build/syslist.go
+++ b/src/go/build/syslist.go
@@ -7,5 +7,5 @@
// List of past, present, and future known GOOS and GOARCH values.
// Do not remove from this list, as these are used for go/build filename matching.
-const goosList = "aix android darwin dragonfly freebsd hurd illumos js linux nacl netbsd openbsd plan9 solaris windows zos "
+const goosList = "aix android darwin dragonfly freebsd fuchsia hurd illumos js linux nacl netbsd openbsd plan9 solaris windows zos "
const goarchList = "386 amd64 amd64p32 arm armbe arm64 arm64be ppc64 ppc64le mips mipsle mips64 mips64le mips64p32 mips64p32le ppc riscv riscv64 s390 s390x sparc sparc64 wasm "
diff --git a/src/internal/poll/fd_fsync_posix.go b/src/internal/poll/fd_fsync_posix.go
index 6935829..1bcd160 100644
--- a/src/internal/poll/fd_fsync_posix.go
+++ b/src/internal/poll/fd_fsync_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
package poll
diff --git a/src/internal/poll/fd_fuchsia.go b/src/internal/poll/fd_fuchsia.go
new file mode 100644
index 0000000..a857a38
--- /dev/null
+++ b/src/internal/poll/fd_fuchsia.go
@@ -0,0 +1,343 @@
+// 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 mod` ignores file names for the purpose of resolving
+// dependencies, and zxsocket doesn't build on not-Fuchsia.
+// +build fuchsia
+
+package poll
+
+import (
+ "io"
+ "sync/atomic"
+ "syscall"
+ "syscall/zx"
+ "syscall/zx/net"
+ "syscall/zx/zxsocket"
+ "unsafe"
+)
+
+// FD is a file descriptor. The net and os packages embed this type in
+// a larger type representing a network connection or OS file.
+type FD struct {
+ // Lock sysfd and serialize access to Read and Write methods.
+ fdmu fdMutex
+
+ // System file descriptor. Immutable until Close.
+ Sysfd int
+
+ // I/O poller.
+ pd pollDesc
+
+ // Whether this is a streaming descriptor, as opposed to a
+ // packet-based descriptor like a UDP socket.
+ IsStream bool
+
+ // Whether a zero byte read indicates EOF. This is false for a
+ // message based socket connection.
+ ZeroReadIsEOF bool
+
+ // Whether this is a normal file.
+ isFile bool
+
+ // Whether in blocking mode
+ isBlocking uint32
+}
+
+// Init initializes the FD. The Sysfd field should already be set.
+// This can be called multiple times on a single FD.
+// The net argument is a network name from the net package (e.g., "tcp"),
+// or "file".
+// Set pollable to true if fd should be managed by runtime netpoll.
+func (fd *FD) Init(net string, pollable bool) error {
+ // We don't actually care about the various network types.
+ if net == "file" {
+ fd.isFile = true
+ }
+ if !pollable {
+ fd.isBlocking = 1
+ return nil
+ }
+ err := fd.pd.init(fd)
+ if err != nil {
+ fd.isBlocking = 1
+ }
+ return err
+}
+
+// see fd.Close() for reasoning.
+func close(fd *FD) error {
+ sysfd := atomic.SwapInt64((*int64)(unsafe.Pointer(&fd.Sysfd)), -1)
+ if sysfd != -1 {
+ return syscall.Close(int(sysfd))
+ }
+ return nil
+}
+
+// Destroy closes the file descriptor. This is called when there are
+// no remaining references.
+func (fd *FD) destroy() error {
+ // Poller may want to unregister fd in readiness notification mechanism,
+ // so this must be executed before closing the fd.
+ fd.pd.close()
+
+ return close(fd)
+}
+
+// Close closes the FD. The underlying file descriptor is closed by the
+// destroy method when there are no remaining references.
+func (fd *FD) Close() error {
+ if !fd.fdmu.increfAndClose() {
+ return errClosing(fd.isFile)
+ }
+
+ fd.pd.evict()
+ // Note: On other implementations, evict will unblock sibling refs, however,
+ // that can't be done yet here. Instead, we have to forcefully close the
+ // connection, sadly ahead of destroy, in order to unblock others.
+ err := close(fd)
+
+ fd.decref()
+
+ return err
+}
+
+func (fd *FD) Read(p []byte) (int, error) {
+ if err := fd.readLock(); err != nil {
+ return 0, err
+ }
+ defer fd.readUnlock()
+ if len(p) == 0 {
+ // If the caller wanted a zero byte read, return immediately
+ // without trying (but after acquiring the readLock).
+ return 0, nil
+ }
+ if err := fd.pd.prepareRead(fd.isFile); err != nil {
+ return 0, err
+ }
+ // TODO: pollable() read
+ n, err := syscall.Read(fd.Sysfd, p)
+ err = fd.eofError(n, err)
+ return n, err
+}
+
+// Pread wraps the pread system call.
+func (fd *FD) Pread(p []byte, off int64) (int, error) {
+ // Call incref, not readLock, because since pread specifies the
+ // offset it is independent from other reads.
+ // Similarly, using the poller doesn't make sense for pread.
+ if err := fd.incref(); err != nil {
+ return 0, err
+ }
+ n, err := syscall.Pread(fd.Sysfd, p, off)
+ if err != nil {
+ n = 0
+ }
+ fd.decref()
+ err = fd.eofError(n, err)
+ return n, err
+}
+
+// Write implements io.Writer.
+func (fd *FD) Write(p []byte) (int, error) {
+ if err := fd.writeLock(); err != nil {
+ return 0, err
+ }
+ defer fd.writeUnlock()
+ if err := fd.pd.prepareWrite(fd.isFile); err != nil {
+ return 0, err
+ }
+ var nn int
+ for {
+ n, err := syscall.Write(fd.Sysfd, p[nn:])
+ if n > 0 {
+ nn += n
+ }
+ if nn == len(p) {
+ return nn, err
+ }
+ if err != nil {
+ return nn, err
+ }
+ if n == 0 {
+ return nn, io.ErrUnexpectedEOF
+ }
+ }
+}
+
+// Pwrite wraps the pwrite system call.
+func (fd *FD) Pwrite(p []byte, off int64) (int, error) {
+ // Call incref, not writeLock, because since pwrite specifies the
+ // offset it is independent from other writes.
+ // Similarly, using the poller doesn't make sense for pwrite.
+ if err := fd.incref(); err != nil {
+ return 0, err
+ }
+ defer fd.decref()
+ var nn int
+ for {
+ n, err := syscall.Pwrite(fd.Sysfd, p[nn:], off+int64(nn))
+ if n > 0 {
+ nn += n
+ }
+ if nn == len(p) {
+ return nn, err
+ }
+ if err != nil {
+ return nn, err
+ }
+ if n == 0 {
+ return nn, io.ErrUnexpectedEOF
+ }
+ }
+}
+
+// Accept wraps the accept network call.
+func (fd *FD) Accept() (zxsocket.Socket, net.SocketAddress, error) {
+ if err := fd.readLock(); err != nil {
+ return nil, net.SocketAddress{}, err
+ }
+ defer fd.readUnlock()
+
+ if err := fd.pd.prepareRead(fd.isFile); err != nil {
+ return nil, net.SocketAddress{}, err
+ }
+
+ s, ok := syscall.FDIOForFD(fd.Sysfd).(*zxsocket.StreamSocket)
+ if !ok {
+ return nil, net.SocketAddress{}, syscall.EBADF
+ }
+ var (
+ newS zxsocket.Socket
+ addr *net.SocketAddress
+ err error
+ )
+ for i := 0; i < 2; i++ {
+ newS, addr, err = s.Accept(true)
+ if err != syscall.EAGAIN {
+ if err, ok := err.(*zx.Error); ok {
+ switch err.Status {
+ case zx.ErrPeerClosed, zx.ErrBadHandle:
+ return nil, net.SocketAddress{}, errClosing(fd.isFile)
+ }
+ }
+ if addr == nil {
+ return nil, net.SocketAddress{}, errClosing(fd.isFile)
+ }
+ break
+ }
+ // TODO: non-blocking support, pass this to the poller
+ obs, err := s.Wait(zxsocket.SignalIncoming|zx.SignalSocketPeerClosed, zx.TimensecInfinite)
+ if err != nil {
+ if err, ok := err.(*zx.Error); ok {
+ switch err.Status {
+ case zx.ErrCanceled, zx.ErrBadHandle:
+ return nil, net.SocketAddress{}, errClosing(fd.isFile)
+ }
+ }
+ return nil, net.SocketAddress{}, err
+ }
+ if obs&zx.SignalSocketPeerClosed != 0 {
+ return nil, net.SocketAddress{}, errClosing(fd.isFile)
+ }
+ if obs&zxsocket.SignalIncoming != 0 {
+ continue
+ }
+ panic("unreachable")
+ }
+ return newS, *addr, err
+}
+
+// Seek wraps syscall.Seek.
+func (fd *FD) Seek(offset int64, whence int) (int64, error) {
+ if err := fd.incref(); err != nil {
+ return 0, err
+ }
+ defer fd.decref()
+ return syscall.Seek(fd.Sysfd, offset, whence)
+}
+
+// ReadDirent wraps syscall.ReadDirent.
+// We treat this like an ordinary system call rather than a call
+// that tries to fill the buffer.
+func (fd *FD) ReadDirent(buf []byte) (int, error) {
+ if err := fd.incref(); err != nil {
+ return 0, err
+ }
+ defer fd.decref()
+ return syscall.ReadDirent(fd.Sysfd, buf)
+}
+
+// Fchdir wraps syscall.Fchdir.
+func (fd *FD) Fchdir() error {
+ if err := fd.incref(); err != nil {
+ return err
+ }
+ defer fd.decref()
+ return syscall.Fchdir(fd.Sysfd)
+}
+
+// Fstat wraps syscall.Fstat
+func (fd *FD) Fstat(s *syscall.Stat_t) error {
+ if err := fd.incref(); err != nil {
+ return err
+ }
+ defer fd.decref()
+ return syscall.Fstat(fd.Sysfd, s)
+}
+
+func IsPollDescriptor(fd uintptr) bool {
+ return false
+}
+
+// RawRead invokes the user-defined function f for a read operation.
+func (fd *FD) RawRead(f func(uintptr) bool) error {
+ if err := fd.readLock(); err != nil {
+ return err
+ }
+ defer fd.readUnlock()
+ if err := fd.pd.prepareRead(fd.isFile); err != nil {
+ return err
+ }
+ for {
+ if f(uintptr(fd.Sysfd)) {
+ return nil
+ }
+ if err := fd.pd.waitRead(fd.isFile); err != nil {
+ return err
+ }
+ }
+}
+
+// RawWrite invokes the user-defined function f for a write operation.
+func (fd *FD) RawWrite(f func(uintptr) bool) error {
+ if err := fd.writeLock(); err != nil {
+ return err
+ }
+ defer fd.writeUnlock()
+ if err := fd.pd.prepareWrite(fd.isFile); err != nil {
+ return err
+ }
+ for {
+ if f(uintptr(fd.Sysfd)) {
+ return nil
+ }
+ if err := fd.pd.waitWrite(fd.isFile); err != nil {
+ return err
+ }
+ }
+}
+
+// SetBlocking puts the file into blocking mode.
+func (fd *FD) SetBlocking() error {
+ if err := fd.incref(); err != nil {
+ return err
+ }
+ defer fd.decref()
+ // Atomic store so that concurrent calls to SetBlocking
+ // do not cause a race condition. isBlocking only ever goes
+ // from 0 to 1 so there is no real race here.
+ atomic.StoreUint32(&fd.isBlocking, 1)
+ return syscall.SetNonblock(fd.Sysfd, false)
+}
diff --git a/src/internal/poll/fd_poll_fuchsia.go b/src/internal/poll/fd_poll_fuchsia.go
new file mode 100644
index 0000000..94188b7
--- /dev/null
+++ b/src/internal/poll/fd_poll_fuchsia.go
@@ -0,0 +1,75 @@
+// 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.
+
+// TODO: use fd_poll_runtime.go for fuchsia
+
+package poll
+
+import (
+ "time"
+)
+
+type pollDesc struct {
+ fd *FD
+ closing bool
+}
+
+func (pd *pollDesc) init(fd *FD) error { pd.fd = fd; return nil }
+
+func (pd *pollDesc) close() {}
+
+func (pd *pollDesc) evict() {
+ pd.closing = true
+}
+
+func (pd *pollDesc) prepare(mode int, isFile bool) error {
+ if pd.closing {
+ return errClosing(isFile)
+ }
+ return nil
+}
+
+func (pd *pollDesc) prepareRead(isFile bool) error { return pd.prepare('r', isFile) }
+
+func (pd *pollDesc) prepareWrite(isFile bool) error { return pd.prepare('w', isFile) }
+
+func (pd *pollDesc) wait(mode int, isFile bool) error {
+ if pd.closing {
+ return errClosing(isFile)
+ }
+ return ErrDeadlineExceeded
+}
+
+func (pd *pollDesc) waitRead(isFile bool) error { return pd.wait('r', isFile) }
+
+func (pd *pollDesc) waitWrite(isFile bool) error { return pd.wait('w', isFile) }
+
+func (pd *pollDesc) waitCanceled(mode int) {}
+
+func (pd *pollDesc) pollable() bool { return true }
+
+// SetDeadline sets the read and write deadlines associated with fd.
+func (fd *FD) SetDeadline(t time.Time) error {
+ return setDeadlineImpl(fd, t, 'r'+'w')
+}
+
+// SetReadDeadline sets the read deadline associated with fd.
+func (fd *FD) SetReadDeadline(t time.Time) error {
+ return setDeadlineImpl(fd, t, 'r')
+}
+
+// SetWriteDeadline sets the write deadline associated with fd.
+func (fd *FD) SetWriteDeadline(t time.Time) error {
+ return setDeadlineImpl(fd, t, 'w')
+}
+
+func setDeadlineImpl(fd *FD, t time.Time, mode int) error {
+ return ErrNoDeadline // TODO set deadline
+}
+
+// PollDescriptor returns the descriptor being used by the poller,
+// or ^uintptr(0) if there isn't one. This is only used for testing.
+func PollDescriptor() uintptr {
+ return ^uintptr(0)
+}
diff --git a/src/internal/poll/fd_posix.go b/src/internal/poll/fd_posix.go
index 54747b4..001a064 100644
--- a/src/internal/poll/fd_posix.go
+++ b/src/internal/poll/fd_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris windows
package poll
diff --git a/src/internal/syscall/unix/nonblocking_fuchsia.go b/src/internal/syscall/unix/nonblocking_fuchsia.go
new file mode 100644
index 0000000..ff67c75
--- /dev/null
+++ b/src/internal/syscall/unix/nonblocking_fuchsia.go
@@ -0,0 +1,9 @@
+// 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
+
+func IsNonblock(fd int) (nonblocking bool, err error) {
+ return false, nil
+}
diff --git a/src/internal/testenv/testenv.go b/src/internal/testenv/testenv.go
index 309b270..dbd184f 100644
--- a/src/internal/testenv/testenv.go
+++ b/src/internal/testenv/testenv.go
@@ -43,7 +43,7 @@
return false
}
switch runtime.GOOS {
- case "android", "js":
+ case "android", "fuchsia", "js":
return false
case "darwin":
if runtime.GOARCH == "arm64" {
@@ -173,14 +173,14 @@
// HasExternalNetwork reports whether the current system can use
// external (non-localhost) networks.
func HasExternalNetwork() bool {
- return !testing.Short() && runtime.GOOS != "js"
+ return !testing.Short() && runtime.GOOS != "js" && runtime.GOOS != "fuchsia"
}
// MustHaveExternalNetwork checks that the current system can use
// external (non-localhost) networks.
// If not, MustHaveExternalNetwork calls t.Skip with an explanation.
func MustHaveExternalNetwork(t testing.TB) {
- if runtime.GOOS == "js" {
+ if runtime.GOOS == "js" || runtime.GOOS == "fuchsia" {
t.Skipf("skipping test: no external network on %s", runtime.GOOS)
}
if testing.Short() {
diff --git a/src/internal/testenv/testenv_notwin.go b/src/internal/testenv/testenv_notwin.go
index ccb5d55..443c058 100644
--- a/src/internal/testenv/testenv_notwin.go
+++ b/src/internal/testenv/testenv_notwin.go
@@ -12,7 +12,7 @@
func hasSymlink() (ok bool, reason string) {
switch runtime.GOOS {
- case "android", "plan9":
+ case "android", "fuchsia", "plan9":
return false, ""
}
diff --git a/src/io/io_fuchsia.go b/src/io/io_fuchsia.go
new file mode 100644
index 0000000..f8806d7
--- /dev/null
+++ b/src/io/io_fuchsia.go
@@ -0,0 +1,13 @@
+// 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 io
+
+import (
+ "syscall/zx"
+)
+
+func init() {
+ zx.EOF = EOF
+}
diff --git a/src/mime/type_fuchsia.go b/src/mime/type_fuchsia.go
new file mode 100644
index 0000000..72e5c07
--- /dev/null
+++ b/src/mime/type_fuchsia.go
@@ -0,0 +1,13 @@
+// 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 mime
+
+func init() {
+ osInitMime = initMimeFuchsia
+}
+
+func initMimeFuchsia() {
+ // TODO: find an equivalent to /etc/mime.types.
+}
diff --git a/src/net/addrselect.go b/src/net/addrselect.go
index 7c0dfe2..3e7091e 100644
--- a/src/net/addrselect.go
+++ b/src/net/addrselect.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
// Minimal RFC 6724 address selection.
diff --git a/src/net/cgo_stub.go b/src/net/cgo_stub.go
index 041f8af..5f19ef4 100644
--- a/src/net/cgo_stub.go
+++ b/src/net/cgo_stub.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !cgo netgo
+// +build !cgo netgo fuchsia
package net
diff --git a/src/net/conf.go b/src/net/conf.go
index 971b1a3..e4c2c8e 100644
--- a/src/net/conf.go
+++ b/src/net/conf.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
package net
diff --git a/src/net/dial_test.go b/src/net/dial_test.go
index 0158248..d1ebf95 100644
--- a/src/net/dial_test.go
+++ b/src/net/dial_test.go
@@ -435,10 +435,17 @@
}
}
+func requireSetDeadline(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("fuchsia does not yet implement deadlines")
+ }
+}
+
func TestDialParallelSpuriousConnection(t *testing.T) {
if !supportsIPv4() || !supportsIPv6() {
t.Skip("both IPv4 and IPv6 are required")
}
+ requireSetDeadline(t)
var readDeadline time.Time
if td, ok := t.Deadline(); ok {
@@ -836,6 +843,7 @@
}
func TestCancelAfterDial(t *testing.T) {
+ requireSetDeadline(t)
if testing.Short() {
t.Skip("avoiding time.Sleep")
}
diff --git a/src/net/dnsclient_unix.go b/src/net/dnsclient_unix.go
index 8dd32cc..b94f9c1 100644
--- a/src/net/dnsclient_unix.go
+++ b/src/net/dnsclient_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
// DNS client: see RFC 1035.
// Has to be linked into package net for Dial.
diff --git a/src/net/dnsconfig_fuchsia.go b/src/net/dnsconfig_fuchsia.go
new file mode 100644
index 0000000..9d4ca46
--- /dev/null
+++ b/src/net/dnsconfig_fuchsia.go
@@ -0,0 +1,11 @@
+// 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.
+
+// TODO: replace with fuchsia.net.NameLookup.
+
+package net
+
+func init() {
+ defaultNS = []string{"8.8.8.8:53"}
+}
diff --git a/src/net/dnsconfig_unix.go b/src/net/dnsconfig_unix.go
index 877e77c..40c10c1 100644
--- a/src/net/dnsconfig_unix.go
+++ b/src/net/dnsconfig_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
// Read system DNS config from /etc/resolv.conf
diff --git a/src/net/error_fuchsia.go b/src/net/error_fuchsia.go
new file mode 100644
index 0000000..caad133
--- /dev/null
+++ b/src/net/error_fuchsia.go
@@ -0,0 +1,9 @@
+// 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 net
+
+func isConnError(err error) bool {
+ return false
+}
diff --git a/src/net/error_fuchsia_test.go b/src/net/error_fuchsia_test.go
new file mode 100644
index 0000000..2ab6ff6
--- /dev/null
+++ b/src/net/error_fuchsia_test.go
@@ -0,0 +1,35 @@
+// 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.
+
+// +build fuchsia !plan9,!windows,!unix
+
+package net
+
+import (
+ "os"
+ "syscall"
+ "syscall/zx"
+)
+
+var (
+ errTimedout = syscall.ETIMEDOUT
+ errOpNotSupported = syscall.EOPNOTSUPP
+
+ abortedConnRequestErrors = []error{syscall.ECONNABORTED} // see accept in fd_unix.go
+)
+
+func isPlatformError(err error) bool {
+ _, ok := err.(*zx.Error)
+ return ok
+}
+
+func samePlatformError(err, want error) bool {
+ if op, ok := err.(*OpError); ok {
+ err = op.Err
+ }
+ if sys, ok := err.(*os.SyscallError); ok {
+ err = sys.Err
+ }
+ return err == want
+}
diff --git a/src/net/error_posix.go b/src/net/error_posix.go
index d709a27..a90f6ae 100644
--- a/src/net/error_posix.go
+++ b/src/net/error_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris windows
package net
diff --git a/src/net/error_posix_test.go b/src/net/error_posix_test.go
index b411a37..78ed19c 100644
--- a/src/net/error_posix_test.go
+++ b/src/net/error_posix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !plan9
+// +build !fuchsia,!plan9
package net
diff --git a/src/net/error_test.go b/src/net/error_test.go
index 8d4a7ff..8e194e0 100644
--- a/src/net/error_test.go
+++ b/src/net/error_test.go
@@ -138,6 +138,8 @@
func TestDialError(t *testing.T) {
switch runtime.GOOS {
+ case "fuchsia":
+ t.Skip("fuchsia does not comply; uses EFUCHSIA")
case "plan9":
t.Skipf("%s does not have full support of socktest", runtime.GOOS)
}
@@ -185,6 +187,8 @@
func TestProtocolDialError(t *testing.T) {
switch runtime.GOOS {
+ case "fuchsia":
+ t.Skip("fuchsia does not comply; uses EFUCHSIA")
case "solaris", "illumos":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -287,6 +291,8 @@
func TestListenError(t *testing.T) {
switch runtime.GOOS {
+ case "fuchsia":
+ t.Skip("fuchsia does not comply; uses EFUCHSIA")
case "plan9":
t.Skipf("%s does not have full support of socktest", runtime.GOOS)
}
@@ -376,6 +382,8 @@
func TestProtocolListenError(t *testing.T) {
switch runtime.GOOS {
+ case "fuchsia":
+ t.Skip("fuchsia does not comply; uses EFUCHSIA")
case "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -548,6 +556,9 @@
}
func TestCloseError(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("fuchsia does not comply; uses EFUCHSIA")
+ }
ln, err := newLocalListener("tcp")
if err != nil {
t.Fatal(err)
@@ -720,6 +731,8 @@
func TestFileError(t *testing.T) {
switch runtime.GOOS {
+ case "fuchsia":
+ t.Skip("fuchsia does not comply; uses EFUCHSIA")
case "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
diff --git a/src/net/error_unix_test.go b/src/net/error_unix_test.go
index 9ce9e12..8fcd1ee 100644
--- a/src/net/error_unix_test.go
+++ b/src/net/error_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !plan9,!windows
+// +build !fuchsia,!plan9,!windows
package net
diff --git a/src/net/fd_fuchsia.go b/src/net/fd_fuchsia.go
new file mode 100644
index 0000000..3225a7c
--- /dev/null
+++ b/src/net/fd_fuchsia.go
@@ -0,0 +1,198 @@
+// 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.
+
+//+build fuchsia
+
+// TODO: move to using fd_unix for fuchsia?
+
+package net
+
+import (
+ "errors"
+ "fmt"
+ "internal/poll"
+ "os"
+ "runtime"
+ "syscall"
+ "syscall/zx/net"
+ "syscall/zx/posix/socket"
+ "syscall/zx/zxsocket"
+ "time"
+)
+
+// Network file descriptor.
+type netFD struct {
+ pfd poll.FD
+
+ // immutable until Close
+ sock zxsocket.Socket
+ net string
+ family int
+ isConnected bool
+ laddr Addr
+ raddr Addr
+}
+
+func domainToFamily(domain socket.Domain) int {
+ switch domain {
+ case socket.DomainIpv4:
+ return syscall.AF_INET
+ case socket.DomainIpv6:
+ return syscall.AF_INET6
+ default:
+ panic(fmt.Sprintf("unrecognized socket domain %s(%d)", domain, domain))
+ }
+}
+
+func familyToDomain(family int) socket.Domain {
+ switch family {
+ case syscall.AF_INET:
+ return socket.DomainIpv4
+ case syscall.AF_INET6:
+ return socket.DomainIpv6
+ default:
+ panic(fmt.Sprintf("unrecognized socket family %d", family))
+ }
+}
+
+func newFD(sock zxsocket.Socket, domain socket.Domain, net string) *netFD {
+ return &netFD{
+ pfd: poll.FD{
+ Sysfd: syscall.OpenFDIO(sock),
+ },
+ sock: sock,
+ family: domainToFamily(domain),
+ net: net,
+ }
+}
+
+func (fd *netFD) init() error {
+ // TODO: flip to true after implementing netpoller for real
+ return fd.pfd.Init(fd.net, false)
+}
+
+func (fd *netFD) isTCP() bool {
+ return len(fd.net) >= 3 && fd.net[:3] == "tcp"
+}
+
+func (fd *netFD) Read(b []byte) (n int, err error) {
+ n, err = fd.pfd.Read(b)
+ runtime.KeepAlive(fd)
+ return n, err
+}
+
+func (fd *netFD) Write(b []byte) (n int, err error) {
+ n, err = fd.pfd.Write(b)
+ runtime.KeepAlive(fd)
+ return n, err
+}
+
+func (fd *netFD) readMsg(b []byte) (n, flags int, addr net.SocketAddress, err error) {
+ // TODO: move call to pfd
+ data, addr, err := fd.sock.(*zxsocket.DatagramSocket).RecvMsg(len(b))
+ runtime.KeepAlive(fd)
+ n = copy(b, data)
+ return n, 0, addr, err
+}
+
+func (fd *netFD) sendMsg(b []byte, addr net.SocketAddress) (n int, err error) {
+ // TODO: move call to pfd
+ n, err = fd.sock.(*zxsocket.DatagramSocket).SendMsg(b, addr)
+ runtime.KeepAlive(fd)
+ return n, err
+}
+
+func (fd *netFD) closeRead() error {
+ return errors.New("net: closeRead not implemented on fuchsia")
+}
+
+func (fd *netFD) closeWrite() error {
+ return errors.New("net: closeWrite not implemented on fuchsia")
+}
+
+func (fd *netFD) Close() error {
+ return fd.pfd.Close()
+}
+
+func (fd *netFD) dup() (*os.File, error) {
+ fdio, err := fd.sock.Clone()
+ if err != nil {
+ return nil, err
+ }
+ return os.NewFile(uintptr(syscall.OpenFDIO(fdio)), fd.name()), nil
+}
+
+func (fd *netFD) accept() (*netFD, error) {
+ newm, addr, err := fd.pfd.Accept()
+ if err != nil {
+ return nil, err
+ }
+ netfd := newFD(newm, familyToDomain(fd.family), fd.net)
+ if err := netfd.init(); err != nil {
+ fd.Close()
+ return nil, err
+ }
+ fd.setAddr(fd.asAddr(addr, nil))
+ return netfd, nil
+}
+
+func socketAddrToIpPort(addr net.SocketAddress) (IP, int) {
+ switch addr.Which() {
+ case net.SocketAddressIpv4:
+ return addr.Ipv4.Address.Addr[:], int(addr.Ipv4.Port)
+ case net.SocketAddressIpv6:
+ return addr.Ipv6.Address.Addr[:], int(addr.Ipv6.Port)
+ default:
+ panic(fmt.Sprintf("unrecognized SocketAddress variant %d", addr.Which()))
+ }
+}
+
+func (fd *netFD) asAddr(addr net.SocketAddress, err error) sockaddr {
+ if err != nil {
+ return nil
+ }
+
+ ip, port := socketAddrToIpPort(addr)
+ if isZeros(ip) && port == 0 {
+ return nil
+ }
+
+ switch fd.sock.(type) {
+ case *zxsocket.DatagramSocket:
+ return &UDPAddr{IP: ip, Port: port}
+ case *zxsocket.StreamSocket:
+ return &TCPAddr{IP: ip, Port: port}
+ default:
+ panic(fmt.Sprintf("unrecognized socket type %T", fd.sock))
+ }
+}
+
+func (fd *netFD) setAddr(peerAddr sockaddr) {
+ fd.laddr = fd.asAddr(fd.sock.GetSockName())
+ fd.raddr = peerAddr
+ runtime.SetFinalizer(fd, (*netFD).Close)
+}
+
+func (fd *netFD) name() string {
+ var ls, rs string
+ if fd.laddr != nil {
+ ls = fd.laddr.String()
+ }
+ if fd.raddr != nil {
+ rs = fd.raddr.String()
+ }
+ return fd.net + ":" + ls + "->" + rs
+}
+
+func (fd *netFD) SetDeadline(t time.Time) error {
+ return fd.pfd.SetDeadline(t)
+}
+
+func (fd *netFD) SetReadDeadline(t time.Time) error {
+ return fd.pfd.SetReadDeadline(t)
+}
+
+func (fd *netFD) SetWriteDeadline(t time.Time) error {
+ return fd.pfd.SetWriteDeadline(t)
+}
diff --git a/src/net/file_stub.go b/src/net/file_stub.go
index bfb8100..466ef27 100644
--- a/src/net/file_stub.go
+++ b/src/net/file_stub.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build js,wasm
+// +build fuchsia js,wasm
package net
diff --git a/src/net/file_test.go b/src/net/file_test.go
index 8c09c0d..34537ac 100644
--- a/src/net/file_test.go
+++ b/src/net/file_test.go
@@ -31,7 +31,7 @@
func TestFileConn(t *testing.T) {
switch runtime.GOOS {
- case "plan9", "windows":
+ case "fuchsia", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -138,7 +138,7 @@
func TestFileListener(t *testing.T) {
switch runtime.GOOS {
- case "plan9", "windows":
+ case "fuchsia", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -230,7 +230,7 @@
func TestFilePacketConn(t *testing.T) {
switch runtime.GOOS {
- case "plan9", "windows":
+ case "fuchsia", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -297,7 +297,7 @@
// Issue 24483.
func TestFileCloseRace(t *testing.T) {
switch runtime.GOOS {
- case "plan9", "windows":
+ case "fuchsia", "plan9", "windows":
t.Skipf("not supported on %s", runtime.GOOS)
}
if !testableNetwork("tcp") {
diff --git a/src/net/hook_fuchsia.go b/src/net/hook_fuchsia.go
new file mode 100644
index 0000000..fa25da6
--- /dev/null
+++ b/src/net/hook_fuchsia.go
@@ -0,0 +1,15 @@
+// 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 net
+
+import "syscall"
+
+var (
+ testHookDialChannel = func() {} // for golang.org/issue/5349
+ testHookCanceledDial = func() {} // for golang.org/issue/16523
+
+ // Placeholders for socket system calls.
+ closeFunc func(int) error = syscall.Close
+)
diff --git a/src/net/hosts_test.go b/src/net/hosts_test.go
index f850e2f..eaefd32 100644
--- a/src/net/hosts_test.go
+++ b/src/net/hosts_test.go
@@ -6,6 +6,7 @@
import (
"reflect"
+ "runtime"
"strings"
"testing"
)
@@ -58,7 +59,14 @@
},
}
+func requireTestData(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("fuchsia cannot expose testdata; directories can't be resources")
+ }
+}
+
func TestLookupStaticHost(t *testing.T) {
+ requireTestData(t)
defer func(orig string) { testHookHostsPath = orig }(testHookHostsPath)
for _, tt := range lookupStaticHostTests {
@@ -128,6 +136,7 @@
}
func TestLookupStaticAddr(t *testing.T) {
+ requireTestData(t)
defer func(orig string) { testHookHostsPath = orig }(testHookHostsPath)
for _, tt := range lookupStaticAddrTests {
@@ -149,6 +158,7 @@
}
func TestHostCacheModification(t *testing.T) {
+ requireTestData(t)
// Ensure that programs can't modify the internals of the host cache.
// See https://golang.org/issues/14212.
defer func(orig string) { testHookHostsPath = orig }(testHookHostsPath)
diff --git a/src/net/interface_fuchsia.go b/src/net/interface_fuchsia.go
new file mode 100644
index 0000000..de5e6a4
--- /dev/null
+++ b/src/net/interface_fuchsia.go
@@ -0,0 +1,78 @@
+// 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 mod` ignores file names for the purpose of resolving
+// dependencies, and fdio doesn't build on not-Fuchsia.
+// +build fuchsia
+
+package net
+
+import (
+ "context"
+ "sync"
+ "syscall/zx"
+ "syscall/zx/fdio"
+ "syscall/zx/net/stack"
+)
+
+var stackHandle struct {
+ mu struct {
+ sync.Mutex
+ h zx.Handle
+ }
+}
+
+func stackClient() (stack.StackWithCtxInterface, error) {
+ stackHandle.mu.Lock()
+ defer stackHandle.mu.Unlock()
+
+ if stackHandle.mu.h == zx.HandleInvalid {
+ local, remote, err := zx.NewChannel(0)
+ if err != nil {
+ return stack.StackWithCtxInterface{}, err
+ }
+ if err := fdio.ServiceConnect("/svc/"+stack.StackName, zx.Handle(remote)); err != nil {
+ return stack.StackWithCtxInterface{}, err
+ }
+ stackHandle.mu.h = zx.Handle(local)
+ }
+ return stack.StackWithCtxInterface{Channel: zx.Channel(stackHandle.mu.h)}, nil
+}
+
+// If the ifindex is zero, interfaceTable returns mappings of all
+// network interfaces. Otherwise it returns a mapping of a specific interface.
+func interfaceTable(ifindex int) ([]Interface, error) {
+ c, err := stackClient()
+ if err != nil {
+ return nil, err
+ }
+ ifInfos, err := c.ListInterfaces(context.Background())
+ if err != nil {
+ return nil, err
+ }
+ ifs := make([]Interface, 0, len(ifInfos))
+ for _, info := range ifInfos {
+ ifs = append(ifs, Interface{
+ // TODO(jayzhuang): fill `Flags` when they are all available in stack.InterfaceInfo.
+ Index: int(info.Id),
+ MTU: int(info.Properties.Mtu),
+ Name: info.Properties.Name,
+ HardwareAddr: info.Properties.Mac.Octets[:],
+ })
+ }
+ return ifs, nil
+}
+
+// If the ifi is nil, interfaceAddrTable returns addresses for all
+// network interfaces. Otherwise it returns addresses for a specific interface.
+func interfaceAddrTable(ifi *Interface) ([]Addr, error) {
+ // TODO(44532): implement
+ return nil, nil
+}
+
+// interfaceMulticastAddrTable returns addresses for a specific interface.
+func interfaceMulticastAddrTable(ifi *Interface) ([]Addr, error) {
+ // TODO(44532): implement
+ return nil, nil
+}
diff --git a/src/net/internal/socktest/switch_posix.go b/src/net/internal/socktest/switch_posix.go
index 863edef..708025e 100644
--- a/src/net/internal/socktest/switch_posix.go
+++ b/src/net/internal/socktest/switch_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !plan9
+// +build !fuchsia,!plan9
package socktest
diff --git a/src/net/internal/socktest/switch_stub.go b/src/net/internal/socktest/switch_stub.go
index 28ce72c..382b73b 100644
--- a/src/net/internal/socktest/switch_stub.go
+++ b/src/net/internal/socktest/switch_stub.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build plan9
+// +build fuchsia plan9
package socktest
diff --git a/src/net/ip_test.go b/src/net/ip_test.go
index a5fc5e6..2076a56 100644
--- a/src/net/ip_test.go
+++ b/src/net/ip_test.go
@@ -61,6 +61,7 @@
}
func TestLookupWithIP(t *testing.T) {
+ requireSetDeadline(t)
_, err := LookupIP("")
if err == nil {
t.Errorf(`LookupIP("") succeeded, should fail`)
diff --git a/src/net/iprawsock_fuchsia.go b/src/net/iprawsock_fuchsia.go
new file mode 100644
index 0000000..0bfd133
--- /dev/null
+++ b/src/net/iprawsock_fuchsia.go
@@ -0,0 +1,34 @@
+// 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 net
+
+import (
+ "context"
+ "syscall"
+)
+
+func (c *IPConn) readFrom(b []byte) (int, *IPAddr, error) {
+ return 0, nil, syscall.EFUCHSIA
+}
+
+func (c *IPConn) readMsg(b, oob []byte) (n, oobn, flags int, addr *IPAddr, err error) {
+ return 0, 0, 0, nil, syscall.EFUCHSIA
+}
+
+func (c *IPConn) writeTo(b []byte, addr *IPAddr) (int, error) {
+ return 0, syscall.EFUCHSIA
+}
+
+func (c *IPConn) writeMsg(b, oob []byte, addr *IPAddr) (n, oobn int, err error) {
+ return 0, 0, syscall.EFUCHSIA
+}
+
+func (sd *sysDialer) dialIP(ctx context.Context, laddr, raddr *IPAddr) (*IPConn, error) {
+ return nil, syscall.EFUCHSIA
+}
+
+func (sl *sysListener) listenIP(ctx context.Context, laddr *IPAddr) (*IPConn, error) {
+ return nil, syscall.EFUCHSIA
+}
diff --git a/src/net/ipsock_fuchsia.go b/src/net/ipsock_fuchsia.go
new file mode 100644
index 0000000..e4d547e
--- /dev/null
+++ b/src/net/ipsock_fuchsia.go
@@ -0,0 +1,226 @@
+// 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.
+
+//+build fuchsia
+
+package net
+
+import (
+ "context"
+ "fmt"
+ "sync"
+ "syscall"
+ "syscall/zx"
+ "syscall/zx/fdio"
+ "syscall/zx/net"
+ "syscall/zx/posix/socket"
+ "syscall/zx/zxsocket"
+)
+
+func (p *ipStackCapabilities) probe() {
+ p.ipv4Enabled = true
+ p.ipv6Enabled = true
+ p.ipv4MappedIPv6Enabled = true
+}
+
+// A sockaddr represents a TCP, UDP, IP or Unix network endpoint
+// address that can be converted into an fdio sockaddr message.
+type sockaddr interface {
+ Addr
+
+ family() int
+ domain() socket.Domain
+ isWildcard() bool
+ sockaddr(domain socket.Domain) (addr net.SocketAddress, err error)
+}
+
+func favoriteAddrDomain(net string, laddr, raddr sockaddr, mode string) socket.Domain {
+ switch net[len(net)-1] {
+ case '4':
+ return socket.DomainIpv4
+ case '6':
+ return socket.DomainIpv6
+ }
+
+ if mode == "listen" && (laddr == nil || laddr.isWildcard()) {
+ if supportsIPv4map() || !supportsIPv4() {
+ return socket.DomainIpv6
+ }
+ if laddr == nil {
+ return socket.DomainIpv4
+ }
+ return laddr.domain()
+ }
+
+ if (laddr == nil || laddr.domain() == socket.DomainIpv4) &&
+ (raddr == nil || raddr.domain() == socket.DomainIpv4) {
+ return socket.DomainIpv4
+ }
+ return socket.DomainIpv6
+}
+
+var socketProvider struct {
+ once sync.Once
+ provider socket.ProviderWithCtxInterface
+ err error
+}
+
+func getProvider() (*socket.ProviderWithCtxInterface, error) {
+ socketProvider.once.Do(func() {
+ socketProvider.err = func() error {
+ c0, c1, err := zx.NewChannel(0)
+ if err != nil {
+ return err
+ }
+ if err := fdio.ServiceConnect("/svc/"+socket.ProviderName, zx.Handle(c0)); err != nil {
+ _ = c1.Close()
+ return err
+ }
+ socketProvider.provider.Channel = c1
+ return nil
+ }()
+ })
+ return &socketProvider.provider, socketProvider.err
+}
+
+func dialFuchsia(_ context.Context, netName string, laddr, raddr sockaddr) (*netFD, error) {
+ domain := favoriteAddrDomain(netName, laddr, raddr, "dial")
+
+ provider, err := getProvider()
+ if err != nil {
+ return nil, err
+ }
+
+ var base *socket.BaseSocketWithCtxInterface
+ if stringsHasPrefix(netName, "udp") {
+ result, err := provider.DatagramSocket(context.Background(), domain, socket.DatagramSocketProtocolUdp)
+ if err != nil {
+ return nil, err
+ }
+ switch result.Which() {
+ case socket.ProviderDatagramSocketResultErr:
+ return nil, syscall.Errno(result.Err)
+ case socket.ProviderDatagramSocketResultResponse:
+ base = &socket.BaseSocketWithCtxInterface{Channel: result.Response.S.Channel}
+ default:
+ panic(fmt.Sprintf("unrecognized fuchsia.posix.socket/Provider.DatagramSocket result %d", result.Which()))
+ }
+ } else {
+ result, err := provider.StreamSocket(context.Background(), domain, socket.StreamSocketProtocolTcp)
+ if err != nil {
+ return nil, err
+ }
+ switch result.Which() {
+ case socket.ProviderStreamSocketResultErr:
+ return nil, syscall.Errno(result.Err)
+ case socket.ProviderStreamSocketResultResponse:
+ base = &socket.BaseSocketWithCtxInterface{Channel: result.Response.S.Channel}
+ default:
+ panic(fmt.Sprintf("unrecognized fuchsia.posix.socket/Provider.StreamSocket result %d", result.Which()))
+ }
+ }
+
+ sock, err := zxsocket.NewSocket(base)
+ if err != nil {
+ return nil, err
+ }
+ fd := newFD(sock, domain, netName)
+ if laddr != nil {
+ addr, err := laddr.sockaddr(domain)
+ if err != nil {
+ return nil, err
+ }
+ var port uint16
+ isSet := false
+ switch addr.Which() {
+ case net.SocketAddressIpv4:
+ port = addr.Ipv4.Port
+ isSet = true
+ case net.SocketAddressIpv6:
+ port = addr.Ipv6.Port
+ isSet = true
+ }
+ if isSet || port != 0 {
+ if err := fd.sock.Bind(addr); err != nil {
+ return nil, err
+ }
+ }
+ if raddr == nil {
+ switch s := fd.sock.(type) {
+ case *zxsocket.DatagramSocket:
+ case *zxsocket.StreamSocket:
+ if err := s.Listen(int16(listenerBacklog())); err != nil {
+ return nil, err
+ }
+ default:
+ panic(fmt.Sprintf("unrecognized socket type %T", fd.sock))
+ }
+ }
+ }
+ if raddr != nil {
+ addr, err := raddr.sockaddr(domain)
+ if err != nil {
+ return nil, err
+ }
+ for i := 0; i < 2; i++ {
+ err = fd.sock.Connect(addr)
+ if sock, ok := fd.sock.(*zxsocket.StreamSocket); ok && err == syscall.EINPROGRESS {
+ obs, err := sock.Wait(zxsocket.SignalOutgoing|zx.SignalSocketPeerClosed, zx.TimensecInfinite)
+ if err != nil {
+ return nil, err
+ }
+ switch {
+ case obs&zx.SignalSocketPeerClosed != 0:
+ return nil, &zx.Error{Status: zx.ErrPeerClosed, Text: "zxsocket"}
+ case obs&zxsocket.SignalOutgoing != 0:
+ // Call connect again to learn the result.
+ continue
+ default:
+ panic(fmt.Sprintf("unexpected observed signals %08X", obs))
+ }
+ }
+ break
+ }
+ if err != nil {
+ return nil, err
+ }
+ fd.isConnected = true
+ }
+ fd.setAddr(fd.asAddr(fd.sock.GetPeerName()))
+
+ return fd, nil
+}
+
+func ipToSockaddr(domain socket.Domain, ip IP, port int, zone_str string) (address net.SocketAddress, err error) {
+ switch domain {
+ case socket.DomainIpv4:
+ if len(ip) == 0 {
+ ip = IPv4zero
+ }
+ ip4 := ip.To4()
+ if ip4 == nil {
+ return net.SocketAddress{}, &AddrError{Err: "non-IPv4 address", Addr: ip.String()}
+ }
+ addr := net.SocketAddressWithIpv4(net.Ipv4SocketAddress{
+ Port: uint16(port),
+ })
+ copy(addr.Ipv4.Address.Addr[:], ip4)
+ return addr, nil
+ case socket.DomainIpv6:
+ if len(ip) == 0 || ip.Equal(IPv4zero) {
+ ip = IPv6zero
+ }
+ ip6 := ip.To16()
+ if ip6 == nil {
+ return net.SocketAddress{}, &AddrError{Err: "non-IPv6 address", Addr: ip.String()}
+ }
+ addr := net.SocketAddressWithIpv6(net.Ipv6SocketAddress{
+ Port: uint16(port),
+ ZoneIndex: uint64(zoneCache.index(zone_str)),
+ })
+ copy(addr.Ipv6.Address.Addr[:], ip6)
+ return addr, nil
+ }
+ return net.SocketAddress{}, &AddrError{Err: "invalid address family", Addr: ip.String()}
+}
diff --git a/src/net/ipsock_fuchsia_test.go b/src/net/ipsock_fuchsia_test.go
new file mode 100644
index 0000000..c231d7c
--- /dev/null
+++ b/src/net/ipsock_fuchsia_test.go
@@ -0,0 +1,101 @@
+// 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 net
+
+import (
+ "syscall/zx/net"
+ "syscall/zx/posix/socket"
+ "testing"
+)
+
+func TestIPToSockaddr(t *testing.T) {
+ type inArgs struct {
+ domain socket.Domain
+ ip IP
+ port int
+ zone string
+ }
+
+ type want struct {
+ addr net.SocketAddress
+ err bool
+ }
+
+ makeIpv4 := func(addr [4]byte, port uint16) net.SocketAddress {
+ return net.SocketAddressWithIpv4(net.Ipv4SocketAddress{
+ Address: net.Ipv4Address{
+ Addr: addr,
+ },
+ Port: port,
+ })
+ }
+ makeIpv6 := func(addr [16]byte, port uint16, zone uint64) net.SocketAddress {
+ return net.SocketAddressWithIpv6(net.Ipv6SocketAddress{
+ Address: net.Ipv6Address{
+ Addr: addr,
+ },
+ Port: port,
+ ZoneIndex: zone,
+ })
+ }
+
+ tests := []struct {
+ name string
+ in inArgs
+ want want
+ }{
+ {
+ "v4 non-numeric string zone ignored",
+ inArgs{socket.DomainIpv4, ParseIP("1.2.3.4"), 6667, "zone"},
+ want{makeIpv4([4]byte{1, 2, 3, 4}, 6667), false},
+ },
+ {
+ "v4 numeric string zone ignored",
+ inArgs{socket.DomainIpv4, ParseIP("1.2.3.4"), 6697, "17"},
+ want{makeIpv4([4]byte{1, 2, 3, 4}, 6697), false},
+ },
+ {
+ "v4 invalid IP returns error",
+ inArgs{socket.DomainIpv4, IP([]byte{1}), 6697, ""},
+ want{net.SocketAddress{}, true},
+ },
+ {
+ "v6 with known non-numeric zone converted",
+ // This test runs in a sandbox with interface 'lo' on index 1.
+ inArgs{socket.DomainIpv6, ParseIP("fe80::1"), 443, "lo"},
+ want{makeIpv6([16]byte{0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, 443, 1), false},
+ },
+ {
+ "v6 with unknown non-numeric zone ignored",
+ inArgs{socket.DomainIpv6, ParseIP("fe80::1"), 443, "unknownif"},
+ want{makeIpv6([16]byte{0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, 443, 0), false},
+ },
+ {
+ "v6 with numeric zone handled properly",
+ inArgs{socket.DomainIpv6, ParseIP("fe80::1"), 80, "42"},
+ want{makeIpv6([16]byte{0xfe, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, 80, 42), false},
+ },
+ {
+ "v6 invalid IP returns error",
+ inArgs{socket.DomainIpv6, IP([]byte{1}), 1, ""},
+ want{net.SocketAddress{}, true},
+ },
+ }
+
+ for _, test := range tests {
+ addr, err := ipToSockaddr(test.in.domain, test.in.ip, test.in.port, test.in.zone)
+ if test.want.err && err == nil {
+ t.Errorf("test %q returned no error, but an error was expected", test.name)
+ continue
+ } else if !test.want.err && err != nil {
+ t.Errorf("test %q got error %v; no error was expected", test.name, err)
+ continue
+ }
+
+ if addr != test.want.addr {
+ t.Errorf("test %q got addr %v, wanted %v", test.name, addr, test.want.addr)
+ }
+ }
+}
diff --git a/src/net/lookup_unix.go b/src/net/lookup_unix.go
index 9055826..050d487 100644
--- a/src/net/lookup_unix.go
+++ b/src/net/lookup_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
package net
@@ -10,7 +10,6 @@
"context"
"internal/bytealg"
"sync"
- "syscall"
"golang.org/x/net/dns/dnsmessage"
)
@@ -327,27 +326,3 @@
}
return r.goLookupPTR(ctx, addr)
}
-
-// concurrentThreadsLimit returns the number of threads we permit to
-// run concurrently doing DNS lookups via cgo. A DNS lookup may use a
-// file descriptor so we limit this to less than the number of
-// permitted open files. On some systems, notably Darwin, if
-// getaddrinfo is unable to open a file descriptor it simply returns
-// EAI_NONAME rather than a useful error. Limiting the number of
-// concurrent getaddrinfo calls to less than the permitted number of
-// file descriptors makes that error less likely. We don't bother to
-// apply the same limit to DNS lookups run directly from Go, because
-// there we will return a meaningful "too many open files" error.
-func concurrentThreadsLimit() int {
- var rlim syscall.Rlimit
- if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil {
- return 500
- }
- r := int(rlim.Cur)
- if r > 500 {
- r = 500
- } else if r > 30 {
- r -= 30
- }
- return r
-}
diff --git a/src/net/main_fuchsia_test.go b/src/net/main_fuchsia_test.go
new file mode 100644
index 0000000..f77da1f
--- /dev/null
+++ b/src/net/main_fuchsia_test.go
@@ -0,0 +1,18 @@
+// 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 net
+
+func installTestHooks() {
+}
+
+func uninstallTestHooks() {
+}
+
+// forceCloseSockets must be called only from TestMain.
+func forceCloseSockets() {
+ for s := range sw.Sockets() {
+ closeFunc(s)
+ }
+}
diff --git a/src/net/net_test.go b/src/net/net_test.go
index 409e140..1878248 100644
--- a/src/net/net_test.go
+++ b/src/net/net_test.go
@@ -20,7 +20,7 @@
func TestCloseRead(t *testing.T) {
switch runtime.GOOS {
- case "plan9":
+ case "fuchsia", "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
t.Parallel()
@@ -76,7 +76,7 @@
func TestCloseWrite(t *testing.T) {
switch runtime.GOOS {
- case "plan9":
+ case "fuchsia", "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -345,6 +345,8 @@
// See golang.org/issue/6163, golang.org/issue/6987.
func TestAcceptIgnoreAbortedConnRequest(t *testing.T) {
switch runtime.GOOS {
+ case "fuchsia":
+ t.Skip("hangs on fuchsia")
case "plan9":
t.Skipf("%s does not have full support of socktest", runtime.GOOS)
}
@@ -495,6 +497,7 @@
// See golang.org/cl/30164 which documented this. The net/http package
// depends on this.
func TestReadTimeoutUnblocksRead(t *testing.T) {
+ requireSetDeadline(t)
serverDone := make(chan struct{})
server := func(cs *TCPConn) error {
defer close(serverDone)
@@ -538,6 +541,9 @@
// Issue 17695: verify that a blocked Read is woken up by a Close.
func TestCloseUnblocksRead(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("hangs on fuchsia")
+ }
t.Parallel()
server := func(cs *TCPConn) error {
// Give the client time to get stuck in a Read:
@@ -563,6 +569,9 @@
if runtime.GOOS == "aix" {
testenv.SkipFlaky(t, 29685)
}
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("hangs on fuchsia")
+ }
t.Parallel()
server := func(cs *TCPConn) error {
cs.SetLinger(0)
diff --git a/src/net/nss.go b/src/net/nss.go
index 96b9cdd..29caa46 100644
--- a/src/net/nss.go
+++ b/src/net/nss.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
package net
diff --git a/src/net/parse_test.go b/src/net/parse_test.go
index c5f8bfd..ffe4d12 100644
--- a/src/net/parse_test.go
+++ b/src/net/parse_test.go
@@ -14,7 +14,7 @@
func TestReadLine(t *testing.T) {
// /etc/services file does not exist on android, plan9, windows.
switch runtime.GOOS {
- case "android", "plan9", "windows":
+ case "android", "plan9", "windows", "fuchsia":
t.Skipf("not supported on %s", runtime.GOOS)
}
filename := "/etc/services" // a nice big file
diff --git a/src/net/platform_test.go b/src/net/platform_test.go
index d3bb918..50516e3 100644
--- a/src/net/platform_test.go
+++ b/src/net/platform_test.go
@@ -39,7 +39,7 @@
case "ip+nopriv":
case "ip", "ip4", "ip6":
switch runtime.GOOS {
- case "plan9":
+ case "fuchsia", "plan9":
return false
default:
if os.Getuid() != 0 {
@@ -48,7 +48,7 @@
}
case "unix", "unixgram":
switch runtime.GOOS {
- case "android", "plan9", "windows":
+ case "android", "fuchsia", "plan9", "windows":
return false
case "aix":
return unixEnabledOnAIX
@@ -59,7 +59,7 @@
}
case "unixpacket":
switch runtime.GOOS {
- case "aix", "android", "darwin", "plan9", "windows":
+ case "aix", "android", "darwin", "fuchsia", "plan9", "windows":
return false
case "netbsd":
// It passes on amd64 at least. 386 fails (Issue 22927). arm is unknown.
diff --git a/src/net/port_unix.go b/src/net/port_unix.go
index 4fdd9a3..31dc7fa 100644
--- a/src/net/port_unix.go
+++ b/src/net/port_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
// Read system port mappings from /etc/services
diff --git a/src/net/protoconn_test.go b/src/net/protoconn_test.go
index 9f6772c..d7bc7c9 100644
--- a/src/net/protoconn_test.go
+++ b/src/net/protoconn_test.go
@@ -23,6 +23,7 @@
// golang.org/x/net/icmp
func TestTCPListenerSpecificMethods(t *testing.T) {
+ requireSetDeadline(t)
switch runtime.GOOS {
case "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
@@ -164,6 +165,9 @@
}
func TestIPConnSpecificMethods(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("iprawsock is unsupported on fuchsia")
+ }
if os.Getuid() != 0 {
t.Skip("must be root")
}
diff --git a/src/net/rawconn_stub_test.go b/src/net/rawconn_stub_test.go
index cec977f..4ee181e 100644
--- a/src/net/rawconn_stub_test.go
+++ b/src/net/rawconn_stub_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build js,wasm plan9
+// +build js,wasm plan9 fuchsia
package net
diff --git a/src/net/rawconn_test.go b/src/net/rawconn_test.go
index a08ff89..ee6c204 100644
--- a/src/net/rawconn_test.go
+++ b/src/net/rawconn_test.go
@@ -15,7 +15,7 @@
func TestRawConnReadWrite(t *testing.T) {
switch runtime.GOOS {
- case "plan9":
+ case "fuchsia", "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
@@ -175,7 +175,7 @@
func TestRawConnControl(t *testing.T) {
switch runtime.GOOS {
- case "plan9":
+ case "fuchsia", "plan9":
t.Skipf("not supported on %s", runtime.GOOS)
}
diff --git a/src/net/rlimit_fuchsia.go b/src/net/rlimit_fuchsia.go
new file mode 100644
index 0000000..7a5a113
--- /dev/null
+++ b/src/net/rlimit_fuchsia.go
@@ -0,0 +1,11 @@
+// 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 net
+
+// concurrentThreadsLimit returns the number of threads we permit to
+// run concurrently doing DNS lookups via cgo.
+func concurrentThreadsLimit() int {
+ return 500
+}
diff --git a/src/net/rlimit_unix.go b/src/net/rlimit_unix.go
new file mode 100644
index 0000000..ff5902f
--- /dev/null
+++ b/src/net/rlimit_unix.go
@@ -0,0 +1,35 @@
+// 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.
+
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package net
+
+import (
+ "syscall"
+)
+
+// concurrentThreadsLimit returns the number of threads we permit to
+// run concurrently doing DNS lookups via cgo. A DNS lookup may use a
+// file descriptor so we limit this to less than the number of
+// permitted open files. On some systems, notably Darwin, if
+// getaddrinfo is unable to open a file descriptor it simply returns
+// EAI_NONAME rather than a useful error. Limiting the number of
+// concurrent getaddrinfo calls to less than the permitted number of
+// file descriptors makes that error less likely. We don't bother to
+// apply the same limit to DNS lookups run directly from Go, because
+// there we will return a meaningful "too many open files" error.
+func concurrentThreadsLimit() int {
+ var rlim syscall.Rlimit
+ if err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil {
+ return 500
+ }
+ r := int(rlim.Cur)
+ if r > 500 {
+ r = 500
+ } else if r > 30 {
+ r -= 30
+ }
+ return r
+}
diff --git a/src/net/sendfile_test.go b/src/net/sendfile_test.go
index 13842a1..f115962 100644
--- a/src/net/sendfile_test.go
+++ b/src/net/sendfile_test.go
@@ -27,6 +27,9 @@
)
func TestSendfile(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("hangs on fuchsia")
+ }
ln, err := newLocalListener("tcp")
if err != nil {
t.Fatal(err)
@@ -97,6 +100,9 @@
}
func TestSendfileParts(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("hangs on fuchsia")
+ }
ln, err := newLocalListener("tcp")
if err != nil {
t.Fatal(err)
@@ -155,6 +161,9 @@
}
func TestSendfileSeeked(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("hangs on fuchsia")
+ }
ln, err := newLocalListener("tcp")
if err != nil {
t.Fatal(err)
@@ -218,6 +227,8 @@
// Test that sendfile doesn't put a pipe into blocking mode.
func TestSendfilePipe(t *testing.T) {
switch runtime.GOOS {
+ case "fuchsia":
+ t.Skip("hangs on fuchsia")
case "plan9", "windows":
// These systems don't support deadlines on pipes.
t.Skipf("skipping on %s", runtime.GOOS)
diff --git a/src/net/sock_stub.go b/src/net/sock_stub.go
index c9f86af..50d92a3 100644
--- a/src/net/sock_stub.go
+++ b/src/net/sock_stub.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix js,wasm solaris
+// +build aix fuchsia js,wasm solaris
package net
diff --git a/src/net/sockopt_fuchsia.go b/src/net/sockopt_fuchsia.go
new file mode 100644
index 0000000..4722e67
--- /dev/null
+++ b/src/net/sockopt_fuchsia.go
@@ -0,0 +1,45 @@
+// 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 net
+
+import (
+ "os"
+ "runtime"
+ "syscall"
+)
+
+func setDefaultSockopts(s, family, sotype int, ipv6only bool) error {
+ return nil
+}
+
+func setDefaultListenerSockopts(s int) error {
+ return nil
+}
+
+func setDefaultMulticastSockopts(s int) error {
+ return nil
+}
+
+func setReadBuffer(fd *netFD, bytes int) error {
+ return syscall.ENOPROTOOPT
+}
+
+func setWriteBuffer(fd *netFD, bytes int) error {
+ return syscall.ENOPROTOOPT
+}
+
+func setKeepAlive(fd *netFD, keepalive bool) error {
+ b := make([]byte, 4)
+ if keepalive {
+ b[0] = 1
+ }
+ err := fd.sock.SetSockOpt(syscall.SOL_SOCKET, syscall.SO_KEEPALIVE, b)
+ runtime.KeepAlive(fd)
+ return os.NewSyscallError("setsockopt", err)
+}
+
+func setLinger(fd *netFD, sec int) error {
+ return syscall.ENOPROTOOPT
+}
diff --git a/src/net/tcpsock_fuchsia.go b/src/net/tcpsock_fuchsia.go
new file mode 100644
index 0000000..eb5d2ef
--- /dev/null
+++ b/src/net/tcpsock_fuchsia.go
@@ -0,0 +1,85 @@
+// 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.
+
+//+build fuchsia
+
+package net
+
+import (
+ "context"
+ "io"
+ "os"
+ "syscall/zx/net"
+ "syscall/zx/posix/socket"
+)
+
+func (a *TCPAddr) domain() socket.Domain {
+ if a == nil || len(a.IP) <= IPv4len {
+ return socket.DomainIpv4
+ }
+ if a.IP.To4() != nil {
+ return socket.DomainIpv4
+ }
+ return socket.DomainIpv6
+}
+
+func (a *TCPAddr) family() int {
+ return domainToFamily(a.domain())
+}
+
+func (a *TCPAddr) sockaddr(domain socket.Domain) (address net.SocketAddress, err error) {
+ if a == nil {
+ return net.SocketAddressWithIpv4(net.Ipv4SocketAddress{}), nil
+ }
+ return ipToSockaddr(domain, a.IP, a.Port, a.Zone)
+}
+
+func (c *TCPConn) readFrom(r io.Reader) (int64, error) {
+ return genericReadFrom(c, r)
+}
+
+func (sd *sysDialer) dialTCP(ctx context.Context, laddr, raddr *TCPAddr) (*TCPConn, error) {
+ if testHookDialTCP != nil {
+ return testHookDialTCP(ctx, sd.network, laddr, raddr)
+ }
+ return sd.doDialTCP(ctx, laddr, raddr)
+}
+
+func (sd *sysDialer) doDialTCP(ctx context.Context, laddr, raddr *TCPAddr) (*TCPConn, error) {
+ switch sd.network {
+ case "tcp", "tcp4", "tcp6":
+ default:
+ return nil, UnknownNetworkError(sd.network)
+ }
+ if raddr == nil {
+ return nil, errMissingAddress
+ }
+ fd, err := dialFuchsia(ctx, sd.network, laddr, raddr)
+ if err != nil {
+ return nil, err
+ }
+ return newTCPConn(fd), nil
+}
+
+func (ln *TCPListener) ok() bool { return ln != nil && ln.fd != nil }
+
+func (ln *TCPListener) accept() (*TCPConn, error) {
+ fd, err := ln.fd.accept()
+ if err != nil {
+ return nil, err
+ }
+ return newTCPConn(fd), nil
+}
+
+func (ln *TCPListener) close() error { return ln.fd.Close() }
+
+func (ln *TCPListener) file() (*os.File, error) { return ln.fd.dup() }
+
+func (sl *sysListener) listenTCP(ctx context.Context, laddr *TCPAddr) (*TCPListener, error) {
+ fd, err := dialFuchsia(ctx, sl.network, laddr, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &TCPListener{fd: fd, lc: sl.ListenConfig}, nil
+}
diff --git a/src/net/tcpsock_test.go b/src/net/tcpsock_test.go
index 8a70496..980b6c3 100644
--- a/src/net/tcpsock_test.go
+++ b/src/net/tcpsock_test.go
@@ -8,6 +8,7 @@
import (
"fmt"
+ "internal/poll"
"internal/testenv"
"io"
"os"
@@ -441,9 +442,16 @@
for {
c, err := ln.Accept()
if err != nil {
+ if err, ok := err.(*OpError); ok {
+ if err.Err != poll.ErrNetClosing {
+ t.Error(err)
+ }
+ }
break
}
- c.Close()
+ if err := c.Close(); err != nil {
+ t.Error(err)
+ }
}
wg.Done()
}()
@@ -452,20 +460,27 @@
fails := 0
d := &Dialer{Timeout: 200 * time.Millisecond}
for i := 0; i < attempts; i++ {
+ if t.Failed() {
+ break
+ }
c, err := d.Dial("tcp", ln.Addr().String())
if err != nil {
fails++
} else {
- c.Close()
+ if err := c.Close(); err != nil {
+ t.Error(err)
+ }
}
}
- ln.Close()
+ if err := ln.Close(); err != nil {
+ t.Error(err)
+ }
wg.Wait()
if fails > attempts/9 { // see issues 7400 and 7541
- t.Fatalf("too many Dial failed: %v", fails)
+ t.Fatalf("too many Dial failed: %d", fails)
}
if fails > 0 {
- t.Logf("# of failed Dials: %v", fails)
+ t.Logf("# of failed Dials: %d", fails)
}
}
@@ -500,6 +515,12 @@
}
defer server.Close()
+ var want float64
+ // TODO(tamird/dhobsd): reduce allocations.
+ if runtime.GOOS == "fuchsia" {
+ want = 4
+ }
+
var buf [128]byte
allocs := testing.AllocsPerRun(1000, func() {
_, err := server.Write(buf[:])
@@ -511,8 +532,8 @@
t.Fatal(err)
}
})
- if allocs > 0 {
- t.Fatalf("got %v; want 0", allocs)
+ if allocs > want {
+ t.Fatalf("got %v; want %v", allocs, want)
}
var bufwrt [128]byte
@@ -533,8 +554,8 @@
t.Fatal(err)
}
})
- if allocs > 0 {
- t.Fatalf("got %v; want 0", allocs)
+ if allocs > want {
+ t.Fatalf("got %v; want %v", allocs, want)
}
}
@@ -647,7 +668,7 @@
n = 1000
}
switch runtime.GOOS {
- case "darwin", "dragonfly", "freebsd", "netbsd", "openbsd", "plan9", "illumos", "solaris", "windows":
+ case "darwin", "dragonfly", "freebsd", "fuchsia", "netbsd", "openbsd", "plan9", "illumos", "solaris", "windows":
// Non-Linux systems take a long time to figure
// out that there is nothing listening on localhost.
n = 100
@@ -723,6 +744,9 @@
}
func TestCopyPipeIntoTCP(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("hangs on fuchsia")
+ }
ln, err := newLocalListener("tcp")
if err != nil {
t.Fatal(err)
diff --git a/src/net/tcpsock_unix_test.go b/src/net/tcpsock_unix_test.go
index 2bd591b..65d0a96 100644
--- a/src/net/tcpsock_unix_test.go
+++ b/src/net/tcpsock_unix_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !js,!plan9,!windows
+// +build !fuchsia,!js,!plan9,!windows
package net
diff --git a/src/net/tcpsockopt_fuchsia.go b/src/net/tcpsockopt_fuchsia.go
new file mode 100644
index 0000000..948c348
--- /dev/null
+++ b/src/net/tcpsockopt_fuchsia.go
@@ -0,0 +1,44 @@
+// 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 net
+
+import (
+ "runtime"
+ "syscall"
+ "time"
+)
+
+func setNoDelay(fd *netFD, noDelay bool) error {
+ b := make([]byte, 4)
+ if noDelay {
+ b[0] = 1
+ }
+ err := fd.sock.SetSockOpt(syscall.SOL_TCP, syscall.TCP_NODELAY, b)
+ runtime.KeepAlive(fd)
+ return err
+}
+
+func setKeepAlivePeriod(fd *netFD, d time.Duration) error {
+ // The socket option expects seconds so round to next highest second.
+ secs := uint32((d + time.Second - 1) / time.Second)
+
+ b := make([]byte, 4)
+ putUint32(b, secs)
+
+ if err := fd.sock.SetSockOpt(syscall.SOL_TCP, syscall.TCP_KEEPINTVL, b); err != nil {
+ return wrapSyscallError("setsockopt", err)
+ }
+ err := fd.sock.SetSockOpt(syscall.SOL_TCP, syscall.TCP_KEEPIDLE, b)
+ runtime.KeepAlive(fd)
+ return wrapSyscallError("setsockopt", err)
+}
+
+func putUint32(b []byte, v uint32) {
+ _ = b[3] // early bounds check to guarantee safety of writes below
+ b[0] = byte(v)
+ b[1] = byte(v >> 8)
+ b[2] = byte(v >> 16)
+ b[3] = byte(v >> 24)
+}
diff --git a/src/net/timeout_test.go b/src/net/timeout_test.go
index ad14cd7..eb32307 100644
--- a/src/net/timeout_test.go
+++ b/src/net/timeout_test.go
@@ -40,6 +40,9 @@
}
func TestDialTimeout(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("dial tcp 127.0.0.1:0: ErrPeerClosed: zxsocket")
+ }
// Cannot use t.Parallel - modifies global hooks.
origTestHookDialChannel := testHookDialChannel
defer func() { testHookDialChannel = origTestHookDialChannel }()
@@ -212,6 +215,9 @@
}
func TestAcceptTimeoutMustReturn(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
switch runtime.GOOS {
@@ -258,6 +264,9 @@
}
func TestAcceptTimeoutMustNotReturn(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
switch runtime.GOOS {
@@ -309,6 +318,9 @@
}
func TestReadTimeout(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("set tcp 127.0.0.1:45785: file type does not support deadline")
+ }
handler := func(ls *localServer, ln Listener) {
c, err := ln.Accept()
if err != nil {
@@ -363,6 +375,9 @@
}
func TestReadTimeoutMustNotReturn(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
switch runtime.GOOS {
@@ -430,6 +445,9 @@
}
func TestReadFromTimeout(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("set udp 127.0.0.1:40297: file type does not support deadline")
+ }
ch := make(chan Addr)
defer close(ch)
handler := func(ls *localPacketServer, c PacketConn) {
@@ -498,6 +516,9 @@
}
func TestWriteTimeout(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
ln, err := newLocalListener("tcp")
@@ -541,6 +562,9 @@
}
func TestWriteTimeoutMustNotReturn(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
switch runtime.GOOS {
@@ -612,6 +636,9 @@
}
func TestWriteToTimeout(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
c1, err := newLocalPacketListener("udp")
@@ -660,6 +687,9 @@
}
func TestReadTimeoutFluctuation(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
ln, err := newLocalListener("tcp")
@@ -693,6 +723,9 @@
}
func TestReadFromTimeoutFluctuation(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
c1, err := newLocalPacketListener("udp")
@@ -726,6 +759,9 @@
}
func TestWriteTimeoutFluctuation(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
switch runtime.GOOS {
@@ -803,6 +839,9 @@
if runtime.GOOS == "plan9" {
t.Skip("skipping test on plan9; see golang.org/issue/26945")
}
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
type result struct {
n int64
err error
@@ -897,6 +936,9 @@
// TestReadWriteProlongedTimeout tests concurrent deadline
// modification. Known to cause data races in the past.
func TestReadWriteProlongedTimeout(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
switch runtime.GOOS {
@@ -977,6 +1019,9 @@
}
func TestReadWriteDeadlineRace(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("zxsocket does not implement deadlines")
+ }
t.Parallel()
N := 1000
diff --git a/src/net/udpsock_fuchsia.go b/src/net/udpsock_fuchsia.go
new file mode 100644
index 0000000..831f2a3
--- /dev/null
+++ b/src/net/udpsock_fuchsia.go
@@ -0,0 +1,118 @@
+// 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.
+
+//+build fuchsia
+
+package net
+
+import (
+ "context"
+ "syscall"
+ "syscall/zx/net"
+ "syscall/zx/posix/socket"
+)
+
+func (a *UDPAddr) domain() socket.Domain {
+ if a == nil || len(a.IP) <= IPv4len {
+ return socket.DomainIpv4
+ }
+ if a.IP.To4() != nil {
+ return socket.DomainIpv4
+ }
+ return socket.DomainIpv6
+}
+
+func (a *UDPAddr) family() int {
+ return domainToFamily(a.domain())
+}
+
+func (a *UDPAddr) sockaddr(domain socket.Domain) (addr net.SocketAddress, err error) {
+ if a == nil {
+ return net.SocketAddressWithIpv4(net.Ipv4SocketAddress{}), nil
+ }
+ return ipToSockaddr(domain, a.IP, a.Port, a.Zone)
+}
+
+func (c *UDPConn) readFrom(b []byte) (n int, addr *UDPAddr, err error) {
+ n, _, _, addr, err = c.readMsg(b, nil)
+ return n, addr, err
+}
+
+func (c *UDPConn) readMsg(b, oob []byte) (n, oobn, flags int, addr *UDPAddr, err error) {
+ n, flags, address, err := c.fd.readMsg(b)
+ if err != nil {
+ return 0, 0, 0, nil, err
+ }
+ ip, port := socketAddrToIpPort(address)
+ addr = &UDPAddr{
+ IP: ip,
+ Port: port,
+ }
+ return n, 0, flags, addr, nil
+}
+
+func (c *UDPConn) writeTo(b []byte, addr *UDPAddr) (int, error) {
+ n, _, err := c.writeMsg(b, nil, addr)
+ return n, err
+}
+
+func (c *UDPConn) writeMsg(b, oob []byte, addr *UDPAddr) (n, oobn int, err error) {
+ if c.fd.isConnected && addr != nil {
+ return 0, 0, ErrWriteToConnected
+ }
+ if !c.fd.isConnected && addr == nil {
+ return 0, 0, errMissingAddress
+ }
+ if len(oob) > 0 {
+ return 0, 0, syscall.EFUCHSIA
+ }
+ if addr == nil {
+ n, err = c.fd.Write(b)
+ return n, 0, err
+ }
+ {
+ addr, err := addr.sockaddr(familyToDomain(c.fd.family))
+ if err != nil {
+ return 0, 0, err
+ }
+ n, err = c.fd.sendMsg(b, addr)
+ return n, 0, err
+ }
+}
+
+func (sd *sysDialer) dialUDP(ctx context.Context, laddr, raddr *UDPAddr) (*UDPConn, error) {
+ switch sd.network {
+ case "udp", "udp4", "udp6":
+ default:
+ return nil, UnknownNetworkError(sd.network)
+ }
+ if raddr == nil {
+ return nil, errMissingAddress
+ }
+ var laddrif sockaddr
+ if laddr != nil {
+ laddrif = laddr
+ }
+ fd, err := dialFuchsia(ctx, sd.network, laddrif, raddr)
+ if err != nil {
+ return nil, err
+ }
+ return newUDPConn(fd), nil
+}
+
+func (sl *sysListener) listenUDP(ctx context.Context, laddr *UDPAddr) (*UDPConn, error) {
+ var laddrif sockaddr
+ if laddr != nil {
+ laddrif = laddr
+ }
+ fd, err := dialFuchsia(ctx, sl.network, laddrif, nil)
+ if err != nil {
+ return nil, err
+ }
+ return newUDPConn(fd), nil
+}
+
+func (sl *sysListener) listenMulticastUDP(ctx context.Context, ifi *Interface, gaddr *UDPAddr) (*UDPConn, error) {
+ return nil, syscall.EFUCHSIA
+}
diff --git a/src/net/unixsock_fuchsia.go b/src/net/unixsock_fuchsia.go
new file mode 100644
index 0000000..1ed9304
--- /dev/null
+++ b/src/net/unixsock_fuchsia.go
@@ -0,0 +1,51 @@
+// 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 net
+
+import (
+ "context"
+ "os"
+ "syscall"
+)
+
+func (c *UnixConn) readFrom(b []byte) (int, *UnixAddr, error) {
+ return 0, nil, syscall.EFUCHSIA
+}
+
+func (c *UnixConn) readMsg(b, oob []byte) (n, oobn, flags int, addr *UnixAddr, err error) {
+ return 0, 0, 0, nil, syscall.EFUCHSIA
+}
+
+func (c *UnixConn) writeTo(b []byte, addr *UnixAddr) (int, error) {
+ return 0, syscall.EFUCHSIA
+}
+
+func (c *UnixConn) writeMsg(b, oob []byte, addr *UnixAddr) (n, oobn int, err error) {
+ return 0, 0, syscall.EFUCHSIA
+}
+
+func (sd *sysDialer) dialUnix(ctx context.Context, laddr, raddr *UnixAddr) (*UnixConn, error) {
+ return nil, syscall.EFUCHSIA
+}
+
+func (ln *UnixListener) accept() (*UnixConn, error) {
+ return nil, syscall.EFUCHSIA
+}
+
+func (ln *UnixListener) close() error {
+ return syscall.EFUCHSIA
+}
+
+func (ln *UnixListener) file() (*os.File, error) {
+ return nil, syscall.EFUCHSIA
+}
+
+func (sl *sysListener) listenUnix(ctx context.Context, laddr *UnixAddr) (*UnixListener, error) {
+ return nil, syscall.EFUCHSIA
+}
+
+func (sl *sysListener) listenUnixgram(ctx context.Context, laddr *UnixAddr) (*UnixConn, error) {
+ return nil, syscall.EFUCHSIA
+}
diff --git a/src/net/unixsock_test.go b/src/net/unixsock_test.go
index 4b2cfc4..b85e9ce 100644
--- a/src/net/unixsock_test.go
+++ b/src/net/unixsock_test.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !js,!plan9,!windows
+// +build !fuchsia,!js,!plan9,!windows
package net
diff --git a/src/net/writev_test.go b/src/net/writev_test.go
index c43be84..f349b17 100644
--- a/src/net/writev_test.go
+++ b/src/net/writev_test.go
@@ -102,6 +102,13 @@
}
func testBuffer_writeTo(t *testing.T, chunks int, useCopy bool) {
+ if runtime.GOOS == "fuchsia" {
+ if useCopy {
+ t.Skip("TODO(26919): fails on Fuchsia with ErrBadState")
+ } else {
+ t.Skip("TODO(26919): hangs on Fuchsia")
+ }
+ }
oldHook := poll.TestHookDidWritev
defer func() { poll.TestHookDidWritev = oldHook }()
var writeLog struct {
diff --git a/src/os/dir_unix.go b/src/os/dir_unix.go
index e0c4989..7f6d990 100644
--- a/src/os/dir_unix.go
+++ b/src/os/dir_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
package os
diff --git a/src/os/error_errno.go b/src/os/error_errno.go
index 31ae05a..7f5909c 100644
--- a/src/os/error_errno.go
+++ b/src/os/error_errno.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !plan9
+// +build !fuchsia,!plan9
package os
diff --git a/src/os/error_fuchsia.go b/src/os/error_fuchsia.go
new file mode 100644
index 0000000..7220bee
--- /dev/null
+++ b/src/os/error_fuchsia.go
@@ -0,0 +1,22 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package os
+
+import (
+ "syscall/zx"
+)
+
+type syscallErrorType = *zx.Error
+
+func wrapSyscallError(name string, err error) error {
+ if err, ok := err.(*zx.Error); ok {
+ text := name
+ if err.Text != "" {
+ text += ": " + err.Text
+ }
+ return &zx.Error{Status: err.Status, Text: text}
+ }
+ return err
+}
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go
index dafbc64..4f57421 100644
--- a/src/os/exec/exec_test.go
+++ b/src/os/exec/exec_test.go
@@ -43,6 +43,9 @@
if os.Getenv("GO_WANT_HELPER_PROCESS") == "1" {
return
}
+ if runtime.GOOS == "fuchsia" {
+ return
+ }
if runtime.GOOS == "windows" {
return
}
@@ -99,6 +102,9 @@
func TestCommandRelativeName(t *testing.T) {
testenv.MustHaveExec(t)
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("fdio_spawn_etc: -25: failed to load executable from test/go_exec_test: Could not open file")
+ }
// Run our own binary as a relative path
// (e.g. "_test/exec.test") our parent directory.
@@ -162,6 +168,9 @@
}
func TestCatGoodAndBadFile(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("tests don't have access to their own sources on fuchsia")
+ }
// Testing combined output and error values.
bs, err := helperCommand(t, "cat", "/bogus/file.foo", "exec_test.go").CombinedOutput()
if _, ok := err.(*exec.ExitError); !ok {
@@ -605,6 +614,9 @@
testenv.MustHaveExec(t)
testenv.MustHaveGoBuild(t)
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("FileListener is not supported on fuchsia")
+ }
if runtime.GOOS == "windows" {
t.Skipf("skipping test on %q", runtime.GOOS)
}
@@ -697,6 +709,9 @@
}
func TestExtraFilesRace(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("FileListener is not supported on fuchsia")
+ }
if runtime.GOOS == "windows" {
t.Skip("no operating system support; skipping")
}
diff --git a/src/os/exec/lp_unix.go b/src/os/exec/lp_unix.go
index 93793e0..95d63dd 100644
--- a/src/os/exec/lp_unix.go
+++ b/src/os/exec/lp_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
package exec
diff --git a/src/os/exec_cgo_fuchsia.go b/src/os/exec_cgo_fuchsia.go
new file mode 100644
index 0000000..442258f
--- /dev/null
+++ b/src/os/exec_cgo_fuchsia.go
@@ -0,0 +1,190 @@
+// 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 mod` ignores file names for the purpose of resolving
+// dependencies, and zxwait doesn't build on not-Fuchsia.
+// +build fuchsia
+
+package os
+
+// #cgo fuchsia CFLAGS: -I${SRCDIR}/../../../../../zircon/system/ulib/fdio/include
+// #cgo fuchsia LDFLAGS: -lfdio
+//
+// #include <lib/fdio/fd.h>
+// #include <lib/fdio/spawn.h>
+// #include <stdlib.h>
+// #include <unistd.h>
+// #include <zircon/syscalls/object.h>
+// #include <zircon/types.h>
+//
+// static int fsa_get_local_fd(fdio_spawn_action_t *fsa) { return fsa->fd.local_fd; }
+// static int fsa_get_target_fd(fdio_spawn_action_t *fsa) { return fsa->fd.target_fd; }
+//
+// static void fsa_set_local_fd(fdio_spawn_action_t *fsa, int fd) { fsa->fd.local_fd = fd; }
+// static void fsa_set_target_fd(fdio_spawn_action_t *fsa, int fd) { fsa->fd.target_fd = fd; }
+import "C"
+
+import (
+ "errors"
+ "syscall"
+ "syscall/zx"
+ "syscall/zx/zxwait"
+ "unsafe"
+)
+
+func makeCStringArray(s []string) []*C.char {
+ ret := make([]*C.char, len(s)+1)
+ for i, s := range s {
+ ret[i] = (*C.char)(C.CString(s))
+ }
+ ret[len(ret)-1] = nil
+ return ret
+}
+
+func freeCStringArray(a []*C.char) {
+ for i := range a {
+ if a[i] != nil {
+ C.free(unsafe.Pointer(a[i]))
+ }
+ }
+}
+
+// asLibfdioFD returns a File as a libfdio file descriptor.
+func asLibfdioFD(f *File) (int, error) {
+ m := syscall.FDIOForFD(int(f.Fd()))
+ if m == nil {
+ return -1, ErrInvalid
+ }
+
+ mCopy, err := m.Clone()
+ if err != nil {
+ return -1, err
+ }
+ handles := mCopy.Handles()
+
+ var fd C.int
+ status := zx.Status(C.fdio_fd_create(C.zx_handle_t(handles[0]), &fd))
+ if status != zx.ErrOk {
+ return -1, errors.New("fdio_fd_create failed")
+ }
+ return int(fd), nil
+}
+
+func fdioSpawnActions(attr *ProcAttr) (actions []C.fdio_spawn_action_t, err error) {
+ defer func() {
+ if err != nil {
+ for _, action := range actions {
+ C.close(C.fsa_get_local_fd(&action))
+ }
+ }
+ }()
+
+ for i, f := range attr.Files {
+ if f == nil {
+ continue
+ }
+ fd, err := asLibfdioFD(f)
+ if err != nil {
+ return nil, err
+ }
+ action := C.fdio_spawn_action_t{action: C.FDIO_SPAWN_ACTION_TRANSFER_FD}
+ C.fsa_set_local_fd(&action, C.int(fd))
+ C.fsa_set_target_fd(&action, C.int(i))
+ actions = append(actions, action)
+ }
+
+ return actions, nil
+}
+
+func fdioStartProcess(name string, argv []string, attr *ProcAttr) (zx.Handle, error) {
+ env := attr.Env
+ if env == nil {
+ env = Environ()
+ }
+ if attr.Dir != "" {
+ found := false
+ for i, s := range env {
+ const prefix = "PWD="
+ // strings.HasPrefix
+ if len(s) >= len(prefix) && s[:len(prefix)] == prefix {
+ found = true
+ env[i] = "PWD=" + attr.Dir
+ break
+ }
+ }
+ if !found {
+ env = append(env, "PWD="+attr.Dir)
+ }
+ }
+
+ nameC := C.CString(name)
+ defer C.free(unsafe.Pointer(nameC))
+ argvC := makeCStringArray(argv)
+ defer freeCStringArray(argvC)
+ envC := makeCStringArray(env)
+ defer freeCStringArray(envC)
+
+ actions, err := fdioSpawnActions(attr)
+ if err != nil {
+ return 0, err
+ }
+
+ var actions0 *C.fdio_spawn_action_t
+ if len(actions) > 0 {
+ actions0 = &actions[0]
+ }
+
+ var h C.zx_handle_t
+ var errmsg [C.FDIO_SPAWN_ERR_MSG_MAX_LENGTH]C.char
+ status := zx.Status(C.fdio_spawn_etc(
+ C.ZX_HANDLE_INVALID,
+ C.FDIO_SPAWN_CLONE_JOB|C.FDIO_SPAWN_DEFAULT_LDSVC|C.FDIO_SPAWN_CLONE_NAMESPACE, // TODO(mdempsky): Flags.
+ nameC,
+ &argvC[0],
+ &envC[0],
+ C.size_t(len(actions)),
+ actions0,
+ &h,
+ &errmsg[0],
+ ))
+ if status != zx.ErrOk {
+ return 0, errors.New("fdio_spawn_etc: " + itoa(int(status)) + ": " + charsAsString(errmsg[:]))
+ }
+ return zx.Handle(h), nil
+}
+
+func charsAsString(s []C.char) string {
+ var x []byte
+ for _, c := range s {
+ if c == 0 {
+ break
+ }
+ x = append(x, byte(c))
+ }
+ return string(x)
+}
+
+func (p *Process) kill() error {
+ procHandle := zx.Handle(p.handle)
+ status := zx.Sys_task_kill(procHandle)
+ if status != zx.ErrOk {
+ return errors.New("kill error: " + itoa(int(status)))
+ }
+ return nil
+}
+
+func (p *Process) wait() (ps *ProcessState, err error) {
+ procHandle := zx.Handle(p.handle)
+ _, err = zxwait.Wait(procHandle, zx.SignalTaskTerminated, zx.TimensecInfinite)
+ if err != nil {
+ return nil, err
+ }
+ procInfo := C.zx_info_process_t{}
+ status := zx.Sys_object_get_info(procHandle, zx.ObjectInfoProcess, unsafe.Pointer(&procInfo), C.sizeof_zx_info_process_t, nil, nil)
+ if status != zx.ErrOk {
+ return nil, errors.New("error retrieving process info: " + itoa(int(status)))
+ }
+ defer p.Release()
+ return &ProcessState{int(procInfo.return_code)}, nil
+}
diff --git a/src/os/exec_fuchsia.go b/src/os/exec_fuchsia.go
new file mode 100644
index 0000000..0486ab9
--- /dev/null
+++ b/src/os/exec_fuchsia.go
@@ -0,0 +1,99 @@
+// 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 os
+
+import (
+ "errors"
+ "runtime"
+ "sync/atomic"
+ "syscall/zx"
+ "time"
+)
+
+type ProcessState struct {
+ retCode int
+}
+
+func (p *ProcessState) exited() bool {
+ panic("TODO os.Exited")
+}
+
+func (p *ProcessState) Pid() int {
+ panic("TODO os.Pid")
+}
+
+func (p *ProcessState) String() string {
+ if p == nil {
+ return "<nil>"
+ }
+ return "exit status " + itoa(p.retCode)
+}
+
+func (p *ProcessState) ExitCode() int {
+ // return -1 if the process hasn't started.
+ if p == nil {
+ return -1
+ }
+ return p.retCode
+}
+
+func (p *ProcessState) success() bool {
+ return p.retCode == 0
+}
+
+func (p *ProcessState) sys() interface{} {
+ panic("TODO os.sys")
+}
+
+func (p *ProcessState) sysUsage() interface{} {
+ panic("TODO os.sysUsage")
+}
+
+func (p *ProcessState) systemTime() time.Duration {
+ panic("TODO os.systemTime")
+}
+
+func (p *ProcessState) userTime() time.Duration {
+ panic("TODO os.userTime")
+}
+
+func (p *Process) release() error {
+ h := atomic.SwapUintptr(&p.handle, uintptr(zx.HandleInvalid))
+ procHandle := zx.Handle(h)
+ if err := procHandle.Close(); err != nil {
+ return err
+ }
+ // no need for a finalizer anymore
+ runtime.SetFinalizer(p, nil)
+ return nil
+}
+
+func (p *Process) signal(sig Signal) error {
+ panic("TODO os.Process.signal")
+}
+
+func findProcess(pid int) (p *Process, err error) {
+ panic("TODO os.findProcess")
+}
+
+func startProcess(name string, argv []string, attr *ProcAttr) (p *Process, err error) {
+ h, err := fdioStartProcess(name, argv, attr)
+ if err != nil {
+ return nil, err
+ }
+ pid := 1 // TODO: what does this even mean for us?
+ return newProcess(pid, uintptr(h)), nil
+}
+
+func hostname() (name string, err error) {
+ return "", errors.New("os.hostname unimplemented")
+}
+
+type signal string
+
+func (s signal) String() string { return string(s) }
+func (s signal) Signal() {}
+
+var Interrupt = signal("signal_interrupt")
diff --git a/src/os/exec_stubs_fuchsia.go b/src/os/exec_stubs_fuchsia.go
new file mode 100644
index 0000000..f22f020
--- /dev/null
+++ b/src/os/exec_stubs_fuchsia.go
@@ -0,0 +1,21 @@
+// 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.
+
+// +build !cgo
+
+package os
+
+import "syscall/zx"
+
+func fdioStartProcess(name string, argv []string, attr *ProcAttr) (zx.Handle, error) {
+ panic("os.fdioStartProcess unimplemented")
+}
+
+func (p *Process) kill() error {
+ panic("os.Process.kill unimplemented")
+}
+
+func (p *Process) wait() (*ProcessState, error) {
+ panic("os.Process.wait unimplemented")
+}
diff --git a/src/os/executable_procfs.go b/src/os/executable_procfs.go
index 2628223..237cb5e 100644
--- a/src/os/executable_procfs.go
+++ b/src/os/executable_procfs.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux netbsd dragonfly js,wasm
+// +build fuchsia linux netbsd dragonfly js,wasm
package os
diff --git a/src/os/executable_test.go b/src/os/executable_test.go
index f25ee0c..36e3ba4 100644
--- a/src/os/executable_test.go
+++ b/src/os/executable_test.go
@@ -20,6 +20,9 @@
testenv.MustHaveExec(t)
ep, err := os.Executable()
if err != nil {
+ if runtime.GOOS == "fuchsia" {
+ t.Skipf("Executable failed on %s: %v, expected", runtime.GOOS, err) // TODO(dhobsd): rebase
+ }
t.Fatalf("Executable failed: %v", err)
}
// we want fn to be of the form "dir/prog"
diff --git a/src/os/file_posix.go b/src/os/file_posix.go
index 24ea554..c81c857 100644
--- a/src/os/file_posix.go
+++ b/src/os/file_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris windows
package os
diff --git a/src/os/file_unix.go b/src/os/file_unix.go
index f2c00ae..3885dcc 100644
--- a/src/os/file_unix.go
+++ b/src/os/file_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
package os
diff --git a/src/os/getwd.go b/src/os/getwd.go
index 6d25466..39a4fd2 100644
--- a/src/os/getwd.go
+++ b/src/os/getwd.go
@@ -24,7 +24,7 @@
// reached via multiple paths (due to symbolic links),
// Getwd may return any one of them.
func Getwd() (dir string, err error) {
- if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
+ if runtime.GOOS == "windows" || runtime.GOOS == "plan9" || runtime.GOOS == "fuchsia" {
return syscall.Getwd()
}
diff --git a/src/os/os_test.go b/src/os/os_test.go
index e8c6451..9bec354 100644
--- a/src/os/os_test.go
+++ b/src/os/os_test.go
@@ -26,15 +26,43 @@
"time"
)
-var dot = []string{
- "dir_unix.go",
- "env.go",
- "error.go",
- "file.go",
- "os_test.go",
- "types.go",
- "stat_darwin.go",
- "stat_linux.go",
+var dot = func() []string {
+ switch runtime.GOOS {
+ case "fuchsia":
+ return []string{
+ "go_os_test_foo",
+ "go_os_test_bar",
+ "go_os_test_baz",
+ }
+ default:
+ return []string{
+ "dir_unix.go",
+ "env.go",
+ "error.go",
+ "file.go",
+ "os_test.go",
+ "types.go",
+ "stat_darwin.go",
+ "stat_linux.go",
+ }
+ }
+}()
+
+func tmpInit(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ dir, err := ioutil.TempDir("", "")
+ if err != nil {
+ t.Fatalf("tempdir: %v", err)
+ }
+ for _, fname := range dot {
+ if err := MkdirAll(filepath.Join(dir, fname), ModePerm); err != nil {
+ t.Fatalf("Initializing tmp: %v", err)
+ }
+ }
+ if err := Chdir(dir); err != nil {
+ t.Fatalf("chdir: %v", err)
+ }
+ }
}
type sysDir struct {
@@ -44,6 +72,14 @@
var sysdir = func() *sysDir {
switch runtime.GOOS {
+ case "fuchsia":
+ return &sysDir{
+ "/pkg/lib",
+ []string{
+ "libfdio.so",
+ "ld.so.1",
+ },
+ }
case "android":
return &sysDir{
"/system/lib",
@@ -188,6 +224,9 @@
}
func TestStatError(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("TODO(dhobsd): fix")
+ }
defer chtmpdir(t)()
path := "no-such-file"
@@ -357,11 +396,13 @@
}
func TestReaddirnames(t *testing.T) {
+ tmpInit(t)
testReaddirnames(".", dot, t)
testReaddirnames(sysdir.name, sysdir.files, t)
}
func TestReaddir(t *testing.T) {
+ tmpInit(t)
testReaddir(".", dot, t)
testReaddir(sysdir.name, sysdir.files, t)
}
@@ -479,6 +520,8 @@
// big directory that doesn't change often.
dir := "/usr/bin"
switch runtime.GOOS {
+ case "fuchsia":
+ dir = "/boot/bin"
case "android":
dir = "/system/bin"
case "darwin":
@@ -1068,6 +1111,8 @@
switch runtime.GOOS {
case "android":
t.Skip("android doesn't have /bin/pwd")
+ case "fuchsia":
+ t.Skip("fuchsia doesn't have /bin/pwd")
case "windows":
cmd = Getenv("COMSPEC")
dir = Getenv("SystemRoot")
@@ -1101,8 +1146,8 @@
}
func TestChmod(t *testing.T) {
- // Chmod is not supported under windows.
- if runtime.GOOS == "windows" {
+ // Chmod is not supported under windows or Fuchsia
+ if runtime.GOOS == "windows" || runtime.GOOS == "fuchsia" {
return
}
f := newFile("TestChmod", t)
@@ -1175,6 +1220,11 @@
// On NFS, timings can be off due to caching of meta-data on
// NFS servers (Issue 848).
func TestChtimes(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ // It passes sometimes, but seems to be flakey
+ t.Skipf("TODO(smklein): Implement")
+ }
+
f := newFile("TestChtimes", t)
defer Remove(f.Name())
@@ -1189,6 +1239,11 @@
// On NFS, timings can be off due to caching of meta-data on
// NFS servers (Issue 848).
func TestChtimesDir(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ // It passes sometimes, but seems to be flakey
+ t.Skipf("TODO(smklein): Implement")
+ }
+
name := newDir("TestChtimes", t)
defer RemoveAll(name)
@@ -1220,7 +1275,7 @@
pmt := postStat.ModTime()
if !pat.Before(at) {
switch runtime.GOOS {
- case "plan9":
+ case "plan9", "fuchsia":
// Mtime is the time of the last change of
// content. Similarly, atime is set whenever
// the contents are accessed; also, it is set
@@ -1244,7 +1299,7 @@
func TestFileChdir(t *testing.T) {
// TODO(brainman): file.Chdir() is not implemented on windows.
- if runtime.GOOS == "windows" {
+ if runtime.GOOS == "windows" || runtime.GOOS == "fuchsia" {
return
}
@@ -1279,7 +1334,7 @@
func TestChdirAndGetwd(t *testing.T) {
// TODO(brainman): file.Chdir() is not implemented on windows.
- if runtime.GOOS == "windows" {
+ if runtime.GOOS == "windows" || runtime.GOOS == "fuchsia" {
return
}
fd, err := Open(".")
@@ -1523,6 +1578,10 @@
}
func TestOpenError(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skipf("TODO(smklein): Implement")
+ }
+
for _, tt := range openErrorTests {
f, err := OpenFile(tt.path, tt.mode, 0)
if err == nil {
@@ -1624,6 +1683,10 @@
}
func TestHostname(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skipf("TODO(dho): Implement")
+ }
+
hostname, err := Hostname()
if err != nil {
t.Fatal(err)
@@ -1862,6 +1925,10 @@
}
func TestSameFile(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skipf("TODO(smklein): Implement")
+ }
+
defer chtmpdir(t)()
fa, err := Create("a")
if err != nil {
@@ -1910,13 +1977,13 @@
if fi.Size() != 0 {
t.Errorf(pre+"wrong file size have %d want 0", fi.Size())
}
- if fi.Mode()&ModeDevice == 0 {
+ if fi.Mode()&ModeDevice == 0 && runtime.GOOS != "fuchsia" {
t.Errorf(pre+"wrong file mode %q: ModeDevice is not set", fi.Mode())
}
if fi.Mode()&ModeCharDevice == 0 {
t.Errorf(pre+"wrong file mode %q: ModeCharDevice is not set", fi.Mode())
}
- if fi.Mode().IsRegular() {
+ if fi.Mode().IsRegular() && runtime.GOOS != "fuchsia" {
t.Errorf(pre+"wrong file mode %q: IsRegular returns true", fi.Mode())
}
}
@@ -1973,6 +2040,10 @@
}
func TestStatDirModeExec(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skipf("TODO(smklein): Implement")
+ }
+
const mode = 0111
path, err := ioutil.TempDir("", "go-build")
@@ -1996,7 +2067,8 @@
func TestStatStdin(t *testing.T) {
switch runtime.GOOS {
- case "android", "plan9":
+ case "android", "plan9", "fuchsia":
+ // TODO(smklein): Implement on Fuchsia
t.Skipf("%s doesn't have /bin/sh", runtime.GOOS)
}
@@ -2112,6 +2184,10 @@
}
func TestLongPath(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skipf("no chmod support on fuchsia")
+ }
+
tmpdir := newDir("TestLongPath", t)
defer func(d string) {
if err := RemoveAll(d); err != nil {
@@ -2223,6 +2299,9 @@
// TODO: golang.org/issue/8206
t.Skipf("skipping test on plan9; see issue 8206")
}
+ if runtime.GOOS == "fuchsia" {
+ t.Skipf("TODO(smklein): Implement")
+ }
testenv.MustHaveExec(t)
@@ -2248,6 +2327,10 @@
}
func TestKillFindProcess(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skipf("TODO(smklein): Implement")
+ }
+
testKillProcess(t, func(p *Process) {
p2, err := FindProcess(p.Pid)
if err != nil {
@@ -2283,6 +2366,10 @@
// Test that all File methods give ErrInvalid if the receiver is nil.
func TestNilFileMethods(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skipf("TODO(smklein): Implement")
+ }
+
for _, tt := range nilFileMethodTests {
var file *File
got := tt.f(file)
@@ -2354,6 +2441,8 @@
t.Skip("skipping on Plan 9; does not support runtime poller")
case "js":
t.Skip("skipping on js; no support for os.Pipe")
+ case "fuchsia":
+ t.Skip("skipping on fuchsia; TODO")
}
threads := 100
@@ -2504,6 +2593,9 @@
if runtime.GOOS == "windows" {
testenv.SkipFlaky(t, 36019)
}
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("fuchsia cannot expose testdata; directories can't be resources")
+ }
wd, err := Getwd()
if err != nil {
t.Fatal(err)
diff --git a/src/os/path_test.go b/src/os/path_test.go
index d586daf..73cafbb 100644
--- a/src/os/path_test.go
+++ b/src/os/path_test.go
@@ -105,7 +105,7 @@
func TestMkdirAllAtSlash(t *testing.T) {
switch runtime.GOOS {
- case "android", "plan9", "windows":
+ case "android", "fuchsia", "plan9", "windows":
t.Skipf("skipping on %s", runtime.GOOS)
case "darwin":
switch runtime.GOARCH {
diff --git a/src/os/path_unix.go b/src/os/path_unix.go
index c99a824..984eff2 100644
--- a/src/os/path_unix.go
+++ b/src/os/path_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
package os
diff --git a/src/os/pipe_fuchsia.go b/src/os/pipe_fuchsia.go
new file mode 100644
index 0000000..5c2e933
--- /dev/null
+++ b/src/os/pipe_fuchsia.go
@@ -0,0 +1,25 @@
+// 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 mod` ignores file names for the purpose of resolving
+// dependencies, and fdio doesn't build on not-Fuchsia.
+// +build fuchsia
+
+package os
+
+import (
+ "syscall"
+ "syscall/zx/fdio"
+)
+
+func Pipe() (r *File, w *File, err error) {
+ p0, p1, err := fdio.NewPipes()
+ if err != nil {
+ return nil, nil, err
+ }
+ r = NewFile(uintptr(syscall.OpenFDIO(p0)), "|0")
+ w = NewFile(uintptr(syscall.OpenFDIO(p1)), "|1")
+ // TODO CloseOnExec equivalent
+ return r, w, nil
+}
diff --git a/src/os/pipe_test.go b/src/os/pipe_test.go
index 429bd81..fcaab1b 100644
--- a/src/os/pipe_test.go
+++ b/src/os/pipe_test.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Test broken pipes on Unix systems.
-// +build !plan9,!js
+// +build !fuchsia,!plan9,!js
package os_test
diff --git a/src/os/rawconn_test.go b/src/os/rawconn_test.go
index 2554f5b..44824dd 100644
--- a/src/os/rawconn_test.go
+++ b/src/os/rawconn_test.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// Test use of raw connections.
-// +build !plan9,!js
+// +build !plan9,!js,!fuchsia
package os_test
diff --git a/src/os/removeall_test.go b/src/os/removeall_test.go
index 8a71f68..cbe3104 100644
--- a/src/os/removeall_test.go
+++ b/src/os/removeall_test.go
@@ -455,6 +455,8 @@
return
}
t.Fatal("RemoveAll(<read-only directory>) = nil; want error")
+ } else if runtime.GOOS == "fuchsia" {
+ t.Fatal(err)
}
dir, err := Open(path)
diff --git a/src/os/signal/signal_fuchsia.go b/src/os/signal/signal_fuchsia.go
new file mode 100644
index 0000000..0d4e736
--- /dev/null
+++ b/src/os/signal/signal_fuchsia.go
@@ -0,0 +1,29 @@
+// 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 signal
+
+import "os"
+
+const numSig = 65
+
+func signum(sig os.Signal) int {
+ panic("TODO")
+}
+
+func enableSignal(sig int) {
+ panic("TODO")
+}
+
+func disableSignal(sig int) {
+ panic("TODO")
+}
+
+func ignoreSignal(sig int) {
+ panic("TODO")
+}
+
+func signalIgnored(sig int) bool {
+ panic("TODO")
+}
diff --git a/src/os/stat_fuchsia.go b/src/os/stat_fuchsia.go
new file mode 100644
index 0000000..fb67df3
--- /dev/null
+++ b/src/os/stat_fuchsia.go
@@ -0,0 +1,36 @@
+// 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 os
+
+import (
+ "time"
+)
+
+func fillFileStatFromSys(fs *fileStat, name string) {
+ fs.name = basename(name)
+ fs.size = int64(fs.sys.Size)
+ // For now, pretend files have all bits. This should really be:
+ // fs.mode = FileMode(fs.sys.Dev & 0777)
+ // but we don't really set file modes properly and testing for executables
+ // in $PATH fails without the x bit set.
+ fs.mode = FileMode(0766)
+
+ switch fs.sys.Dev & 0xf000 {
+ case 0x4000:
+ fs.mode = fs.mode | ModeDir
+ case 0x2000:
+ fs.mode = fs.mode | ModeCharDevice
+ case 0xa000:
+ fs.mode = fs.mode | ModeSymlink
+ case 0xc000:
+ fs.mode = fs.mode | ModeSocket
+ }
+ fs.modTime = time.Unix(int64(fs.sys.ModifyTime), 0)
+}
+
+func atime(fi FileInfo) time.Time {
+ // TODO: fdio doesn't have atime yet
+ return time.Time{}
+}
diff --git a/src/os/stat_unix.go b/src/os/stat_unix.go
index 0a7e602..c688cc4 100644
--- a/src/os/stat_unix.go
+++ b/src/os/stat_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
package os
diff --git a/src/os/sys_unix.go b/src/os/sys_unix.go
index 8491bad..e06bed5 100644
--- a/src/os/sys_unix.go
+++ b/src/os/sys_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
package os
diff --git a/src/os/timeout_test.go b/src/os/timeout_test.go
index 99b94c2..13f029b 100644
--- a/src/os/timeout_test.go
+++ b/src/os/timeout_test.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// +build !fuchsia
// +build !js
// +build !plan9
// +build !windows
diff --git a/src/os/user/lookup_fuchsia.go b/src/os/user/lookup_fuchsia.go
new file mode 100644
index 0000000..87ee40a
--- /dev/null
+++ b/src/os/user/lookup_fuchsia.go
@@ -0,0 +1,36 @@
+// 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 user
+
+import "errors"
+
+func init() {
+ userImplemented = false
+ groupImplemented = false
+}
+
+func current() (*User, error) {
+ return nil, errors.New("user: Current not implemented on fuchsia")
+}
+
+func lookupUser(string) (*User, error) {
+ return nil, errors.New("user: Lookup not implemented on fuchsia")
+}
+
+func lookupUserId(string) (*User, error) {
+ return nil, errors.New("user: LookupId not implemented on fuchsia")
+}
+
+func lookupGroup(string) (*Group, error) {
+ return nil, errors.New("user: LookupGroup not implemented on fuchsia")
+}
+
+func lookupGroupId(string) (*Group, error) {
+ return nil, errors.New("user: LookupGroupId not implemented on fuchsia")
+}
+
+func listGroups(*User) ([]string, error) {
+ return nil, errors.New("user: GroupIds not implemented on fuchsia")
+}
diff --git a/src/os/user/lookup_stubs.go b/src/os/user/lookup_stubs.go
index 178d814..9b67527 100644
--- a/src/os/user/lookup_stubs.go
+++ b/src/os/user/lookup_stubs.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// +build !cgo,!windows,!plan9 android osusergo,!windows,!plan9
+// +build !fuchsia
package user
diff --git a/src/path/filepath/path_unix.go b/src/path/filepath/path_unix.go
index ec497d9..8bdcf95 100644
--- a/src/path/filepath/path_unix.go
+++ b/src/path/filepath/path_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
package filepath
diff --git a/src/runtime/asm_amd64.s b/src/runtime/asm_amd64.s
index fa25c55..0321dd8 100644
--- a/src/runtime/asm_amd64.s
+++ b/src/runtime/asm_amd64.s
@@ -179,6 +179,9 @@
// skip TLS setup on Darwin
JMP ok
#endif
+#ifdef GOOS_fuchsia
+ // TODO(dhobsd): Fuchsia needs thread handle.
+#endif
LEAQ runtime·m0+m_tls(SB), DI
CALL runtime·settls(SB)
@@ -871,6 +874,7 @@
CALL runtime·abort(SB)
RET
+#ifndef GOOS_fuchsia
// func cputicks() int64
TEXT runtime·cputicks(SB),NOSPLIT,$0-0
CMPB runtime·lfenceBeforeRdtsc(SB), $1
@@ -885,6 +889,7 @@
ADDQ DX, AX
MOVQ AX, ret+0(FP)
RET
+#endif
// func memhash(p unsafe.Pointer, h, s uintptr) uintptr
// hash function using AES hardware instructions
diff --git a/src/runtime/cgo/cgo.go b/src/runtime/cgo/cgo.go
index c02b837..1d1fecb 100644
--- a/src/runtime/cgo/cgo.go
+++ b/src/runtime/cgo/cgo.go
@@ -15,6 +15,7 @@
#cgo darwin,arm64 LDFLAGS: -framework CoreFoundation
#cgo dragonfly LDFLAGS: -lpthread
#cgo freebsd LDFLAGS: -lpthread
+#cgo fuchsia LDFLAGS: -lpthread -lfdio
#cgo android LDFLAGS: -llog
#cgo !android,linux LDFLAGS: -lpthread
#cgo netbsd LDFLAGS: -lpthread
@@ -25,7 +26,9 @@
// Issue 35247.
#cgo darwin CFLAGS: -Wno-nullability-completeness
-#cgo CFLAGS: -Wall -Werror
+// TODO(INTK-705): Remove darwin CFLAGS hack when we figure out the cause of these failures on Mac
+#cgo !darwin CFLAGS: -Wall -Werror
+#cgo darwin CFLAGS: -Wall -Wno-unused-command-line-argument -Werror
#cgo solaris CPPFLAGS: -D_POSIX_PTHREAD_SEMANTICS
diff --git a/src/runtime/cgo/fuchsia.go b/src/runtime/cgo/fuchsia.go
new file mode 100644
index 0000000..42fc3b9
--- /dev/null
+++ b/src/runtime/cgo/fuchsia.go
@@ -0,0 +1,21 @@
+// 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.
+
+// +build fuchsia
+
+package cgo
+
+import _ "unsafe" // for go:linkname
+
+//go:cgo_import_static x_cgo_get_initial_handles
+//go:linkname x_cgo_get_initial_handles x_cgo_get_initial_handles
+//go:linkname _cgo_get_initial_handles runtime._cgo_get_initial_handles
+var x_cgo_get_initial_handles byte
+var _cgo_get_initial_handles = &x_cgo_get_initial_handles
+
+//go:cgo_import_static x_cgo_get_thread_self_handle
+//go:linkname x_cgo_get_thread_self_handle x_cgo_get_thread_self_handle
+//go:linkname _cgo_get_thread_self_handle runtime._cgo_get_thread_self_handle
+var x_cgo_get_thread_self_handle byte
+var _cgo_get_thread_self_handle = &x_cgo_get_thread_self_handle
diff --git a/src/runtime/cgo/gcc_context.c b/src/runtime/cgo/gcc_context.c
index 5fc0abb..e9797bd 100644
--- a/src/runtime/cgo/gcc_context.c
+++ b/src/runtime/cgo/gcc_context.c
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build cgo
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris windows
#include "libcgo.h"
diff --git a/src/runtime/cgo/gcc_fatalf.c b/src/runtime/cgo/gcc_fatalf.c
index 597e750..fa75fe8 100644
--- a/src/runtime/cgo/gcc_fatalf.c
+++ b/src/runtime/cgo/gcc_fatalf.c
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix !android,linux freebsd
+// +build aix !android,linux freebsd fuchsia
#include <stdarg.h>
#include <stdio.h>
diff --git a/src/runtime/cgo/gcc_fuchsia.c b/src/runtime/cgo/gcc_fuchsia.c
new file mode 100644
index 0000000..59645e3
--- /dev/null
+++ b/src/runtime/cgo/gcc_fuchsia.c
@@ -0,0 +1,83 @@
+// 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.
+
+// +build cgo
+
+#include <lib/fdio/fd.h>
+#include <lib/fdio/namespace.h>
+#include <pthread.h>
+#include <stdlib.h>
+#include <zircon/process.h>
+#include <zircon/processargs.h>
+#include <zircon/threads.h>
+#include <zircon/types.h>
+
+#include "libcgo.h"
+
+extern char** environ;
+
+// fdio_init matches a Go struct of the same name in os_fuchsia.go.
+struct fdio_init {
+ zx_handle_t stdioClones[3];
+ uint32_t stdioCloneNumHandles[3];
+ uint32_t stdioCloneTypes[3];
+ zx_handle_t processSelf;
+ zx_handle_t vmarRootSelf;
+ int32_t envlen;
+ char** environ;
+ uint8_t padding[4];
+ int32_t rootNSNumHandles;
+ zx_handle_t* rootNSHandles;
+ char** rootNSPaths;
+};
+
+void x_cgo_get_initial_handles(struct fdio_init* handles) {
+ // When running with cgo support, there are two FDIO libraries in the
+ // same process. We let the C FDIO start first, then clone its namespace
+ // and use that for Go.
+ // TODO: there is some small amount of fdio library state we
+ // have to share between Go and C, in particular, cwd.
+ // Work out how.
+
+ // fdio may have initialized std{in,out,err} with a single fd if the FDIO_FLAG_USE_FOR_STDIO
+ // flag was set, or have separate in/out/err fds. We clone fds {0,1,2} to separate fds for use
+ // in the Go runtime. The cloned fds aren't installed into fdio's fd table so they are only
+ // usable from Go's table.
+ for (int i = 0; i < 3; ++i) {
+ zx_status_t status = fdio_fd_clone(i, &handles->stdioClones[i]);
+ if (status != ZX_OK) {
+ printf("runtime/cgo: fdio_fd_clone of stdio[%d] failed: %d\n", i, status);
+ handles->stdioCloneNumHandles[i] = 0;
+ } else {
+ handles->stdioCloneNumHandles[i] = 1;
+ handles->stdioCloneTypes[i] = PA_FD;
+ }
+ }
+
+ handles->processSelf = zx_process_self();
+ handles->vmarRootSelf = zx_vmar_root_self();
+
+ for (char** env = environ; *env; env++) {
+ handles->envlen++;
+ }
+ handles->environ = environ;
+
+ fdio_flat_namespace_t* root_ns = NULL;
+ zx_status_t status = fdio_ns_export_root(&root_ns);
+ if (status != ZX_OK) {
+ handles->rootNSNumHandles = 0;
+ handles->rootNSHandles = NULL;
+ handles->rootNSPaths = NULL;
+ } else {
+ handles->rootNSNumHandles = (int32_t)root_ns->count;
+ handles->rootNSHandles = root_ns->handle;
+ handles->rootNSPaths = (char**)root_ns->path;
+ }
+}
+
+void x_cgo_get_thread_self_handle(zx_handle_t* h) {
+ // N.B.: libc currently (and probably always will) share the same type for
+ // C11 threads and pthreads.
+ *h = thrd_get_zx_handle(pthread_self());
+}
diff --git a/src/runtime/cgo/gcc_fuchsia_amd64.c b/src/runtime/cgo/gcc_fuchsia_amd64.c
new file mode 100644
index 0000000..ae65662
--- /dev/null
+++ b/src/runtime/cgo/gcc_fuchsia_amd64.c
@@ -0,0 +1,52 @@
+// 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.
+
+#include <pthread.h>
+#include <errno.h>
+#include <string.h> // strerror
+#include <signal.h>
+#include <stdlib.h>
+#include "libcgo.h"
+
+static void* threadentry(void*);
+static void (*setg_gcc)(void*);
+
+void
+x_cgo_init(G* g, void (*setg)(void*))
+{
+ setg_gcc = setg;
+}
+
+void
+_cgo_sys_thread_start(ThreadStart *ts)
+{
+ // TODO: switch to threads.h.
+ pthread_attr_t attr;
+ pthread_t p;
+ size_t size;
+ int err;
+
+ pthread_attr_init(&attr);
+ pthread_attr_getstacksize(&attr, &size);
+ // leave stacklo=0 and set stackhi=size; mstack will do the rest.
+ ts->g->stackhi = size;
+ err = pthread_create(&p, &attr, threadentry, ts);
+
+ if (err != 0) {
+ fatalf("pthread_create failed: %s", strerror(err));
+ }
+}
+
+static void*
+threadentry(void *v)
+{
+ ThreadStart ts;
+
+ ts = *(ThreadStart*)v;
+ free(v);
+ setg_gcc((void*)ts.g);
+
+ crosscall_amd64(ts.fn);
+ return 0;
+}
diff --git a/src/runtime/cgo/gcc_fuchsia_arm64.c b/src/runtime/cgo/gcc_fuchsia_arm64.c
new file mode 100644
index 0000000..e79d192
--- /dev/null
+++ b/src/runtime/cgo/gcc_fuchsia_arm64.c
@@ -0,0 +1,53 @@
+// 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.
+
+#include <pthread.h>
+#include <errno.h>
+#include <string.h> // strerror
+#include <signal.h>
+#include <stdlib.h>
+#include "libcgo.h"
+
+#include <stdio.h>
+
+static void* threadentry(void*);
+static void (*setg_gcc)(void*);
+
+void
+x_cgo_init(G* g, void (*setg)(void*))
+{
+ setg_gcc = setg;
+}
+
+void
+_cgo_sys_thread_start(ThreadStart *ts)
+{
+ pthread_attr_t attr;
+ pthread_t p;
+ size_t size;
+ int err;
+
+ pthread_attr_init(&attr);
+ pthread_attr_getstacksize(&attr, &size);
+ // leave stacklo=0 and set stackhi=size; mstack will do the rest.
+ ts->g->stackhi = size;
+ err = pthread_create(&p, &attr, threadentry, ts);
+
+ if (err != 0) {
+ fatalf("pthread_create failed: %s", strerror(err));
+ }
+}
+
+extern void crosscall1(void (*fn)(void), void (*setg_gcc)(void*), void *g);
+static void*
+threadentry(void *v)
+{
+ ThreadStart ts;
+
+ ts = *(ThreadStart*)v;
+ free(v);
+
+ crosscall1(ts.fn, setg_gcc, (void*)ts.g);
+ return 0;
+}
diff --git a/src/runtime/cgo/gcc_libinit.c b/src/runtime/cgo/gcc_libinit.c
index 3304d95..ad9e040 100644
--- a/src/runtime/cgo/gcc_libinit.c
+++ b/src/runtime/cgo/gcc_libinit.c
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build cgo
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
#include <pthread.h>
#include <errno.h>
diff --git a/src/runtime/cgo/gcc_setenv.c b/src/runtime/cgo/gcc_setenv.c
index d4f7983..81e2080 100644
--- a/src/runtime/cgo/gcc_setenv.c
+++ b/src/runtime/cgo/gcc_setenv.c
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build cgo
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
#include "libcgo.h"
diff --git a/src/runtime/cgo/setenv.go b/src/runtime/cgo/setenv.go
index 6495fcb..76621e5 100644
--- a/src/runtime/cgo/setenv.go
+++ b/src/runtime/cgo/setenv.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia linux netbsd openbsd solaris
package cgo
diff --git a/src/runtime/cputicks.go b/src/runtime/cputicks.go
index 7beb57e..e58d4c7 100644
--- a/src/runtime/cputicks.go
+++ b/src/runtime/cputicks.go
@@ -9,6 +9,7 @@
// +build !mips
// +build !mipsle
// +build !wasm
+// +build !fuchsia
package runtime
diff --git a/src/runtime/defs_fuchsia_amd64.go b/src/runtime/defs_fuchsia_amd64.go
new file mode 100644
index 0000000..7c5b9ac
--- /dev/null
+++ b/src/runtime/defs_fuchsia_amd64.go
@@ -0,0 +1,32 @@
+// 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 runtime
+
+type generalRegs struct {
+ rax uint64
+ rbx uint64
+ rcx uint64
+ rdx uint64
+ rsi uint64
+ rdi uint64
+ rbp uint64
+ rsp uint64
+ r8 uint64
+ r9 uint64
+ r10 uint64
+ r11 uint64
+ r12 uint64
+ r13 uint64
+ r14 uint64
+ r15 uint64
+ rip uint64
+ rflags uint64
+ fs_base uint64
+ gs_base uint64
+}
+
+func (r *generalRegs) rPC() uintptr { return uintptr(r.rip) }
+func (r *generalRegs) rSP() uintptr { return uintptr(r.rsp) }
+func (r *generalRegs) rLR() uintptr { return 0 }
diff --git a/src/runtime/defs_fuchsia_arm64.go b/src/runtime/defs_fuchsia_arm64.go
new file mode 100644
index 0000000..0daffac
--- /dev/null
+++ b/src/runtime/defs_fuchsia_arm64.go
@@ -0,0 +1,18 @@
+// 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 runtime
+
+type generalRegs struct {
+ r [30]uint64
+ lr uint64
+ sp uint64
+ pc uint64
+ cpsr uint64
+ tpidr uint64
+}
+
+func (r *generalRegs) rPC() uintptr { return uintptr(r.pc) }
+func (r *generalRegs) rSP() uintptr { return uintptr(r.sp) }
+func (r *generalRegs) rLR() uintptr { return uintptr(r.lr) }
diff --git a/src/runtime/env_posix.go b/src/runtime/env_posix.go
index af353bb..50740bd 100644
--- a/src/runtime/env_posix.go
+++ b/src/runtime/env_posix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris windows plan9
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris windows plan9
package runtime
diff --git a/src/runtime/gc_test.go b/src/runtime/gc_test.go
index c5c8a4c..8646297 100644
--- a/src/runtime/gc_test.go
+++ b/src/runtime/gc_test.go
@@ -21,6 +21,8 @@
)
func TestGcSys(t *testing.T) {
+ t.Skip("flaky test; https://github.com/golang/go/issues/37331")
+
if os.Getenv("GOGC") == "off" {
t.Skip("skipping test; GOGC=off in environment")
}
diff --git a/src/runtime/internal/sys/zgoos_aix.go b/src/runtime/internal/sys/zgoos_aix.go
index d97485c..873a3d5 100644
--- a/src/runtime/internal/sys/zgoos_aix.go
+++ b/src/runtime/internal/sys/zgoos_aix.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_android.go b/src/runtime/internal/sys/zgoos_android.go
index eec970b..6c4a4b9 100644
--- a/src/runtime/internal/sys/zgoos_android.go
+++ b/src/runtime/internal/sys/zgoos_android.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_darwin.go b/src/runtime/internal/sys/zgoos_darwin.go
index c40819e..89a7a01 100644
--- a/src/runtime/internal/sys/zgoos_darwin.go
+++ b/src/runtime/internal/sys/zgoos_darwin.go
@@ -11,6 +11,7 @@
const GoosDarwin = 1
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_dragonfly.go b/src/runtime/internal/sys/zgoos_dragonfly.go
index 3dc4edc..f1529d1 100644
--- a/src/runtime/internal/sys/zgoos_dragonfly.go
+++ b/src/runtime/internal/sys/zgoos_dragonfly.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 1
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_freebsd.go b/src/runtime/internal/sys/zgoos_freebsd.go
index 6c98b34..57c56a5 100644
--- a/src/runtime/internal/sys/zgoos_freebsd.go
+++ b/src/runtime/internal/sys/zgoos_freebsd.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 1
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_fuchsia.go b/src/runtime/internal/sys/zgoos_fuchsia.go
new file mode 100644
index 0000000..8d65037
--- /dev/null
+++ b/src/runtime/internal/sys/zgoos_fuchsia.go
@@ -0,0 +1,23 @@
+// Code generated by gengoos.go using 'go generate'. DO NOT EDIT.
+
+package sys
+
+const GOOS = `fuchsia`
+
+const GoosAix = 0
+const GoosAndroid = 0
+const GoosDarwin = 0
+const GoosDragonfly = 0
+const GoosFreebsd = 0
+const GoosFuchsia = 1
+const GoosHurd = 0
+const GoosIllumos = 0
+const GoosJs = 0
+const GoosLinux = 0
+const GoosNacl = 0
+const GoosNetbsd = 0
+const GoosOpenbsd = 0
+const GoosPlan9 = 0
+const GoosSolaris = 0
+const GoosWindows = 0
+const GoosZos = 0
diff --git a/src/runtime/internal/sys/zgoos_hurd.go b/src/runtime/internal/sys/zgoos_hurd.go
index d6dcc7b..546a643 100644
--- a/src/runtime/internal/sys/zgoos_hurd.go
+++ b/src/runtime/internal/sys/zgoos_hurd.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 1
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_illumos.go b/src/runtime/internal/sys/zgoos_illumos.go
index 17f4ecc..5d2d9cd 100644
--- a/src/runtime/internal/sys/zgoos_illumos.go
+++ b/src/runtime/internal/sys/zgoos_illumos.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 1
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_js.go b/src/runtime/internal/sys/zgoos_js.go
index 74c9943..f9dfa98 100644
--- a/src/runtime/internal/sys/zgoos_js.go
+++ b/src/runtime/internal/sys/zgoos_js.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 1
diff --git a/src/runtime/internal/sys/zgoos_linux.go b/src/runtime/internal/sys/zgoos_linux.go
index 1d5fcb0..bc11259 100644
--- a/src/runtime/internal/sys/zgoos_linux.go
+++ b/src/runtime/internal/sys/zgoos_linux.go
@@ -12,6 +12,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_netbsd.go b/src/runtime/internal/sys/zgoos_netbsd.go
index 194fa6e..3051619 100644
--- a/src/runtime/internal/sys/zgoos_netbsd.go
+++ b/src/runtime/internal/sys/zgoos_netbsd.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_openbsd.go b/src/runtime/internal/sys/zgoos_openbsd.go
index 2108691..efab0c0 100644
--- a/src/runtime/internal/sys/zgoos_openbsd.go
+++ b/src/runtime/internal/sys/zgoos_openbsd.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_plan9.go b/src/runtime/internal/sys/zgoos_plan9.go
index e632a90..ff96351 100644
--- a/src/runtime/internal/sys/zgoos_plan9.go
+++ b/src/runtime/internal/sys/zgoos_plan9.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_solaris.go b/src/runtime/internal/sys/zgoos_solaris.go
index 67b2ffb..034684b 100644
--- a/src/runtime/internal/sys/zgoos_solaris.go
+++ b/src/runtime/internal/sys/zgoos_solaris.go
@@ -12,6 +12,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_windows.go b/src/runtime/internal/sys/zgoos_windows.go
index cf2d6f4..9c21e84 100644
--- a/src/runtime/internal/sys/zgoos_windows.go
+++ b/src/runtime/internal/sys/zgoos_windows.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/internal/sys/zgoos_zos.go b/src/runtime/internal/sys/zgoos_zos.go
index e5d79ac..f8017fb 100644
--- a/src/runtime/internal/sys/zgoos_zos.go
+++ b/src/runtime/internal/sys/zgoos_zos.go
@@ -11,6 +11,7 @@
const GoosDarwin = 0
const GoosDragonfly = 0
const GoosFreebsd = 0
+const GoosFuchsia = 0
const GoosHurd = 0
const GoosIllumos = 0
const GoosJs = 0
diff --git a/src/runtime/lock_futex.go b/src/runtime/lock_futex.go
index 91467fd..1f0fc6b 100644
--- a/src/runtime/lock_futex.go
+++ b/src/runtime/lock_futex.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build dragonfly freebsd linux
+// +build dragonfly freebsd fuchsia linux
package runtime
diff --git a/src/runtime/mem_fuchsia.go b/src/runtime/mem_fuchsia.go
new file mode 100644
index 0000000..0592f99
--- /dev/null
+++ b/src/runtime/mem_fuchsia.go
@@ -0,0 +1,131 @@
+// 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 runtime
+
+import (
+ "unsafe"
+)
+
+const (
+ permRead = 1 << 0
+ permWrite = 1 << 1
+
+ propName = 3
+
+ // The VMO opcode to decommit pages (ZX_VMO_OP_DECOMMIT).
+ vmoOpDecommit = 2
+
+ // The name assigned to VMOs.
+ vmoNameProp = "go-runtime-heap-vmo"
+)
+
+//go:linkname sys_vmar_unmap syscall/zx.Sys_vmar_unmap
+func sys_vmar_unmap(h uint32, addr unsafe.Pointer, l uint64) int32
+
+//go:linkname sys_vmo_create syscall/zx.Sys_vmo_create
+//go:noescape
+func sys_vmo_create(size uint64, options uint32, out *uint32) int32
+
+//go:linkname sys_object_set_property syscall/zx.Sys_object_set_property
+//go:noescape
+func sys_object_set_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+
+//go:linkname sys_vmar_map syscall/zx.Sys_vmar_map
+//go:noescape
+func sys_vmar_map(handle uint32, options uint32, vmar_offset uint64, vmo uint32, vmo_offset uint64, len uint64, mapped_addr *unsafe.Pointer) int32
+
+//go:linkname sys_vmar_op_range syscall/zx.Sys_vmar_op_range
+//go:noescape
+func sys_vmar_op_range(handle uint32, op uint32, addr uint64, size uint64, buffer unsafe.Pointer, buffer_size uint64) int32
+
+//go:linkname sys_handle_close syscall/zx.Sys_handle_close
+//go:noescape
+func sys_handle_close(handle uint32) int32
+
+//go:linkname sys_vmar_protect syscall/zx.Sys_vmar_protect
+func sys_vmar_protect(handle uint32, options uint32, addr unsafe.Pointer, len uint64) int32
+
+//go:nosplit
+func sysAlloc(n uintptr, sysStat *uint64) unsafe.Pointer {
+ var p unsafe.Pointer
+ sysMmap(unsafe.Pointer(&p), n, permRead|permWrite)
+ if uintptr(p) < 4096 {
+ println("runtime: sysMmap failed n=", n)
+ exit(2)
+ }
+ mSysStatInc(sysStat, n)
+ return p
+}
+
+func sysUnused(v unsafe.Pointer, n uintptr) {
+ if status := sys_vmar_op_range(fdioHandles.vmarRootSelf, vmoOpDecommit, uint64(uintptr(v)), uint64(n), nil, 0); status != 0 {
+ println("runtime: sys_vmar_op_range failed: ", status)
+ exit(2)
+ }
+}
+
+func sysUsed(v unsafe.Pointer, n uintptr) {
+ // TODO(dho): Maybe implement this based on ZX_VMO_OP_COMMIT
+ //
+ // Note, pages are committed (allocated) for VMOs on demand, as per
+ // https://fuchsia.dev/fuchsia-src/reference/kernel_objects/vm_object#description.
+ // Also, note that sys_vmar_op_range does not yet support ZX_VMO_OP_COMMIT, as
+ // per https://fuchsia.dev/fuchsia-src/reference/syscalls/vmar_op_range.
+}
+
+func sysHugePage(v unsafe.Pointer, n uintptr) {
+}
+
+//go:nosplit
+func sysFree(v unsafe.Pointer, n uintptr, sysStat *uint64) {
+ mSysStatDec(sysStat, n)
+ if status := sys_vmar_unmap(fdioHandles.vmarRootSelf, v, uint64(n)); status != 0 {
+ println("runtime: sys_vmar_unmap failed: ", status)
+ exit(2)
+ }
+}
+
+func sysMmap(ptr unsafe.Pointer, sz uintptr, flags uint32) {
+ var h uint32
+ if status := sys_vmo_create(uint64(sz), 0, &h); status != 0 {
+ println("runtime: sys_vmo_create failed: ", status)
+ exit(2)
+ }
+
+ prop := []byte(vmoNameProp)
+ if status := sys_object_set_property(h, propName, unsafe.Pointer(&prop[0]), uint(len(prop))); status != 0 {
+ println("runtime: sys_object_set_property failed: ", status)
+ exit(2)
+ }
+
+ if status := sys_vmar_map(fdioHandles.vmarRootSelf, flags, 0, h, 0, uint64(sz), (*unsafe.Pointer)(ptr)); status != 0 {
+ println("runtime: sys_vmar_map failed: ", status)
+ exit(2)
+ }
+
+ if status := sys_handle_close(h); status != 0 {
+ println("runtime: sys_handle_close failed: ", status)
+ exit(2)
+ }
+}
+
+func sysReserve(v unsafe.Pointer, n uintptr) unsafe.Pointer {
+ p := v
+ sysMmap(unsafe.Pointer(&p), n, 0)
+ return p
+}
+
+func sysFault(v unsafe.Pointer, n uintptr) {
+ println("TODO sysFault")
+}
+
+func sysMap(v unsafe.Pointer, n uintptr, sysStat *uint64) {
+ mSysStatInc(sysStat, n)
+
+ if status := sys_vmar_protect(fdioHandles.vmarRootSelf, permRead|permWrite, v, uint64(n)); status != 0 {
+ println("runtime: sys_vmar_protect failed: ", status)
+ exit(2)
+ }
+}
diff --git a/src/runtime/netpoll_stub.go b/src/runtime/netpoll_stub.go
index 3599f2d..16adf3f 100644
--- a/src/runtime/netpoll_stub.go
+++ b/src/runtime/netpoll_stub.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build plan9
+// +build fuchsia plan9
package runtime
diff --git a/src/runtime/os_fuchsia.go b/src/runtime/os_fuchsia.go
new file mode 100644
index 0000000..53e53ea
--- /dev/null
+++ b/src/runtime/os_fuchsia.go
@@ -0,0 +1,729 @@
+// 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 runtime
+
+import (
+ "runtime/internal/atomic"
+ "unsafe"
+)
+
+const nsecInf = int64(0x7FFFFFFFFFFFFFFF)
+
+func osyield()
+
+//go:linkname cputicks syscall/zx.Sys_ticks_get
+func cputicks() int64
+
+//go:linkname sys_cprng_draw syscall/zx.Sys_cprng_draw
+//go:noescape
+func sys_cprng_draw(buffer unsafe.Pointer, size uint)
+
+//go:linkname sys_system_get_num_cpus syscall/zx.Sys_system_get_num_cpus
+func sys_system_get_num_cpus() uint32
+
+//go:linkname sys_deadline_after syscall/zx.Sys_deadline_after
+func sys_deadline_after(ns int64) int64
+
+//go:linkname sys_futex_wait syscall/zx.Sys_futex_wait
+//go:noescape
+func sys_futex_wait(v *int32, cv int32, newOwner uint32, deadline int64) int32
+
+//go:linkname sys_futex_wake syscall/zx.Sys_futex_wake
+//go:noescape
+func sys_futex_wake(v *int32, count uint32) int32
+
+//go:linkname sys_thread_create syscall/zx.Sys_thread_create
+//go:noescape
+func sys_thread_create(p uint32, name *byte, nlen uint, opts int, out *uint32) int32
+
+//go:linkname sys_thread_start syscall/zx.Sys_thread_start
+//go:noescape
+func sys_thread_start(h uint32, pc unsafe.Pointer, stk unsafe.Pointer, mp uintptr, arg2 uintptr) int32
+
+//go:linkname sys_clock_get_monotonic syscall/zx.Sys_clock_get_monotonic
+func sys_clock_get_monotonic() int64
+
+//go:linkname sys_clock_get syscall/zx.Sys_clock_get
+//go:noescape
+func sys_clock_get(clock_id uint32, out *int64) int32
+
+//go:linkname sys_debuglog_create syscall/zx.Sys_debuglog_create
+//go:noescape
+func sys_debuglog_create(resource uint32, options uint32, out *uint32) int32
+
+//go:linkname sys_debuglog_write syscall/zx.Sys_debuglog_write
+func sys_debuglog_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:linkname sys_nanosleep syscall/zx.Sys_nanosleep
+func sys_nanosleep(deadline int64) int32
+
+//go:linkname sys_process_exit syscall/zx.Sys_process_exit
+func sys_process_exit(retcode int64)
+
+//go:linkname zx_set_stdio_handle syscall/zx.set_stdio_handle
+func zx_set_stdio_handle(n int, h uint32, t uint32)
+
+//go:linkname zx_set_proc_handle syscall/zx.set_proc_handle
+func zx_set_proc_handle(h uint32)
+
+//go:linkname zx_get_proc_handle syscall/zx.get_proc_handle
+func zx_get_proc_handle() uint32
+
+//go:linkname zx_set_vmar_root syscall/zx.set_vmar_root
+func zx_set_vmar_root(h uint32)
+
+//go:linkname zx_set_namespace syscall/zx.set_namespace
+func zx_set_namespace(m map[string]uint32)
+
+type mOS struct {
+ thread uintptr
+}
+
+type sigset struct{}
+
+//go:nosplit
+func getRandomData(r []byte) {
+ if len(r) == 0 {
+ return
+ }
+ sys_cprng_draw(unsafe.Pointer(&r[0]), uint(len(r)))
+}
+
+//go:nosplit
+func futexsleep(addr *uint32, val uint32, ns int64) {
+ deadline := sys_deadline_after(ns)
+ if ns < 0 {
+ deadline = nsecInf
+ }
+ sys_futex_wait((*int32)(unsafe.Pointer(addr)), int32(val), 0, deadline)
+}
+
+//go:nosplit
+func futexwakeup(addr *uint32, cnt uint32) {
+ sys_futex_wake((*int32)(unsafe.Pointer(addr)), cnt)
+}
+
+// cgocallm0 calls a C function on the current stack.
+//
+// It is intended for use inside functions like osinit that run
+// before mstart directly on an OS thread stack.
+//
+// If in doubt, do not use.
+func cgocallm0(fn, arg unsafe.Pointer)
+
+// exceptionInfo is defined in zircon/syscalls/exception.h.
+type exceptionInfo struct {
+ pid uint64
+ tid uint64
+ exceptionType uint32
+ padding [4]uint8
+}
+
+// watchexceptions is called when pprof CPU tracing is enabled. It runs without
+// a p, hence nowritebarrierrec.
+//
+//go:nosplit
+//go:nowritebarrierrec
+func watchexceptions() {
+ procHandle := zx_get_proc_handle()
+ var exceptionChannel uint32
+ if status := vdsoCall_zx_task_create_exception_channel(procHandle, 0, unsafe.Pointer(&exceptionChannel)); status != ZX_OK {
+ println("failed to create exception channel", status)
+ exit(2)
+ }
+ for {
+
+ var observed uint32
+ if status := fake_m_object_wait_one(exceptionChannel, ZX_CHANNEL_READABLE, ZX_TIME_INFINITE, &observed); status != ZX_OK {
+ println("failed to wait on exception channel", status)
+ exit(2)
+ }
+
+ var info exceptionInfo
+ var exceptionHandle uint32
+ var actualBytes, actualHandles uint32
+ if status := vdsoCall_zx_channel_read(
+ exceptionChannel,
+ 0,
+ unsafe.Pointer(&info),
+ unsafe.Pointer(&exceptionHandle),
+ uint32(unsafe.Sizeof(info)),
+ 1,
+ unsafe.Pointer(&actualBytes),
+ unsafe.Pointer(&actualHandles),
+ ); status != ZX_OK {
+ println("failed to read from exception channel", status)
+ exit(2)
+ }
+
+ switch info.exceptionType {
+ // A fatal exception occurred, attempt to push a panic into the
+ // offending thread.
+ case ZX_EXCP_FATAL_PAGE_FAULT, ZX_EXCP_UNALIGNED_ACCESS, ZX_EXCP_UNDEFINED_INSTRUCTION:
+ var thread uint32
+ if status := vdsoCall_zx_exception_get_thread(exceptionHandle, unsafe.Pointer(&thread)); status != ZX_OK {
+ println("failed to get exception thread", status)
+ exit(2)
+ }
+
+ var ctx sigctxt
+ if status := vdsoCall_zx_thread_read_state(
+ thread,
+ ZX_THREAD_STATE_GENERAL_REGS,
+ unsafe.Pointer(&ctx.regs),
+ uint(unsafe.Sizeof(ctx.regs)),
+ ); status != ZX_OK {
+ println("failed to read thread state", status)
+ exit(2)
+ }
+
+ // Prepare a panic, we'll call sigpanic on the dead thread.
+ ctx.prepareExceptionPanic()
+ if status := vdsoCall_zx_thread_write_state(
+ thread,
+ ZX_THREAD_STATE_GENERAL_REGS,
+ unsafe.Pointer(&ctx.regs),
+ uint(unsafe.Sizeof(ctx.regs)),
+ ); status != ZX_OK {
+ println("failed to recover thread state on OS exception")
+ ctx.traceback()
+ exit(2)
+ }
+ handled := ZX_EXCEPTION_STATE_HANDLED
+ if status := vdsoCall_zx_object_set_property(
+ exceptionHandle,
+ ZX_PROP_EXCEPTION_STATE,
+ unsafe.Pointer(&handled),
+ uint(unsafe.Sizeof(handled)),
+ ); status != ZX_OK {
+ println("failed to mark OS exception as handled")
+ ctx.traceback()
+ exit(2)
+ }
+
+ // Close the thread handle, we don't need it anymore, and we don't really
+ // care if it succeeds.
+ _ = vdsoCall_zx_handle_close(thread)
+ if status := vdsoCall_zx_handle_close(exceptionHandle); status != ZX_OK {
+ println("failed to close exception handle")
+ ctx.traceback()
+ exit(2)
+ }
+ default:
+ // We're not handling this exception, just close the handle.
+ vdsoCall_zx_handle_close(exceptionHandle)
+ }
+ }
+}
+
+func osinit() {
+ if _cgo_get_initial_handles != nil {
+ cgocallm0(_cgo_get_initial_handles, unsafe.Pointer(&fdioHandles))
+ for i := 0; i < 3; i = i + 1 {
+ zx_set_stdio_handle(i, fdioHandles.stdioClones[i], fdioHandles.stdioCloneTypes[i])
+ }
+ zx_set_proc_handle(fdioHandles.processSelf)
+ zx_set_vmar_root(fdioHandles.vmarRootSelf)
+ } else {
+ println("runtime: fuchsia requires cgo")
+ exit(2)
+ }
+
+ ncpu = int32(sys_system_get_num_cpus())
+ physPageSize = 4096
+}
+
+func parseRootNS() {
+ if fdioHandles.rootNSNumHandles > 0 {
+ const maxHandleCount = 1 << 20 // arbitrary
+ paths := (*(*[maxHandleCount]*byte)(unsafe.Pointer(fdioHandles.rootNSPaths)))[:fdioHandles.rootNSNumHandles]
+ handles := (*(*[maxHandleCount]uint32)(unsafe.Pointer(fdioHandles.rootNSHandles)))[:fdioHandles.rootNSNumHandles]
+ m := make(map[string]uint32)
+ for i, p := range paths {
+ m[gostring(p)] = handles[i]
+ }
+
+ zx_set_namespace(m)
+ }
+}
+
+// Filled in by runtime/cgo when linked into binary.
+var (
+ _cgo_get_initial_handles unsafe.Pointer
+ _cgo_get_thread_self_handle unsafe.Pointer
+)
+
+//go:nosplit
+func minit() {
+ var h uint32
+ asmcgocall(_cgo_get_thread_self_handle, unsafe.Pointer(&h))
+ atomic.Storeuintptr(&getg().m.thread, uintptr(h))
+}
+
+//go:nosplit
+func unminit() {
+ // TODO
+}
+
+var exceptionError = error(errorString("OS exception"))
+
+func (c *sigctxt) traceback() {
+ traceback(c.regs.rPC(), c.regs.rSP(), c.regs.rLR(), getg())
+}
+
+func sigpanic() {
+ g := getg()
+ if !canpanic(g) {
+ throw("encountered OS exception")
+ }
+ panicCheck2(exceptionError.Error())
+ panic(exceptionError)
+}
+
+func mpreinit(mp *m) {
+ // TODO
+}
+
+//go:nosplit
+func sigsave(p *sigset) {
+ // TODO
+}
+
+//go:nosplit
+func msigrestore(sigmask sigset) {
+ // TODO
+}
+
+func initsig(preinit bool) {
+ // We can't call newm if this is preinit.
+ if !preinit {
+ newm(watchexceptions, nil, -1)
+ }
+}
+
+//go:nosplit
+//go:nowritebarrierrec
+func libpreinit() {
+ initsig(true)
+}
+
+//go:nosplit
+func sigblock() {
+ // TODO
+}
+
+func sigenable(sig uint32) {
+ // TODO
+}
+
+func sigdisable(sig uint32) {
+ // TODO
+}
+
+func sigignore(sig uint32) {
+ // TODO
+}
+
+func crash() {
+ *(*int32)(nil) = 0
+}
+
+func threadinit(mp *m)
+
+var gothreadname = []byte("gothread")
+
+//go:nowritebarrier
+func newosproc(mp *m) {
+ stk := unsafe.Pointer(mp.g0.stack.hi)
+ p := uint32(0) // TODO: only works due to temporary hack in zircon
+ var h uint32
+ status := sys_thread_create(p, &gothreadname[0], uint(len(gothreadname)), 0, &h)
+ if status < 0 {
+ println("runtime: newosproc sys_thread_create failed:", h)
+ exit(2)
+ }
+
+ mp.thread = uintptr(h)
+
+ status = sys_thread_start(h, unsafe.Pointer(funcPC(threadinit)), stk, uintptr(unsafe.Pointer(mp)), 0)
+ if status < 0 {
+ println("runtime: newosproc sys_thread_start failed:", h)
+ exit(2)
+ }
+}
+
+//go:nosplit
+func newosproc0(stacksize uintptr, fn unsafe.Pointer) {
+ stack := sysAlloc(stacksize, &memstats.stacks_sys)
+ if stack == nil {
+ write(2, unsafe.Pointer(&failallocatestack[0]), int32(len(failallocatestack)))
+ exit(1)
+ }
+
+ p := uint32(0) // TODO: only works due to temporary hack in zircon
+ var h uint32
+ status := sys_thread_create(p, &gothreadname[0], uint(len(gothreadname)), 0, &h)
+ if status < 0 {
+ write(2, unsafe.Pointer(&failthreadcreate[0]), int32(len(failthreadcreate)))
+ exit(1)
+
+ }
+
+ status = sys_thread_start(h, fn, unsafe.Pointer(uintptr(stack)+stacksize), 0, 0)
+ if status < 0 {
+ write(2, unsafe.Pointer(&failthreadstart[0]), int32(len(failthreadstart)))
+ exit(1)
+ }
+}
+
+var failallocatestack = []byte("runtime: failed to allocate stack for the new OS thread\n")
+var failthreadcreate = []byte("runtime: failed to create new OS thread\n")
+var failthreadstart = []byte("runtime: failed to start new OS thread\n")
+
+type zx_proc_args struct {
+ protocol uint32
+ version uint32
+ handle_info_off uint32
+ args_off uint32
+ args_num uint32
+}
+
+type zx_proc_info struct {
+ magic uint32
+ version uint32
+ next_tls_slot uint32
+ proc_args *zx_proc_args
+ handle *uint32
+ handle_info *uint32
+ handle_count int32
+ argv **byte
+ argc int32
+}
+
+type zx_tls_root struct {
+ self *zx_tls_root
+ proc *zx_proc_info
+ magic uint32
+ flags uint16
+ maxslots uint16
+ slots [8]uintptr // has length maxslots
+}
+
+func resetcpuprofiler(hz int32) {
+ // TODO
+}
+
+// fdio_init matches a Go struct of the same name in gcc_fdio.c.
+type fdio_init struct {
+ stdioClones [3]uint32
+ stdioCloneNumHandles [3]uint32
+ stdioCloneTypes [3]uint32
+ processSelf uint32
+ vmarRootSelf uint32
+ envlen int32
+ environ **byte
+ _ [4]byte
+ rootNSNumHandles int32
+ rootNSHandles *uint32
+ rootNSPaths **byte
+}
+
+var fdioHandles fdio_init
+
+func goenvs() {
+ if _cgo_get_initial_handles != nil {
+ const maxEnvSize = 1 << 20 // arbitrary
+ envp := (*(*[maxEnvSize]*byte)(unsafe.Pointer(fdioHandles.environ)))[:fdioHandles.envlen]
+ envs = make([]string, len(envp))
+ for i, e := range envp {
+ envs[i] = gostring(e)
+ }
+ // TODO: find a better place to call this
+ parseRootNS()
+ } else {
+ // TODO: implement cgo-less init
+ println("runtime: no fuchsia process handle without cgo yet")
+ exit(2)
+ }
+}
+
+const _NSIG = 65 // TODO
+
+const (
+ ZX_CLOCK_MONOTONIC = 0
+ ZX_HANDLE_INVALID = 0
+ ZX_INFO_THREAD = uint32(10)
+ ZX_OK = int32(0)
+ ZX_THREAD_STATE_GENERAL_REGS = uint32(0)
+ ZX_THREAD_STATE_NEW = uint32(0)
+ ZX_THREAD_SUSPENDED = uint32(1 << 5)
+ ZX_THREAD_TERMINATED = uint32(1 << 3)
+ ZX_TIME_INFINITE = int64(^uint64(1 << 63))
+ ZX_TIMER_SIGNALED = uint32(1 << 3)
+ ZX_TIMER_SLACK_EARLY = 1
+ ZX_CHANNEL_READABLE = uint32(1 << 0)
+ ZX_EXCEPTION_STATE_HANDLED = uint32(1)
+ ZX_PROP_EXCEPTION_STATE = uint32(16)
+ // Exception types that are handled by the runtime. Defined in
+ // zircon/syscall/exception.h
+ ZX_EXCP_FATAL_PAGE_FAULT = uint32(0x108)
+ ZX_EXCP_UNDEFINED_INSTRUCTION = uint32(0x208)
+ ZX_EXCP_UNALIGNED_ACCESS = uint32(0x508)
+)
+
+//go:nosplit
+func nanotime1() int64 {
+ return sys_clock_get_monotonic()
+}
+
+//go:linkname time_now time.now
+//go:nosplit
+func time_now() (sec int64, nsec int32, mono int64) {
+ const ZX_CLOCK_UTC = 1
+ var x int64
+ sys_clock_get(ZX_CLOCK_UTC, &x)
+ return x / 1e9, int32(x % 1e9), nanotime()
+}
+
+func unixnanotime() int64 {
+ return nanotime()
+}
+
+// #define LOGBUF_MAX (ZX_LOG_RECORD_MAX - sizeof(zx_log_record_t))
+const logBufMax = 224
+
+var logger uint32
+var logBufferArray [logBufMax]byte
+var logBufferN int
+
+//go:nosplit
+func write1(fd uintptr, buf unsafe.Pointer, n int32) int32 {
+ if fd != 1 && fd != 2 {
+ panic("runtime.write(): can not write to non-log fd")
+ }
+
+ // This initialization mechanism is not thread-safe, but if the only calls to 'write' with
+ // these file descriptors come from print, they will already be serialized by a lock in
+ // print's implementation.
+ if logger <= 0 {
+ sys_debuglog_create(0, 0, &logger)
+ logBufferN = 0
+ }
+ // Ideally this should panic, but that would go down "blind", which is arguably worse.
+ if logger <= 0 {
+ return -1
+ }
+
+ for i := int32(0); i < n; i++ {
+ c := *(*byte)(unsafe.Pointer(uintptr(buf) + uintptr(i)))
+
+ if c == '\n' {
+ sys_debuglog_write(logger, 0, unsafe.Pointer(&logBufferArray[0]), uint(logBufferN))
+ logBufferN = 0
+ continue
+ }
+
+ if c < ' ' {
+ continue
+ }
+
+ logBufferArray[logBufferN] = c
+ logBufferN++
+
+ if logBufferN == len(logBufferArray) {
+ sys_debuglog_write(logger, 0, unsafe.Pointer(&logBufferArray[0]), uint(logBufferN))
+ logBufferN = 0
+ }
+ }
+
+ return n
+}
+
+//go:nosplit
+func exit(code int32) {
+ sys_process_exit(int64(code))
+}
+
+//go:nosplit
+func usleep(usec uint32) {
+ sys_nanosleep(sys_deadline_after(int64(usec * 1000)))
+}
+
+func signame(sig uint32) string {
+ return "unknown_sig" // TODO
+}
+
+// zircon_mktls
+//go:nosplit
+func zircon_mktls() {
+ // TODO
+}
+
+//go:nosplit
+func zircon_settls(val uintptr) {
+ // TODO: should call zx_set_object_property with property ZX_PROP_REGISTER_FS in amd64 or
+ // ZX_PROP_REGISTER_CP15 on arm.
+}
+
+//go:linkname os_sigpipe os.sigpipe
+func os_sigpipe() {
+ // TODO
+}
+
+// gsignalStack is unused on fuchsia
+type gsignalStack struct{}
+
+const preemptMSupported = false
+
+func preemptM(mp *m) {
+ // No threads, so nothing to do.
+}
+
+var (
+ profTimer uint32 // timer handle
+ profHz = ZX_TIME_INFINITE
+)
+
+type zxCpuSet struct {
+ mask [16]uint32
+}
+
+type zxInfoThread struct {
+ state uint32
+ waitExceptionPortType uint32
+ affinityMask zxCpuSet
+}
+
+//go:noescape
+//go:nosplit
+func fake_m_object_wait_one(handle uint32, signals uint32, deadline int64, observed *uint32) int32
+
+func profilem(mp *m, thread uint32) {
+ // Ignore nascent threads.
+ var observed uint32
+ var info zxInfoThread
+ var actualSize uint64
+ var availSize uint64
+ if status := vdsoCall_zx_object_get_info(thread, ZX_INFO_THREAD, unsafe.Pointer(&info), uint(unsafe.Sizeof(info)), unsafe.Pointer(&actualSize), unsafe.Pointer(&availSize)); status != ZX_OK {
+ return
+ }
+ if info.state == ZX_THREAD_STATE_NEW {
+ return
+ }
+
+ // Wait for the thread to be suspended.
+ if status := fake_m_object_wait_one(thread, ZX_THREAD_SUSPENDED|ZX_THREAD_TERMINATED, ZX_TIME_INFINITE, &observed); status != ZX_OK {
+ return
+ }
+
+ // Ignore threads that were terminated as a result of suspension.
+ if observed&ZX_THREAD_TERMINATED == ZX_THREAD_TERMINATED {
+ return
+ }
+
+ var r generalRegs
+ if status := vdsoCall_zx_thread_read_state(thread, ZX_THREAD_STATE_GENERAL_REGS, unsafe.Pointer(&r), uint(unsafe.Sizeof(r))); status != ZX_OK {
+ return
+ }
+
+ if mp.curg != nil {
+ sigprof(r.rPC(), r.rSP(), r.rLR(), mp.curg, mp)
+ } else {
+ sigprofNonGoPC(r.rPC())
+ }
+}
+
+// profileLoop is called when pprof CPU tracing is enabled. It runs without a p, hence nowritebarrierrec.
+//
+//go:nosplit
+//go:nowritebarrierrec
+func profileLoop() {
+ me := getg().m
+ for {
+ var observed uint32
+ if status := fake_m_object_wait_one(profTimer, ZX_TIMER_SIGNALED, ZX_TIME_INFINITE, &observed); status != ZX_OK {
+ continue
+ }
+
+ // Scan over all threads and suspend them, then trace. Ideally, we'd scan over
+ // all of them and give them a chance to suspend before this, but I don't want
+ // to deal with allocation here.
+ first := (*m)(atomic.Loadp(unsafe.Pointer(&allm)))
+ for mp := first; mp != nil; mp = mp.alllink {
+ thread := uint32(atomic.Loaduintptr(&mp.thread))
+ // Do not profile threads blocked on Notes (this includes idle worker threads, idle timer thread,
+ // idle heap scavenger, etc.). Do not profile this thread.
+ if thread == ZX_HANDLE_INVALID || mp.profilehz == 0 || mp.blocked || mp == me {
+ continue
+ }
+
+ var token uint32
+ if status := vdsoCall_zx_task_suspend_token(thread, unsafe.Pointer(&token)); status == ZX_OK {
+ profilem(mp, thread)
+ }
+ vdsoCall_zx_handle_close(token)
+
+ }
+
+ due := vdsoCall_zx_deadline_after(profHz)
+ if status := vdsoCall_zx_timer_set(profTimer, due, ZX_TIMER_SLACK_EARLY); status != ZX_OK {
+ // TODO: what do?
+ return
+ }
+ }
+}
+
+// profileloop is defined in sys_fuchsia_{amd,arm}64.s
+func profileloop()
+
+func setProcessCPUProfiler(hz int32) {
+ // This function is entered in the critical section guarded by
+ // prof.signalLock in proc.go and is thus safe to assume the profiler's
+ // timer is created atomically.
+ if profTimer == ZX_HANDLE_INVALID {
+ if status := vdsoCall_zx_timer_create(ZX_TIMER_SLACK_EARLY, ZX_CLOCK_MONOTONIC, unsafe.Pointer(&profTimer)); status != ZX_OK {
+ // TODO: what do?
+ return
+ }
+
+ newm(profileLoop, nil, -1)
+ }
+}
+
+func setThreadCPUProfiler(hz int32) {
+ // Don't do anything if we don't have a timer yet.
+ if profTimer == ZX_HANDLE_INVALID {
+ return
+ }
+
+ atomic.Store((*uint32)(unsafe.Pointer(&getg().m.profilehz)), uint32(hz))
+
+ if hz > 0 {
+ ns := int64(int64(1000000000) / int64(hz))
+ // Bound tracing frequency to microseconds. This is likely
+ // already well above the granularity traces can actually
+ // provide.
+ if ns < 1000 {
+ ns = 1000
+ }
+
+ profHz = ns
+ due := vdsoCall_zx_deadline_after(ns)
+ if status := vdsoCall_zx_timer_set(profTimer, due, ZX_TIMER_SLACK_EARLY); status != ZX_OK {
+ // TODO: what do?
+ return
+ }
+ } else {
+ if status := vdsoCall_zx_timer_cancel(profTimer); status != ZX_OK {
+ return
+ }
+ }
+}
+
+func exitThread(wait *uint32) {}
+
+//go:nosplit
+//go:nowritebarrierrec
+func clearSignalHandlers() {}
diff --git a/src/runtime/os_fuchsia_arm64.go b/src/runtime/os_fuchsia_arm64.go
new file mode 100644
index 0000000..e5b021a
--- /dev/null
+++ b/src/runtime/os_fuchsia_arm64.go
@@ -0,0 +1,5 @@
+// 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 runtime
diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go
index 7149bfb..ef35b41 100644
--- a/src/runtime/pprof/pprof_test.go
+++ b/src/runtime/pprof/pprof_test.go
@@ -92,6 +92,7 @@
}
func TestCPUProfileMultithreaded(t *testing.T) {
+ t.Skip("TODO(https://github.com/golang/go/issues/40823): unskip when the crash is fixed")
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2))
testCPUProfile(t, stackContains, []string{"runtime/pprof.cpuHog1", "runtime/pprof.cpuHog2"}, avoidFunctions(), func(dur time.Duration) {
c := make(chan int)
@@ -456,6 +457,10 @@
// Use smaller size for Android to avoid crash.
heap = 100 << 20
}
+ if runtime.GOOS == "fuchsia" {
+ // Use smaller heap for Fuchsia to avoid crash.
+ heap = 100 << 20
+ }
if runtime.GOOS == "windows" && runtime.GOARCH == "arm" {
// Use smaller heap for Windows/ARM to avoid crash.
heap = 100 << 20
@@ -581,6 +586,10 @@
}
func TestMorestack(t *testing.T) {
+ if runtime.GOOS == "fuchsia" {
+ t.Skip("skipping on fuchsia")
+ }
+
testCPUProfile(t, stackContainsAll, []string{"runtime.newstack,runtime/pprof.growstack"}, avoidFunctions(), func(duration time.Duration) {
t := time.After(duration)
c := make(chan bool)
diff --git a/src/runtime/pprof/proto.go b/src/runtime/pprof/proto.go
index 8519af6..5e627a9 100644
--- a/src/runtime/pprof/proto.go
+++ b/src/runtime/pprof/proto.go
@@ -10,6 +10,7 @@
"fmt"
"io"
"io/ioutil"
+ "os"
"runtime"
"strconv"
"time"
@@ -407,6 +408,10 @@
// Even if stk was truncated due to the stack depth
// limit, expandFinalInlineFrame above has already
// fixed the truncation, ensuring it is long enough.
+ if len(l.pcs) > len(stk) {
+ // Temporary logging for golang.org/issues/40823
+ dumpState(l, stk)
+ }
stk = stk[len(l.pcs):]
continue
}
@@ -446,6 +451,16 @@
return locs
}
+func dumpState(l locInfo, stk []uintptr) {
+ buf := new(bytes.Buffer)
+ buf.WriteString("stk:")
+ printStackRecord(buf, stk, true)
+ buf.WriteString("\n")
+ buf.WriteString("l.pcs:")
+ printStackRecord(buf, l.pcs, true)
+ fmt.Fprintln(os.Stderr, buf.String())
+}
+
// pcDeck is a helper to detect a sequence of inlined functions from
// a stack trace returned by the runtime.
//
diff --git a/src/runtime/rt0_fuchsia_amd64.s b/src/runtime/rt0_fuchsia_amd64.s
new file mode 100644
index 0000000..8947cfe
--- /dev/null
+++ b/src/runtime/rt0_fuchsia_amd64.s
@@ -0,0 +1,14 @@
+// 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.
+
+#include "textflag.h"
+
+TEXT _rt0_amd64_fuchsia(SB),NOSPLIT,$-8
+ JMP _rt0_amd64(SB)
+
+TEXT _rt0_amd64_fuchsia_lib(SB),NOSPLIT,$0
+ // musl doesn't provide argc/argv; see golang.org/issue/13492
+ MOVQ $0, DI // argc
+ MOVQ $0, SI // argv
+ JMP _rt0_amd64_lib(SB)
diff --git a/src/runtime/rt0_fuchsia_arm64.s b/src/runtime/rt0_fuchsia_arm64.s
new file mode 100644
index 0000000..2df5fa1
--- /dev/null
+++ b/src/runtime/rt0_fuchsia_arm64.s
@@ -0,0 +1,92 @@
+// 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.
+
+#include "textflag.h"
+
+TEXT _rt0_arm64_fuchsia(SB),NOSPLIT,$-8
+ MOVD 0(RSP), R0 // argc
+ ADD $8, RSP, R1 // argv
+ BL main(SB)
+
+TEXT main(SB),NOSPLIT,$-8
+ MOVD $runtime·rt0_go(SB), R2
+ BL R2
+
+// When building with -buildmode=c-shared, this symbol is called when the shared
+// library is loaded.
+TEXT _rt0_arm64_fuchsia_lib(SB),NOSPLIT,$184
+ // Preserve callee-save registers.
+ MOVD R19, 24(RSP)
+ MOVD R20, 32(RSP)
+ MOVD R21, 40(RSP)
+ MOVD R22, 48(RSP)
+ MOVD R23, 56(RSP)
+ MOVD R24, 64(RSP)
+ MOVD R25, 72(RSP)
+ MOVD R26, 80(RSP)
+ MOVD R27, 88(RSP)
+ FMOVD F8, 96(RSP)
+ FMOVD F9, 104(RSP)
+ FMOVD F10, 112(RSP)
+ FMOVD F11, 120(RSP)
+ FMOVD F12, 128(RSP)
+ FMOVD F13, 136(RSP)
+ FMOVD F14, 144(RSP)
+ FMOVD F15, 152(RSP)
+ MOVD g, 160(RSP)
+
+ // Initialize g as null in case of using g later e.g. sigaction in cgo_sigaction.go
+ MOVD ZR, g
+
+ // Synchronous initialization.
+ MOVD $runtime·libpreinit(SB), R4
+ BL (R4)
+
+ // Create a new thread to do the runtime initialization and return.
+ MOVD _cgo_sys_thread_create(SB), R4
+ CMP $0, R4
+ BEQ nocgo
+ MOVD $_rt0_arm64_fuchsia_lib_go(SB), R0
+ MOVD $0, R1
+ SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved.
+ BL (R4)
+ ADD $16, RSP
+ B restore
+
+nocgo:
+ MOVD $0x800000, R0 // stacksize = 8192KB
+ MOVD $_rt0_arm64_fuchsia_lib_go(SB), R1
+ MOVD R0, 8(RSP)
+ MOVD R1, 16(RSP)
+ MOVD $runtime·newosproc0(SB),R4
+ BL (R4)
+
+restore:
+ // Restore callee-save registers.
+ MOVD 24(RSP), R19
+ MOVD 32(RSP), R20
+ MOVD 40(RSP), R21
+ MOVD 48(RSP), R22
+ MOVD 56(RSP), R23
+ MOVD 64(RSP), R24
+ MOVD 72(RSP), R25
+ MOVD 80(RSP), R26
+ MOVD 88(RSP), R27
+ FMOVD 96(RSP), F8
+ FMOVD 104(RSP), F9
+ FMOVD 112(RSP), F10
+ FMOVD 120(RSP), F11
+ FMOVD 128(RSP), F12
+ FMOVD 136(RSP), F13
+ FMOVD 144(RSP), F14
+ FMOVD 152(RSP), F15
+ MOVD 160(RSP), g
+ RET
+
+TEXT _rt0_arm64_fuchsia_lib_go(SB),NOSPLIT,$0
+ // musl doesn't provide argc/argv; see golang.org/issue/13492
+ MOVD $0, R0 // argc
+ MOVD $0, R1 // argv
+ MOVD $runtime·rt0_go(SB),R4
+ B (R4)
diff --git a/src/runtime/signal_amd64.go b/src/runtime/signal_amd64.go
index 6ab1f75..1d22439 100644
--- a/src/runtime/signal_amd64.go
+++ b/src/runtime/signal_amd64.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
// +build amd64
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris fuchsia
package runtime
diff --git a/src/runtime/signal_arm64.go b/src/runtime/signal_arm64.go
index 3c20139..8d2c3ac 100644
--- a/src/runtime/signal_arm64.go
+++ b/src/runtime/signal_arm64.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin freebsd linux netbsd openbsd
+// +build darwin freebsd linux netbsd openbsd fuchsia
package runtime
diff --git a/src/runtime/signal_fuchsia_amd64.go b/src/runtime/signal_fuchsia_amd64.go
new file mode 100644
index 0000000..fbec7f1
--- /dev/null
+++ b/src/runtime/signal_fuchsia_amd64.go
@@ -0,0 +1,57 @@
+// 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.
+
+package runtime
+
+const (
+ // Bogus definitions to allow signal_amd64 to build.
+ _SIGFPE = 0x1
+ _FPE_INTDIV = 0x01
+)
+
+type sigctxt struct {
+ regs generalRegs
+}
+
+func (c *sigctxt) rax() uint64 { return c.regs.rax }
+func (c *sigctxt) rbx() uint64 { return c.regs.rbx }
+func (c *sigctxt) rcx() uint64 { return c.regs.rcx }
+func (c *sigctxt) rdx() uint64 { return c.regs.rdx }
+func (c *sigctxt) rdi() uint64 { return c.regs.rdi }
+func (c *sigctxt) rsi() uint64 { return c.regs.rsi }
+func (c *sigctxt) rbp() uint64 { return c.regs.rbp }
+func (c *sigctxt) rsp() uint64 { return c.regs.rsp }
+func (c *sigctxt) r8() uint64 { return c.regs.r8 }
+func (c *sigctxt) r9() uint64 { return c.regs.r9 }
+func (c *sigctxt) r10() uint64 { return c.regs.r10 }
+func (c *sigctxt) r11() uint64 { return c.regs.r11 }
+func (c *sigctxt) r12() uint64 { return c.regs.r12 }
+func (c *sigctxt) r13() uint64 { return c.regs.r13 }
+func (c *sigctxt) r14() uint64 { return c.regs.r14 }
+func (c *sigctxt) r15() uint64 { return c.regs.r15 }
+
+//go:nosplit
+//go:nowritebarrierrec
+func (c *sigctxt) rip() uint64 { return c.regs.rip }
+
+func (c *sigctxt) rflags() uint64 { return c.regs.rflags }
+
+// TODO brunodalbo these only seem to be used to dump regs, what's the right
+// value here?
+func (c *sigctxt) cs() uint64 { return c.regs.fs_base }
+func (c *sigctxt) fs() uint64 { return c.regs.fs_base }
+func (c *sigctxt) gs() uint64 { return c.regs.fs_base }
+func (c *sigctxt) sigaddr() uint64 { return 0 }
+
+func (c *sigctxt) set_rip(x uint64) { c.regs.rip = x }
+func (c *sigctxt) set_rsp(x uint64) { c.regs.rsp = x }
+
+func (c *sigctxt) prepareExceptionPanic() {
+ // NOTE(brunodalbo) we're passing the wrong g into preparePanic here for
+ // simplicity. This is not entirely correct, as prepare panic wants the g
+ // from the panicking thread. It should be fine for amd64 though, as g is
+ // only used in preparePanic to improve the traceback in case we're in a cgo
+ // call.
+ c.preparePanic(0, getg())
+}
diff --git a/src/runtime/signal_fuchsia_arm64.go b/src/runtime/signal_fuchsia_arm64.go
new file mode 100644
index 0000000..e799cd9
--- /dev/null
+++ b/src/runtime/signal_fuchsia_arm64.go
@@ -0,0 +1,82 @@
+// 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.
+
+package runtime
+
+// Needed for go:linkname.
+import _ "unsafe"
+
+type sigctxt struct {
+ regs generalRegs
+}
+
+func (c *sigctxt) r0() uint64 { return c.regs.r[0] }
+func (c *sigctxt) r1() uint64 { return c.regs.r[1] }
+func (c *sigctxt) r2() uint64 { return c.regs.r[2] }
+func (c *sigctxt) r3() uint64 { return c.regs.r[3] }
+func (c *sigctxt) r4() uint64 { return c.regs.r[4] }
+func (c *sigctxt) r5() uint64 { return c.regs.r[5] }
+func (c *sigctxt) r6() uint64 { return c.regs.r[6] }
+func (c *sigctxt) r7() uint64 { return c.regs.r[7] }
+func (c *sigctxt) r8() uint64 { return c.regs.r[8] }
+func (c *sigctxt) r9() uint64 { return c.regs.r[9] }
+func (c *sigctxt) r10() uint64 { return c.regs.r[10] }
+func (c *sigctxt) r11() uint64 { return c.regs.r[11] }
+func (c *sigctxt) r12() uint64 { return c.regs.r[12] }
+func (c *sigctxt) r13() uint64 { return c.regs.r[13] }
+func (c *sigctxt) r14() uint64 { return c.regs.r[14] }
+func (c *sigctxt) r15() uint64 { return c.regs.r[15] }
+func (c *sigctxt) r16() uint64 { return c.regs.r[16] }
+func (c *sigctxt) r17() uint64 { return c.regs.r[17] }
+func (c *sigctxt) r18() uint64 { return c.regs.r[18] }
+func (c *sigctxt) r19() uint64 { return c.regs.r[19] }
+func (c *sigctxt) r20() uint64 { return c.regs.r[20] }
+func (c *sigctxt) r21() uint64 { return c.regs.r[21] }
+func (c *sigctxt) r22() uint64 { return c.regs.r[22] }
+func (c *sigctxt) r23() uint64 { return c.regs.r[23] }
+func (c *sigctxt) r24() uint64 { return c.regs.r[24] }
+func (c *sigctxt) r25() uint64 { return c.regs.r[25] }
+func (c *sigctxt) r26() uint64 { return c.regs.r[26] }
+func (c *sigctxt) r27() uint64 { return c.regs.r[27] }
+func (c *sigctxt) r28() uint64 { return c.regs.r[28] }
+func (c *sigctxt) r29() uint64 { return c.regs.r[29] }
+func (c *sigctxt) lr() uint64 { return c.regs.lr }
+func (c *sigctxt) sp() uint64 { return c.regs.sp }
+
+//go:nosplit
+//go:nowritebarrierrec
+func (c *sigctxt) pc() uint64 { return c.regs.pc }
+
+// TODO brunodalbo these only seem to be used to dump regs, what's the right
+// value here?
+func (c *sigctxt) pstate() uint64 { return 0 }
+func (c *sigctxt) fault() uintptr { return 0 }
+func (c *sigctxt) sigcode() uint64 { return 0 }
+func (c *sigctxt) sigaddr() uint64 { return 0 }
+
+func (c *sigctxt) set_pc(x uint64) { c.regs.pc = x }
+func (c *sigctxt) set_sp(x uint64) { c.regs.sp = x }
+func (c *sigctxt) set_lr(x uint64) { c.regs.lr = x }
+func (c *sigctxt) set_r28(x uint64) { c.regs.r[28] = x }
+
+//go:linkname xx_panicmem xx_panicmem
+func xx_panicmem()
+
+func (c *sigctxt) prepareExceptionPanic() {
+ // R1 - LR at moment of fault
+ // R2 - PC at moment of fault
+ c.regs.r[1] = c.lr()
+ c.regs.r[2] = c.pc()
+ c.pushCall(funcPC(xx_panicmem), uintptr(c.pc()))
+}
+
+//go:nosplit
+//go:linkname setsigsegv
+func setsigsegv(pc uintptr) {
+ g := getg()
+ g.sig = 0
+ g.sigpc = pc
+ g.sigcode0 = 0
+ g.sigcode1 = 0 // TODO: emulate si_addr
+}
diff --git a/src/runtime/signal_fuchsia_arm64.s b/src/runtime/signal_fuchsia_arm64.s
new file mode 100644
index 0000000..8d88dbd
--- /dev/null
+++ b/src/runtime/signal_fuchsia_arm64.s
@@ -0,0 +1,59 @@
+// 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.
+
+#include "textflag.h"
+
+// NOTE(brunodalbo): this is copied from cgo/signal_darwin_arm64 since the
+// SIGSEV handling is similar to what needs to happen in Fuchsia.
+
+// xx_panicmem is the entrypoint for SIGSEGV as intercepted via a
+// mach thread port as EXC_BAD_ACCESS. As the segfault may have happened
+// in C code, we first need to load_g then call xx_panicmem.
+//
+// R1 - LR at moment of fault
+// R2 - PC at moment of fault
+TEXT xx_panicmem(SB),NOSPLIT|NOFRAME,$0
+ // If in external C code, we need to load the g register.
+ BL runtime·load_g(SB)
+ CMP $0, g
+ BNE ongothread
+
+ // On a foreign thread.
+ // TODO(crawshaw): call badsignal
+ MOVD.W $0, -16(RSP)
+ MOVW $139, R1
+ MOVW R1, 8(RSP)
+ B runtime·exit(SB)
+
+ongothread:
+ // Trigger a SIGSEGV panic.
+ //
+ // The goal is to arrange the stack so it looks like the runtime
+ // function sigpanic was called from the PC that faulted. It has
+ // to be sigpanic, as the stack unwinding code in traceback.go
+ // looks explicitly for it.
+ //
+ // To do this we call into runtime·setsigsegv, which sets the
+ // appropriate state inside the g object. We give it the faulting
+ // PC on the stack, then put it in the LR before calling sigpanic.
+
+ // Build a 32-byte stack frame for us for this call.
+ // Saved LR (none available) is at the bottom,
+ // then the PC argument for setsigsegv,
+ // then a copy of the LR for us to restore.
+ MOVD.W $0, -16(RSP)
+ MOVD R1, 8(RSP)
+ MOVD R2, 16(RSP)
+ BL runtime·setsigsegv(SB)
+ MOVD 8(RSP), R1
+ MOVD 16(RSP), R2
+
+ // Build a 16-byte stack frame for the simulated
+ // call to sigpanic, by taking 16 bytes away from the
+ // 32-byte stack frame above.
+ // The saved LR in this frame is the LR at time of fault,
+ // and the LR on entry to sigpanic is the PC at time of fault.
+ MOVD.W R1, 16(RSP)
+ MOVD R2, R30
+ B runtime·sigpanic(SB)
diff --git a/src/runtime/stubs2.go b/src/runtime/stubs2.go
index 4a1a5cc..66599d4 100644
--- a/src/runtime/stubs2.go
+++ b/src/runtime/stubs2.go
@@ -7,6 +7,7 @@
// +build !windows
// +build !js
// +build !darwin
+// +build !fuchsia
// +build !aix
package runtime
diff --git a/src/runtime/stubs3.go b/src/runtime/stubs3.go
index 95eecc7..f4930dd 100644
--- a/src/runtime/stubs3.go
+++ b/src/runtime/stubs3.go
@@ -6,6 +6,7 @@
// +build !solaris
// +build !freebsd
// +build !darwin
+// +build !fuchsia
// +build !aix
package runtime
diff --git a/src/runtime/sys_fuchsia_amd64.s b/src/runtime/sys_fuchsia_amd64.s
new file mode 100644
index 0000000..285d079
--- /dev/null
+++ b/src/runtime/sys_fuchsia_amd64.s
@@ -0,0 +1,94 @@
+// 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.
+
+#include "go_asm.h"
+#include "go_tls.h"
+#include "textflag.h"
+
+TEXT runtime·threadinit(SB),NOSPLIT,$0
+ MOVQ DI, R8
+
+ MOVQ m_g0(R8), DX // g
+ MOVQ R8, g_m(DX)
+
+ // Layout new m scheduler stack on os stack.
+ // TODO: which os stack? do we need to make a new vmo?
+ LEAQ (-8*1024+104)(SP), BX
+ MOVQ BX, g_stackguard0(DX)
+ MOVQ BX, g_stackguard1(DX)
+ MOVQ BX, (g_stack+stack_lo)(DX)
+ MOVQ SP, (g_stack+stack_hi)(DX)
+
+ PUSHQ R8
+
+ // Set up tls.
+ LEAQ m_tls(R8), DI
+ CALL runtime·settls(SB)
+
+ get_tls(CX)
+
+ POPQ R8
+ MOVQ m_g0(R8), DX
+ MOVQ DX, g(CX)
+
+ CLD // convention is D is always left cleared
+ CALL runtime·stackcheck(SB) // clobbers AX,CX
+ CALL runtime·mstart(SB)
+ // TODO CALL syscall/zx·Sys_zircon_thread_exit(SB)
+ RET
+
+// Set TLS base to DI for the thread handle supplied in SI.
+TEXT runtime·settls(SB),NOSPLIT,$0
+ ADDQ $8, DI // ELF wants to use -8(FS)
+ PUSHQ DI
+ LEAQ 0(SP), DX // object_set_property takes a pointer to the base
+
+ SUBQ $28, SP
+
+ MOVL SI, 0(SP) // thread handle
+ MOVL $4, 4(SP) // ZX_PROP_REGISTER_FS
+ MOVQ DX, 8(SP) // pointer to fs base
+ MOVQ $8, 16(SP) // size
+ CALL runtime·vdsoCall_zx_object_set_property(SB)
+
+ // Stash return and restore SP
+ MOVL 24(SP), AX
+ ADDQ $28, SP
+ TESTL $0, AX
+ JZ 2(PC)
+ MOVL $0xf1, 0xf1 // crash
+ POPQ DI
+ RET
+
+TEXT ·cgocallm0(SB),NOSPLIT,$0-20
+ MOVQ fn+0(FP), AX
+ MOVQ arg+8(FP), DI
+
+ MOVQ SP, BP // BP is callee-save in the x86-64 ABI
+
+ ANDQ $~15, SP
+ CALL AX
+
+ MOVQ BP, SP
+ get_tls(CX)
+ RET
+
+// This implementation lives separately because the m/g for the profiler and
+// exception watcher are faked, and this causes issues with runtime.exitsyscall
+// not returning.
+TEXT runtime·fake_m_object_wait_one(SB),NOSPLIT,$0-28
+ MOVL handle+0(FP), DI
+ MOVL signals+4(FP), SI
+ MOVQ deadline+8(FP), DX
+ MOVQ observed+16(FP), CX
+ MOVQ vdso_zx_object_wait_one(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ RET
+
+TEXT runtime·osyield(SB),NOSPLIT,$0
+ MOVQ $0, DI
+ MOVQ vdso_zx_nanosleep(SB), AX
+ CALL AX
+ RET
diff --git a/src/runtime/sys_fuchsia_arm64.s b/src/runtime/sys_fuchsia_arm64.s
new file mode 100644
index 0000000..ce89ebe
--- /dev/null
+++ b/src/runtime/sys_fuchsia_arm64.s
@@ -0,0 +1,59 @@
+// 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.
+
+#include "go_asm.h"
+#include "funcdata.h"
+#include "textflag.h"
+
+TEXT runtime·threadinit(SB),NOSPLIT,$0
+ // Layout new m scheduler stack on os stack.
+ // TODO: which os stack? do we need to make a new vmo?
+
+ MOVD m_g0(R0), g
+ MOVD R0, g_m(g)
+
+ MOVD RSP, R7
+ MOVD $(-64*1024)(R7), R0
+ MOVD R0, g_stackguard0(g)
+ MOVD R0, g_stackguard1(g)
+ MOVD R0, (g_stack+stack_lo)(g)
+ MOVD R7, (g_stack+stack_hi)(g)
+
+ BL runtime·mstart(SB)
+ MOVD $0, R0
+ MOVD R0, (R0) // boom
+ UNDEF
+
+TEXT ·cgocallm0(SB),NOSPLIT,$0-20
+ MOVD fn+0(FP), R1
+ MOVD arg+8(FP), R0
+
+ MOVD RSP, R19 // R19 is callee-save by C
+ MOVD g, R21 // R21 is callee-save by C
+ MOVD RSP, R7
+ ADD $-32, R7, R7
+ AND $~15, R7
+ MOVD R7, RSP // align stack for C
+ BL R1
+
+ MOVD R19, RSP // restore SP
+ MOVD R21, g // restore g
+ RET
+
+// This implementation lives separately because the m/g for the profiler and
+// exception watcher are faked, and this causes issues with runtime.exitsyscall
+// not returning.
+TEXT runtime·fake_m_object_wait_one(SB),NOSPLIT,$0-28
+ MOVW handle+0(FP), R0
+ MOVW signals+4(FP), R1
+ MOVD deadline+8(FP), R2
+ MOVD observed+16(FP), R3
+ BL vdso_zx_object_wait_one(SB)
+ MOVW R0, ret+24(FP)
+ RET
+
+TEXT runtime·osyield(SB),NOSPLIT,$0
+ MOVD $0, R0
+ BL vdso_zx_nanosleep(SB)
+ RET
diff --git a/src/runtime/timestub.go b/src/runtime/timestub.go
index 459bf8e..c7a2bc4 100644
--- a/src/runtime/timestub.go
+++ b/src/runtime/timestub.go
@@ -6,6 +6,7 @@
// indirectly, in terms of walltime and nanotime assembly.
// +build !windows
+// +build !fuchsia
package runtime
diff --git a/src/runtime/tls_arm64.h b/src/runtime/tls_arm64.h
index f60f4f6..08855c4 100644
--- a/src/runtime/tls_arm64.h
+++ b/src/runtime/tls_arm64.h
@@ -9,6 +9,9 @@
#ifdef GOOS_linux
#define TLS_linux
#endif
+#ifdef GOOS_fuchsia
+#define TLS_linux
+#endif
#ifdef TLS_linux
#define TPIDR TPIDR_EL0
#define MRS_TPIDR_R0 WORD $0xd53bd040 // MRS TPIDR_EL0, R0
diff --git a/src/runtime/vdso_elf.go b/src/runtime/vdso_elf.go
new file mode 100644
index 0000000..84af79d
--- /dev/null
+++ b/src/runtime/vdso_elf.go
@@ -0,0 +1,58 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+//
+// +build fuchsia linux
+// +build 386 amd64 arm arm64 ppc64 ppc64le
+
+package runtime
+
+import "unsafe"
+
+const (
+ _AT_SYSINFO_EHDR = 33
+
+ _PT_LOAD = 1 /* Loadable program segment */
+ _PT_DYNAMIC = 2 /* Dynamic linking information */
+
+ _PF_X = 1 /* Executable PH segment */
+
+ _DT_NULL = 0 /* Marks end of dynamic section */
+ _DT_HASH = 4 /* Dynamic symbol hash table */
+ _DT_STRTAB = 5 /* Address of string table */
+ _DT_SYMTAB = 6 /* Address of symbol table */
+ _DT_GNU_HASH = 0x6ffffef5 /* GNU-style dynamic symbol hash table */
+ _DT_VERSYM = 0x6ffffff0
+ _DT_VERDEF = 0x6ffffffc
+
+ _VER_FLG_BASE = 0x1 /* Version definition of file itself */
+
+ _SHN_UNDEF = 0 /* Undefined section */
+
+ _SHT_DYNSYM = 11 /* Dynamic linker symbol table */
+
+ _STT_FUNC = 2 /* Symbol is a code object */
+
+ _STT_NOTYPE = 0 /* Symbol type is not specified */
+
+ _STB_GLOBAL = 1 /* Global symbol */
+ _STB_WEAK = 2 /* Weak symbol */
+
+ _EI_NIDENT = 16
+
+ // Maximum indices for the array types used when traversing the vDSO ELF structures.
+ // Computed from architecture-specific max provided by vdso_linux_*.go
+ vdsoSymTabSize = vdsoArrayMax / unsafe.Sizeof(elfSym{})
+ vdsoDynSize = vdsoArrayMax / unsafe.Sizeof(elfDyn{})
+ vdsoSymStringsSize = vdsoArrayMax // byte
+ vdsoVerSymSize = vdsoArrayMax / 2 // uint16
+ vdsoHashSize = vdsoArrayMax / 4 // uint32
+
+ // vdsoBloomSizeScale is a scaling factor for gnuhash tables which are uint32 indexed,
+ // but contain uintptrs
+ vdsoBloomSizeScale = unsafe.Sizeof(uintptr(0)) / 4 // uint32
+)
+
+/* How to extract and insert information held in the st_info field. */
+func _ELF_ST_BIND(val byte) byte { return val >> 4 }
+func _ELF_ST_TYPE(val byte) byte { return val & 0xf }
diff --git a/src/runtime/vdso_elf64.go b/src/runtime/vdso_elf64.go
index 6ded9d6..b3ce61d 100644
--- a/src/runtime/vdso_elf64.go
+++ b/src/runtime/vdso_elf64.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux
+// +build fuchsia linux
// +build amd64 arm64 mips64 mips64le ppc64 ppc64le
package runtime
diff --git a/src/runtime/vdso_fuchsia.go b/src/runtime/vdso_fuchsia.go
new file mode 100644
index 0000000..9e4c7f3
--- /dev/null
+++ b/src/runtime/vdso_fuchsia.go
@@ -0,0 +1,160 @@
+// 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 runtime
+
+import "unsafe"
+
+// Look up symbols in the Fuchsia vDSO.
+//
+// When processes are spawned in Fuchsia, they are provided with a handle to a channel
+// and a pointer to where the vDSO is loaded. Syscalls may never be called directly;
+// on syscall entry, the kernel checks to see that the syscall was entered from the
+// vDSO. Because reading from the channel requires performing a syscall, we must
+// resolve symbols from the vDSO first.
+//
+// This is only performed when not using cgo. When a Go binary is built with cgo, libc
+// handles all of this.
+
+type vdsoSymbolKey struct {
+ name string
+ gnuHash uint32
+ ptr *uintptr
+}
+
+type vdsoInfo struct {
+ /* Load information */
+ loadAddr uintptr
+ loadBase uintptr /* loadAddr + p_vaddr */
+
+ /* Symbol table */
+ symtab *[vdsoSymTabSize]elfSym
+ symstrings *[vdsoSymStringsSize]byte
+ chain []uint32
+ bucket []uint32
+ symOff uint32
+ nBuckets uint32
+}
+
+var (
+ vdsoLoadBase uintptr
+ vdsoMemSize uintptr
+)
+
+// see vdso_keys_fuchsia.go for vdsoSymbolKeys[] and vdso*Sym vars
+
+func vdsoInit(info *vdsoInfo, hdr *elfEhdr) {
+ info.loadAddr = uintptr(unsafe.Pointer(hdr))
+
+ pt := unsafe.Pointer(info.loadAddr + uintptr(hdr.e_phoff))
+
+ // We need two things from the segment table: the load offset
+ // and the dynamic table.
+ var foundVaddr bool
+ var dyn *[vdsoDynSize]elfDyn
+ for i := uint16(0); i < hdr.e_phnum; i++ {
+ pt := (*elfPhdr)(add(pt, uintptr(i)*unsafe.Sizeof(elfPhdr{})))
+ switch pt.p_type {
+ case _PT_LOAD:
+ if !foundVaddr && pt.p_flags&_PF_X == _PF_X {
+ foundVaddr = true
+ info.loadBase = info.loadAddr + uintptr(pt.p_vaddr)
+ vdsoLoadBase = info.loadBase
+ vdsoMemSize = uintptr(pt.p_memsz)
+ }
+
+ case _PT_DYNAMIC:
+ dyn = (*[vdsoDynSize]elfDyn)(unsafe.Pointer(info.loadAddr + uintptr(pt.p_vaddr)))
+ }
+ }
+
+ if !foundVaddr || dyn == nil {
+ crash()
+ }
+
+ // Fish out the useful bits of the dynamic table.
+ var gnuhash *[vdsoHashSize]uint32
+ info.symstrings = nil
+ info.symtab = nil
+ for i := 0; dyn[i].d_tag != _DT_NULL; i++ {
+ dt := &dyn[i]
+ p := info.loadAddr + uintptr(dt.d_val)
+ switch dt.d_tag {
+ case _DT_STRTAB:
+ info.symstrings = (*[vdsoSymStringsSize]byte)(unsafe.Pointer(p))
+ case _DT_SYMTAB:
+ info.symtab = (*[vdsoSymTabSize]elfSym)(unsafe.Pointer(p))
+ case _DT_GNU_HASH:
+ gnuhash = (*[vdsoHashSize]uint32)(unsafe.Pointer(p))
+ }
+ }
+
+ if info.symstrings == nil || info.symtab == nil || gnuhash == nil {
+ crash()
+ }
+
+ // Parse the GNU hash table header.
+ info.nBuckets = gnuhash[0]
+ info.symOff = gnuhash[1]
+ bloomSize := gnuhash[2]
+ info.bucket = gnuhash[4+bloomSize*uint32(vdsoBloomSizeScale):][:info.nBuckets]
+ info.chain = gnuhash[4+bloomSize*uint32(vdsoBloomSizeScale)+info.nBuckets:]
+}
+
+func vdsoResolveSymbols(info *vdsoInfo) {
+ // Loop over the keys we wish to resolve and assign the symbol's offset to the
+ // pointer in the key table. We assume that all symbols we want to resolve
+ // exist, and crash if we are unable to resolve any of them.
+ for _, k := range vdsoSymbolKeys {
+ symIndex := info.bucket[k.gnuHash%info.nBuckets]
+
+ // Anything less than info.symOff is e.g. STN_UNDEF and will not be
+ // resolvable. Since that means we wouldn't be able to resolve this
+ // symbol we definitely need, crash.
+ if symIndex < info.symOff {
+ crash()
+ }
+
+ // For each symbol in this bucket, compare hashes and the name. If the
+ // symbol is not found, crash.
+ for ; ; symIndex++ {
+ hash := info.chain[symIndex-info.symOff]
+ sym := &info.symtab[symIndex]
+ if hash|1 == k.gnuHash|1 && k.name == gostringnocopy(&info.symstrings[sym.st_name]) {
+ typ := _ELF_ST_TYPE(sym.st_info)
+ bind := _ELF_ST_BIND(sym.st_info)
+ // If this isn't a function, doesn't have the appropriate binding, or
+ // has an undefined index, crash.
+ if typ != _STT_FUNC || (bind != _STB_GLOBAL && bind != _STB_WEAK) || sym.st_shndx == _SHN_UNDEF {
+ crash()
+ }
+
+ // We've found our symbol, assign its address and continue on to the
+ // next symbol.
+ *k.ptr = info.loadAddr + uintptr(sym.st_value)
+ break
+ }
+
+ if hash&1 != 0 {
+ // We made it to the end of this chain without finding
+ // our symbol. We won't find it. Crash.
+ crash()
+ }
+ }
+ }
+}
+
+func loadVDSO(val uintptr) {
+ var info vdsoInfo
+ // TODO(dhobsd): rsc says in vdso_linux.go that the compiler thinks info
+ // escapes. Remove/fix/investigate this comment at some point.
+ info1 := (*vdsoInfo)(noescape(unsafe.Pointer(&info)))
+ vdsoInit(info1, (*elfEhdr)(unsafe.Pointer(val)))
+ vdsoResolveSymbols(info1)
+}
+
+// inVDSOPage returns whether an observed PC falls within the VDSO mapping.
+func inVDSOPage(pc uintptr) bool {
+ return pc >= vdsoLoadBase && pc < vdsoLoadBase+vdsoMemSize
+}
diff --git a/src/runtime/vdso_in_none.go b/src/runtime/vdso_in_none.go
index 7f4019c..6093b9c 100644
--- a/src/runtime/vdso_in_none.go
+++ b/src/runtime/vdso_in_none.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux,!386,!amd64,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le !linux
+// +build linux,!386,!amd64,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le !fuchsia,!linux
package runtime
diff --git a/src/runtime/vdso_keys_fuchsia.go b/src/runtime/vdso_keys_fuchsia.go
new file mode 100644
index 0000000..002c4a9
--- /dev/null
+++ b/src/runtime/vdso_keys_fuchsia.go
@@ -0,0 +1,1495 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// WARNING: THIS FILE IS MACHINE GENERATED BY //tools/kazoo. DO NOT EDIT.
+
+package runtime
+
+import "unsafe"
+
+const (
+ // vdsoArrayMax is the byte-size of a maximally sized array on this architecture.
+ // See cmd/compile/internal/amd64/galign.go arch.MAXWIDTH initialization.
+ vdsoArrayMax = 1<<50 - 1
+)
+
+var vdsoSymbolKeys = []vdsoSymbolKey{
+ {"_zx_bti_create", 0x7833987, &vdso_zx_bti_create},
+ {"_zx_bti_pin", 0x2aa0e6da, &vdso_zx_bti_pin},
+ {"_zx_bti_release_quarantine", 0x441c1c6b, &vdso_zx_bti_release_quarantine},
+ {"_zx_cache_flush", 0x319eccca, &vdso_zx_cache_flush},
+ {"_zx_channel_create", 0xe5199281, &vdso_zx_channel_create},
+ {"_zx_channel_read", 0xe7169b09, &vdso_zx_channel_read},
+ {"_zx_channel_read_etc", 0x77c4cc84, &vdso_zx_channel_read_etc},
+ {"_zx_channel_write", 0xca4bbc18, &vdso_zx_channel_write},
+ {"_zx_channel_write_etc", 0x43b1dd13, &vdso_zx_channel_write_etc},
+ {"_zx_channel_call_noretry", 0xb5ad0b5b, &vdso_zx_channel_call_noretry},
+ {"_zx_channel_call_finish", 0x85ce3de9, &vdso_zx_channel_call_finish},
+ {"_zx_channel_call", 0xe70e51c9, &vdso_zx_channel_call},
+ {"_zx_channel_call_etc_noretry", 0xc3a3e7d6, &vdso_zx_channel_call_etc_noretry},
+ {"_zx_channel_call_etc_finish", 0xd3cdf704, &vdso_zx_channel_call_etc_finish},
+ {"_zx_channel_call_etc", 0x8639e344, &vdso_zx_channel_call_etc},
+ {"_zx_clock_get", 0x3fb5d7c0, &vdso_zx_clock_get},
+ {"_zx_clock_get_monotonic", 0xb00e6115, &vdso_zx_clock_get_monotonic},
+ {"_zx_clock_adjust", 0x87cf38ab, &vdso_zx_clock_adjust},
+ {"_zx_clock_get_monotonic_via_kernel", 0x3dc12b54, &vdso_zx_clock_get_monotonic_via_kernel},
+ {"_zx_clock_create", 0x8d73ce14, &vdso_zx_clock_create},
+ {"_zx_clock_read", 0x3676d5dc, &vdso_zx_clock_read},
+ {"_zx_clock_get_details", 0xb7227265, &vdso_zx_clock_get_details},
+ {"_zx_clock_update", 0xb74bec03, &vdso_zx_clock_update},
+ {"_zx_cprng_draw_once", 0x40248ce0, &vdso_zx_cprng_draw_once},
+ {"_zx_cprng_draw", 0x12929c5c, &vdso_zx_cprng_draw},
+ {"_zx_cprng_add_entropy", 0x1617dd47, &vdso_zx_cprng_add_entropy},
+ {"_zx_debug_read", 0x6c062397, &vdso_zx_debug_read},
+ {"_zx_debug_write", 0xed2c5666, &vdso_zx_debug_write},
+ {"_zx_debug_send_command", 0xac6e8203, &vdso_zx_debug_send_command},
+ {"_zx_debuglog_create", 0x2504f1, &vdso_zx_debuglog_create},
+ {"_zx_debuglog_write", 0x3f7aa088, &vdso_zx_debuglog_write},
+ {"_zx_debuglog_read", 0x66c2b179, &vdso_zx_debuglog_read},
+ {"_zx_event_create", 0x4c39490a, &vdso_zx_event_create},
+ {"_zx_eventpair_create", 0xe3fd9c16, &vdso_zx_eventpair_create},
+ {"_zx_exception_get_thread", 0xb1c70bba, &vdso_zx_exception_get_thread},
+ {"_zx_exception_get_process", 0xcddbd761, &vdso_zx_exception_get_process},
+ {"_zx_fifo_create", 0xf197cb2c, &vdso_zx_fifo_create},
+ {"_zx_fifo_read", 0x3ec8acf4, &vdso_zx_fifo_read},
+ {"_zx_fifo_write", 0x18400b63, &vdso_zx_fifo_write},
+ {"_zx_framebuffer_get_info", 0xe6c88924, &vdso_zx_framebuffer_get_info},
+ {"_zx_framebuffer_set_range", 0x364ad6b1, &vdso_zx_framebuffer_set_range},
+ {"_zx_futex_wait", 0xb089e255, &vdso_zx_futex_wait},
+ {"_zx_futex_wake", 0xb089e288, &vdso_zx_futex_wake},
+ {"_zx_futex_requeue", 0xd509be7c, &vdso_zx_futex_requeue},
+ {"_zx_futex_wake_single_owner", 0x63970173, &vdso_zx_futex_wake_single_owner},
+ {"_zx_futex_requeue_single_owner", 0x8f9a9e7, &vdso_zx_futex_requeue_single_owner},
+ {"_zx_futex_get_owner", 0xf16dec6a, &vdso_zx_futex_get_owner},
+ {"_zx_guest_create", 0x6f318390, &vdso_zx_guest_create},
+ {"_zx_guest_set_trap", 0xffe2547e, &vdso_zx_guest_set_trap},
+ {"_zx_handle_close", 0xe769f876, &vdso_zx_handle_close},
+ {"_zx_handle_close_many", 0x8a9a3aaa, &vdso_zx_handle_close_many},
+ {"_zx_handle_duplicate", 0x3f0a83b, &vdso_zx_handle_duplicate},
+ {"_zx_handle_replace", 0xdc2d9edc, &vdso_zx_handle_replace},
+ {"_zx_interrupt_create", 0xaa939795, &vdso_zx_interrupt_create},
+ {"_zx_interrupt_bind", 0xa25b97be, &vdso_zx_interrupt_bind},
+ {"_zx_interrupt_wait", 0xa266f916, &vdso_zx_interrupt_wait},
+ {"_zx_interrupt_destroy", 0x2cb5724b, &vdso_zx_interrupt_destroy},
+ {"_zx_interrupt_ack", 0x3b390f10, &vdso_zx_interrupt_ack},
+ {"_zx_interrupt_trigger", 0x19f00875, &vdso_zx_interrupt_trigger},
+ {"_zx_interrupt_bind_vcpu", 0x505f9f1b, &vdso_zx_interrupt_bind_vcpu},
+ {"_zx_iommu_create", 0x297b6af, &vdso_zx_iommu_create},
+ {"_zx_ioports_request", 0xb8f1c0ad, &vdso_zx_ioports_request},
+ {"_zx_ioports_release", 0xb88e6f05, &vdso_zx_ioports_release},
+ {"_zx_job_create", 0x6b9cbb63, &vdso_zx_job_create},
+ {"_zx_job_set_policy", 0xa45d60ea, &vdso_zx_job_set_policy},
+ {"_zx_job_set_critical", 0x129ab785, &vdso_zx_job_set_critical},
+ {"_zx_ktrace_read", 0x7a59dbca, &vdso_zx_ktrace_read},
+ {"_zx_ktrace_control", 0x15debecf, &vdso_zx_ktrace_control},
+ {"_zx_ktrace_write", 0xc5f714f9, &vdso_zx_ktrace_write},
+ {"_zx_nanosleep", 0xe9d6145a, &vdso_zx_nanosleep},
+ {"_zx_ticks_get", 0xaeb30a32, &vdso_zx_ticks_get},
+ {"_zx_ticks_per_second", 0x6ed47574, &vdso_zx_ticks_per_second},
+ {"_zx_deadline_after", 0x6253eb5c, &vdso_zx_deadline_after},
+ {"_zx_vmar_unmap_handle_close_thread_exit", 0x5a372afb, &vdso_zx_vmar_unmap_handle_close_thread_exit},
+ {"_zx_futex_wake_handle_close_thread_exit", 0x49731cb8, &vdso_zx_futex_wake_handle_close_thread_exit},
+ {"_zx_ticks_get_via_kernel", 0x821bc851, &vdso_zx_ticks_get_via_kernel},
+ {"_zx_msi_allocate", 0xf5370e42, &vdso_zx_msi_allocate},
+ {"_zx_msi_create", 0xbf7b04f1, &vdso_zx_msi_create},
+ {"_zx_mtrace_control", 0x8c5f3211, &vdso_zx_mtrace_control},
+ {"_zx_object_wait_one", 0xed850621, &vdso_zx_object_wait_one},
+ {"_zx_object_wait_many", 0x9e247bd4, &vdso_zx_object_wait_many},
+ {"_zx_object_wait_async", 0x61e4dcdd, &vdso_zx_object_wait_async},
+ {"_zx_object_signal", 0x460ab89, &vdso_zx_object_signal},
+ {"_zx_object_signal_peer", 0xe90c8694, &vdso_zx_object_signal_peer},
+ {"_zx_object_get_property", 0xd60c8aef, &vdso_zx_object_get_property},
+ {"_zx_object_set_property", 0x2174eb7b, &vdso_zx_object_set_property},
+ {"_zx_object_get_info", 0x7582ddf6, &vdso_zx_object_get_info},
+ {"_zx_object_get_child", 0x256ecc2e, &vdso_zx_object_get_child},
+ {"_zx_object_set_profile", 0x7d1d2727, &vdso_zx_object_set_profile},
+ {"_zx_pager_create", 0x8d44ed57, &vdso_zx_pager_create},
+ {"_zx_pager_create_vmo", 0x564fdd48, &vdso_zx_pager_create_vmo},
+ {"_zx_pager_detach_vmo", 0x2072c15d, &vdso_zx_pager_detach_vmo},
+ {"_zx_pager_supply_pages", 0x69d1fc7f, &vdso_zx_pager_supply_pages},
+ {"_zx_pager_op_range", 0x5e8195ae, &vdso_zx_pager_op_range},
+ {"_zx_pc_firmware_tables", 0x1a05d1fe, &vdso_zx_pc_firmware_tables},
+ {"_zx_pci_get_nth_device", 0x32106f08, &vdso_zx_pci_get_nth_device},
+ {"_zx_pci_enable_bus_master", 0x76091cab, &vdso_zx_pci_enable_bus_master},
+ {"_zx_pci_reset_device", 0xc6496142, &vdso_zx_pci_reset_device},
+ {"_zx_pci_config_read", 0xc765eb61, &vdso_zx_pci_config_read},
+ {"_zx_pci_config_write", 0xb4851770, &vdso_zx_pci_config_write},
+ {"_zx_pci_cfg_pio_rw", 0xda224f4f, &vdso_zx_pci_cfg_pio_rw},
+ {"_zx_pci_get_bar", 0x14ec9dc4, &vdso_zx_pci_get_bar},
+ {"_zx_pci_map_interrupt", 0x3c5aa3fa, &vdso_zx_pci_map_interrupt},
+ {"_zx_pci_query_irq_mode", 0xdf173875, &vdso_zx_pci_query_irq_mode},
+ {"_zx_pci_set_irq_mode", 0xedfcadcb, &vdso_zx_pci_set_irq_mode},
+ {"_zx_pci_init", 0x4db59c04, &vdso_zx_pci_init},
+ {"_zx_pci_add_subtract_io_range", 0x5fcd4b03, &vdso_zx_pci_add_subtract_io_range},
+ {"_zx_pmt_unpin", 0x8e954c6f, &vdso_zx_pmt_unpin},
+ {"_zx_port_create", 0x5294baed, &vdso_zx_port_create},
+ {"_zx_port_queue", 0x8f22883e, &vdso_zx_port_queue},
+ {"_zx_port_wait", 0xfc97666e, &vdso_zx_port_wait},
+ {"_zx_port_cancel", 0x5166105f, &vdso_zx_port_cancel},
+ {"_zx_process_exit", 0xc7f8a64d, &vdso_zx_process_exit},
+ {"_zx_process_create", 0xa3a21647, &vdso_zx_process_create},
+ {"_zx_process_start", 0xc80873a1, &vdso_zx_process_start},
+ {"_zx_process_read_memory", 0x883ab627, &vdso_zx_process_read_memory},
+ {"_zx_process_write_memory", 0x18162116, &vdso_zx_process_write_memory},
+ {"_zx_profile_create", 0x28e1bf39, &vdso_zx_profile_create},
+ {"_zx_resource_create", 0x22a0d150, &vdso_zx_resource_create},
+ {"_zx_smc_call", 0x63f0533, &vdso_zx_smc_call},
+ {"_zx_socket_create", 0xf536e851, &vdso_zx_socket_create},
+ {"_zx_socket_write", 0x5e2d97e8, &vdso_zx_socket_write},
+ {"_zx_socket_read", 0xb5443cd9, &vdso_zx_socket_read},
+ {"_zx_socket_shutdown", 0x78afef9, &vdso_zx_socket_shutdown},
+ {"_zx_stream_create", 0x5a685d14, &vdso_zx_stream_create},
+ {"_zx_stream_writev", 0x89120a21, &vdso_zx_stream_writev},
+ {"_zx_stream_writev_at", 0xcd618395, &vdso_zx_stream_writev_at},
+ {"_zx_stream_readv", 0xae7040d2, &vdso_zx_stream_readv},
+ {"_zx_stream_readv_at", 0x7bfd08a6, &vdso_zx_stream_readv_at},
+ {"_zx_stream_seek", 0xcefc31c8, &vdso_zx_stream_seek},
+ {"_zx_syscall_test_0", 0xb62fbcde, &vdso_zx_syscall_test_0},
+ {"_zx_syscall_test_1", 0xb62fbcdf, &vdso_zx_syscall_test_1},
+ {"_zx_syscall_test_2", 0xb62fbce0, &vdso_zx_syscall_test_2},
+ {"_zx_syscall_test_3", 0xb62fbce1, &vdso_zx_syscall_test_3},
+ {"_zx_syscall_test_4", 0xb62fbce2, &vdso_zx_syscall_test_4},
+ {"_zx_syscall_test_5", 0xb62fbce3, &vdso_zx_syscall_test_5},
+ {"_zx_syscall_test_6", 0xb62fbce4, &vdso_zx_syscall_test_6},
+ {"_zx_syscall_test_7", 0xb62fbce5, &vdso_zx_syscall_test_7},
+ {"_zx_syscall_test_8", 0xb62fbce6, &vdso_zx_syscall_test_8},
+ {"_zx_syscall_test_wrapper", 0x4d7af9cf, &vdso_zx_syscall_test_wrapper},
+ {"_zx_syscall_test_handle_create", 0xb996e56d, &vdso_zx_syscall_test_handle_create},
+ {"_zx_system_get_dcache_line_size", 0x2d6d6511, &vdso_zx_system_get_dcache_line_size},
+ {"_zx_system_get_num_cpus", 0x8e92a0c2, &vdso_zx_system_get_num_cpus},
+ {"_zx_system_get_version_string", 0xf2daeaf4, &vdso_zx_system_get_version_string},
+ {"_zx_system_get_physmem", 0x5a0e027b, &vdso_zx_system_get_physmem},
+ {"_zx_system_get_features", 0x42682df7, &vdso_zx_system_get_features},
+ {"_zx_system_get_event", 0x7a0b68da, &vdso_zx_system_get_event},
+ {"_zx_system_mexec", 0xd142362b, &vdso_zx_system_mexec},
+ {"_zx_system_mexec_payload_get", 0x34bd22b3, &vdso_zx_system_mexec_payload_get},
+ {"_zx_system_powerctl", 0x43f6ae09, &vdso_zx_system_powerctl},
+ {"_zx_task_suspend", 0xe13ad509, &vdso_zx_task_suspend},
+ {"_zx_task_suspend_token", 0x341e98a9, &vdso_zx_task_suspend_token},
+ {"_zx_task_create_exception_channel", 0x5318f181, &vdso_zx_task_create_exception_channel},
+ {"_zx_task_kill", 0x1ae4e313, &vdso_zx_task_kill},
+ {"_zx_thread_exit", 0xed44fe6, &vdso_zx_thread_exit},
+ {"_zx_thread_create", 0x100e8a20, &vdso_zx_thread_create},
+ {"_zx_thread_start", 0xea59505a, &vdso_zx_thread_start},
+ {"_zx_thread_read_state", 0x82fd0a88, &vdso_zx_thread_read_state},
+ {"_zx_thread_write_state", 0xb9265eb7, &vdso_zx_thread_write_state},
+ {"_zx_timer_create", 0x943773a9, &vdso_zx_timer_create},
+ {"_zx_timer_set", 0xa2689081, &vdso_zx_timer_set},
+ {"_zx_timer_cancel", 0x9308c91b, &vdso_zx_timer_cancel},
+ {"_zx_vcpu_create", 0x458b1fc6, &vdso_zx_vcpu_create},
+ {"_zx_vcpu_resume", 0x67a54423, &vdso_zx_vcpu_resume},
+ {"_zx_vcpu_interrupt", 0x4ddc6df, &vdso_zx_vcpu_interrupt},
+ {"_zx_vcpu_read_state", 0xaa78032e, &vdso_zx_vcpu_read_state},
+ {"_zx_vcpu_write_state", 0xd0006c1d, &vdso_zx_vcpu_write_state},
+ {"_zx_vmar_allocate", 0x4cac85ef, &vdso_zx_vmar_allocate},
+ {"_zx_vmar_destroy", 0xc2294134, &vdso_zx_vmar_destroy},
+ {"_zx_vmar_map", 0xc7b00448, &vdso_zx_vmar_map},
+ {"_zx_vmar_unmap", 0x745a1b6b, &vdso_zx_vmar_unmap},
+ {"_zx_vmar_protect", 0x7bee8f8b, &vdso_zx_vmar_protect},
+ {"_zx_vmar_op_range", 0x4e117375, &vdso_zx_vmar_op_range},
+ {"_zx_vmo_create", 0xb27a765a, &vdso_zx_vmo_create},
+ {"_zx_vmo_read", 0xe70ab4a2, &vdso_zx_vmo_read},
+ {"_zx_vmo_write", 0xc8c308d1, &vdso_zx_vmo_write},
+ {"_zx_vmo_get_size", 0x261c77c0, &vdso_zx_vmo_get_size},
+ {"_zx_vmo_set_size", 0x3932724c, &vdso_zx_vmo_set_size},
+ {"_zx_vmo_op_range", 0xa73d6b71, &vdso_zx_vmo_op_range},
+ {"_zx_vmo_create_child", 0x72c8b3dd, &vdso_zx_vmo_create_child},
+ {"_zx_vmo_set_cache_policy", 0xe509bad4, &vdso_zx_vmo_set_cache_policy},
+ {"_zx_vmo_replace_as_executable", 0xbd38e576, &vdso_zx_vmo_replace_as_executable},
+ {"_zx_vmo_create_contiguous", 0x466a8289, &vdso_zx_vmo_create_contiguous},
+ {"_zx_vmo_create_physical", 0x659677b6, &vdso_zx_vmo_create_physical},
+}
+
+//go:cgo_import_dynamic vdso_zx_bti_create zx_bti_create
+//go:cgo_import_dynamic vdso_zx_bti_pin zx_bti_pin
+//go:cgo_import_dynamic vdso_zx_bti_release_quarantine zx_bti_release_quarantine
+//go:cgo_import_dynamic vdso_zx_cache_flush zx_cache_flush
+//go:cgo_import_dynamic vdso_zx_channel_create zx_channel_create
+//go:cgo_import_dynamic vdso_zx_channel_read zx_channel_read
+//go:cgo_import_dynamic vdso_zx_channel_read_etc zx_channel_read_etc
+//go:cgo_import_dynamic vdso_zx_channel_write zx_channel_write
+//go:cgo_import_dynamic vdso_zx_channel_write_etc zx_channel_write_etc
+//go:cgo_import_dynamic vdso_zx_channel_call_noretry zx_channel_call_noretry
+//go:cgo_import_dynamic vdso_zx_channel_call_finish zx_channel_call_finish
+//go:cgo_import_dynamic vdso_zx_channel_call zx_channel_call
+//go:cgo_import_dynamic vdso_zx_channel_call_etc_noretry zx_channel_call_etc_noretry
+//go:cgo_import_dynamic vdso_zx_channel_call_etc_finish zx_channel_call_etc_finish
+//go:cgo_import_dynamic vdso_zx_channel_call_etc zx_channel_call_etc
+//go:cgo_import_dynamic vdso_zx_clock_get zx_clock_get
+//go:cgo_import_dynamic vdso_zx_clock_get_monotonic zx_clock_get_monotonic
+//go:cgo_import_dynamic vdso_zx_clock_adjust zx_clock_adjust
+//go:cgo_import_dynamic vdso_zx_clock_get_monotonic_via_kernel zx_clock_get_monotonic_via_kernel
+//go:cgo_import_dynamic vdso_zx_clock_create zx_clock_create
+//go:cgo_import_dynamic vdso_zx_clock_read zx_clock_read
+//go:cgo_import_dynamic vdso_zx_clock_get_details zx_clock_get_details
+//go:cgo_import_dynamic vdso_zx_clock_update zx_clock_update
+//go:cgo_import_dynamic vdso_zx_cprng_draw_once zx_cprng_draw_once
+//go:cgo_import_dynamic vdso_zx_cprng_draw zx_cprng_draw
+//go:cgo_import_dynamic vdso_zx_cprng_add_entropy zx_cprng_add_entropy
+//go:cgo_import_dynamic vdso_zx_debug_read zx_debug_read
+//go:cgo_import_dynamic vdso_zx_debug_write zx_debug_write
+//go:cgo_import_dynamic vdso_zx_debug_send_command zx_debug_send_command
+//go:cgo_import_dynamic vdso_zx_debuglog_create zx_debuglog_create
+//go:cgo_import_dynamic vdso_zx_debuglog_write zx_debuglog_write
+//go:cgo_import_dynamic vdso_zx_debuglog_read zx_debuglog_read
+//go:cgo_import_dynamic vdso_zx_event_create zx_event_create
+//go:cgo_import_dynamic vdso_zx_eventpair_create zx_eventpair_create
+//go:cgo_import_dynamic vdso_zx_exception_get_thread zx_exception_get_thread
+//go:cgo_import_dynamic vdso_zx_exception_get_process zx_exception_get_process
+//go:cgo_import_dynamic vdso_zx_fifo_create zx_fifo_create
+//go:cgo_import_dynamic vdso_zx_fifo_read zx_fifo_read
+//go:cgo_import_dynamic vdso_zx_fifo_write zx_fifo_write
+//go:cgo_import_dynamic vdso_zx_framebuffer_get_info zx_framebuffer_get_info
+//go:cgo_import_dynamic vdso_zx_framebuffer_set_range zx_framebuffer_set_range
+//go:cgo_import_dynamic vdso_zx_futex_wait zx_futex_wait
+//go:cgo_import_dynamic vdso_zx_futex_wake zx_futex_wake
+//go:cgo_import_dynamic vdso_zx_futex_requeue zx_futex_requeue
+//go:cgo_import_dynamic vdso_zx_futex_wake_single_owner zx_futex_wake_single_owner
+//go:cgo_import_dynamic vdso_zx_futex_requeue_single_owner zx_futex_requeue_single_owner
+//go:cgo_import_dynamic vdso_zx_futex_get_owner zx_futex_get_owner
+//go:cgo_import_dynamic vdso_zx_guest_create zx_guest_create
+//go:cgo_import_dynamic vdso_zx_guest_set_trap zx_guest_set_trap
+//go:cgo_import_dynamic vdso_zx_handle_close zx_handle_close
+//go:cgo_import_dynamic vdso_zx_handle_close_many zx_handle_close_many
+//go:cgo_import_dynamic vdso_zx_handle_duplicate zx_handle_duplicate
+//go:cgo_import_dynamic vdso_zx_handle_replace zx_handle_replace
+//go:cgo_import_dynamic vdso_zx_interrupt_create zx_interrupt_create
+//go:cgo_import_dynamic vdso_zx_interrupt_bind zx_interrupt_bind
+//go:cgo_import_dynamic vdso_zx_interrupt_wait zx_interrupt_wait
+//go:cgo_import_dynamic vdso_zx_interrupt_destroy zx_interrupt_destroy
+//go:cgo_import_dynamic vdso_zx_interrupt_ack zx_interrupt_ack
+//go:cgo_import_dynamic vdso_zx_interrupt_trigger zx_interrupt_trigger
+//go:cgo_import_dynamic vdso_zx_interrupt_bind_vcpu zx_interrupt_bind_vcpu
+//go:cgo_import_dynamic vdso_zx_iommu_create zx_iommu_create
+//go:cgo_import_dynamic vdso_zx_ioports_request zx_ioports_request
+//go:cgo_import_dynamic vdso_zx_ioports_release zx_ioports_release
+//go:cgo_import_dynamic vdso_zx_job_create zx_job_create
+//go:cgo_import_dynamic vdso_zx_job_set_policy zx_job_set_policy
+//go:cgo_import_dynamic vdso_zx_job_set_critical zx_job_set_critical
+//go:cgo_import_dynamic vdso_zx_ktrace_read zx_ktrace_read
+//go:cgo_import_dynamic vdso_zx_ktrace_control zx_ktrace_control
+//go:cgo_import_dynamic vdso_zx_ktrace_write zx_ktrace_write
+//go:cgo_import_dynamic vdso_zx_nanosleep zx_nanosleep
+//go:cgo_import_dynamic vdso_zx_ticks_get zx_ticks_get
+//go:cgo_import_dynamic vdso_zx_ticks_per_second zx_ticks_per_second
+//go:cgo_import_dynamic vdso_zx_deadline_after zx_deadline_after
+//go:cgo_import_dynamic vdso_zx_vmar_unmap_handle_close_thread_exit zx_vmar_unmap_handle_close_thread_exit
+//go:cgo_import_dynamic vdso_zx_futex_wake_handle_close_thread_exit zx_futex_wake_handle_close_thread_exit
+//go:cgo_import_dynamic vdso_zx_ticks_get_via_kernel zx_ticks_get_via_kernel
+//go:cgo_import_dynamic vdso_zx_msi_allocate zx_msi_allocate
+//go:cgo_import_dynamic vdso_zx_msi_create zx_msi_create
+//go:cgo_import_dynamic vdso_zx_mtrace_control zx_mtrace_control
+//go:cgo_import_dynamic vdso_zx_object_wait_one zx_object_wait_one
+//go:cgo_import_dynamic vdso_zx_object_wait_many zx_object_wait_many
+//go:cgo_import_dynamic vdso_zx_object_wait_async zx_object_wait_async
+//go:cgo_import_dynamic vdso_zx_object_signal zx_object_signal
+//go:cgo_import_dynamic vdso_zx_object_signal_peer zx_object_signal_peer
+//go:cgo_import_dynamic vdso_zx_object_get_property zx_object_get_property
+//go:cgo_import_dynamic vdso_zx_object_set_property zx_object_set_property
+//go:cgo_import_dynamic vdso_zx_object_get_info zx_object_get_info
+//go:cgo_import_dynamic vdso_zx_object_get_child zx_object_get_child
+//go:cgo_import_dynamic vdso_zx_object_set_profile zx_object_set_profile
+//go:cgo_import_dynamic vdso_zx_pager_create zx_pager_create
+//go:cgo_import_dynamic vdso_zx_pager_create_vmo zx_pager_create_vmo
+//go:cgo_import_dynamic vdso_zx_pager_detach_vmo zx_pager_detach_vmo
+//go:cgo_import_dynamic vdso_zx_pager_supply_pages zx_pager_supply_pages
+//go:cgo_import_dynamic vdso_zx_pager_op_range zx_pager_op_range
+//go:cgo_import_dynamic vdso_zx_pc_firmware_tables zx_pc_firmware_tables
+//go:cgo_import_dynamic vdso_zx_pci_get_nth_device zx_pci_get_nth_device
+//go:cgo_import_dynamic vdso_zx_pci_enable_bus_master zx_pci_enable_bus_master
+//go:cgo_import_dynamic vdso_zx_pci_reset_device zx_pci_reset_device
+//go:cgo_import_dynamic vdso_zx_pci_config_read zx_pci_config_read
+//go:cgo_import_dynamic vdso_zx_pci_config_write zx_pci_config_write
+//go:cgo_import_dynamic vdso_zx_pci_cfg_pio_rw zx_pci_cfg_pio_rw
+//go:cgo_import_dynamic vdso_zx_pci_get_bar zx_pci_get_bar
+//go:cgo_import_dynamic vdso_zx_pci_map_interrupt zx_pci_map_interrupt
+//go:cgo_import_dynamic vdso_zx_pci_query_irq_mode zx_pci_query_irq_mode
+//go:cgo_import_dynamic vdso_zx_pci_set_irq_mode zx_pci_set_irq_mode
+//go:cgo_import_dynamic vdso_zx_pci_init zx_pci_init
+//go:cgo_import_dynamic vdso_zx_pci_add_subtract_io_range zx_pci_add_subtract_io_range
+//go:cgo_import_dynamic vdso_zx_pmt_unpin zx_pmt_unpin
+//go:cgo_import_dynamic vdso_zx_port_create zx_port_create
+//go:cgo_import_dynamic vdso_zx_port_queue zx_port_queue
+//go:cgo_import_dynamic vdso_zx_port_wait zx_port_wait
+//go:cgo_import_dynamic vdso_zx_port_cancel zx_port_cancel
+//go:cgo_import_dynamic vdso_zx_process_exit zx_process_exit
+//go:cgo_import_dynamic vdso_zx_process_create zx_process_create
+//go:cgo_import_dynamic vdso_zx_process_start zx_process_start
+//go:cgo_import_dynamic vdso_zx_process_read_memory zx_process_read_memory
+//go:cgo_import_dynamic vdso_zx_process_write_memory zx_process_write_memory
+//go:cgo_import_dynamic vdso_zx_profile_create zx_profile_create
+//go:cgo_import_dynamic vdso_zx_resource_create zx_resource_create
+//go:cgo_import_dynamic vdso_zx_smc_call zx_smc_call
+//go:cgo_import_dynamic vdso_zx_socket_create zx_socket_create
+//go:cgo_import_dynamic vdso_zx_socket_write zx_socket_write
+//go:cgo_import_dynamic vdso_zx_socket_read zx_socket_read
+//go:cgo_import_dynamic vdso_zx_socket_shutdown zx_socket_shutdown
+//go:cgo_import_dynamic vdso_zx_stream_create zx_stream_create
+//go:cgo_import_dynamic vdso_zx_stream_writev zx_stream_writev
+//go:cgo_import_dynamic vdso_zx_stream_writev_at zx_stream_writev_at
+//go:cgo_import_dynamic vdso_zx_stream_readv zx_stream_readv
+//go:cgo_import_dynamic vdso_zx_stream_readv_at zx_stream_readv_at
+//go:cgo_import_dynamic vdso_zx_stream_seek zx_stream_seek
+//go:cgo_import_dynamic vdso_zx_syscall_test_0 zx_syscall_test_0
+//go:cgo_import_dynamic vdso_zx_syscall_test_1 zx_syscall_test_1
+//go:cgo_import_dynamic vdso_zx_syscall_test_2 zx_syscall_test_2
+//go:cgo_import_dynamic vdso_zx_syscall_test_3 zx_syscall_test_3
+//go:cgo_import_dynamic vdso_zx_syscall_test_4 zx_syscall_test_4
+//go:cgo_import_dynamic vdso_zx_syscall_test_5 zx_syscall_test_5
+//go:cgo_import_dynamic vdso_zx_syscall_test_6 zx_syscall_test_6
+//go:cgo_import_dynamic vdso_zx_syscall_test_7 zx_syscall_test_7
+//go:cgo_import_dynamic vdso_zx_syscall_test_8 zx_syscall_test_8
+//go:cgo_import_dynamic vdso_zx_syscall_test_wrapper zx_syscall_test_wrapper
+//go:cgo_import_dynamic vdso_zx_syscall_test_handle_create zx_syscall_test_handle_create
+//go:cgo_import_dynamic vdso_zx_system_get_dcache_line_size zx_system_get_dcache_line_size
+//go:cgo_import_dynamic vdso_zx_system_get_num_cpus zx_system_get_num_cpus
+//go:cgo_import_dynamic vdso_zx_system_get_version_string zx_system_get_version_string
+//go:cgo_import_dynamic vdso_zx_system_get_physmem zx_system_get_physmem
+//go:cgo_import_dynamic vdso_zx_system_get_features zx_system_get_features
+//go:cgo_import_dynamic vdso_zx_system_get_event zx_system_get_event
+//go:cgo_import_dynamic vdso_zx_system_mexec zx_system_mexec
+//go:cgo_import_dynamic vdso_zx_system_mexec_payload_get zx_system_mexec_payload_get
+//go:cgo_import_dynamic vdso_zx_system_powerctl zx_system_powerctl
+//go:cgo_import_dynamic vdso_zx_task_suspend zx_task_suspend
+//go:cgo_import_dynamic vdso_zx_task_suspend_token zx_task_suspend_token
+//go:cgo_import_dynamic vdso_zx_task_create_exception_channel zx_task_create_exception_channel
+//go:cgo_import_dynamic vdso_zx_task_kill zx_task_kill
+//go:cgo_import_dynamic vdso_zx_thread_exit zx_thread_exit
+//go:cgo_import_dynamic vdso_zx_thread_create zx_thread_create
+//go:cgo_import_dynamic vdso_zx_thread_start zx_thread_start
+//go:cgo_import_dynamic vdso_zx_thread_read_state zx_thread_read_state
+//go:cgo_import_dynamic vdso_zx_thread_write_state zx_thread_write_state
+//go:cgo_import_dynamic vdso_zx_timer_create zx_timer_create
+//go:cgo_import_dynamic vdso_zx_timer_set zx_timer_set
+//go:cgo_import_dynamic vdso_zx_timer_cancel zx_timer_cancel
+//go:cgo_import_dynamic vdso_zx_vcpu_create zx_vcpu_create
+//go:cgo_import_dynamic vdso_zx_vcpu_resume zx_vcpu_resume
+//go:cgo_import_dynamic vdso_zx_vcpu_interrupt zx_vcpu_interrupt
+//go:cgo_import_dynamic vdso_zx_vcpu_read_state zx_vcpu_read_state
+//go:cgo_import_dynamic vdso_zx_vcpu_write_state zx_vcpu_write_state
+//go:cgo_import_dynamic vdso_zx_vmar_allocate zx_vmar_allocate
+//go:cgo_import_dynamic vdso_zx_vmar_destroy zx_vmar_destroy
+//go:cgo_import_dynamic vdso_zx_vmar_map zx_vmar_map
+//go:cgo_import_dynamic vdso_zx_vmar_unmap zx_vmar_unmap
+//go:cgo_import_dynamic vdso_zx_vmar_protect zx_vmar_protect
+//go:cgo_import_dynamic vdso_zx_vmar_op_range zx_vmar_op_range
+//go:cgo_import_dynamic vdso_zx_vmo_create zx_vmo_create
+//go:cgo_import_dynamic vdso_zx_vmo_read zx_vmo_read
+//go:cgo_import_dynamic vdso_zx_vmo_write zx_vmo_write
+//go:cgo_import_dynamic vdso_zx_vmo_get_size zx_vmo_get_size
+//go:cgo_import_dynamic vdso_zx_vmo_set_size zx_vmo_set_size
+//go:cgo_import_dynamic vdso_zx_vmo_op_range zx_vmo_op_range
+//go:cgo_import_dynamic vdso_zx_vmo_create_child zx_vmo_create_child
+//go:cgo_import_dynamic vdso_zx_vmo_set_cache_policy zx_vmo_set_cache_policy
+//go:cgo_import_dynamic vdso_zx_vmo_replace_as_executable zx_vmo_replace_as_executable
+//go:cgo_import_dynamic vdso_zx_vmo_create_contiguous zx_vmo_create_contiguous
+//go:cgo_import_dynamic vdso_zx_vmo_create_physical zx_vmo_create_physical
+
+//go:linkname vdso_zx_bti_create vdso_zx_bti_create
+//go:linkname vdso_zx_bti_pin vdso_zx_bti_pin
+//go:linkname vdso_zx_bti_release_quarantine vdso_zx_bti_release_quarantine
+//go:linkname vdso_zx_cache_flush vdso_zx_cache_flush
+//go:linkname vdso_zx_channel_create vdso_zx_channel_create
+//go:linkname vdso_zx_channel_read vdso_zx_channel_read
+//go:linkname vdso_zx_channel_read_etc vdso_zx_channel_read_etc
+//go:linkname vdso_zx_channel_write vdso_zx_channel_write
+//go:linkname vdso_zx_channel_write_etc vdso_zx_channel_write_etc
+//go:linkname vdso_zx_channel_call_noretry vdso_zx_channel_call_noretry
+//go:linkname vdso_zx_channel_call_finish vdso_zx_channel_call_finish
+//go:linkname vdso_zx_channel_call vdso_zx_channel_call
+//go:linkname vdso_zx_channel_call_etc_noretry vdso_zx_channel_call_etc_noretry
+//go:linkname vdso_zx_channel_call_etc_finish vdso_zx_channel_call_etc_finish
+//go:linkname vdso_zx_channel_call_etc vdso_zx_channel_call_etc
+//go:linkname vdso_zx_clock_get vdso_zx_clock_get
+//go:linkname vdso_zx_clock_get_monotonic vdso_zx_clock_get_monotonic
+//go:linkname vdso_zx_clock_adjust vdso_zx_clock_adjust
+//go:linkname vdso_zx_clock_get_monotonic_via_kernel vdso_zx_clock_get_monotonic_via_kernel
+//go:linkname vdso_zx_clock_create vdso_zx_clock_create
+//go:linkname vdso_zx_clock_read vdso_zx_clock_read
+//go:linkname vdso_zx_clock_get_details vdso_zx_clock_get_details
+//go:linkname vdso_zx_clock_update vdso_zx_clock_update
+//go:linkname vdso_zx_cprng_draw_once vdso_zx_cprng_draw_once
+//go:linkname vdso_zx_cprng_draw vdso_zx_cprng_draw
+//go:linkname vdso_zx_cprng_add_entropy vdso_zx_cprng_add_entropy
+//go:linkname vdso_zx_debug_read vdso_zx_debug_read
+//go:linkname vdso_zx_debug_write vdso_zx_debug_write
+//go:linkname vdso_zx_debug_send_command vdso_zx_debug_send_command
+//go:linkname vdso_zx_debuglog_create vdso_zx_debuglog_create
+//go:linkname vdso_zx_debuglog_write vdso_zx_debuglog_write
+//go:linkname vdso_zx_debuglog_read vdso_zx_debuglog_read
+//go:linkname vdso_zx_event_create vdso_zx_event_create
+//go:linkname vdso_zx_eventpair_create vdso_zx_eventpair_create
+//go:linkname vdso_zx_exception_get_thread vdso_zx_exception_get_thread
+//go:linkname vdso_zx_exception_get_process vdso_zx_exception_get_process
+//go:linkname vdso_zx_fifo_create vdso_zx_fifo_create
+//go:linkname vdso_zx_fifo_read vdso_zx_fifo_read
+//go:linkname vdso_zx_fifo_write vdso_zx_fifo_write
+//go:linkname vdso_zx_framebuffer_get_info vdso_zx_framebuffer_get_info
+//go:linkname vdso_zx_framebuffer_set_range vdso_zx_framebuffer_set_range
+//go:linkname vdso_zx_futex_wait vdso_zx_futex_wait
+//go:linkname vdso_zx_futex_wake vdso_zx_futex_wake
+//go:linkname vdso_zx_futex_requeue vdso_zx_futex_requeue
+//go:linkname vdso_zx_futex_wake_single_owner vdso_zx_futex_wake_single_owner
+//go:linkname vdso_zx_futex_requeue_single_owner vdso_zx_futex_requeue_single_owner
+//go:linkname vdso_zx_futex_get_owner vdso_zx_futex_get_owner
+//go:linkname vdso_zx_guest_create vdso_zx_guest_create
+//go:linkname vdso_zx_guest_set_trap vdso_zx_guest_set_trap
+//go:linkname vdso_zx_handle_close vdso_zx_handle_close
+//go:linkname vdso_zx_handle_close_many vdso_zx_handle_close_many
+//go:linkname vdso_zx_handle_duplicate vdso_zx_handle_duplicate
+//go:linkname vdso_zx_handle_replace vdso_zx_handle_replace
+//go:linkname vdso_zx_interrupt_create vdso_zx_interrupt_create
+//go:linkname vdso_zx_interrupt_bind vdso_zx_interrupt_bind
+//go:linkname vdso_zx_interrupt_wait vdso_zx_interrupt_wait
+//go:linkname vdso_zx_interrupt_destroy vdso_zx_interrupt_destroy
+//go:linkname vdso_zx_interrupt_ack vdso_zx_interrupt_ack
+//go:linkname vdso_zx_interrupt_trigger vdso_zx_interrupt_trigger
+//go:linkname vdso_zx_interrupt_bind_vcpu vdso_zx_interrupt_bind_vcpu
+//go:linkname vdso_zx_iommu_create vdso_zx_iommu_create
+//go:linkname vdso_zx_ioports_request vdso_zx_ioports_request
+//go:linkname vdso_zx_ioports_release vdso_zx_ioports_release
+//go:linkname vdso_zx_job_create vdso_zx_job_create
+//go:linkname vdso_zx_job_set_policy vdso_zx_job_set_policy
+//go:linkname vdso_zx_job_set_critical vdso_zx_job_set_critical
+//go:linkname vdso_zx_ktrace_read vdso_zx_ktrace_read
+//go:linkname vdso_zx_ktrace_control vdso_zx_ktrace_control
+//go:linkname vdso_zx_ktrace_write vdso_zx_ktrace_write
+//go:linkname vdso_zx_nanosleep vdso_zx_nanosleep
+//go:linkname vdso_zx_ticks_get vdso_zx_ticks_get
+//go:linkname vdso_zx_ticks_per_second vdso_zx_ticks_per_second
+//go:linkname vdso_zx_deadline_after vdso_zx_deadline_after
+//go:linkname vdso_zx_vmar_unmap_handle_close_thread_exit vdso_zx_vmar_unmap_handle_close_thread_exit
+//go:linkname vdso_zx_futex_wake_handle_close_thread_exit vdso_zx_futex_wake_handle_close_thread_exit
+//go:linkname vdso_zx_ticks_get_via_kernel vdso_zx_ticks_get_via_kernel
+//go:linkname vdso_zx_msi_allocate vdso_zx_msi_allocate
+//go:linkname vdso_zx_msi_create vdso_zx_msi_create
+//go:linkname vdso_zx_mtrace_control vdso_zx_mtrace_control
+//go:linkname vdso_zx_object_wait_one vdso_zx_object_wait_one
+//go:linkname vdso_zx_object_wait_many vdso_zx_object_wait_many
+//go:linkname vdso_zx_object_wait_async vdso_zx_object_wait_async
+//go:linkname vdso_zx_object_signal vdso_zx_object_signal
+//go:linkname vdso_zx_object_signal_peer vdso_zx_object_signal_peer
+//go:linkname vdso_zx_object_get_property vdso_zx_object_get_property
+//go:linkname vdso_zx_object_set_property vdso_zx_object_set_property
+//go:linkname vdso_zx_object_get_info vdso_zx_object_get_info
+//go:linkname vdso_zx_object_get_child vdso_zx_object_get_child
+//go:linkname vdso_zx_object_set_profile vdso_zx_object_set_profile
+//go:linkname vdso_zx_pager_create vdso_zx_pager_create
+//go:linkname vdso_zx_pager_create_vmo vdso_zx_pager_create_vmo
+//go:linkname vdso_zx_pager_detach_vmo vdso_zx_pager_detach_vmo
+//go:linkname vdso_zx_pager_supply_pages vdso_zx_pager_supply_pages
+//go:linkname vdso_zx_pager_op_range vdso_zx_pager_op_range
+//go:linkname vdso_zx_pc_firmware_tables vdso_zx_pc_firmware_tables
+//go:linkname vdso_zx_pci_get_nth_device vdso_zx_pci_get_nth_device
+//go:linkname vdso_zx_pci_enable_bus_master vdso_zx_pci_enable_bus_master
+//go:linkname vdso_zx_pci_reset_device vdso_zx_pci_reset_device
+//go:linkname vdso_zx_pci_config_read vdso_zx_pci_config_read
+//go:linkname vdso_zx_pci_config_write vdso_zx_pci_config_write
+//go:linkname vdso_zx_pci_cfg_pio_rw vdso_zx_pci_cfg_pio_rw
+//go:linkname vdso_zx_pci_get_bar vdso_zx_pci_get_bar
+//go:linkname vdso_zx_pci_map_interrupt vdso_zx_pci_map_interrupt
+//go:linkname vdso_zx_pci_query_irq_mode vdso_zx_pci_query_irq_mode
+//go:linkname vdso_zx_pci_set_irq_mode vdso_zx_pci_set_irq_mode
+//go:linkname vdso_zx_pci_init vdso_zx_pci_init
+//go:linkname vdso_zx_pci_add_subtract_io_range vdso_zx_pci_add_subtract_io_range
+//go:linkname vdso_zx_pmt_unpin vdso_zx_pmt_unpin
+//go:linkname vdso_zx_port_create vdso_zx_port_create
+//go:linkname vdso_zx_port_queue vdso_zx_port_queue
+//go:linkname vdso_zx_port_wait vdso_zx_port_wait
+//go:linkname vdso_zx_port_cancel vdso_zx_port_cancel
+//go:linkname vdso_zx_process_exit vdso_zx_process_exit
+//go:linkname vdso_zx_process_create vdso_zx_process_create
+//go:linkname vdso_zx_process_start vdso_zx_process_start
+//go:linkname vdso_zx_process_read_memory vdso_zx_process_read_memory
+//go:linkname vdso_zx_process_write_memory vdso_zx_process_write_memory
+//go:linkname vdso_zx_profile_create vdso_zx_profile_create
+//go:linkname vdso_zx_resource_create vdso_zx_resource_create
+//go:linkname vdso_zx_smc_call vdso_zx_smc_call
+//go:linkname vdso_zx_socket_create vdso_zx_socket_create
+//go:linkname vdso_zx_socket_write vdso_zx_socket_write
+//go:linkname vdso_zx_socket_read vdso_zx_socket_read
+//go:linkname vdso_zx_socket_shutdown vdso_zx_socket_shutdown
+//go:linkname vdso_zx_stream_create vdso_zx_stream_create
+//go:linkname vdso_zx_stream_writev vdso_zx_stream_writev
+//go:linkname vdso_zx_stream_writev_at vdso_zx_stream_writev_at
+//go:linkname vdso_zx_stream_readv vdso_zx_stream_readv
+//go:linkname vdso_zx_stream_readv_at vdso_zx_stream_readv_at
+//go:linkname vdso_zx_stream_seek vdso_zx_stream_seek
+//go:linkname vdso_zx_syscall_test_0 vdso_zx_syscall_test_0
+//go:linkname vdso_zx_syscall_test_1 vdso_zx_syscall_test_1
+//go:linkname vdso_zx_syscall_test_2 vdso_zx_syscall_test_2
+//go:linkname vdso_zx_syscall_test_3 vdso_zx_syscall_test_3
+//go:linkname vdso_zx_syscall_test_4 vdso_zx_syscall_test_4
+//go:linkname vdso_zx_syscall_test_5 vdso_zx_syscall_test_5
+//go:linkname vdso_zx_syscall_test_6 vdso_zx_syscall_test_6
+//go:linkname vdso_zx_syscall_test_7 vdso_zx_syscall_test_7
+//go:linkname vdso_zx_syscall_test_8 vdso_zx_syscall_test_8
+//go:linkname vdso_zx_syscall_test_wrapper vdso_zx_syscall_test_wrapper
+//go:linkname vdso_zx_syscall_test_handle_create vdso_zx_syscall_test_handle_create
+//go:linkname vdso_zx_system_get_dcache_line_size vdso_zx_system_get_dcache_line_size
+//go:linkname vdso_zx_system_get_num_cpus vdso_zx_system_get_num_cpus
+//go:linkname vdso_zx_system_get_version_string vdso_zx_system_get_version_string
+//go:linkname vdso_zx_system_get_physmem vdso_zx_system_get_physmem
+//go:linkname vdso_zx_system_get_features vdso_zx_system_get_features
+//go:linkname vdso_zx_system_get_event vdso_zx_system_get_event
+//go:linkname vdso_zx_system_mexec vdso_zx_system_mexec
+//go:linkname vdso_zx_system_mexec_payload_get vdso_zx_system_mexec_payload_get
+//go:linkname vdso_zx_system_powerctl vdso_zx_system_powerctl
+//go:linkname vdso_zx_task_suspend vdso_zx_task_suspend
+//go:linkname vdso_zx_task_suspend_token vdso_zx_task_suspend_token
+//go:linkname vdso_zx_task_create_exception_channel vdso_zx_task_create_exception_channel
+//go:linkname vdso_zx_task_kill vdso_zx_task_kill
+//go:linkname vdso_zx_thread_exit vdso_zx_thread_exit
+//go:linkname vdso_zx_thread_create vdso_zx_thread_create
+//go:linkname vdso_zx_thread_start vdso_zx_thread_start
+//go:linkname vdso_zx_thread_read_state vdso_zx_thread_read_state
+//go:linkname vdso_zx_thread_write_state vdso_zx_thread_write_state
+//go:linkname vdso_zx_timer_create vdso_zx_timer_create
+//go:linkname vdso_zx_timer_set vdso_zx_timer_set
+//go:linkname vdso_zx_timer_cancel vdso_zx_timer_cancel
+//go:linkname vdso_zx_vcpu_create vdso_zx_vcpu_create
+//go:linkname vdso_zx_vcpu_resume vdso_zx_vcpu_resume
+//go:linkname vdso_zx_vcpu_interrupt vdso_zx_vcpu_interrupt
+//go:linkname vdso_zx_vcpu_read_state vdso_zx_vcpu_read_state
+//go:linkname vdso_zx_vcpu_write_state vdso_zx_vcpu_write_state
+//go:linkname vdso_zx_vmar_allocate vdso_zx_vmar_allocate
+//go:linkname vdso_zx_vmar_destroy vdso_zx_vmar_destroy
+//go:linkname vdso_zx_vmar_map vdso_zx_vmar_map
+//go:linkname vdso_zx_vmar_unmap vdso_zx_vmar_unmap
+//go:linkname vdso_zx_vmar_protect vdso_zx_vmar_protect
+//go:linkname vdso_zx_vmar_op_range vdso_zx_vmar_op_range
+//go:linkname vdso_zx_vmo_create vdso_zx_vmo_create
+//go:linkname vdso_zx_vmo_read vdso_zx_vmo_read
+//go:linkname vdso_zx_vmo_write vdso_zx_vmo_write
+//go:linkname vdso_zx_vmo_get_size vdso_zx_vmo_get_size
+//go:linkname vdso_zx_vmo_set_size vdso_zx_vmo_set_size
+//go:linkname vdso_zx_vmo_op_range vdso_zx_vmo_op_range
+//go:linkname vdso_zx_vmo_create_child vdso_zx_vmo_create_child
+//go:linkname vdso_zx_vmo_set_cache_policy vdso_zx_vmo_set_cache_policy
+//go:linkname vdso_zx_vmo_replace_as_executable vdso_zx_vmo_replace_as_executable
+//go:linkname vdso_zx_vmo_create_contiguous vdso_zx_vmo_create_contiguous
+//go:linkname vdso_zx_vmo_create_physical vdso_zx_vmo_create_physical
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_bti_create(iommu uint32, options uint32, bti_id uint64, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_bti_pin(handle uint32, options uint32, vmo uint32, offset uint64, size uint64, addrs unsafe.Pointer, num_addrs uint, pmt unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_bti_release_quarantine(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_cache_flush(addr unsafe.Pointer, size uint, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_read(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_read_etc(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_write(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_write_etc(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_call_noretry(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_call_finish(deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_call(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_call_etc_noretry(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_call_etc_finish(deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_channel_call_etc(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_get(clock_id uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_get_monotonic() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_adjust(handle uint32, clock_id uint32, offset int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_get_monotonic_via_kernel() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_create(options uint64, args unsafe.Pointer, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_read(handle uint32, now unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_get_details(handle uint32, options uint64, details unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_clock_update(handle uint32, options uint64, args unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_cprng_draw_once(buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_cprng_draw(buffer unsafe.Pointer, buffer_size uint)
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_cprng_add_entropy(buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debug_read(handle uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debug_write(buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debug_send_command(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debuglog_create(resource uint32, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debuglog_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_debuglog_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_event_create(options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_eventpair_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_exception_get_thread(handle uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_exception_get_process(handle uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_fifo_create(elem_count uint, elem_size uint, options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_fifo_read(handle uint32, elem_size uint, data unsafe.Pointer, data_size uint, actual_count unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_fifo_write(handle uint32, elem_size uint, data unsafe.Pointer, count uint, actual_count unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_framebuffer_get_info(resource uint32, format unsafe.Pointer, width unsafe.Pointer, height unsafe.Pointer, stride unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_framebuffer_set_range(resource uint32, vmo uint32, len uint32, format uint32, width uint32, height uint32, stride uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_wait(value_ptr unsafe.Pointer, current_value int32, new_futex_owner uint32, deadline int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_wake(value_ptr unsafe.Pointer, wake_count uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_requeue(value_ptr unsafe.Pointer, wake_count uint32, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_wake_single_owner(value_ptr unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_requeue_single_owner(value_ptr unsafe.Pointer, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_get_owner(value_ptr unsafe.Pointer, koid unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_guest_create(resource uint32, options uint32, guest_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_guest_set_trap(handle uint32, kind uint32, addr uintptr, size uint, port_handle uint32, key uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_handle_close(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_handle_close_many(handles unsafe.Pointer, num_handles uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_handle_duplicate(handle uint32, rights uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_handle_replace(handle uint32, rights uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_create(src_obj uint32, src_num uint32, options uint32, out_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_bind(handle uint32, port_handle uint32, key uint64, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_wait(handle uint32, out_timestamp unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_destroy(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_ack(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_trigger(handle uint32, options uint32, timestamp int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_interrupt_bind_vcpu(handle uint32, vcpu uint32, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_iommu_create(resource uint32, typ uint32, desc unsafe.Pointer, desc_size uint, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ioports_request(resource uint32, io_addr uint16, len uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ioports_release(resource uint32, io_addr uint16, len uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_job_create(parent_job uint32, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_job_set_policy(handle uint32, options uint32, topic uint32, policy unsafe.Pointer, policy_size uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_job_set_critical(job uint32, options uint32, process uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ktrace_read(handle uint32, data unsafe.Pointer, offset uint32, data_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ktrace_control(handle uint32, action uint32, options uint32, ptr unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ktrace_write(handle uint32, id uint32, arg0 uint32, arg1 uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_nanosleep(deadline int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ticks_get() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ticks_per_second() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_deadline_after(nanoseconds int64) int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_unmap_handle_close_thread_exit(vmar_handle uint32, addr uintptr, size uint, close_handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_futex_wake_handle_close_thread_exit(value_ptr unsafe.Pointer, wake_count uint32, new_value int32, close_handle uint32)
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_ticks_get_via_kernel() int64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_msi_allocate(handle uint32, count uint32, out_allocation unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_msi_create(handle uint32, options uint32, msi_id uint32, vmo uint32, vmo_offset uint, out_interrupt unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_mtrace_control(handle uint32, kind uint32, action uint32, options uint32, ptr unsafe.Pointer, ptr_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_wait_one(handle uint32, signals uint32, deadline int64, observed unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_wait_many(items unsafe.Pointer, num_items uint, deadline int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_wait_async(handle uint32, port uint32, key uint64, signals uint32, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_signal(handle uint32, clear_mask uint32, set_mask uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_signal_peer(handle uint32, clear_mask uint32, set_mask uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_get_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_set_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_get_info(handle uint32, topic uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer, avail unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_get_child(handle uint32, koid uint64, rights uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_object_set_profile(handle uint32, profile uint32, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_create(options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_create_vmo(pager uint32, options uint32, port uint32, key uint64, size uint64, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_detach_vmo(pager uint32, vmo uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_supply_pages(pager uint32, pager_vmo uint32, offset uint64, length uint64, aux_vmo uint32, aux_offset uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pager_op_range(pager uint32, op uint32, pager_vmo uint32, offset uint64, length uint64, data uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pc_firmware_tables(handle uint32, acpi_rsdp unsafe.Pointer, smbios unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_get_nth_device(handle uint32, index uint32, out_info unsafe.Pointer, out_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_enable_bus_master(handle uint32, enable uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_reset_device(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_config_read(handle uint32, offset uint16, width uint, out_val unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_config_write(handle uint32, offset uint16, width uint, val uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_cfg_pio_rw(handle uint32, bus uint8, dev uint8, funk uint8, offset uint8, val unsafe.Pointer, width uint, write uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_get_bar(handle uint32, bar_num uint32, out_bar unsafe.Pointer, out_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_map_interrupt(handle uint32, which_irq int32, out_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_query_irq_mode(handle uint32, mode uint32, out_max_irqs unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_set_irq_mode(handle uint32, mode uint32, requested_irq_count uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_init(handle uint32, init_buf unsafe.Pointer, len uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pci_add_subtract_io_range(handle uint32, mmio uint32, base uint64, len uint64, add uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_pmt_unpin(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_port_create(options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_port_queue(handle uint32, packet unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_port_wait(handle uint32, deadline int64, packet unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_port_cancel(handle uint32, source uint32, key uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_exit(retcode int64)
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_create(job uint32, name unsafe.Pointer, name_size uint, options uint32, proc_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_start(handle uint32, thread uint32, entry uintptr, stack uintptr, arg1 uint32, arg2 uintptr) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_read_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_process_write_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_profile_create(root_job uint32, options uint32, profile unsafe.Pointer, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_resource_create(parent_rsrc uint32, options uint32, base uint64, size uint, name unsafe.Pointer, name_size uint, resource_out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_smc_call(handle uint32, parameters unsafe.Pointer, out_smc_result unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_socket_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_socket_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_socket_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_socket_shutdown(handle uint32, options uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_create(options uint32, vmo uint32, seek uint64, out_stream unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_writev(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_writev_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_readv(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_readv_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_stream_seek(handle uint32, whence uint32, offset int64, out_seek unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_0() int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_1(a int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_2(a int32, b int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_3(a int32, b int32, c int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_4(a int32, b int32, c int32, d int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_5(a int32, b int32, c int32, d int32, e int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_6(a int32, b int32, c int32, d int32, e int32, f int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_7(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_8(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32, h int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_wrapper(a int32, b int32, c int32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_syscall_test_handle_create(return_value int32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_dcache_line_size() uint32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_num_cpus() uint32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_version_string() unsafe.Pointer
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_physmem() uint64
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_features(kind uint32, features unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_get_event(root_job uint32, kind uint32, event unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_mexec(resource uint32, kernel_vmo uint32, bootimage_vmo uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_mexec_payload_get(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_system_powerctl(resource uint32, cmd uint32, arg unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_task_suspend(handle uint32, token unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_task_suspend_token(handle uint32, token unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_task_create_exception_channel(handle uint32, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_task_kill(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_exit()
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_create(process uint32, name unsafe.Pointer, name_size uint, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_start(handle uint32, thread_entry uintptr, stack uintptr, arg1 uintptr, arg2 uintptr) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_thread_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_timer_create(options uint32, clock_id uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_timer_set(handle uint32, deadline int64, slack int64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_timer_cancel(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_create(guest uint32, options uint32, entry uintptr, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_resume(handle uint32, packet unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_interrupt(handle uint32, vector uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vcpu_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_allocate(parent_vmar uint32, options uint32, offset uint, size uint, child_vmar unsafe.Pointer, child_addr unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_destroy(handle uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_map(handle uint32, options uint32, vmar_offset uint, vmo uint32, vmo_offset uint64, len uint, mapped_addr unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_unmap(handle uint32, addr uintptr, len uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_protect(handle uint32, options uint32, addr uintptr, len uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmar_op_range(handle uint32, op uint32, address uintptr, size uint, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_create(size uint64, options uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_read(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_write(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_get_size(handle uint32, size unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_set_size(handle uint32, size uint64) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_op_range(handle uint32, op uint32, offset uint64, size uint64, buffer unsafe.Pointer, buffer_size uint) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_create_child(handle uint32, options uint32, offset uint64, size uint64, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_set_cache_policy(handle uint32, cache_policy uint32) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_replace_as_executable(handle uint32, vmex uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_create_contiguous(bti uint32, size uint, alignment_log2 uint32, out unsafe.Pointer) int32
+
+//go:noescape
+//go:nosplit
+func vdsoCall_zx_vmo_create_physical(resource uint32, paddr uintptr, size uint, out unsafe.Pointer) int32
+
+var (
+ vdso_zx_bti_create uintptr
+ vdso_zx_bti_pin uintptr
+ vdso_zx_bti_release_quarantine uintptr
+ vdso_zx_cache_flush uintptr
+ vdso_zx_channel_create uintptr
+ vdso_zx_channel_read uintptr
+ vdso_zx_channel_read_etc uintptr
+ vdso_zx_channel_write uintptr
+ vdso_zx_channel_write_etc uintptr
+ vdso_zx_channel_call_noretry uintptr
+ vdso_zx_channel_call_finish uintptr
+ vdso_zx_channel_call uintptr
+ vdso_zx_channel_call_etc_noretry uintptr
+ vdso_zx_channel_call_etc_finish uintptr
+ vdso_zx_channel_call_etc uintptr
+ vdso_zx_clock_get uintptr
+ vdso_zx_clock_get_monotonic uintptr
+ vdso_zx_clock_adjust uintptr
+ vdso_zx_clock_get_monotonic_via_kernel uintptr
+ vdso_zx_clock_create uintptr
+ vdso_zx_clock_read uintptr
+ vdso_zx_clock_get_details uintptr
+ vdso_zx_clock_update uintptr
+ vdso_zx_cprng_draw_once uintptr
+ vdso_zx_cprng_draw uintptr
+ vdso_zx_cprng_add_entropy uintptr
+ vdso_zx_debug_read uintptr
+ vdso_zx_debug_write uintptr
+ vdso_zx_debug_send_command uintptr
+ vdso_zx_debuglog_create uintptr
+ vdso_zx_debuglog_write uintptr
+ vdso_zx_debuglog_read uintptr
+ vdso_zx_event_create uintptr
+ vdso_zx_eventpair_create uintptr
+ vdso_zx_exception_get_thread uintptr
+ vdso_zx_exception_get_process uintptr
+ vdso_zx_fifo_create uintptr
+ vdso_zx_fifo_read uintptr
+ vdso_zx_fifo_write uintptr
+ vdso_zx_framebuffer_get_info uintptr
+ vdso_zx_framebuffer_set_range uintptr
+ vdso_zx_futex_wait uintptr
+ vdso_zx_futex_wake uintptr
+ vdso_zx_futex_requeue uintptr
+ vdso_zx_futex_wake_single_owner uintptr
+ vdso_zx_futex_requeue_single_owner uintptr
+ vdso_zx_futex_get_owner uintptr
+ vdso_zx_guest_create uintptr
+ vdso_zx_guest_set_trap uintptr
+ vdso_zx_handle_close uintptr
+ vdso_zx_handle_close_many uintptr
+ vdso_zx_handle_duplicate uintptr
+ vdso_zx_handle_replace uintptr
+ vdso_zx_interrupt_create uintptr
+ vdso_zx_interrupt_bind uintptr
+ vdso_zx_interrupt_wait uintptr
+ vdso_zx_interrupt_destroy uintptr
+ vdso_zx_interrupt_ack uintptr
+ vdso_zx_interrupt_trigger uintptr
+ vdso_zx_interrupt_bind_vcpu uintptr
+ vdso_zx_iommu_create uintptr
+ vdso_zx_ioports_request uintptr
+ vdso_zx_ioports_release uintptr
+ vdso_zx_job_create uintptr
+ vdso_zx_job_set_policy uintptr
+ vdso_zx_job_set_critical uintptr
+ vdso_zx_ktrace_read uintptr
+ vdso_zx_ktrace_control uintptr
+ vdso_zx_ktrace_write uintptr
+ vdso_zx_nanosleep uintptr
+ vdso_zx_ticks_get uintptr
+ vdso_zx_ticks_per_second uintptr
+ vdso_zx_deadline_after uintptr
+ vdso_zx_vmar_unmap_handle_close_thread_exit uintptr
+ vdso_zx_futex_wake_handle_close_thread_exit uintptr
+ vdso_zx_ticks_get_via_kernel uintptr
+ vdso_zx_msi_allocate uintptr
+ vdso_zx_msi_create uintptr
+ vdso_zx_mtrace_control uintptr
+ vdso_zx_object_wait_one uintptr
+ vdso_zx_object_wait_many uintptr
+ vdso_zx_object_wait_async uintptr
+ vdso_zx_object_signal uintptr
+ vdso_zx_object_signal_peer uintptr
+ vdso_zx_object_get_property uintptr
+ vdso_zx_object_set_property uintptr
+ vdso_zx_object_get_info uintptr
+ vdso_zx_object_get_child uintptr
+ vdso_zx_object_set_profile uintptr
+ vdso_zx_pager_create uintptr
+ vdso_zx_pager_create_vmo uintptr
+ vdso_zx_pager_detach_vmo uintptr
+ vdso_zx_pager_supply_pages uintptr
+ vdso_zx_pager_op_range uintptr
+ vdso_zx_pc_firmware_tables uintptr
+ vdso_zx_pci_get_nth_device uintptr
+ vdso_zx_pci_enable_bus_master uintptr
+ vdso_zx_pci_reset_device uintptr
+ vdso_zx_pci_config_read uintptr
+ vdso_zx_pci_config_write uintptr
+ vdso_zx_pci_cfg_pio_rw uintptr
+ vdso_zx_pci_get_bar uintptr
+ vdso_zx_pci_map_interrupt uintptr
+ vdso_zx_pci_query_irq_mode uintptr
+ vdso_zx_pci_set_irq_mode uintptr
+ vdso_zx_pci_init uintptr
+ vdso_zx_pci_add_subtract_io_range uintptr
+ vdso_zx_pmt_unpin uintptr
+ vdso_zx_port_create uintptr
+ vdso_zx_port_queue uintptr
+ vdso_zx_port_wait uintptr
+ vdso_zx_port_cancel uintptr
+ vdso_zx_process_exit uintptr
+ vdso_zx_process_create uintptr
+ vdso_zx_process_start uintptr
+ vdso_zx_process_read_memory uintptr
+ vdso_zx_process_write_memory uintptr
+ vdso_zx_profile_create uintptr
+ vdso_zx_resource_create uintptr
+ vdso_zx_smc_call uintptr
+ vdso_zx_socket_create uintptr
+ vdso_zx_socket_write uintptr
+ vdso_zx_socket_read uintptr
+ vdso_zx_socket_shutdown uintptr
+ vdso_zx_stream_create uintptr
+ vdso_zx_stream_writev uintptr
+ vdso_zx_stream_writev_at uintptr
+ vdso_zx_stream_readv uintptr
+ vdso_zx_stream_readv_at uintptr
+ vdso_zx_stream_seek uintptr
+ vdso_zx_syscall_test_0 uintptr
+ vdso_zx_syscall_test_1 uintptr
+ vdso_zx_syscall_test_2 uintptr
+ vdso_zx_syscall_test_3 uintptr
+ vdso_zx_syscall_test_4 uintptr
+ vdso_zx_syscall_test_5 uintptr
+ vdso_zx_syscall_test_6 uintptr
+ vdso_zx_syscall_test_7 uintptr
+ vdso_zx_syscall_test_8 uintptr
+ vdso_zx_syscall_test_wrapper uintptr
+ vdso_zx_syscall_test_handle_create uintptr
+ vdso_zx_system_get_dcache_line_size uintptr
+ vdso_zx_system_get_num_cpus uintptr
+ vdso_zx_system_get_version_string uintptr
+ vdso_zx_system_get_physmem uintptr
+ vdso_zx_system_get_features uintptr
+ vdso_zx_system_get_event uintptr
+ vdso_zx_system_mexec uintptr
+ vdso_zx_system_mexec_payload_get uintptr
+ vdso_zx_system_powerctl uintptr
+ vdso_zx_task_suspend uintptr
+ vdso_zx_task_suspend_token uintptr
+ vdso_zx_task_create_exception_channel uintptr
+ vdso_zx_task_kill uintptr
+ vdso_zx_thread_exit uintptr
+ vdso_zx_thread_create uintptr
+ vdso_zx_thread_start uintptr
+ vdso_zx_thread_read_state uintptr
+ vdso_zx_thread_write_state uintptr
+ vdso_zx_timer_create uintptr
+ vdso_zx_timer_set uintptr
+ vdso_zx_timer_cancel uintptr
+ vdso_zx_vcpu_create uintptr
+ vdso_zx_vcpu_resume uintptr
+ vdso_zx_vcpu_interrupt uintptr
+ vdso_zx_vcpu_read_state uintptr
+ vdso_zx_vcpu_write_state uintptr
+ vdso_zx_vmar_allocate uintptr
+ vdso_zx_vmar_destroy uintptr
+ vdso_zx_vmar_map uintptr
+ vdso_zx_vmar_unmap uintptr
+ vdso_zx_vmar_protect uintptr
+ vdso_zx_vmar_op_range uintptr
+ vdso_zx_vmo_create uintptr
+ vdso_zx_vmo_read uintptr
+ vdso_zx_vmo_write uintptr
+ vdso_zx_vmo_get_size uintptr
+ vdso_zx_vmo_set_size uintptr
+ vdso_zx_vmo_op_range uintptr
+ vdso_zx_vmo_create_child uintptr
+ vdso_zx_vmo_set_cache_policy uintptr
+ vdso_zx_vmo_replace_as_executable uintptr
+ vdso_zx_vmo_create_contiguous uintptr
+ vdso_zx_vmo_create_physical uintptr
+)
diff --git a/src/runtime/vdso_linux.go b/src/runtime/vdso_linux.go
index 6e29424..64d4198 100644
--- a/src/runtime/vdso_linux.go
+++ b/src/runtime/vdso_linux.go
@@ -20,52 +20,6 @@
// The version section is documented at
// https://refspecs.linuxfoundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/symversion.html
-const (
- _AT_SYSINFO_EHDR = 33
-
- _PT_LOAD = 1 /* Loadable program segment */
- _PT_DYNAMIC = 2 /* Dynamic linking information */
-
- _DT_NULL = 0 /* Marks end of dynamic section */
- _DT_HASH = 4 /* Dynamic symbol hash table */
- _DT_STRTAB = 5 /* Address of string table */
- _DT_SYMTAB = 6 /* Address of symbol table */
- _DT_GNU_HASH = 0x6ffffef5 /* GNU-style dynamic symbol hash table */
- _DT_VERSYM = 0x6ffffff0
- _DT_VERDEF = 0x6ffffffc
-
- _VER_FLG_BASE = 0x1 /* Version definition of file itself */
-
- _SHN_UNDEF = 0 /* Undefined section */
-
- _SHT_DYNSYM = 11 /* Dynamic linker symbol table */
-
- _STT_FUNC = 2 /* Symbol is a code object */
-
- _STT_NOTYPE = 0 /* Symbol type is not specified */
-
- _STB_GLOBAL = 1 /* Global symbol */
- _STB_WEAK = 2 /* Weak symbol */
-
- _EI_NIDENT = 16
-
- // Maximum indices for the array types used when traversing the vDSO ELF structures.
- // Computed from architecture-specific max provided by vdso_linux_*.go
- vdsoSymTabSize = vdsoArrayMax / unsafe.Sizeof(elfSym{})
- vdsoDynSize = vdsoArrayMax / unsafe.Sizeof(elfDyn{})
- vdsoSymStringsSize = vdsoArrayMax // byte
- vdsoVerSymSize = vdsoArrayMax / 2 // uint16
- vdsoHashSize = vdsoArrayMax / 4 // uint32
-
- // vdsoBloomSizeScale is a scaling factor for gnuhash tables which are uint32 indexed,
- // but contain uintptrs
- vdsoBloomSizeScale = unsafe.Sizeof(uintptr(0)) / 4 // uint32
-)
-
-/* How to extract and insert information held in the st_info field. */
-func _ELF_ST_BIND(val byte) byte { return val >> 4 }
-func _ELF_ST_TYPE(val byte) byte { return val & 0xf }
-
type vdsoSymbolKey struct {
name string
symHash uint32
diff --git a/src/runtime/vdsocalls_fuchsia_amd64.s b/src/runtime/vdsocalls_fuchsia_amd64.s
new file mode 100644
index 0000000..e2371ca
--- /dev/null
+++ b/src/runtime/vdsocalls_fuchsia_amd64.s
@@ -0,0 +1,4223 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// WARNING: THIS FILE IS MACHINE GENERATED BY //tools/kazoo. DO NOT EDIT.
+
+#include "go_asm.h"
+#include "go_tls.h"
+#include "textflag.h"
+#include "funcdata.h"
+
+// func vdsoCall_zx_bti_create(iommu uint32, options uint32, bti_id uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_bti_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL iommu+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ bti_id+8(FP), DX
+ MOVQ out+16(FP), CX
+ MOVQ vdso_zx_bti_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_bti_pin(handle uint32, options uint32, vmo uint32, offset uint64, size uint64, addrs unsafe.Pointer, num_addrs uint, pmt unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_bti_pin(SB),NOSPLIT,$40-60
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 56(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 56(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVL vmo+8(FP), DX
+ MOVQ offset+16(FP), CX
+ MOVQ size+24(FP), R8
+ MOVQ addrs+32(FP), R9
+ MOVQ num_addrs+40(FP), R12
+ MOVQ pmt+48(FP), R13
+ MOVQ SP, BP // BP is preserved across vsdo call by the x86-64 ABI
+ ANDQ $~15, SP // stack alignment for x86-64 ABI
+ PUSHQ R13
+ PUSHQ R12
+ MOVQ vdso_zx_bti_pin(SB), AX
+ CALL AX
+ POPQ R12
+ POPQ R13
+ MOVQ BP, SP
+ MOVL AX, ret+56(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_bti_release_quarantine(handle uint32) int32
+TEXT runtime·vdsoCall_zx_bti_release_quarantine(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vdso_zx_bti_release_quarantine(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_cache_flush(addr unsafe.Pointer, size uint, options uint32) int32
+TEXT runtime·vdsoCall_zx_cache_flush(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ addr+0(FP), DI
+ MOVQ size+8(FP), SI
+ MOVL options+16(FP), DX
+ MOVQ vdso_zx_cache_flush(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL options+0(FP), DI
+ MOVQ out0+8(FP), SI
+ MOVQ out1+16(FP), DX
+ MOVQ vdso_zx_channel_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_read(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_read(SB),NOSPLIT,$40-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 56(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 56(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ bytes+8(FP), DX
+ MOVQ handles+16(FP), CX
+ MOVL num_bytes+24(FP), R8
+ MOVL num_handles+28(FP), R9
+ MOVQ actual_bytes+32(FP), R12
+ MOVQ actual_handles+40(FP), R13
+ MOVQ SP, BP // BP is preserved across vsdo call by the x86-64 ABI
+ ANDQ $~15, SP // stack alignment for x86-64 ABI
+ PUSHQ R13
+ PUSHQ R12
+ MOVQ vdso_zx_channel_read(SB), AX
+ CALL AX
+ POPQ R12
+ POPQ R13
+ MOVQ BP, SP
+ MOVL AX, ret+48(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_read_etc(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_read_etc(SB),NOSPLIT,$40-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 56(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 56(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ bytes+8(FP), DX
+ MOVQ handles+16(FP), CX
+ MOVL num_bytes+24(FP), R8
+ MOVL num_handles+28(FP), R9
+ MOVQ actual_bytes+32(FP), R12
+ MOVQ actual_handles+40(FP), R13
+ MOVQ SP, BP // BP is preserved across vsdo call by the x86-64 ABI
+ ANDQ $~15, SP // stack alignment for x86-64 ABI
+ PUSHQ R13
+ PUSHQ R12
+ MOVQ vdso_zx_channel_read_etc(SB), AX
+ CALL AX
+ POPQ R12
+ POPQ R13
+ MOVQ BP, SP
+ MOVL AX, ret+48(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_write(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+TEXT runtime·vdsoCall_zx_channel_write(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ bytes+8(FP), DX
+ MOVL num_bytes+16(FP), CX
+ MOVQ handles+24(FP), R8
+ MOVL num_handles+32(FP), R9
+ MOVQ vdso_zx_channel_write(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_write_etc(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+TEXT runtime·vdsoCall_zx_channel_write_etc(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ bytes+8(FP), DX
+ MOVL num_bytes+16(FP), CX
+ MOVQ handles+24(FP), R8
+ MOVL num_handles+32(FP), R9
+ MOVQ vdso_zx_channel_write_etc(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_call_noretry(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_noretry(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ deadline+8(FP), DX
+ MOVQ args+16(FP), CX
+ MOVQ actual_bytes+24(FP), R8
+ MOVQ actual_handles+32(FP), R9
+ MOVQ vdso_zx_channel_call_noretry(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_call_finish(deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_finish(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ deadline+0(FP), DI
+ MOVQ args+8(FP), SI
+ MOVQ actual_bytes+16(FP), DX
+ MOVQ actual_handles+24(FP), CX
+ MOVQ vdso_zx_channel_call_finish(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_call(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ deadline+8(FP), DX
+ MOVQ args+16(FP), CX
+ MOVQ actual_bytes+24(FP), R8
+ MOVQ actual_handles+32(FP), R9
+ MOVQ vdso_zx_channel_call(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_call_etc_noretry(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_etc_noretry(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ deadline+8(FP), DX
+ MOVQ args+16(FP), CX
+ MOVQ actual_bytes+24(FP), R8
+ MOVQ actual_handles+32(FP), R9
+ MOVQ vdso_zx_channel_call_etc_noretry(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_call_etc_finish(deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_etc_finish(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ deadline+0(FP), DI
+ MOVQ args+8(FP), SI
+ MOVQ actual_bytes+16(FP), DX
+ MOVQ actual_handles+24(FP), CX
+ MOVQ vdso_zx_channel_call_etc_finish(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_channel_call_etc(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_etc(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ deadline+8(FP), DX
+ MOVQ args+16(FP), CX
+ MOVQ actual_bytes+24(FP), R8
+ MOVQ actual_handles+32(FP), R9
+ MOVQ vdso_zx_channel_call_etc(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_clock_get(clock_id uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_get(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL clock_id+0(FP), DI
+ MOVQ out+8(FP), SI
+ MOVQ vdso_zx_clock_get(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_clock_get_monotonic() int64
+TEXT runtime·vdsoCall_zx_clock_get_monotonic(SB),NOSPLIT,$8-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_clock_get_monotonic(SB), AX
+ CALL AX
+ MOVQ AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_clock_adjust(handle uint32, clock_id uint32, offset int64) int32
+TEXT runtime·vdsoCall_zx_clock_adjust(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL clock_id+4(FP), SI
+ MOVQ offset+8(FP), DX
+ MOVQ vdso_zx_clock_adjust(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_clock_get_monotonic_via_kernel() int64
+TEXT runtime·vdsoCall_zx_clock_get_monotonic_via_kernel(SB),NOSPLIT,$8-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_clock_get_monotonic_via_kernel(SB), AX
+ CALL AX
+ MOVQ AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_clock_create(options uint64, args unsafe.Pointer, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ options+0(FP), DI
+ MOVQ args+8(FP), SI
+ MOVQ out+16(FP), DX
+ MOVQ vdso_zx_clock_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_clock_read(handle uint32, now unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_read(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ now+8(FP), SI
+ MOVQ vdso_zx_clock_read(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_clock_get_details(handle uint32, options uint64, details unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_get_details(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ options+8(FP), SI
+ MOVQ details+16(FP), DX
+ MOVQ vdso_zx_clock_get_details(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_clock_update(handle uint32, options uint64, args unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_update(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ options+8(FP), SI
+ MOVQ args+16(FP), DX
+ MOVQ vdso_zx_clock_update(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_cprng_draw_once(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_cprng_draw_once(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ buffer+0(FP), DI
+ MOVQ buffer_size+8(FP), SI
+ MOVQ vdso_zx_cprng_draw_once(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_cprng_draw(buffer unsafe.Pointer, buffer_size uint)
+TEXT runtime·vdsoCall_zx_cprng_draw(SB),NOSPLIT,$8-16
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ buffer+0(FP), DI
+ MOVQ buffer_size+8(FP), SI
+ MOVQ vdso_zx_cprng_draw(SB), AX
+ CALL AX
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_cprng_add_entropy(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_cprng_add_entropy(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ buffer+0(FP), DI
+ MOVQ buffer_size+8(FP), SI
+ MOVQ vdso_zx_cprng_add_entropy(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_debug_read(handle uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_debug_read(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ buffer+8(FP), SI
+ MOVQ buffer_size+16(FP), DX
+ MOVQ actual+24(FP), CX
+ MOVQ vdso_zx_debug_read(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_debug_write(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debug_write(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ buffer+0(FP), DI
+ MOVQ buffer_size+8(FP), SI
+ MOVQ vdso_zx_debug_write(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_debug_send_command(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debug_send_command(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVQ buffer+8(FP), SI
+ MOVQ buffer_size+16(FP), DX
+ MOVQ vdso_zx_debug_send_command(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_debuglog_create(resource uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_debuglog_create(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ out+8(FP), DX
+ MOVQ vdso_zx_debuglog_create(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_debuglog_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debuglog_write(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ buffer+8(FP), DX
+ MOVQ buffer_size+16(FP), CX
+ MOVQ vdso_zx_debuglog_write(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_debuglog_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debuglog_read(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ buffer+8(FP), DX
+ MOVQ buffer_size+16(FP), CX
+ MOVQ vdso_zx_debuglog_read(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_event_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_event_create(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL options+0(FP), DI
+ MOVQ out+8(FP), SI
+ MOVQ vdso_zx_event_create(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_eventpair_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_eventpair_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL options+0(FP), DI
+ MOVQ out0+8(FP), SI
+ MOVQ out1+16(FP), DX
+ MOVQ vdso_zx_eventpair_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_exception_get_thread(handle uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_exception_get_thread(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ out+8(FP), SI
+ MOVQ vdso_zx_exception_get_thread(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_exception_get_process(handle uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_exception_get_process(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ out+8(FP), SI
+ MOVQ vdso_zx_exception_get_process(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_fifo_create(elem_count uint, elem_size uint, options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_create(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ elem_count+0(FP), DI
+ MOVQ elem_size+8(FP), SI
+ MOVL options+16(FP), DX
+ MOVQ out0+24(FP), CX
+ MOVQ out1+32(FP), R8
+ MOVQ vdso_zx_fifo_create(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_fifo_read(handle uint32, elem_size uint, data unsafe.Pointer, data_size uint, actual_count unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_read(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ elem_size+8(FP), SI
+ MOVQ data+16(FP), DX
+ MOVQ data_size+24(FP), CX
+ MOVQ actual_count+32(FP), R8
+ MOVQ vdso_zx_fifo_read(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_fifo_write(handle uint32, elem_size uint, data unsafe.Pointer, count uint, actual_count unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_write(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ elem_size+8(FP), SI
+ MOVQ data+16(FP), DX
+ MOVQ count+24(FP), CX
+ MOVQ actual_count+32(FP), R8
+ MOVQ vdso_zx_fifo_write(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_framebuffer_get_info(resource uint32, format unsafe.Pointer, width unsafe.Pointer, height unsafe.Pointer, stride unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_framebuffer_get_info(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVQ format+8(FP), SI
+ MOVQ width+16(FP), DX
+ MOVQ height+24(FP), CX
+ MOVQ stride+32(FP), R8
+ MOVQ vdso_zx_framebuffer_get_info(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_framebuffer_set_range(resource uint32, vmo uint32, len uint32, format uint32, width uint32, height uint32, stride uint32) int32
+TEXT runtime·vdsoCall_zx_framebuffer_set_range(SB),NOSPLIT,$32-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 48(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 48(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVL vmo+4(FP), SI
+ MOVL len+8(FP), DX
+ MOVL format+12(FP), CX
+ MOVL width+16(FP), R8
+ MOVL height+20(FP), R9
+ MOVL stride+24(FP), R12
+ MOVQ SP, BP // BP is preserved across vsdo call by the x86-64 ABI
+ ANDQ $~15, SP // stack alignment for x86-64 ABI
+ PUSHQ R12
+ MOVQ vdso_zx_framebuffer_set_range(SB), AX
+ CALL AX
+ POPQ R12
+ MOVQ BP, SP
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_futex_wait(value_ptr unsafe.Pointer, current_value int32, new_futex_owner uint32, deadline int64) int32
+TEXT runtime·vdsoCall_zx_futex_wait(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ value_ptr+0(FP), DI
+ MOVL current_value+8(FP), SI
+ MOVL new_futex_owner+12(FP), DX
+ MOVQ deadline+16(FP), CX
+ MOVQ vdso_zx_futex_wait(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_futex_wake(value_ptr unsafe.Pointer, wake_count uint32) int32
+TEXT runtime·vdsoCall_zx_futex_wake(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ value_ptr+0(FP), DI
+ MOVL wake_count+8(FP), SI
+ MOVQ vdso_zx_futex_wake(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_futex_requeue(value_ptr unsafe.Pointer, wake_count uint32, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+TEXT runtime·vdsoCall_zx_futex_requeue(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ value_ptr+0(FP), DI
+ MOVL wake_count+8(FP), SI
+ MOVL current_value+12(FP), DX
+ MOVQ requeue_ptr+16(FP), CX
+ MOVL requeue_count+24(FP), R8
+ MOVL new_requeue_owner+28(FP), R9
+ MOVQ vdso_zx_futex_requeue(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_futex_wake_single_owner(value_ptr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_futex_wake_single_owner(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ value_ptr+0(FP), DI
+ MOVQ vdso_zx_futex_wake_single_owner(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_futex_requeue_single_owner(value_ptr unsafe.Pointer, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+TEXT runtime·vdsoCall_zx_futex_requeue_single_owner(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ value_ptr+0(FP), DI
+ MOVL current_value+8(FP), SI
+ MOVQ requeue_ptr+16(FP), DX
+ MOVL requeue_count+24(FP), CX
+ MOVL new_requeue_owner+28(FP), R8
+ MOVQ vdso_zx_futex_requeue_single_owner(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_futex_get_owner(value_ptr unsafe.Pointer, koid unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_futex_get_owner(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ value_ptr+0(FP), DI
+ MOVQ koid+8(FP), SI
+ MOVQ vdso_zx_futex_get_owner(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_guest_create(resource uint32, options uint32, guest_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_guest_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ guest_handle+8(FP), DX
+ MOVQ vmar_handle+16(FP), CX
+ MOVQ vdso_zx_guest_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_guest_set_trap(handle uint32, kind uint32, addr uintptr, size uint, port_handle uint32, key uint64) int32
+TEXT runtime·vdsoCall_zx_guest_set_trap(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL kind+4(FP), SI
+ MOVQ addr+8(FP), DX
+ MOVQ size+16(FP), CX
+ MOVL port_handle+24(FP), R8
+ MOVQ key+32(FP), R9
+ MOVQ vdso_zx_guest_set_trap(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_handle_close(handle uint32) int32
+TEXT runtime·vdsoCall_zx_handle_close(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vdso_zx_handle_close(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_handle_close_many(handles unsafe.Pointer, num_handles uint) int32
+TEXT runtime·vdsoCall_zx_handle_close_many(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ handles+0(FP), DI
+ MOVQ num_handles+8(FP), SI
+ MOVQ vdso_zx_handle_close_many(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_handle_duplicate(handle uint32, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_handle_duplicate(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL rights+4(FP), SI
+ MOVQ out+8(FP), DX
+ MOVQ vdso_zx_handle_duplicate(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_handle_replace(handle uint32, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_handle_replace(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL rights+4(FP), SI
+ MOVQ out+8(FP), DX
+ MOVQ vdso_zx_handle_replace(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_interrupt_create(src_obj uint32, src_num uint32, options uint32, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_interrupt_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL src_obj+0(FP), DI
+ MOVL src_num+4(FP), SI
+ MOVL options+8(FP), DX
+ MOVQ out_handle+16(FP), CX
+ MOVQ vdso_zx_interrupt_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_interrupt_bind(handle uint32, port_handle uint32, key uint64, options uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_bind(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL port_handle+4(FP), SI
+ MOVQ key+8(FP), DX
+ MOVL options+16(FP), CX
+ MOVQ vdso_zx_interrupt_bind(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_interrupt_wait(handle uint32, out_timestamp unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_interrupt_wait(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVL handle+0(FP), DI
+ MOVQ out_timestamp+8(FP), SI
+ MOVQ vdso_zx_interrupt_wait(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_interrupt_destroy(handle uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_destroy(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vdso_zx_interrupt_destroy(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_interrupt_ack(handle uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_ack(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vdso_zx_interrupt_ack(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_interrupt_trigger(handle uint32, options uint32, timestamp int64) int32
+TEXT runtime·vdsoCall_zx_interrupt_trigger(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ timestamp+8(FP), DX
+ MOVQ vdso_zx_interrupt_trigger(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_interrupt_bind_vcpu(handle uint32, vcpu uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_bind_vcpu(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL vcpu+4(FP), SI
+ MOVL options+8(FP), DX
+ MOVQ vdso_zx_interrupt_bind_vcpu(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_iommu_create(resource uint32, typ uint32, desc unsafe.Pointer, desc_size uint, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_iommu_create(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVL typ+4(FP), SI
+ MOVQ desc+8(FP), DX
+ MOVQ desc_size+16(FP), CX
+ MOVQ out+24(FP), R8
+ MOVQ vdso_zx_iommu_create(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_ioports_request(resource uint32, io_addr uint16, len uint32) int32
+TEXT runtime·vdsoCall_zx_ioports_request(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVQ io_addr+4(FP), SI
+ MOVL len+8(FP), DX
+ MOVQ vdso_zx_ioports_request(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_ioports_release(resource uint32, io_addr uint16, len uint32) int32
+TEXT runtime·vdsoCall_zx_ioports_release(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVQ io_addr+4(FP), SI
+ MOVL len+8(FP), DX
+ MOVQ vdso_zx_ioports_release(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_job_create(parent_job uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_job_create(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL parent_job+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ out+8(FP), DX
+ MOVQ vdso_zx_job_create(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_job_set_policy(handle uint32, options uint32, topic uint32, policy unsafe.Pointer, policy_size uint32) int32
+TEXT runtime·vdsoCall_zx_job_set_policy(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVL topic+8(FP), DX
+ MOVQ policy+16(FP), CX
+ MOVL policy_size+24(FP), R8
+ MOVQ vdso_zx_job_set_policy(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_job_set_critical(job uint32, options uint32, process uint32) int32
+TEXT runtime·vdsoCall_zx_job_set_critical(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL job+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVL process+8(FP), DX
+ MOVQ vdso_zx_job_set_critical(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_ktrace_read(handle uint32, data unsafe.Pointer, offset uint32, data_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_ktrace_read(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ data+8(FP), SI
+ MOVL offset+16(FP), DX
+ MOVQ data_size+24(FP), CX
+ MOVQ actual+32(FP), R8
+ MOVQ vdso_zx_ktrace_read(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_ktrace_control(handle uint32, action uint32, options uint32, ptr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_ktrace_control(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL action+4(FP), SI
+ MOVL options+8(FP), DX
+ MOVQ ptr+16(FP), CX
+ MOVQ vdso_zx_ktrace_control(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_ktrace_write(handle uint32, id uint32, arg0 uint32, arg1 uint32) int32
+TEXT runtime·vdsoCall_zx_ktrace_write(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL id+4(FP), SI
+ MOVL arg0+8(FP), DX
+ MOVL arg1+12(FP), CX
+ MOVQ vdso_zx_ktrace_write(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_nanosleep(deadline int64) int32
+TEXT runtime·vdsoCall_zx_nanosleep(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ deadline+0(FP), DI
+ MOVQ vdso_zx_nanosleep(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_ticks_get() int64
+TEXT runtime·vdsoCall_zx_ticks_get(SB),NOSPLIT,$8-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_ticks_get(SB), AX
+ CALL AX
+ MOVQ AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_ticks_per_second() int64
+TEXT runtime·vdsoCall_zx_ticks_per_second(SB),NOSPLIT,$8-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_ticks_per_second(SB), AX
+ CALL AX
+ MOVQ AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_deadline_after(nanoseconds int64) int64
+TEXT runtime·vdsoCall_zx_deadline_after(SB),NOSPLIT,$8-16
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ nanoseconds+0(FP), DI
+ MOVQ vdso_zx_deadline_after(SB), AX
+ CALL AX
+ MOVQ AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmar_unmap_handle_close_thread_exit(vmar_handle uint32, addr uintptr, size uint, close_handle uint32) int32
+TEXT runtime·vdsoCall_zx_vmar_unmap_handle_close_thread_exit(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL vmar_handle+0(FP), DI
+ MOVQ addr+8(FP), SI
+ MOVQ size+16(FP), DX
+ MOVL close_handle+24(FP), CX
+ MOVQ vdso_zx_vmar_unmap_handle_close_thread_exit(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_futex_wake_handle_close_thread_exit(value_ptr unsafe.Pointer, wake_count uint32, new_value int32, close_handle uint32)
+TEXT runtime·vdsoCall_zx_futex_wake_handle_close_thread_exit(SB),NOSPLIT,$8-24
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ value_ptr+0(FP), DI
+ MOVL wake_count+8(FP), SI
+ MOVL new_value+12(FP), DX
+ MOVL close_handle+16(FP), CX
+ MOVQ vdso_zx_futex_wake_handle_close_thread_exit(SB), AX
+ CALL AX
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_ticks_get_via_kernel() int64
+TEXT runtime·vdsoCall_zx_ticks_get_via_kernel(SB),NOSPLIT,$8-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_ticks_get_via_kernel(SB), AX
+ CALL AX
+ MOVQ AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_msi_allocate(handle uint32, count uint32, out_allocation unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_msi_allocate(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL count+4(FP), SI
+ MOVQ out_allocation+8(FP), DX
+ MOVQ vdso_zx_msi_allocate(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_msi_create(handle uint32, options uint32, msi_id uint32, vmo uint32, vmo_offset uint, out_interrupt unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_msi_create(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVL msi_id+8(FP), DX
+ MOVL vmo+12(FP), CX
+ MOVQ vmo_offset+16(FP), R8
+ MOVQ out_interrupt+24(FP), R9
+ MOVQ vdso_zx_msi_create(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_mtrace_control(handle uint32, kind uint32, action uint32, options uint32, ptr unsafe.Pointer, ptr_size uint) int32
+TEXT runtime·vdsoCall_zx_mtrace_control(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL kind+4(FP), SI
+ MOVL action+8(FP), DX
+ MOVL options+12(FP), CX
+ MOVQ ptr+16(FP), R8
+ MOVQ ptr_size+24(FP), R9
+ MOVQ vdso_zx_mtrace_control(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_wait_one(handle uint32, signals uint32, deadline int64, observed unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_wait_one(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVL handle+0(FP), DI
+ MOVL signals+4(FP), SI
+ MOVQ deadline+8(FP), DX
+ MOVQ observed+16(FP), CX
+ MOVQ vdso_zx_object_wait_one(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_wait_many(items unsafe.Pointer, num_items uint, deadline int64) int32
+TEXT runtime·vdsoCall_zx_object_wait_many(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVQ items+0(FP), DI
+ MOVQ num_items+8(FP), SI
+ MOVQ deadline+16(FP), DX
+ MOVQ vdso_zx_object_wait_many(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_wait_async(handle uint32, port uint32, key uint64, signals uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_object_wait_async(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL port+4(FP), SI
+ MOVQ key+8(FP), DX
+ MOVL signals+16(FP), CX
+ MOVL options+20(FP), R8
+ MOVQ vdso_zx_object_wait_async(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_signal(handle uint32, clear_mask uint32, set_mask uint32) int32
+TEXT runtime·vdsoCall_zx_object_signal(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL clear_mask+4(FP), SI
+ MOVL set_mask+8(FP), DX
+ MOVQ vdso_zx_object_signal(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_signal_peer(handle uint32, clear_mask uint32, set_mask uint32) int32
+TEXT runtime·vdsoCall_zx_object_signal_peer(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL clear_mask+4(FP), SI
+ MOVL set_mask+8(FP), DX
+ MOVQ vdso_zx_object_signal_peer(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_get_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+TEXT runtime·vdsoCall_zx_object_get_property(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL property+4(FP), SI
+ MOVQ value+8(FP), DX
+ MOVQ value_size+16(FP), CX
+ MOVQ vdso_zx_object_get_property(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_set_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+TEXT runtime·vdsoCall_zx_object_set_property(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL property+4(FP), SI
+ MOVQ value+8(FP), DX
+ MOVQ value_size+16(FP), CX
+ MOVQ vdso_zx_object_set_property(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_get_info(handle uint32, topic uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer, avail unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_get_info(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL topic+4(FP), SI
+ MOVQ buffer+8(FP), DX
+ MOVQ buffer_size+16(FP), CX
+ MOVQ actual+24(FP), R8
+ MOVQ avail+32(FP), R9
+ MOVQ vdso_zx_object_get_info(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_get_child(handle uint32, koid uint64, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_get_child(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ koid+8(FP), SI
+ MOVL rights+16(FP), DX
+ MOVQ out+24(FP), CX
+ MOVQ vdso_zx_object_get_child(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_object_set_profile(handle uint32, profile uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_object_set_profile(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL profile+4(FP), SI
+ MOVL options+8(FP), DX
+ MOVQ vdso_zx_object_set_profile(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pager_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pager_create(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL options+0(FP), DI
+ MOVQ out+8(FP), SI
+ MOVQ vdso_zx_pager_create(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pager_create_vmo(pager uint32, options uint32, port uint32, key uint64, size uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pager_create_vmo(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL pager+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVL port+8(FP), DX
+ MOVQ key+16(FP), CX
+ MOVQ size+24(FP), R8
+ MOVQ out+32(FP), R9
+ MOVQ vdso_zx_pager_create_vmo(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pager_detach_vmo(pager uint32, vmo uint32) int32
+TEXT runtime·vdsoCall_zx_pager_detach_vmo(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL pager+0(FP), DI
+ MOVL vmo+4(FP), SI
+ MOVQ vdso_zx_pager_detach_vmo(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pager_supply_pages(pager uint32, pager_vmo uint32, offset uint64, length uint64, aux_vmo uint32, aux_offset uint64) int32
+TEXT runtime·vdsoCall_zx_pager_supply_pages(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL pager+0(FP), DI
+ MOVL pager_vmo+4(FP), SI
+ MOVQ offset+8(FP), DX
+ MOVQ length+16(FP), CX
+ MOVL aux_vmo+24(FP), R8
+ MOVQ aux_offset+32(FP), R9
+ MOVQ vdso_zx_pager_supply_pages(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pager_op_range(pager uint32, op uint32, pager_vmo uint32, offset uint64, length uint64, data uint64) int32
+TEXT runtime·vdsoCall_zx_pager_op_range(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL pager+0(FP), DI
+ MOVL op+4(FP), SI
+ MOVL pager_vmo+8(FP), DX
+ MOVQ offset+16(FP), CX
+ MOVQ length+24(FP), R8
+ MOVQ data+32(FP), R9
+ MOVQ vdso_zx_pager_op_range(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pc_firmware_tables(handle uint32, acpi_rsdp unsafe.Pointer, smbios unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pc_firmware_tables(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ acpi_rsdp+8(FP), SI
+ MOVQ smbios+16(FP), DX
+ MOVQ vdso_zx_pc_firmware_tables(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_get_nth_device(handle uint32, index uint32, out_info unsafe.Pointer, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_get_nth_device(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL index+4(FP), SI
+ MOVQ out_info+8(FP), DX
+ MOVQ out_handle+16(FP), CX
+ MOVQ vdso_zx_pci_get_nth_device(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_enable_bus_master(handle uint32, enable uint32) int32
+TEXT runtime·vdsoCall_zx_pci_enable_bus_master(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL enable+4(FP), SI
+ MOVQ vdso_zx_pci_enable_bus_master(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_reset_device(handle uint32) int32
+TEXT runtime·vdsoCall_zx_pci_reset_device(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vdso_zx_pci_reset_device(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_config_read(handle uint32, offset uint16, width uint, out_val unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_config_read(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ offset+4(FP), SI
+ MOVQ width+8(FP), DX
+ MOVQ out_val+16(FP), CX
+ MOVQ vdso_zx_pci_config_read(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_config_write(handle uint32, offset uint16, width uint, val uint32) int32
+TEXT runtime·vdsoCall_zx_pci_config_write(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ offset+4(FP), SI
+ MOVQ width+8(FP), DX
+ MOVL val+16(FP), CX
+ MOVQ vdso_zx_pci_config_write(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_cfg_pio_rw(handle uint32, bus uint8, dev uint8, funk uint8, offset uint8, val unsafe.Pointer, width uint, write uint32) int32
+TEXT runtime·vdsoCall_zx_pci_cfg_pio_rw(SB),NOSPLIT,$40-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 56(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 56(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ bus+4(FP), SI
+ MOVQ dev+5(FP), DX
+ MOVQ funk+6(FP), CX
+ MOVQ offset+7(FP), R8
+ MOVQ val+8(FP), R9
+ MOVQ width+16(FP), R12
+ MOVL write+24(FP), R13
+ MOVQ SP, BP // BP is preserved across vsdo call by the x86-64 ABI
+ ANDQ $~15, SP // stack alignment for x86-64 ABI
+ PUSHQ R13
+ PUSHQ R12
+ MOVQ vdso_zx_pci_cfg_pio_rw(SB), AX
+ CALL AX
+ POPQ R12
+ POPQ R13
+ MOVQ BP, SP
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_get_bar(handle uint32, bar_num uint32, out_bar unsafe.Pointer, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_get_bar(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL bar_num+4(FP), SI
+ MOVQ out_bar+8(FP), DX
+ MOVQ out_handle+16(FP), CX
+ MOVQ vdso_zx_pci_get_bar(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_map_interrupt(handle uint32, which_irq int32, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_map_interrupt(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL which_irq+4(FP), SI
+ MOVQ out_handle+8(FP), DX
+ MOVQ vdso_zx_pci_map_interrupt(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_query_irq_mode(handle uint32, mode uint32, out_max_irqs unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_query_irq_mode(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL mode+4(FP), SI
+ MOVQ out_max_irqs+8(FP), DX
+ MOVQ vdso_zx_pci_query_irq_mode(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_set_irq_mode(handle uint32, mode uint32, requested_irq_count uint32) int32
+TEXT runtime·vdsoCall_zx_pci_set_irq_mode(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL mode+4(FP), SI
+ MOVL requested_irq_count+8(FP), DX
+ MOVQ vdso_zx_pci_set_irq_mode(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_init(handle uint32, init_buf unsafe.Pointer, len uint32) int32
+TEXT runtime·vdsoCall_zx_pci_init(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ init_buf+8(FP), SI
+ MOVL len+16(FP), DX
+ MOVQ vdso_zx_pci_init(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pci_add_subtract_io_range(handle uint32, mmio uint32, base uint64, len uint64, add uint32) int32
+TEXT runtime·vdsoCall_zx_pci_add_subtract_io_range(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL mmio+4(FP), SI
+ MOVQ base+8(FP), DX
+ MOVQ len+16(FP), CX
+ MOVL add+24(FP), R8
+ MOVQ vdso_zx_pci_add_subtract_io_range(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_pmt_unpin(handle uint32) int32
+TEXT runtime·vdsoCall_zx_pmt_unpin(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vdso_zx_pmt_unpin(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_port_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_port_create(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL options+0(FP), DI
+ MOVQ out+8(FP), SI
+ MOVQ vdso_zx_port_create(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_port_queue(handle uint32, packet unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_port_queue(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ packet+8(FP), SI
+ MOVQ vdso_zx_port_queue(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_port_wait(handle uint32, deadline int64, packet unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_port_wait(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVL handle+0(FP), DI
+ MOVQ deadline+8(FP), SI
+ MOVQ packet+16(FP), DX
+ MOVQ vdso_zx_port_wait(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_port_cancel(handle uint32, source uint32, key uint64) int32
+TEXT runtime·vdsoCall_zx_port_cancel(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL source+4(FP), SI
+ MOVQ key+8(FP), DX
+ MOVQ vdso_zx_port_cancel(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_process_exit(retcode int64)
+TEXT runtime·vdsoCall_zx_process_exit(SB),NOSPLIT,$8-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ retcode+0(FP), DI
+ MOVQ vdso_zx_process_exit(SB), AX
+ CALL AX
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_process_create(job uint32, name unsafe.Pointer, name_size uint, options uint32, proc_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_process_create(SB),NOSPLIT,$8-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL job+0(FP), DI
+ MOVQ name+8(FP), SI
+ MOVQ name_size+16(FP), DX
+ MOVL options+24(FP), CX
+ MOVQ proc_handle+32(FP), R8
+ MOVQ vmar_handle+40(FP), R9
+ MOVQ vdso_zx_process_create(SB), AX
+ CALL AX
+ MOVL AX, ret+48(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_process_start(handle uint32, thread uint32, entry uintptr, stack uintptr, arg1 uint32, arg2 uintptr) int32
+TEXT runtime·vdsoCall_zx_process_start(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL thread+4(FP), SI
+ MOVQ entry+8(FP), DX
+ MOVQ stack+16(FP), CX
+ MOVL arg1+24(FP), R8
+ MOVQ arg2+32(FP), R9
+ MOVQ vdso_zx_process_start(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_process_read_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_process_read_memory(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vaddr+8(FP), SI
+ MOVQ buffer+16(FP), DX
+ MOVQ buffer_size+24(FP), CX
+ MOVQ actual+32(FP), R8
+ MOVQ vdso_zx_process_read_memory(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_process_write_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_process_write_memory(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vaddr+8(FP), SI
+ MOVQ buffer+16(FP), DX
+ MOVQ buffer_size+24(FP), CX
+ MOVQ actual+32(FP), R8
+ MOVQ vdso_zx_process_write_memory(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_profile_create(root_job uint32, options uint32, profile unsafe.Pointer, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_profile_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL root_job+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ profile+8(FP), DX
+ MOVQ out+16(FP), CX
+ MOVQ vdso_zx_profile_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_resource_create(parent_rsrc uint32, options uint32, base uint64, size uint, name unsafe.Pointer, name_size uint, resource_out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_resource_create(SB),NOSPLIT,$32-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 48(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 48(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL parent_rsrc+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ base+8(FP), DX
+ MOVQ size+16(FP), CX
+ MOVQ name+24(FP), R8
+ MOVQ name_size+32(FP), R9
+ MOVQ resource_out+40(FP), R12
+ MOVQ SP, BP // BP is preserved across vsdo call by the x86-64 ABI
+ ANDQ $~15, SP // stack alignment for x86-64 ABI
+ PUSHQ R12
+ MOVQ vdso_zx_resource_create(SB), AX
+ CALL AX
+ POPQ R12
+ MOVQ BP, SP
+ MOVL AX, ret+48(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_smc_call(handle uint32, parameters unsafe.Pointer, out_smc_result unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_smc_call(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ parameters+8(FP), SI
+ MOVQ out_smc_result+16(FP), DX
+ MOVQ vdso_zx_smc_call(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_socket_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_socket_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL options+0(FP), DI
+ MOVQ out0+8(FP), SI
+ MOVQ out1+16(FP), DX
+ MOVQ vdso_zx_socket_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_socket_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_socket_write(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ buffer+8(FP), DX
+ MOVQ buffer_size+16(FP), CX
+ MOVQ actual+24(FP), R8
+ MOVQ vdso_zx_socket_write(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_socket_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_socket_read(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ buffer+8(FP), DX
+ MOVQ buffer_size+16(FP), CX
+ MOVQ actual+24(FP), R8
+ MOVQ vdso_zx_socket_read(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_socket_shutdown(handle uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_socket_shutdown(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ vdso_zx_socket_shutdown(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_stream_create(options uint32, vmo uint32, seek uint64, out_stream unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL options+0(FP), DI
+ MOVL vmo+4(FP), SI
+ MOVQ seek+8(FP), DX
+ MOVQ out_stream+16(FP), CX
+ MOVQ vdso_zx_stream_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_stream_writev(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_writev(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ vector+8(FP), DX
+ MOVQ num_vector+16(FP), CX
+ MOVQ actual+24(FP), R8
+ MOVQ vdso_zx_stream_writev(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_stream_writev_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_writev_at(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ offset+8(FP), DX
+ MOVQ vector+16(FP), CX
+ MOVQ num_vector+24(FP), R8
+ MOVQ actual+32(FP), R9
+ MOVQ vdso_zx_stream_writev_at(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_stream_readv(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_readv(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ vector+8(FP), DX
+ MOVQ num_vector+16(FP), CX
+ MOVQ actual+24(FP), R8
+ MOVQ vdso_zx_stream_readv(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_stream_readv_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_readv_at(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ offset+8(FP), DX
+ MOVQ vector+16(FP), CX
+ MOVQ num_vector+24(FP), R8
+ MOVQ actual+32(FP), R9
+ MOVQ vdso_zx_stream_readv_at(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_stream_seek(handle uint32, whence uint32, offset int64, out_seek unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_seek(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL whence+4(FP), SI
+ MOVQ offset+8(FP), DX
+ MOVQ out_seek+16(FP), CX
+ MOVQ vdso_zx_stream_seek(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_0() int32
+TEXT runtime·vdsoCall_zx_syscall_test_0(SB),NOSPLIT,$8-4
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_syscall_test_0(SB), AX
+ CALL AX
+ MOVL AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_1(a int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_1(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL a+0(FP), DI
+ MOVQ vdso_zx_syscall_test_1(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_2(a int32, b int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_2(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL a+0(FP), DI
+ MOVL b+4(FP), SI
+ MOVQ vdso_zx_syscall_test_2(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_3(a int32, b int32, c int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_3(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL a+0(FP), DI
+ MOVL b+4(FP), SI
+ MOVL c+8(FP), DX
+ MOVQ vdso_zx_syscall_test_3(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_4(a int32, b int32, c int32, d int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_4(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL a+0(FP), DI
+ MOVL b+4(FP), SI
+ MOVL c+8(FP), DX
+ MOVL d+12(FP), CX
+ MOVQ vdso_zx_syscall_test_4(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_5(a int32, b int32, c int32, d int32, e int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_5(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL a+0(FP), DI
+ MOVL b+4(FP), SI
+ MOVL c+8(FP), DX
+ MOVL d+12(FP), CX
+ MOVL e+16(FP), R8
+ MOVQ vdso_zx_syscall_test_5(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_6(a int32, b int32, c int32, d int32, e int32, f int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_6(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL a+0(FP), DI
+ MOVL b+4(FP), SI
+ MOVL c+8(FP), DX
+ MOVL d+12(FP), CX
+ MOVL e+16(FP), R8
+ MOVL f+20(FP), R9
+ MOVQ vdso_zx_syscall_test_6(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_7(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_7(SB),NOSPLIT,$32-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 48(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 48(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL a+0(FP), DI
+ MOVL b+4(FP), SI
+ MOVL c+8(FP), DX
+ MOVL d+12(FP), CX
+ MOVL e+16(FP), R8
+ MOVL f+20(FP), R9
+ MOVL g_+24(FP), R12
+ MOVQ SP, BP // BP is preserved across vsdo call by the x86-64 ABI
+ ANDQ $~15, SP // stack alignment for x86-64 ABI
+ PUSHQ R12
+ MOVQ vdso_zx_syscall_test_7(SB), AX
+ CALL AX
+ POPQ R12
+ MOVQ BP, SP
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_8(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32, h int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_8(SB),NOSPLIT,$40-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 56(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 56(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL a+0(FP), DI
+ MOVL b+4(FP), SI
+ MOVL c+8(FP), DX
+ MOVL d+12(FP), CX
+ MOVL e+16(FP), R8
+ MOVL f+20(FP), R9
+ MOVL g_+24(FP), R12
+ MOVL h+28(FP), R13
+ MOVQ SP, BP // BP is preserved across vsdo call by the x86-64 ABI
+ ANDQ $~15, SP // stack alignment for x86-64 ABI
+ PUSHQ R13
+ PUSHQ R12
+ MOVQ vdso_zx_syscall_test_8(SB), AX
+ CALL AX
+ POPQ R12
+ POPQ R13
+ MOVQ BP, SP
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_wrapper(a int32, b int32, c int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_wrapper(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL a+0(FP), DI
+ MOVL b+4(FP), SI
+ MOVL c+8(FP), DX
+ MOVQ vdso_zx_syscall_test_wrapper(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_syscall_test_handle_create(return_value int32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_syscall_test_handle_create(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL return_value+0(FP), DI
+ MOVQ out+8(FP), SI
+ MOVQ vdso_zx_syscall_test_handle_create(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_system_get_dcache_line_size() uint32
+TEXT runtime·vdsoCall_zx_system_get_dcache_line_size(SB),NOSPLIT,$8-4
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_system_get_dcache_line_size(SB), AX
+ CALL AX
+ MOVL AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_system_get_num_cpus() uint32
+TEXT runtime·vdsoCall_zx_system_get_num_cpus(SB),NOSPLIT,$8-4
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_system_get_num_cpus(SB), AX
+ CALL AX
+ MOVL AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_system_get_version_string() unsafe.Pointer
+TEXT runtime·vdsoCall_zx_system_get_version_string(SB),NOSPLIT,$8-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_system_get_version_string(SB), AX
+ CALL AX
+ MOVQ AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_system_get_physmem() uint64
+TEXT runtime·vdsoCall_zx_system_get_physmem(SB),NOSPLIT,$8-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_system_get_physmem(SB), AX
+ CALL AX
+ MOVQ AX, ret+0(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_system_get_features(kind uint32, features unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_system_get_features(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL kind+0(FP), DI
+ MOVQ features+8(FP), SI
+ MOVQ vdso_zx_system_get_features(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_system_get_event(root_job uint32, kind uint32, event unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_system_get_event(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL root_job+0(FP), DI
+ MOVL kind+4(FP), SI
+ MOVQ event+8(FP), DX
+ MOVQ vdso_zx_system_get_event(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_system_mexec(resource uint32, kernel_vmo uint32, bootimage_vmo uint32) int32
+TEXT runtime·vdsoCall_zx_system_mexec(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVL kernel_vmo+4(FP), SI
+ MOVL bootimage_vmo+8(FP), DX
+ MOVQ vdso_zx_system_mexec(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_system_mexec_payload_get(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_system_mexec_payload_get(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVQ buffer+8(FP), SI
+ MOVQ buffer_size+16(FP), DX
+ MOVQ vdso_zx_system_mexec_payload_get(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_system_powerctl(resource uint32, cmd uint32, arg unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_system_powerctl(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVL cmd+4(FP), SI
+ MOVQ arg+8(FP), DX
+ MOVQ vdso_zx_system_powerctl(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_task_suspend(handle uint32, token unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_task_suspend(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ token+8(FP), SI
+ MOVQ vdso_zx_task_suspend(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_task_suspend_token(handle uint32, token unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_task_suspend_token(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ token+8(FP), SI
+ MOVQ vdso_zx_task_suspend_token(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_task_create_exception_channel(handle uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_task_create_exception_channel(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ out+8(FP), DX
+ MOVQ vdso_zx_task_create_exception_channel(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_task_kill(handle uint32) int32
+TEXT runtime·vdsoCall_zx_task_kill(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vdso_zx_task_kill(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_thread_exit()
+TEXT runtime·vdsoCall_zx_thread_exit(SB),NOSPLIT,$8-0
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ vdso_zx_thread_exit(SB), AX
+ CALL AX
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_thread_create(process uint32, name unsafe.Pointer, name_size uint, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_thread_create(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL process+0(FP), DI
+ MOVQ name+8(FP), SI
+ MOVQ name_size+16(FP), DX
+ MOVL options+24(FP), CX
+ MOVQ out+32(FP), R8
+ MOVQ vdso_zx_thread_create(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_thread_start(handle uint32, thread_entry uintptr, stack uintptr, arg1 uintptr, arg2 uintptr) int32
+TEXT runtime·vdsoCall_zx_thread_start(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ thread_entry+8(FP), SI
+ MOVQ stack+16(FP), DX
+ MOVQ arg1+24(FP), CX
+ MOVQ arg2+32(FP), R8
+ MOVQ vdso_zx_thread_start(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_thread_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_thread_read_state(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL kind+4(FP), SI
+ MOVQ buffer+8(FP), DX
+ MOVQ buffer_size+16(FP), CX
+ MOVQ vdso_zx_thread_read_state(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_thread_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_thread_write_state(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL kind+4(FP), SI
+ MOVQ buffer+8(FP), DX
+ MOVQ buffer_size+16(FP), CX
+ MOVQ vdso_zx_thread_write_state(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_timer_create(options uint32, clock_id uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_timer_create(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL options+0(FP), DI
+ MOVL clock_id+4(FP), SI
+ MOVQ out+8(FP), DX
+ MOVQ vdso_zx_timer_create(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_timer_set(handle uint32, deadline int64, slack int64) int32
+TEXT runtime·vdsoCall_zx_timer_set(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ deadline+8(FP), SI
+ MOVQ slack+16(FP), DX
+ MOVQ vdso_zx_timer_set(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_timer_cancel(handle uint32) int32
+TEXT runtime·vdsoCall_zx_timer_cancel(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vdso_zx_timer_cancel(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vcpu_create(guest uint32, options uint32, entry uintptr, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vcpu_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL guest+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ entry+8(FP), DX
+ MOVQ out+16(FP), CX
+ MOVQ vdso_zx_vcpu_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vcpu_resume(handle uint32, packet unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vcpu_resume(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVL handle+0(FP), DI
+ MOVQ packet+8(FP), SI
+ MOVQ vdso_zx_vcpu_resume(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vcpu_interrupt(handle uint32, vector uint32) int32
+TEXT runtime·vdsoCall_zx_vcpu_interrupt(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL vector+4(FP), SI
+ MOVQ vdso_zx_vcpu_interrupt(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vcpu_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vcpu_read_state(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL kind+4(FP), SI
+ MOVQ buffer+8(FP), DX
+ MOVQ buffer_size+16(FP), CX
+ MOVQ vdso_zx_vcpu_read_state(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vcpu_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vcpu_write_state(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL kind+4(FP), SI
+ MOVQ buffer+8(FP), DX
+ MOVQ buffer_size+16(FP), CX
+ MOVQ vdso_zx_vcpu_write_state(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmar_allocate(parent_vmar uint32, options uint32, offset uint, size uint, child_vmar unsafe.Pointer, child_addr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmar_allocate(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL parent_vmar+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ offset+8(FP), DX
+ MOVQ size+16(FP), CX
+ MOVQ child_vmar+24(FP), R8
+ MOVQ child_addr+32(FP), R9
+ MOVQ vdso_zx_vmar_allocate(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmar_destroy(handle uint32) int32
+TEXT runtime·vdsoCall_zx_vmar_destroy(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ vdso_zx_vmar_destroy(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmar_map(handle uint32, options uint32, vmar_offset uint, vmo uint32, vmo_offset uint64, len uint, mapped_addr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmar_map(SB),NOSPLIT,$32-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 48(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 48(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ vmar_offset+8(FP), DX
+ MOVL vmo+16(FP), CX
+ MOVQ vmo_offset+24(FP), R8
+ MOVQ len+32(FP), R9
+ MOVQ mapped_addr+40(FP), R12
+ MOVQ SP, BP // BP is preserved across vsdo call by the x86-64 ABI
+ ANDQ $~15, SP // stack alignment for x86-64 ABI
+ PUSHQ R12
+ MOVQ vdso_zx_vmar_map(SB), AX
+ CALL AX
+ POPQ R12
+ MOVQ BP, SP
+ MOVL AX, ret+48(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmar_unmap(handle uint32, addr uintptr, len uint) int32
+TEXT runtime·vdsoCall_zx_vmar_unmap(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ addr+8(FP), SI
+ MOVQ len+16(FP), DX
+ MOVQ vdso_zx_vmar_unmap(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmar_protect(handle uint32, options uint32, addr uintptr, len uint) int32
+TEXT runtime·vdsoCall_zx_vmar_protect(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ addr+8(FP), DX
+ MOVQ len+16(FP), CX
+ MOVQ vdso_zx_vmar_protect(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmar_op_range(handle uint32, op uint32, address uintptr, size uint, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmar_op_range(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL op+4(FP), SI
+ MOVQ address+8(FP), DX
+ MOVQ size+16(FP), CX
+ MOVQ buffer+24(FP), R8
+ MOVQ buffer_size+32(FP), R9
+ MOVQ vdso_zx_vmar_op_range(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_create(size uint64, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create(SB),NOSPLIT,$8-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVQ size+0(FP), DI
+ MOVL options+8(FP), SI
+ MOVQ out+16(FP), DX
+ MOVQ vdso_zx_vmo_create(SB), AX
+ CALL AX
+ MOVL AX, ret+24(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_read(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmo_read(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVL handle+0(FP), DI
+ MOVQ buffer+8(FP), SI
+ MOVQ offset+16(FP), DX
+ MOVQ buffer_size+24(FP), CX
+ MOVQ vdso_zx_vmo_read(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_write(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmo_write(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVL handle+0(FP), DI
+ MOVQ buffer+8(FP), SI
+ MOVQ offset+16(FP), DX
+ MOVQ buffer_size+24(FP), CX
+ MOVQ vdso_zx_vmo_write(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_get_size(handle uint32, size unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_get_size(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ size+8(FP), SI
+ MOVQ vdso_zx_vmo_get_size(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_set_size(handle uint32, size uint64) int32
+TEXT runtime·vdsoCall_zx_vmo_set_size(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVQ size+8(FP), SI
+ MOVQ vdso_zx_vmo_set_size(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_op_range(handle uint32, op uint32, offset uint64, size uint64, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmo_op_range(SB),NOSPLIT,$8-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ CALL runtime·entersyscall(SB)
+ MOVL handle+0(FP), DI
+ MOVL op+4(FP), SI
+ MOVQ offset+8(FP), DX
+ MOVQ size+16(FP), CX
+ MOVQ buffer+24(FP), R8
+ MOVQ buffer_size+32(FP), R9
+ MOVQ vdso_zx_vmo_op_range(SB), AX
+ CALL AX
+ MOVL AX, ret+40(FP)
+ CALL runtime·exitsyscall(SB)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_create_child(handle uint32, options uint32, offset uint64, size uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create_child(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL options+4(FP), SI
+ MOVQ offset+8(FP), DX
+ MOVQ size+16(FP), CX
+ MOVQ out+24(FP), R8
+ MOVQ vdso_zx_vmo_create_child(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_set_cache_policy(handle uint32, cache_policy uint32) int32
+TEXT runtime·vdsoCall_zx_vmo_set_cache_policy(SB),NOSPLIT,$8-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL cache_policy+4(FP), SI
+ MOVQ vdso_zx_vmo_set_cache_policy(SB), AX
+ CALL AX
+ MOVL AX, ret+8(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_replace_as_executable(handle uint32, vmex uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_replace_as_executable(SB),NOSPLIT,$8-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL handle+0(FP), DI
+ MOVL vmex+4(FP), SI
+ MOVQ out+8(FP), DX
+ MOVQ vdso_zx_vmo_replace_as_executable(SB), AX
+ CALL AX
+ MOVL AX, ret+16(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_create_contiguous(bti uint32, size uint, alignment_log2 uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create_contiguous(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL bti+0(FP), DI
+ MOVQ size+8(FP), SI
+ MOVL alignment_log2+16(FP), DX
+ MOVQ out+24(FP), CX
+ MOVQ vdso_zx_vmo_create_contiguous(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
+// func vdsoCall_zx_vmo_create_physical(resource uint32, paddr uintptr, size uint, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create_physical(SB),NOSPLIT,$8-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ get_tls(CX)
+ MOVQ g(CX), AX
+ MOVQ g_m(AX), R14
+ PUSHQ R14
+ MOVQ 24(SP), DX
+ MOVQ DX, m_vdsoPC(R14)
+ LEAQ 24(SP), DX
+ MOVQ DX, m_vdsoSP(R14)
+ MOVL resource+0(FP), DI
+ MOVQ paddr+8(FP), SI
+ MOVQ size+16(FP), DX
+ MOVQ out+24(FP), CX
+ MOVQ vdso_zx_vmo_create_physical(SB), AX
+ CALL AX
+ MOVL AX, ret+32(FP)
+ POPQ R14
+ MOVQ $0, m_vdsoSP(R14)
+ RET
+
diff --git a/src/runtime/vdsocalls_fuchsia_arm64.s b/src/runtime/vdsocalls_fuchsia_arm64.s
new file mode 100644
index 0000000..443242d
--- /dev/null
+++ b/src/runtime/vdsocalls_fuchsia_arm64.s
@@ -0,0 +1,3248 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// WARNING: THIS FILE IS MACHINE GENERATED BY //tools/kazoo. DO NOT EDIT.
+
+#include "go_asm.h"
+#include "go_tls.h"
+#include "textflag.h"
+#include "funcdata.h"
+
+// func vdsoCall_zx_bti_create(iommu uint32, options uint32, bti_id uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_bti_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW iommu+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD bti_id+8(FP), R2
+ MOVD out+16(FP), R3
+ BL vdso_zx_bti_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_bti_pin(handle uint32, options uint32, vmo uint32, offset uint64, size uint64, addrs unsafe.Pointer, num_addrs uint, pmt unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_bti_pin(SB),NOSPLIT,$0-60
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVW vmo+8(FP), R2
+ MOVD offset+16(FP), R3
+ MOVD size+24(FP), R4
+ MOVD addrs+32(FP), R5
+ MOVD num_addrs+40(FP), R6
+ MOVD pmt+48(FP), R7
+ BL vdso_zx_bti_pin(SB)
+ MOVW R0, ret+56(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_bti_release_quarantine(handle uint32) int32
+TEXT runtime·vdsoCall_zx_bti_release_quarantine(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ BL vdso_zx_bti_release_quarantine(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_cache_flush(addr unsafe.Pointer, size uint, options uint32) int32
+TEXT runtime·vdsoCall_zx_cache_flush(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD addr+0(FP), R0
+ MOVD size+8(FP), R1
+ MOVW options+16(FP), R2
+ BL vdso_zx_cache_flush(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW options+0(FP), R0
+ MOVD out0+8(FP), R1
+ MOVD out1+16(FP), R2
+ BL vdso_zx_channel_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_read(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_read(SB),NOSPLIT,$0-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD bytes+8(FP), R2
+ MOVD handles+16(FP), R3
+ MOVW num_bytes+24(FP), R4
+ MOVW num_handles+28(FP), R5
+ MOVD actual_bytes+32(FP), R6
+ MOVD actual_handles+40(FP), R7
+ BL vdso_zx_channel_read(SB)
+ MOVW R0, ret+48(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_read_etc(handle uint32, options uint32, bytes unsafe.Pointer, handles unsafe.Pointer, num_bytes uint32, num_handles uint32, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_read_etc(SB),NOSPLIT,$0-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD bytes+8(FP), R2
+ MOVD handles+16(FP), R3
+ MOVW num_bytes+24(FP), R4
+ MOVW num_handles+28(FP), R5
+ MOVD actual_bytes+32(FP), R6
+ MOVD actual_handles+40(FP), R7
+ BL vdso_zx_channel_read_etc(SB)
+ MOVW R0, ret+48(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_write(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+TEXT runtime·vdsoCall_zx_channel_write(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD bytes+8(FP), R2
+ MOVW num_bytes+16(FP), R3
+ MOVD handles+24(FP), R4
+ MOVW num_handles+32(FP), R5
+ BL vdso_zx_channel_write(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_write_etc(handle uint32, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles unsafe.Pointer, num_handles uint32) int32
+TEXT runtime·vdsoCall_zx_channel_write_etc(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD bytes+8(FP), R2
+ MOVW num_bytes+16(FP), R3
+ MOVD handles+24(FP), R4
+ MOVW num_handles+32(FP), R5
+ BL vdso_zx_channel_write_etc(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_call_noretry(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_noretry(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD deadline+8(FP), R2
+ MOVD args+16(FP), R3
+ MOVD actual_bytes+24(FP), R4
+ MOVD actual_handles+32(FP), R5
+ BL vdso_zx_channel_call_noretry(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_call_finish(deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_finish(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD deadline+0(FP), R0
+ MOVD args+8(FP), R1
+ MOVD actual_bytes+16(FP), R2
+ MOVD actual_handles+24(FP), R3
+ BL vdso_zx_channel_call_finish(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_call(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD deadline+8(FP), R2
+ MOVD args+16(FP), R3
+ MOVD actual_bytes+24(FP), R4
+ MOVD actual_handles+32(FP), R5
+ BL vdso_zx_channel_call(SB)
+ MOVW R0, ret+40(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_call_etc_noretry(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_etc_noretry(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD deadline+8(FP), R2
+ MOVD args+16(FP), R3
+ MOVD actual_bytes+24(FP), R4
+ MOVD actual_handles+32(FP), R5
+ BL vdso_zx_channel_call_etc_noretry(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_call_etc_finish(deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_etc_finish(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD deadline+0(FP), R0
+ MOVD args+8(FP), R1
+ MOVD actual_bytes+16(FP), R2
+ MOVD actual_handles+24(FP), R3
+ BL vdso_zx_channel_call_etc_finish(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_channel_call_etc(handle uint32, options uint32, deadline int64, args unsafe.Pointer, actual_bytes unsafe.Pointer, actual_handles unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_channel_call_etc(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD deadline+8(FP), R2
+ MOVD args+16(FP), R3
+ MOVD actual_bytes+24(FP), R4
+ MOVD actual_handles+32(FP), R5
+ BL vdso_zx_channel_call_etc(SB)
+ MOVW R0, ret+40(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_clock_get(clock_id uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_get(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW clock_id+0(FP), R0
+ MOVD out+8(FP), R1
+ BL vdso_zx_clock_get(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_clock_get_monotonic() int64
+TEXT runtime·vdsoCall_zx_clock_get_monotonic(SB),NOSPLIT,$0-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_clock_get_monotonic(SB)
+ MOVD R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_clock_adjust(handle uint32, clock_id uint32, offset int64) int32
+TEXT runtime·vdsoCall_zx_clock_adjust(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW clock_id+4(FP), R1
+ MOVD offset+8(FP), R2
+ BL vdso_zx_clock_adjust(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_clock_get_monotonic_via_kernel() int64
+TEXT runtime·vdsoCall_zx_clock_get_monotonic_via_kernel(SB),NOSPLIT,$0-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_clock_get_monotonic_via_kernel(SB)
+ MOVD R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_clock_create(options uint64, args unsafe.Pointer, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD options+0(FP), R0
+ MOVD args+8(FP), R1
+ MOVD out+16(FP), R2
+ BL vdso_zx_clock_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_clock_read(handle uint32, now unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_read(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD now+8(FP), R1
+ BL vdso_zx_clock_read(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_clock_get_details(handle uint32, options uint64, details unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_get_details(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD options+8(FP), R1
+ MOVD details+16(FP), R2
+ BL vdso_zx_clock_get_details(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_clock_update(handle uint32, options uint64, args unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_clock_update(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD options+8(FP), R1
+ MOVD args+16(FP), R2
+ BL vdso_zx_clock_update(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_cprng_draw_once(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_cprng_draw_once(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD buffer+0(FP), R0
+ MOVD buffer_size+8(FP), R1
+ BL vdso_zx_cprng_draw_once(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_cprng_draw(buffer unsafe.Pointer, buffer_size uint)
+TEXT runtime·vdsoCall_zx_cprng_draw(SB),NOSPLIT,$0-16
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD buffer+0(FP), R0
+ MOVD buffer_size+8(FP), R1
+ BL vdso_zx_cprng_draw(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_cprng_add_entropy(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_cprng_add_entropy(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD buffer+0(FP), R0
+ MOVD buffer_size+8(FP), R1
+ BL vdso_zx_cprng_add_entropy(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_debug_read(handle uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_debug_read(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD buffer+8(FP), R1
+ MOVD buffer_size+16(FP), R2
+ MOVD actual+24(FP), R3
+ BL vdso_zx_debug_read(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_debug_write(buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debug_write(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD buffer+0(FP), R0
+ MOVD buffer_size+8(FP), R1
+ BL vdso_zx_debug_write(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_debug_send_command(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debug_send_command(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVD buffer+8(FP), R1
+ MOVD buffer_size+16(FP), R2
+ BL vdso_zx_debug_send_command(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_debuglog_create(resource uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_debuglog_create(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD out+8(FP), R2
+ BL vdso_zx_debuglog_create(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_debuglog_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debuglog_write(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD buffer+8(FP), R2
+ MOVD buffer_size+16(FP), R3
+ BL vdso_zx_debuglog_write(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_debuglog_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_debuglog_read(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD buffer+8(FP), R2
+ MOVD buffer_size+16(FP), R3
+ BL vdso_zx_debuglog_read(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_event_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_event_create(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW options+0(FP), R0
+ MOVD out+8(FP), R1
+ BL vdso_zx_event_create(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_eventpair_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_eventpair_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW options+0(FP), R0
+ MOVD out0+8(FP), R1
+ MOVD out1+16(FP), R2
+ BL vdso_zx_eventpair_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_exception_get_thread(handle uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_exception_get_thread(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD out+8(FP), R1
+ BL vdso_zx_exception_get_thread(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_exception_get_process(handle uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_exception_get_process(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD out+8(FP), R1
+ BL vdso_zx_exception_get_process(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_fifo_create(elem_count uint, elem_size uint, options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_create(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD elem_count+0(FP), R0
+ MOVD elem_size+8(FP), R1
+ MOVW options+16(FP), R2
+ MOVD out0+24(FP), R3
+ MOVD out1+32(FP), R4
+ BL vdso_zx_fifo_create(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_fifo_read(handle uint32, elem_size uint, data unsafe.Pointer, data_size uint, actual_count unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_read(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD elem_size+8(FP), R1
+ MOVD data+16(FP), R2
+ MOVD data_size+24(FP), R3
+ MOVD actual_count+32(FP), R4
+ BL vdso_zx_fifo_read(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_fifo_write(handle uint32, elem_size uint, data unsafe.Pointer, count uint, actual_count unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_fifo_write(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD elem_size+8(FP), R1
+ MOVD data+16(FP), R2
+ MOVD count+24(FP), R3
+ MOVD actual_count+32(FP), R4
+ BL vdso_zx_fifo_write(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_framebuffer_get_info(resource uint32, format unsafe.Pointer, width unsafe.Pointer, height unsafe.Pointer, stride unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_framebuffer_get_info(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVD format+8(FP), R1
+ MOVD width+16(FP), R2
+ MOVD height+24(FP), R3
+ MOVD stride+32(FP), R4
+ BL vdso_zx_framebuffer_get_info(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_framebuffer_set_range(resource uint32, vmo uint32, len uint32, format uint32, width uint32, height uint32, stride uint32) int32
+TEXT runtime·vdsoCall_zx_framebuffer_set_range(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVW vmo+4(FP), R1
+ MOVW len+8(FP), R2
+ MOVW format+12(FP), R3
+ MOVW width+16(FP), R4
+ MOVW height+20(FP), R5
+ MOVW stride+24(FP), R6
+ BL vdso_zx_framebuffer_set_range(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_futex_wait(value_ptr unsafe.Pointer, current_value int32, new_futex_owner uint32, deadline int64) int32
+TEXT runtime·vdsoCall_zx_futex_wait(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD value_ptr+0(FP), R0
+ MOVW current_value+8(FP), R1
+ MOVW new_futex_owner+12(FP), R2
+ MOVD deadline+16(FP), R3
+ BL vdso_zx_futex_wait(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_futex_wake(value_ptr unsafe.Pointer, wake_count uint32) int32
+TEXT runtime·vdsoCall_zx_futex_wake(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD value_ptr+0(FP), R0
+ MOVW wake_count+8(FP), R1
+ BL vdso_zx_futex_wake(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_futex_requeue(value_ptr unsafe.Pointer, wake_count uint32, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+TEXT runtime·vdsoCall_zx_futex_requeue(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD value_ptr+0(FP), R0
+ MOVW wake_count+8(FP), R1
+ MOVW current_value+12(FP), R2
+ MOVD requeue_ptr+16(FP), R3
+ MOVW requeue_count+24(FP), R4
+ MOVW new_requeue_owner+28(FP), R5
+ BL vdso_zx_futex_requeue(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_futex_wake_single_owner(value_ptr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_futex_wake_single_owner(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD value_ptr+0(FP), R0
+ BL vdso_zx_futex_wake_single_owner(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_futex_requeue_single_owner(value_ptr unsafe.Pointer, current_value int32, requeue_ptr unsafe.Pointer, requeue_count uint32, new_requeue_owner uint32) int32
+TEXT runtime·vdsoCall_zx_futex_requeue_single_owner(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD value_ptr+0(FP), R0
+ MOVW current_value+8(FP), R1
+ MOVD requeue_ptr+16(FP), R2
+ MOVW requeue_count+24(FP), R3
+ MOVW new_requeue_owner+28(FP), R4
+ BL vdso_zx_futex_requeue_single_owner(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_futex_get_owner(value_ptr unsafe.Pointer, koid unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_futex_get_owner(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD value_ptr+0(FP), R0
+ MOVD koid+8(FP), R1
+ BL vdso_zx_futex_get_owner(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_guest_create(resource uint32, options uint32, guest_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_guest_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD guest_handle+8(FP), R2
+ MOVD vmar_handle+16(FP), R3
+ BL vdso_zx_guest_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_guest_set_trap(handle uint32, kind uint32, addr uintptr, size uint, port_handle uint32, key uint64) int32
+TEXT runtime·vdsoCall_zx_guest_set_trap(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW kind+4(FP), R1
+ MOVD addr+8(FP), R2
+ MOVD size+16(FP), R3
+ MOVW port_handle+24(FP), R4
+ MOVD key+32(FP), R5
+ BL vdso_zx_guest_set_trap(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_handle_close(handle uint32) int32
+TEXT runtime·vdsoCall_zx_handle_close(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ BL vdso_zx_handle_close(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_handle_close_many(handles unsafe.Pointer, num_handles uint) int32
+TEXT runtime·vdsoCall_zx_handle_close_many(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD handles+0(FP), R0
+ MOVD num_handles+8(FP), R1
+ BL vdso_zx_handle_close_many(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_handle_duplicate(handle uint32, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_handle_duplicate(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW rights+4(FP), R1
+ MOVD out+8(FP), R2
+ BL vdso_zx_handle_duplicate(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_handle_replace(handle uint32, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_handle_replace(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW rights+4(FP), R1
+ MOVD out+8(FP), R2
+ BL vdso_zx_handle_replace(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_interrupt_create(src_obj uint32, src_num uint32, options uint32, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_interrupt_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW src_obj+0(FP), R0
+ MOVW src_num+4(FP), R1
+ MOVW options+8(FP), R2
+ MOVD out_handle+16(FP), R3
+ BL vdso_zx_interrupt_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_interrupt_bind(handle uint32, port_handle uint32, key uint64, options uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_bind(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW port_handle+4(FP), R1
+ MOVD key+8(FP), R2
+ MOVW options+16(FP), R3
+ BL vdso_zx_interrupt_bind(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_interrupt_wait(handle uint32, out_timestamp unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_interrupt_wait(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVW handle+0(FP), R0
+ MOVD out_timestamp+8(FP), R1
+ BL vdso_zx_interrupt_wait(SB)
+ MOVW R0, ret+16(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_interrupt_destroy(handle uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_destroy(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ BL vdso_zx_interrupt_destroy(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_interrupt_ack(handle uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_ack(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ BL vdso_zx_interrupt_ack(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_interrupt_trigger(handle uint32, options uint32, timestamp int64) int32
+TEXT runtime·vdsoCall_zx_interrupt_trigger(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD timestamp+8(FP), R2
+ BL vdso_zx_interrupt_trigger(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_interrupt_bind_vcpu(handle uint32, vcpu uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_interrupt_bind_vcpu(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW vcpu+4(FP), R1
+ MOVW options+8(FP), R2
+ BL vdso_zx_interrupt_bind_vcpu(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_iommu_create(resource uint32, typ uint32, desc unsafe.Pointer, desc_size uint, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_iommu_create(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVW typ+4(FP), R1
+ MOVD desc+8(FP), R2
+ MOVD desc_size+16(FP), R3
+ MOVD out+24(FP), R4
+ BL vdso_zx_iommu_create(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_ioports_request(resource uint32, io_addr uint16, len uint32) int32
+TEXT runtime·vdsoCall_zx_ioports_request(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVD io_addr+4(FP), R1
+ MOVW len+8(FP), R2
+ BL vdso_zx_ioports_request(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_ioports_release(resource uint32, io_addr uint16, len uint32) int32
+TEXT runtime·vdsoCall_zx_ioports_release(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVD io_addr+4(FP), R1
+ MOVW len+8(FP), R2
+ BL vdso_zx_ioports_release(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_job_create(parent_job uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_job_create(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW parent_job+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD out+8(FP), R2
+ BL vdso_zx_job_create(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_job_set_policy(handle uint32, options uint32, topic uint32, policy unsafe.Pointer, policy_size uint32) int32
+TEXT runtime·vdsoCall_zx_job_set_policy(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVW topic+8(FP), R2
+ MOVD policy+16(FP), R3
+ MOVW policy_size+24(FP), R4
+ BL vdso_zx_job_set_policy(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_job_set_critical(job uint32, options uint32, process uint32) int32
+TEXT runtime·vdsoCall_zx_job_set_critical(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW job+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVW process+8(FP), R2
+ BL vdso_zx_job_set_critical(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_ktrace_read(handle uint32, data unsafe.Pointer, offset uint32, data_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_ktrace_read(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD data+8(FP), R1
+ MOVW offset+16(FP), R2
+ MOVD data_size+24(FP), R3
+ MOVD actual+32(FP), R4
+ BL vdso_zx_ktrace_read(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_ktrace_control(handle uint32, action uint32, options uint32, ptr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_ktrace_control(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW action+4(FP), R1
+ MOVW options+8(FP), R2
+ MOVD ptr+16(FP), R3
+ BL vdso_zx_ktrace_control(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_ktrace_write(handle uint32, id uint32, arg0 uint32, arg1 uint32) int32
+TEXT runtime·vdsoCall_zx_ktrace_write(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW id+4(FP), R1
+ MOVW arg0+8(FP), R2
+ MOVW arg1+12(FP), R3
+ BL vdso_zx_ktrace_write(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_nanosleep(deadline int64) int32
+TEXT runtime·vdsoCall_zx_nanosleep(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD deadline+0(FP), R0
+ BL vdso_zx_nanosleep(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_ticks_get() int64
+TEXT runtime·vdsoCall_zx_ticks_get(SB),NOSPLIT,$0-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_ticks_get(SB)
+ MOVD R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_ticks_per_second() int64
+TEXT runtime·vdsoCall_zx_ticks_per_second(SB),NOSPLIT,$0-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_ticks_per_second(SB)
+ MOVD R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_deadline_after(nanoseconds int64) int64
+TEXT runtime·vdsoCall_zx_deadline_after(SB),NOSPLIT,$0-16
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD nanoseconds+0(FP), R0
+ BL vdso_zx_deadline_after(SB)
+ MOVD R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmar_unmap_handle_close_thread_exit(vmar_handle uint32, addr uintptr, size uint, close_handle uint32) int32
+TEXT runtime·vdsoCall_zx_vmar_unmap_handle_close_thread_exit(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW vmar_handle+0(FP), R0
+ MOVD addr+8(FP), R1
+ MOVD size+16(FP), R2
+ MOVW close_handle+24(FP), R3
+ BL vdso_zx_vmar_unmap_handle_close_thread_exit(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_futex_wake_handle_close_thread_exit(value_ptr unsafe.Pointer, wake_count uint32, new_value int32, close_handle uint32)
+TEXT runtime·vdsoCall_zx_futex_wake_handle_close_thread_exit(SB),NOSPLIT,$0-24
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD value_ptr+0(FP), R0
+ MOVW wake_count+8(FP), R1
+ MOVW new_value+12(FP), R2
+ MOVW close_handle+16(FP), R3
+ BL vdso_zx_futex_wake_handle_close_thread_exit(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_ticks_get_via_kernel() int64
+TEXT runtime·vdsoCall_zx_ticks_get_via_kernel(SB),NOSPLIT,$0-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_ticks_get_via_kernel(SB)
+ MOVD R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_msi_allocate(handle uint32, count uint32, out_allocation unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_msi_allocate(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW count+4(FP), R1
+ MOVD out_allocation+8(FP), R2
+ BL vdso_zx_msi_allocate(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_msi_create(handle uint32, options uint32, msi_id uint32, vmo uint32, vmo_offset uint, out_interrupt unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_msi_create(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVW msi_id+8(FP), R2
+ MOVW vmo+12(FP), R3
+ MOVD vmo_offset+16(FP), R4
+ MOVD out_interrupt+24(FP), R5
+ BL vdso_zx_msi_create(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_mtrace_control(handle uint32, kind uint32, action uint32, options uint32, ptr unsafe.Pointer, ptr_size uint) int32
+TEXT runtime·vdsoCall_zx_mtrace_control(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW kind+4(FP), R1
+ MOVW action+8(FP), R2
+ MOVW options+12(FP), R3
+ MOVD ptr+16(FP), R4
+ MOVD ptr_size+24(FP), R5
+ BL vdso_zx_mtrace_control(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_wait_one(handle uint32, signals uint32, deadline int64, observed unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_wait_one(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVW handle+0(FP), R0
+ MOVW signals+4(FP), R1
+ MOVD deadline+8(FP), R2
+ MOVD observed+16(FP), R3
+ BL vdso_zx_object_wait_one(SB)
+ MOVW R0, ret+24(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_wait_many(items unsafe.Pointer, num_items uint, deadline int64) int32
+TEXT runtime·vdsoCall_zx_object_wait_many(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVD items+0(FP), R0
+ MOVD num_items+8(FP), R1
+ MOVD deadline+16(FP), R2
+ BL vdso_zx_object_wait_many(SB)
+ MOVW R0, ret+24(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_wait_async(handle uint32, port uint32, key uint64, signals uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_object_wait_async(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW port+4(FP), R1
+ MOVD key+8(FP), R2
+ MOVW signals+16(FP), R3
+ MOVW options+20(FP), R4
+ BL vdso_zx_object_wait_async(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_signal(handle uint32, clear_mask uint32, set_mask uint32) int32
+TEXT runtime·vdsoCall_zx_object_signal(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW clear_mask+4(FP), R1
+ MOVW set_mask+8(FP), R2
+ BL vdso_zx_object_signal(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_signal_peer(handle uint32, clear_mask uint32, set_mask uint32) int32
+TEXT runtime·vdsoCall_zx_object_signal_peer(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW clear_mask+4(FP), R1
+ MOVW set_mask+8(FP), R2
+ BL vdso_zx_object_signal_peer(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_get_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+TEXT runtime·vdsoCall_zx_object_get_property(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW property+4(FP), R1
+ MOVD value+8(FP), R2
+ MOVD value_size+16(FP), R3
+ BL vdso_zx_object_get_property(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_set_property(handle uint32, property uint32, value unsafe.Pointer, value_size uint) int32
+TEXT runtime·vdsoCall_zx_object_set_property(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW property+4(FP), R1
+ MOVD value+8(FP), R2
+ MOVD value_size+16(FP), R3
+ BL vdso_zx_object_set_property(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_get_info(handle uint32, topic uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer, avail unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_get_info(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW topic+4(FP), R1
+ MOVD buffer+8(FP), R2
+ MOVD buffer_size+16(FP), R3
+ MOVD actual+24(FP), R4
+ MOVD avail+32(FP), R5
+ BL vdso_zx_object_get_info(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_get_child(handle uint32, koid uint64, rights uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_object_get_child(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD koid+8(FP), R1
+ MOVW rights+16(FP), R2
+ MOVD out+24(FP), R3
+ BL vdso_zx_object_get_child(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_object_set_profile(handle uint32, profile uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_object_set_profile(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW profile+4(FP), R1
+ MOVW options+8(FP), R2
+ BL vdso_zx_object_set_profile(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pager_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pager_create(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW options+0(FP), R0
+ MOVD out+8(FP), R1
+ BL vdso_zx_pager_create(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pager_create_vmo(pager uint32, options uint32, port uint32, key uint64, size uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pager_create_vmo(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW pager+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVW port+8(FP), R2
+ MOVD key+16(FP), R3
+ MOVD size+24(FP), R4
+ MOVD out+32(FP), R5
+ BL vdso_zx_pager_create_vmo(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pager_detach_vmo(pager uint32, vmo uint32) int32
+TEXT runtime·vdsoCall_zx_pager_detach_vmo(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW pager+0(FP), R0
+ MOVW vmo+4(FP), R1
+ BL vdso_zx_pager_detach_vmo(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pager_supply_pages(pager uint32, pager_vmo uint32, offset uint64, length uint64, aux_vmo uint32, aux_offset uint64) int32
+TEXT runtime·vdsoCall_zx_pager_supply_pages(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW pager+0(FP), R0
+ MOVW pager_vmo+4(FP), R1
+ MOVD offset+8(FP), R2
+ MOVD length+16(FP), R3
+ MOVW aux_vmo+24(FP), R4
+ MOVD aux_offset+32(FP), R5
+ BL vdso_zx_pager_supply_pages(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pager_op_range(pager uint32, op uint32, pager_vmo uint32, offset uint64, length uint64, data uint64) int32
+TEXT runtime·vdsoCall_zx_pager_op_range(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW pager+0(FP), R0
+ MOVW op+4(FP), R1
+ MOVW pager_vmo+8(FP), R2
+ MOVD offset+16(FP), R3
+ MOVD length+24(FP), R4
+ MOVD data+32(FP), R5
+ BL vdso_zx_pager_op_range(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pc_firmware_tables(handle uint32, acpi_rsdp unsafe.Pointer, smbios unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pc_firmware_tables(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD acpi_rsdp+8(FP), R1
+ MOVD smbios+16(FP), R2
+ BL vdso_zx_pc_firmware_tables(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_get_nth_device(handle uint32, index uint32, out_info unsafe.Pointer, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_get_nth_device(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW index+4(FP), R1
+ MOVD out_info+8(FP), R2
+ MOVD out_handle+16(FP), R3
+ BL vdso_zx_pci_get_nth_device(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_enable_bus_master(handle uint32, enable uint32) int32
+TEXT runtime·vdsoCall_zx_pci_enable_bus_master(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW enable+4(FP), R1
+ BL vdso_zx_pci_enable_bus_master(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_reset_device(handle uint32) int32
+TEXT runtime·vdsoCall_zx_pci_reset_device(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ BL vdso_zx_pci_reset_device(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_config_read(handle uint32, offset uint16, width uint, out_val unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_config_read(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD offset+4(FP), R1
+ MOVD width+8(FP), R2
+ MOVD out_val+16(FP), R3
+ BL vdso_zx_pci_config_read(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_config_write(handle uint32, offset uint16, width uint, val uint32) int32
+TEXT runtime·vdsoCall_zx_pci_config_write(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD offset+4(FP), R1
+ MOVD width+8(FP), R2
+ MOVW val+16(FP), R3
+ BL vdso_zx_pci_config_write(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_cfg_pio_rw(handle uint32, bus uint8, dev uint8, funk uint8, offset uint8, val unsafe.Pointer, width uint, write uint32) int32
+TEXT runtime·vdsoCall_zx_pci_cfg_pio_rw(SB),NOSPLIT,$0-68
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD bus+8(FP), R1
+ MOVD dev+16(FP), R2
+ MOVD funk+24(FP), R3
+ MOVD offset+32(FP), R4
+ MOVD val+40(FP), R5
+ MOVD width+48(FP), R6
+ MOVW write+56(FP), R7
+ BL vdso_zx_pci_cfg_pio_rw(SB)
+ MOVW R0, ret+64(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_get_bar(handle uint32, bar_num uint32, out_bar unsafe.Pointer, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_get_bar(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW bar_num+4(FP), R1
+ MOVD out_bar+8(FP), R2
+ MOVD out_handle+16(FP), R3
+ BL vdso_zx_pci_get_bar(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_map_interrupt(handle uint32, which_irq int32, out_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_map_interrupt(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW which_irq+4(FP), R1
+ MOVD out_handle+8(FP), R2
+ BL vdso_zx_pci_map_interrupt(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_query_irq_mode(handle uint32, mode uint32, out_max_irqs unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_pci_query_irq_mode(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW mode+4(FP), R1
+ MOVD out_max_irqs+8(FP), R2
+ BL vdso_zx_pci_query_irq_mode(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_set_irq_mode(handle uint32, mode uint32, requested_irq_count uint32) int32
+TEXT runtime·vdsoCall_zx_pci_set_irq_mode(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW mode+4(FP), R1
+ MOVW requested_irq_count+8(FP), R2
+ BL vdso_zx_pci_set_irq_mode(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_init(handle uint32, init_buf unsafe.Pointer, len uint32) int32
+TEXT runtime·vdsoCall_zx_pci_init(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD init_buf+8(FP), R1
+ MOVW len+16(FP), R2
+ BL vdso_zx_pci_init(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pci_add_subtract_io_range(handle uint32, mmio uint32, base uint64, len uint64, add uint32) int32
+TEXT runtime·vdsoCall_zx_pci_add_subtract_io_range(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW mmio+4(FP), R1
+ MOVD base+8(FP), R2
+ MOVD len+16(FP), R3
+ MOVW add+24(FP), R4
+ BL vdso_zx_pci_add_subtract_io_range(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_pmt_unpin(handle uint32) int32
+TEXT runtime·vdsoCall_zx_pmt_unpin(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ BL vdso_zx_pmt_unpin(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_port_create(options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_port_create(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW options+0(FP), R0
+ MOVD out+8(FP), R1
+ BL vdso_zx_port_create(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_port_queue(handle uint32, packet unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_port_queue(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD packet+8(FP), R1
+ BL vdso_zx_port_queue(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_port_wait(handle uint32, deadline int64, packet unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_port_wait(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVW handle+0(FP), R0
+ MOVD deadline+8(FP), R1
+ MOVD packet+16(FP), R2
+ BL vdso_zx_port_wait(SB)
+ MOVW R0, ret+24(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_port_cancel(handle uint32, source uint32, key uint64) int32
+TEXT runtime·vdsoCall_zx_port_cancel(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW source+4(FP), R1
+ MOVD key+8(FP), R2
+ BL vdso_zx_port_cancel(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_process_exit(retcode int64)
+TEXT runtime·vdsoCall_zx_process_exit(SB),NOSPLIT,$0-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD retcode+0(FP), R0
+ BL vdso_zx_process_exit(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_process_create(job uint32, name unsafe.Pointer, name_size uint, options uint32, proc_handle unsafe.Pointer, vmar_handle unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_process_create(SB),NOSPLIT,$0-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW job+0(FP), R0
+ MOVD name+8(FP), R1
+ MOVD name_size+16(FP), R2
+ MOVW options+24(FP), R3
+ MOVD proc_handle+32(FP), R4
+ MOVD vmar_handle+40(FP), R5
+ BL vdso_zx_process_create(SB)
+ MOVW R0, ret+48(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_process_start(handle uint32, thread uint32, entry uintptr, stack uintptr, arg1 uint32, arg2 uintptr) int32
+TEXT runtime·vdsoCall_zx_process_start(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW thread+4(FP), R1
+ MOVD entry+8(FP), R2
+ MOVD stack+16(FP), R3
+ MOVW arg1+24(FP), R4
+ MOVD arg2+32(FP), R5
+ BL vdso_zx_process_start(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_process_read_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_process_read_memory(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD vaddr+8(FP), R1
+ MOVD buffer+16(FP), R2
+ MOVD buffer_size+24(FP), R3
+ MOVD actual+32(FP), R4
+ BL vdso_zx_process_read_memory(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_process_write_memory(handle uint32, vaddr uintptr, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_process_write_memory(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD vaddr+8(FP), R1
+ MOVD buffer+16(FP), R2
+ MOVD buffer_size+24(FP), R3
+ MOVD actual+32(FP), R4
+ BL vdso_zx_process_write_memory(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_profile_create(root_job uint32, options uint32, profile unsafe.Pointer, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_profile_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW root_job+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD profile+8(FP), R2
+ MOVD out+16(FP), R3
+ BL vdso_zx_profile_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_resource_create(parent_rsrc uint32, options uint32, base uint64, size uint, name unsafe.Pointer, name_size uint, resource_out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_resource_create(SB),NOSPLIT,$0-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW parent_rsrc+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD base+8(FP), R2
+ MOVD size+16(FP), R3
+ MOVD name+24(FP), R4
+ MOVD name_size+32(FP), R5
+ MOVD resource_out+40(FP), R6
+ BL vdso_zx_resource_create(SB)
+ MOVW R0, ret+48(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_smc_call(handle uint32, parameters unsafe.Pointer, out_smc_result unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_smc_call(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD parameters+8(FP), R1
+ MOVD out_smc_result+16(FP), R2
+ BL vdso_zx_smc_call(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_socket_create(options uint32, out0 unsafe.Pointer, out1 unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_socket_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW options+0(FP), R0
+ MOVD out0+8(FP), R1
+ MOVD out1+16(FP), R2
+ BL vdso_zx_socket_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_socket_write(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_socket_write(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD buffer+8(FP), R2
+ MOVD buffer_size+16(FP), R3
+ MOVD actual+24(FP), R4
+ BL vdso_zx_socket_write(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_socket_read(handle uint32, options uint32, buffer unsafe.Pointer, buffer_size uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_socket_read(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD buffer+8(FP), R2
+ MOVD buffer_size+16(FP), R3
+ MOVD actual+24(FP), R4
+ BL vdso_zx_socket_read(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_socket_shutdown(handle uint32, options uint32) int32
+TEXT runtime·vdsoCall_zx_socket_shutdown(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ BL vdso_zx_socket_shutdown(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_stream_create(options uint32, vmo uint32, seek uint64, out_stream unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW options+0(FP), R0
+ MOVW vmo+4(FP), R1
+ MOVD seek+8(FP), R2
+ MOVD out_stream+16(FP), R3
+ BL vdso_zx_stream_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_stream_writev(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_writev(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD vector+8(FP), R2
+ MOVD num_vector+16(FP), R3
+ MOVD actual+24(FP), R4
+ BL vdso_zx_stream_writev(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_stream_writev_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_writev_at(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD offset+8(FP), R2
+ MOVD vector+16(FP), R3
+ MOVD num_vector+24(FP), R4
+ MOVD actual+32(FP), R5
+ BL vdso_zx_stream_writev_at(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_stream_readv(handle uint32, options uint32, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_readv(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD vector+8(FP), R2
+ MOVD num_vector+16(FP), R3
+ MOVD actual+24(FP), R4
+ BL vdso_zx_stream_readv(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_stream_readv_at(handle uint32, options uint32, offset uint64, vector unsafe.Pointer, num_vector uint, actual unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_readv_at(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD offset+8(FP), R2
+ MOVD vector+16(FP), R3
+ MOVD num_vector+24(FP), R4
+ MOVD actual+32(FP), R5
+ BL vdso_zx_stream_readv_at(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_stream_seek(handle uint32, whence uint32, offset int64, out_seek unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_stream_seek(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW whence+4(FP), R1
+ MOVD offset+8(FP), R2
+ MOVD out_seek+16(FP), R3
+ BL vdso_zx_stream_seek(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_0() int32
+TEXT runtime·vdsoCall_zx_syscall_test_0(SB),NOSPLIT,$0-4
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_syscall_test_0(SB)
+ MOVW R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_1(a int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_1(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW a+0(FP), R0
+ BL vdso_zx_syscall_test_1(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_2(a int32, b int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_2(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW a+0(FP), R0
+ MOVW b+4(FP), R1
+ BL vdso_zx_syscall_test_2(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_3(a int32, b int32, c int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_3(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW a+0(FP), R0
+ MOVW b+4(FP), R1
+ MOVW c+8(FP), R2
+ BL vdso_zx_syscall_test_3(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_4(a int32, b int32, c int32, d int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_4(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW a+0(FP), R0
+ MOVW b+4(FP), R1
+ MOVW c+8(FP), R2
+ MOVW d+12(FP), R3
+ BL vdso_zx_syscall_test_4(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_5(a int32, b int32, c int32, d int32, e int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_5(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW a+0(FP), R0
+ MOVW b+4(FP), R1
+ MOVW c+8(FP), R2
+ MOVW d+12(FP), R3
+ MOVW e+16(FP), R4
+ BL vdso_zx_syscall_test_5(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_6(a int32, b int32, c int32, d int32, e int32, f int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_6(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW a+0(FP), R0
+ MOVW b+4(FP), R1
+ MOVW c+8(FP), R2
+ MOVW d+12(FP), R3
+ MOVW e+16(FP), R4
+ MOVW f+20(FP), R5
+ BL vdso_zx_syscall_test_6(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_7(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_7(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW a+0(FP), R0
+ MOVW b+4(FP), R1
+ MOVW c+8(FP), R2
+ MOVW d+12(FP), R3
+ MOVW e+16(FP), R4
+ MOVW f+20(FP), R5
+ MOVW g_+24(FP), R6
+ BL vdso_zx_syscall_test_7(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_8(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32, h int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_8(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW a+0(FP), R0
+ MOVW b+4(FP), R1
+ MOVW c+8(FP), R2
+ MOVW d+12(FP), R3
+ MOVW e+16(FP), R4
+ MOVW f+20(FP), R5
+ MOVW g_+24(FP), R6
+ MOVW h+28(FP), R7
+ BL vdso_zx_syscall_test_8(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_wrapper(a int32, b int32, c int32) int32
+TEXT runtime·vdsoCall_zx_syscall_test_wrapper(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW a+0(FP), R0
+ MOVW b+4(FP), R1
+ MOVW c+8(FP), R2
+ BL vdso_zx_syscall_test_wrapper(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_syscall_test_handle_create(return_value int32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_syscall_test_handle_create(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW return_value+0(FP), R0
+ MOVD out+8(FP), R1
+ BL vdso_zx_syscall_test_handle_create(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_system_get_dcache_line_size() uint32
+TEXT runtime·vdsoCall_zx_system_get_dcache_line_size(SB),NOSPLIT,$0-4
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_system_get_dcache_line_size(SB)
+ MOVW R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_system_get_num_cpus() uint32
+TEXT runtime·vdsoCall_zx_system_get_num_cpus(SB),NOSPLIT,$0-4
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_system_get_num_cpus(SB)
+ MOVW R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_system_get_version_string() unsafe.Pointer
+TEXT runtime·vdsoCall_zx_system_get_version_string(SB),NOSPLIT,$0-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_system_get_version_string(SB)
+ MOVD R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_system_get_physmem() uint64
+TEXT runtime·vdsoCall_zx_system_get_physmem(SB),NOSPLIT,$0-8
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_system_get_physmem(SB)
+ MOVD R0, ret+0(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_system_get_features(kind uint32, features unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_system_get_features(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW kind+0(FP), R0
+ MOVD features+8(FP), R1
+ BL vdso_zx_system_get_features(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_system_get_event(root_job uint32, kind uint32, event unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_system_get_event(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW root_job+0(FP), R0
+ MOVW kind+4(FP), R1
+ MOVD event+8(FP), R2
+ BL vdso_zx_system_get_event(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_system_mexec(resource uint32, kernel_vmo uint32, bootimage_vmo uint32) int32
+TEXT runtime·vdsoCall_zx_system_mexec(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVW kernel_vmo+4(FP), R1
+ MOVW bootimage_vmo+8(FP), R2
+ BL vdso_zx_system_mexec(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_system_mexec_payload_get(resource uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_system_mexec_payload_get(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVD buffer+8(FP), R1
+ MOVD buffer_size+16(FP), R2
+ BL vdso_zx_system_mexec_payload_get(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_system_powerctl(resource uint32, cmd uint32, arg unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_system_powerctl(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVW cmd+4(FP), R1
+ MOVD arg+8(FP), R2
+ BL vdso_zx_system_powerctl(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_task_suspend(handle uint32, token unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_task_suspend(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD token+8(FP), R1
+ BL vdso_zx_task_suspend(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_task_suspend_token(handle uint32, token unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_task_suspend_token(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD token+8(FP), R1
+ BL vdso_zx_task_suspend_token(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_task_create_exception_channel(handle uint32, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_task_create_exception_channel(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD out+8(FP), R2
+ BL vdso_zx_task_create_exception_channel(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_task_kill(handle uint32) int32
+TEXT runtime·vdsoCall_zx_task_kill(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ BL vdso_zx_task_kill(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_thread_exit()
+TEXT runtime·vdsoCall_zx_thread_exit(SB),NOSPLIT,$0-0
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ BL vdso_zx_thread_exit(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_thread_create(process uint32, name unsafe.Pointer, name_size uint, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_thread_create(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW process+0(FP), R0
+ MOVD name+8(FP), R1
+ MOVD name_size+16(FP), R2
+ MOVW options+24(FP), R3
+ MOVD out+32(FP), R4
+ BL vdso_zx_thread_create(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_thread_start(handle uint32, thread_entry uintptr, stack uintptr, arg1 uintptr, arg2 uintptr) int32
+TEXT runtime·vdsoCall_zx_thread_start(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD thread_entry+8(FP), R1
+ MOVD stack+16(FP), R2
+ MOVD arg1+24(FP), R3
+ MOVD arg2+32(FP), R4
+ BL vdso_zx_thread_start(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_thread_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_thread_read_state(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW kind+4(FP), R1
+ MOVD buffer+8(FP), R2
+ MOVD buffer_size+16(FP), R3
+ BL vdso_zx_thread_read_state(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_thread_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_thread_write_state(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW kind+4(FP), R1
+ MOVD buffer+8(FP), R2
+ MOVD buffer_size+16(FP), R3
+ BL vdso_zx_thread_write_state(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_timer_create(options uint32, clock_id uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_timer_create(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW options+0(FP), R0
+ MOVW clock_id+4(FP), R1
+ MOVD out+8(FP), R2
+ BL vdso_zx_timer_create(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_timer_set(handle uint32, deadline int64, slack int64) int32
+TEXT runtime·vdsoCall_zx_timer_set(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD deadline+8(FP), R1
+ MOVD slack+16(FP), R2
+ BL vdso_zx_timer_set(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_timer_cancel(handle uint32) int32
+TEXT runtime·vdsoCall_zx_timer_cancel(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ BL vdso_zx_timer_cancel(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vcpu_create(guest uint32, options uint32, entry uintptr, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vcpu_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW guest+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD entry+8(FP), R2
+ MOVD out+16(FP), R3
+ BL vdso_zx_vcpu_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vcpu_resume(handle uint32, packet unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vcpu_resume(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVW handle+0(FP), R0
+ MOVD packet+8(FP), R1
+ BL vdso_zx_vcpu_resume(SB)
+ MOVW R0, ret+16(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vcpu_interrupt(handle uint32, vector uint32) int32
+TEXT runtime·vdsoCall_zx_vcpu_interrupt(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW vector+4(FP), R1
+ BL vdso_zx_vcpu_interrupt(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vcpu_read_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vcpu_read_state(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW kind+4(FP), R1
+ MOVD buffer+8(FP), R2
+ MOVD buffer_size+16(FP), R3
+ BL vdso_zx_vcpu_read_state(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vcpu_write_state(handle uint32, kind uint32, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vcpu_write_state(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW kind+4(FP), R1
+ MOVD buffer+8(FP), R2
+ MOVD buffer_size+16(FP), R3
+ BL vdso_zx_vcpu_write_state(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmar_allocate(parent_vmar uint32, options uint32, offset uint, size uint, child_vmar unsafe.Pointer, child_addr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmar_allocate(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW parent_vmar+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD offset+8(FP), R2
+ MOVD size+16(FP), R3
+ MOVD child_vmar+24(FP), R4
+ MOVD child_addr+32(FP), R5
+ BL vdso_zx_vmar_allocate(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmar_destroy(handle uint32) int32
+TEXT runtime·vdsoCall_zx_vmar_destroy(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ BL vdso_zx_vmar_destroy(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmar_map(handle uint32, options uint32, vmar_offset uint, vmo uint32, vmo_offset uint64, len uint, mapped_addr unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmar_map(SB),NOSPLIT,$0-52
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD vmar_offset+8(FP), R2
+ MOVW vmo+16(FP), R3
+ MOVD vmo_offset+24(FP), R4
+ MOVD len+32(FP), R5
+ MOVD mapped_addr+40(FP), R6
+ BL vdso_zx_vmar_map(SB)
+ MOVW R0, ret+48(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmar_unmap(handle uint32, addr uintptr, len uint) int32
+TEXT runtime·vdsoCall_zx_vmar_unmap(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD addr+8(FP), R1
+ MOVD len+16(FP), R2
+ BL vdso_zx_vmar_unmap(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmar_protect(handle uint32, options uint32, addr uintptr, len uint) int32
+TEXT runtime·vdsoCall_zx_vmar_protect(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD addr+8(FP), R2
+ MOVD len+16(FP), R3
+ BL vdso_zx_vmar_protect(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmar_op_range(handle uint32, op uint32, address uintptr, size uint, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmar_op_range(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW op+4(FP), R1
+ MOVD address+8(FP), R2
+ MOVD size+16(FP), R3
+ MOVD buffer+24(FP), R4
+ MOVD buffer_size+32(FP), R5
+ BL vdso_zx_vmar_op_range(SB)
+ MOVW R0, ret+40(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_create(size uint64, options uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create(SB),NOSPLIT,$0-28
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVD size+0(FP), R0
+ MOVW options+8(FP), R1
+ MOVD out+16(FP), R2
+ BL vdso_zx_vmo_create(SB)
+ MOVW R0, ret+24(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_read(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmo_read(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVW handle+0(FP), R0
+ MOVD buffer+8(FP), R1
+ MOVD offset+16(FP), R2
+ MOVD buffer_size+24(FP), R3
+ BL vdso_zx_vmo_read(SB)
+ MOVW R0, ret+32(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_write(handle uint32, buffer unsafe.Pointer, offset uint64, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmo_write(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVW handle+0(FP), R0
+ MOVD buffer+8(FP), R1
+ MOVD offset+16(FP), R2
+ MOVD buffer_size+24(FP), R3
+ BL vdso_zx_vmo_write(SB)
+ MOVW R0, ret+32(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_get_size(handle uint32, size unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_get_size(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD size+8(FP), R1
+ BL vdso_zx_vmo_get_size(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_set_size(handle uint32, size uint64) int32
+TEXT runtime·vdsoCall_zx_vmo_set_size(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVD size+8(FP), R1
+ BL vdso_zx_vmo_set_size(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_op_range(handle uint32, op uint32, offset uint64, size uint64, buffer unsafe.Pointer, buffer_size uint) int32
+TEXT runtime·vdsoCall_zx_vmo_op_range(SB),NOSPLIT,$0-44
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ CALL runtime·entersyscall(SB)
+ MOVW handle+0(FP), R0
+ MOVW op+4(FP), R1
+ MOVD offset+8(FP), R2
+ MOVD size+16(FP), R3
+ MOVD buffer+24(FP), R4
+ MOVD buffer_size+32(FP), R5
+ BL vdso_zx_vmo_op_range(SB)
+ MOVW R0, ret+40(FP)
+ BL runtime·exitsyscall(SB)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_create_child(handle uint32, options uint32, offset uint64, size uint64, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create_child(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW options+4(FP), R1
+ MOVD offset+8(FP), R2
+ MOVD size+16(FP), R3
+ MOVD out+24(FP), R4
+ BL vdso_zx_vmo_create_child(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_set_cache_policy(handle uint32, cache_policy uint32) int32
+TEXT runtime·vdsoCall_zx_vmo_set_cache_policy(SB),NOSPLIT,$0-12
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW cache_policy+4(FP), R1
+ BL vdso_zx_vmo_set_cache_policy(SB)
+ MOVW R0, ret+8(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_replace_as_executable(handle uint32, vmex uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_replace_as_executable(SB),NOSPLIT,$0-20
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW handle+0(FP), R0
+ MOVW vmex+4(FP), R1
+ MOVD out+8(FP), R2
+ BL vdso_zx_vmo_replace_as_executable(SB)
+ MOVW R0, ret+16(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_create_contiguous(bti uint32, size uint, alignment_log2 uint32, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create_contiguous(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW bti+0(FP), R0
+ MOVD size+8(FP), R1
+ MOVW alignment_log2+16(FP), R2
+ MOVD out+24(FP), R3
+ BL vdso_zx_vmo_create_contiguous(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
+// func vdsoCall_zx_vmo_create_physical(resource uint32, paddr uintptr, size uint, out unsafe.Pointer) int32
+TEXT runtime·vdsoCall_zx_vmo_create_physical(SB),NOSPLIT,$0-36
+ GO_ARGS
+ NO_LOCAL_POINTERS
+ MOVD g_m(g), R21
+ MOVD LR, m_vdsoPC(R21)
+ MOVD RSP, R20
+ MOVD R20, m_vdsoSP(R21)
+ MOVW resource+0(FP), R0
+ MOVD paddr+8(FP), R1
+ MOVD size+16(FP), R2
+ MOVD out+24(FP), R3
+ BL vdso_zx_vmo_create_physical(SB)
+ MOVW R0, ret+32(FP)
+ MOVD g_m(g), R21
+ MOVD $0, m_vdsoSP(R21)
+ RET
+
diff --git a/src/syscall/dirent.go b/src/syscall/dirent.go
index fab123d..0365e8d 100644
--- a/src/syscall/dirent.go
+++ b/src/syscall/dirent.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
package syscall
diff --git a/src/syscall/env_unix.go b/src/syscall/env_unix.go
index a4bb28c..a467e5f 100644
--- a/src/syscall/env_unix.go
+++ b/src/syscall/env_unix.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris plan9
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris plan9
// Unix environment variables.
diff --git a/src/syscall/exec_fuchsia.go b/src/syscall/exec_fuchsia.go
new file mode 100644
index 0000000..d63ef8d
--- /dev/null
+++ b/src/syscall/exec_fuchsia.go
@@ -0,0 +1,8 @@
+// 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 syscall
+
+type SysProcAttr struct {
+}
diff --git a/src/syscall/syscall_fuchsia.go b/src/syscall/syscall_fuchsia.go
new file mode 100644
index 0000000..7e8f087
--- /dev/null
+++ b/src/syscall/syscall_fuchsia.go
@@ -0,0 +1,747 @@
+// 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 mod` ignores file names for the purpose of resolving
+// dependencies, and fdio doesn't build on not-Fuchsia.
+// +build fuchsia
+
+package syscall
+
+import (
+ "errors"
+ "io"
+ "path"
+ "strings"
+ "sync"
+ "unsafe"
+
+ "syscall/zx"
+ "syscall/zx/fdio"
+ fidlIo "syscall/zx/io"
+)
+
+var (
+ Stdin = 0
+ Stdout = 1
+ Stderr = 2
+)
+
+const (
+ FsRightReadable = 0x00000001
+ FsRightWritable = 0x00000002
+ FsRightAdmin = 0x00000004
+ FsRightExecutable = 0x00000008
+ FsRights = FsRightReadable | FsRightWritable | FsRightAdmin | FsRightExecutable
+ FsRightSpace = 0x0000FFFF
+ FsFlagCreate = 0x00010000
+ FsFlagExclusive = 0x00020000
+ FsFlagTruncate = 0x00040000
+ FsFlagDirectory = 0x00080000
+ FsFlagAppend = 0x00100000
+ FsFlagNoRemote = 0x00200000
+ FsFlagPath = 0x00400000
+ FsFlagDescribe = 0x00800000
+ FsFlagPosix = 0x01000000
+ FsFlagNotDirectory = 0x02000000
+ FsFlagCloneSameRights = 0x04000000
+
+ FsFlagsAllowedWithPath = FsFlagPath | FsFlagDirectory |
+ FsFlagNotDirectory | FsFlagDescribe
+)
+
+const (
+ O_RDONLY = 0x0
+ O_WRONLY = 0x1
+ O_RDWR = 0x2
+
+ // Flags which align with ZXIO_FS_*
+ O_ADMIN = FsRightAdmin
+ O_CREAT = FsFlagCreate
+ O_EXCL = FsFlagExclusive
+ O_TRUNC = FsFlagTruncate
+ O_DIRECTORY = FsFlagDirectory
+ O_APPEND = FsFlagAppend
+ O_NOREMOTE = FsFlagNoRemote
+ O_PATH = FsFlagPath
+
+ FdioAlignedFlags = O_ADMIN | O_CREAT | O_EXCL | O_TRUNC | O_DIRECTORY | O_APPEND |
+ O_NOREMOTE | O_PATH
+
+ // Flags which do not align with ZXIO_FS_*
+ O_NONBLOCK = 0x00000010
+ O_DSYNC = 0x00000020
+ O_SYNC = 0x00000040 | O_DSYNC
+ O_RSYNC = O_SYNC
+ O_NOFOLLOW = 0x00000080
+ O_CLOEXEC = 0x00000100
+ O_NOCTTY = 0x00000200
+ O_ASYNC = 0x00000400
+ O_DIRECT = 0x00000800
+ O_LARGEFILE = 0x00001000
+ O_NOATIME = 0x00002000
+ O_TMPFILE = 0x00004000
+)
+
+func FdioFlagsToZxio(flags uint32) (zflags uint32) {
+ perms := uint32(O_RDONLY | O_WRONLY | O_RDWR)
+ switch flags & perms {
+ case O_RDONLY:
+ zflags |= FsRightReadable
+ case O_WRONLY:
+ zflags |= FsRightWritable
+ case O_RDWR:
+ zflags |= FsRightReadable | FsRightWritable
+ }
+
+ zflags |= FsFlagDescribe
+ zflags |= (flags & FdioAlignedFlags)
+ if (zflags & FsFlagPath) == 0 {
+ zflags |= FsFlagPosix
+ } else {
+ zflags &= FsFlagsAllowedWithPath
+ }
+ return zflags
+}
+
+const (
+ S_IFMT = fdio.S_IFMT
+ S_IFDIR = fdio.S_IFDIR
+ S_IFREG = fdio.S_IFREG
+ S_IFIFO = fdio.S_IFIFO
+)
+
+// TODO(crawshaw): generate a zerrors file once cgo is working
+const (
+ EPERM = Errno(0x01)
+ ENOENT = Errno(0x02)
+ EINTR = Errno(0x04)
+ EIO = Errno(0x05)
+ EBADF = Errno(0x09)
+ EACCES = Errno(0x0d)
+ EEXIST = Errno(0x11)
+ ENOTDIR = Errno(0x14)
+ EISDIR = Errno(0x15)
+ EINVAL = Errno(0x16)
+ EMFILE = Errno(0x18)
+ ESPIPE = Errno(0x1d)
+ ERANGE = Errno(0x22)
+ ENAMETOOLONG = Errno(0x24)
+ ENOTEMPTY = Errno(0x27)
+ ENOPROTOOPT = Errno(0x5c)
+ EOPNOTSUPP = Errno(0x5f)
+ ENOTSUP = EOPNOTSUPP
+ EADDRINUSE = Errno(0x62)
+ EADDRNOTAVAIL = Errno(0x63)
+ ETIMEDOUT = Errno(0x6e)
+ ECONNABORTED = Errno(0x67)
+ EHOSTUNREACH = Errno(0x71)
+ EFUCHSIA = Errno(0xfa)
+)
+
+var EPIPE error = Errno(0x20)
+
+const (
+ SOMAXCONN = 0x80
+)
+
+const (
+ PathMax = 4096
+)
+
+type Stat_t struct {
+ Dev uint64
+ Ino uint64
+ Size uint64
+ CreateTime uint64
+ ModifyTime uint64
+ Mode uint64
+}
+
+func Getpid() (pid int) {
+ // TODO: is ProcHandle process-wide or OS-wide?
+ return int(zx.ProcHandle)
+}
+
+func Getppid() (ppid int) {
+ return 0
+}
+
+func Getuid() (uid int) {
+ return 0
+}
+
+func Geteuid() (uid int) {
+ return 0
+}
+
+func Getgid() (uid int) {
+ return 0
+}
+
+func Getegid() (uid int) {
+ return 0
+}
+
+func Getgroups() (gids []int, err error) {
+ return nil, errors.New("Getgroups unimplemented")
+}
+
+//func Exit(code int) {
+//zx.Sys_process_exit(int64(code))
+//}
+
+const ImplementsGetwd = true
+
+func Getwd() (wd string, err error) {
+ cwdMu.Lock()
+ wd = cwdStr
+ cwdMu.Unlock()
+ return wd, nil
+}
+
+func Chdir(dir string) (err error) {
+ // TODO: if cgo enabled, change the working directory there too.
+ f, err := OpenPath(dir, 0, 0)
+ if err != nil {
+ return err
+ }
+ cwdMu.Lock()
+ var old fdio.FDIO
+ old, cwd = cwd, f
+ // cwd starts as a reference to root, which should remain open.
+ if old != nil && old != root {
+ defer old.Close()
+ }
+ if path.IsAbs(dir) {
+ cwdStr = path.Clean(dir)
+ } else {
+ cwdStr = path.Join(cwdStr, dir)
+ }
+ cwdMu.Unlock()
+ return nil
+}
+
+func Rmdir(path string) error {
+ return Unlink(path)
+}
+
+func Unlink(p string) error {
+ dir, relp := fdioPath(path.Clean(p))
+ return dir.Unlink(relp)
+}
+
+func makeAbs(paths ...string) []string {
+ cwdMu.Lock()
+ dir := cwdStr
+ cwdMu.Unlock()
+ for i := range paths {
+ if !path.IsAbs(paths[i]) {
+ paths[i] = path.Join(dir, paths[i])
+ }
+ }
+ return paths
+}
+
+func Rename(oldpath, newpath string) error {
+ abs := makeAbs(oldpath, newpath)
+ rootMu.Lock()
+ r := root
+ rootMu.Unlock()
+ return r.Rename(abs[0][1:], abs[1][1:])
+}
+
+func Link(oldpath, newpath string) error {
+ abs := makeAbs(oldpath, newpath)
+ rootMu.Lock()
+ r := root
+ rootMu.Unlock()
+ return r.Link(abs[0][1:], abs[1][1:])
+}
+
+func Fsync(fd int) error {
+ fdsMu.Lock()
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+ return f.Sync()
+}
+
+func Fchdir(fd int) (err error) {
+ return errors.New("Fchdir unimplemented")
+}
+
+func CloseOnExec(r int) {
+ panic("syscall.CloseOnExec TODO")
+}
+
+func SetNonblock(fd int, nonblocking bool) (err error) {
+ if nonblocking {
+ return errors.New("syscall.SetNonblock: non-blocking not supported on fuchsia")
+ }
+ return nil
+}
+
+var (
+ rootMu sync.Mutex
+ root fdio.FDIO
+)
+
+var (
+ cwdMu sync.Mutex
+ cwd fdio.FDIO
+ cwdStr string
+)
+
+var (
+ nsMu sync.Mutex
+ ns *fdio.NS
+)
+
+var (
+ stdioMu sync.Mutex
+ stdin fdio.FDIO
+ stdout fdio.FDIO
+ stderr fdio.FDIO
+)
+
+const fdsOff = 1e6 // move outside the fd range of unistd.c FDIO
+
+var (
+ fdsMu sync.Mutex
+ fds []fdio.FDIO
+)
+
+func Read(fd int, p []byte) (n int, err error) {
+ if fd == Stdin {
+ stdioMu.Lock()
+ n, err = stdin.Read(p)
+ stdioMu.Unlock()
+ } else {
+ if fd < fdsOff {
+ return 0, EINVAL
+ }
+ fdsMu.Lock()
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+
+ n, err = f.Read(p)
+ }
+ // An io.Reader can return n < len(p) and io.EOF.
+ // But this is the POSIX syscall read(3), which
+ // returns nil on eof.
+ if err == io.EOF {
+ err = nil
+ }
+ return n, err
+}
+
+func init() {
+ EPIPE = zx.EPIPE
+
+ var err error
+
+ nsMu.Lock()
+ ns, err = fdio.NewNSFromMap(zx.RootNSMap)
+ nsMu.Unlock()
+ if err != nil {
+ println("syscall: failed to create namespace: ", err.Error())
+ }
+
+ rootMu.Lock()
+ root, err = ns.OpenRoot()
+ rootMu.Unlock()
+ if err != nil {
+ println("syscall: failed to create root directory from namespace: ", err.Error())
+ }
+
+ cwdMu.Lock()
+ var found bool
+ cwdStr, found = Getenv("PWD")
+ if !found {
+ cwdStr = "/"
+ } else {
+ // Ensure the incoming cwd is absolute and cleaned
+ cwdStr = path.Join("/", cwdStr)
+ }
+ cwd = root
+ if cwdStr != "/" {
+ cwd, err = OpenPath(cwdStr, 0, 0)
+ }
+ cwdMu.Unlock()
+ if err != nil {
+ println("syscall: failed to create fdio cwd: ", err.Error())
+ }
+
+ initStdio := func(i int) (fdio.FDIO, error) {
+ switch zx.StdioHandleTypes[i] {
+ case 0:
+ return nil, EINVAL
+ case fdio.HandleTypeRemote, fdio.HandleTypeSocket, fdio.HandleTypeLogger, fdio.HandleTypeFileDescriptor:
+ info, err := zx.StdioHandles[i].GetInfoHandleBasic()
+ if err != nil {
+ println("syscall: GetInfoHandleBasic failed", err)
+ return nil, EINVAL
+ }
+ switch info.Type {
+ case zx.ObjectTypeChannel:
+ return fdio.NewFileWithCtx(&fidlIo.FileWithCtxInterface{Channel: zx.Channel(zx.StdioHandles[i])}, 0), nil
+ case zx.ObjectTypeSocket:
+ return fdio.NewPipe(zx.Socket(zx.StdioHandles[i])), nil
+ case zx.ObjectTypeLog:
+ return fdio.NewLogger(zx.Log(zx.StdioHandles[i])), nil
+ default:
+ println("syscall: unknown object type for stdio: ", info.Type)
+ return nil, EINVAL
+ }
+ default:
+ println("syscall: unknown handle type for stdio: " + itoa(zx.StdioHandleTypes[i]))
+ return nil, EINVAL
+ }
+ }
+ stdioMu.Lock()
+ stdin, err = initStdio(0)
+ if err != nil {
+ println("syscall: failed to create fdio stdin: ", err.Error())
+ }
+ stdout, err = initStdio(1)
+ if err != nil {
+ println("syscall: failed to create fdio stdout: ", err.Error())
+ }
+ stderr, err = initStdio(2)
+ if err != nil {
+ println("syscall: failed to create fdio stderr: ", err.Error())
+ }
+ stdioMu.Unlock()
+}
+
+func Write(fd int, p []byte) (n int, err error) {
+ switch fd {
+ case Stdout:
+ stdioMu.Lock()
+ n, err := stdout.Write(p)
+ stdioMu.Unlock()
+ return n, err
+ case Stderr:
+ stdioMu.Lock()
+ n, err := stderr.Write(p)
+ stdioMu.Unlock()
+ return n, err
+ default:
+ fdsMu.Lock()
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+ return f.Write(p)
+ }
+}
+
+func Seek(fd int, offset int64, whence int) (int64, error) {
+ fdsMu.Lock()
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+ off, err := f.Seek(offset, whence)
+ if err, ok := err.(*zx.Error); ok && err.Status == zx.ErrNotSupported {
+ if _, ok := f.(*fdio.Pipe); ok {
+ return off, ESPIPE
+ }
+ }
+ return off, err
+}
+
+func Close(fd int) (err error) {
+ if fd < fdsOff {
+ return EINVAL
+ }
+ fdsMu.Lock()
+ if fd-fdsOff > len(fds) {
+ fdsMu.Unlock()
+ return EINVAL
+ }
+ f := fds[fd-fdsOff]
+ fds[fd-fdsOff] = nil
+ fdsMu.Unlock()
+ return f.Close()
+}
+
+func fdioPath(p string) (fdio.FDIO, string) {
+ if path.IsAbs(p) {
+ rootMu.Lock()
+ r := root
+ rootMu.Unlock()
+ return r, p[1:]
+ }
+ cwdMu.Lock()
+ c := cwd
+ cwdMu.Unlock()
+ return c, p
+}
+
+func injectNotDirectoryFlag(flags uint32) uint32 {
+ if flags&FsFlagDirectory == 0 && flags&(FsRightWritable|FsFlagCreate) != 0 {
+ flags |= FsFlagNotDirectory
+ }
+ return flags
+}
+
+func OpenPath(p string, flags int, mode uint32) (f fdio.FDIO, err error) {
+ if strings.Contains(p, "\x00") {
+ return nil, EINVAL
+ }
+ dir, relp := fdioPath(path.Clean(p))
+ zflags := injectNotDirectoryFlag(FdioFlagsToZxio(uint32(flags)))
+ return dir.Open(relp, zflags, mode)
+}
+
+// Mkdir is implemented as an Open call on Fuchsia. The difference from the regular OpenPath call
+// is that Mkdir does not add the FsFlagNotDirectory flag, and uses O_RDWR as the access mode.
+func Mkdir(p string, mode uint32) error {
+ if strings.Contains(p, "\x00") {
+ return EINVAL
+ }
+ dir, relp := fdioPath(path.Clean(p))
+ zflags := FdioFlagsToZxio(uint32(O_CREAT | O_EXCL | O_RDWR))
+ f, err := dir.Open(relp, zflags, mode&0777|S_IFDIR)
+ if err != nil {
+ return err
+ }
+ f.Close()
+ return nil
+}
+
+func Open(path string, flags int, mode uint32) (fd int, err error) {
+ if path == "" {
+ return -1, EINVAL
+ }
+ f, err := OpenPath(path, flags, mode)
+ if err != nil {
+ return -1, err
+ }
+ return OpenFDIO(f), nil
+}
+
+func OpenAt(fdParent int, path string, flags int, mode uint32) (fd int, err error) {
+ parent := FDIOForFD(fdParent)
+ if parent == nil {
+ return -1, EBADF
+ }
+ zflags := injectNotDirectoryFlag(FdioFlagsToZxio(uint32(flags)))
+ f, err := parent.Open(path, zflags, mode)
+ if err != nil {
+ return -1, err
+ }
+ return OpenFDIO(f), nil
+}
+
+func FDIOForFD(fd int) fdio.FDIO {
+ switch fd {
+ case Stdin:
+ return stdin
+ case Stdout:
+ return stdout
+ case Stderr:
+ return stderr
+ }
+ if fd < fdsOff {
+ return nil
+ }
+ fdsMu.Lock()
+ if fd-fdsOff > len(fds) {
+ fdsMu.Unlock()
+ return nil
+ }
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+ return f
+}
+
+func OpenFDIO(f fdio.FDIO) (fd int) {
+ fdsMu.Lock()
+ i := -1
+ for i = 0; i < len(fds); i++ {
+ if fds[i] == nil {
+ fds[i] = f
+ break
+ }
+ }
+ if i == len(fds) {
+ fds = append(fds, f)
+ }
+ fdsMu.Unlock()
+
+ return i + fdsOff
+}
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ fdsMu.Lock()
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+
+ attr, err := f.GetAttr()
+ if err != nil {
+ return err
+ }
+ stat.Dev = uint64(attr.Mode)
+ stat.Ino = attr.Id
+ stat.Size = attr.ContentSize
+ stat.CreateTime = attr.CreationTime
+ stat.ModifyTime = attr.ModificationTime
+ return nil
+}
+
+func Chown(path string, uid int, gid int) error {
+ var stat Stat_t
+ return Stat(path, &stat)
+}
+
+func Fchown(fd int, uid int, gid int) error {
+ var stat Stat_t
+ return Fstat(fd, &stat)
+}
+
+func Lchown(path string, uid int, gid int) error {
+ var stat Stat_t
+ return Lstat(path, &stat)
+}
+
+func Chmod(path string, mode uint32) error {
+ var stat Stat_t
+ return Stat(path, &stat)
+}
+
+func Fchmod(fd int, mode uint32) error {
+ var stat Stat_t
+ return Fstat(fd, &stat)
+}
+
+func Shutdown(fd int, how int) error {
+ panic("TODO shutdown")
+}
+
+func Stat(path string, stat *Stat_t) (err error) {
+ fd, err := Open(path, O_RDONLY|O_PATH, 0)
+ if err != nil {
+ return err
+ }
+ err = Fstat(fd, stat)
+ if err2 := Close(fd); err == nil {
+ err = err2
+ }
+ return err
+}
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ // TODO: adjust when there are symlinks
+ return Stat(path, stat)
+}
+
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ if fd == Stdout || fd == Stderr {
+ return 0, ESPIPE
+ }
+
+ fdsMu.Lock()
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+
+ // An io.Reader can return n < len(p) and io.EOF.
+ // But this is the POSIX syscall read(3), which
+ // returns nil on eof.
+ n, err = f.ReadAt(p, offset)
+ if err == io.EOF {
+ err = nil
+ }
+ return n, err
+}
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ if fd == Stdout || fd == Stderr {
+ return 0, ESPIPE
+ }
+
+ fdsMu.Lock()
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+ return f.WriteAt(p, offset)
+}
+
+func Ftruncate(fd int, length int64) (err error) {
+ fdsMu.Lock()
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+ return f.Truncate(uint64(length))
+}
+
+func Truncate(path string, length int64) (err error) {
+ fd, err := Open(path, O_WRONLY, 0)
+ if err != nil {
+ return err
+ }
+ err = Ftruncate(fd, length)
+ if err2 := Close(fd); err == nil {
+ err = err2
+ }
+ return err
+}
+
+func Readlink(path string, buf []byte) (n int, err error) {
+ return 0, EOPNOTSUPP // no fuchsia support yet
+}
+
+func Symlink(oldpath string, newpath string) (err error) {
+ return EOPNOTSUPP // no fuchsia support yet
+}
+
+func UtimesNano(path string, ts []Timespec) (err error) {
+ f, err := OpenPath(path, 0, 0)
+ if err != nil {
+ return err
+ }
+ defer f.Close()
+ return f.SetAttr(fidlIo.NodeAttributeFlagModificationTime, fidlIo.NodeAttributes{
+ ModificationTime: uint64(TimespecToNsec(ts[1])),
+ })
+}
+
+func clen(n []byte) int {
+ for i := 0; i < len(n); i++ {
+ if n[i] == 0 {
+ return i
+ }
+ }
+ return len(n)
+}
+
+func ReadDirent(fd int, buf []byte) (n int, err error) {
+ fdsMu.Lock()
+ f := fds[fd-fdsOff]
+ fdsMu.Unlock()
+ dirent, err := f.ReadDirents(uint64(len(buf)))
+ if err != nil {
+ return 0, err
+ }
+ return copy(buf, dirent), nil
+}
+
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ if namelen, ok := direntNamlen(buf); ok {
+ return namelen + uint64(direntSize), true
+ } else {
+ return 0, false
+ }
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Size), unsafe.Sizeof(Dirent{}.Size))
+}
+
+type Dirent struct {
+ Ino uint64
+ Size uint8
+ Type uint8
+ Name [1]byte
+}
+
+const direntSize = int(unsafe.Offsetof(Dirent{}.Name))
diff --git a/src/syscall/timestruct.go b/src/syscall/timestruct.go
index 682c68c..77b2a76 100644
--- a/src/syscall/timestruct.go
+++ b/src/syscall/timestruct.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd fuchsia js,wasm linux netbsd openbsd solaris
package syscall
diff --git a/src/syscall/types_fuchsia.go b/src/syscall/types_fuchsia.go
new file mode 100644
index 0000000..9377777
--- /dev/null
+++ b/src/syscall/types_fuchsia.go
@@ -0,0 +1,35 @@
+// 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 syscall
+
+const (
+ S_ISUID = 0
+ S_ISGID = 0
+ S_ISVTX = 0
+)
+
+type Errno uintptr
+
+func (e Errno) Error() string {
+ return "errno(" + itoa(int(e)) + ")"
+}
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: sec, Usec: usec}
+}
diff --git a/src/syscall/zerrors_fuchsia.go b/src/syscall/zerrors_fuchsia.go
new file mode 100644
index 0000000..92f2f35
--- /dev/null
+++ b/src/syscall/zerrors_fuchsia.go
@@ -0,0 +1,77 @@
+// 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 syscall
+
+const (
+ EAGAIN = Errno(11)
+ EINPROGRESS = Errno(115)
+)
+
+const (
+ SOCK_STREAM = 1
+ SOCK_DGRAM = 2
+ SOCK_RAW = 3
+)
+
+const (
+ IPPROTO_IP = 0
+ IPPROTO_ICMP = 1
+ IPPROTO_TCP = 6
+ IPPROTO_UDP = 17
+ IPPROTO_ICMPV6 = 58
+)
+
+const (
+ AF_INET = 0x2
+ AF_INET6 = 0xa
+)
+
+const (
+ SOL_SOCKET = 0x1
+ SOL_TCP = 0x6
+)
+
+const (
+ SO_ACCEPTCONN = 0x1e
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_DEBUG = 0x1
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_NO_CHECK = 0xb
+ SO_PASSCRED = 0x10
+ SO_PEERCRED = 0x11
+ SO_PRIORITY = 0xc
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_TYPE = 0x3
+)
+
+const (
+ TCP_NODELAY = 1
+ TCP_MAXSEG = 2
+ TCP_CORK = 3
+ TCP_KEEPIDLE = 4
+ TCP_KEEPINTVL = 5
+ TCP_KEEPCNT = 6
+ TCP_SYNCNT = 7
+ TCP_LINGER2 = 8
+ TCP_DEFER_ACCEPT = 9
+ TCP_WINDOW_CLAMP = 10
+ TCP_INFO = 11
+ TCP_QUICKACK = 12
+)
diff --git a/src/syscall/ztypes_fuchsia_amd64.go b/src/syscall/ztypes_fuchsia_amd64.go
new file mode 100644
index 0000000..6621a4f
--- /dev/null
+++ b/src/syscall/ztypes_fuchsia_amd64.go
@@ -0,0 +1,28 @@
+// 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.
+
+// +build amd64,fuchsia
+
+package syscall
+
+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
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x70
+)
diff --git a/src/syscall/ztypes_fuchsia_arm64.go b/src/syscall/ztypes_fuchsia_arm64.go
new file mode 100644
index 0000000..0cca414
--- /dev/null
+++ b/src/syscall/ztypes_fuchsia_arm64.go
@@ -0,0 +1,28 @@
+// 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 syscall
+
+// +build arm64,fuchsia
+
+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
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x70
+)
diff --git a/src/syscall/zx/diagnostics/impl.go b/src/syscall/zx/diagnostics/impl.go
new file mode 100644
index 0000000..581a148
--- /dev/null
+++ b/src/syscall/zx/diagnostics/impl.go
@@ -0,0 +1,1381 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package diagnostics
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+ fuchsiamem "syscall/zx/mem"
+)
+
+const (
+ // The size bound of 1024 is a reasonably low size restriction that meets most
+ // canonical selectors we've ecountered.
+ MaximumRawSelectorLength uint16 = 1024
+ // The size 64 was chosen because entries in batches are handles to
+ // VMOs and there is a limit of 64 handles per fidl message.
+ MaximumEntriesPerBatch uint16 = 64
+ MaxStringSelectorLength uint16 = 100
+ MaxMonikerSegments uint16 = 25
+ MaxDataHierarchyDepth uint16 = 100
+)
+
+var _ _bindings.Enum = Format(0)
+
+// Enum used to specify the output format for
+// Reader results.
+type Format uint32
+
+const (
+
+ // Dump read results per the Diagnostics Json
+ // Schema specifications.
+ FormatJson Format = 1
+
+ // Dump read results per the Iquery text specifications.
+ FormatText Format = 2
+)
+
+func (_ Format) I_EnumValues() []Format {
+ return []Format{
+ FormatJson,
+ FormatText,
+ }
+}
+
+func (_ Format) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x Format) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x Format) String() string {
+ switch x {
+ case 1:
+ return "Json"
+ case 2:
+ return "Text"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = ReaderError(0)
+
+// Enum describing the potential failure states of the streaming protocol when serving results
+// to the client over the result iterator.
+type ReaderError uint32
+
+const (
+ ReaderErrorIo ReaderError = 1
+)
+
+func (_ ReaderError) I_EnumValues() []ReaderError {
+ return []ReaderError{
+ ReaderErrorIo,
+ }
+}
+
+func (_ ReaderError) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x ReaderError) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x ReaderError) String() string {
+ switch x {
+ case 1:
+ return "Io"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = StreamMode(0)
+
+// Enum specifying the modes by which a user can connect to and stream diagnostics metrics.
+type StreamMode uint8
+
+const (
+
+ // The stream will serve a snapshot of the diagnostics data at the time of
+ // connection, then end.
+ StreamModeSnapshot StreamMode = 1
+
+ // The stream will serve a snapshot of the diagnostics data at the time of
+ // connection, then subsequent calls to the stream will hang until
+ // new diagnostics data is available.
+ StreamModeSnapshotThenSubscribe StreamMode = 2
+
+ // Calls to the stream will hang until new diagnostics data is available. Between calls to
+ // the stream, newly arrived data is buffered.
+ StreamModeSubscribe StreamMode = 3
+)
+
+func (_ StreamMode) I_EnumValues() []StreamMode {
+ return []StreamMode{
+ StreamModeSnapshot,
+ StreamModeSnapshotThenSubscribe,
+ StreamModeSubscribe,
+ }
+}
+
+func (_ StreamMode) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x StreamMode) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x StreamMode) String() string {
+ switch x {
+ case 1:
+ return "Snapshot"
+ case 2:
+ return "SnapshotThenSubscribe"
+ case 3:
+ return "Subscribe"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = DataType(0)
+
+type DataType uint8
+
+const (
+
+ // Complete inspect hierarchies on the system.
+ DataTypeInspect DataType = 1
+
+ // Start|Stop|Running|DiagnosticsReady events on the system.
+ DataTypeLifecycle DataType = 2
+
+ // Log streams on the system.
+ DataTypeLogs DataType = 3
+)
+
+func (_ DataType) I_EnumValues() []DataType {
+ return []DataType{
+ DataTypeInspect,
+ DataTypeLifecycle,
+ DataTypeLogs,
+ }
+}
+
+func (_ DataType) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x DataType) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x DataType) String() string {
+ switch x {
+ case 1:
+ return "Inspect"
+ case 2:
+ return "Lifecycle"
+ case 3:
+ return "Logs"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = Severity(0)
+
+// The severity of a given record.
+type Severity uint8
+
+const (
+
+ // Trace records include detailed information about program execution.
+ SeverityTrace Severity = 16
+
+ // Debug records include development-facing information about program execution.
+ SeverityDebug Severity = 32
+
+ // Info records include general information about program execution. (default)
+ SeverityInfo Severity = 48
+
+ // Warning records include information about potentially problematic operations.
+ SeverityWarn Severity = 64
+
+ // Error records include information about failed operations.
+ SeverityError Severity = 80
+
+ // Fatal records convey information about operations which cause a program's termination.
+ SeverityFatal Severity = 96
+)
+
+func (_ Severity) I_EnumValues() []Severity {
+ return []Severity{
+ SeverityTrace,
+ SeverityDebug,
+ SeverityInfo,
+ SeverityWarn,
+ SeverityError,
+ SeverityFatal,
+ }
+}
+
+func (_ Severity) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x Severity) IsUnknown() bool {
+ switch x {
+ case 16:
+ return true
+ case 32:
+ return true
+ case 48:
+ return true
+ case 64:
+ return true
+ case 80:
+ return true
+ case 96:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x Severity) String() string {
+ switch x {
+ case 16:
+ return "Trace"
+ case 32:
+ return "Debug"
+ case 48:
+ return "Info"
+ case 64:
+ return "Warn"
+ case 80:
+ return "Error"
+ case 96:
+ return "Fatal"
+ }
+ return "Unknown"
+}
+
+type BatchIteratorGetNextResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Batch []FormattedContent `fidl_offset_v1:"0" fidl_bounds:"64"`
+}
+
+var _mBatchIteratorGetNextResponse = _bindings.CreateLazyMarshaler(BatchIteratorGetNextResponse{})
+
+func (msg *BatchIteratorGetNextResponse) Marshaler() _bindings.Marshaler {
+ return _mBatchIteratorGetNextResponse
+}
+
+// A selector defining a set of nodes to match, for which the entire subtree including
+// those nodes are selected.
+type SubtreeSelector struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ // A vector of StringSelectors which serve as a pattern matcher
+ // for paths through a hierarchy of named nodes. Each entry in the vector
+ // is a selector for a single named node in a data hierarchy. The vector
+ // of selectors for named nodes, then, defines a selector on paths through the
+ // data hierarchy.
+ //
+ // Node paths support wildcarding, which will glob a single level of a
+ // node hierarchy. eg:
+ // root/a/b/*/d
+ // will match all nodes named d which are below some child of node b.
+ // root/a/b/c*
+ // will match all nodes below b which start with the character "c".
+ NodePath []StringSelector `fidl_offset_v1:"0" fidl_bounds:"100"`
+}
+
+var _mSubtreeSelector = _bindings.CreateLazyMarshaler(SubtreeSelector{})
+
+func (msg *SubtreeSelector) Marshaler() _bindings.Marshaler {
+ return _mSubtreeSelector
+}
+
+// A selector defining a set of nodes to match, and on those matched nodes a set of named
+// propperties to match.
+type PropertySelector struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ // A vector of StringSelectors which serve as a pattern matcher
+ // for paths through a hierarchy of named nodes. Each entry in the vector
+ // is a selector for a single named node in a data hierarchy. The vector
+ // of selectors for named nodes, then, defines a selector on paths through the
+ // data hierarchy.
+ //
+ // Node paths support wildcarding, which will glob a single level of a
+ // node hierarchy. eg:
+ // root/a/b/*/d
+ // will match all nodes named d which are below some child of node b.
+ // root/a/b/c*
+ // will match all nodes below b which start with the character "c".
+ NodePath []StringSelector `fidl_offset_v1:"0" fidl_bounds:"100"`
+ // A StringSelector which serves as a pattern matcher for
+ // string-named properties on a node in a data hierarchy.
+ //
+ // target_properties supports wildcarding, which will match against all properties
+ // on any node matched by node_path.
+ TargetProperties StringSelector `fidl_offset_v1:"16"`
+}
+
+var _mPropertySelector = _bindings.CreateLazyMarshaler(PropertySelector{})
+
+func (msg *PropertySelector) Marshaler() _bindings.Marshaler {
+ return _mPropertySelector
+}
+
+type archiveAccessorWithCtxStreamDiagnosticsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ StreamParameters StreamParameters `fidl_offset_v1:"0"`
+ ResultStream BatchIteratorWithCtxInterfaceRequest `fidl_offset_v1:"16" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _marchiveAccessorWithCtxStreamDiagnosticsRequest = _bindings.CreateLazyMarshaler(archiveAccessorWithCtxStreamDiagnosticsRequest{})
+
+func (msg *archiveAccessorWithCtxStreamDiagnosticsRequest) Marshaler() _bindings.Marshaler {
+ return _marchiveAccessorWithCtxStreamDiagnosticsRequest
+}
+
+type batchIteratorWithCtxGetNextResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BatchIteratorGetNextResult `fidl_offset_v1:"0"`
+}
+
+var _mbatchIteratorWithCtxGetNextResponse = _bindings.CreateLazyMarshaler(batchIteratorWithCtxGetNextResponse{})
+
+func (msg *batchIteratorWithCtxGetNextResponse) Marshaler() _bindings.Marshaler {
+ return _mbatchIteratorWithCtxGetNextResponse
+}
+
+type I_batchIteratorGetNextResultTag uint64
+
+const (
+ BatchIteratorGetNextResultResponse = 1 // 0x00000001
+ BatchIteratorGetNextResultErr = 2 // 0x00000002
+)
+
+type BatchIteratorGetNextResult struct {
+ I_batchIteratorGetNextResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response BatchIteratorGetNextResponse `fidl_ordinal:"1"`
+ Err ReaderError `fidl_ordinal:"2"`
+}
+
+func (_m *BatchIteratorGetNextResult) reset() {
+ switch _m.I_batchIteratorGetNextResultTag {
+ case 1:
+ var _zeroed BatchIteratorGetNextResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed ReaderError
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *BatchIteratorGetNextResult) Which() I_batchIteratorGetNextResultTag {
+ return _m.I_batchIteratorGetNextResultTag
+}
+
+func (_m *BatchIteratorGetNextResult) Ordinal() uint64 {
+ return uint64(_m.I_batchIteratorGetNextResultTag)
+}
+
+func (_m *BatchIteratorGetNextResult) SetResponse(response BatchIteratorGetNextResponse) {
+ _m.reset()
+ _m.I_batchIteratorGetNextResultTag = BatchIteratorGetNextResultResponse
+ _m.Response = response
+}
+
+func BatchIteratorGetNextResultWithResponse(response BatchIteratorGetNextResponse) BatchIteratorGetNextResult {
+ var _u BatchIteratorGetNextResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *BatchIteratorGetNextResult) SetErr(err ReaderError) {
+ _m.reset()
+ _m.I_batchIteratorGetNextResultTag = BatchIteratorGetNextResultErr
+ _m.Err = err
+}
+
+func BatchIteratorGetNextResultWithErr(err ReaderError) BatchIteratorGetNextResult {
+ var _u BatchIteratorGetNextResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_selectorArgumentTag uint64
+
+const (
+ SelectorArgument_unknownData = 0 // 0x00000000
+ SelectorArgumentStructuredSelector = 1 // 0x00000001
+ SelectorArgumentRawSelector = 2 // 0x00000002
+)
+
+// Argument used for Archive selectors, can be either the pre-parsed
+// fidl struct or string representation.
+type SelectorArgument struct {
+ I_selectorArgumentTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // A Selector defining a pattern-matcher which selects for components within a hierarchy
+ // and properties in a data hierarchy namespaced by component.
+ StructuredSelector Selector `fidl_ordinal:"1"`
+ // A raw string representing a [fuchsia.diagnostics/Selector].
+ // The Selector defines a pattern-matcher which selects for components within a hierarchy
+ // and properties in a data hierarchy namespaced by component.
+ // NOTE: All StringSelectors parsed from the raw_selector will be interperetted in
+ // string_pattern mode, giving significance to special characters.
+ // TODO(fxbug.dev/4601): Link to in-tree documentation for raw selector strings.
+ RawSelector string `fidl_bounds:"1024" fidl_ordinal:"2"`
+}
+
+func (_m *SelectorArgument) reset() {
+ switch _m.I_selectorArgumentTag {
+ case 1:
+ var _zeroed Selector
+ _m.StructuredSelector = _zeroed
+ case 2:
+ var _zeroed string
+ _m.RawSelector = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *SelectorArgument) Which() I_selectorArgumentTag {
+ switch _m.I_selectorArgumentTag {
+ case 1:
+ return SelectorArgumentStructuredSelector
+ case 2:
+ return SelectorArgumentRawSelector
+ default:
+ return SelectorArgument_unknownData
+ }
+}
+
+func (_m *SelectorArgument) Ordinal() uint64 {
+ return uint64(_m.I_selectorArgumentTag)
+}
+
+func (_m *SelectorArgument) SetStructuredSelector(structuredSelector Selector) {
+ _m.reset()
+ _m.I_selectorArgumentTag = SelectorArgumentStructuredSelector
+ _m.StructuredSelector = structuredSelector
+}
+
+func SelectorArgumentWithStructuredSelector(structuredSelector Selector) SelectorArgument {
+ var _u SelectorArgument
+ _u.SetStructuredSelector(structuredSelector)
+ return _u
+}
+
+func (_m *SelectorArgument) SetRawSelector(rawSelector string) {
+ _m.reset()
+ _m.I_selectorArgumentTag = SelectorArgumentRawSelector
+ _m.RawSelector = rawSelector
+}
+
+func SelectorArgumentWithRawSelector(rawSelector string) SelectorArgument {
+ var _u SelectorArgument
+ _u.SetRawSelector(rawSelector)
+ return _u
+}
+func (_m *SelectorArgument) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
+
+type I_formattedContentTag uint64
+
+const (
+ FormattedContent_unknownData = 0 // 0x00000000
+ FormattedContentJson = 1 // 0x00000001
+ FormattedContentText = 2 // 0x00000002
+)
+
+// A fidl union containing a complete hierarchy of structured diagnostics
+// data, such that the content can be parsed into a file by itself.
+type FormattedContent struct {
+ I_formattedContentTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // A diagnostics schema encoded as json.
+ // The VMO will contain up to 1mb of diagnostics data.
+ Json fuchsiamem.Buffer `fidl_ordinal:"1"`
+ // A diagnostics schema encoded as text.
+ // The VMO will contain up to 1mb of diagnostics data.
+ Text fuchsiamem.Buffer `fidl_ordinal:"2"`
+}
+
+func (_m *FormattedContent) reset() {
+ switch _m.I_formattedContentTag {
+ case 1:
+ var _zeroed fuchsiamem.Buffer
+ _m.Json = _zeroed
+ case 2:
+ var _zeroed fuchsiamem.Buffer
+ _m.Text = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *FormattedContent) Which() I_formattedContentTag {
+ switch _m.I_formattedContentTag {
+ case 1:
+ return FormattedContentJson
+ case 2:
+ return FormattedContentText
+ default:
+ return FormattedContent_unknownData
+ }
+}
+
+func (_m *FormattedContent) Ordinal() uint64 {
+ return uint64(_m.I_formattedContentTag)
+}
+
+func (_m *FormattedContent) SetJson(json fuchsiamem.Buffer) {
+ _m.reset()
+ _m.I_formattedContentTag = FormattedContentJson
+ _m.Json = json
+}
+
+func FormattedContentWithJson(json fuchsiamem.Buffer) FormattedContent {
+ var _u FormattedContent
+ _u.SetJson(json)
+ return _u
+}
+
+func (_m *FormattedContent) SetText(text fuchsiamem.Buffer) {
+ _m.reset()
+ _m.I_formattedContentTag = FormattedContentText
+ _m.Text = text
+}
+
+func FormattedContentWithText(text fuchsiamem.Buffer) FormattedContent {
+ var _u FormattedContent
+ _u.SetText(text)
+ return _u
+}
+func (_m *FormattedContent) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
+
+type I_clientSelectorConfigurationTag uint64
+
+const (
+ ClientSelectorConfiguration_unknownData = 0 // 0x00000000
+ ClientSelectorConfigurationSelectors = 1 // 0x00000001
+ ClientSelectorConfigurationSelectAll = 2 // 0x00000002
+)
+
+type ClientSelectorConfiguration struct {
+ I_clientSelectorConfigurationTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // A vector of [fuchsia.diagnostics/SelectorArgument] which
+ // provide additional filters to scope data streams with. An empty vector is considered
+ // a misconfiguration and will result in an epitaph signaling incorrect parameters.
+ Selectors []SelectorArgument `fidl_bounds:"" fidl_ordinal:"1"`
+ // select_all must be true if set, and specifies that the client wants to retrieve
+ // all data that their connection is able to expose.
+ SelectAll bool `fidl_ordinal:"2"`
+}
+
+func (_m *ClientSelectorConfiguration) reset() {
+ switch _m.I_clientSelectorConfigurationTag {
+ case 1:
+ var _zeroed []SelectorArgument
+ _m.Selectors = _zeroed
+ case 2:
+ var _zeroed bool
+ _m.SelectAll = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *ClientSelectorConfiguration) Which() I_clientSelectorConfigurationTag {
+ switch _m.I_clientSelectorConfigurationTag {
+ case 1:
+ return ClientSelectorConfigurationSelectors
+ case 2:
+ return ClientSelectorConfigurationSelectAll
+ default:
+ return ClientSelectorConfiguration_unknownData
+ }
+}
+
+func (_m *ClientSelectorConfiguration) Ordinal() uint64 {
+ return uint64(_m.I_clientSelectorConfigurationTag)
+}
+
+func (_m *ClientSelectorConfiguration) SetSelectors(selectors []SelectorArgument) {
+ _m.reset()
+ _m.I_clientSelectorConfigurationTag = ClientSelectorConfigurationSelectors
+ _m.Selectors = selectors
+}
+
+func ClientSelectorConfigurationWithSelectors(selectors []SelectorArgument) ClientSelectorConfiguration {
+ var _u ClientSelectorConfiguration
+ _u.SetSelectors(selectors)
+ return _u
+}
+
+func (_m *ClientSelectorConfiguration) SetSelectAll(selectAll bool) {
+ _m.reset()
+ _m.I_clientSelectorConfigurationTag = ClientSelectorConfigurationSelectAll
+ _m.SelectAll = selectAll
+}
+
+func ClientSelectorConfigurationWithSelectAll(selectAll bool) ClientSelectorConfiguration {
+ var _u ClientSelectorConfiguration
+ _u.SetSelectAll(selectAll)
+ return _u
+}
+func (_m *ClientSelectorConfiguration) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
+
+type I_stringSelectorTag uint64
+
+const (
+ StringSelector_unknownData = 0 // 0x00000000
+ StringSelectorStringPattern = 1 // 0x00000001
+ StringSelectorExactMatch = 2 // 0x00000002
+)
+
+// StringSelector is an union defining different ways to describe a pattern to match
+// strings against.
+type StringSelector struct {
+ I_stringSelectorTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // This is a provided string that defines a pattern to
+ // match against. The parser treats asterisks (*), colons (:) and backslashes
+ // (\) as special characters.
+ //
+ // If you wish to match against literal asterisks (*), they must be escaped.
+ // If you wish to match against literal backslashes (\), they must be escaped.
+ // If you wish to match against literal colons (:), they must be escaped.
+ //
+ // eg: abc will match any string with the exact name "abc".
+ // eg: a\* will match any string with the exact name "a*".
+ // eg: a\\* will match any that starts with exactly "a\".
+ // eg: a* will match any string that starts with "a".
+ // eg: a*b will match any string that starts with a and ends with b.
+ // eg: a*b*c will match any string that starts with a and ends with c, with `b`
+ // in the middle.
+ StringPattern string `fidl_bounds:"100" fidl_ordinal:"1"`
+ // This is a provided string that defines an exact string to match against. No
+ // characters are treated as special, or carry special syntax.
+ ExactMatch string `fidl_bounds:"100" fidl_ordinal:"2"`
+}
+
+func (_m *StringSelector) reset() {
+ switch _m.I_stringSelectorTag {
+ case 1:
+ var _zeroed string
+ _m.StringPattern = _zeroed
+ case 2:
+ var _zeroed string
+ _m.ExactMatch = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *StringSelector) Which() I_stringSelectorTag {
+ switch _m.I_stringSelectorTag {
+ case 1:
+ return StringSelectorStringPattern
+ case 2:
+ return StringSelectorExactMatch
+ default:
+ return StringSelector_unknownData
+ }
+}
+
+func (_m *StringSelector) Ordinal() uint64 {
+ return uint64(_m.I_stringSelectorTag)
+}
+
+func (_m *StringSelector) SetStringPattern(stringPattern string) {
+ _m.reset()
+ _m.I_stringSelectorTag = StringSelectorStringPattern
+ _m.StringPattern = stringPattern
+}
+
+func StringSelectorWithStringPattern(stringPattern string) StringSelector {
+ var _u StringSelector
+ _u.SetStringPattern(stringPattern)
+ return _u
+}
+
+func (_m *StringSelector) SetExactMatch(exactMatch string) {
+ _m.reset()
+ _m.I_stringSelectorTag = StringSelectorExactMatch
+ _m.ExactMatch = exactMatch
+}
+
+func StringSelectorWithExactMatch(exactMatch string) StringSelector {
+ var _u StringSelector
+ _u.SetExactMatch(exactMatch)
+ return _u
+}
+func (_m *StringSelector) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
+
+type I_treeSelectorTag uint64
+
+const (
+ TreeSelector_unknownData = 0 // 0x00000000
+ TreeSelectorSubtreeSelector = 1 // 0x00000001
+ TreeSelectorPropertySelector = 2 // 0x00000002
+)
+
+// TreeSelector represents a selection request on a hierarchy of named nodes, with
+// named properties on those nodes.
+type TreeSelector struct {
+ I_treeSelectorTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // A selector defining a set of nodes to match, for which the entire subtree including
+ // those nodes are selected.
+ SubtreeSelector SubtreeSelector `fidl_ordinal:"1"`
+ // A selector defining a set of nodes to match, and on those matched nodes a set of named
+ // propperties to match.
+ PropertySelector PropertySelector `fidl_ordinal:"2"`
+}
+
+func (_m *TreeSelector) reset() {
+ switch _m.I_treeSelectorTag {
+ case 1:
+ var _zeroed SubtreeSelector
+ _m.SubtreeSelector = _zeroed
+ case 2:
+ var _zeroed PropertySelector
+ _m.PropertySelector = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *TreeSelector) Which() I_treeSelectorTag {
+ switch _m.I_treeSelectorTag {
+ case 1:
+ return TreeSelectorSubtreeSelector
+ case 2:
+ return TreeSelectorPropertySelector
+ default:
+ return TreeSelector_unknownData
+ }
+}
+
+func (_m *TreeSelector) Ordinal() uint64 {
+ return uint64(_m.I_treeSelectorTag)
+}
+
+func (_m *TreeSelector) SetSubtreeSelector(subtreeSelector SubtreeSelector) {
+ _m.reset()
+ _m.I_treeSelectorTag = TreeSelectorSubtreeSelector
+ _m.SubtreeSelector = subtreeSelector
+}
+
+func TreeSelectorWithSubtreeSelector(subtreeSelector SubtreeSelector) TreeSelector {
+ var _u TreeSelector
+ _u.SetSubtreeSelector(subtreeSelector)
+ return _u
+}
+
+func (_m *TreeSelector) SetPropertySelector(propertySelector PropertySelector) {
+ _m.reset()
+ _m.I_treeSelectorTag = TreeSelectorPropertySelector
+ _m.PropertySelector = propertySelector
+}
+
+func TreeSelectorWithPropertySelector(propertySelector PropertySelector) TreeSelector {
+ var _u TreeSelector
+ _u.SetPropertySelector(propertySelector)
+ return _u
+}
+func (_m *TreeSelector) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
+
+// Interest expresses the scope of clients' desired diagnostics data,
+// e.g. for filtering messages or controlling their generation.
+type Interest struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // Minimum desired severity. Components should include records at or
+ // above this severity.
+ //
+ // The default is `INFO`.
+ MinSeverity Severity `fidl_ordinal:"1"`
+ MinSeverityPresent bool
+}
+
+func (u *Interest) SetMinSeverity(minSeverity Severity) {
+ u.MinSeverity = minSeverity
+ u.MinSeverityPresent = true
+}
+
+func (u *Interest) GetMinSeverity() Severity {
+ return u.MinSeverity
+}
+
+func (u *Interest) GetMinSeverityWithDefault(_default Severity) Severity {
+ if !u.HasMinSeverity() {
+ return _default
+ }
+ return u.MinSeverity
+}
+
+func (u *Interest) HasMinSeverity() bool {
+ return u.MinSeverityPresent
+}
+
+func (u *Interest) ClearMinSeverity() {
+ u.MinSeverityPresent = false
+}
+
+func (u *Interest) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *Interest) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Parameters needed to configure a stream of diagnostics information.
+type StreamParameters struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // A [fuchsia.diagnostics/DataType] that specifies the diagnostics data type
+ // to stream to the client.
+ // NOTE: REQUIRED
+ DataType DataType `fidl_ordinal:"1"`
+ DataTypePresent bool
+ // A [fuchsia.diagnostics/StreamMode] that specifies how the
+ // streaming server provides streamed results.
+ // NOTE: REQUIRED
+ StreamMode StreamMode `fidl_ordinal:"2"`
+ StreamModePresent bool
+ // A [fuchsia.diagnostics/Format] that specifies how to format the returned
+ // diagnostics data.
+ // NOTE: REQUIRED
+ Format Format `fidl_ordinal:"3"`
+ FormatPresent bool
+ // Configuration specifying what results the client wants returned from their
+ // connection. The client can request a specific subset of data using a vector
+ // of provided selectors, or can specify that they want all available data.
+ // NOTE: REQUIRED
+ ClientSelectorConfiguration ClientSelectorConfiguration `fidl_ordinal:"4"`
+ ClientSelectorConfigurationPresent bool
+ // Configuration specifying max number of seconds to wait for a single
+ // component to have its diagnostics data "pumped". This value can used
+ // for testing or if you know the component you are interested is in under
+ // heavy load.
+ // If not provided, then PER_COMPONENT_ASYNC_TIMEOUT_SECONDS as defined
+ // in //src/diagnostics/archivist/src/constants.rs will be used.
+ // NOTE: OPTIONAL
+ BatchRetrievalTimeoutSeconds int64 `fidl_ordinal:"5"`
+ BatchRetrievalTimeoutSecondsPresent bool
+}
+
+func (u *StreamParameters) SetDataType(dataType DataType) {
+ u.DataType = dataType
+ u.DataTypePresent = true
+}
+
+func (u *StreamParameters) GetDataType() DataType {
+ return u.DataType
+}
+
+func (u *StreamParameters) GetDataTypeWithDefault(_default DataType) DataType {
+ if !u.HasDataType() {
+ return _default
+ }
+ return u.DataType
+}
+
+func (u *StreamParameters) HasDataType() bool {
+ return u.DataTypePresent
+}
+
+func (u *StreamParameters) ClearDataType() {
+ u.DataTypePresent = false
+}
+
+func (u *StreamParameters) SetStreamMode(streamMode StreamMode) {
+ u.StreamMode = streamMode
+ u.StreamModePresent = true
+}
+
+func (u *StreamParameters) GetStreamMode() StreamMode {
+ return u.StreamMode
+}
+
+func (u *StreamParameters) GetStreamModeWithDefault(_default StreamMode) StreamMode {
+ if !u.HasStreamMode() {
+ return _default
+ }
+ return u.StreamMode
+}
+
+func (u *StreamParameters) HasStreamMode() bool {
+ return u.StreamModePresent
+}
+
+func (u *StreamParameters) ClearStreamMode() {
+ u.StreamModePresent = false
+}
+
+func (u *StreamParameters) SetFormat(format Format) {
+ u.Format = format
+ u.FormatPresent = true
+}
+
+func (u *StreamParameters) GetFormat() Format {
+ return u.Format
+}
+
+func (u *StreamParameters) GetFormatWithDefault(_default Format) Format {
+ if !u.HasFormat() {
+ return _default
+ }
+ return u.Format
+}
+
+func (u *StreamParameters) HasFormat() bool {
+ return u.FormatPresent
+}
+
+func (u *StreamParameters) ClearFormat() {
+ u.FormatPresent = false
+}
+
+func (u *StreamParameters) SetClientSelectorConfiguration(clientSelectorConfiguration ClientSelectorConfiguration) {
+ u.ClientSelectorConfiguration = clientSelectorConfiguration
+ u.ClientSelectorConfigurationPresent = true
+}
+
+func (u *StreamParameters) GetClientSelectorConfiguration() ClientSelectorConfiguration {
+ return u.ClientSelectorConfiguration
+}
+
+func (u *StreamParameters) GetClientSelectorConfigurationWithDefault(_default ClientSelectorConfiguration) ClientSelectorConfiguration {
+ if !u.HasClientSelectorConfiguration() {
+ return _default
+ }
+ return u.ClientSelectorConfiguration
+}
+
+func (u *StreamParameters) HasClientSelectorConfiguration() bool {
+ return u.ClientSelectorConfigurationPresent
+}
+
+func (u *StreamParameters) ClearClientSelectorConfiguration() {
+ u.ClientSelectorConfigurationPresent = false
+}
+
+func (u *StreamParameters) SetBatchRetrievalTimeoutSeconds(batchRetrievalTimeoutSeconds int64) {
+ u.BatchRetrievalTimeoutSeconds = batchRetrievalTimeoutSeconds
+ u.BatchRetrievalTimeoutSecondsPresent = true
+}
+
+func (u *StreamParameters) GetBatchRetrievalTimeoutSeconds() int64 {
+ return u.BatchRetrievalTimeoutSeconds
+}
+
+func (u *StreamParameters) GetBatchRetrievalTimeoutSecondsWithDefault(_default int64) int64 {
+ if !u.HasBatchRetrievalTimeoutSeconds() {
+ return _default
+ }
+ return u.BatchRetrievalTimeoutSeconds
+}
+
+func (u *StreamParameters) HasBatchRetrievalTimeoutSeconds() bool {
+ return u.BatchRetrievalTimeoutSecondsPresent
+}
+
+func (u *StreamParameters) ClearBatchRetrievalTimeoutSeconds() {
+ u.BatchRetrievalTimeoutSecondsPresent = false
+}
+
+func (u *StreamParameters) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *StreamParameters) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Specifies a pattern of component relative monikers which
+// identify components being selected for.
+//
+// Component selectors support wildcarding, which will glob a single "level" of a
+// component moniker. eg:
+// hub/*/echo.cmx
+// will match all echo.cmx instances running only in realms directly under hub, but none
+// nested further.
+type ComponentSelector struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // Vector encoding the a pattern for monikers of components being selected for.
+ // These monikers are child-monikers relative to a "root" hierarchy that the archivist
+ // is aware of.
+ //
+ // There must be at least one StringSelector provided, which
+ // specifies the component names that are matched by
+ // the current selector.
+ MonikerSegments []StringSelector `fidl_bounds:"25" fidl_ordinal:"1"`
+ MonikerSegmentsPresent bool
+}
+
+func (u *ComponentSelector) SetMonikerSegments(monikerSegments []StringSelector) {
+ u.MonikerSegments = monikerSegments
+ u.MonikerSegmentsPresent = true
+}
+
+func (u *ComponentSelector) GetMonikerSegments() []StringSelector {
+ return u.MonikerSegments
+}
+
+func (u *ComponentSelector) GetMonikerSegmentsWithDefault(_default []StringSelector) []StringSelector {
+ if !u.HasMonikerSegments() {
+ return _default
+ }
+ return u.MonikerSegments
+}
+
+func (u *ComponentSelector) HasMonikerSegments() bool {
+ return u.MonikerSegmentsPresent
+}
+
+func (u *ComponentSelector) ClearMonikerSegments() {
+ u.MonikerSegmentsPresent = false
+}
+
+func (u *ComponentSelector) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *ComponentSelector) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Structured selector containing all required information for pattern-matching onto
+// string-named properties owned by nodes in a data hierarchy, where data hierarchies belong
+// to specific components.
+//
+// These selectors are represented in text form as three segments, colon delimited,
+// specifying:
+// <component_moniker>:<node_selector>:<property_selector>
+// Examples:
+// Property selection:
+// realm1/realm2/echo.cmx:root/active_users:user_count
+//
+// Subtree selection:
+// realm1/realm2/echo.cmx:root/active_users
+type Selector struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // The selector defining a pattern of component monikers to match
+ // against.
+ ComponentSelector ComponentSelector `fidl_ordinal:"1"`
+ ComponentSelectorPresent bool
+ // The selector defining data hierarchy properties to match against
+ // within the data hierarchies owned by components matched by
+ // `component_selector`.
+ TreeSelector TreeSelector `fidl_ordinal:"2"`
+ TreeSelectorPresent bool
+}
+
+func (u *Selector) SetComponentSelector(componentSelector ComponentSelector) {
+ u.ComponentSelector = componentSelector
+ u.ComponentSelectorPresent = true
+}
+
+func (u *Selector) GetComponentSelector() ComponentSelector {
+ return u.ComponentSelector
+}
+
+func (u *Selector) GetComponentSelectorWithDefault(_default ComponentSelector) ComponentSelector {
+ if !u.HasComponentSelector() {
+ return _default
+ }
+ return u.ComponentSelector
+}
+
+func (u *Selector) HasComponentSelector() bool {
+ return u.ComponentSelectorPresent
+}
+
+func (u *Selector) ClearComponentSelector() {
+ u.ComponentSelectorPresent = false
+}
+
+func (u *Selector) SetTreeSelector(treeSelector TreeSelector) {
+ u.TreeSelector = treeSelector
+ u.TreeSelectorPresent = true
+}
+
+func (u *Selector) GetTreeSelector() TreeSelector {
+ return u.TreeSelector
+}
+
+func (u *Selector) GetTreeSelectorWithDefault(_default TreeSelector) TreeSelector {
+ if !u.HasTreeSelector() {
+ return _default
+ }
+ return u.TreeSelector
+}
+
+func (u *Selector) HasTreeSelector() bool {
+ return u.TreeSelectorPresent
+}
+
+func (u *Selector) ClearTreeSelector() {
+ u.TreeSelectorPresent = false
+}
+
+func (u *Selector) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *Selector) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+const (
+ ArchiveAccessorStreamDiagnosticsOrdinal uint64 = 0x20c73e2ecd653c3e
+)
+
+type ArchiveAccessorWithCtxInterface _bindings.ChannelProxy
+
+// Creates an iterator over diagnostics data on the system.
+// * The iterator may be finite by streaming in SNAPSHOT mode, serving only the
+// current state of diagnostics data on the system.
+// * The iterator may be infinite by streaming in either SNAPSHOT_THEN_SUBSCRIBE
+// or SUBSCRIBE mode; the prior first provides iteration over the current state of
+// the sytem, and then both provide ongoing iteration over newly arriving diagnostics
+// data.
+//
+// + request `result stream` a [fuchsia.diagnostics/BatchIterator] that diagnostic
+// records are exposed to the client over.
+// * epitaphs:
+// - INVALID_ARGS: A required argument in the StreamParameters struct was missing.
+// - WRONG_TYPE: A selector provided by the StreamParameters struct was incorrectly
+// formatted.
+//
+// + request `stream_parameters` is a [fuchsia.diagnostics/StreamParameter] which
+// specifies how to configure the stream.
+func (p *ArchiveAccessorWithCtxInterface) StreamDiagnostics(ctx_ _bindings.Context, streamParameters StreamParameters, resultStream BatchIteratorWithCtxInterfaceRequest) error {
+ req_ := &archiveAccessorWithCtxStreamDiagnosticsRequest{
+ StreamParameters: streamParameters,
+ ResultStream: resultStream,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(ArchiveAccessorStreamDiagnosticsOrdinal, req_)
+ return err_
+}
+
+// Outer protocol for interacting with the different diagnostics data sources.
+type ArchiveAccessorWithCtx interface {
+ // Creates an iterator over diagnostics data on the system.
+ // * The iterator may be finite by streaming in SNAPSHOT mode, serving only the
+ // current state of diagnostics data on the system.
+ // * The iterator may be infinite by streaming in either SNAPSHOT_THEN_SUBSCRIBE
+ // or SUBSCRIBE mode; the prior first provides iteration over the current state of
+ // the sytem, and then both provide ongoing iteration over newly arriving diagnostics
+ // data.
+ //
+ // + request `result stream` a [fuchsia.diagnostics/BatchIterator] that diagnostic
+ // records are exposed to the client over.
+ // * epitaphs:
+ // - INVALID_ARGS: A required argument in the StreamParameters struct was missing.
+ // - WRONG_TYPE: A selector provided by the StreamParameters struct was incorrectly
+ // formatted.
+ //
+ // + request `stream_parameters` is a [fuchsia.diagnostics/StreamParameter] which
+ // specifies how to configure the stream.
+ StreamDiagnostics(ctx_ _bindings.Context, streamParameters StreamParameters, resultStream BatchIteratorWithCtxInterfaceRequest) error
+}
+
+type ArchiveAccessorWithCtxTransitionalBase struct{}
+
+type ArchiveAccessorWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewArchiveAccessorWithCtxInterfaceRequest() (ArchiveAccessorWithCtxInterfaceRequest, *ArchiveAccessorWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return ArchiveAccessorWithCtxInterfaceRequest(req), (*ArchiveAccessorWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ ArchiveAccessorWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.diagnostics.ArchiveAccessor"
+}
+func (c ArchiveAccessorWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const ArchiveAccessorName = "fuchsia.diagnostics.ArchiveAccessor"
+
+type ArchiveAccessorWithCtxStub struct {
+ Impl ArchiveAccessorWithCtx
+}
+
+func (s_ *ArchiveAccessorWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case ArchiveAccessorStreamDiagnosticsOrdinal:
+ in_ := archiveAccessorWithCtxStreamDiagnosticsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.StreamDiagnostics(args_.Ctx, in_.StreamParameters, in_.ResultStream)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type ArchiveAccessorEventProxy _bindings.ChannelProxy
+
+const (
+ BatchIteratorGetNextOrdinal uint64 = 0x781986486c6254a5
+)
+
+type BatchIteratorWithCtxInterface _bindings.ChannelProxy
+
+// Returns a vector of [fuchsia.diagnostics/FormattedContent] structs
+// with a format dictated by the format_settings argument provided to the Reader protocol
+// which spawned this BatchIterator.
+//
+// An empty vector implies that the data hierarchy has been fully iterated, and subsequent
+// GetNext calls will always return the empty vector.
+//
+// When the BatchIterator is serving results via subscription model, calls to GetNext will
+// hang until there is new data available, it will not return an empty vector.
+//
+// - returns a vector of FormattedContent structs. Clients connected to a
+// Batch are expected to call GetNext() until an empty vector
+// is returned, denoting that the entire data hierarchy has been read.
+//
+// * error a [fuchsia.diagnostics/ReaderError]
+// value indicating that there was an issue reading the underlying data hierarchies
+// or formatting those hierarchies to populate the `batch`. Note, these
+// issues do not include a single component's data hierarchy failing to be read.
+// The iterator is tolerant of individual component data sources failing to be read,
+// whether that failure is a timeout or a malformed binary file.
+// In the event that a GetNext call fails, that subset of the data hierarchy results is
+// dropped, but future calls to GetNext will provide new subsets of
+// FormattedDataHierarchies.
+//
+func (p *BatchIteratorWithCtxInterface) GetNext(ctx_ _bindings.Context) (BatchIteratorGetNextResult, error) {
+ var req_ _bindings.Message
+ resp_ := &batchIteratorWithCtxGetNextResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BatchIteratorGetNextOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Conceptually, a directory iterator, where each element in the iterator is a single
+// complete file that can be concatenated with other results.
+type BatchIteratorWithCtx interface {
+ // Returns a vector of [fuchsia.diagnostics/FormattedContent] structs
+ // with a format dictated by the format_settings argument provided to the Reader protocol
+ // which spawned this BatchIterator.
+ //
+ // An empty vector implies that the data hierarchy has been fully iterated, and subsequent
+ // GetNext calls will always return the empty vector.
+ //
+ // When the BatchIterator is serving results via subscription model, calls to GetNext will
+ // hang until there is new data available, it will not return an empty vector.
+ //
+ // - returns a vector of FormattedContent structs. Clients connected to a
+ // Batch are expected to call GetNext() until an empty vector
+ // is returned, denoting that the entire data hierarchy has been read.
+ //
+ // * error a [fuchsia.diagnostics/ReaderError]
+ // value indicating that there was an issue reading the underlying data hierarchies
+ // or formatting those hierarchies to populate the `batch`. Note, these
+ // issues do not include a single component's data hierarchy failing to be read.
+ // The iterator is tolerant of individual component data sources failing to be read,
+ // whether that failure is a timeout or a malformed binary file.
+ // In the event that a GetNext call fails, that subset of the data hierarchy results is
+ // dropped, but future calls to GetNext will provide new subsets of
+ // FormattedDataHierarchies.
+ //
+ GetNext(ctx_ _bindings.Context) (BatchIteratorGetNextResult, error)
+}
+
+type BatchIteratorWithCtxTransitionalBase struct{}
+
+type BatchIteratorWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewBatchIteratorWithCtxInterfaceRequest() (BatchIteratorWithCtxInterfaceRequest, *BatchIteratorWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return BatchIteratorWithCtxInterfaceRequest(req), (*BatchIteratorWithCtxInterface)(cli), err
+}
+
+type BatchIteratorWithCtxStub struct {
+ Impl BatchIteratorWithCtx
+}
+
+func (s_ *BatchIteratorWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case BatchIteratorGetNextOrdinal:
+ result, err_ := s_.Impl.GetNext(args_.Ctx)
+ out_ := batchIteratorWithCtxGetNextResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type BatchIteratorEventProxy _bindings.ChannelProxy
diff --git a/src/syscall/zx/fdio/client.go b/src/syscall/zx/fdio/client.go
new file mode 100644
index 0000000..d682ea0
--- /dev/null
+++ b/src/syscall/zx/fdio/client.go
@@ -0,0 +1,41 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on types that don't compile in not-Fuchsia.
+// +build fuchsia
+
+package fdio
+
+import (
+ "syscall/zx"
+ "syscall/zx/fidl"
+ "syscall/zx/internal/context"
+ "syscall/zx/io"
+)
+
+func ServiceConnect(svcpath string, h zx.Handle) error {
+ // Otherwise attempt to connect through the root namespace.
+ ns, err := NewNSFromMap(zx.RootNSMap)
+ if err == nil {
+ return ns.Connect(svcpath, h)
+ }
+ h.Close()
+ return &zx.Error{Status: zx.ErrNotFound, Text: "fdio.ServiceConnect"}
+}
+
+func ServiceConnectAt(dir zx.Handle, path string, h zx.Handle) error {
+ if !dir.IsValid() || !h.IsValid() {
+ return &zx.Error{Status: zx.ErrInvalidArgs, Text: "fdio.ServiceConnectAt"}
+ }
+ // Open the path on the remote.
+ iface := (*io.DirectoryWithCtxInterface)(&fidl.ChannelProxy{Channel: zx.Channel(dir)})
+ req := io.NodeWithCtxInterfaceRequest(fidl.InterfaceRequest{Channel: zx.Channel(h)})
+ err := iface.Open(context.Background(), io.OpenRightReadable|io.OpenRightWritable, 0755, path, req)
+ if err != nil {
+ h.Close()
+ return err
+ }
+ return nil
+}
diff --git a/src/syscall/zx/fdio/directory.go b/src/syscall/zx/fdio/directory.go
new file mode 100644
index 0000000..365e50f
--- /dev/null
+++ b/src/syscall/zx/fdio/directory.go
@@ -0,0 +1,190 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on types that don't compile in not-Fuchsia.
+// +build fuchsia
+
+package fdio
+
+import (
+ "syscall/zx"
+ "syscall/zx/fidl"
+ "syscall/zx/internal/context"
+ "syscall/zx/io"
+)
+
+var _ FDIO = (*Directory)(nil)
+
+// Directory is a wrapper around a Node which implements FDIO.
+type Directory struct {
+ Node
+}
+
+func NewDirectoryWithCtx(proxy *io.DirectoryAdminWithCtxInterface) *Directory {
+ return &Directory{Node: Node{NodeWithCtxInterface: (*io.NodeWithCtxInterface)(proxy)}}
+}
+
+func (d *Directory) getToken() (zx.Handle, error) {
+ status, token, err := d.directoryInterface().GetToken(context.Background())
+ if err := zxStatusToError(status, err, "io.directory.getToken"); err != nil {
+ return zx.HandleInvalid, err
+ }
+ return token, nil
+}
+
+// directoryInterface returns the underlying DirectoryAdmin FIDL client proxy.
+func (d *Directory) directoryInterface() *io.DirectoryAdminWithCtxInterface {
+ return (*io.DirectoryAdminWithCtxInterface)(d.Node.NodeWithCtxInterface)
+}
+
+func (d *Directory) Unmount() (int32, error) {
+ return d.directoryInterface().Unmount(context.Background())
+}
+
+// Close closes the Directory object.
+func (d *Directory) Close() error {
+ return d.Node.Close()
+}
+
+// Open opens an FDIO at path with the given flags and mode relative to this
+// Directory.
+func (d *Directory) Open(pathname string, flags uint32, mode uint32) (FDIO, error) {
+ req, obj, err := io.NewNodeWithCtxInterfaceRequest()
+ if err != nil {
+ return nil, err
+ }
+ fdio, err := func() (FDIO, error) {
+ if err := d.directoryInterface().Open(context.Background(), flags|io.OpenFlagDescribe, mode, pathname, req); err != nil {
+ return nil, err
+ }
+ status, info, err := obj.ExpectOnOpen(context.Background())
+ if err := zxStatusToError(status, err, "io.directory.Open"); err != nil {
+ return nil, err
+ }
+ return nodeFromInfo(info, obj)
+ }()
+ if err != nil {
+ return nil, newMultiError(((*fidl.ChannelProxy)(obj)).Close(), "closeErr", err, "innerErr")
+ }
+ return fdio, err
+}
+
+func (d *Directory) openParent(pathname string) (FDIO, string, error) {
+ dirpath, name := pathSplit(pathname)
+ parent, err := d.Open(
+ pathDir(dirpath),
+ io.OpenRightReadable|io.OpenFlagDirectory|io.OpenFlagPosix,
+ S_IFDIR)
+ if err != nil {
+ return nil, "", err
+ }
+ return parent, name, err
+}
+
+// Link creates a link between two paths under this Directory.
+func (d *Directory) Link(oldpath, newpath string) error {
+ oldparent, oldname, err := d.openParent(oldpath)
+ if err != nil {
+ return err
+ }
+ err = func() error {
+ olddir, ok := oldparent.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.directory.Link"}
+ }
+ newparent, newname, err := d.openParent(newpath)
+ if err != nil {
+ return err
+ }
+ err = func() error {
+ newdir, ok := newparent.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.directory.Link"}
+ }
+ token, err := newdir.getToken()
+ if err != nil {
+ return err
+ }
+ status, err := olddir.directoryInterface().Link(context.Background(), oldname, token, newname)
+ return zxStatusToError(status, err, "io.directory.Link")
+ }()
+ return newMultiError(newparent.Close(), "newCloseErr", err, "innerErr")
+ }()
+ return newMultiError(oldparent.Close(), "oldCloseErr", err, "innerErr")
+}
+
+// Rename renames an object at one path to another under this Directory.
+func (d *Directory) Rename(oldpath, newpath string) error {
+ oldf, oldname, err := d.openParent(oldpath)
+ if err != nil {
+ return err
+ }
+ err = func() error {
+ olddir, ok := oldf.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.directory.Rename"}
+ }
+ newf, newname, err := d.openParent(newpath)
+ if err != nil {
+ return err
+ }
+ err = func() error {
+ newdir, ok := newf.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.directory.Rename"}
+ }
+ token, err := newdir.getToken()
+ if err != nil {
+ return err
+ }
+ status, err := olddir.directoryInterface().Rename(context.Background(), oldname, token, newname)
+ return zxStatusToError(status, err, "io.directory.Rename")
+ }()
+ return newMultiError(newf.Close(), "newCloseErr", err, "innerErr")
+ }()
+ return newMultiError(oldf.Close(), "oldCloseErr", err, "innerErr")
+}
+
+// Unlink unlinks an object at a pauth under this Directory.
+func (d *Directory) Unlink(pathname string) error {
+ parent, name, err := d.openParent(pathname)
+ if err != nil {
+ return err
+ }
+ err = func() error {
+ parentdir, ok := parent.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.directory.Unlink"}
+ }
+ status, err := parentdir.directoryInterface().Unlink(context.Background(), name)
+ return zxStatusToError(status, err, "io.directory.Unlink")
+ }()
+ return newMultiError(parent.Close(), "closeErr", err, "innerErr")
+}
+
+// ReadDirents returns up to max-worth bytes of byte-encoded dirents which represent
+// objects under this Directory. Repeated calls to ReadDirents continues giving back
+// objects.
+func (d *Directory) ReadDirents(max uint64) ([]byte, error) {
+ status, dirents, err := d.directoryInterface().ReadDirents(context.Background(), max)
+ if err := zxStatusToError(status, err, "io.file.ReadDirents"); err != nil {
+ return nil, err
+ }
+ return dirents, nil
+}
+
+// Rewind resets the ReadDirents' counter.
+func (d *Directory) Rewind() error {
+ status, err := d.directoryInterface().Rewind(context.Background())
+ return zxStatusToError(status, err, "io.directory.Rewind")
+}
+
+// Seek implements FDIO for Directory.
+func (d *Directory) Seek(offset int64, whence int) (int64, error) {
+ if offset == 0 && io.SeekOrigin(whence) == io.SeekOriginStart {
+ return 0, d.Rewind()
+ }
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "io.Directory.Seek"}
+}
diff --git a/src/syscall/zx/fdio/fdio.go b/src/syscall/zx/fdio/fdio.go
new file mode 100644
index 0000000..58c2868
--- /dev/null
+++ b/src/syscall/zx/fdio/fdio.go
@@ -0,0 +1,81 @@
+// 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 fdio provides unix-style IO, implementing Zircon's "system/ulib/fdio"
+package fdio
+
+import (
+ "syscall/zx"
+ "syscall/zx/io"
+)
+
+// FDIO provides classic unix-style IO over various transports
+type FDIO interface {
+ Handles() []zx.Handle
+
+ Clone() (FDIO, error)
+ Close() error
+
+ Sync() error
+ GetAttr() (io.NodeAttributes, error)
+ SetAttr(flags uint32, attr io.NodeAttributes) error
+
+ Read(data []byte) (int, error)
+ ReadAt(data []byte, off int64) (int, error)
+ Write(data []byte) (int, error)
+ WriteAt(data []byte, off int64) (int, error)
+ Seek(offset int64, whence int) (int64, error)
+ Truncate(length uint64) error
+
+ Open(path string, flags uint32, mode uint32) (FDIO, error)
+ Link(oldpath, newpath string) error
+ Rename(oldpath, newpath string) error
+ Unlink(path string) error
+ ReadDirents(max uint64) ([]byte, error)
+ Rewind() error
+}
+
+type Vtype uint32
+
+// bit-compatible with POSIX stat
+const (
+ VtypeMask Vtype = 0170000
+ VtypeSock Vtype = 0140000
+ VtypeLink Vtype = 0120000
+ VtypeFile Vtype = 0100000
+ VtypeBdev Vtype = 0060000
+ VtypeDir Vtype = 0040000
+ VtypeCdev Vtype = 0020000
+ VtypePipe Vtype = 0010000
+
+ VtypeISUID Vtype = 0004000
+ VtypeISGID Vtype = 0002000
+ VtypeISVTX Vtype = 0001000
+ VtypeIRWXU Vtype = 0000700
+ VtypeIRUSR Vtype = 0000400
+ VtypeIWUSR Vtype = 0000200
+ VtypeIXUSR Vtype = 0000100
+ VtypeIRWXG Vtype = 0000070
+ VtypeIRGRP Vtype = 0000040
+ VtypeIWGRP Vtype = 0000020
+ VtypeIXGRP Vtype = 0000010
+ VtypeIRWXO Vtype = 0000007
+ VtypeIROTH Vtype = 0000004
+ VtypeIWOTH Vtype = 0000002
+ VtypeIXOTH Vtype = 0000001
+)
+
+const (
+ HandleTypeFileDescriptor = 0x30
+ HandleTypeRemote = 0x32
+ HandleTypeLogger = 0x35
+ HandleTypeSocket = 0x36
+)
+
+const (
+ S_IFMT = 0000170000
+ S_IFDIR = 0000040000
+ S_IFREG = 0000100000
+ S_IFIFO = 0000010000
+)
diff --git a/src/syscall/zx/fdio/file.go b/src/syscall/zx/fdio/file.go
new file mode 100644
index 0000000..604f81f
--- /dev/null
+++ b/src/syscall/zx/fdio/file.go
@@ -0,0 +1,156 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on types that don't compile in not-Fuchsia.
+// +build fuchsia
+
+package fdio
+
+import (
+ "syscall/zx"
+ "syscall/zx/internal/context"
+ "syscall/zx/io"
+ "syscall/zx/mem"
+)
+
+var _ FDIO = (*File)(nil)
+
+// File is a wrapper around a Node which implements FDIO.
+type File struct {
+ Node
+ Event zx.Event
+}
+
+func NewFileWithCtx(proxy *io.FileWithCtxInterface, event zx.Event) *File {
+ return &File{Node: Node{NodeWithCtxInterface: (*io.NodeWithCtxInterface)(proxy)}, Event: event}
+}
+
+// fileInterface returns the underlying File FIDL client proxy.
+func (f *File) fileInterface() *io.FileWithCtxInterface {
+ return (*io.FileWithCtxInterface)(f.Node.NodeWithCtxInterface)
+}
+
+func (f *File) GetBuffer(flags uint32) (int32, *mem.Buffer, error) {
+ return f.fileInterface().GetBuffer(context.Background(), flags)
+}
+
+// Handles returns all the underlying handles for this file,
+// which is the control channel and an event.
+func (f *File) Handles() []zx.Handle {
+ return append(f.Node.Handles(), zx.Handle(f.Event))
+}
+
+// Close closes all the control channel and event associated with the file
+// object.
+func (f *File) Close() error {
+ return newMultiError(f.Node.Close(), "nodeCloseErr", f.Event.Close(), "eventCloseErr")
+}
+
+// read reads data from a File. If off == -1 then it does a read
+// from whatever the seek offset is.
+func (f *File) read(data []byte, off int64) (int, error) {
+ n := 0
+ for n < len(data) {
+ bytesToRead := int(io.MaxBuf)
+ if len(data)-n < int(io.MaxBuf) {
+ bytesToRead = len(data) - n
+ }
+ var status int32
+ var out []byte
+ var err error
+ if off == -1 {
+ status, out, err = f.fileInterface().Read(context.Background(), uint64(bytesToRead))
+ } else {
+ status, out, err = f.fileInterface().ReadAt(
+ context.Background(),
+ uint64(bytesToRead),
+ uint64(int64(n)+off),
+ )
+ }
+ if err := zxStatusToError(status, err, ""); err != nil {
+ return n, err
+ }
+ if len(out) == 0 {
+ return n, nil
+ }
+ n += copy(data[n:], out)
+ // Stop at short read.
+ if len(out) < bytesToRead {
+ return n, nil
+ }
+ }
+ return n, nil
+}
+
+// Read reads data from the internally held offset in the File.
+func (f *File) Read(data []byte) (int, error) {
+ return f.read(data, -1)
+}
+
+// ReadAt reads data at an offset in a File.
+func (f *File) ReadAt(data []byte, off int64) (int, error) {
+ return f.read(data, off)
+}
+
+// write writes data to a file. If off == -1 then the write occurs at
+// whatever the seek offset is.
+func (f *File) write(data []byte, off int64) (int, error) {
+ n := 0
+ for n < len(data) {
+ bytesToWrite := int(io.MaxBuf)
+ if len(data)-n < int(io.MaxBuf) {
+ bytesToWrite = len(data) - n
+ }
+ var status int32
+ var written uint64
+ var err error
+ if off == -1 {
+ status, written, err = f.fileInterface().Write(
+ context.Background(),
+ data[n:][:bytesToWrite],
+ )
+ } else {
+ status, written, err = f.fileInterface().WriteAt(
+ context.Background(),
+ data[n:][:bytesToWrite],
+ uint64(int64(n)+off),
+ )
+ }
+ if err := zxStatusToError(status, err, ""); err != nil {
+ return n, err
+ }
+ n += int(written)
+ // Error on a short write.
+ if int(written) < bytesToWrite {
+ return n, &zx.Error{Status: zx.ErrIO, Text: "io.file"}
+ }
+ }
+ return n, nil
+}
+
+// Write writes data at the internally held offset in the File.
+func (f *File) Write(data []byte) (int, error) {
+ return f.write(data, -1)
+}
+
+// WriteAt writes data at an offset in a File.
+func (f *File) WriteAt(data []byte, off int64) (int, error) {
+ return f.write(data, off)
+}
+
+// Seek moves the read/write head offset of the File.
+func (f *File) Seek(offset int64, whence int) (int64, error) {
+ status, off, err := f.fileInterface().Seek(context.Background(), offset, io.SeekOrigin(whence))
+ if err := zxStatusToError(status, err, "io.file.Seek"); err != nil {
+ return -1, err
+ }
+ return int64(off), nil
+}
+
+// Truncate truncates a File.
+func (f *File) Truncate(length uint64) error {
+ status, err := f.fileInterface().Truncate(context.Background(), length)
+ return zxStatusToError(status, err, "io.file.Truncate")
+}
diff --git a/src/syscall/zx/fdio/logger.go b/src/syscall/zx/fdio/logger.go
new file mode 100644
index 0000000..0901278
--- /dev/null
+++ b/src/syscall/zx/fdio/logger.go
@@ -0,0 +1,153 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on types that don't compile in not-Fuchsia.
+// +build fuchsia
+
+package fdio
+
+import (
+ "syscall/zx"
+ "syscall/zx/io"
+)
+
+// #define LOGBUF_MAX (ZX_LOG_RECORD_MAX - sizeof(zx_log_record_t))
+const logBufMax = 224
+
+type Logger struct {
+ log zx.Log
+ logBufferArray [logBufMax]byte
+ logBufferN int
+}
+
+func NewLogger(log zx.Log) *Logger {
+ return &Logger{log: log}
+}
+
+// Clone makes a clone of the object.
+func (f *Logger) Clone() (FDIO, error) {
+ logHandle := zx.Handle(f.log)
+ h, err := logHandle.Duplicate(zx.RightSameRights)
+ if err != nil {
+ return nil, err
+ }
+ return NewLogger(zx.Log(h)), nil
+}
+
+// Handle returns the underlying log handle as an untyped handle.
+func (f *Logger) Handles() []zx.Handle {
+ return []zx.Handle{zx.Handle(f.log)}
+}
+
+// Close closes the object.
+func (f *Logger) Close() error {
+ return f.log.Close()
+}
+
+// Sync implements FDIO for Logger.
+func (f *Logger) Sync() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// GetAttr implements FDIO for Logger.
+func (f *Logger) GetAttr() (io.NodeAttributes, error) {
+ return io.NodeAttributes{}, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// SetAttr implements FDIO for Logger.
+func (f *Logger) SetAttr(flags uint32, attr io.NodeAttributes) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// Read implements FDIO for Logger.
+func (f *Logger) Read(data []byte) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// ReadAt implements FDIO for Logger.
+func (f *Logger) ReadAt(data []byte, off int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// Write implements FDIO for Logger.
+func (f *Logger) Write(data []byte) (int, error) {
+ written := 0
+
+ for i := 0; i < len(data); i++ {
+ c := data[i]
+ written++
+
+ if c == '\n' {
+ _, err := f.log.Write(f.logBufferArray[:f.logBufferN])
+ f.logBufferN = 0
+ if err != nil {
+ return written, err
+ }
+ continue
+ }
+
+ if c < ' ' {
+ continue
+ }
+
+ f.logBufferArray[f.logBufferN] = c
+ f.logBufferN++
+
+ if f.logBufferN == len(f.logBufferArray) {
+ _, err := f.log.Write(f.logBufferArray[:f.logBufferN])
+ f.logBufferN = 0
+ if err != nil {
+ return written, err
+ }
+ }
+ }
+
+ return written, nil
+}
+
+// WriteAt implements FDIO for Logger.
+func (f *Logger) WriteAt(data []byte, off int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// Seek implements FDIO for Logger.
+func (f *Logger) Seek(offset int64, whence int) (int64, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// Truncate implements FDIO for Logger.
+func (f *Logger) Truncate(length uint64) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// Open implements FDIO for Logger.
+func (f *Logger) Open(path string, flags uint32, mode uint32) (FDIO, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// Link implements FDIO for Logger.
+func (f *Logger) Link(oldpath, newpath string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// Rename implements FDIO for Logger.
+func (f *Logger) Rename(oldpath, newpath string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// Unlink implements FDIO for Logger.
+func (f *Logger) Unlink(path string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// ReadDirents implements FDIO for Logger.
+func (f *Logger) ReadDirents(max uint64) ([]byte, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
+
+// Rewind implements FDIO for Logger.
+func (f *Logger) Rewind() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.logger"}
+}
diff --git a/src/syscall/zx/fdio/namespace.go b/src/syscall/zx/fdio/namespace.go
new file mode 100644
index 0000000..7e1d2ff
--- /dev/null
+++ b/src/syscall/zx/fdio/namespace.go
@@ -0,0 +1,380 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on types that don't compile in not-Fuchsia.
+// +build fuchsia
+
+package fdio
+
+import (
+ "sync"
+ "syscall/zx"
+ "syscall/zx/internal/context"
+ "syscall/zx/io"
+)
+
+type NS struct {
+ mu sync.Mutex
+ m map[string]zx.Handle
+}
+
+func NewNS() *NS {
+ return &NS{m: make(map[string]zx.Handle)}
+}
+
+func NewNSFromMap(m map[string]zx.Handle) (*NS, error) {
+ if m == nil {
+ return nil, &zx.Error{Status: zx.ErrInvalidArgs, Text: "namespace.NewFromNSMAP"}
+ }
+ ns := &NS{m: make(map[string]zx.Handle)}
+ for k, v := range m {
+ ns.m[k] = v
+ }
+ return ns, nil
+}
+
+func (ns *NS) Bind(p string, h zx.Handle) {
+ ns.mu.Lock()
+ ns.m[p] = h
+ ns.mu.Unlock()
+}
+
+func (ns *NS) Connect(p string, h zx.Handle) error {
+ if p[0] != '/' {
+ h.Close()
+ return &zx.Error{Status: zx.ErrNotFound, Text: "namespace.Connect"}
+ }
+ node := p
+ for {
+ ns.mu.Lock()
+ svcHandle := ns.m[node]
+ ns.mu.Unlock()
+ if svcHandle.IsValid() {
+ rest := trimPrefix(p, node)
+ rest = trimPrefix(rest, "/")
+ return ServiceConnectAt(svcHandle, rest, h)
+ }
+ if node == "/" {
+ break
+ }
+ node = pathDir(node)
+ }
+ h.Close()
+ return &zx.Error{Status: zx.ErrNotFound, Text: "namespace.Connect"}
+}
+
+func (ns *NS) OpenRoot() (FDIO, error) {
+ root := &vnode{}
+ ns.mu.Lock()
+ defer ns.mu.Unlock()
+ for path, h := range ns.m {
+ if path == "" || path[0] != '/' {
+ return nil, &zx.Error{Status: zx.ErrBadPath, Text: "fdio.OpenRoot"}
+ }
+ vn := root
+ path = path[1:]
+ for path != "" {
+ name, remaining := pathSplitForward(path)
+ vn = vn.getOrAddChild(name)
+ path = remaining
+ }
+ if vn.remote.IsValid() {
+ return nil, &zx.Error{Status: zx.ErrAlreadyExists, Text: "fdio.OpenRoot"}
+ }
+ vn.remote = Directory{Node: Node{NodeWithCtxInterface: &io.NodeWithCtxInterface{Channel: zx.Channel(h)}}}
+ }
+ return &dir{root}, nil
+}
+
+// vnode is a virtual node in the namespace "filesystem".
+type vnode struct {
+ child *vnode
+ parent *vnode
+ next *vnode
+ remote Directory
+ name string
+}
+
+func (vn *vnode) getOrAddChild(name string) *vnode {
+ child := vn.getChild(name)
+ if child == nil {
+ child = &vnode{
+ parent: vn,
+ next: vn.child,
+ name: name,
+ }
+ vn.child = child
+ }
+ return child
+}
+
+func (vn *vnode) getChild(name string) *vnode {
+ for vn = vn.child; vn != nil; vn = vn.next {
+ if vn.name == name {
+ return vn
+ }
+ }
+ return nil
+}
+
+// dir represents a directory in the namespace.
+type dir struct {
+ vn *vnode
+}
+
+// Handle returns the underlying handle as an untyped handle.
+func (d *dir) Handles() []zx.Handle {
+ return d.vn.remote.Handles()
+}
+
+// Clone makes a clone of the dir, if possible.
+func (d *dir) Clone() (FDIO, error) {
+ if !d.vn.remote.IsValid() {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+ }
+ return d.vn.remote.Clone()
+}
+
+// Close closes the dir.
+func (d *dir) Close() error {
+ if !d.vn.remote.IsValid() {
+ return nil
+ }
+ return d.vn.remote.Close()
+}
+
+// Sync implements FDIO for dir.
+func (d *dir) Sync() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+}
+
+// GetAttr implements FDIO for dir.
+func (d *dir) GetAttr() (io.NodeAttributes, error) {
+ return io.NodeAttributes{
+ Mode: uint32(io.ModeTypeDirectory) | uint32(VtypeIRUSR),
+ Id: 1,
+ LinkCount: 1,
+ }, nil
+}
+
+// SetAttr implements FDIO for dir.
+func (d *dir) SetAttr(flags uint32, attr io.NodeAttributes) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+}
+
+func (d *dir) Read(data []byte) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.dir"}
+}
+
+func (d *dir) ReadAt(data []byte, off int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.dir"}
+}
+
+func (d *dir) Write(data []byte) (n int, err error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.dir"}
+}
+
+func (d *dir) WriteAt(data []byte, off int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.dir"}
+}
+
+func (d *dir) Seek(offset int64, whence int) (int64, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.dir"}
+}
+
+// Truncate implements FDIO for dir.
+func (d *dir) Truncate(length uint64) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+}
+
+func (d *dir) getVnode(path string) (vn *vnode, rpath string, isRemote bool, err error) {
+ vn = d.vn
+
+ if path == "." || path == "" {
+ if vn.remote.IsValid() {
+ return vn, ".", true, nil
+ }
+ return vn, "", false, nil
+ }
+
+ originalPath := path
+
+ var savedVn *vnode
+ var savedPath string
+
+ for {
+ name, remaining := pathSplitForward(path)
+
+ if name == "" {
+ return nil, "", false, &zx.Error{Status: zx.ErrBadPath, Text: path}
+ }
+
+ child := vn.getChild(name)
+
+ if child != nil {
+ if remaining == "" {
+ // We've resolved all the path segments and found the vnode we're
+ // looking for.
+ if child.remote.IsValid() {
+ return child, ".", true, nil
+ } else {
+ return child, "", false, nil
+ }
+ } else {
+ // We've got more path to resolve.
+ vn = child
+ path = remaining
+
+ // If this child has a remote file system, we might hand off to
+ // this remote if we don't find anything more specific below
+ // this vnode.
+ if child.remote.IsValid() {
+ savedVn = vn
+ savedPath = path
+ }
+
+ continue
+ }
+ }
+
+ // We've reached the end of our local vnode structure with more
+ // path to resolve.
+
+ if vn.remote.IsValid() {
+ // We've got a remote file system at this vnode. We can hand off
+ // directly to that file system.
+ return vn, path, true, nil
+ }
+
+ // We saw a remote file system earlier in our walk that might have this
+ // path. Let's hand off to it.
+ if savedVn != nil {
+ return savedVn, savedPath, true, nil
+ }
+
+ // There is no remote file system to resolve the path against,
+ // which means we failed to find what we were looking for.
+ return nil, "", false, &zx.Error{Status: zx.ErrNotFound, Text: originalPath}
+ }
+}
+
+// Open implements FDIO for dir.
+func (d *dir) Open(pathname string, flags uint32, mode uint32) (FDIO, error) {
+ vn, relp, isRemote, err := d.getVnode(pathname)
+ if err != nil {
+ return nil, err
+ }
+ if isRemote {
+ return vn.remote.Open(relp, flags, mode)
+ }
+ return &dir{vn}, nil
+}
+
+func (d *dir) openParent(pathname string) (FDIO, string, error) {
+ dirpath, name := pathSplit(pathname)
+ parent, err := d.Open(
+ pathDir(dirpath),
+ io.OpenRightReadable|io.OpenFlagDirectory|io.OpenFlagPosix,
+ S_IFDIR)
+ if err != nil {
+ return nil, "", err
+ }
+ return parent, name, err
+}
+
+// Link implements FDIO for dir.
+func (d *dir) Link(oldpath, newpath string) error {
+ oldparent, oldname, err := d.openParent(oldpath)
+ if err != nil {
+ return err
+ }
+ defer oldparent.Close()
+ newparent, newname, err := d.openParent(newpath)
+ if err != nil {
+ return err
+ }
+ defer newparent.Close()
+ olddir, ok := oldparent.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+ }
+ newdir, ok := newparent.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+ }
+ token, err := newdir.getToken()
+ if err != nil {
+ return err
+ }
+ status, err := olddir.directoryInterface().Link(context.Background(), oldname, token, newname)
+ if err != nil {
+ return err
+ } else if zx.Status(status) != zx.ErrOk {
+ return &zx.Error{Status: zx.Status(status), Text: "fdio.ns.dir"}
+ }
+ return nil
+}
+
+// Rename implements FDIO for dir.
+func (d *dir) Rename(oldpath, newpath string) error {
+ oldf, oldname, err := d.openParent(oldpath)
+ if err != nil {
+ return err
+ }
+ defer oldf.Close()
+ newf, newname, err := d.openParent(newpath)
+ if err != nil {
+ return err
+ }
+ defer newf.Close()
+ olddir, ok := oldf.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+ }
+ newdir, ok := newf.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+ }
+ token, err := newdir.getToken()
+ if err != nil {
+ return err
+ }
+ status, err := olddir.directoryInterface().Rename(context.Background(), oldname, token, newname)
+ if err != nil {
+ return err
+ } else if zx.Status(status) != zx.ErrOk {
+ return &zx.Error{Status: zx.Status(status), Text: "fdio.ns.dir"}
+ }
+ return nil
+}
+
+// Unlink implements FDIO for dir.
+func (d *dir) Unlink(pathname string) error {
+ parent, name, err := d.openParent(pathname)
+ if err != nil {
+ return err
+ }
+ defer parent.Close()
+ parentdir, ok := parent.(*Directory)
+ if !ok {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+ }
+ if status, err := parentdir.directoryInterface().Unlink(context.Background(), name); err != nil {
+ return err
+ } else if zx.Status(status) != zx.ErrOk {
+ return &zx.Error{Status: zx.Status(status), Text: "fdio.ns.dir"}
+ }
+ return nil
+}
+
+// ReadDirents implements FDIO for dir.
+func (d *dir) ReadDirents(max uint64) ([]byte, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+}
+
+// Rewind implements FDIO for dir.
+func (d *dir) Rewind() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.ns.dir"}
+}
diff --git a/src/syscall/zx/fdio/node.go b/src/syscall/zx/fdio/node.go
new file mode 100644
index 0000000..aa6746c
--- /dev/null
+++ b/src/syscall/zx/fdio/node.go
@@ -0,0 +1,236 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on types that don't compile in not-Fuchsia.
+// +build fuchsia
+
+package fdio
+
+import (
+ "syscall/zx"
+ "syscall/zx/fidl"
+ "syscall/zx/internal/context"
+ "syscall/zx/io"
+)
+
+func zxStatusToError(status int32, err error, text string) error {
+ if err != nil {
+ return err
+ }
+ if zx.Status(status) != zx.ErrOk {
+ return &zx.Error{Status: zx.Status(status), Text: text}
+ }
+ return nil
+}
+
+type multiError struct {
+ err1 error
+ err2 error
+ string1 string
+ string2 string
+}
+
+func newMultiError(err1 error, string1 string, err2 error, string2 string) error {
+ if err1 == nil && err2 == nil {
+ return nil
+ }
+ if err1 != nil && err2 == nil {
+ return err1
+ }
+ if err1 == nil && err2 != nil {
+ return err2
+ }
+ return &multiError{
+ err1: err1,
+ err2: err2,
+ string1: string1,
+ string2: string2,
+ }
+}
+
+func (err *multiError) Error() string {
+ var errStr string
+ if e := err.err1; e != nil {
+ errStr += err.string1 + "=" + e.Error()
+ }
+ if e := err.err2; e != nil {
+ errStr += err.string2 + "=" + e.Error()
+ }
+ return errStr
+}
+
+func nodeFromInfo(info *io.NodeInfo, node *io.NodeWithCtxInterface) (result FDIO, err error) {
+ if info == nil {
+ if err = ((*fidl.ChannelProxy)(node)).Channel.Close(); err != nil {
+ return nil, err
+ }
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+ }
+ switch info.Which() {
+ case io.NodeInfoService:
+ // TODO(mknyszek): Figure out the correct type to return here.
+ result = &Node{NodeWithCtxInterface: node}
+ case io.NodeInfoFile:
+ result = NewFileWithCtx((*io.FileWithCtxInterface)(node), info.File.Event)
+ case io.NodeInfoDevice:
+ // TODO(35068): Figure out the correct representation of info.Device.Event.
+ result = NewFileWithCtx((*io.FileWithCtxInterface)(node), zx.Event(info.Device.Event))
+ case io.NodeInfoDirectory:
+ result = NewDirectoryWithCtx((*io.DirectoryAdminWithCtxInterface)(node))
+ case io.NodeInfoPipe:
+ if err = ((*fidl.ChannelProxy)(node)).Channel.Close(); err != nil {
+ return nil, err
+ }
+ result = NewPipe(info.Pipe.Socket)
+ case io.NodeInfoVmofile:
+ if err = ((*fidl.ChannelProxy)(node)).Channel.Close(); err != nil {
+ return nil, err
+ }
+ result, err = NewVMOFile(info.Vmofile.Vmo, info.Vmofile.Offset, info.Vmofile.Length)
+ if err != nil {
+ return nil, err
+ }
+ default:
+ if err = ((*fidl.ChannelProxy)(node)).Channel.Close(); err != nil {
+ return nil, err
+ }
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+ }
+ return result, nil
+}
+
+var _ FDIO = (*Node)(nil)
+
+// Node is a wrapper around an NodeWithCtxInterface which implements FDIO.
+type Node struct {
+ *io.NodeWithCtxInterface
+}
+
+// IsValid returns true if the Node is valid.
+func (n *Node) IsValid() bool {
+ if n.NodeWithCtxInterface == nil {
+ return false
+ }
+ return ((*fidl.ChannelProxy)(n.NodeWithCtxInterface)).IsValid()
+}
+
+// Handles returns a slice of untyped zx handles containing the underlying
+// channel of the Node.
+func (n *Node) Handles() []zx.Handle {
+ return []zx.Handle{
+ zx.Handle(((*fidl.ChannelProxy)(n.NodeWithCtxInterface)).Channel),
+ }
+}
+
+// Clone makes a clone of the node.
+func (n *Node) Clone() (FDIO, error) {
+ req, newNode, err := io.NewNodeWithCtxInterfaceRequest()
+ if err != nil {
+ return nil, err
+ }
+ cloneFlag := io.CloneFlagSameRights | io.OpenFlagDescribe
+ fdio, err := func() (FDIO, error) {
+ if err := n.NodeWithCtxInterface.Clone(context.Background(), cloneFlag, req); err != nil {
+ return nil, err
+ }
+ status, info, err := newNode.ExpectOnOpen(context.Background())
+ if err := zxStatusToError(status, err, "io.node.Clone"); err != nil {
+ return nil, err
+ }
+ return nodeFromInfo(info, newNode)
+ }()
+ if err != nil {
+ return nil, newMultiError(((*fidl.ChannelProxy)(newNode)).Close(), "closeErr", err, "innerErr")
+ }
+ return fdio, nil
+}
+
+// Close closes the node.
+func (n *Node) Close() error {
+ status, err := n.NodeWithCtxInterface.Close(context.Background())
+ channelErr := ((*fidl.ChannelProxy)(n.NodeWithCtxInterface)).Close()
+ return newMultiError(zxStatusToError(status, err, "io.node.Close"), "fidlErr", channelErr, "channelErr")
+}
+
+// Sync performs a sync operation on a Node.
+func (n *Node) Sync() error {
+ status, err := n.NodeWithCtxInterface.Sync(context.Background())
+ return zxStatusToError(status, err, "io.node.Sync")
+}
+
+// GetAttr returns the attributes for the Node.
+func (n *Node) GetAttr() (io.NodeAttributes, error) {
+ status, attrs, err := n.NodeWithCtxInterface.GetAttr(context.Background())
+ if err := zxStatusToError(status, err, "io.node.GetAttr"); err != nil {
+ return io.NodeAttributes{}, err
+ }
+ return attrs, nil
+}
+
+// SetAttr sets the attributes for Node as defined by flags.
+func (n *Node) SetAttr(flags uint32, attr io.NodeAttributes) error {
+ status, err := n.NodeWithCtxInterface.SetAttr(context.Background(), flags, attr)
+ return zxStatusToError(status, err, "io.node.SetAttr")
+}
+
+// Read implements FDIO for Node.
+func (n *Node) Read(data []byte) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// ReadAt implements FDIO for Node.
+func (n *Node) ReadAt(data []byte, off int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// Write implements FDIO for Node.
+func (n *Node) Write(data []byte) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// WriteAt implements FDIO for Node.
+func (n *Node) WriteAt(data []byte, off int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// Seek implements FDIO for Node.
+func (n *Node) Seek(offset int64, whence int) (int64, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// Truncate implements FDIO for Node.
+func (n *Node) Truncate(length uint64) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// Open implements FDIO for Node.
+func (n *Node) Open(path string, flags uint32, mode uint32) (FDIO, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// Link implements FDIO for Node.
+func (n *Node) Link(oldpath, newpath string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// Rename implements FDIO for Node.
+func (n *Node) Rename(oldpath, newpath string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// Unlink implements FDIO for Node.
+func (n *Node) Unlink(path string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// ReadDirents implements FDIO for Node.
+func (n *Node) ReadDirents(max uint64) ([]byte, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
+
+// Rewind implements FDIO for Node.
+func (n *Node) Rewind() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "io.node"}
+}
diff --git a/src/syscall/zx/fdio/path.go b/src/syscall/zx/fdio/path.go
new file mode 100644
index 0000000..43769e3
--- /dev/null
+++ b/src/syscall/zx/fdio/path.go
@@ -0,0 +1,167 @@
+// 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.
+//
+// This file contains implementations of various path functions we need to support
+// without importing the path or strings packages.
+
+package fdio
+
+import "internal/bytealg"
+
+// pathSplitForward has special path splitting semantics for vnode / service connect.
+// It differs from path.Split primarily in that it begins searching for path
+// separators from the front of the path, as opposed to from the back. The
+// semantics for various other path types also differ:
+// * Rooted paths, or paths not containing a file name (i.e. slash is the last
+// character in the path) results in empty strings returned for directory and
+// file.
+// * Paths containing no slash return the whole path as the directory.
+func pathSplitForward(path string) (dir, file string) {
+ slash := bytealg.IndexByte([]byte(path), '/')
+ if slash == 0 || slash == len(path)-1 {
+ return "", ""
+ } else if slash == -1 {
+ return path, ""
+ } else {
+ return path[:slash], path[slash+1:]
+ }
+}
+
+// pathSplit is an implementation of path.Split that additionally implements
+// strings.LastIndex to avoid a dependency on both the path and strings
+// package.
+func pathSplit(path string) (dir, file string) {
+ var i int
+ for i = len(path) - 1; i >= 0; i-- {
+ if path[i] == '/' {
+ break
+ }
+ }
+
+ return path[:i+1], path[i+1:]
+}
+
+// pathDir is an implementation of path.Dir.
+func pathDir(path string) string {
+ dir, _ := pathSplit(path)
+ return pathClean(dir)
+}
+
+// trimPrefix is an implementation of strings.TrimPrefix.
+func trimPrefix(path, prefix string) string {
+ if path[:len(prefix)] == prefix {
+ return path[len(prefix):]
+ }
+ return path
+}
+
+// The following is copied verbatim from the path package to implement
+// path.Clean. This is done to avoid a dependency on the path package,
+// though it is unfortunate to have the code duplicated.
+
+// A lazybuf is a lazily constructed path buffer.
+// It supports append, reading previously appended bytes,
+// and retrieving the final string. It does not allocate a buffer
+// to hold the output until that output diverges from s.
+type lazybuf struct {
+ s string
+ buf []byte
+ w int
+}
+
+func (b *lazybuf) index(i int) byte {
+ if b.buf != nil {
+ return b.buf[i]
+ }
+ return b.s[i]
+}
+
+func (b *lazybuf) append(c byte) {
+ if b.buf == nil {
+ if b.w < len(b.s) && b.s[b.w] == c {
+ b.w++
+ return
+ }
+ b.buf = make([]byte, len(b.s))
+ copy(b.buf, b.s[:b.w])
+ }
+ b.buf[b.w] = c
+ b.w++
+}
+
+func (b *lazybuf) string() string {
+ if b.buf == nil {
+ return b.s[:b.w]
+ }
+ return string(b.buf[:b.w])
+}
+
+// pathClean is copied verbatim from path.Clean.
+func pathClean(path string) string {
+ if path == "" {
+ return "."
+ }
+
+ rooted := path[0] == '/'
+ n := len(path)
+
+ // Invariants:
+ // reading from path; r is index of next byte to process.
+ // writing to buf; w is index of next byte to write.
+ // dotdot is index in buf where .. must stop, either because
+ // it is the leading slash or it is a leading ../../.. prefix.
+ out := lazybuf{s: path}
+ r, dotdot := 0, 0
+ if rooted {
+ out.append('/')
+ r, dotdot = 1, 1
+ }
+
+ for r < n {
+ switch {
+ case path[r] == '/':
+ // empty path element
+ r++
+ case path[r] == '.' && (r+1 == n || path[r+1] == '/'):
+ // . element
+ r++
+ case path[r] == '.' && path[r+1] == '.' && (r+2 == n || path[r+2] == '/'):
+ // .. element: remove to last /
+ r += 2
+ switch {
+ case out.w > dotdot:
+ // can backtrack
+ out.w--
+ for out.w > dotdot && out.index(out.w) != '/' {
+ out.w--
+ }
+ case !rooted:
+ // cannot backtrack, but not rooted, so append .. element.
+ if out.w > 0 {
+ out.append('/')
+ }
+ out.append('.')
+ out.append('.')
+ dotdot = out.w
+ }
+ default:
+ // real path element.
+ // add slash if needed
+ if rooted && out.w != 1 || !rooted && out.w != 0 {
+ out.append('/')
+ }
+ // copy element
+ for ; r < n && path[r] != '/'; r++ {
+ out.append(path[r])
+ }
+ }
+ }
+
+ // Turn empty string into "."
+ if out.w == 0 {
+ return "."
+ }
+
+ return out.string()
+}
diff --git a/src/syscall/zx/fdio/pipe.go b/src/syscall/zx/fdio/pipe.go
new file mode 100644
index 0000000..088f106
--- /dev/null
+++ b/src/syscall/zx/fdio/pipe.go
@@ -0,0 +1,165 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on zxwait, which doesn't compile in not-Fuchsia.
+// +build fuchsia
+
+package fdio
+
+import (
+ "syscall/zx"
+ "syscall/zx/io"
+ "syscall/zx/zxwait"
+)
+
+type Pipe struct {
+ s zx.Socket
+}
+
+func NewPipes() (*Pipe, *Pipe, error) {
+ s0, s1, err := zx.NewSocket(0)
+ if err != nil {
+ return nil, nil, err
+ }
+ return &Pipe{s0}, &Pipe{s1}, nil
+}
+
+func NewPipe(s zx.Socket) *Pipe {
+ return &Pipe{s}
+}
+
+func (f *Pipe) Wait(signals zx.Signals, timeout zx.Time) (observed zx.Signals, err error) {
+ return zxwait.Wait(zx.Handle(f.s), signals, timeout)
+}
+
+func (f *Pipe) Handles() []zx.Handle {
+ return []zx.Handle{zx.Handle(f.s)}
+}
+
+func (f *Pipe) Clone() (FDIO, error) {
+ h, err := f.s.Handle().Duplicate(zx.RightSameRights)
+ if err != nil {
+ return nil, err
+ }
+ return NewPipe(zx.Socket(h)), nil
+}
+
+func (f *Pipe) Close() error {
+ if err := f.s.Close(); err != nil {
+ return err
+ }
+ f.s = zx.Socket(zx.HandleInvalid)
+ return nil
+}
+
+func (f *Pipe) Sync() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) GetAttr() (io.NodeAttributes, error) {
+ return io.NodeAttributes{}, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) SetAttr(flags uint32, attr io.NodeAttributes) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) Read(data []byte) (int, error) {
+ for {
+ n, err := f.s.Read(data, 0)
+ if err != nil {
+ if err, ok := err.(*zx.Error); ok {
+ switch err.Status {
+ case zx.ErrPeerClosed:
+ return 0, zx.EOF
+ case zx.ErrShouldWait:
+ pending, err := f.Wait(zx.SignalSocketReadable|zx.SignalSocketPeerClosed, zx.TimensecInfinite)
+ if err != nil {
+ return 0, err
+ }
+ if pending&zx.SignalSocketReadable != 0 {
+ continue
+ }
+ if pending&zx.SignalSocketPeerClosed != 0 {
+ return 0, zx.EOF
+ }
+ // impossible
+ return 0, &zx.Error{Status: zx.ErrInternal, Text: "fdio.Pipe"}
+ }
+ }
+ return 0, err
+ }
+ return n, nil
+ }
+}
+
+func (f *Pipe) ReadAt(data []byte, off int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) Write(data []byte) (int, error) {
+ for {
+ n, err := f.s.Write(data, 0)
+ if err != nil {
+ if err, ok := err.(*zx.Error); ok {
+ switch err.Status {
+ case zx.ErrPeerClosed:
+ return 0, zx.EPIPE
+ case zx.ErrShouldWait:
+ pending, err := f.Wait(zx.SignalSocketWritable|zx.SignalSocketPeerClosed, zx.TimensecInfinite)
+ if err != nil {
+ return 0, err
+ }
+ if pending&zx.SignalSocketWritable != 0 {
+ continue
+ }
+ if pending&zx.SignalSocketPeerClosed != 0 {
+ return 0, zx.EPIPE
+ }
+ // impossible
+ return 0, &zx.Error{Status: zx.ErrInternal, Text: "fdio.Pipe"}
+ }
+ }
+ return 0, err
+ }
+ return n, nil
+ }
+}
+
+func (f *Pipe) WriteAt(data []byte, off int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) Seek(offset int64, whence int) (int64, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) Truncate(length uint64) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) Open(path string, flags uint32, mode uint32) (FDIO, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) Link(oldpath, newpath string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) Rename(oldpath, newpath string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) Unlink(path string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) ReadDirents(max uint64) ([]byte, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
+
+func (f *Pipe) Rewind() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.Pipe"}
+}
diff --git a/src/syscall/zx/fdio/vmo.go b/src/syscall/zx/fdio/vmo.go
new file mode 100644
index 0000000..f151e51
--- /dev/null
+++ b/src/syscall/zx/fdio/vmo.go
@@ -0,0 +1,159 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on types that don't compile in not-Fuchsia.
+// +build fuchsia
+
+package fdio
+
+import (
+ "syscall/zx"
+ "syscall/zx/io"
+)
+
+type VMOFile struct {
+ h zx.VMO
+ off int64
+ len int64
+ end int64
+ at int64
+}
+
+func NewVMOFile(handle zx.VMO, offset uint64, length uint64) (*VMOFile, error) {
+ // fdio_vmofile_create
+ f := &VMOFile{
+ h: handle,
+ off: int64(offset),
+ len: int64(length),
+ }
+ f.end = f.off + f.len
+ f.at = f.off
+ return f, nil
+}
+
+func (f *VMOFile) Handles() []zx.Handle {
+ return []zx.Handle{zx.Handle(f.h)}
+}
+
+func (f *VMOFile) Clone() (FDIO, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) Close() error {
+ if err := f.h.Close(); err != nil {
+ return err
+ }
+ f.h = 0
+ return nil
+}
+
+func (f *VMOFile) Sync() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) GetAttr() (io.NodeAttributes, error) {
+ return io.NodeAttributes{
+ ContentSize: uint64(f.len),
+ StorageSize: uint64(f.len),
+ Mode: uint32(io.ModeTypeFile) | uint32(VtypeIRUSR),
+ }, nil
+}
+
+func (f *VMOFile) SetAttr(flags uint32, attr io.NodeAttributes) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) Read(data []byte) (n int, err error) {
+ if int64(len(data)) > f.end-f.at {
+ data = data[:f.end-f.at]
+ err = zx.EOF
+ }
+ if len(data) == 0 {
+ return 0, err
+ }
+ if err2 := f.h.Read(data, uint64(f.at)); err2 != nil {
+ return 0, err2
+ }
+ n = len(data)
+ f.at += int64(n)
+ return
+}
+
+func (f *VMOFile) ReadAt(data []byte, off int64) (n int, err error) {
+ if off < 0 {
+ return 0, &zx.Error{Status: zx.ErrInvalidArgs, Text: "fdio.VMOFile.ReadAt"}
+ }
+ if off >= f.end {
+ return 0, zx.EOF
+ }
+ if len(data) == 0 {
+ return 0, zx.EOF
+ }
+ n = len(data)
+ max := int(f.end - off)
+ if max < n {
+ n = max
+ err = zx.EOF
+ }
+ data = data[:n]
+ if err2 := f.h.Read(data, uint64(off)); err2 != nil {
+ return 0, err2
+ }
+ return
+}
+
+func (f *VMOFile) Write(data []byte) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) WriteAt(data []byte, off int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) Seek(offset int64, whence int) (int64, error) {
+ var at int64
+ switch whence {
+ case 0: // SEEK_SET
+ at = offset
+ case 1: // SEEK_CUR
+ at = f.at - f.off + offset
+ case 2: // SEEK_END
+ at = f.end - f.off + offset
+ }
+
+ if at > f.end-f.off {
+ return 0, &zx.Error{Status: zx.ErrOutOfRange, Text: "fdio.VMOFile"}
+ }
+ f.at = f.off + at
+ return at, nil
+}
+
+func (f *VMOFile) Truncate(length uint64) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) Open(path string, flags uint32, mode uint32) (FDIO, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) Link(oldpath, newpath string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) Rename(oldpath, newpath string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) Unlink(path string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) ReadDirents(max uint64) ([]byte, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
+
+func (f *VMOFile) Rewind() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "fdio.VMOFile"}
+}
diff --git a/src/syscall/zx/fidl/context.go b/src/syscall/zx/fidl/context.go
new file mode 100644
index 0000000..584d777
--- /dev/null
+++ b/src/syscall/zx/fidl/context.go
@@ -0,0 +1,26 @@
+// 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 fidl
+
+import (
+ "syscall/zx/internal/context"
+)
+
+type Context = context.Context
+
+type marshalerContextKey struct{}
+
+// GetMarshalerContext returns the MarshalerContext stored on ctx if it exists;
+// otherwise the bool return value will be false.
+func GetMarshalerContext(ctx Context) (MarshalerContext, bool) {
+ marshalerCtx, ok := ctx.Value(marshalerContextKey{}).(MarshalerContext)
+ return marshalerCtx, ok
+}
+
+// WithMarshalerContext returns a Context that embeds parent and stores
+// marshalerCtx.
+func WithMarshalerContext(parent Context, marshalerCtx MarshalerContext) Context {
+ return context.WithValue(parent, marshalerContextKey{}, marshalerCtx)
+}
diff --git a/src/syscall/zx/fidl/ctx_and_header.go b/src/syscall/zx/fidl/ctx_and_header.go
new file mode 100644
index 0000000..99ad64c
--- /dev/null
+++ b/src/syscall/zx/fidl/ctx_and_header.go
@@ -0,0 +1,57 @@
+// 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 fidl
+
+const FidlWireFormatMagicNumberInitial = 1
+
+// MarshalerContext stores flags to control marshaling/unmarshaling.
+//
+// This is currently empty. We keep it around to ease the implementation of
+// context-dependent behavior for future migrations.
+type MarshalerContext struct{}
+
+// newCtx returns the default context.
+// During migrations, this controls the default write path.
+func newCtx() MarshalerContext {
+ return MarshalerContext{}
+}
+
+// MessageHeader represents a transactional message header.
+type MessageHeader struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Txid uint32 `fidl:"0" fidl_offset_v1:"0" fidl_bounds:""`
+ Flags [3]uint8 `fidl:"4" fidl_offset_v1:"4" fidl_bounds:""`
+ Magic uint8 `fidl:"7" fidl_offset_v1:"7" fidl_bounds:""`
+ Ordinal uint64 `fidl:"8" fidl_offset_v1:"8" fidl_bounds:""`
+}
+
+func (msg *MessageHeader) IsSupportedVersion() bool {
+ return msg.Magic == FidlWireFormatMagicNumberInitial
+}
+
+// NewCtx creates a new MarshalerContext for unmarshaling based on msg.Flags.
+// During migrations, this controls dynamic behavior in the read path.
+func (msg *MessageHeader) NewCtx() MarshalerContext {
+ return newCtx()
+}
+
+var mMessageHeader = MustCreateMarshaler(MessageHeader{})
+
+var MessageHeaderSize = 16
+
+func (msg *MessageHeader) Marshaler() Marshaler {
+ return mMessageHeader
+}
+
+// NewHeader create a new MessageHeader for marshaling with the correct flags
+// set based on the MarshalerContext. It is the caller's responsibilty to set
+// the transaction ID and method ordinal
+func (ctx MarshalerContext) NewHeader() MessageHeader {
+ header := MessageHeader{
+ Flags: [3]uint8{0, 0, 0},
+ Magic: FidlWireFormatMagicNumberInitial,
+ }
+ return header
+}
diff --git a/src/syscall/zx/fidl/debug_util.go b/src/syscall/zx/fidl/debug_util.go
new file mode 100644
index 0000000..cfbfa74
--- /dev/null
+++ b/src/syscall/zx/fidl/debug_util.go
@@ -0,0 +1,177 @@
+// 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 fidl
+
+import (
+ "errors"
+ "reflect"
+ "strconv"
+ "strings"
+)
+
+// Usage: printf("abc {} def {} ...", 3, X{4})
+func printf(format string, args ...interface{}) {
+ print(sprintf(format, args...))
+}
+
+func errorf(format string, args ...interface{}) error {
+ return errors.New(sprintf(format, args...))
+}
+
+func sprintf(format string, args ...interface{}) string {
+ var argStrs []string
+ for _, arg := range args {
+ argStrs = append(argStrs, buildValueString(reflect.ValueOf(arg)))
+ }
+ parts := strings.Split(format, "{}")
+ argIndex := 0
+ strIndex := 0
+ out := ""
+ for strIndex < len(parts) {
+ if argIndex >= strIndex {
+ out += parts[strIndex]
+ strIndex++
+ } else {
+ out += argStrs[argIndex]
+ argIndex++
+ }
+ }
+ return out
+}
+
+func buildTypeString(rt reflect.Type) string {
+ switch rt.Kind() {
+ case reflect.Bool:
+ fallthrough
+ case reflect.Int:
+ fallthrough
+ case reflect.Int8:
+ fallthrough
+ case reflect.Int16:
+ fallthrough
+ case reflect.Int32:
+ fallthrough
+ case reflect.Int64:
+ fallthrough
+ case reflect.Uint:
+ fallthrough
+ case reflect.Uint8:
+ fallthrough
+ case reflect.Uint16:
+ fallthrough
+ case reflect.Uint32:
+ fallthrough
+ case reflect.Uint64:
+ fallthrough
+ case reflect.Uintptr:
+ fallthrough
+ case reflect.Float32:
+ fallthrough
+ case reflect.Float64:
+ fallthrough
+ case reflect.String:
+ return rt.Kind().String()
+ case reflect.Array:
+ return "[" + strconv.FormatUint(uint64(rt.Size()), 10) + "]" + buildTypeString(rt.Elem())
+ case reflect.Slice:
+ return "[]" + buildTypeString(rt.Elem())
+ case reflect.Map:
+ return "[" + buildTypeString(rt.Key()) + "]" + buildTypeString(rt.Elem())
+ case reflect.Ptr:
+ return "*" + buildTypeString(rt.Elem())
+ case reflect.Interface:
+ fallthrough
+ case reflect.Struct:
+ return rt.Name()
+ case reflect.Complex64:
+ return "[complex64]"
+ case reflect.Complex128:
+ return "[complex128]"
+ case reflect.Chan:
+ return "[chan]"
+ case reflect.Func:
+ return "[func]"
+ case reflect.UnsafePointer:
+ return "[unsafeptr]"
+ default:
+ panic("unsupported type kind " + strconv.Itoa(int(rt.Kind())))
+ }
+}
+
+func buildValueString(rv reflect.Value) string {
+ switch rv.Kind() {
+ case reflect.Bool:
+ return strconv.FormatBool(rv.Bool())
+ case reflect.Int:
+ fallthrough
+ case reflect.Int8:
+ fallthrough
+ case reflect.Int16:
+ fallthrough
+ case reflect.Int32:
+ fallthrough
+ case reflect.Int64:
+ return strconv.FormatInt(rv.Int(), 10)
+ case reflect.Uint:
+ fallthrough
+ case reflect.Uint8:
+ fallthrough
+ case reflect.Uint16:
+ fallthrough
+ case reflect.Uint32:
+ fallthrough
+ case reflect.Uint64:
+ return strconv.FormatUint(rv.Uint(), 10)
+ case reflect.Uintptr:
+ return "0x" + strconv.FormatUint(rv.Uint(), 16)
+ case reflect.Float32:
+ fallthrough
+ case reflect.Float64:
+ return strconv.FormatFloat(rv.Float(), 'f', -1, 64)
+ case reflect.String:
+ return rv.String() // TODO quote the string
+ case reflect.Array:
+ fallthrough
+ case reflect.Slice:
+ var valueStrs []string
+ for i := 0; i < rv.Len(); i++ {
+ valueStrs = append(valueStrs, buildValueString(rv.Index(i)))
+ }
+ return buildTypeString(rv.Type()) + "{" + strings.Join(valueStrs, ", ") + "}"
+ case reflect.Map:
+ iter := rv.MapRange()
+ var itemStrs []string
+ for iter.Next() {
+ itemStrs = append(itemStrs, buildValueString(iter.Key())+": "+buildValueString(iter.Value()))
+ }
+ return buildTypeString(rv.Type()) + "{" + strings.Join(itemStrs, ", ") + "}"
+ case reflect.Interface:
+ fallthrough
+ case reflect.Ptr:
+ if rv.IsNil() {
+ return "nil"
+ } else {
+ return buildValueString(rv.Elem())
+ }
+ case reflect.Struct:
+ var itemStrs []string
+ for i := 0; i < rv.NumField(); i++ {
+ itemStrs = append(itemStrs, rv.Type().Field(i).Name+": "+buildValueString(rv.Field(i)))
+ }
+ return buildTypeString(rv.Type()) + "{" + strings.Join(itemStrs, ", ") + "}"
+ case reflect.Complex64:
+ return "[complex64]"
+ case reflect.Complex128:
+ return "[complex128]"
+ case reflect.Chan:
+ return "[chan]"
+ case reflect.Func:
+ return "[func]"
+ case reflect.UnsafePointer:
+ return "[unsafeptr]"
+ default:
+ panic("unsupported value kind " + strconv.Itoa(int(rv.Kind())))
+ }
+}
diff --git a/src/syscall/zx/fidl/empty.s b/src/syscall/zx/fidl/empty.s
new file mode 100644
index 0000000..796da3d
--- /dev/null
+++ b/src/syscall/zx/fidl/empty.s
@@ -0,0 +1,6 @@
+// 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.
+
+// This file exists to trick go:linkname into working.
+// A .s file needs to be present in the directory.
\ No newline at end of file
diff --git a/src/syscall/zx/fidl/encoding.go b/src/syscall/zx/fidl/encoding.go
new file mode 100644
index 0000000..418a71e
--- /dev/null
+++ b/src/syscall/zx/fidl/encoding.go
@@ -0,0 +1,155 @@
+// 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 fidl
+
+import (
+ "encoding/binary"
+ "math"
+ "reflect"
+ "syscall/zx"
+)
+
+const (
+ allocPresent uint64 = math.MaxUint64
+ noAlloc = 0
+)
+
+const (
+ handlePresent uint32 = math.MaxUint32
+ noHandle = 0
+)
+
+var (
+ // TODO(mknyszek): Add support here for process, thread, job, resource,
+ // interrupt, eventpair, fifo, guest, and time once these are actually
+ // supported in the Go runtime.
+ handleType reflect.Type = reflect.TypeOf(zx.Handle(0))
+ channelType = reflect.TypeOf(zx.Channel(0))
+ logType = reflect.TypeOf(zx.Log(0))
+ portType = reflect.TypeOf(zx.Port(0))
+ vmoType = reflect.TypeOf(zx.VMO(0))
+ eventType = reflect.TypeOf(zx.Event(0))
+ socketType = reflect.TypeOf(zx.Socket(0))
+ vmarType = reflect.TypeOf(zx.VMAR(0))
+ interfaceRequestType = reflect.TypeOf(InterfaceRequest{})
+ proxyType = reflect.TypeOf(ChannelProxy{})
+)
+
+// isHandleType returns true if the reflected type is a Fuchsia handle type.
+func isHandleType(t reflect.Type) bool {
+ switch t {
+ case handleType:
+ fallthrough
+ case channelType:
+ fallthrough
+ case logType:
+ fallthrough
+ case portType:
+ fallthrough
+ case vmoType:
+ fallthrough
+ case eventType:
+ fallthrough
+ case socketType:
+ fallthrough
+ case vmarType:
+ return true
+ }
+ return false
+}
+
+// align increases size such that size is aligned to bytes, and returns the new size.
+//
+// bytes must be a power of 2.
+func align(size, bytes int) int {
+ alignmentMask := (bytes - 1)
+ return (size + alignmentMask) & ^alignmentMask
+}
+
+// encoder represents the encoding context that is necessary to maintain across
+// recursive calls within the same FIDL object.
+type encoder struct {
+ // buffer represents the output buffer that the encoder writes into.
+ buffer []byte
+
+ // handleDispositions are the handle dispositions discovered when traversing
+ // the FIDL data structure. They are referenced from within the serialized
+ // data structure in buffer.
+ handleDispositions []zx.HandleDisposition
+}
+
+// Allocate a new out of line object of the specified size for encoding.
+// Returns the starting offset for the new object in the buffer.
+func (e *encoder) newObject(size int) int {
+ size = align(size, 8)
+ start := len(e.buffer)
+ e.buffer = append(e.buffer, make([]byte, size)...)
+ return start
+}
+
+// writeUint64 writes a uint64 to the buffer at the next 8-byte aligned position.
+func (e *encoder) writeUint64(offset int, val uint64) {
+ binary.LittleEndian.PutUint64(e.buffer[offset:], val)
+}
+
+// writeUint32 writes a uint32 to the buffer at the next 4-byte aligned position.
+func (e *encoder) writeUint32(offset int, val uint32) {
+ binary.LittleEndian.PutUint32(e.buffer[offset:], val)
+}
+
+// writeUint16 writes a uint16 to the buffer at the next 2-byte aligned position.
+func (e *encoder) writeUint16(offset int, val uint16) {
+ binary.LittleEndian.PutUint16(e.buffer[offset:], val)
+}
+
+// writeUint8 writes a uint8 to the buffer.
+func (e *encoder) writeUint8(offset int, val uint8) {
+ e.buffer[offset] = val
+}
+
+// decoder represents the decoding context that is necessary to maintain
+// across recursive calls within the same FIDL object.
+type decoder struct {
+ // nextObject is the byte index of the next out-of-line object in buffer.
+ nextObject int
+
+ // buffer represents the buffer we're decoding from.
+ buffer []byte
+
+ // handleInfos represents the input untyped handles we're decoding.
+ // These objects contain additional information on rights.
+ handleInfos []zx.HandleInfo
+}
+
+// Allocate a new out of line object of the specified size for decoding.
+// Returns the starting offset for the new object in the buffer.
+func (d *decoder) newObject(size int) (int, error) {
+ start := d.nextObject
+ d.nextObject += align(size, 8)
+ if d.nextObject > len(d.buffer) {
+ return 0, ErrPayloadTooSmall
+ }
+ return start, nil
+}
+
+// readUint64 reads a uint64 from the buffer.
+func (d *decoder) readUint64(offset int) uint64 {
+ return binary.LittleEndian.Uint64(d.buffer[offset:])
+}
+
+// readUint32 reads a uint32 from the buffer.
+func (d *decoder) readUint32(offset int) uint32 {
+ return binary.LittleEndian.Uint32(d.buffer[offset:])
+}
+
+// readUint16 reads a uint16 from the buffer.
+func (d *decoder) readUint16(offset int) uint16 {
+ return binary.LittleEndian.Uint16(d.buffer[offset:])
+}
+
+// readUint8 reads a uint8 from the buffer.
+func (d *decoder) readUint8(offset int) uint8 {
+ return d.buffer[offset]
+}
diff --git a/src/syscall/zx/fidl/encoding_new.go b/src/syscall/zx/fidl/encoding_new.go
new file mode 100644
index 0000000..bd63a71
--- /dev/null
+++ b/src/syscall/zx/fidl/encoding_new.go
@@ -0,0 +1,2592 @@
+// 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 fidl
+
+import (
+ "errors"
+ "math"
+ "reflect"
+ "strconv"
+ "strings"
+ "sync"
+ "syscall/zx"
+ "syscall/zx/fidl/internal/unsafevalue"
+ "unicode/utf8"
+ "unsafe"
+)
+
+type strictness bool
+
+const (
+ isFlexible strictness = false
+ isStrict strictness = true
+)
+
+type resourceness bool
+
+const (
+ isResourceType resourceness = true
+ isValueType resourceness = false
+)
+
+// MustCreateMarshaler is like CreateMarshaler but panics if the sample struct
+// cannot be used to create a marshaler. It simplifies safe initialization of
+// global variables holding marshalers.
+func MustCreateMarshaler(sample interface{}) Marshaler {
+ m, err := CreateMarshaler(sample)
+ if err != nil {
+ panic(err)
+ }
+ return m
+}
+
+// CreateMarshaler creates a marshaler from a sample struct.
+func CreateMarshaler(sample interface{}) (Marshaler, error) {
+ typ := reflect.TypeOf(sample)
+ if typ.Kind() == reflect.Ptr {
+ typ = typ.Elem()
+ }
+ if typ.Kind() == reflect.Struct {
+ return createMarshaler(typ)
+ }
+ return nil, errors.New("unable to create marshaler for " + nicefmt(typ))
+}
+
+// CreateMarshaler creates a lazy marshaler from a sample struct. This lazy
+// marshaler initializes its actual delegate marshaler on first use, rather
+// than on creation. As a result, there is no validation on creation, and
+// instead the lazy marshaler will panic on first use if a marshaler
+// cannot be created of the sample provided.
+func CreateLazyMarshaler(sample interface{}) Marshaler {
+ return &lazyMarshaler{
+ sample: sample,
+ }
+}
+
+type lazyMarshaler struct {
+ once sync.Once
+ sample interface{}
+ delegate Marshaler
+}
+
+// Assert that lazyMarshaler implements the Marshaler interface.
+var _ Marshaler = &lazyMarshaler{}
+
+func (m *lazyMarshaler) init() {
+ m.delegate = MustCreateMarshaler(m.sample)
+}
+
+func (m *lazyMarshaler) getMarshalSize(ctx MarshalerContext) int {
+ m.once.Do(m.init)
+ return m.delegate.getMarshalSize(ctx)
+}
+
+func (m *lazyMarshaler) getUnmarshalSize(ctx MarshalerContext) int {
+ m.once.Do(m.init)
+ return m.delegate.getUnmarshalSize(ctx)
+}
+
+func (m *lazyMarshaler) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ m.once.Do(m.init)
+ return m.delegate.marshal(ctx, v, out, offset)
+}
+
+func (m *lazyMarshaler) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ m.once.Do(m.init)
+ return m.delegate.unmarshal(ctx, in, offset, v)
+}
+
+// Marshal marshals (or encodes) a message into the data and handles slices.
+func Marshal(message Message, data []byte, handleDispositions []zx.HandleDisposition) (int, int, error) {
+ return MarshalWithContext(newCtx(), message, data, handleDispositions)
+}
+
+// Marshal marshals (or encodes) a message into the data and handles slices.
+func MarshalWithContext(ctx MarshalerContext, message Message, data []byte, handleDispositions []zx.HandleDisposition) (int, int, error) {
+ // By construction, we know that message is a pointer to a struct since
+ // we only generate pointer receiver methods for top-level messages.
+ // Should one implement the interface differently, and call into this
+ // code, it would fail in an obsure way withing relfection. Just don't do
+ // that.
+ var (
+ v = unsafevalue.ValueOf(message)
+ m = message.Marshaler()
+ )
+
+ // Now, let's get the value of s, marshal the header into a starting
+ // buffer, and then marshal the rest of the payload in s.
+ out := &encoder{buffer: data[:0], handleDispositions: handleDispositions[:0]}
+ offset := out.newObject(m.getMarshalSize(ctx))
+ if err := m.marshal(ctx, v, out, offset); err != nil {
+ return 0, 0, err
+ }
+ return len(out.buffer), len(out.handleDispositions), nil
+}
+
+// Unmarshal unmarshals (or decodes) into message using the data and handles
+// slices.
+func Unmarshal(data []byte, handleInfos []zx.HandleInfo, message Message) (int, int, error) {
+ return UnmarshalWithContext2(newCtx(), data, handleInfos, message)
+}
+
+// UnmarshalWithContext2 behaves identically to UnmarshalWithContext but takes a HandleInfo.
+func UnmarshalWithContext2(ctx MarshalerContext, data []byte, handleInfos []zx.HandleInfo, message Message) (int, int, error) {
+ // By construction, we know that message is a pointer to a struct since
+ // we only generate pointer receiver methods for top-level messages.
+ // Should one implement the interface differently, and call into this
+ // code, it would fail in an obsure way withing relfection. Just don't do
+ // that.
+ var (
+ v = unsafevalue.ValueOf(message)
+ m = message.Marshaler()
+ )
+
+ // Get the payload's value and unmarshal it.
+ in := &decoder{
+ buffer: data,
+ handleInfos: handleInfos,
+ }
+ offset, err := in.newObject(m.getUnmarshalSize(ctx))
+ if err != nil {
+ return 0, 0, err
+ }
+ if err := m.unmarshal(ctx, in, offset, v); err != nil {
+ return 0, 0, err
+ }
+ return in.nextObject, len(handleInfos) - len(in.handleInfos), nil
+}
+
+func UnmarshalWithContext(ctx MarshalerContext, data []byte, handles []zx.Handle, message Message) (int, int, error) {
+ resphi := messageHandleInfosPool.Get().([]zx.HandleInfo)
+ defer messageHandleInfosPool.Put(resphi)
+
+ handleInfos := resphi[:len(handles)]
+ for i, handle := range handles {
+ handleInfos[i] = zx.HandleInfo{
+ Handle: handle,
+ Type: zx.ObjectTypeNone,
+ Rights: zx.RightSameRights,
+ }
+ }
+
+ return UnmarshalWithContext2(ctx, data, handleInfos, message)
+}
+
+const tagSizeV1 = "fidl_size_v1"
+const tagAlignmentV1 = "fidl_alignment_v1"
+const tagOffsetV1 = "fidl_offset_v1"
+const tagHandleRights = "fidl_handle_rights"
+const tagHandleSubtype = "fidl_handle_subtype"
+const tagOrdinal = "fidl_ordinal"
+const tagBounds = "fidl_bounds"
+const tagMarshalerKind = "fidl"
+const tagIsResource = "fidl_resource"
+
+// These rights come from FTP-028
+// (all requests and interfaces have the same handle rights)
+const ProtocolRights = zx.RightTransfer | zx.RightWait | zx.RightInspect | zx.RightWrite | zx.RightRead | zx.RightSignal | zx.RightSignalPeer
+
+type tagKind int
+
+const (
+ _ = iota
+ structTag tagKind = iota
+ xunionTag
+ strictXunionTag
+ tableTag
+)
+
+type bounds []int
+
+func (b bounds) pop() (int, []int) {
+ if len(b) == 0 {
+ return math.MaxInt32, nil
+ }
+ return b[0], b[1:]
+}
+
+func nicefmt(typ reflect.Type) string {
+ typKindName := typ.Kind().String()
+ if typName := typ.Name(); len(typName) != 0 {
+ return typName + " (" + typKindName + ")"
+ }
+ return typKindName
+}
+
+// Extracts a list of fields for struct, union, table types that can be used
+// for iterating.
+// This skips the initial tag field.
+func dataFields(typ reflect.Type) []reflect.StructField {
+ if typ.Kind() != reflect.Struct {
+ panic("expected struct")
+ }
+ if name := typ.Field(0).Name; name != "_" && !strings.HasPrefix(name, "I_") {
+ panic("expected first field to be a metadata field")
+ }
+ fields := make([]reflect.StructField, typ.NumField()-1)
+ for i := range fields {
+ fields[i] = typ.Field(i + 1)
+ }
+ return fields
+}
+
+// Identifies the fields in a union that store unknown data, and that therefore
+// do not need to have a field marshaler created
+func isUnknownDataField(fieldName string) bool {
+ return fieldName == "I_unknownData"
+}
+
+// Returns true if the go type has the same layout as the FIDL wire format.
+func matchesWireFormatLayout(marshaler Marshaler, typ reflect.Type) bool {
+ switch marshaler := marshaler.(type) {
+ case mBool:
+ // Need to validate 0, 1.
+ return false
+ case mInt8, mInt16, mInt32, mInt64, mUint8, mUint16, mUint32, mUint64:
+ return true
+ case mEnumOfInt8, mEnumOfInt16, mEnumOfInt32, mEnumOfInt64:
+ // Need to validate.
+ return false
+ case mEnumOfUint8, mEnumOfUint16, mEnumOfUint32, mEnumOfUint64:
+ // Need to validate.
+ return false
+ case mBitsOfUint8, mBitsOfUint16, mBitsOfUint32, mBitsOfUint64:
+ // Need to validate.
+ return false
+ case mFloat32:
+ // Need to validate.
+ return false
+ case mFloat64:
+ // Need to validate.
+ return false
+ case mArray:
+ return matchesWireFormatLayout(marshaler.Marshaler, typ.Elem())
+ case mStructUnsafeCopy:
+ return true
+ case mStruct:
+ // Note: In some cases, go structs may be different size than wire format
+ // structs but otherwise identical. It may be possible to change this
+ // logic to allow a partial copy in the future.
+ if marshaler.size != int(typ.Size()) {
+ return false
+ }
+ if marshaler.alignment != typ.Align() {
+ return false
+ }
+ for i, rField := range dataFields(typ) {
+ field := marshaler.fields[i]
+ if field.offset != rField.Offset {
+ return false
+ }
+ if !matchesWireFormatLayout(field.Marshaler, rField.Type) {
+ return false
+ }
+ }
+ return true
+ case mEmptyStruct:
+ // Note: empty struct is 0 or 1 bytes at different times in go.
+ return false
+ case mHandle, mProtocol:
+ // Note: In the future, we might instead consider treating handles
+ // like uint32 and decoding in a subsequent step.
+ return false
+ case mXUnion, mOptXUnion, mTable, mVector, mOptVector, mString, mOptString, mPointer:
+ return false
+ default:
+ panic("unhandledType " + reflect.TypeOf(marshaler).Name() + " for " + typ.String())
+ }
+}
+
+func createMarshaler(typ reflect.Type) (Marshaler, error) {
+ // field 0 holds the tag
+ tagField := typ.Field(0)
+ marshalerKind, err := readKindTag(tagField)
+ if err != nil {
+ return nil, err
+ }
+
+ var (
+ kind = marshalerKind
+ fields []mField
+ ordinals []uint64
+ wireOffsets []int
+ presenceOffsets []uintptr
+ )
+
+ // - structs, unions, and xunions have fields one after the other;
+ // - tables have a field, followed by a bool presence indicator, etc.
+ for index, field := range dataFields(typ) {
+ if (kind == xunionTag || kind == tableTag) && isUnknownDataField(field.Name) {
+ continue
+ }
+
+ if kind == tableTag && index%2 == 0 {
+ // Presence field
+ if field.Type.Kind() != reflect.Bool {
+ return nil, errors.New("incorrect presence field on " + nicefmt(typ))
+ }
+ presenceOffsets = append(presenceOffsets, field.Offset)
+ continue
+ }
+
+ fieldBounds := readBoundsTag(field)
+ handleRights, handleSubtype, err := readHandleRightsAndSubtype(field)
+ if err != nil {
+ return nil, err
+ }
+ switch kind {
+ case structTag:
+ offset, err := readIntTag(field, tagOffsetV1)
+ if err != nil {
+ return nil, err
+ }
+ wireOffsets = append(wireOffsets, offset)
+ case xunionTag, strictXunionTag, tableTag:
+ ordinal := readOrdinalTag(field)
+ ordinals = append(ordinals, uint64(ordinal))
+ default:
+ }
+ fieldMarshaler, err := createMarshalerForField(field.Type, fieldBounds, handleRights, handleSubtype)
+ if err != nil {
+ return nil, err
+ }
+ fields = append(fields, mField{fieldMarshaler, field.Index[0], field.Offset})
+ }
+
+ size, err := readIntTag(tagField, tagSizeV1)
+ if err != nil {
+ return nil, errors.New("error creating marshaller for " + typ.String() + ": " + err.Error())
+ }
+ alignment, err := readIntTag(tagField, tagAlignmentV1)
+ if err != nil {
+ return nil, errors.New("error creating marshaller for " + typ.String() + ": " + err.Error())
+ }
+
+ switch kind {
+ case structTag:
+ if len(fields) == 0 {
+ return mEmptyStruct{}, nil
+ }
+
+ var structFields []mFieldWithWireOffset
+ for i := 0; i < len(fields); i++ {
+ structFields = append(structFields, mFieldWithWireOffset{
+ mField: fields[i],
+ wireOffset: wireOffsets[i],
+ })
+ }
+ s := mStruct{
+ fields: structFields,
+ size: size,
+ alignment: alignment,
+ }
+ if matchesWireFormatLayout(s, typ) {
+ return mStructUnsafeCopy{
+ size: size,
+ }, nil
+ }
+ return s, nil
+ case xunionTag, strictXunionTag:
+ strictness := strictness(kind == strictXunionTag)
+ isResource, err := readBoolTag(tagField, tagIsResource)
+ if err != nil {
+ return nil, errors.New("error creating marshaller for " + typ.String() + ": " + err.Error())
+ }
+
+ ordinalToFields := make(map[uint64]mField)
+ for i := 0; i < len(fields); i++ {
+ ordinalToFields[ordinals[i]] = fields[i]
+ }
+ return mXUnion{
+ typ: typ,
+ fields: ordinalToFields,
+ ordinals: ordinals,
+ size: size,
+ alignment: alignment,
+ strictness: strictness,
+ resourceness: resourceness(isResource),
+ }, nil
+ case tableTag:
+ isResource, err := readBoolTag(tagField, tagIsResource)
+ if err != nil {
+ return nil, errors.New("error creating marshaller for " + typ.String() + ": " + err.Error())
+ }
+ return mTable{
+ fields: fields,
+ presenceOffsets: presenceOffsets,
+ size: size,
+ alignment: alignment,
+ ordinals: ordinals,
+ resourceness: resourceness(isResource),
+ }, nil
+ default:
+ return nil, errors.New("unknown kind tag on " + nicefmt(typ))
+ }
+}
+
+func readKindTag(field reflect.StructField) (tagKind, error) {
+ content, ok := field.Tag.Lookup(tagMarshalerKind)
+ if !ok {
+ return 0, errors.New(tagMarshalerKind + " not found on field " + field.Name)
+ }
+ switch content {
+ case "s":
+ return structTag, nil
+ case "x":
+ return xunionTag, nil
+ case "x!":
+ return strictXunionTag, nil
+ case "t":
+ return tableTag, nil
+ default:
+ return 0, errors.New("unknown kind tag: " + content)
+ }
+}
+
+func readHandleRightsAndSubtype(field reflect.StructField) (zx.Rights, zx.ObjectType, error) {
+ if !containsHandleType(field.Type) {
+ // Skip non-handle field types and don't return an error.
+ return zx.RightSameRights, zx.ObjectTypeNone, nil
+ }
+
+ // Read handle rights
+ val, ok := field.Tag.Lookup(tagHandleRights)
+ if !ok {
+ return zx.RightSameRights, zx.ObjectTypeNone, ErrUnspecifiedHandleRights
+ }
+ rights, err := strconv.ParseInt(val, 0, 64)
+ if err != nil {
+ return zx.RightSameRights, zx.ObjectTypeNone, err
+ }
+ convertedRights := zx.Rights(rights)
+
+ // Read handle subtype
+ val, ok = field.Tag.Lookup(tagHandleSubtype)
+ if !ok {
+ return zx.RightSameRights, zx.ObjectTypeNone, ErrUnspecifiedHandleType
+ }
+ subtype, err := strconv.ParseInt(val, 0, 64)
+ if err != nil {
+ return zx.RightSameRights, zx.ObjectTypeNone, err
+ }
+ convertedSubtype := zx.ObjectType(subtype)
+
+ return convertedRights, convertedSubtype, nil
+}
+
+func containsHandleType(typ reflect.Type) bool {
+ // Protocols and requests are technically handle types but their rights /
+ // subtypes are handled elsewhere.
+ if typ.ConvertibleTo(proxyType) || typ.ConvertibleTo(interfaceRequestType) {
+ return false
+ }
+ if isHandleType(typ) {
+ return true
+ }
+ if typ.Kind() == reflect.Slice || typ.Kind() == reflect.Ptr {
+ return containsHandleType(typ.Elem())
+ }
+ return false
+}
+
+func readOrdinalTag(field reflect.StructField) int {
+ ordinal, err := readIntTag(field, tagOrdinal)
+ if err != nil {
+ return math.MaxInt32
+ }
+ return ordinal
+}
+
+func readBoundsTag(field reflect.StructField) bounds {
+ content, ok := field.Tag.Lookup(tagBounds)
+ if !ok {
+ return nil
+ }
+
+ var nums []int
+ for _, elem := range strings.Split(content, ",") {
+ var (
+ num = math.MaxInt32
+ err error
+ )
+ if len(elem) != 0 {
+ num, err = strconv.Atoi(elem)
+ if err != nil {
+ panic(elem + ": " + err.Error())
+ }
+ }
+ nums = append(nums, num)
+ }
+ return bounds(nums)
+}
+
+func readBoolTag(field reflect.StructField, tagKey string) (bool, error) {
+ content, ok := field.Tag.Lookup(tagKey)
+ if !ok {
+ return false, errors.New(tagKey + " not found on field " + field.Name)
+ }
+ res, err := strconv.ParseBool(content)
+ if err != nil {
+ return false, errors.New("error parsing bool body from tag " + tagKey + " " + err.Error())
+ }
+ return res, nil
+}
+
+func readIntTag(field reflect.StructField, tagKey string) (int, error) {
+ content, ok := field.Tag.Lookup(tagKey)
+ if !ok {
+ return 0, errors.New(tagKey + " not found on field " + field.Name)
+ }
+ res, err := strconv.ParseInt(content, 0, 64)
+ if err != nil {
+ return 0, errors.New("error parsing int body from tag " + tagKey + " " + err.Error())
+ }
+ return int(res), nil
+}
+
+func readHandleRightsTag(field reflect.StructField) (zx.Rights, error) {
+ val, ok := field.Tag.Lookup(tagHandleRights)
+ if !ok {
+ return zx.RightSameRights, nil
+ }
+ rights, err := strconv.ParseInt(val, 0, 64)
+ if err != nil {
+ return zx.RightSameRights, err
+ }
+ convertedRights := zx.Rights(rights)
+ return convertedRights, nil
+}
+
+func toInt8Map(values reflect.Value) map[int8]struct{} {
+ m := make(map[int8]struct{})
+ for i := 0; i < values.Len(); i++ {
+ value := values.Index(i)
+ m[int8(value.Int())] = struct{}{}
+ }
+ return m
+}
+
+func toInt16Map(values reflect.Value) map[int16]struct{} {
+ m := make(map[int16]struct{})
+ for i := 0; i < values.Len(); i++ {
+ value := values.Index(i)
+ m[int16(value.Int())] = struct{}{}
+ }
+ return m
+}
+func toInt32Map(values reflect.Value) map[int32]struct{} {
+ m := make(map[int32]struct{})
+ for i := 0; i < values.Len(); i++ {
+ value := values.Index(i)
+ m[int32(value.Int())] = struct{}{}
+ }
+ return m
+}
+func toInt64Map(values reflect.Value) map[int64]struct{} {
+ m := make(map[int64]struct{})
+ for i := 0; i < values.Len(); i++ {
+ value := values.Index(i)
+ m[int64(value.Int())] = struct{}{}
+ }
+ return m
+}
+
+func toUint8Map(values reflect.Value) map[uint8]struct{} {
+ m := make(map[uint8]struct{})
+ for i := 0; i < values.Len(); i++ {
+ value := values.Index(i)
+ m[uint8(value.Uint())] = struct{}{}
+ }
+ return m
+}
+func toUint16Map(values reflect.Value) map[uint16]struct{} {
+ m := make(map[uint16]struct{})
+ for i := 0; i < values.Len(); i++ {
+ value := values.Index(i)
+ m[uint16(value.Uint())] = struct{}{}
+ }
+ return m
+}
+func toUint32Map(values reflect.Value) map[uint32]struct{} {
+ m := make(map[uint32]struct{})
+ for i := 0; i < values.Len(); i++ {
+ value := values.Index(i)
+ m[uint32(value.Uint())] = struct{}{}
+ }
+ return m
+}
+func toUint64Map(values reflect.Value) map[uint64]struct{} {
+ m := make(map[uint64]struct{})
+ for i := 0; i < values.Len(); i++ {
+ value := values.Index(i)
+ m[uint64(value.Uint())] = struct{}{}
+ }
+ return m
+}
+
+func createMarshalerForField(typ reflect.Type, bounds bounds, handleRights zx.Rights, handleSubtype zx.ObjectType) (Marshaler, error) {
+ if isHandleType(typ) {
+ nullable, _ := bounds.pop()
+ return mHandle{nullable: nullable != 0, rights: handleRights, subtype: handleSubtype}, nil
+ }
+
+ if typ.ConvertibleTo(proxyType) || typ.ConvertibleTo(interfaceRequestType) {
+ nullable, _ := bounds.pop()
+ return mProtocol{
+ nullable: nullable != 0,
+ rights: ProtocolRights,
+ subtype: zx.ObjectTypeChannel}, nil
+ }
+
+ if m, ok := typ.MethodByName("I_EnumValues"); ok {
+ values := m.Func.Call([]reflect.Value{reflect.Zero(typ)})[0]
+ var isStrict bool
+ if m, ok := typ.MethodByName("I_EnumIsStrict"); ok {
+ isStrict = m.Func.Call([]reflect.Value{reflect.Zero(typ)})[0].Interface().(bool)
+ } else {
+ return nil, errors.New("unable to create field marshaler for enum of " + nicefmt(typ) + ", missing I_EnumIsStrict method")
+ }
+ switch typ.Kind() {
+ case reflect.Int8:
+ return mEnumOfInt8{
+ isStrict: isStrict,
+ values: toInt8Map(values),
+ }, nil
+ case reflect.Int16:
+ return mEnumOfInt16{
+ isStrict: isStrict,
+ values: toInt16Map(values),
+ }, nil
+ case reflect.Int32:
+ return mEnumOfInt32{
+ isStrict: isStrict,
+ values: toInt32Map(values),
+ }, nil
+ case reflect.Int64:
+ return mEnumOfInt64{
+ isStrict: isStrict,
+ values: toInt64Map(values),
+ }, nil
+ case reflect.Uint8:
+ return mEnumOfUint8{
+ isStrict: isStrict,
+ values: toUint8Map(values),
+ }, nil
+ case reflect.Uint16:
+ return mEnumOfUint16{
+ isStrict: isStrict,
+ values: toUint16Map(values),
+ }, nil
+ case reflect.Uint32:
+ return mEnumOfUint32{
+ isStrict: isStrict,
+ values: toUint32Map(values),
+ }, nil
+ case reflect.Uint64:
+ return mEnumOfUint64{
+ isStrict: isStrict,
+ values: toUint64Map(values),
+ }, nil
+ default:
+ return nil, errors.New("unable to create field marshaler for enum of " + nicefmt(typ))
+ }
+ }
+
+ if m, ok := typ.MethodByName("I_BitsMask"); ok {
+ mask := m.Func.Call([]reflect.Value{reflect.Zero(typ)})[0]
+ var isStrict bool
+ if m, ok := typ.MethodByName("I_BitsIsStrict"); ok {
+ isStrict = m.Func.Call([]reflect.Value{reflect.Zero(typ)})[0].Interface().(bool)
+ } else {
+ return nil, errors.New("unable to create field marshaler for bits of " + nicefmt(typ) + ", missing I_BitsIsStrict method")
+ }
+ switch typ.Kind() {
+ case reflect.Uint8:
+ return mBitsOfUint8{
+ isStrict: isStrict,
+ mask: uint8(mask.Uint()),
+ }, nil
+ case reflect.Uint16:
+ return mBitsOfUint16{
+ isStrict: isStrict,
+ mask: uint16(mask.Uint()),
+ }, nil
+ case reflect.Uint32:
+ return mBitsOfUint32{
+ isStrict: isStrict,
+ mask: uint32(mask.Uint()),
+ }, nil
+ case reflect.Uint64:
+ return mBitsOfUint64{
+ isStrict: isStrict,
+ mask: uint64(mask.Uint()),
+ }, nil
+ default:
+ return nil, errors.New("unable to create field marshaler for bits of " + nicefmt(typ))
+ }
+ }
+
+ switch typ.Kind() {
+ case reflect.Bool:
+ return mBool{}, nil
+ case reflect.Int8:
+ return mInt8{}, nil
+ case reflect.Int16:
+ return mInt16{}, nil
+ case reflect.Int32:
+ return mInt32{}, nil
+ case reflect.Int64:
+ return mInt64{}, nil
+ case reflect.Uint8:
+ return mUint8{}, nil
+ case reflect.Uint16:
+ return mUint16{}, nil
+ case reflect.Uint32:
+ return mUint32{}, nil
+ case reflect.Uint64:
+ return mUint64{}, nil
+ case reflect.Float32:
+ return mFloat32{}, nil
+ case reflect.Float64:
+ return mFloat64{}, nil
+ case reflect.String:
+ maxSize, _ := bounds.pop()
+ return mString(maxSize), nil
+ case reflect.Array:
+ elemMarshaler, err := createMarshalerForField(typ.Elem(), bounds, handleRights, handleSubtype)
+ if err != nil {
+ return nil, err
+ }
+ return mArray{
+ Marshaler: elemMarshaler,
+ size: typ.Len(),
+ rtElemSize: typ.Elem().Size(),
+ }, nil
+ case reflect.Slice:
+ maxSize, remainder := bounds.pop()
+ elemTyp := typ.Elem()
+ elemMarshaler, err := createMarshalerForField(elemTyp, remainder, handleRights, handleSubtype)
+ if err != nil {
+ return nil, err
+ }
+ return mVector{
+ Marshaler: elemMarshaler,
+ maxSize: maxSize,
+ elemTyp: elemTyp,
+ useUnsafeCopy: matchesWireFormatLayout(elemMarshaler, elemTyp),
+ }, nil
+ case reflect.Struct:
+ return createMarshaler(typ)
+ case reflect.Ptr:
+ return createOptMarshalerForField(typ.Elem(), bounds, handleRights, handleSubtype)
+ default:
+ return nil, errors.New("unable to create field marshaler for " + nicefmt(typ))
+ }
+}
+
+func createOptMarshalerForField(typ reflect.Type, bounds bounds, handleRights zx.Rights, handleSubtype zx.ObjectType) (Marshaler, error) {
+ m, err := createMarshalerForField(typ, bounds, handleRights, handleSubtype)
+ if err != nil {
+ return nil, err
+ }
+ switch m := m.(type) {
+ case mString:
+ return mOptString(m), nil
+ case mVector:
+ return mOptVector{
+ mVector: m,
+ sliceTyp: typ,
+ }, nil
+ case mEmptyStruct:
+ return mPointer{
+ Marshaler: m,
+ elemTyp: typ,
+ }, nil
+ case mStruct, mStructUnsafeCopy:
+ return mPointer{
+ Marshaler: m,
+ elemTyp: typ,
+ }, nil
+ case mXUnion:
+ return mOptXUnion{
+ mXUnion: m,
+ typ: typ,
+ }, nil
+ default:
+ return nil, errors.New("unable to create optional field marshaler for " + nicefmt(typ))
+ }
+}
+
+// Message is implemented by any value that represents a FIDL message.
+type Message interface {
+ Marshaler() Marshaler
+}
+
+type Marshaler interface {
+ // Marshal and unmarshal sizes can be different because they can be context dependent.
+ // e.g. it is possible to write a new format but still read the old format
+ getMarshalSize(ctx MarshalerContext) int
+ getUnmarshalSize(ctx MarshalerContext) int
+ marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error
+ unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error
+}
+
+// Assert various encoders implement the Marshaler interface.
+var _ = []Marshaler{
+ mStruct{},
+ mStructUnsafeCopy{},
+ mEmptyStruct{},
+ mXUnion{},
+ mOptXUnion{},
+ mTable{},
+ mPointer{},
+ mArray{},
+ mVector{},
+ mOptVector{},
+ mBool{},
+ mInt8{},
+ mInt16{},
+ mInt32{},
+ mInt64{},
+ mUint8{},
+ mUint16{},
+ mUint32{},
+ mUint64{},
+ mEnumOfInt8{},
+ mEnumOfInt16{},
+ mEnumOfInt32{},
+ mEnumOfInt64{},
+ mEnumOfUint8{},
+ mEnumOfUint16{},
+ mEnumOfUint32{},
+ mEnumOfUint64{},
+ mBitsOfUint8{},
+ mBitsOfUint16{},
+ mBitsOfUint32{},
+ mBitsOfUint64{},
+ mFloat32{},
+ mFloat64{},
+ mString(0),
+ mOptString(0),
+}
+
+type mField struct {
+ Marshaler
+ index int
+ offset uintptr
+}
+
+type mFieldWithWireOffset struct {
+ mField
+ wireOffset int
+}
+
+type mStruct struct {
+ fields []mFieldWithWireOffset
+ size, alignment int
+}
+
+func (m mStruct) getMarshalSize(ctx MarshalerContext) int {
+ return m.size
+}
+
+func (m mStruct) getUnmarshalSize(ctx MarshalerContext) int {
+ return m.size
+}
+
+func (m mStruct) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ for _, field := range m.fields {
+ fieldOffset := offset + field.wireOffset
+ if err := field.Marshaler.marshal(ctx, v.StructFieldOffset(field.offset), out, fieldOffset); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (m mStruct) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ for _, field := range m.fields {
+ fieldOffset := offset + field.wireOffset
+ if err := field.Marshaler.unmarshal(ctx, in, fieldOffset, v.StructFieldOffset(field.offset)); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+type mStructUnsafeCopy struct {
+ size int
+}
+
+func (m mStructUnsafeCopy) getMarshalSize(ctx MarshalerContext) int {
+ return m.size
+}
+
+func (m mStructUnsafeCopy) getUnmarshalSize(ctx MarshalerContext) int {
+ return m.size
+}
+
+func (m mStructUnsafeCopy) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ // Directly copy the object's memory to the buffer.
+ sh := reflect.SliceHeader{
+ Data: uintptr(unsafe.Pointer(v.UnsafeAddr())),
+ Len: m.size,
+ Cap: m.size,
+ }
+ s := *(*[]uint8)(unsafe.Pointer(&sh))
+ copy(out.buffer[offset:], s)
+ return nil
+}
+
+func (m mStructUnsafeCopy) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ // Directly copy from the buffer to the object's memory.
+ if len(in.buffer) < offset+m.size {
+ return ErrPayloadTooSmall
+ }
+ sh := reflect.SliceHeader{
+ Data: uintptr(unsafe.Pointer(v.UnsafeAddr())),
+ Len: m.size,
+ Cap: m.size,
+ }
+ s := *(*[]uint8)(unsafe.Pointer(&sh))
+ copy(s, in.buffer[offset:])
+ return nil
+}
+
+type mEmptyStruct struct{}
+
+func (_ mEmptyStruct) getMarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+
+func (_ mEmptyStruct) getUnmarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+
+func (_ mEmptyStruct) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint8(offset, 0)
+ return nil
+}
+
+func (_ mEmptyStruct) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ if structByte := in.readUint8(offset); structByte != 0 {
+ return newValueError(ErrInvalidEmptyStruct, structByte)
+ }
+
+ return nil
+}
+
+// closeHandles closes all the handles in the provided slice, ignoring any
+// errors (best effort)
+func closeHandles(handles []zx.HandleInfo) {
+ for i := range handles {
+ _ = handleClose(&handles[i].Handle)
+ }
+}
+
+type mXUnion struct {
+ typ reflect.Type
+ fields map[uint64]mField
+ ordinals []uint64
+ size, alignment int
+ strictness
+ resourceness
+}
+
+func (m mXUnion) getMarshalSize(ctx MarshalerContext) int {
+ return m.size
+}
+
+func (m mXUnion) getUnmarshalSize(ctx MarshalerContext) int {
+ return m.size
+}
+
+func (m mXUnion) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ var ordinal uint64
+ ordinal = v.StructFieldOffset(0).Uint64()
+ field, ok := m.fields[ordinal]
+ out.writeUint64(offset, ordinal)
+ if !ok {
+ if m.strictness == isStrict {
+ return newValueError(ErrInvalidXUnionTag, ordinal)
+ }
+
+ fld, fldOk := m.typ.FieldByName("I_unknownData")
+ if !fldOk {
+ return errorf("internal error (no unknown field found in flexible union to encode)")
+ }
+ rawUnknownData := v.StructFieldOffset(fld.Offset).Interface()
+ unknownData, ok := rawUnknownData.(UnknownData)
+ if !ok {
+ return errorf("internal error (unexpected union I_unknownData type {})", rawUnknownData)
+ }
+ if len(unknownData.Handles) > 0 && m.resourceness == isValueType {
+ closeHandles(unknownData.Handles)
+ return ErrValueTypeHandles
+ }
+ marshalEnvelopeUnknown(
+ out,
+ offset+8,
+ unknownData.Bytes,
+ unknownData.Handles,
+ )
+ return nil
+ }
+
+ // Field.
+ if err := marshalEnvelopePresent(ctx, field, v.StructFieldOffset(field.offset), out, offset+8); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m mXUnion) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ return m.unmarshalWithOptSpecified(ctx, in, offset, v, nil)
+}
+
+func (m mXUnion) unmarshalWithOptSpecified(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value, typ reflect.Type) error {
+ // Can this envelope be optional? If it can, the type must be provided
+ // in order to reflectively create a pointer container.
+ optAllowed := typ != nil
+
+ ordinal := in.readUint64(offset)
+
+ // ordinal=0 indicates that there MUST be no envelope.
+ if ordinal == 0 {
+ if !optAllowed {
+ return newValueError(ErrInvalidXUnionTag, ordinal)
+ }
+
+ h, err := unmarshalEnvelopeHeader(in, offset+8)
+ if err != nil {
+ return err
+ }
+
+ if h.isPresent() {
+ return newValueError(ErrInvalidXUnionTag, ordinal)
+ }
+
+ return nil
+ }
+
+ // If we reach here, ordinal != 0.
+ field, ok := m.fields[ordinal]
+ if !ok {
+ v.StructFieldOffset(0).SetUint64(ordinal)
+
+ bytes, handles, err := unmarshalEnvelopeUnknown(in, offset+8)
+ if err != nil {
+ return err
+ }
+ if m.strictness == isStrict {
+ closeHandles(handles)
+ return newValueError(ErrInvalidXUnionTag, ordinal)
+ }
+ if len(handles) > 0 && m.resourceness == isValueType {
+ closeHandles(handles)
+ return ErrValueTypeHandles
+ }
+ fld, ok := m.typ.FieldByName("I_unknownData")
+ if !ok {
+ return errorf("internal error (no unknown field found in flexible union to decode into)")
+ }
+ v.StructFieldOffset(fld.Offset).SetInterface(UnknownData{
+ Bytes: bytes,
+ Handles: handles,
+ })
+ return nil
+ }
+
+ if optAllowed {
+ v.PointerSetNew(m.typ)
+ v = v.PointerElem()
+ }
+
+ ordinalOrFieldIndex := ordinal
+ v.StructFieldOffset(0).SetUint64(ordinalOrFieldIndex)
+
+ var mode unmarshalEnvelopeMode
+ if optAllowed {
+ mode = knownMayBeAbsent
+ } else {
+ mode = knownMustBePresent
+ }
+
+ isPresent, err := unmarshalEnvelope(ctx, field.Marshaler, in, offset+8, v.StructFieldOffset(field.offset), mode)
+ if err != nil {
+ return err
+ }
+
+ if !isPresent {
+ v.PointerSetNil()
+ }
+
+ return nil
+}
+
+type mOptXUnion struct {
+ mXUnion
+ typ reflect.Type
+}
+
+func (m mOptXUnion) getMarshalSize(ctx MarshalerContext) int {
+ return m.mXUnion.getMarshalSize(ctx)
+}
+
+func (m mOptXUnion) getUnmarshalSize(ctx MarshalerContext) int {
+ return m.mXUnion.getUnmarshalSize(ctx)
+}
+
+func (m mOptXUnion) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if v.PointerIsNil() {
+ out.writeUint64(offset, 0) // ordinal + padding
+ marshalEnvelopeAbsent(out, offset+8)
+ return nil
+ } else {
+ return m.mXUnion.marshal(ctx, v.PointerElem(), out, offset)
+ }
+}
+
+func (m mOptXUnion) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ return m.unmarshalWithOptSpecified(ctx, in, offset, v, m.typ)
+}
+
+// This assumes that I_unknownData in tables is always the first non-zero
+// sized member.
+const unknownTableDataOffset = 0
+
+type mTable struct {
+ typ reflect.Type
+ fields []mField
+ presenceOffsets []uintptr
+ ordinals []uint64
+ size, alignment int
+ resourceness
+}
+
+func (m mTable) getMarshalSize(ctx MarshalerContext) int {
+ return m.size
+}
+
+func (m mTable) getUnmarshalSize(ctx MarshalerContext) int {
+ return m.size
+}
+
+const envelopeSize = 16
+
+type envelopeHeader struct {
+ byteCount uint32
+ handleCount uint32
+ presence uint64
+}
+
+func (h envelopeHeader) isPresent() bool {
+ return h.presence == allocPresent
+}
+
+func marshalEnvelopePresent(ctx MarshalerContext, m Marshaler, v unsafevalue.Value, out *encoder, offset int) error {
+ numHandleDispositions := len(out.handleDispositions)
+ numBytes := len(out.buffer)
+ outOfLineOffset := out.newObject(m.getMarshalSize(ctx))
+ if err := m.marshal(ctx, v, out, outOfLineOffset); err != nil {
+ return err
+ }
+ numHandleDispositions = len(out.handleDispositions) - numHandleDispositions
+ numBytes = len(out.buffer) - numBytes
+ out.writeUint32(offset, uint32(numBytes))
+ out.writeUint32(offset+4, uint32(numHandleDispositions))
+ out.writeUint64(offset+8, allocPresent)
+ return nil
+}
+
+func marshalEnvelopeAbsent(out *encoder, offset int) {
+ out.writeUint64(offset, 0) // both numBytes, and numHandleDispositions
+ out.writeUint64(offset+8, noAlloc)
+}
+
+func marshalEnvelopeUnknown(out *encoder, offset int, unknownData []byte, unknownHandles []zx.HandleInfo) {
+ outOfLineOffset := out.newObject(len(unknownData))
+ copy(out.buffer[outOfLineOffset:], unknownData)
+ for _, info := range unknownHandles {
+ out.handleDispositions = append(out.handleDispositions, zx.HandleDisposition{
+ Operation: zx.HandleOpMove,
+ Handle: info.Handle,
+ Type: info.Type,
+ Rights: info.Rights,
+ Result: zx.ErrOk,
+ })
+ }
+ out.writeUint32(offset, uint32(len(unknownData)))
+ out.writeUint32(offset+4, uint32(len(unknownHandles)))
+ out.writeUint64(offset+8, allocPresent)
+}
+
+type unmarshalEnvelopeMode int
+
+const (
+ _ unmarshalEnvelopeMode = iota
+
+ // knownMayBeAbsent indicates that the content of the envelope is known,
+ // and that it may be absent, i.e. encountering an empty envelope is
+ // expected
+ knownMayBeAbsent
+
+ // knownMustBePresent indicates that the content of the envelope is known,
+ // and that it must be present, i.e. encountering an empty envelope
+ // should be considered a failure
+ knownMustBePresent
+)
+
+func unmarshalEnvelopeHeader(in *decoder, offset int) (envelopeHeader, error) {
+ h := envelopeHeader{
+ byteCount: in.readUint32(offset),
+ handleCount: in.readUint32(offset + 4),
+ presence: in.readUint64(offset + 8),
+ }
+
+ switch h.presence {
+ case allocPresent, noAlloc:
+ default:
+ return h, newValueError(ErrBadRefEncoding, h)
+ }
+
+ if h.handleCount > uint32(len(in.handleInfos)) {
+ return h, newValueError(ErrTooManyHandles, h)
+ }
+
+ return h, nil
+}
+
+func unmarshalEnvelopeUnknown(in *decoder, offset int) ([]byte, []zx.HandleInfo, error) {
+ header, err := unmarshalEnvelopeHeader(in, offset)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ var unknownHandles []zx.HandleInfo
+ if header.handleCount != 0 {
+ // Slice the end off first; in Go, slicing the head is a more conservative
+ // operation than slicing the tail because the tail is allowed to reach
+ // into capacity, but the head may only use length. Slicing the head first
+ // allows the compiler to elide bounds checks on all the subsequent code.
+ //
+ // Even slicing from zero incurs a bounds check, hence the above check.
+ usedHandles := in.handleInfos[header.handleCount:]
+ // The compiler's bounds check elimination is not smart enough to avoid
+ // bounds checks in the loop body without this local variable.
+ unknownHandles = in.handleInfos[:header.handleCount]
+ in.handleInfos = usedHandles
+ }
+
+ start, err := in.newObject(int(header.byteCount))
+ if err != nil {
+ return nil, nil, err
+ }
+ unknownData := in.buffer[start:][:header.byteCount]
+
+ return unknownData, unknownHandles, nil
+}
+
+func unmarshalEnvelopeContent(ctx MarshalerContext, header envelopeHeader, m Marshaler, in *decoder, v unsafevalue.Value, mode unmarshalEnvelopeMode) (bool, error) {
+ outOfLineOffset, err := in.newObject(m.getUnmarshalSize(ctx))
+ if err != nil {
+ return false, err
+ }
+ if err := m.unmarshal(ctx, in, outOfLineOffset, v); err != nil {
+ return false, err
+ }
+
+ return true, nil
+}
+
+func unmarshalEnvelope(ctx MarshalerContext, m Marshaler, in *decoder, offset int, v unsafevalue.Value, mode unmarshalEnvelopeMode) (bool, error) {
+ header, err := unmarshalEnvelopeHeader(in, offset)
+ if err != nil {
+ return false, err
+ }
+
+ if !header.isPresent() {
+ if mode == knownMustBePresent {
+ return false, newValueError(ErrUnexpectedNullRef, v)
+ }
+
+ if header.byteCount != 0 {
+ return false, newValueError(ErrUnexpectedNumBytes, header.byteCount)
+ }
+
+ if header.handleCount != 0 {
+ return false, newValueError(ErrUnexpectedNumHandles, header.handleCount)
+ }
+
+ return false, nil
+ }
+
+ return unmarshalEnvelopeContent(ctx, header, m, in, v, mode)
+}
+
+// closeUnknownFieldHandles closes all of the handles in the provided map,
+// ignoring any errors (best effort).
+func closeUnknownFieldHandles(unknownFields map[uint64]UnknownData) {
+ for _, data := range unknownFields {
+ closeHandles(data.Handles)
+ }
+}
+
+func (m mTable) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ var (
+ maxOrdinal uint64
+ numKnown = len(m.ordinals)
+ fieldPresent = make([]bool, numKnown)
+ unknownData map[uint64]UnknownData
+ )
+
+ rawUnknownData := v.StructFieldOffset(unknownTableDataOffset).Interface()
+ if rawUnknownData != nil {
+ var ok bool
+ unknownData, ok = rawUnknownData.(map[uint64]UnknownData)
+ if !ok {
+ return errorf("internal error (unexpected table I_unknownData type {})", rawUnknownData)
+ }
+ // Determining max ordinal from unknown ordinals.
+ for unknownOrdinal := range unknownData {
+ if maxOrdinal < unknownOrdinal {
+ maxOrdinal = unknownOrdinal
+ }
+ }
+ }
+
+ if m.resourceness == isValueType {
+ for _, data := range unknownData {
+ if len(data.Handles) > 0 {
+ closeUnknownFieldHandles(unknownData)
+ return ErrValueTypeHandles
+ }
+ }
+ }
+
+ // Determining max ordinal from known ordinals.
+ for index := 0; index < numKnown; index++ {
+ fieldPresent[index] = v.StructFieldOffset(m.presenceOffsets[index]).Bool()
+ if fieldPresent[index] {
+ if fieldOrdinal := m.ordinals[index]; maxOrdinal < fieldOrdinal {
+ maxOrdinal = fieldOrdinal
+ }
+ }
+ }
+
+ // Vector of envelopes header.
+ out.writeUint64(offset, maxOrdinal)
+ out.writeUint64(offset+8, allocPresent)
+
+ // Early exit on empty table.
+ if maxOrdinal == 0 {
+ return nil
+ }
+
+ // Encode in the out-of-line object.
+ outOfLineOffset := out.newObject(int(maxOrdinal) * envelopeSize)
+
+ // Envelopes.
+ var (
+ ordinal uint64 = 1
+ index = 0
+ )
+ envelopeOffset := outOfLineOffset
+ for ordinal <= maxOrdinal {
+ fieldKnown := index < numKnown && ordinal == m.ordinals[index]
+ if fieldKnown && fieldPresent[index] {
+ if fieldPresent[index] {
+ if err := marshalEnvelopePresent(ctx, m.fields[index], v.StructFieldOffset(m.fields[index].offset), out, envelopeOffset); err != nil {
+ return err
+ }
+ } else {
+ // This else clause is redundant with the else clause in the top level if statement but
+ // saves a map lookup in the common case (all fields are known)
+ marshalEnvelopeAbsent(out, envelopeOffset)
+ }
+ } else if unknownField, ok := unknownData[ordinal]; ok {
+ marshalEnvelopeUnknown(
+ out,
+ envelopeOffset,
+ unknownField.Bytes,
+ unknownField.Handles,
+ )
+ } else {
+ marshalEnvelopeAbsent(out, envelopeOffset)
+ }
+
+ ordinal++
+ envelopeOffset += 16
+ if fieldKnown {
+ index++
+ }
+ }
+
+ return nil
+}
+
+func (m mTable) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ mou := in.readUint64(offset)
+ // uints/ints are only guaranteed to be 32 bit longs.
+ // we use maxOrdinal as an int, so we must make sure that it fits.
+ if mou > uint64(^uint(0)) {
+ return newValueError(ErrUnexpectedOrdinal, v)
+ }
+ maxOrdinal := mou
+
+ switch allocPtr := in.readUint64(offset + 8); allocPtr {
+ case allocPresent:
+ // good
+ case noAlloc:
+ return newValueError(ErrUnexpectedNullRef, v)
+ default:
+ return newValueError(ErrBadRefEncoding, v)
+ }
+
+ // Early exit on empty table.
+ if maxOrdinal == 0 {
+ return nil
+ }
+
+ // Envelopes.
+ var (
+ numKnown = len(m.ordinals)
+ ordinal uint64 = 1
+ index = 0
+ unknownData map[uint64]UnknownData
+ )
+ outOfLineOffset, err := in.newObject(int(maxOrdinal) * envelopeSize)
+ if err != nil {
+ return err
+ }
+ envelopeOffset := outOfLineOffset
+ for ordinal <= maxOrdinal {
+ fieldKnown := index < numKnown && ordinal == m.ordinals[index]
+ if fieldKnown {
+ if isPresent, err := unmarshalEnvelope(ctx, m.fields[index], in, envelopeOffset, v.StructFieldOffset(m.fields[index].offset), knownMayBeAbsent); err != nil {
+ return err
+ } else if isPresent {
+ v.StructFieldOffset(m.presenceOffsets[index]).SetBool(true)
+ }
+ } else {
+ bytes, handles, err := unmarshalEnvelopeUnknown(in, envelopeOffset)
+ if err != nil {
+ return err
+ }
+ if len(bytes) > 0 || len(handles) > 0 {
+ if unknownData == nil {
+ unknownData = make(map[uint64]UnknownData)
+ v.StructFieldOffset(unknownTableDataOffset).SetInterface(unknownData)
+ }
+ unknownData[ordinal] = UnknownData{
+ Bytes: bytes,
+ Handles: handles,
+ }
+ }
+ }
+ ordinal++
+ envelopeOffset += 16
+ if fieldKnown {
+ index++
+ }
+ }
+
+ if m.resourceness == isValueType {
+ for _, data := range unknownData {
+ if len(data.Handles) > 0 {
+ closeUnknownFieldHandles(unknownData)
+ return ErrValueTypeHandles
+ }
+ }
+ }
+ return nil
+}
+
+type mPointer struct {
+ Marshaler
+ elemTyp reflect.Type
+}
+
+func (m mPointer) getMarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+
+func (m mPointer) getUnmarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+
+func (m mPointer) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ // Nil?
+ if v.PointerIsNil() {
+ out.writeUint64(offset, noAlloc)
+ return nil
+ }
+
+ // Write out allocation marker.
+ out.writeUint64(offset, allocPresent)
+
+ // Set up the out-of-line space.
+ outOfLineOffset := out.newObject(align(m.Marshaler.getMarshalSize(ctx), 8))
+
+ // Marshal field.
+ if err := m.Marshaler.marshal(ctx, v.PointerElem(), out, outOfLineOffset); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (m mPointer) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ // Nil?
+ switch ptr := in.readUint64(offset); ptr {
+ case noAlloc:
+ v.PointerSetNil()
+ return nil
+ case allocPresent:
+ // good
+ default:
+ return newValueError(ErrBadRefEncoding, v)
+ }
+
+ // Create the new struct.
+ v.PointerSetNew(m.elemTyp)
+
+ // Set up the out-of-line space and the head.
+ outOfLineOffset, err := in.newObject(m.Marshaler.getUnmarshalSize(ctx))
+ if err != nil {
+ return err
+ }
+
+ // Unmarshal field.
+ if err := m.Marshaler.unmarshal(ctx, in, outOfLineOffset, v.PointerElem()); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+type mOptUnion struct {
+ mPointer
+ mOptXUnion
+}
+
+func (m mOptUnion) getMarshalSize(ctx MarshalerContext) int {
+ return 24
+}
+
+func (m mOptUnion) getUnmarshalSize(ctx MarshalerContext) int {
+ return 24
+}
+
+func (m mOptUnion) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ return m.mOptXUnion.marshal(ctx, v, out, offset)
+}
+
+func (m mOptUnion) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ return m.mOptXUnion.unmarshal(ctx, in, offset, v)
+}
+
+type mArray struct {
+ Marshaler
+ rtElemSize uintptr
+ size int
+}
+
+func (m mArray) getMarshalSize(ctx MarshalerContext) int {
+ return m.size * m.Marshaler.getMarshalSize(ctx)
+}
+func (m mArray) getUnmarshalSize(ctx MarshalerContext) int {
+ return m.size * m.Marshaler.getUnmarshalSize(ctx)
+}
+
+func (m mArray) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ elemSize := m.Marshaler.getMarshalSize(ctx)
+ for i, len := 0, m.size; i < len; i++ {
+ if err := m.Marshaler.marshal(ctx, v.ArrayIndex(m.rtElemSize, i), out, offset+i*elemSize); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (m mArray) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ elemSize := m.Marshaler.getUnmarshalSize(ctx)
+ for i, len := 0, m.size; i < len; i++ {
+ if err := m.Marshaler.unmarshal(ctx, in, offset+i*elemSize, v.ArrayIndex(m.rtElemSize, i)); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+type mVector struct {
+ Marshaler
+ maxSize int
+ elemTyp reflect.Type
+ useUnsafeCopy bool
+}
+
+func (m mVector) getMarshalSize(ctx MarshalerContext) int {
+ return 16
+}
+func (m mVector) getUnmarshalSize(ctx MarshalerContext) int {
+ return 16
+}
+
+func (m mVector) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ // Bounds check.
+ vLen := v.SliceLen()
+ if m.maxSize < vLen {
+ return newExpectError(ErrVectorTooLong, m.maxSize, vLen)
+ }
+
+ // Vector header.
+ out.writeUint64(offset, uint64(vLen))
+ out.writeUint64(offset+8, allocPresent)
+
+ // Early exit if the vector is empty.
+ if vLen == 0 {
+ return nil
+ }
+
+ // Encode in the out-of-line object.
+ outOfLineOffset := out.newObject(vLen * m.Marshaler.getMarshalSize(ctx))
+
+ // Marshal elements.
+ wireElemSize := m.Marshaler.getMarshalSize(ctx)
+ if m.useUnsafeCopy {
+ var bytes []byte
+ sh := (*reflect.SliceHeader)(unsafe.Pointer(&bytes))
+ sh.Data = (*reflect.SliceHeader)(unsafe.Pointer(v.UnsafeAddr())).Data
+ sh.Len = vLen * wireElemSize
+ sh.Cap = vLen * wireElemSize
+ copy(out.buffer[outOfLineOffset:], bytes)
+ } else {
+ elemTypSize := m.elemTyp.Size()
+ for i := 0; i < vLen; i++ {
+ if err := m.Marshaler.marshal(ctx, v.SliceIndex(elemTypSize, i), out, outOfLineOffset+i*wireElemSize); err != nil {
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+func (m mVector) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ size := in.readUint64(offset)
+ ptr := in.readUint64(offset + 8)
+ switch ptr {
+ case noAlloc:
+ return newValueError(ErrUnexpectedNullRef, v)
+ case allocPresent:
+ return m.unmarshalWithUncheckedSize(ctx, in, v, int(size))
+ default:
+ return newValueError(ErrBadRefEncoding, v)
+ }
+}
+
+func (m mVector) unmarshalWithUncheckedSize(ctx MarshalerContext, in *decoder, v unsafevalue.Value, size int) error {
+ if size < 0 || m.maxSize < size {
+ return newExpectError(ErrVectorTooLong, m.maxSize, size)
+ }
+
+ // Unmarshal in the out-of-line object.
+ elemSize := m.Marshaler.getUnmarshalSize(ctx)
+ outOfLineOffset, err := in.newObject(size * elemSize)
+ if err != nil {
+ return err
+ }
+
+ // Unmarshal elements.
+ if m.useUnsafeCopy {
+ // Copy the data as bytes, then construct a slice header with the appropriate size
+ // for the slice type (if it is not bytes).
+ s := make([]byte, size*m.Marshaler.getUnmarshalSize(ctx))
+ copy(s, in.buffer[outOfLineOffset:])
+ sh := (*reflect.SliceHeader)(unsafe.Pointer(v.UnsafeAddr()))
+ sh.Data = (*reflect.SliceHeader)(unsafe.Pointer(&s)).Data
+ sh.Len = size
+ sh.Cap = size
+ } else {
+ elemTypSize := m.elemTyp.Size()
+ v.SliceSetMakeSlice(m.elemTyp, size, size)
+ for i := 0; i < size; i++ {
+ if err := m.Marshaler.unmarshal(ctx, in, outOfLineOffset+i*elemSize, v.SliceIndex(elemTypSize, i)); err != nil {
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+type mOptVector struct {
+ mVector
+ sliceTyp reflect.Type
+}
+
+func (m mOptVector) getMarshalSize(ctx MarshalerContext) int {
+ return 16
+}
+func (m mOptVector) getUnmarshalSize(ctx MarshalerContext) int {
+ return 16
+}
+
+func (m mOptVector) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if v.PointerIsNil() {
+ out.writeUint64(offset, 0)
+ out.writeUint64(offset+8, noAlloc)
+ return nil
+ }
+
+ return m.mVector.marshal(ctx, v.PointerElem(), out, offset)
+}
+
+func (m mOptVector) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ size := in.readUint64(offset)
+ ptr := in.readUint64(offset + 8)
+ switch ptr {
+ case noAlloc:
+ v.PointerSetNil()
+ return nil
+ case allocPresent:
+ v.PointerSetNew(m.sliceTyp)
+ return m.mVector.unmarshalWithUncheckedSize(ctx, in, v.PointerElem(), int(size))
+ default:
+ return newValueError(ErrBadRefEncoding, v)
+ }
+}
+
+type mBool struct{}
+
+func (m mBool) getMarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+func (m mBool) getUnmarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+
+func (m mBool) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if v.Bool() {
+ out.writeUint8(offset, 1)
+ } else {
+ out.writeUint8(offset, 0)
+ }
+ return nil
+}
+
+func (m mBool) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ b := in.readUint8(offset)
+ switch b {
+ case 0, 1:
+ v.SetBool(b == 1)
+ return nil
+ default:
+ return newValueError(ErrInvalidBoolValue, b)
+ }
+}
+
+type mInt8 struct{}
+
+func (m mInt8) getMarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+func (m mInt8) getUnmarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+
+func (m mInt8) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint8(offset, uint8(v.Int8()))
+ return nil
+}
+
+func (m mInt8) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetInt8(int8(in.readUint8(offset)))
+ return nil
+}
+
+type mInt16 struct{}
+
+func (m mInt16) getMarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+func (m mInt16) getUnmarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+
+func (m mInt16) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint16(offset, uint16(v.Int16()))
+ return nil
+}
+
+func (m mInt16) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetInt16(int16(in.readUint16(offset)))
+ return nil
+}
+
+type mInt32 struct{}
+
+func (m mInt32) getMarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+func (m mInt32) getUnmarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+
+func (m mInt32) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint32(offset, uint32(v.Int32()))
+ return nil
+}
+
+func (m mInt32) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetInt32(int32(in.readUint32(offset)))
+ return nil
+}
+
+type mInt64 struct{}
+
+func (m mInt64) getMarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+func (m mInt64) getUnmarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+
+func (m mInt64) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint64(offset, uint64(v.Int64()))
+ return nil
+}
+
+func (m mInt64) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetInt64(int64(in.readUint64(offset)))
+ return nil
+}
+
+type mUint8 struct{}
+
+func (m mUint8) getMarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+func (m mUint8) getUnmarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+
+func (m mUint8) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint8(offset, v.Uint8())
+ return nil
+}
+
+func (m mUint8) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetUint8(in.readUint8(offset))
+ return nil
+}
+
+type mUint16 struct{}
+
+func (m mUint16) getMarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+func (m mUint16) getUnmarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+
+func (m mUint16) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint16(offset, v.Uint16())
+ return nil
+}
+
+func (m mUint16) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetUint16(in.readUint16(offset))
+ return nil
+}
+
+type mUint32 struct{}
+
+func (m mUint32) getMarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+func (m mUint32) getUnmarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+
+func (m mUint32) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint32(offset, v.Uint32())
+ return nil
+}
+
+func (m mUint32) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetUint32(in.readUint32(offset))
+ return nil
+}
+
+type mUint64 struct{}
+
+func (m mUint64) getMarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+func (m mUint64) getUnmarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+
+func (m mUint64) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint64(offset, v.Uint64())
+ return nil
+}
+
+func (m mUint64) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetUint64(in.readUint64(offset))
+ return nil
+}
+
+type mEnumOfInt8 struct {
+ isStrict bool
+ values map[int8]struct{}
+}
+
+func (m mEnumOfInt8) getMarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+func (m mEnumOfInt8) getUnmarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+
+func (m mEnumOfInt8) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if _, ok := m.values[v.Int8()]; !ok {
+ return newValueError(ErrInvalidEnumValue, v.Int8())
+ }
+ }
+ out.writeUint8(offset, uint8(v.Int8()))
+ return nil
+}
+
+func (m mEnumOfInt8) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := int8(in.readUint8(offset))
+ if m.isStrict {
+ if _, ok := m.values[i]; !ok {
+ return newValueError(ErrInvalidEnumValue, i)
+ }
+ }
+ v.SetInt8(i)
+ return nil
+}
+
+type mEnumOfInt16 struct {
+ isStrict bool
+ values map[int16]struct{}
+}
+
+func (m mEnumOfInt16) getMarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+func (m mEnumOfInt16) getUnmarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+
+func (m mEnumOfInt16) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if _, ok := m.values[v.Int16()]; !ok {
+ return newValueError(ErrInvalidEnumValue, v.Int16())
+ }
+ }
+ out.writeUint16(offset, uint16(v.Int16()))
+ return nil
+}
+
+func (m mEnumOfInt16) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := int16(in.readUint16(offset))
+ if m.isStrict {
+ if _, ok := m.values[i]; !ok {
+ return newValueError(ErrInvalidEnumValue, i)
+ }
+ }
+ v.SetInt16(i)
+ return nil
+}
+
+type mEnumOfInt32 struct {
+ isStrict bool
+ values map[int32]struct{}
+}
+
+func (m mEnumOfInt32) getMarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+func (m mEnumOfInt32) getUnmarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+
+func (m mEnumOfInt32) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if _, ok := m.values[v.Int32()]; !ok {
+ return newValueError(ErrInvalidEnumValue, v.Int32())
+ }
+ }
+ out.writeUint32(offset, uint32(v.Int32()))
+ return nil
+}
+
+func (m mEnumOfInt32) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := int32(in.readUint32(offset))
+ if m.isStrict {
+ if _, ok := m.values[i]; !ok {
+ return newValueError(ErrInvalidEnumValue, i)
+ }
+ }
+ v.SetInt32(i)
+ return nil
+}
+
+type mEnumOfInt64 struct {
+ isStrict bool
+ values map[int64]struct{}
+}
+
+func (m mEnumOfInt64) getMarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+func (m mEnumOfInt64) getUnmarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+
+func (m mEnumOfInt64) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if _, ok := m.values[v.Int64()]; !ok {
+ return newValueError(ErrInvalidEnumValue, v.Int64())
+ }
+ }
+ out.writeUint64(offset, uint64(v.Int64()))
+ return nil
+}
+
+func (m mEnumOfInt64) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := int64(in.readUint64(offset))
+ if m.isStrict {
+ if _, ok := m.values[i]; !ok {
+ return newValueError(ErrInvalidEnumValue, i)
+ }
+ }
+ v.SetInt64(i)
+ return nil
+}
+
+type mEnumOfUint8 struct {
+ isStrict bool
+ values map[uint8]struct{}
+}
+
+func (m mEnumOfUint8) getMarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+func (m mEnumOfUint8) getUnmarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+
+func (m mEnumOfUint8) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if _, ok := m.values[v.Uint8()]; !ok {
+ return newValueError(ErrInvalidEnumValue, v.Uint8())
+ }
+ }
+ out.writeUint8(offset, v.Uint8())
+ return nil
+}
+
+func (m mEnumOfUint8) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := in.readUint8(offset)
+ if m.isStrict {
+ if _, ok := m.values[i]; !ok {
+ return newValueError(ErrInvalidEnumValue, i)
+ }
+ }
+ v.SetUint8(i)
+ return nil
+}
+
+type mEnumOfUint16 struct {
+ isStrict bool
+ values map[uint16]struct{}
+}
+
+func (m mEnumOfUint16) getMarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+func (m mEnumOfUint16) getUnmarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+
+func (m mEnumOfUint16) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if _, ok := m.values[v.Uint16()]; !ok {
+ return newValueError(ErrInvalidEnumValue, v.Uint16())
+ }
+ }
+ out.writeUint16(offset, v.Uint16())
+ return nil
+}
+
+func (m mEnumOfUint16) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := in.readUint16(offset)
+ if m.isStrict {
+ if _, ok := m.values[i]; !ok {
+ return newValueError(ErrInvalidEnumValue, i)
+ }
+ }
+ v.SetUint16(i)
+ return nil
+}
+
+type mEnumOfUint32 struct {
+ isStrict bool
+ values map[uint32]struct{}
+}
+
+func (m mEnumOfUint32) getMarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+func (m mEnumOfUint32) getUnmarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+
+func (m mEnumOfUint32) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if _, ok := m.values[v.Uint32()]; !ok {
+ return newValueError(ErrInvalidEnumValue, v.Uint32())
+ }
+ }
+ out.writeUint32(offset, v.Uint32())
+ return nil
+}
+
+func (m mEnumOfUint32) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := in.readUint32(offset)
+ if m.isStrict {
+ if _, ok := m.values[i]; !ok {
+ return newValueError(ErrInvalidEnumValue, i)
+ }
+ }
+ v.SetUint32(i)
+ return nil
+}
+
+type mEnumOfUint64 struct {
+ isStrict bool
+ values map[uint64]struct{}
+}
+
+func (m mEnumOfUint64) getMarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+func (m mEnumOfUint64) getUnmarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+
+func (m mEnumOfUint64) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if _, ok := m.values[v.Uint64()]; !ok {
+ return newValueError(ErrInvalidEnumValue, v.Uint64())
+ }
+ }
+ out.writeUint64(offset, v.Uint64())
+ return nil
+}
+
+func (m mEnumOfUint64) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := in.readUint64(offset)
+ if m.isStrict {
+ if _, ok := m.values[i]; !ok {
+ return newValueError(ErrInvalidEnumValue, i)
+ }
+ }
+ v.SetUint64(i)
+ return nil
+}
+
+type mBitsOfUint8 struct {
+ isStrict bool
+ mask uint8
+}
+
+func (m mBitsOfUint8) getMarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+func (m mBitsOfUint8) getUnmarshalSize(ctx MarshalerContext) int {
+ return 1
+}
+
+func (m mBitsOfUint8) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if (v.Uint8() & m.mask) != v.Uint8() {
+ return newValueError(ErrInvalidBitsValue, v.Uint8())
+ }
+ }
+ out.writeUint8(offset, v.Uint8())
+ return nil
+}
+
+func (m mBitsOfUint8) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := in.readUint8(offset)
+ if m.isStrict {
+ if (i & m.mask) != i {
+ return newValueError(ErrInvalidBitsValue, i)
+ }
+ }
+ v.SetUint8(i)
+ return nil
+}
+
+type mBitsOfUint16 struct {
+ isStrict bool
+ mask uint16
+}
+
+func (m mBitsOfUint16) getMarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+func (m mBitsOfUint16) getUnmarshalSize(ctx MarshalerContext) int {
+ return 2
+}
+
+func (m mBitsOfUint16) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if (v.Uint16() & m.mask) != v.Uint16() {
+ return newValueError(ErrInvalidBitsValue, v.Uint16())
+ }
+ }
+ out.writeUint16(offset, v.Uint16())
+ return nil
+}
+
+func (m mBitsOfUint16) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := in.readUint16(offset)
+ if m.isStrict {
+ if (i & m.mask) != i {
+ return newValueError(ErrInvalidBitsValue, i)
+ }
+ }
+ v.SetUint16(i)
+ return nil
+}
+
+type mBitsOfUint32 struct {
+ isStrict bool
+ mask uint32
+}
+
+func (m mBitsOfUint32) getMarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+func (m mBitsOfUint32) getUnmarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+
+func (m mBitsOfUint32) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if (v.Uint32() & m.mask) != v.Uint32() {
+ return newValueError(ErrInvalidBitsValue, v.Uint32())
+ }
+ }
+ out.writeUint32(offset, v.Uint32())
+ return nil
+}
+
+func (m mBitsOfUint32) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := in.readUint32(offset)
+ if m.isStrict {
+ if (i & m.mask) != i {
+ return newValueError(ErrInvalidBitsValue, i)
+ }
+ }
+ v.SetUint32(i)
+ return nil
+}
+
+type mBitsOfUint64 struct {
+ isStrict bool
+ mask uint64
+}
+
+func (m mBitsOfUint64) getMarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+func (m mBitsOfUint64) getUnmarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+
+func (m mBitsOfUint64) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if m.isStrict {
+ if (v.Uint64() & m.mask) != v.Uint64() {
+ return newValueError(ErrInvalidBitsValue, v.Uint64())
+ }
+ }
+ out.writeUint64(offset, v.Uint64())
+ return nil
+}
+
+func (m mBitsOfUint64) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ i := in.readUint64(offset)
+ if m.isStrict {
+ if (i & m.mask) != i {
+ return newValueError(ErrInvalidBitsValue, i)
+ }
+ }
+ v.SetUint64(i)
+ return nil
+}
+
+type mFloat32 struct{}
+
+func (m mFloat32) getMarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+func (m mFloat32) getUnmarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+
+func (m mFloat32) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint32(offset, math.Float32bits(v.Float32()))
+ return nil
+}
+
+func (m mFloat32) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetFloat32(math.Float32frombits(in.readUint32(offset)))
+ return nil
+}
+
+type mFloat64 struct{}
+
+func (m mFloat64) getMarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+func (m mFloat64) getUnmarshalSize(ctx MarshalerContext) int {
+ return 8
+}
+
+func (m mFloat64) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ out.writeUint64(offset, math.Float64bits(v.Float64()))
+ return nil
+}
+
+func (m mFloat64) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ v.SetFloat64(math.Float64frombits(in.readUint64(offset)))
+ return nil
+}
+
+type mString int
+
+func (m mString) getMarshalSize(ctx MarshalerContext) int {
+ return 16
+}
+func (m mString) getUnmarshalSize(ctx MarshalerContext) int {
+ return 16
+}
+
+func (m mString) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ var (
+ maxSize = int(m)
+ s = v.String()
+ length = len(s)
+ )
+ if maxSize < length {
+ return newExpectError(ErrStringTooLong, maxSize, length)
+ }
+
+ if !utf8.ValidString(s) {
+ return newValueError(ErrStringNotUTF8, v)
+ }
+
+ // length, allocPresent
+ out.writeUint64(offset, uint64(length))
+ out.writeUint64(offset+8, allocPresent)
+
+ // Create a new out-of-line object and write bytes of the string.
+ head := out.newObject(length)
+ copy(out.buffer[head:], s)
+
+ return nil
+}
+
+func (m mString) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ size := in.readUint64(offset)
+ ptr := in.readUint64(offset + 8)
+ switch ptr {
+ case noAlloc:
+ return newValueError(ErrUnexpectedNullRef, "string")
+ case allocPresent:
+ return m.unmarshalWithUncheckedSize(in, v, int(size))
+ default:
+ return newValueError(ErrBadRefEncoding, "string")
+ }
+}
+
+func (m mString) unmarshalWithUncheckedSize(in *decoder, v unsafevalue.Value, size int) error {
+ if maxSize := int(m); size < 0 || maxSize < size {
+ return newExpectError(ErrStringTooLong, maxSize, size)
+ }
+ start, err := in.newObject(size)
+ if err != nil {
+ return err
+ }
+ s := string(in.buffer[start:][:size])
+ if !utf8.ValidString(s) {
+ return newValueError(ErrStringNotUTF8, v)
+ }
+ v.SetString(s)
+ return nil
+}
+
+type mOptString uint64
+
+func (m mOptString) getMarshalSize(ctx MarshalerContext) int {
+ return 16
+}
+func (m mOptString) getUnmarshalSize(ctx MarshalerContext) int {
+ return 16
+}
+
+func (m mOptString) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ if v.PointerIsNil() {
+ out.writeUint64(offset, 0)
+ out.writeUint64(offset+8, noAlloc)
+ return nil
+ }
+
+ return mString(m).marshal(ctx, v.PointerElem(), out, offset)
+}
+
+var (
+ typString = reflect.TypeOf("")
+)
+
+func (m mOptString) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ size := in.readUint64(offset)
+ ptr := in.readUint64(offset + 8)
+ switch ptr {
+ case noAlloc:
+ v.PointerSetNil()
+ return nil
+ case allocPresent:
+ v.PointerSetNew(typString)
+ return mString(m).unmarshalWithUncheckedSize(in, v.PointerElem(), int(size))
+ default:
+ return newValueError(ErrBadRefEncoding, v)
+ }
+}
+
+type mHandle struct {
+ nullable bool
+ rights zx.Rights
+ subtype zx.ObjectType
+}
+
+func (m mHandle) getMarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+func (m mHandle) getUnmarshalSize(ctx MarshalerContext) int {
+ return 4
+}
+
+func (m mHandle) isOpt() bool {
+ return m.nullable
+}
+
+func (m mHandle) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ // The underlying type of all the handles is a uint32, so we're
+ // safe calling Uint(). This will panic if that is no longer true.
+ raw := zx.Handle(v.Uint32())
+ if raw == zx.HandleInvalid {
+ if !m.isOpt() {
+ return ErrUnexpectedNullHandle
+ }
+ out.writeUint32(offset, noHandle)
+ return nil
+ }
+ out.handleDispositions = append(out.handleDispositions, zx.HandleDisposition{
+ Operation: zx.HandleOpMove,
+ Handle: raw,
+ Type: m.subtype,
+ Rights: m.rights,
+ Result: zx.ErrOk,
+ })
+ out.writeUint32(offset, handlePresent)
+ return nil
+}
+
+func (m mHandle) requiredRightsArePresent(actual zx.Rights) bool {
+ if m.rights == zx.RightSameRights {
+ return true
+ }
+ return actual.SupersetOf(m.rights)
+}
+
+func (m mHandle) filterOutUnspecifiedRights(actual zx.Rights) zx.Rights {
+ if m.rights == zx.RightSameRights {
+ return actual
+ }
+ return actual & m.rights
+}
+
+func (m mHandle) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ h := in.readUint32(offset)
+ switch uint32(h) {
+ case noHandle:
+ if !m.isOpt() {
+ return ErrUnexpectedNullHandle
+ }
+ v.SetUint32(uint32(zx.HandleInvalid))
+ return nil
+ case handlePresent:
+ if len(in.handleInfos) == 0 {
+ return ErrNotEnoughHandles
+ }
+ handleInfo := in.handleInfos[0]
+ in.handleInfos = in.handleInfos[1:]
+
+ if !m.requiredRightsArePresent(handleInfo.Rights) {
+ return newExpectError(ErrMissingRequiredHandleRights, m.rights, handleInfo.Rights)
+ }
+
+ handle := handleInfo.Handle
+ reducedRights := m.filterOutUnspecifiedRights(handleInfo.Rights)
+ if handleInfo.Rights != reducedRights {
+ handle, err := handleReplace(handle, reducedRights)
+ if err != nil {
+ return newValueError(ErrUnableToReduceHandleRights, handle)
+ }
+ }
+
+ if m.subtype != zx.ObjectTypeNone && m.subtype != handleInfo.Type {
+ return newExpectError(ErrIncorrectHandleType, m.subtype, handleInfo.Type)
+ }
+
+ v.SetUint32(uint32(handle))
+ return nil
+ default:
+ return newValueError(ErrBadHandleEncoding, h)
+ }
+}
+
+// mProtocol marshals FIDL protocols' client and server ends. A client end
+// (a.k.a "a protocol") is represented by a `Proxy`, whose first field is a
+// `zx.Channel`. Similarly, a server end (a.k.a. "a protocol request") is
+// represented by an `InterfaceRequest` whose first field is a `zx.Channel`.
+type mProtocol mHandle
+
+func (m mProtocol) getMarshalSize(ctx MarshalerContext) int {
+ return mHandle(m).getMarshalSize(ctx)
+}
+func (m mProtocol) getUnmarshalSize(ctx MarshalerContext) int {
+ return mHandle(m).getUnmarshalSize(ctx)
+}
+
+func (m mProtocol) marshal(ctx MarshalerContext, v unsafevalue.Value, out *encoder, offset int) error {
+ return mHandle(m).marshal(ctx, v.StructFieldOffset(0), out, offset)
+}
+
+func (m mProtocol) unmarshal(ctx MarshalerContext, in *decoder, offset int, v unsafevalue.Value) error {
+ return mHandle(m).unmarshal(ctx, in, offset, v.StructFieldOffset(0))
+}
diff --git a/src/syscall/zx/fidl/errors.go b/src/syscall/zx/fidl/errors.go
new file mode 100644
index 0000000..b2ef982
--- /dev/null
+++ b/src/syscall/zx/fidl/errors.go
@@ -0,0 +1,272 @@
+// 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 fidl
+
+import (
+ "reflect"
+ "strconv"
+)
+
+// ValidationError represents an error produced in validating a FIDL structure.
+type ValidationError interface {
+ error
+
+ // Code returns the underlying ErrorCode value, which all ValidationErrors
+ // must have.
+ Code() ErrorCode
+}
+
+// Assert that valueError and expectError both implement the ValidationError
+// interface.
+var _ = []ValidationError{
+ valueError{},
+ expectError{},
+}
+
+// ErrorCode represents a set of machine-readable error codes each ValidationError
+// has.
+type ErrorCode uint32
+
+const (
+ Invalid ErrorCode = iota
+ ErrUnknownOrdinal
+ ErrInvalidInlineType
+ ErrInvalidPointerType
+ ErrVectorTooLong
+ ErrStringTooLong
+ ErrUnexpectedOrdinal
+ ErrUnexpectedNullHandle
+ ErrUnexpectedNullRef
+ ErrInvalidBoolValue
+ ErrNotEnoughHandles
+ ErrTooManyHandles
+ ErrBadHandleEncoding
+ ErrNonZeroPadding
+ ErrBadRefEncoding
+ ErrStructIsNotPayload
+ ErrInvalidUnionTag
+ ErrInvalidXUnionTag
+ ErrInvalidBitsValue
+ ErrInvalidEnumValue
+ ErrPayloadTooSmall
+ ErrInvalidEmptyStruct
+ ErrUnexpectedNumBytes
+ ErrUnexpectedNumHandles
+ ErrStringNotUTF8
+ ErrUnknownMagic
+ ErrMissingRequiredHandleRights
+ ErrUnableToReduceHandleRights
+ ErrUnspecifiedHandleRights
+ ErrMissingMarshalerContext
+ ErrResponseWithoutRequest
+ ErrDuplicateTxidReceived
+ ErrDuplicateTxidWaiting
+ ErrIncorrectHandleType
+ ErrUnspecifiedHandleType
+ ErrValueTypeHandles
+)
+
+var errorCodeNames = []string{
+ Invalid: "Invalid",
+ ErrUnknownOrdinal: "ErrUnknownOrdinal",
+ ErrInvalidInlineType: "ErrInvalidInlineType",
+ ErrInvalidPointerType: "ErrInvalidPointerType",
+ ErrVectorTooLong: "ErrVectorTooLong",
+ ErrStringTooLong: "ErrStringTooLong",
+ ErrUnexpectedOrdinal: "ErrUnexpectedOrdinal",
+ ErrUnexpectedNullHandle: "ErrUnexpectedNullHandle",
+ ErrUnexpectedNullRef: "ErrUnexpectedNullRef",
+ ErrInvalidBoolValue: "ErrInvalidBoolValue",
+ ErrNotEnoughHandles: "ErrNotEnoughHandles",
+ ErrTooManyHandles: "ErrTooManyHandles",
+ ErrNonZeroPadding: "ErrNonZeroPadding",
+ ErrBadHandleEncoding: "ErrBadHandleEncoding",
+ ErrBadRefEncoding: "ErrBadRefEncoding",
+ ErrStructIsNotPayload: "ErrStructIsNotPayload",
+ ErrInvalidUnionTag: "ErrInvalidUnionTag",
+ ErrInvalidXUnionTag: "ErrInvalidXUnionTag",
+ ErrInvalidBitsValue: "ErrInvalidBitsValue",
+ ErrInvalidEnumValue: "ErrInvalidEnumValue",
+ ErrPayloadTooSmall: "ErrPayloadTooSmall",
+ ErrInvalidEmptyStruct: "ErrInvalidEmptyStruct",
+ ErrUnexpectedNumBytes: "ErrUnexpectedNumBytes",
+ ErrUnexpectedNumHandles: "ErrUnexpectedNumHandles",
+ ErrStringNotUTF8: "ErrStringNotUTF8",
+ ErrUnknownMagic: "ErrUnknownMagic",
+ ErrMissingRequiredHandleRights: "ErrMissingRequiredHandleRights",
+ ErrUnableToReduceHandleRights: "ErrUnableToReduceHandleRights",
+ ErrUnspecifiedHandleRights: "ErrUnspecifiedHandleRights",
+ ErrMissingMarshalerContext: "ErrMissingMarshalerContext",
+ ErrResponseWithoutRequest: "ErrResponseWithoutRequest",
+ ErrDuplicateTxidReceived: "ErrDuplicateTxidReceived",
+ ErrDuplicateTxidWaiting: "ErrDuplicateTxidWaiting",
+ ErrIncorrectHandleType: "ErrIncorrectHandleType",
+ ErrUnspecifiedHandleType: "ErrUnspecifiedHandleType",
+ ErrValueTypeHandles: "ErrValueTypeHandles",
+}
+
+func (c ErrorCode) String() string {
+ if len(errorCodeNames) < int(c) {
+ return strconv.Itoa(int(c))
+ }
+ return errorCodeNames[int(c)]
+}
+
+// Error implements error for ErrorCode
+func (e ErrorCode) Error() string {
+ switch e {
+ case ErrUnknownOrdinal:
+ return "unknown ordinal"
+ case ErrInvalidInlineType:
+ return "invalid inline type"
+ case ErrInvalidPointerType:
+ return "invalid pointer type"
+ case ErrVectorTooLong:
+ return "vector exceeds maximum size"
+ case ErrStringTooLong:
+ return "string exceeds maximum size"
+ case ErrUnexpectedOrdinal:
+ return "unexpected ordinal"
+ case ErrUnexpectedNullHandle:
+ return "unexpected null handle"
+ case ErrUnexpectedNullRef:
+ return "unexpected null reference"
+ case ErrInvalidBoolValue:
+ return "unexpected boolean value"
+ case ErrNotEnoughHandles:
+ return "not enough handles"
+ case ErrTooManyHandles:
+ return "too many handles"
+ case ErrBadHandleEncoding:
+ return "bad encoding for handle"
+ case ErrNonZeroPadding:
+ return "invalid non-zero padding"
+ case ErrBadRefEncoding:
+ return "bad encoding for ref"
+ case ErrStructIsNotPayload:
+ return "golang struct type must implement Payload"
+ case ErrInvalidUnionTag:
+ return "union tag out of bounds"
+ case ErrInvalidXUnionTag:
+ return "strict xunion has unknown tag"
+ case ErrInvalidBitsValue:
+ return "invalid bits value"
+ case ErrInvalidEnumValue:
+ return "invalid enum value"
+ case ErrPayloadTooSmall:
+ return "payload too small"
+ case ErrInvalidEmptyStruct:
+ return "invalid empty struct"
+ case ErrUnexpectedNumBytes:
+ return "unexpected num bytes"
+ case ErrUnexpectedNumHandles:
+ return "unexpected num handles"
+ case ErrStringNotUTF8:
+ return "string is not valid UTF8"
+ case ErrUnknownMagic:
+ return "header magic number is not supported"
+ case ErrMissingRequiredHandleRights:
+ return "missing required handle rights"
+ case ErrUnableToReduceHandleRights:
+ return "unable to reduce handle rights"
+ case ErrUnspecifiedHandleRights:
+ return "handle rights are unspecified"
+ case ErrMissingMarshalerContext:
+ return "missing marshaler context"
+ case ErrResponseWithoutRequest:
+ return "received response without request (unexpected transaction id in mesage)"
+ case ErrDuplicateTxidReceived:
+ return "received multiple messages with the same transaction id"
+ case ErrDuplicateTxidWaiting:
+ return "multiple channel calls waiting on same transaction id"
+ case ErrIncorrectHandleType:
+ return "handle type is incorrect"
+ case ErrUnspecifiedHandleType:
+ return "handle type is unspecified"
+ case ErrValueTypeHandles:
+ return "cannot encode or decode value type with handles in unknown data"
+ default:
+ return e.String()
+ }
+}
+
+// Code implements the ValidationError interface.
+func (e ErrorCode) Code() ErrorCode {
+ return e
+}
+
+// stringer is an interface for types for which a string representation
+// may be derived.
+type stringer interface {
+ String() string
+}
+
+// toString generates the string representation for a limited set of types.
+func toString(value interface{}) string {
+ if e, ok := value.(error); ok {
+ return e.Error()
+ }
+ if s, ok := value.(stringer); ok {
+ return s.String()
+ }
+ if numbers, ok := value.([]uint64); ok {
+ s := "["
+ for _, num := range numbers {
+ s += strconv.FormatUint(num, 10)
+ s += " "
+ }
+ s += "]"
+ return s
+ }
+ t := reflect.TypeOf(value)
+ switch t.Kind() {
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ return strconv.FormatInt(reflect.ValueOf(value).Int(), 10)
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
+ return strconv.FormatUint(reflect.ValueOf(value).Uint(), 10)
+ case reflect.String:
+ return value.(string)
+ default:
+ return "##BADVALUE##"
+ }
+}
+
+// valueError represents an error that refers to a single value.
+type valueError struct {
+ ErrorCode
+ value interface{}
+}
+
+func newValueError(code ErrorCode, value interface{}) valueError {
+ return valueError{
+ ErrorCode: code,
+ value: value,
+ }
+}
+
+func (e valueError) Error() string {
+ return e.ErrorCode.Error() + ": " + toString(e.value)
+}
+
+// expectError represents an error that refers to the expectation of a
+// certain value, and displays a comparison between the actual value and
+// the expected value.
+type expectError struct {
+ ErrorCode
+ expect interface{}
+ actual interface{}
+}
+
+func newExpectError(code ErrorCode, expect, actual interface{}) expectError {
+ return expectError{
+ ErrorCode: code,
+ expect: expect,
+ actual: actual,
+ }
+}
+
+func (e expectError) Error() string {
+ return e.ErrorCode.Error() + ": expected " + toString(e.expect) + ", got " + toString(e.actual)
+}
diff --git a/src/syscall/zx/fidl/fidl_test/README b/src/syscall/zx/fidl/fidl_test/README
new file mode 100644
index 0000000..24beb3c
--- /dev/null
+++ b/src/syscall/zx/fidl/fidl_test/README
@@ -0,0 +1,9 @@
+# Adding new test files
+
+New test files must be in the `fidl_test` package, and have a `_test.go`
+suffix in the file name.
+
+Adding a non `_test.go` file with `package fidl_test` will result in
+error messages about declaring multiple packages (`fidl` and `fidl_test`)
+because Go strips the `_test` suffix from packages in `_test.go`
+files only, when there are non `_test.go` files in the directory.
diff --git a/src/syscall/zx/fidl/fidl_test/encoding_fuchsia_test.go b/src/syscall/zx/fidl/fidl_test/encoding_fuchsia_test.go
new file mode 100644
index 0000000..d7ded09
--- /dev/null
+++ b/src/syscall/zx/fidl/fidl_test/encoding_fuchsia_test.go
@@ -0,0 +1,866 @@
+// Copyright 2018 The Fuchsia 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 fidl_test
+
+import (
+ "fmt"
+ "reflect"
+ "strings"
+ "syscall/zx"
+ "syscall/zx/fidl"
+ "syscall/zx/fidl/internal/bindingstest"
+ "testing"
+)
+
+var testCtx fidl.MarshalerContext
+
+func TestMarshalMessageHeader(t *testing.T) {
+ data := []byte{
+ 0x12, 0x34, 0x56, 0x78, // txid
+ 0xAB, 0xCD, 0xEF, // flags
+ 0x01, // magic number
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // method ordinal
+ }
+ var header fidl.MessageHeader
+ hnb, _, err := fidl.Unmarshal(data, nil, &header)
+ if err != nil {
+ t.Fatalf("unmarshal failed: %s", err)
+ }
+ if hnb != 16 {
+ t.Fatalf("expected 16 bytes read, was %d", hnb)
+ }
+ if header.Magic != 0x01 {
+ t.Fatalf("expected header txid of 0x01, was %x", header.Magic)
+ }
+}
+
+// TODO(https://fxbug.dev/7832): do we purposefully provide buffers too big in
+// conformance tests to ensure the returned size is properly calculated? If
+// not, we should keep this sort of testing, or augment the conformance tests.
+func TestCheckUnmarshalReadSize(t *testing.T) {
+ examples := [][]byte{
+ {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ },
+
+ {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, // these will go unread
+ },
+ }
+ for _, data := range examples {
+ var message bindingstest.EmptyStruct
+ hnb, _, err := fidl.Unmarshal(data, nil, &message)
+ if err != nil {
+ t.Fatalf("unmarshal failed: %s", err)
+ }
+ if hnb != 8 {
+ t.Fatalf("expected 8 bytes read, was %d", hnb)
+ }
+ }
+}
+
+// TODO(https://fxbug.dev/7832): We are lacking in negative tests in the conformance suite.
+func TestEnvelopeByteCountTooLarge(t *testing.T) {
+ input := []byte{
+ 0x21, 0xEB, 0x7E, 0x76, 0x00, 0x00, 0x00, 0x00, // ordinal + padding
+ 0xaa, 0xaa, 0xaa, 0xaa, 0x00, 0x00, 0x00, 0x00, // byte + handle count
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // envelope present
+ 0xef, 0xbe, 0xad, 0xde, 0x11, 0xba, 0x5e, 0xba, // data
+ }
+
+ var message bindingstest.XUnion1Struct
+ _, _, err := fidl.Unmarshal(input, nil, &message)
+ if err == nil {
+ t.Fatalf("Unmarshal() returned nil error")
+ }
+
+ errCode := err.(fidl.ValidationError).Code()
+ if errCode != fidl.ErrPayloadTooSmall {
+ t.Fatalf("Unmarshal() returned %d", errCode)
+ }
+}
+
+// TODO(https://fxbug.dev/7832): We are lacking in negative tests in the conformance suite.
+func TestEnvelopeHandleCountTooLarge(t *testing.T) {
+ input := []byte{
+ 0x21, 0xEB, 0x7E, 0x76, 0x00, 0x00, 0x00, 0x00, // ordinal + padding
+ 0x08, 0x00, 0x00, 0x00, 0xaa, 0xaa, 0xaa, 0xaa, // byte + invalid handle count
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // envelope present
+ 0xef, 0xbe, 0xad, 0xde, 0x11, 0xba, 0x5e, 0xba, // data
+ }
+
+ var message bindingstest.XUnion1Struct
+ _, _, err := fidl.Unmarshal(input, nil, &message)
+ if err == nil {
+ t.Fatalf("Unmarshal() returned nil error")
+ }
+
+ errCode := err.(fidl.ValidationError).Code()
+ if errCode != fidl.ErrTooManyHandles {
+ t.Fatalf("Unmarshal() returned %d", errCode)
+ }
+}
+
+// TODO(https://fxbug.dev/7832): We are lacking in negative tests in the conformance suite.
+func TestEnvelopeInvalidPresence(t *testing.T) {
+ input := []byte{
+ 0x21, 0xEB, 0x7E, 0x76, 0x00, 0x00, 0x00, 0x00, // ordinal + padding
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // byte + handle count
+ 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, // invalid envelope presence
+ 0xef, 0xbe, 0xad, 0xde, 0x11, 0xba, 0x5e, 0xba, // data
+ }
+
+ var message bindingstest.XUnion1Struct
+ _, _, err := fidl.Unmarshal(input, nil, &message)
+ if err == nil {
+ t.Fatalf("Unmarshal() returned nil error")
+ }
+
+ errCode := err.(fidl.ValidationError).Code()
+ if errCode != fidl.ErrBadRefEncoding {
+ t.Fatalf("Unmarshal() returned %d", errCode)
+ }
+}
+
+type example struct {
+ name string
+ input fidl.Message
+ expectSize int
+}
+
+// general provides test cases used to verify correctness, and
+// benchmark against.
+//
+// Keep these as a slice to preserve consistent ordering when running.
+func general() []example {
+ vmo, err := zx.NewVMO(10, 0)
+ if err != nil {
+ panic(fmt.Sprintf("failed to create vmo: %v", err))
+ }
+ defer vmo.Close()
+
+ h0, h1, err := zx.NewChannel(0)
+ defer h0.Close()
+ defer h1.Close()
+ if err != nil {
+ panic(fmt.Sprintf("failed to create vmo: %v", err))
+ }
+
+ st1 := bindingstest.SimpleTable{}
+ st1.SetX(42)
+ st1.SetY(67)
+
+ return []example{
+ // TODO(https://fxbug.dev/7832): We lack coverage of floats in the conformance test suite.
+ {"float1", &bindingstest.TestFloat1{A: -36.0}, 8},
+ {"float2", &bindingstest.TestFloat2{A: -1254918271.0}, 8},
+ {"float3", &bindingstest.TestFloat3{A: 1241.1, B: 0.2141, C: 20, D: 0.0}, 32},
+
+ // TODO(https://fxbug.dev/7832): We just recently added handles in conformance suite. Are these covered?
+ {"handle1", &bindingstest.TestHandle1{
+ A: zx.Handle(22),
+ B: zx.HandleInvalid,
+ C: vmo,
+ D: zx.VMO(zx.HandleInvalid),
+ }, 16},
+ {"handle2", &bindingstest.TestHandle2{
+ A: []zx.Handle{zx.Handle(vmo)},
+ B: []zx.VMO{zx.VMO(zx.HandleInvalid)},
+ }, 48},
+
+ // TODO(https://fxbug.dev/7832): Here we're checking the special logic adapting channels to
+ // `request<P>` or `P` representations. This is not supported by GIDL yet.
+ {"interface1", &bindingstest.TestInterface1{
+ A: bindingstest.Test1WithCtxInterface(fidl.ChannelProxy{Channel: h0}),
+ B: bindingstest.Test1WithCtxInterface(fidl.ChannelProxy{Channel: zx.Channel(zx.HandleInvalid)}),
+ C: bindingstest.Test1WithCtxInterfaceRequest(fidl.InterfaceRequest{Channel: h1}),
+ D: bindingstest.Test1WithCtxInterfaceRequest(fidl.InterfaceRequest{
+ Channel: zx.Channel(zx.HandleInvalid),
+ }),
+ }, 16},
+ }
+}
+
+func check(t *testing.T, input fidl.Message, expectSize int) {
+ t.Helper()
+ defer func() {
+ if r := recover(); r != nil {
+ // When running tests on device, this bubbles up the error
+ // on the console launching the tests, rather than having
+ // to look at the device's kernel logs.
+ t.Fatalf("panic: %s", r)
+ panic(r)
+ }
+ }()
+ var respb [zx.ChannelMaxMessageBytes]byte
+ var resphd [zx.ChannelMaxMessageHandles]zx.HandleDisposition
+ nb, nh, err := fidl.MarshalWithContext(testCtx, input, respb[:], resphd[:])
+ if err != nil {
+ t.Fatalf("marshal: failed: %s", err)
+ }
+ if nb != expectSize {
+ t.Fatalf("marshal: expected size %d but got %d: %v", expectSize, nb, respb[:nb])
+ }
+ var resphi [zx.ChannelMaxMessageHandles]zx.HandleInfo
+ for i := 0; i < nh; i++ {
+ resphi[i] = zx.HandleInfo{
+ Handle: resphd[i].Handle,
+ Type: resphd[i].Type,
+ Rights: resphd[i].Rights,
+ }
+ }
+ output := makeDefault(reflect.TypeOf(input))
+ nbActual, nhActual, err := fidl.UnmarshalWithContext2(testCtx, respb[:nb], resphi[:nh], output)
+ if err != nil {
+ t.Fatalf("unmarshal: failed: %s", err)
+ }
+ if !reflect.DeepEqual(input, output) {
+ t.Fatalf("unmarshal: expected: %v, got: %v", input, output)
+ }
+ if nb != nbActual {
+ t.Fatalf("unmarshal: num bytes, expected: %d, got: %d", nb, nbActual)
+ }
+ if nh != nhActual {
+ t.Fatalf("unmarshal: num handles, expected: %d, got: %d", nh, nhActual)
+ }
+}
+
+func TestCorrectness(t *testing.T) {
+ for _, ex := range general() {
+ t.Run(ex.name, func(t *testing.T) {
+ check(t, ex.input, ex.expectSize)
+ })
+ }
+}
+
+type errorCaseUnmarshal struct {
+ name string
+ message fidl.Message
+ input []byte
+ errorCode fidl.ErrorCode
+}
+
+// TODO(https://fxbug.dev/7832): We are lacking in negative tests in the conformance suite.
+var baseErrorCasesUnmarshal = []errorCaseUnmarshal{
+ {"empty-array-bindingstest.TestSimple", &bindingstest.TestSimple{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestSimple", &bindingstest.TestSimple{}, nil, fidl.ErrPayloadTooSmall},
+ {"small-array-bindingstest.TestSimple", &bindingstest.TestSimple{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestSimpleBool", &bindingstest.TestSimpleBool{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestSimpleBool", &bindingstest.TestSimpleBool{}, nil, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestAlignment1", &bindingstest.TestAlignment1{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestAlignment1", &bindingstest.TestAlignment1{}, nil, fidl.ErrPayloadTooSmall},
+ {"small-array-bindingstest.TestAlignment1", &bindingstest.TestAlignment1{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestAlignment2", &bindingstest.TestAlignment2{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestAlignment2", &bindingstest.TestAlignment2{}, nil, fidl.ErrPayloadTooSmall},
+ {"small-array-bindingstest.TestAlignment2", &bindingstest.TestAlignment2{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"small-array-bindingstest.TestAlignment2-2", &bindingstest.TestAlignment2{}, make([]byte, 10), fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestFloat1", &bindingstest.TestFloat1{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestFloat1", &bindingstest.TestFloat1{}, nil, fidl.ErrPayloadTooSmall},
+ {"small-array-bindingstest.TestFloat1", &bindingstest.TestFloat1{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestFloat2", &bindingstest.TestFloat2{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestFloat2", &bindingstest.TestFloat2{}, nil, fidl.ErrPayloadTooSmall},
+ {"small-array-bindingstest.TestFloat2", &bindingstest.TestFloat2{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestFloat3", &bindingstest.TestFloat3{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestFloat3", &bindingstest.TestFloat3{}, nil, fidl.ErrPayloadTooSmall},
+ {"small-array-bindingstest.TestFloat3", &bindingstest.TestFloat3{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"small-array-bindingstest.TestFloat3-2", &bindingstest.TestFloat3{}, make([]byte, 6), fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestArray1", &bindingstest.TestArray1{}, nil, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestArray1", &bindingstest.TestArray1{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"two-bytes-array-bindingstest.TestArray1", &bindingstest.TestArray1{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestArray2", &bindingstest.TestArray2{}, nil, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestArray2", &bindingstest.TestArray2{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"two-bytes-array-bindingstest.TestArray2", &bindingstest.TestArray2{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"six-bytes-array-bindingstest.TestArray2", &bindingstest.TestArray2{}, make([]byte, 6), fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestArray3", &bindingstest.TestArray3{}, nil, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestArray3", &bindingstest.TestArray3{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"two-bytes-array-bindingstest.TestArray3", &bindingstest.TestArray3{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"six-bytes-array-bindingstest.TestArray3", &bindingstest.TestArray3{}, make([]byte, 6), fidl.ErrPayloadTooSmall},
+ {"thirteen-bytes-array-bindingstest.TestArray3", &bindingstest.TestArray3{}, make([]byte, 13), fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestArray4", &bindingstest.TestArray4{}, nil, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestArray4", &bindingstest.TestArray4{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"two-bytes-array-bindingstest.TestArray4", &bindingstest.TestArray4{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestString1", &bindingstest.TestString1{}, nil, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestString1", &bindingstest.TestString1{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"two-bytes-array-bindingstest.TestString1", &bindingstest.TestString1{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"nil-array-bindingstest.TestString2", &bindingstest.TestString2{}, nil, fidl.ErrPayloadTooSmall},
+ {"empty-array-bindingstest.TestString2", &bindingstest.TestString2{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"two-bytes-array-bindingstest.TestString2", &bindingstest.TestString2{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"nil-array-TestStruct2", &bindingstest.TestStruct2{}, nil, fidl.ErrPayloadTooSmall},
+ {"empty-array-TestStruct2", &bindingstest.TestStruct2{}, []byte{}, fidl.ErrPayloadTooSmall},
+ {"two-bytes-array-TestStruct2", &bindingstest.TestStruct2{}, []byte{0x00, 0x0}, fidl.ErrPayloadTooSmall},
+ {"six-bytes-array-TestStruct2", &bindingstest.TestStruct2{}, make([]byte, 6), fidl.ErrPayloadTooSmall},
+ {"thirteen-bytes-array-TestStruct2", &bindingstest.TestStruct2{}, make([]byte, 13), fidl.ErrPayloadTooSmall},
+ {"empty-struct-non-zero", &bindingstest.EmptyStruct{}, emptyStructWithOneInsteadOfZero, fidl.ErrInvalidEmptyStruct},
+}
+
+// TODO(https://fxbug.dev/7832): We are lacking in negative tests in the conformance suite.
+var allErrorCasesUnmarshal = append(baseErrorCasesUnmarshal, []errorCaseUnmarshal{
+ {"string-wrong-ptr-no-alloc", &bindingstest.TestStringWithBound{}, []byte{
+ 3, 0, 0, 0, 0, 0, 0, 0, // length
+ 0, 0, 0, 0, 0, 0, 0, 0, // ptr (no alloc)
+ // no data, unmarshal should fail before
+ }, fidl.ErrUnexpectedNullRef},
+ {"string-wrong-ptr-incorrect", &bindingstest.TestStringWithBound{}, []byte{
+ 3, 0, 0, 0, 0, 0, 0, 0, // length
+ 0, 0, 0, 0, 0, 0, 0, 1, // ptr (no alloc)
+ // no data, unmarshal should fail before
+ }, fidl.ErrBadRefEncoding},
+ {"string-too-long", &bindingstest.TestStringWithBound{}, []byte{
+ 9, 0, 0, 0, 0, 0, 0, 0, // length (too long)
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // ptr
+ // no data, unmarshal should fail before
+ }, fidl.ErrStringTooLong},
+ {"string-has-truncated-data", &bindingstest.TestStringWithBound{}, []byte{
+ 8, 0, 0, 0, 0, 0, 0, 0, // length
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // ptr
+ 0x41, 0x72, 0x67, 0x68, 0x68, 0x68, 0x68, // only 7 bytes
+ }, fidl.ErrPayloadTooSmall},
+
+ {"opt-string-wrong-ptr-incorrect", &bindingstest.TestOptStringWithBound{}, []byte{
+ 3, 0, 0, 0, 0, 0, 0, 0, // length
+ 0, 0, 0, 0, 0, 0, 0, 1, // ptr (no alloc)
+ // no data, unmarshal should fail before
+ }, fidl.ErrBadRefEncoding},
+ {"opt-string-too-long", &bindingstest.TestOptStringWithBound{}, []byte{
+ 9, 0, 0, 0, 0, 0, 0, 0, // length (too long)
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // ptr
+ // no data, unmarshal should fail before
+ }, fidl.ErrStringTooLong},
+}...)
+
+var simpleTableWithXY = []byte{
+ 5, 0, 0, 0, 0, 0, 0, 0, // max ordinal
+ 255, 255, 255, 255, 255, 255, 255, 255, // alloc present
+ 8, 0, 0, 0, 0, 0, 0, 0, // envelope 1: num bytes / num handles
+ 255, 255, 255, 255, 255, 255, 255, 255, // alloc present
+ 0, 0, 0, 0, 0, 0, 0, 0, // envelope 2: num bytes / num handles
+ 0, 0, 0, 0, 0, 0, 0, 0, // no alloc
+ 0, 0, 0, 0, 0, 0, 0, 0, // envelope 3: num bytes / num handles
+ 0, 0, 0, 0, 0, 0, 0, 0, // no alloc
+ 0, 0, 0, 0, 0, 0, 0, 0, // envelope 4: num bytes / num handles
+ 0, 0, 0, 0, 0, 0, 0, 0, // no alloc
+ 8, 0, 0, 0, 0, 0, 0, 0, // envelope 5: num bytes / num handles
+ 255, 255, 255, 255, 255, 255, 255, 255, // alloc present
+ 42, 0, 0, 0, 0, 0, 0, 0, // field X
+ 67, 0, 0, 0, 0, 0, 0, 0, // field Y
+}
+
+var simpleTableWithY = []byte{
+ 5, 0, 0, 0, 0, 0, 0, 0, // max ordinal
+ 255, 255, 255, 255, 255, 255, 255, 255, // alloc present
+ 0, 0, 0, 0, 0, 0, 0, 0, // envelope 1: num bytes / num handles
+ 0, 0, 0, 0, 0, 0, 0, 0, // no alloc
+ 0, 0, 0, 0, 0, 0, 0, 0, // envelope 2: num bytes / num handles
+ 0, 0, 0, 0, 0, 0, 0, 0, // no alloc
+ 0, 0, 0, 0, 0, 0, 0, 0, // envelope 3: num bytes / num handles
+ 0, 0, 0, 0, 0, 0, 0, 0, // no alloc
+ 0, 0, 0, 0, 0, 0, 0, 0, // envelope 4: num bytes / num handles
+ 0, 0, 0, 0, 0, 0, 0, 0, // no alloc
+ 8, 0, 0, 0, 0, 0, 0, 0, // envelope 5: num bytes / num handles
+ 255, 255, 255, 255, 255, 255, 255, 255, // alloc present
+ 67, 0, 0, 0, 0, 0, 0, 0, // field Y
+}
+
+var emptyStructWithOneInsteadOfZero = []byte{
+ 1, // empty struct with invalid value of 1 (instead of zero)
+ 0, 0, 0, 0, 0, 0, 0, // 7 bytes of padding after empty struct, to align to 64 bits
+}
+
+// TODO(https://fxbug.dev/7832): These should move into the conformance suite too as they captured
+// actual regressions that occurred, which none of the other tests captured.
+func TestAllManualSuccessCases(t *testing.T) {
+ // TODO(FIDL-635): Complete conversion.
+ var ipAddressConfig bindingstest.IpAddressConfig
+ ipAddressConfig.SetDhcp(true)
+ successCase{
+ name: "add-ethernet-device-request",
+ context: testCtx,
+ input: &bindingstest.TestAddEthernetDeviceRequest{
+ TopologicalPath: "@/dev/sys/pci/00:03.0/e1000/ethernet",
+ Config: bindingstest.InterfaceConfig{
+ Name: "ethp0003",
+ IpAddressConfig: ipAddressConfig,
+ },
+ Device: bindingstest.EthernetDeviceWithCtxInterface{Channel: zx.Channel(0xdeadbeef)},
+ },
+ bytes: []byte{
+ 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // topological_path
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // topological_path
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // name
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // name
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // subnet (dhcp variant)
+ 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // subnet envelope (num bytes/handles)
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, // subnet envelope (PRESENT)
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, // device (handle present)
+ 0x40, 0x2f, 0x64, 0x65, 0x76, 0x2f, 0x73, 0x79, // @/dev/sy
+ 0x73, 0x2f, 0x70, 0x63, 0x69, 0x2f, 0x30, 0x30, // s/pci/00
+ 0x3a, 0x30, 0x33, 0x2e, 0x30, 0x2f, 0x65, 0x31, // :03.0/e1
+ 0x30, 0x30, 0x30, 0x2f, 0x65, 0x74, 0x68, 0x65, // 000/ethe
+ 0x72, 0x6e, 0x65, 0x74, 0x00, 0x00, 0x00, 0x00, // rnet
+ 0x65, 0x74, 0x68, 0x70, 0x30, 0x30, 0x30, 0x33, // ethp0003
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // subnet (dhcp data)
+ },
+ handleInfos: []zx.HandleInfo{
+ {
+ Handle: zx.Handle(0xdeadbeef),
+ Rights: fidl.ProtocolRights,
+ Type: zx.ObjectTypeChannel,
+ },
+ },
+ checkRights: true,
+ }.check(t)
+
+ successCase{
+ name: "package-resolver-resolve-request",
+ context: testCtx,
+ input: &bindingstest.TestPackageResolverResolveRequest{
+ PackageUrl: "a",
+ Selectors: []string{"a"},
+ UpdatePolicy: bindingstest.UpdatePolicy{
+ FetchIfAbsent: true,
+ AllowOldVersions: true,
+ },
+ Dir: bindingstest.EthernetDeviceWithCtxInterfaceRequest{Channel: zx.Channel(0xdeadbeef)},
+ },
+ bytes: []byte{
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // package url size
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // package url ptr
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // selectors size
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // selectors ptr
+ 0x01, 0x01, 0x00, 0x00, // policy struct + padding
+ 0xFF, 0xFF, 0xFF, 0xFF, // request handle
+ // out of line data
+ 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ },
+ handleInfos: []zx.HandleInfo{
+ {
+ Handle: zx.Handle(0xdeadbeef),
+ Rights: fidl.ProtocolRights,
+ Type: zx.ObjectTypeChannel,
+ },
+ },
+ checkRights: true,
+ }.check(t)
+}
+
+// Handle rights is not in conformance testing.
+func TestHandleRightsMarshalUnmarshal(t *testing.T) {
+ data := make([]byte, 1024)
+ handleDispositions := make([]zx.HandleDisposition, 1)
+ input := &bindingstest.HandleRightsSubtypeTestStruct{H: []zx.VMO{5}}
+ _, nh, err := fidl.Marshal(input, data, handleDispositions)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if nh != 1 {
+ t.Fatalf("unexpected number of handles: want %d, got %d", 1, nh)
+ }
+ if handleDispositions[0].Handle != *input.H[0].Handle() {
+ t.Fatalf("expected handle to match: want %v, got %v", input.H, handleDispositions[0].Handle)
+ }
+ if handleDispositions[0].Rights != 3 {
+ t.Fatalf("incorrect rights: want %v, got %v", 3, handleDispositions[0].Rights)
+ }
+ if handleDispositions[0].Type != 3 {
+ t.Fatalf("incorrect subtype: want %v, got %v", 3, handleDispositions[0].Type)
+ }
+
+ // normal unmarshaling
+ handleInfos := []zx.HandleInfo{
+ {
+ Handle: handleDispositions[0].Handle,
+ Rights: handleDispositions[0].Rights,
+ Type: handleDispositions[0].Type,
+ },
+ }
+ output := &bindingstest.HandleRightsSubtypeTestStruct{}
+ if _, _, err = fidl.Unmarshal(data, handleInfos, output); err != nil {
+ t.Fatal(err)
+ }
+ if output.H[0] != input.H[0] {
+ t.Fatalf("incorrect handle: want %v, got %v", input.H, output.H)
+ }
+
+ // missing required rights
+ handleInfos = []zx.HandleInfo{
+ {
+ Handle: handleDispositions[0].Handle,
+ Rights: 0x1,
+ Type: handleDispositions[0].Type,
+ },
+ }
+ output = &bindingstest.HandleRightsSubtypeTestStruct{}
+ if _, _, err = fidl.Unmarshal(data, handleInfos, output); err == nil {
+ t.Fatalf("expected error due to missing required rights")
+ } else if err != nil && err.(fidl.ValidationError).Code() != fidl.ErrMissingRequiredHandleRights {
+ t.Fatalf("unexpected error code %v", err)
+ }
+
+ // incorrect handle type
+ handleInfos = []zx.HandleInfo{
+ {
+ Handle: handleDispositions[0].Handle,
+ Rights: handleDispositions[0].Rights,
+ Type: 1,
+ },
+ }
+ output = &bindingstest.HandleRightsSubtypeTestStruct{}
+ if _, _, err = fidl.Unmarshal(data, handleInfos, output); err == nil {
+ t.Fatalf("expected error due to incorrect handle type")
+ } else if err != nil && err.(fidl.ValidationError).Code() != fidl.ErrIncorrectHandleType {
+ t.Fatalf("unexpected error code %v", err)
+ }
+}
+
+// Handle rights is not in conformance testing.
+func TestHandleUncheckedSubtypeMarshalUnmarshal(t *testing.T) {
+ data := make([]byte, 1024)
+ handleDispositions := make([]zx.HandleDisposition, 1)
+ input := &bindingstest.PlainHandleTestStruct{H: zx.Handle(5)}
+ _, nh, err := fidl.Marshal(input, data, handleDispositions)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if nh != 1 {
+ t.Fatalf("unexpected number of handles: want %d, got %d", 1, nh)
+ }
+ if handleDispositions[0].Handle != input.H {
+ t.Fatalf("expected handle to match: want %v, got %v", input.H, handleDispositions[0].Handle)
+ }
+ if handleDispositions[0].Type != 0 {
+ t.Fatalf("incorrect subtype: want %v, got %v", 0, handleDispositions[0].Type)
+ }
+
+ // normal unmarshaling
+ handleInfos := []zx.HandleInfo{
+ {
+ Handle: handleDispositions[0].Handle,
+ Type: handleDispositions[0].Type,
+ },
+ }
+ output := &bindingstest.PlainHandleTestStruct{}
+ if _, _, err = fidl.Unmarshal(data, handleInfos, output); err != nil {
+ t.Fatal(err)
+ }
+ if output.H != input.H {
+ t.Fatalf("incorrect handle: want %v, got %v", input.H, output.H)
+ }
+
+ // unchecked handle type
+ handleInfos = []zx.HandleInfo{
+ {
+ Handle: handleDispositions[0].Handle,
+ Type: 1,
+ },
+ }
+ output = &bindingstest.PlainHandleTestStruct{}
+ if _, _, err = fidl.Unmarshal(data, handleInfos, output); err != nil {
+ t.Fatalf("expected handle of type ZX_OBJ_TYPE_NONE to be unchecked")
+ }
+ if output.H != input.H {
+ t.Fatalf("incorrect handle: want %v, got %v", input.H, output.H)
+ }
+}
+
+// This is a specific test checking that the marshaler construction properly
+// fails with a clear error message if fed incorrect generated code. Hence,
+// this has to stay a hand written test.
+func TestFailureNullableTable(t *testing.T) {
+ type TestNullableTable struct {
+ _ struct{} `fidl:"s"`
+ A *bindingstest.SimpleTable `fidl:"0" fidl_offset_v1:"0"`
+ }
+ _, err := fidl.CreateMarshaler(TestNullableTable{})
+ if err == nil {
+ t.Fatalf("expected error creating marshaler for nullable table")
+ }
+ if !strings.Contains(err.Error(), "optional field marshaler") {
+ t.Fatalf("unexpected error: %s", err.Error())
+ }
+}
+
+// TODO(https://fxbug.dev/7832): We are lacking in negative tests in the conformance suite.
+func TestFailuresMarshal(t *testing.T) {
+ v1 := []int64{1, 2, 3}
+ cases := []struct {
+ name string
+ input fidl.Message
+ errorCode fidl.ErrorCode
+ }{
+ {"string3-string-too-long", &bindingstest.TestString3{
+ A: [2]string{
+ "too long!", // limit is 4, provided is longer(tm)
+ "g",
+ },
+ B: [2]*string{nil, nil},
+ }, fidl.ErrStringTooLong},
+ {"vector1-C-vector-too-long", &bindingstest.TestVector1{
+ A: []int8{1, 2, 3, 4},
+ B: nil,
+ C: []int32{99, 100, 101}, // limit is 2, provided is 3
+ D: nil,
+ }, fidl.ErrVectorTooLong},
+ {"vector1-D-vector-too-long", &bindingstest.TestVector1{
+ A: []int8{1, 2, 3, 4},
+ B: nil,
+ C: []int32{99},
+ D: &v1, // limit is 2, provided is 3
+ }, fidl.ErrVectorTooLong},
+ }
+ for _, ex := range cases {
+ t.Run(ex.name, func(t *testing.T) {
+ var respb [zx.ChannelMaxMessageBytes]byte
+ var resphd [zx.ChannelMaxMessageHandles]zx.HandleDisposition
+ _, _, err := fidl.MarshalWithContext(testCtx, ex.input, respb[:], resphd[:])
+ validationErr, ok := err.(fidl.ValidationError)
+ if !ok {
+ t.Fatalf("expected ValidationError, was %v", err)
+ }
+ if validationErr.Code() != ex.errorCode {
+ t.Fatalf("expected %s, was %s", ex.errorCode, validationErr.Code())
+ }
+ })
+ }
+}
+
+// TODO(https://fxbug.dev/7832): We are lacking in negative tests in the conformance suite.
+func TestFailuresUnmarshalNoHandles(t *testing.T) {
+ for _, ex := range allErrorCasesUnmarshal {
+ t.Run(ex.name, func(t *testing.T) {
+ _, _, err := fidl.Unmarshal(ex.input, nil, ex.message)
+ validationErr, ok := err.(fidl.ValidationError)
+ if !ok {
+ t.Fatalf("expected ValidationError, was %v", err)
+ }
+ if validationErr.Code() != ex.errorCode {
+ t.Fatalf("expected %s, was %s", ex.errorCode, validationErr.Code())
+ }
+ })
+ }
+}
+
+// TODO(https://fxbug.dev/62647): Move to GIDL once we support protocol handles.
+func TestConformanceClientEnd(t *testing.T) {
+ successCase{
+ name: "handles-clientend",
+ context: testCtx,
+ input: &bindingstest.HasClientEnd{
+ ClientEnd: bindingstest.ExampleProtocolWithCtxInterface(fidl.ChannelProxy{
+ Channel: zx.Channel(0x44332211),
+ }),
+ },
+ bytes: []byte{
+ 0xff, 0xff, 0xff, 0xff, // handle present
+ 0x00, 0x00, 0x00, 0x00, // padding
+ },
+ handleInfos: []zx.HandleInfo{
+ {
+ Handle: zx.Handle(0x44332211),
+ Rights: fidl.ProtocolRights,
+ Type: zx.ObjectTypeChannel,
+ },
+ },
+ checkRights: true,
+ }.check(t)
+}
+
+// TODO(https://fxbug.dev/62647): Move to GIDL once we support protocol handles.
+func TestConformanceServerEnd(t *testing.T) {
+ successCase{
+ name: "handles-serverend",
+ context: testCtx,
+ input: &bindingstest.HasServerEnd{
+ ServerEnd: bindingstest.ExampleProtocolWithCtxInterfaceRequest(fidl.InterfaceRequest{
+ Channel: zx.Channel(0x44332211),
+ }),
+ },
+ bytes: []byte{
+ 0xff, 0xff, 0xff, 0xff, // handle present
+ 0x00, 0x00, 0x00, 0x00, // padding
+ },
+ handleInfos: []zx.HandleInfo{
+ {
+ Handle: zx.Handle(0x44332211),
+ Rights: fidl.ProtocolRights,
+ Type: zx.ObjectTypeChannel,
+ },
+ },
+ checkRights: true,
+ }.check(t)
+}
+
+func TestBitsApi(t *testing.T) {
+ raw := uint32(0b110101)
+
+ unknownStrict := bindingstest.StrictBits(raw)
+ if !unknownStrict.HasUnknownBits() {
+ t.Error("unknown bits returned false for HasUnknownBits")
+ }
+ if unknownStrict.GetUnknownBits() != 0b110100 {
+ t.Errorf(
+ "Got wrong unknown bits: expected %b, was %b", 0b110100, unknownStrict.GetUnknownBits())
+ }
+ if unknownStrict.InvertBits() != 0b10 {
+ t.Errorf(
+ "Got wrong InvertBits: expected %b, got %b", 0b10, unknownStrict.InvertBits())
+ }
+ if unknownStrict.InvertBits().InvertBits() != 0b1 {
+ t.Errorf(
+ "Got wrong double InvertBits: expected %b, got %b", 0b1, unknownStrict.InvertBits().InvertBits())
+ }
+ if !unknownStrict.HasBits(0b1) {
+ t.Errorf("Failed to match on known bits for HasBits")
+ }
+ if !unknownStrict.HasBits(0b110000) {
+ t.Errorf("Failed to match on unknown bits for HasBits")
+ }
+ if unknownStrict.HasBits(0b10) {
+ t.Errorf("Matched on known bits for HasBits when it should not")
+ }
+ if unknownStrict.HasBits(0b1000) {
+ t.Errorf("Matched on unknown bits for HasBits when it should not")
+ }
+ if unknownStrict.ClearBits(0b1) != bindingstest.StrictBits(0b110100) {
+ t.Errorf("Failed to clear known bits for ClearBits")
+ }
+ if unknownStrict.ClearBits(0b10000) != bindingstest.StrictBits(0b100101) {
+ t.Errorf("Failed to clear unknown bits for ClearBits")
+ }
+ if unknownStrict != unknownStrict.ClearBits(0b10) {
+ t.Errorf("Cleared known bits when it should not")
+ }
+ if unknownStrict != unknownStrict.ClearBits(0b1000) {
+ t.Errorf("Cleared unknown bits when it should not")
+ }
+
+ knownStrict := unknownStrict & bindingstest.StrictBits_Mask
+ if knownStrict != bindingstest.StrictBitsOne {
+ t.Errorf("Expected masked value: %b, got %b", bindingstest.StrictBitsOne, knownStrict)
+ }
+
+ unknownFlexible := bindingstest.FlexibleBits(raw)
+ if !unknownFlexible.HasUnknownBits() {
+ t.Error("unknown bits returned false for HasUnknownBits")
+ }
+ if unknownFlexible.GetUnknownBits() != 0b110100 {
+ t.Errorf(
+ "Got wrong unknown bits: expected %b, was %b", 0b110100, unknownFlexible.GetUnknownBits())
+ }
+ if unknownFlexible.InvertBits() != 0b10 {
+ t.Errorf(
+ "Got wrong InvertBits: expected %b, got %b", 0b10, unknownFlexible.InvertBits())
+ }
+ if unknownFlexible.InvertBits().InvertBits() != 0b1 {
+ t.Errorf(
+ "Got wrong double InvertBits: expected %b, got %b", 0b1, unknownFlexible.InvertBits().InvertBits())
+ }
+ if !unknownFlexible.HasBits(0b1) {
+ t.Errorf("Failed to match on known bits for HasBits")
+ }
+ if !unknownFlexible.HasBits(0b110000) {
+ t.Errorf("Failed to match on unknown bits for HasBits")
+ }
+ if unknownFlexible.HasBits(0b10) {
+ t.Errorf("Matched on known bits for HasBits when it should not")
+ }
+ if unknownFlexible.HasBits(0b1000) {
+ t.Errorf("Matched on unknown bits for HasBits when it should not")
+ }
+ if unknownFlexible.ClearBits(0b1) != bindingstest.FlexibleBits(0b110100) {
+ t.Errorf("Failed to clear known bits for ClearBits")
+ }
+ if unknownFlexible.ClearBits(0b10000) != bindingstest.FlexibleBits(0b100101) {
+ t.Errorf("Failed to clear unknown bits for ClearBits")
+ }
+ if unknownFlexible != unknownFlexible.ClearBits(0b10) {
+ t.Errorf("Cleared known bits when it should not")
+ }
+ if unknownFlexible != unknownFlexible.ClearBits(0b1000) {
+ t.Errorf("Cleared unknown bits when it should not")
+ }
+
+ knownFlexible := unknownFlexible & bindingstest.FlexibleBits_Mask
+ if knownFlexible != bindingstest.FlexibleBitsOne {
+ t.Errorf("Expected masked value: %b, got %b", bindingstest.FlexibleBitsOne, knownFlexible)
+ }
+}
+
+func TestUnionApi(t *testing.T) {
+ union := bindingstest.XUnion1{
+ I_xUnion1Tag: 4,
+ I_unknownData: fidl.UnknownData{
+ Bytes: []byte{51},
+ },
+ }
+ if union.Which() != bindingstest.XUnion1_unknownData {
+ t.Errorf("Expected unknown union to have unknown tag")
+ }
+
+ data := union.GetUnknownData()
+ if len(data.Bytes) != 1 || data.Bytes[0] != 51 {
+ t.Errorf("Expected unknown data to be [51], got: %v", data.Bytes)
+ }
+ if len(data.Handles) != 0 {
+ t.Errorf("Expected empty unknown handles")
+ }
+
+ union.SetD(1.0)
+ if union != bindingstest.XUnion1WithD(1.0) {
+ t.Errorf("Expected modified-in-place union modified from unknown variant and constructed union to be equal")
+ }
+
+ union.SetA([3]int8{0,1,2})
+ if union != bindingstest.XUnion1WithA([3]int8{0,1,2}) {
+ t.Errorf("Expected modified-in-place union modified from known variant and constructed union to be equal")
+ }
+}
+
+func TestTableApi(t *testing.T) {
+ var emptyTable bindingstest.SimpleTable
+ if emptyTable.HasUnknownData() {
+ t.Errorf("Expected new table to have empty unknown data")
+ }
+
+ table := bindingstest.SimpleTable{
+ I_unknownData: map[uint64]fidl.UnknownData{
+ 3: {
+ Bytes: []byte{51},
+ },
+ },
+ }
+
+ table.SetX(5)
+ if !table.HasX() {
+ t.Errorf("Expected X to be set")
+ }
+ if table.GetX() != 5 {
+ t.Errorf("Expected X value 5, got: %d", table.GetX())
+ }
+ if table.HasY() {
+ t.Errorf("Expected Y to be unset")
+ }
+ y := table.GetYWithDefault(13)
+ if y != 13 {
+ t.Errorf("Expected default Y value 13, got: %d", y)
+ }
+ if !table.HasUnknownData() {
+ t.Errorf("Expected table to have unknown data")
+ }
+ unknownData := table.GetUnknownData()
+ data, ok := unknownData[3]
+ if !ok {
+ t.Errorf("Expected table to have unknown ordinal 3")
+ }
+ if len(data.Bytes) != 1 || data.Bytes[0] != 51 {
+ t.Errorf("Expected unknown data to be [51], got: %v", data.Bytes)
+ }
+ if len(data.Handles) != 0 {
+ t.Errorf("Expected empty unknown handles")
+ }
+}
diff --git a/src/syscall/zx/fidl/fidl_test/testutil_test.go b/src/syscall/zx/fidl/fidl_test/testutil_test.go
new file mode 100644
index 0000000..899ba8d
--- /dev/null
+++ b/src/syscall/zx/fidl/fidl_test/testutil_test.go
@@ -0,0 +1,313 @@
+// Copyright 2019 The Fuchsia 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 fidl_test
+
+import (
+ "bytes"
+ "fmt"
+ "reflect"
+ "testing"
+
+ "syscall/zx"
+ "syscall/zx/fidl"
+)
+
+func makeDefault(typ reflect.Type) fidl.Message {
+ if typ.Kind() != reflect.Ptr || typ.Elem().Kind() != reflect.Struct {
+ panic(fmt.Sprintf("expecting *struct, actual %v", typ))
+ }
+ return reflect.New(typ.Elem()).Interface().(fidl.Message)
+}
+
+// Note: fidl.Marshal uses the provided buffers to encode and works positionally to allow
+// repeated encoding in the same buffer. This function doesn't do that and always starts
+// with an empty buffer so tests do not cover the repeated encoding cases.
+func encode(context fidl.MarshalerContext, input fidl.Message) ([]byte, []zx.HandleInfo, error) {
+ var respb [zx.ChannelMaxMessageBytes]byte
+ for i := range respb {
+ respb[i] = 0xaa
+ }
+ var resphd [zx.ChannelMaxMessageHandles]zx.HandleDisposition
+ nb, nh, err := fidl.MarshalWithContext(context, input, respb[:], resphd[:])
+ if err != nil {
+ return nil, nil, err
+ }
+ var resphi [zx.ChannelMaxMessageHandles]zx.HandleInfo
+ for i := 0; i < nh; i++ {
+ resphi[i] = zx.HandleInfo{
+ Handle: resphd[i].Handle,
+ Rights: resphd[i].Rights,
+ Type: resphd[i].Type,
+ }
+ }
+ return respb[:nb], resphi[:nh], nil
+}
+
+func decode(context fidl.MarshalerContext, typ reflect.Type, b []byte, hi []zx.HandleInfo) (nb int, nh int, msg fidl.Message, err error) {
+ msg = makeDefault(typ)
+ nb, nh, err = fidl.UnmarshalWithContext2(context, b, hi, msg)
+ return nb, nh, msg, err
+}
+
+type encodeSuccessCase struct {
+ name string
+ context fidl.MarshalerContext
+ input fidl.Message
+ bytes []byte
+ handleInfos []zx.HandleInfo
+ // TODO(fxbug.dev/41920): implement handle rights in GIDL
+ // This parameter is used so that encodeSuccessCases generated from GIDL
+ // ignore handle rights, but manual test cases can still opt to check them.
+ // Setting it to true also enables stricter checking of the subtype (see
+ // comment below)
+ checkRights bool
+}
+
+func (ex encodeSuccessCase) check(t *testing.T) {
+ t.Run(ex.name+" encode", func(t *testing.T) {
+ t.Cleanup(func() {
+ if t.Failed() {
+ // encoding failed, so we assume it closed the handles as expected.
+ return
+ }
+ for _, handleInfo := range ex.handleInfos {
+ handleClose(&handleInfo.Handle)
+ }
+ })
+ defer handlePanic(t)
+ b, hi, err := encode(ex.context, ex.input)
+ if err != nil {
+ t.Fatalf("failed: %s", err)
+ }
+ if !bytes.Equal(ex.bytes, b) {
+ t.Fatalf("expected %x, got %x", ex.bytes, b)
+ }
+ if len(ex.handleInfos) == 0 {
+ if len(hi) != 0 {
+ t.Fatalf("no handles expected, got %d", len(hi))
+ }
+ } else {
+ if !ex.checkRights && len(ex.handleInfos) == len(hi) {
+ for i := range ex.handleInfos {
+ // If the `hi` type is None, the handle is untyped (defined
+ // like `handle h;` in fidl). In GIDL, the `ex` type is
+ // never None because it reflects the handle's concrete
+ // subtype. Since untyped handles are compatible with all
+ // subtypes, we change the `ex` type to None to force the
+ // equality check below to pass.
+ if hi[i].Type == zx.ObjectTypeNone {
+ ex.handleInfos[i].Type = zx.ObjectTypeNone
+ }
+ ex.handleInfos[i].Rights = zx.RightNone
+ hi[i].Rights = zx.RightNone
+ }
+ }
+ if !reflect.DeepEqual(ex.handleInfos, hi) {
+ t.Errorf("expected %v, got %v", ex.handleInfos, hi)
+ }
+ }
+ })
+}
+
+type decodeSuccessCase struct {
+ name string
+ context fidl.MarshalerContext
+ input fidl.Message
+ bytes []byte
+ handleInfos []zx.HandleInfo
+}
+
+func (ex decodeSuccessCase) check(t *testing.T) {
+ t.Run(ex.name+" decode", func(t *testing.T) {
+ t.Cleanup(func() {
+ if t.Failed() {
+ // decoding failed, so we assume it closed the handles as expected.
+ return
+ }
+ for _, handleInfo := range ex.handleInfos {
+ handleClose(&handleInfo.Handle)
+ }
+ })
+ defer handlePanic(t)
+ nbActual, nhActual, output, err := decode(ex.context, reflect.TypeOf(ex.input), ex.bytes, ex.handleInfos)
+ if err != nil {
+ t.Fatalf("failed: %s", err)
+ }
+ if !reflect.DeepEqual(ex.input, output) {
+ t.Fatalf("expected: %v, got: %v", ex.input, output)
+ }
+ if len(ex.bytes) != nbActual {
+ t.Fatalf("num bytes, expected: %d, got: %d", len(ex.bytes), nbActual)
+ }
+ if len(ex.handleInfos) != nhActual {
+ t.Fatalf("num handles, expected: %d, got: %d", len(ex.handleInfos), nhActual)
+ }
+ })
+}
+
+// Represents a success case where both encode and decode should succeed.
+type successCase struct {
+ name string
+ context fidl.MarshalerContext
+ input fidl.Message
+ bytes []byte
+ handleInfos []zx.HandleInfo
+ checkRights bool
+}
+
+func (ex successCase) check(t *testing.T) {
+ encodeSuccessCase{
+ name: ex.name,
+ context: ex.context,
+ input: ex.input,
+ bytes: ex.bytes,
+ handleInfos: ex.handleInfos,
+ checkRights: ex.checkRights,
+ }.check(t)
+ decodeSuccessCase{
+ name: ex.name,
+ context: ex.context,
+ input: ex.input,
+ bytes: ex.bytes,
+ handleInfos: ex.handleInfos,
+ }.check(t)
+}
+
+type encodeFailureCase struct {
+ name string
+ context fidl.MarshalerContext
+ input fidl.Message
+ code fidl.ErrorCode
+ handles []zx.Handle
+}
+
+func (ex encodeFailureCase) check(t *testing.T) {
+ t.Run(ex.name, func(t *testing.T) {
+ defer handlePanic(t)
+ _, _, err := encode(ex.context, ex.input)
+ if err == nil {
+ t.Fatalf("encoding failure %s expected, but no errors were found", ex.code.String())
+ }
+ fidlError, ok := err.(fidl.ValidationError)
+ if !ok {
+ t.Fatalf("wrong error type: got %T, want fidl.ValidationError", err)
+ }
+ if fidlError.Code() != ex.code {
+ t.Fatalf("wrong error code: got %s, want %s", fidlError.Code().String(), ex.code.String())
+ }
+ for i, handle := range ex.handles {
+ if isHandleValid(&handle) {
+ t.Errorf("failed to close handle at index #%d: %d", i, handle)
+ }
+ }
+ })
+}
+
+type decodeFailureCase struct {
+ name string
+ context fidl.MarshalerContext
+ valTyp reflect.Type
+ bytes []byte
+ code fidl.ErrorCode
+ handleInfos []zx.HandleInfo
+}
+
+func (ex decodeFailureCase) check(t *testing.T) {
+ t.Run(ex.name, func(t *testing.T) {
+ defer handlePanic(t)
+ _, _, _, err := decode(ex.context, ex.valTyp, ex.bytes, ex.handleInfos)
+ if err == nil {
+ t.Fatalf("decoding failure %s expected, but no errors were found", ex.code.String())
+ }
+ fidlError, ok := err.(fidl.ValidationError)
+ if !ok {
+ t.Fatalf("wrong error type: got %T, want fidl.ValidationError", err)
+ }
+ if fidlError.Code() != ex.code {
+ t.Fatalf("wrong error code: got %s, want %s", fidlError.Code().String(), ex.code.String())
+ }
+ for i, info := range ex.handleInfos {
+ if isHandleValid(&info.Handle) {
+ t.Fatalf("failed to close handle at index #%d: %v", i, info)
+ }
+ }
+ })
+}
+
+func handlePanic(t *testing.T) {
+ // When running tests on device, this bubbles up the error on the
+ // console launching the tests, rather than having to look at the
+ // device's kernel logs.
+ if r := recover(); r != nil {
+ t.Fatalf("panic: %s", r)
+ panic(r)
+ }
+}
+
+// createHandles returns a list handles where subtype of result[i] == subtypes[i]
+func createHandles(subtypes []zx.ObjectType) []zx.Handle {
+ // calculate the number of handles of each subtype that is needed
+ handleCounts := make(map[zx.ObjectType]int)
+ for _, subtype := range subtypes {
+ handleCounts[subtype]++
+ }
+
+ // batch create the handles for each subtype. this makes it possible to
+ // use both handles of a pair whenever possible
+ handles := make(map[zx.ObjectType][]zx.Handle)
+ for subtype, count := range handleCounts {
+ switch subtype {
+ case zx.ObjectTypeChannel:
+ handles[subtype] = makeChannels(count)
+ case zx.ObjectTypeEvent:
+ handles[subtype] = makeEvents(count)
+ default:
+ panic(fmt.Sprintf("Unsupported handle subtype %d", subtype))
+ }
+ }
+
+ // rearrange the created handles into the order specified by the input
+ result := make([]zx.Handle, len(subtypes))
+ for i, subtype := range subtypes {
+ handleCounts[subtype]--
+ result[i] = handles[subtype][handleCounts[subtype]]
+ }
+ return result
+}
+
+func makeChannels(count int) []zx.Handle {
+ channels := make([]zx.Handle, count)
+ for i := 0; i < count/2; i++ {
+ c1, c2, err := newChannel(0)
+ if err != nil {
+ panic(err)
+ }
+ channels[i*2] = zx.Handle(c1)
+ channels[i*2+1] = zx.Handle(c2)
+ }
+
+ if count%2 == 1 {
+ c1, c2, err := newChannel(0)
+ if err != nil {
+ panic(err)
+ }
+ channels[count-1] = zx.Handle(c1)
+ channelClose(&c2)
+ }
+
+ return channels
+}
+
+func makeEvents(count int) []zx.Handle {
+ events := make([]zx.Handle, count)
+ for i := 0; i < count; i++ {
+ event, err := newEvent(0)
+ if err != nil {
+ panic(err)
+ }
+ events[i] = zx.Handle(event)
+ }
+ return events
+}
diff --git a/src/syscall/zx/fidl/fidl_test/zx_fuchsia_test.go b/src/syscall/zx/fidl/fidl_test/zx_fuchsia_test.go
new file mode 100644
index 0000000..a2aa292
--- /dev/null
+++ b/src/syscall/zx/fidl/fidl_test/zx_fuchsia_test.go
@@ -0,0 +1,13 @@
+// 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.
+
+package fidl_test
+
+import "syscall/zx"
+
+var handleClose = (*zx.Handle).Close
+var channelClose = (*zx.Channel).Close
+var newChannel = zx.NewChannel
+var newEvent = zx.NewEvent
+var isHandleValid = (*zx.Handle).GetInfoHandleValid
diff --git a/src/syscall/zx/fidl/fidl_test/zx_notfuchsia_test.go b/src/syscall/zx/fidl/fidl_test/zx_notfuchsia_test.go
new file mode 100644
index 0000000..0c54909
--- /dev/null
+++ b/src/syscall/zx/fidl/fidl_test/zx_notfuchsia_test.go
@@ -0,0 +1,36 @@
+// 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.
+
+// +build !fuchsia
+
+package fidl_test
+
+import "syscall/zx"
+
+var handleCounter = 0
+
+func handleClose(*zx.Handle) error {
+ return nil
+}
+
+func channelClose(*zx.Channel) error {
+ return nil
+}
+
+func newChannel(uint32) (zx.Channel, zx.Channel, error) {
+ return zx.Channel(nextHandle()), zx.Channel(nextHandle()), nil
+}
+
+func newEvent(uint32) (zx.Event, error) {
+ return zx.Event(nextHandle()), nil
+}
+
+func isHandleValid(handle *zx.Handle) bool {
+ return false
+}
+
+func nextHandle() zx.Handle {
+ handleCounter++
+ return zx.Handle(handleCounter)
+}
diff --git a/src/syscall/zx/fidl/interface.go b/src/syscall/zx/fidl/interface.go
new file mode 100644
index 0000000..cda347b
--- /dev/null
+++ b/src/syscall/zx/fidl/interface.go
@@ -0,0 +1,334 @@
+// 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 fidl
+
+import (
+ "sync"
+ "syscall/zx"
+)
+
+// ServiceRequest is an abstraction over a FIDL interface request which is
+// intended to be used as part of service discovery.
+type ServiceRequest interface {
+ // Name returns the name of the service being requested.
+ Name() string
+
+ // ToChannel returns the underlying channel of the ServiceRequest.
+ ToChannel() zx.Channel
+}
+
+// InterfaceRequest is a wrapper type around a channel and represents the server side
+// of a FIDL interface, to be sent to a server as a request.
+type InterfaceRequest struct {
+ zx.Channel
+}
+
+// NewInterfaceRequest generates two sides of a channel with one layer of
+// type casts out of the way to minimize the amount of generated code. Semantically,
+// the two sides of the channel represent the interface request and the client
+// side of the interface (the proxy). It returns an error on failure.
+func NewInterfaceRequest() (InterfaceRequest, *ChannelProxy, error) {
+ h0, h1, err := newChannel(0)
+ if err != nil {
+ return InterfaceRequest{}, nil, err
+ }
+ return InterfaceRequest{Channel: h0}, &ChannelProxy{Channel: h1}, nil
+}
+
+// Proxy represents the client side of a FIDL interface.
+type Proxy interface {
+ IsValid() bool
+ Send(ordinal uint64, req Message) error
+ Recv(ordinal uint64, resp Message) error
+ Call(ordinal uint64, req Message, resp Message) error
+}
+
+type DispatchArgs struct {
+ Ctx Context
+ Ordinal uint64
+ Bytes []byte
+ HandleInfos []zx.HandleInfo
+}
+
+// Stub represents a generated type which wraps the server-side implementation of a
+// FIDL interface.
+//
+// It contains logic which is able to dispatch into the correct implementation given
+// the incoming message ordinal and its data.
+type Stub interface {
+ // Dispatch dispatches into the appropriate method implementation for a FIDL
+ // interface by using the ordinal.
+ //
+ // It also takes the data as bytes and transforms it into arguments usable by
+ // the method implementation. It then optionally returns a response if the
+ // method has a response, in which case, the boolean return value is true.
+ Dispatch(args DispatchArgs) (Message, bool, error)
+}
+
+type readResult struct {
+ header MessageHeader
+ objBytes []byte // decoded bytes (excluding header)
+ handleInfos []zx.HandleInfo // decoded handles
+ // full objects retreived from the byte and handles pool to be returned to the pool.
+ poolBytes []byte
+ poolHandleInfos []zx.HandleInfo
+}
+
+// ChannelProxy a Proxy that is backed by a channel.
+type ChannelProxy struct {
+ // Channel is the underlying channel endpoint for this interface.
+ zx.Channel
+
+ mu struct {
+ sync.Mutex
+ lastTxid uint32
+ results map[uint32]readResult
+ // 0-txid corresponds to event messages that lack request/response pair.
+ // Multiple of these can be read before they are processed and there needs
+ // to be a place to store them.
+ zeroTxidResults []readResult
+ err error
+ readerElected bool
+ callsAwaitingReply map[uint32]struct{}
+ }
+ cond sync.Cond
+ initOnce sync.Once
+}
+
+func (p *ChannelProxy) init() {
+ p.cond.L = &p.mu.Mutex
+ p.mu.results = make(map[uint32]readResult)
+ p.mu.callsAwaitingReply = make(map[uint32]struct{})
+}
+
+// Assert that ChannelProxy implements the Proxy interface.
+var _ Proxy = &ChannelProxy{}
+
+// IsValid returns true if the underlying channel is a valid handle.
+func (p *ChannelProxy) IsValid() bool {
+ return p.Channel.Handle().IsValid()
+}
+
+// Send sends the request over the channel with the specified ordinal
+// without a response.
+func (p *ChannelProxy) Send(ordinal uint64, req Message) error {
+ // Messages that do not require a response should be written with transaction id 0.
+ // (See https://fuchsia.dev/fuchsia-src/development/languages/fidl/reference/wire-format).
+ err := p.send(0, ordinal, req)
+ if err != nil {
+ // TODO: do something with this error?
+ _ = channelClose(&p.Channel)
+ }
+ return err
+}
+
+func (p *ChannelProxy) send(txid uint32, ordinal uint64, req Message) error {
+ reqHeader := newCtx().NewHeader()
+
+ reqHeader.Txid = txid
+ reqHeader.Ordinal = ordinal
+
+ respb := messageBytesPool.Get().([]byte)
+ resphd := messageHandleDispositionsPool.Get().([]zx.HandleDisposition)
+
+ defer messageBytesPool.Put(respb)
+ defer messageHandleDispositionsPool.Put(resphd)
+
+ nb, nh, err := MarshalHeaderThenMessage(&reqHeader, req, respb[:], resphd[:])
+ if err != nil {
+ return err
+ }
+
+ // Write the encoded bytes to the channel.
+ return withRetry(func() error {
+ return channelWriteEtc(&p.Channel, respb[:nb], resphd[:nh], 0)
+ }, *p.Channel.Handle(), zx.SignalChannelWritable, zx.SignalChannelPeerClosed)
+}
+
+// Recv waits for an event and writes the response into the response.
+func (p *ChannelProxy) Recv(ordinal uint64, resp Message) error {
+ // Messages that do not require a response should be written with transaction id 0.
+ // (See https://fuchsia.dev/fuchsia-src/development/languages/fidl/reference/wire-format).
+ err := p.recv(0, ordinal, resp)
+ if err != nil {
+ // TODO: do something with this error?
+ _ = channelClose(&p.Channel)
+ }
+ return err
+}
+
+func (res *readResult) consume(ordinal uint64, resp Message) error {
+ defer messageBytesPool.Put(res.poolBytes)
+ defer messageHandleInfosPool.Put(res.poolHandleInfos)
+
+ if res.header.Ordinal != ordinal {
+ return newExpectError(ErrUnexpectedOrdinal, ordinal, res.header.Ordinal)
+ }
+
+ var err error
+ if resp != nil {
+ _, _, err = UnmarshalWithContext2(res.header.NewCtx(), res.objBytes, res.handleInfos, resp)
+ }
+
+ return err
+}
+
+func (p *ChannelProxy) read(header *MessageHeader, poolBytes []byte, poolHandleInfos []zx.HandleInfo) ([]byte, []zx.HandleInfo, error) {
+ var nb, nh uint32
+ if err := withRetry(func() error {
+ var err error
+ nb, nh, err = channelReadEtc(&p.Channel, poolBytes[:], poolHandleInfos[:], 0)
+ return err
+ }, *p.Channel.Handle(), zx.SignalChannelReadable, zx.SignalChannelPeerClosed); err != nil {
+ return nil, nil, err
+ }
+ objBytes := poolBytes[:nb]
+ handleInfos := poolHandleInfos[:nh]
+
+ hnb, _, err := Unmarshal(objBytes, nil, header)
+ if err != nil {
+ return nil, nil, err
+ }
+ objBytes = objBytes[hnb:]
+ if !header.IsSupportedVersion() {
+ return nil, nil, ErrUnknownMagic
+ }
+ return objBytes, handleInfos, nil
+}
+
+func (p *ChannelProxy) recv(txid uint32, ordinal uint64, resp Message) error {
+ p.initOnce.Do(p.init)
+
+ p.mu.Lock()
+ defer p.mu.Unlock()
+
+ for {
+ // Check if a result for this txid already exists and handle it.
+ if txid == 0 {
+ if len(p.mu.zeroTxidResults) != 0 {
+ res := p.mu.zeroTxidResults[0]
+ // Reset the lost element to release references it holds, since
+ // slicing does not release the underlying memory.
+ p.mu.zeroTxidResults[0] = readResult{}
+ p.mu.zeroTxidResults = p.mu.zeroTxidResults[1:]
+ return res.consume(ordinal, resp)
+ }
+ } else {
+ if res, ok := p.mu.results[txid]; ok {
+ delete(p.mu.results, txid)
+ return res.consume(ordinal, resp)
+ }
+ }
+
+ // Check if the channel already errored.
+ if p.mu.err != nil {
+ return p.mu.err
+ }
+
+ // If another goroutine is reading from the channel, wait for it to finish.
+ if p.mu.readerElected {
+ p.cond.Wait()
+ continue
+ }
+
+ // This goroutine is the reader, so read from the channel.
+ p.mu.readerElected = true
+
+ poolBytes := messageBytesPool.Get().([]byte)
+ poolHandleInfos := messageHandleInfosPool.Get().([]zx.HandleInfo)
+ var header MessageHeader
+ if err := func() error {
+ p.mu.Unlock()
+ objBytes, handleInfos, err := p.read(&header, poolBytes, poolHandleInfos)
+ p.mu.Lock()
+
+ if err != nil {
+ return err
+ }
+ result := readResult{
+ header: header,
+ objBytes: objBytes,
+ handleInfos: handleInfos,
+ poolBytes: poolBytes,
+ poolHandleInfos: poolHandleInfos,
+ }
+ if header.Txid == 0 {
+ p.mu.zeroTxidResults = append(p.mu.zeroTxidResults, result)
+ } else {
+ if _, ok := p.mu.results[header.Txid]; ok {
+ return newValueError(ErrDuplicateTxidReceived, header.Txid)
+ }
+ if _, ok := p.mu.callsAwaitingReply[header.Txid]; !ok {
+ return newValueError(ErrResponseWithoutRequest, header.Txid)
+ }
+ p.mu.results[header.Txid] = result
+ delete(p.mu.callsAwaitingReply, header.Txid)
+ }
+ return nil
+ }(); err != nil {
+ messageBytesPool.Put(poolBytes)
+ messageHandleInfosPool.Put(poolHandleInfos)
+
+ p.mu.err = err
+ // NB: we do not reset p.mu.results because each element there has a
+ // sitting waiter that will consume the result.
+ for _, res := range p.mu.zeroTxidResults {
+ messageBytesPool.Put(res.poolBytes)
+ messageHandleInfosPool.Put(res.poolHandleInfos)
+ }
+ p.mu.zeroTxidResults = nil
+ p.mu.callsAwaitingReply = nil
+ }
+
+ p.mu.readerElected = false
+ p.cond.Broadcast()
+ }
+}
+
+// Call sends the request over the channel with the specified ordinal
+// and synchronously waits for a response. It then writes the response into the
+// response.
+func (p *ChannelProxy) Call(ordinal uint64, req Message, resp Message) error {
+ p.initOnce.Do(p.init)
+
+ err := func() error {
+ var txid uint32
+ if err := func() error {
+ p.mu.Lock()
+ defer p.mu.Unlock()
+
+ if err := p.mu.err; err != nil {
+ return err
+ }
+
+ for {
+ p.mu.lastTxid++
+ // Transaction id 1 through 0x7fffffff are reserved for userspace.
+ // (See https://fuchsia.dev/fuchsia-src/development/languages/fidl/reference/wire-format).
+ if id := p.mu.lastTxid & 0x7fffffff; id != 0 {
+ txid = id
+ break
+ }
+ }
+ if _, ok := p.mu.callsAwaitingReply[txid]; ok {
+ return newValueError(ErrDuplicateTxidWaiting, txid)
+ }
+ p.mu.callsAwaitingReply[txid] = struct{}{}
+ return nil
+ }(); err != nil {
+ return err
+ }
+
+ if err := p.send(txid, ordinal, req); err != nil {
+ return err
+ }
+ return p.recv(txid, ordinal, resp)
+ }()
+ if err != nil {
+ // TODO: do something with this error?
+ _ = channelClose(&p.Channel)
+ }
+ return err
+}
diff --git a/src/syscall/zx/fidl/interface_test.go b/src/syscall/zx/fidl/interface_test.go
new file mode 100644
index 0000000..2222610
--- /dev/null
+++ b/src/syscall/zx/fidl/interface_test.go
@@ -0,0 +1,339 @@
+// 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 mod` ignores file names for the purpose of resolving
+// dependencies, and zxwait doesn't build on not-Fuchsia.
+// +build fuchsia
+
+package fidl_test
+
+import (
+ "math/rand"
+ "sync"
+ "syscall/zx"
+ "syscall/zx/fidl"
+ "syscall/zx/zxwait"
+ "testing"
+)
+
+var _ fidl.Message = (*message)(nil)
+
+type message struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"0"`
+}
+
+var _mMessage = fidl.MustCreateMarshaler(message{})
+
+func (*message) Marshaler() fidl.Marshaler {
+ return _mMessage
+}
+
+func TestProxySimple(t *testing.T) {
+ c0, c1, err := zx.NewChannel(0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer c0.Close()
+ defer c1.Close()
+
+ var wg sync.WaitGroup
+ defer wg.Wait()
+
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ sender := &fidl.ChannelProxy{Channel: c0}
+ if err := sender.Call(1, &message{}, &message{}); err != nil {
+ t.Error(err)
+ }
+ }()
+
+ if err := serve(c1); err != nil {
+ t.Fatal(err)
+ }
+}
+
+func TestCallReturnsError(t *testing.T) {
+ var c zx.Channel // Invalid channel.
+ sender := &fidl.ChannelProxy{Channel: c}
+ err := sender.Call(1, &message{}, &message{})
+ if err == nil {
+ t.Fatalf("expected ErrBadHandle error")
+ } else if zerr, ok := err.(*zx.Error); !ok || zerr.Status != zx.ErrBadHandle {
+ t.Fatalf("unexpected error: %v", err)
+ }
+}
+
+func TestCall(t *testing.T) {
+ const concurrency = 10
+ const numMessages = 100
+
+ c0, c1, err := zx.NewChannel(0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer func() {
+ if err := c0.Close(); err != nil {
+ t.Log(err)
+ }
+ if err := c1.Close(); err != nil {
+ t.Log(err)
+ }
+ }()
+
+ var wg sync.WaitGroup
+ defer wg.Wait()
+
+ sender := fidl.ChannelProxy{Channel: c0}
+ // Spin up |concurrency| senders, each sending |numMessages|.
+ for i := 0; i < concurrency; i++ {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ for i := 0; i < numMessages; i++ {
+ ordinal := rand.Uint64()
+
+ if err := sender.Call(ordinal, &message{}, &message{}); err != nil {
+ t.Error(err)
+ }
+ }
+ }()
+ }
+
+ // A few extra reads from the channel to observe peer closure.
+ //
+ // This is a regression test for issues where observed errors would cause:
+ //
+ // - all outstanding calls to fail even if their responses had already
+ // been read.
+ //
+ // - pending reads to deadlock because the proxy did not release the "read
+ // lease", causing "followers" to wait indefinitely.
+ for i := 0; i < 5; i++ {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ if err := sender.Recv(0, &message{}); err == nil {
+ t.Fatalf("expected ErrPeerClosed")
+ } else if zerr, ok := err.(*zx.Error); !ok || zerr.Status != zx.ErrPeerClosed {
+ t.Fatalf("unexpected error: %s", err)
+ }
+ }()
+ }
+
+ // Echo the |concurrency*numMessages| messages sent by the senders above.
+ for i := 0; i < concurrency*numMessages; i++ {
+ if err := serve(c1); err != nil {
+ t.Fatal(err)
+ }
+ }
+ if err := c1.Close(); err != nil {
+ t.Error(err)
+ }
+}
+
+func TestRecv(t *testing.T) {
+ const n = 100
+ c0, c1, err := zx.NewChannel(0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer c0.Close()
+ defer c1.Close()
+
+ const ordinal uint64 = 1
+
+ var wg sync.WaitGroup
+ defer wg.Wait()
+
+ for i := 0; i < n; i++ {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+
+ receiver := &fidl.ChannelProxy{Channel: c1}
+ if err := zxwait.WithRetry(func() error {
+ return receiver.Recv(ordinal, &message{})
+ }, *receiver.Channel.Handle(), zx.SignalChannelReadable, zx.SignalChannelPeerClosed); err != nil {
+ t.Error(err)
+ }
+ }()
+ }
+
+ for i := 0; i < n; i++ {
+ sender := &fidl.ChannelProxy{Channel: c0}
+ if err := sender.Send(ordinal, &message{}); err != nil {
+ t.Fatal(err)
+ }
+ }
+}
+
+func TestRecvReturnsError(t *testing.T) {
+ var c zx.Channel // Invalid channel.
+ sender := &fidl.ChannelProxy{Channel: c}
+ err := sender.Recv(1, &message{})
+ if err == nil {
+ t.Fatalf("expected ErrBadHandle error")
+ } else if zerr, ok := err.(*zx.Error); !ok || zerr.Status != zx.ErrBadHandle {
+ t.Fatalf("unexpected error: %v", err)
+ }
+}
+
+func TestMagicNumberSend(t *testing.T) {
+ ch, sh, err := zx.NewChannel(0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer ch.Close()
+ defer sh.Close()
+
+ var msg message
+ client := fidl.ChannelProxy{Channel: ch}
+ if err := client.Send(0, &msg); err != nil {
+ t.Fatal(err)
+ }
+
+ respb := make([]byte, zx.ChannelMaxMessageBytes)
+ resphi := make([]zx.HandleInfo, zx.ChannelMaxMessageHandles)
+ nb, nh, err := sh.ReadEtc(respb[:], resphi[:], 0)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ var header fidl.MessageHeader
+ if err := fidl.UnmarshalHeaderThenMessage(respb[:nb], resphi[:nh], &header, &msg); err != nil {
+ t.Fatal(err)
+ }
+
+ if header.Magic != fidl.FidlWireFormatMagicNumberInitial {
+ t.Fatalf("got header.Magic = %d, want = %d", header.Magic, fidl.FidlWireFormatMagicNumberInitial)
+ }
+}
+
+func TestMagicNumberCheck(t *testing.T) {
+ ch, sh, err := zx.NewChannel(0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer ch.Close()
+ defer sh.Close()
+ client := fidl.ChannelProxy{Channel: ch}
+
+ // send an event with an unknown magic number
+ event := []byte{
+ 0, 0, 0, 0, //txid
+ 0, 0, 0, // flags
+ 0, // magic number,
+ 0, 0, 0, 0, 0, 0, 0, 0, // method ordinal
+ 0, 0, 0, 0, 0, 0, 0, 0, // empty struct data
+ }
+ if err := sh.Write(event, []zx.Handle{}, 0); err != nil {
+ t.Fatal(err)
+ }
+
+ var eventMsg message
+ if err := client.Recv(0, &eventMsg); err != fidl.ErrUnknownMagic {
+ t.Fatalf("got client.Recv(...) = %v, want = %s", err, fidl.ErrUnknownMagic)
+ }
+
+ func() {
+ // read directly from channel to ensure it is closed.
+ _, _, err := sh.Read(nil, nil, 0)
+ switch err := err.(type) {
+ case *zx.Error:
+ if err.Status == zx.ErrPeerClosed {
+ return
+ }
+ }
+ t.Fatalf("got sh.Read(...) = %v, want = %s", err, zx.ErrPeerClosed)
+ }()
+}
+
+func TestConcurrentUseOfChannelProxy(t *testing.T) {
+ const nEvents = 500
+ const nMessages = 500
+
+ clientChan, serverChan, err := zx.NewChannel(0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer clientChan.Close()
+ defer serverChan.Close()
+
+ var wg sync.WaitGroup
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ for i := 0; i < nMessages; i++ {
+ if err := serve(serverChan); err != nil {
+ t.Fatal(err)
+ }
+ }
+ }()
+
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ sender := &fidl.ChannelProxy{Channel: serverChan}
+ for i := 0; i < nEvents; i++ {
+ if err := sender.Send(1, &message{}); err != nil {
+ t.Fatal(err)
+ }
+ }
+ }()
+
+ client := &fidl.ChannelProxy{Channel: clientChan}
+
+ for i := 0; i < nMessages; i++ {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ if err := client.Call(1, &message{}, &message{}); err != nil {
+ t.Fatal(err)
+ }
+ }()
+ }
+
+ for i := 0; i < nEvents; i++ {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ if err := client.Recv(1, &message{}); err != nil {
+ t.Fatal(err)
+ }
+ }()
+ }
+
+ wg.Wait()
+}
+
+func serve(ch zx.Channel) error {
+ var respb [zx.ChannelMaxMessageBytes]byte
+
+ var header fidl.MessageHeader
+ var msg message
+ if err := zxwait.WithRetry(func() error {
+ nb, _, err := ch.Read(respb[:], nil, 0)
+ if err != nil {
+ return err
+ }
+ if err := fidl.UnmarshalHeaderThenMessage(respb[:nb], nil, &header, &msg); err != nil {
+ return err
+ }
+ return nil
+ }, *ch.Handle(), zx.SignalChannelReadable, zx.SignalChannelPeerClosed); err != nil {
+ return err
+ }
+
+ cnb, _, err := fidl.MarshalHeaderThenMessage(&header, &msg, respb[:], nil)
+ if err != nil {
+ return err
+ }
+
+ if err := ch.Write(respb[:cnb], nil, 0); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/src/syscall/zx/fidl/internal/bindingstest/BUILD.gn b/src/syscall/zx/fidl/internal/bindingstest/BUILD.gn
new file mode 100644
index 0000000..8f0a7fe
--- /dev/null
+++ b/src/syscall/zx/fidl/internal/bindingstest/BUILD.gn
@@ -0,0 +1,11 @@
+# Copyright 2018 The Fuchsia Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/fidl/fidl.gni")
+
+fidl("bindingstest") {
+ experimental_flags = [ "enable_handle_rights" ]
+ public_deps = [ "//zircon/vdso/zx" ]
+ sources = [ "test.test.fidl" ]
+}
diff --git a/src/syscall/zx/fidl/internal/bindingstest/impl.go b/src/syscall/zx/fidl/internal/bindingstest/impl.go
new file mode 100644
index 0000000..f076c21
--- /dev/null
+++ b/src/syscall/zx/fidl/internal/bindingstest/impl.go
@@ -0,0 +1,1779 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package bindingstest
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+)
+
+const (
+ KMaxBuf uint64 = 8192
+)
+
+var _ _bindings.Enum = TestUcharEnum(0)
+
+type TestUcharEnum uint8
+
+const (
+ TestUcharEnumUcharEnum1 TestUcharEnum = 1
+ TestUcharEnumUcharEnum2 TestUcharEnum = 2
+)
+
+func (_ TestUcharEnum) I_EnumValues() []TestUcharEnum {
+ return []TestUcharEnum{
+ TestUcharEnumUcharEnum1,
+ TestUcharEnumUcharEnum2,
+ }
+}
+
+func (_ TestUcharEnum) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x TestUcharEnum) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x TestUcharEnum) String() string {
+ switch x {
+ case 1:
+ return "UcharEnum1"
+ case 2:
+ return "UcharEnum2"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = StrictBits(0)
+
+type StrictBits uint32
+
+const (
+ StrictBitsOne StrictBits = 1
+ StrictBitsTwo StrictBits = 2
+ StrictBits_Mask StrictBits = 3
+)
+
+func (_ StrictBits) I_BitsMask() StrictBits {
+ return StrictBits_Mask
+}
+
+func (_ StrictBits) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x StrictBits) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x StrictBits) GetUnknownBits() uint64 {
+ return uint64(^StrictBits_Mask & x)
+}
+
+func (x StrictBits) InvertBits() StrictBits {
+ return StrictBits_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x StrictBits) HasBits(mask StrictBits) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x StrictBits) ClearBits(mask StrictBits) StrictBits {
+ return ^mask & x
+}
+
+func (x StrictBits) String() string {
+ switch x {
+ case 1:
+ return "One"
+ case 2:
+ return "Two"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = FlexibleBits(0)
+
+type FlexibleBits uint32
+
+const (
+ FlexibleBitsOne FlexibleBits = 1
+ FlexibleBitsTwo FlexibleBits = 2
+ FlexibleBits_Mask FlexibleBits = 3
+)
+
+func (_ FlexibleBits) I_BitsMask() FlexibleBits {
+ return FlexibleBits_Mask
+}
+
+func (_ FlexibleBits) I_BitsIsStrict() bool {
+ return false
+}
+
+func (x FlexibleBits) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x FlexibleBits) GetUnknownBits() uint64 {
+ return uint64(^FlexibleBits_Mask & x)
+}
+
+func (x FlexibleBits) InvertBits() FlexibleBits {
+ return FlexibleBits_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x FlexibleBits) HasBits(mask FlexibleBits) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x FlexibleBits) ClearBits(mask FlexibleBits) FlexibleBits {
+ return ^mask & x
+}
+
+func (x FlexibleBits) String() string {
+ switch x {
+ case 1:
+ return "One"
+ case 2:
+ return "Two"
+ }
+ return "Unknown"
+}
+
+type TestSimple struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ X int64 `fidl_offset_v1:"0"`
+}
+
+var _mTestSimple = _bindings.CreateLazyMarshaler(TestSimple{})
+
+func (msg *TestSimple) Marshaler() _bindings.Marshaler {
+ return _mTestSimple
+}
+
+type TestSimpleBool struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+ X bool `fidl_offset_v1:"0"`
+}
+
+var _mTestSimpleBool = _bindings.CreateLazyMarshaler(TestSimpleBool{})
+
+func (msg *TestSimpleBool) Marshaler() _bindings.Marshaler {
+ return _mTestSimpleBool
+}
+
+type TestAlignment1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"4"`
+ X int8 `fidl_offset_v1:"0"`
+ Y int8 `fidl_offset_v1:"1"`
+ Z uint32 `fidl_offset_v1:"4"`
+}
+
+var _mTestAlignment1 = _bindings.CreateLazyMarshaler(TestAlignment1{})
+
+func (msg *TestAlignment1) Marshaler() _bindings.Marshaler {
+ return _mTestAlignment1
+}
+
+type TestAlignment2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"20" fidl_alignment_v1:"4"`
+ A uint32 `fidl_offset_v1:"0"`
+ B uint32 `fidl_offset_v1:"4"`
+ C int8 `fidl_offset_v1:"8"`
+ D int8 `fidl_offset_v1:"9"`
+ E int8 `fidl_offset_v1:"10"`
+ F uint8 `fidl_offset_v1:"11"`
+ G uint32 `fidl_offset_v1:"12"`
+ H uint16 `fidl_offset_v1:"16"`
+ I uint16 `fidl_offset_v1:"18"`
+}
+
+var _mTestAlignment2 = _bindings.CreateLazyMarshaler(TestAlignment2{})
+
+func (msg *TestAlignment2) Marshaler() _bindings.Marshaler {
+ return _mTestAlignment2
+}
+
+type TestFloat1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ A float32 `fidl_offset_v1:"0"`
+}
+
+var _mTestFloat1 = _bindings.CreateLazyMarshaler(TestFloat1{})
+
+func (msg *TestFloat1) Marshaler() _bindings.Marshaler {
+ return _mTestFloat1
+}
+
+type TestFloat2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ A float64 `fidl_offset_v1:"0"`
+}
+
+var _mTestFloat2 = _bindings.CreateLazyMarshaler(TestFloat2{})
+
+func (msg *TestFloat2) Marshaler() _bindings.Marshaler {
+ return _mTestFloat2
+}
+
+type TestFloat3 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ A float32 `fidl_offset_v1:"0"`
+ B float64 `fidl_offset_v1:"8"`
+ C uint64 `fidl_offset_v1:"16"`
+ D float32 `fidl_offset_v1:"24"`
+}
+
+var _mTestFloat3 = _bindings.CreateLazyMarshaler(TestFloat3{})
+
+func (msg *TestFloat3) Marshaler() _bindings.Marshaler {
+ return _mTestFloat3
+}
+
+type TestArray1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"5" fidl_alignment_v1:"1"`
+ A [5]int8 `fidl_offset_v1:"0"`
+}
+
+var _mTestArray1 = _bindings.CreateLazyMarshaler(TestArray1{})
+
+func (msg *TestArray1) Marshaler() _bindings.Marshaler {
+ return _mTestArray1
+}
+
+type TestArray2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ A float64 `fidl_offset_v1:"0"`
+ B [1]float32 `fidl_offset_v1:"8"`
+}
+
+var _mTestArray2 = _bindings.CreateLazyMarshaler(TestArray2{})
+
+func (msg *TestArray2) Marshaler() _bindings.Marshaler {
+ return _mTestArray2
+}
+
+type TestArray3 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ A int32 `fidl_offset_v1:"0"`
+ B [3]uint16 `fidl_offset_v1:"4"`
+ C uint64 `fidl_offset_v1:"16"`
+}
+
+var _mTestArray3 = _bindings.CreateLazyMarshaler(TestArray3{})
+
+func (msg *TestArray3) Marshaler() _bindings.Marshaler {
+ return _mTestArray3
+}
+
+type TestArray4 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"9" fidl_alignment_v1:"1"`
+ A [9]bool `fidl_offset_v1:"0"`
+}
+
+var _mTestArray4 = _bindings.CreateLazyMarshaler(TestArray4{})
+
+func (msg *TestArray4) Marshaler() _bindings.Marshaler {
+ return _mTestArray4
+}
+
+type TestString1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ A string `fidl_offset_v1:"0" fidl_bounds:""`
+ B *string `fidl_offset_v1:"16" fidl_bounds:""`
+}
+
+var _mTestString1 = _bindings.CreateLazyMarshaler(TestString1{})
+
+func (msg *TestString1) Marshaler() _bindings.Marshaler {
+ return _mTestString1
+}
+
+type TestString2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ A [2]string `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mTestString2 = _bindings.CreateLazyMarshaler(TestString2{})
+
+func (msg *TestString2) Marshaler() _bindings.Marshaler {
+ return _mTestString2
+}
+
+type TestString3 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ A [2]string `fidl_offset_v1:"0" fidl_bounds:"4"`
+ B [2]*string `fidl_offset_v1:"32" fidl_bounds:"4"`
+}
+
+var _mTestString3 = _bindings.CreateLazyMarshaler(TestString3{})
+
+func (msg *TestString3) Marshaler() _bindings.Marshaler {
+ return _mTestString3
+}
+
+type TestStringWithBound struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ A string `fidl_offset_v1:"0" fidl_bounds:"8"`
+}
+
+var _mTestStringWithBound = _bindings.CreateLazyMarshaler(TestStringWithBound{})
+
+func (msg *TestStringWithBound) Marshaler() _bindings.Marshaler {
+ return _mTestStringWithBound
+}
+
+type TestOptStringWithBound struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ A *string `fidl_offset_v1:"0" fidl_bounds:"8"`
+}
+
+var _mTestOptStringWithBound = _bindings.CreateLazyMarshaler(TestOptStringWithBound{})
+
+func (msg *TestOptStringWithBound) Marshaler() _bindings.Marshaler {
+ return _mTestOptStringWithBound
+}
+
+type TestVector1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ A []int8 `fidl_offset_v1:"0" fidl_bounds:""`
+ B *[]int16 `fidl_offset_v1:"16" fidl_bounds:""`
+ C []int32 `fidl_offset_v1:"32" fidl_bounds:"2"`
+ D *[]int64 `fidl_offset_v1:"48" fidl_bounds:"2"`
+}
+
+var _mTestVector1 = _bindings.CreateLazyMarshaler(TestVector1{})
+
+func (msg *TestVector1) Marshaler() _bindings.Marshaler {
+ return _mTestVector1
+}
+
+type TestVector2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ A [2][]int8 `fidl_offset_v1:"0" fidl_bounds:""`
+ B [][]int8 `fidl_offset_v1:"32" fidl_bounds:"2,"`
+ C []*[]string `fidl_offset_v1:"48" fidl_bounds:"2,2,5"`
+}
+
+var _mTestVector2 = _bindings.CreateLazyMarshaler(TestVector2{})
+
+func (msg *TestVector2) Marshaler() _bindings.Marshaler {
+ return _mTestVector2
+}
+
+type TestStruct1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ A TestSimple `fidl_offset_v1:"0"`
+ B *TestSimple `fidl_offset_v1:"8"`
+}
+
+var _mTestStruct1 = _bindings.CreateLazyMarshaler(TestStruct1{})
+
+func (msg *TestStruct1) Marshaler() _bindings.Marshaler {
+ return _mTestStruct1
+}
+
+type TestStruct2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"88" fidl_alignment_v1:"8"`
+ A TestArray1 `fidl_offset_v1:"0"`
+ B TestFloat1 `fidl_offset_v1:"8"`
+ C TestVector1 `fidl_offset_v1:"16"`
+ D *TestString1 `fidl_offset_v1:"80"`
+}
+
+var _mTestStruct2 = _bindings.CreateLazyMarshaler(TestStruct2{})
+
+func (msg *TestStruct2) Marshaler() _bindings.Marshaler {
+ return _mTestStruct2
+}
+
+type EmptyStruct struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mEmptyStruct = _bindings.CreateLazyMarshaler(EmptyStruct{})
+
+func (msg *EmptyStruct) Marshaler() _bindings.Marshaler {
+ return _mEmptyStruct
+}
+
+type TestUnion1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"48" fidl_alignment_v1:"8"`
+ A Union1 `fidl_offset_v1:"0"`
+ B *Union1 `fidl_offset_v1:"24"`
+}
+
+var _mTestUnion1 = _bindings.CreateLazyMarshaler(TestUnion1{})
+
+func (msg *TestUnion1) Marshaler() _bindings.Marshaler {
+ return _mTestUnion1
+}
+
+type TestUnion2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ A []Union1 `fidl_offset_v1:"0" fidl_bounds:""`
+ B []*Union1 `fidl_offset_v1:"16" fidl_bounds:""`
+}
+
+var _mTestUnion2 = _bindings.CreateLazyMarshaler(TestUnion2{})
+
+func (msg *TestUnion2) Marshaler() _bindings.Marshaler {
+ return _mTestUnion2
+}
+
+type XUnion1Struct struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Xu XUnion1 `fidl_offset_v1:"0"`
+}
+
+var _mXUnion1Struct = _bindings.CreateLazyMarshaler(XUnion1Struct{})
+
+func (msg *XUnion1Struct) Marshaler() _bindings.Marshaler {
+ return _mXUnion1Struct
+}
+
+type XUnion1AsUnionStruct struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Xuau XUnion1AsUnion `fidl_offset_v1:"0"`
+}
+
+var _mXUnion1AsUnionStruct = _bindings.CreateLazyMarshaler(XUnion1AsUnionStruct{})
+
+func (msg *XUnion1AsUnionStruct) Marshaler() _bindings.Marshaler {
+ return _mXUnion1AsUnionStruct
+}
+
+type UnionInsideUnionStruct struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ U UnionInsideUnion `fidl_offset_v1:"0"`
+}
+
+var _mUnionInsideUnionStruct = _bindings.CreateLazyMarshaler(UnionInsideUnionStruct{})
+
+func (msg *UnionInsideUnionStruct) Marshaler() _bindings.Marshaler {
+ return _mUnionInsideUnionStruct
+}
+
+type XUnionInsideXUnionStruct struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ U XUnionInsideXUnion `fidl_offset_v1:"0"`
+}
+
+var _mXUnionInsideXUnionStruct = _bindings.CreateLazyMarshaler(XUnionInsideXUnionStruct{})
+
+func (msg *XUnionInsideXUnionStruct) Marshaler() _bindings.Marshaler {
+ return _mXUnionInsideXUnionStruct
+}
+
+type TestXUnion1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"48" fidl_alignment_v1:"8"`
+ A XUnion1 `fidl_offset_v1:"0"`
+ B *XUnion1 `fidl_offset_v1:"24"`
+}
+
+var _mTestXUnion1 = _bindings.CreateLazyMarshaler(TestXUnion1{})
+
+func (msg *TestXUnion1) Marshaler() _bindings.Marshaler {
+ return _mTestXUnion1
+}
+
+type TestXUnion2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ A []XUnion1 `fidl_offset_v1:"0" fidl_bounds:""`
+ B []*XUnion1 `fidl_offset_v1:"16" fidl_bounds:""`
+}
+
+var _mTestXUnion2 = _bindings.CreateLazyMarshaler(TestXUnion2{})
+
+func (msg *TestXUnion2) Marshaler() _bindings.Marshaler {
+ return _mTestXUnion2
+}
+
+type StrictXUnion1Struct struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Xu StrictXUnion1 `fidl_offset_v1:"0"`
+}
+
+var _mStrictXUnion1Struct = _bindings.CreateLazyMarshaler(StrictXUnion1Struct{})
+
+func (msg *StrictXUnion1Struct) Marshaler() _bindings.Marshaler {
+ return _mStrictXUnion1Struct
+}
+
+type TestStrictXUnion1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"48" fidl_alignment_v1:"8"`
+ A StrictXUnion1 `fidl_offset_v1:"0"`
+ B *StrictXUnion1 `fidl_offset_v1:"24"`
+}
+
+var _mTestStrictXUnion1 = _bindings.CreateLazyMarshaler(TestStrictXUnion1{})
+
+func (msg *TestStrictXUnion1) Marshaler() _bindings.Marshaler {
+ return _mTestStrictXUnion1
+}
+
+type TestStrictXUnion2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ A []StrictXUnion1 `fidl_offset_v1:"0" fidl_bounds:""`
+ B []*StrictXUnion1 `fidl_offset_v1:"16" fidl_bounds:""`
+}
+
+var _mTestStrictXUnion2 = _bindings.CreateLazyMarshaler(TestStrictXUnion2{})
+
+func (msg *TestStrictXUnion2) Marshaler() _bindings.Marshaler {
+ return _mTestStrictXUnion2
+}
+
+type TestHandle1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"4"`
+ A _zx.Handle `fidl_offset_v1:"0" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ B _zx.Handle `fidl_offset_v1:"4" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
+ C _zx.VMO `fidl_offset_v1:"8" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ D _zx.VMO `fidl_offset_v1:"12" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
+}
+
+var _mTestHandle1 = _bindings.CreateLazyMarshaler(TestHandle1{})
+
+func (msg *TestHandle1) Marshaler() _bindings.Marshaler {
+ return _mTestHandle1
+}
+
+type TestHandle2 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ A []_zx.Handle `fidl_offset_v1:"0" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"1,0"`
+ B []_zx.VMO `fidl_offset_v1:"16" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"1,1"`
+}
+
+var _mTestHandle2 = _bindings.CreateLazyMarshaler(TestHandle2{})
+
+func (msg *TestHandle2) Marshaler() _bindings.Marshaler {
+ return _mTestHandle2
+}
+
+type HasClientEnd struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ ClientEnd ExampleProtocolWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+}
+
+var _mHasClientEnd = _bindings.CreateLazyMarshaler(HasClientEnd{})
+
+func (msg *HasClientEnd) Marshaler() _bindings.Marshaler {
+ return _mHasClientEnd
+}
+
+type HasServerEnd struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ ServerEnd ExampleProtocolWithCtxInterfaceRequest `fidl_offset_v1:"0" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mHasServerEnd = _bindings.CreateLazyMarshaler(HasServerEnd{})
+
+func (msg *HasServerEnd) Marshaler() _bindings.Marshaler {
+ return _mHasServerEnd
+}
+
+type TestInterface1 struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"4"`
+ A Test1WithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+ B Test1WithCtxInterface `fidl_offset_v1:"4" fidl_handle_subtype:"4"`
+ C Test1WithCtxInterfaceRequest `fidl_offset_v1:"8" fidl_handle_subtype:"4" fidl_bounds:"0"`
+ D Test1WithCtxInterfaceRequest `fidl_offset_v1:"12" fidl_handle_subtype:"4" fidl_bounds:"1"`
+}
+
+var _mTestInterface1 = _bindings.CreateLazyMarshaler(TestInterface1{})
+
+func (msg *TestInterface1) Marshaler() _bindings.Marshaler {
+ return _mTestInterface1
+}
+
+type TestSimpleTable struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Table SimpleTable `fidl_offset_v1:"0"`
+}
+
+var _mTestSimpleTable = _bindings.CreateLazyMarshaler(TestSimpleTable{})
+
+func (msg *TestSimpleTable) Marshaler() _bindings.Marshaler {
+ return _mTestSimpleTable
+}
+
+type TestOlderSimpleTable struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Table OlderSimpleTable `fidl_offset_v1:"0"`
+}
+
+var _mTestOlderSimpleTable = _bindings.CreateLazyMarshaler(TestOlderSimpleTable{})
+
+func (msg *TestOlderSimpleTable) Marshaler() _bindings.Marshaler {
+ return _mTestOlderSimpleTable
+}
+
+type TestNewerSimpleTable struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Table NewerSimpleTable `fidl_offset_v1:"0"`
+}
+
+var _mTestNewerSimpleTable = _bindings.CreateLazyMarshaler(TestNewerSimpleTable{})
+
+func (msg *TestNewerSimpleTable) Marshaler() _bindings.Marshaler {
+ return _mTestNewerSimpleTable
+}
+
+type TestWithTableAndInt struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Table SimpleTable `fidl_offset_v1:"0"`
+ Foo uint64 `fidl_offset_v1:"16"`
+}
+
+var _mTestWithTableAndInt = _bindings.CreateLazyMarshaler(TestWithTableAndInt{})
+
+func (msg *TestWithTableAndInt) Marshaler() _bindings.Marshaler {
+ return _mTestWithTableAndInt
+}
+
+type Int64Struct struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ X int64 `fidl_offset_v1:"0"`
+}
+
+var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{})
+
+func (msg *Int64Struct) Marshaler() _bindings.Marshaler {
+ return _mInt64Struct
+}
+
+type TestFuchsiaIoReadAtResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Data []uint8 `fidl_offset_v1:"8" fidl_bounds:"8192"`
+}
+
+var _mTestFuchsiaIoReadAtResponse = _bindings.CreateLazyMarshaler(TestFuchsiaIoReadAtResponse{})
+
+func (msg *TestFuchsiaIoReadAtResponse) Marshaler() _bindings.Marshaler {
+ return _mTestFuchsiaIoReadAtResponse
+}
+
+type TestFuchsiaIoWriteAtRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Data []uint8 `fidl_offset_v1:"0" fidl_bounds:"8192"`
+ Offset uint64 `fidl_offset_v1:"16"`
+}
+
+var _mTestFuchsiaIoWriteAtRequest = _bindings.CreateLazyMarshaler(TestFuchsiaIoWriteAtRequest{})
+
+func (msg *TestFuchsiaIoWriteAtRequest) Marshaler() _bindings.Marshaler {
+ return _mTestFuchsiaIoWriteAtRequest
+}
+
+type TestFuchsiaPosixSocketSendMsgRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"56" fidl_alignment_v1:"8"`
+ Sockaddr []uint8 `fidl_offset_v1:"0" fidl_bounds:"128"`
+ Data [][]uint8 `fidl_offset_v1:"16" fidl_bounds:""`
+ Control []uint8 `fidl_offset_v1:"32" fidl_bounds:""`
+ Flags int16 `fidl_offset_v1:"48"`
+}
+
+var _mTestFuchsiaPosixSocketSendMsgRequest = _bindings.CreateLazyMarshaler(TestFuchsiaPosixSocketSendMsgRequest{})
+
+func (msg *TestFuchsiaPosixSocketSendMsgRequest) Marshaler() _bindings.Marshaler {
+ return _mTestFuchsiaPosixSocketSendMsgRequest
+}
+
+type InterfaceConfig struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Name string `fidl_offset_v1:"0" fidl_bounds:""`
+ IpAddressConfig IpAddressConfig `fidl_offset_v1:"16"`
+}
+
+var _mInterfaceConfig = _bindings.CreateLazyMarshaler(InterfaceConfig{})
+
+func (msg *InterfaceConfig) Marshaler() _bindings.Marshaler {
+ return _mInterfaceConfig
+}
+
+type TestAddEthernetDeviceRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ TopologicalPath string `fidl_offset_v1:"0" fidl_bounds:""`
+ Config InterfaceConfig `fidl_offset_v1:"16"`
+ Device EthernetDeviceWithCtxInterface `fidl_offset_v1:"56" fidl_handle_subtype:"4"`
+}
+
+var _mTestAddEthernetDeviceRequest = _bindings.CreateLazyMarshaler(TestAddEthernetDeviceRequest{})
+
+func (msg *TestAddEthernetDeviceRequest) Marshaler() _bindings.Marshaler {
+ return _mTestAddEthernetDeviceRequest
+}
+
+type TestPackageResolverResolveRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ PackageUrl string `fidl_offset_v1:"0" fidl_bounds:""`
+ Selectors []string `fidl_offset_v1:"16" fidl_bounds:""`
+ UpdatePolicy UpdatePolicy `fidl_offset_v1:"32"`
+ Dir EthernetDeviceWithCtxInterfaceRequest `fidl_offset_v1:"36" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mTestPackageResolverResolveRequest = _bindings.CreateLazyMarshaler(TestPackageResolverResolveRequest{})
+
+func (msg *TestPackageResolverResolveRequest) Marshaler() _bindings.Marshaler {
+ return _mTestPackageResolverResolveRequest
+}
+
+type UpdatePolicy struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"2" fidl_alignment_v1:"1"`
+ FetchIfAbsent bool `fidl_offset_v1:"0"`
+ AllowOldVersions bool `fidl_offset_v1:"1"`
+}
+
+var _mUpdatePolicy = _bindings.CreateLazyMarshaler(UpdatePolicy{})
+
+func (msg *UpdatePolicy) Marshaler() _bindings.Marshaler {
+ return _mUpdatePolicy
+}
+
+type TestUcharEnumVec struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Values []TestUcharEnum `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mTestUcharEnumVec = _bindings.CreateLazyMarshaler(TestUcharEnumVec{})
+
+func (msg *TestUcharEnumVec) Marshaler() _bindings.Marshaler {
+ return _mTestUcharEnumVec
+}
+
+type HandleRightsSubtypeTestStruct struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ H []_zx.VMO `fidl_offset_v1:"0" fidl_handle_subtype:"3" fidl_handle_rights:"3" fidl_bounds:",0"`
+}
+
+var _mHandleRightsSubtypeTestStruct = _bindings.CreateLazyMarshaler(HandleRightsSubtypeTestStruct{})
+
+func (msg *HandleRightsSubtypeTestStruct) Marshaler() _bindings.Marshaler {
+ return _mHandleRightsSubtypeTestStruct
+}
+
+type PlainHandleTestStruct struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ H _zx.Handle `fidl_offset_v1:"0" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mPlainHandleTestStruct = _bindings.CreateLazyMarshaler(PlainHandleTestStruct{})
+
+func (msg *PlainHandleTestStruct) Marshaler() _bindings.Marshaler {
+ return _mPlainHandleTestStruct
+}
+
+type test1WithCtxEchoRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ In *string `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mtest1WithCtxEchoRequest = _bindings.CreateLazyMarshaler(test1WithCtxEchoRequest{})
+
+func (msg *test1WithCtxEchoRequest) Marshaler() _bindings.Marshaler {
+ return _mtest1WithCtxEchoRequest
+}
+
+type test1WithCtxEchoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Out *string `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mtest1WithCtxEchoResponse = _bindings.CreateLazyMarshaler(test1WithCtxEchoResponse{})
+
+func (msg *test1WithCtxEchoResponse) Marshaler() _bindings.Marshaler {
+ return _mtest1WithCtxEchoResponse
+}
+
+type test1WithCtxSurpriseResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Foo string `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mtest1WithCtxSurpriseResponse = _bindings.CreateLazyMarshaler(test1WithCtxSurpriseResponse{})
+
+func (msg *test1WithCtxSurpriseResponse) Marshaler() _bindings.Marshaler {
+ return _mtest1WithCtxSurpriseResponse
+}
+
+type test1WithCtxEchoHandleRightsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ H _zx.Port `fidl_offset_v1:"0" fidl_handle_subtype:"6" fidl_handle_rights:"7" fidl_bounds:"0"`
+}
+
+var _mtest1WithCtxEchoHandleRightsRequest = _bindings.CreateLazyMarshaler(test1WithCtxEchoHandleRightsRequest{})
+
+func (msg *test1WithCtxEchoHandleRightsRequest) Marshaler() _bindings.Marshaler {
+ return _mtest1WithCtxEchoHandleRightsRequest
+}
+
+type test1WithCtxEchoHandleRightsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Rights uint32 `fidl_offset_v1:"0"`
+}
+
+var _mtest1WithCtxEchoHandleRightsResponse = _bindings.CreateLazyMarshaler(test1WithCtxEchoHandleRightsResponse{})
+
+func (msg *test1WithCtxEchoHandleRightsResponse) Marshaler() _bindings.Marshaler {
+ return _mtest1WithCtxEchoHandleRightsResponse
+}
+
+type I_union1Tag uint64
+
+const (
+ Union1A = 1 // 0x00000001
+ Union1B = 2 // 0x00000002
+ Union1D = 3 // 0x00000003
+)
+
+type Union1 struct {
+ I_union1Tag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ A [3]int8 `fidl_ordinal:"1"`
+ B TestSimple `fidl_ordinal:"2"`
+ D float32 `fidl_ordinal:"3"`
+}
+
+func (_m *Union1) reset() {
+ switch _m.I_union1Tag {
+ case 1:
+ var _zeroed [3]int8
+ _m.A = _zeroed
+ case 2:
+ var _zeroed TestSimple
+ _m.B = _zeroed
+ case 3:
+ var _zeroed float32
+ _m.D = _zeroed
+ }
+}
+
+func (_m *Union1) Which() I_union1Tag {
+ return _m.I_union1Tag
+}
+
+func (_m *Union1) Ordinal() uint64 {
+ return uint64(_m.I_union1Tag)
+}
+
+func (_m *Union1) SetA(a [3]int8) {
+ _m.reset()
+ _m.I_union1Tag = Union1A
+ _m.A = a
+}
+
+func Union1WithA(a [3]int8) Union1 {
+ var _u Union1
+ _u.SetA(a)
+ return _u
+}
+
+func (_m *Union1) SetB(b TestSimple) {
+ _m.reset()
+ _m.I_union1Tag = Union1B
+ _m.B = b
+}
+
+func Union1WithB(b TestSimple) Union1 {
+ var _u Union1
+ _u.SetB(b)
+ return _u
+}
+
+func (_m *Union1) SetD(d float32) {
+ _m.reset()
+ _m.I_union1Tag = Union1D
+ _m.D = d
+}
+
+func Union1WithD(d float32) Union1 {
+ var _u Union1
+ _u.SetD(d)
+ return _u
+}
+
+type I_xUnion1Tag uint64
+
+const (
+ XUnion1_unknownData = 0 // 0x00000000
+ XUnion1A = 1 // 0x00000001
+ XUnion1B = 2 // 0x00000002
+ XUnion1D = 3 // 0x00000003
+)
+
+type XUnion1 struct {
+ I_xUnion1Tag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ A [3]int8 `fidl_ordinal:"1"`
+ B TestSimple `fidl_ordinal:"2"`
+ D float32 `fidl_ordinal:"3"`
+}
+
+func (_m *XUnion1) reset() {
+ switch _m.I_xUnion1Tag {
+ case 1:
+ var _zeroed [3]int8
+ _m.A = _zeroed
+ case 2:
+ var _zeroed TestSimple
+ _m.B = _zeroed
+ case 3:
+ var _zeroed float32
+ _m.D = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *XUnion1) Which() I_xUnion1Tag {
+ switch _m.I_xUnion1Tag {
+ case 1:
+ return XUnion1A
+ case 2:
+ return XUnion1B
+ case 3:
+ return XUnion1D
+ default:
+ return XUnion1_unknownData
+ }
+}
+
+func (_m *XUnion1) Ordinal() uint64 {
+ return uint64(_m.I_xUnion1Tag)
+}
+
+func (_m *XUnion1) SetA(a [3]int8) {
+ _m.reset()
+ _m.I_xUnion1Tag = XUnion1A
+ _m.A = a
+}
+
+func XUnion1WithA(a [3]int8) XUnion1 {
+ var _u XUnion1
+ _u.SetA(a)
+ return _u
+}
+
+func (_m *XUnion1) SetB(b TestSimple) {
+ _m.reset()
+ _m.I_xUnion1Tag = XUnion1B
+ _m.B = b
+}
+
+func XUnion1WithB(b TestSimple) XUnion1 {
+ var _u XUnion1
+ _u.SetB(b)
+ return _u
+}
+
+func (_m *XUnion1) SetD(d float32) {
+ _m.reset()
+ _m.I_xUnion1Tag = XUnion1D
+ _m.D = d
+}
+
+func XUnion1WithD(d float32) XUnion1 {
+ var _u XUnion1
+ _u.SetD(d)
+ return _u
+}
+func (_m *XUnion1) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
+
+type I_xUnion1AsUnionTag uint64
+
+const (
+ XUnion1AsUnionA = 1 // 0x00000001
+ XUnion1AsUnionB = 2 // 0x00000002
+ XUnion1AsUnionD = 3 // 0x00000003
+)
+
+type XUnion1AsUnion struct {
+ I_xUnion1AsUnionTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ A [3]int8 `fidl_ordinal:"1"`
+ B TestSimple `fidl_ordinal:"2"`
+ D float32 `fidl_ordinal:"3"`
+}
+
+func (_m *XUnion1AsUnion) reset() {
+ switch _m.I_xUnion1AsUnionTag {
+ case 1:
+ var _zeroed [3]int8
+ _m.A = _zeroed
+ case 2:
+ var _zeroed TestSimple
+ _m.B = _zeroed
+ case 3:
+ var _zeroed float32
+ _m.D = _zeroed
+ }
+}
+
+func (_m *XUnion1AsUnion) Which() I_xUnion1AsUnionTag {
+ return _m.I_xUnion1AsUnionTag
+}
+
+func (_m *XUnion1AsUnion) Ordinal() uint64 {
+ return uint64(_m.I_xUnion1AsUnionTag)
+}
+
+func (_m *XUnion1AsUnion) SetA(a [3]int8) {
+ _m.reset()
+ _m.I_xUnion1AsUnionTag = XUnion1AsUnionA
+ _m.A = a
+}
+
+func XUnion1AsUnionWithA(a [3]int8) XUnion1AsUnion {
+ var _u XUnion1AsUnion
+ _u.SetA(a)
+ return _u
+}
+
+func (_m *XUnion1AsUnion) SetB(b TestSimple) {
+ _m.reset()
+ _m.I_xUnion1AsUnionTag = XUnion1AsUnionB
+ _m.B = b
+}
+
+func XUnion1AsUnionWithB(b TestSimple) XUnion1AsUnion {
+ var _u XUnion1AsUnion
+ _u.SetB(b)
+ return _u
+}
+
+func (_m *XUnion1AsUnion) SetD(d float32) {
+ _m.reset()
+ _m.I_xUnion1AsUnionTag = XUnion1AsUnionD
+ _m.D = d
+}
+
+func XUnion1AsUnionWithD(d float32) XUnion1AsUnion {
+ var _u XUnion1AsUnion
+ _u.SetD(d)
+ return _u
+}
+
+type I_unionInsideUnionTag uint64
+
+const (
+ UnionInsideUnionA = 1 // 0x00000001
+ UnionInsideUnionB = 2 // 0x00000002
+)
+
+type UnionInsideUnion struct {
+ I_unionInsideUnionTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ A float32 `fidl_ordinal:"1"`
+ B XUnion1AsUnion `fidl_ordinal:"2"`
+}
+
+func (_m *UnionInsideUnion) reset() {
+ switch _m.I_unionInsideUnionTag {
+ case 1:
+ var _zeroed float32
+ _m.A = _zeroed
+ case 2:
+ var _zeroed XUnion1AsUnion
+ _m.B = _zeroed
+ }
+}
+
+func (_m *UnionInsideUnion) Which() I_unionInsideUnionTag {
+ return _m.I_unionInsideUnionTag
+}
+
+func (_m *UnionInsideUnion) Ordinal() uint64 {
+ return uint64(_m.I_unionInsideUnionTag)
+}
+
+func (_m *UnionInsideUnion) SetA(a float32) {
+ _m.reset()
+ _m.I_unionInsideUnionTag = UnionInsideUnionA
+ _m.A = a
+}
+
+func UnionInsideUnionWithA(a float32) UnionInsideUnion {
+ var _u UnionInsideUnion
+ _u.SetA(a)
+ return _u
+}
+
+func (_m *UnionInsideUnion) SetB(b XUnion1AsUnion) {
+ _m.reset()
+ _m.I_unionInsideUnionTag = UnionInsideUnionB
+ _m.B = b
+}
+
+func UnionInsideUnionWithB(b XUnion1AsUnion) UnionInsideUnion {
+ var _u UnionInsideUnion
+ _u.SetB(b)
+ return _u
+}
+
+type I_xUnionInsideXUnionTag uint64
+
+const (
+ XUnionInsideXUnion_unknownData = 0 // 0x00000000
+ XUnionInsideXUnionA = 1 // 0x00000001
+ XUnionInsideXUnionB = 2 // 0x00000002
+)
+
+type XUnionInsideXUnion struct {
+ I_xUnionInsideXUnionTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ A float32 `fidl_ordinal:"1"`
+ B XUnion1 `fidl_ordinal:"2"`
+}
+
+func (_m *XUnionInsideXUnion) reset() {
+ switch _m.I_xUnionInsideXUnionTag {
+ case 1:
+ var _zeroed float32
+ _m.A = _zeroed
+ case 2:
+ var _zeroed XUnion1
+ _m.B = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *XUnionInsideXUnion) Which() I_xUnionInsideXUnionTag {
+ switch _m.I_xUnionInsideXUnionTag {
+ case 1:
+ return XUnionInsideXUnionA
+ case 2:
+ return XUnionInsideXUnionB
+ default:
+ return XUnionInsideXUnion_unknownData
+ }
+}
+
+func (_m *XUnionInsideXUnion) Ordinal() uint64 {
+ return uint64(_m.I_xUnionInsideXUnionTag)
+}
+
+func (_m *XUnionInsideXUnion) SetA(a float32) {
+ _m.reset()
+ _m.I_xUnionInsideXUnionTag = XUnionInsideXUnionA
+ _m.A = a
+}
+
+func XUnionInsideXUnionWithA(a float32) XUnionInsideXUnion {
+ var _u XUnionInsideXUnion
+ _u.SetA(a)
+ return _u
+}
+
+func (_m *XUnionInsideXUnion) SetB(b XUnion1) {
+ _m.reset()
+ _m.I_xUnionInsideXUnionTag = XUnionInsideXUnionB
+ _m.B = b
+}
+
+func XUnionInsideXUnionWithB(b XUnion1) XUnionInsideXUnion {
+ var _u XUnionInsideXUnion
+ _u.SetB(b)
+ return _u
+}
+func (_m *XUnionInsideXUnion) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
+
+type I_strictXUnion1Tag uint64
+
+const (
+ StrictXUnion1A = 1 // 0x00000001
+ StrictXUnion1B = 2 // 0x00000002
+ StrictXUnion1D = 3 // 0x00000003
+)
+
+type StrictXUnion1 struct {
+ I_strictXUnion1Tag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ A [3]int8 `fidl_ordinal:"1"`
+ B TestSimple `fidl_ordinal:"2"`
+ D float32 `fidl_ordinal:"3"`
+}
+
+func (_m *StrictXUnion1) reset() {
+ switch _m.I_strictXUnion1Tag {
+ case 1:
+ var _zeroed [3]int8
+ _m.A = _zeroed
+ case 2:
+ var _zeroed TestSimple
+ _m.B = _zeroed
+ case 3:
+ var _zeroed float32
+ _m.D = _zeroed
+ }
+}
+
+func (_m *StrictXUnion1) Which() I_strictXUnion1Tag {
+ return _m.I_strictXUnion1Tag
+}
+
+func (_m *StrictXUnion1) Ordinal() uint64 {
+ return uint64(_m.I_strictXUnion1Tag)
+}
+
+func (_m *StrictXUnion1) SetA(a [3]int8) {
+ _m.reset()
+ _m.I_strictXUnion1Tag = StrictXUnion1A
+ _m.A = a
+}
+
+func StrictXUnion1WithA(a [3]int8) StrictXUnion1 {
+ var _u StrictXUnion1
+ _u.SetA(a)
+ return _u
+}
+
+func (_m *StrictXUnion1) SetB(b TestSimple) {
+ _m.reset()
+ _m.I_strictXUnion1Tag = StrictXUnion1B
+ _m.B = b
+}
+
+func StrictXUnion1WithB(b TestSimple) StrictXUnion1 {
+ var _u StrictXUnion1
+ _u.SetB(b)
+ return _u
+}
+
+func (_m *StrictXUnion1) SetD(d float32) {
+ _m.reset()
+ _m.I_strictXUnion1Tag = StrictXUnion1D
+ _m.D = d
+}
+
+func StrictXUnion1WithD(d float32) StrictXUnion1 {
+ var _u StrictXUnion1
+ _u.SetD(d)
+ return _u
+}
+
+type I_simpleUnionTag uint64
+
+const (
+ SimpleUnionI32 = 1 // 0x00000001
+ SimpleUnionI64 = 2 // 0x00000002
+ SimpleUnionS = 3 // 0x00000003
+ SimpleUnionStr = 4 // 0x00000004
+)
+
+type SimpleUnion struct {
+ I_simpleUnionTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I32 int32 `fidl_ordinal:"1"`
+ I64 int64 `fidl_ordinal:"2"`
+ S Int64Struct `fidl_ordinal:"3"`
+ Str string `fidl_bounds:"" fidl_ordinal:"4"`
+}
+
+func (_m *SimpleUnion) reset() {
+ switch _m.I_simpleUnionTag {
+ case 1:
+ var _zeroed int32
+ _m.I32 = _zeroed
+ case 2:
+ var _zeroed int64
+ _m.I64 = _zeroed
+ case 3:
+ var _zeroed Int64Struct
+ _m.S = _zeroed
+ case 4:
+ var _zeroed string
+ _m.Str = _zeroed
+ }
+}
+
+func (_m *SimpleUnion) Which() I_simpleUnionTag {
+ return _m.I_simpleUnionTag
+}
+
+func (_m *SimpleUnion) Ordinal() uint64 {
+ return uint64(_m.I_simpleUnionTag)
+}
+
+func (_m *SimpleUnion) SetI32(i32 int32) {
+ _m.reset()
+ _m.I_simpleUnionTag = SimpleUnionI32
+ _m.I32 = i32
+}
+
+func SimpleUnionWithI32(i32 int32) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetI32(i32)
+ return _u
+}
+
+func (_m *SimpleUnion) SetI64(i64 int64) {
+ _m.reset()
+ _m.I_simpleUnionTag = SimpleUnionI64
+ _m.I64 = i64
+}
+
+func SimpleUnionWithI64(i64 int64) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetI64(i64)
+ return _u
+}
+
+func (_m *SimpleUnion) SetS(s Int64Struct) {
+ _m.reset()
+ _m.I_simpleUnionTag = SimpleUnionS
+ _m.S = s
+}
+
+func SimpleUnionWithS(s Int64Struct) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetS(s)
+ return _u
+}
+
+func (_m *SimpleUnion) SetStr(str string) {
+ _m.reset()
+ _m.I_simpleUnionTag = SimpleUnionStr
+ _m.Str = str
+}
+
+func SimpleUnionWithStr(str string) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetStr(str)
+ return _u
+}
+
+type I_ipAddressConfigTag uint64
+
+const (
+ IpAddressConfigPaddingSize24Align4 = 1 // 0x00000001
+ IpAddressConfigDhcp = 2 // 0x00000002
+)
+
+type IpAddressConfig struct {
+ I_ipAddressConfigTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ PaddingSize24Align4 [6]uint32 `fidl_ordinal:"1"`
+ Dhcp bool `fidl_ordinal:"2"`
+}
+
+func (_m *IpAddressConfig) reset() {
+ switch _m.I_ipAddressConfigTag {
+ case 1:
+ var _zeroed [6]uint32
+ _m.PaddingSize24Align4 = _zeroed
+ case 2:
+ var _zeroed bool
+ _m.Dhcp = _zeroed
+ }
+}
+
+func (_m *IpAddressConfig) Which() I_ipAddressConfigTag {
+ return _m.I_ipAddressConfigTag
+}
+
+func (_m *IpAddressConfig) Ordinal() uint64 {
+ return uint64(_m.I_ipAddressConfigTag)
+}
+
+func (_m *IpAddressConfig) SetPaddingSize24Align4(paddingSize24Align4 [6]uint32) {
+ _m.reset()
+ _m.I_ipAddressConfigTag = IpAddressConfigPaddingSize24Align4
+ _m.PaddingSize24Align4 = paddingSize24Align4
+}
+
+func IpAddressConfigWithPaddingSize24Align4(paddingSize24Align4 [6]uint32) IpAddressConfig {
+ var _u IpAddressConfig
+ _u.SetPaddingSize24Align4(paddingSize24Align4)
+ return _u
+}
+
+func (_m *IpAddressConfig) SetDhcp(dhcp bool) {
+ _m.reset()
+ _m.I_ipAddressConfigTag = IpAddressConfigDhcp
+ _m.Dhcp = dhcp
+}
+
+func IpAddressConfigWithDhcp(dhcp bool) IpAddressConfig {
+ var _u IpAddressConfig
+ _u.SetDhcp(dhcp)
+ return _u
+}
+
+type SimpleTable struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ X int64 `fidl_ordinal:"1"`
+ XPresent bool
+ Y int64 `fidl_ordinal:"5"`
+ YPresent bool
+}
+
+func (u *SimpleTable) SetX(x int64) {
+ u.X = x
+ u.XPresent = true
+}
+
+func (u *SimpleTable) GetX() int64 {
+ return u.X
+}
+
+func (u *SimpleTable) GetXWithDefault(_default int64) int64 {
+ if !u.HasX() {
+ return _default
+ }
+ return u.X
+}
+
+func (u *SimpleTable) HasX() bool {
+ return u.XPresent
+}
+
+func (u *SimpleTable) ClearX() {
+ u.XPresent = false
+}
+
+func (u *SimpleTable) SetY(y int64) {
+ u.Y = y
+ u.YPresent = true
+}
+
+func (u *SimpleTable) GetY() int64 {
+ return u.Y
+}
+
+func (u *SimpleTable) GetYWithDefault(_default int64) int64 {
+ if !u.HasY() {
+ return _default
+ }
+ return u.Y
+}
+
+func (u *SimpleTable) HasY() bool {
+ return u.YPresent
+}
+
+func (u *SimpleTable) ClearY() {
+ u.YPresent = false
+}
+
+func (u *SimpleTable) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *SimpleTable) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+type OlderSimpleTable struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ X int64 `fidl_ordinal:"1"`
+ XPresent bool
+}
+
+func (u *OlderSimpleTable) SetX(x int64) {
+ u.X = x
+ u.XPresent = true
+}
+
+func (u *OlderSimpleTable) GetX() int64 {
+ return u.X
+}
+
+func (u *OlderSimpleTable) GetXWithDefault(_default int64) int64 {
+ if !u.HasX() {
+ return _default
+ }
+ return u.X
+}
+
+func (u *OlderSimpleTable) HasX() bool {
+ return u.XPresent
+}
+
+func (u *OlderSimpleTable) ClearX() {
+ u.XPresent = false
+}
+
+func (u *OlderSimpleTable) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *OlderSimpleTable) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+type NewerSimpleTable struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ X int64 `fidl_ordinal:"1"`
+ XPresent bool
+ Y int64 `fidl_ordinal:"5"`
+ YPresent bool
+ Z int64 `fidl_ordinal:"6"`
+ ZPresent bool
+}
+
+func (u *NewerSimpleTable) SetX(x int64) {
+ u.X = x
+ u.XPresent = true
+}
+
+func (u *NewerSimpleTable) GetX() int64 {
+ return u.X
+}
+
+func (u *NewerSimpleTable) GetXWithDefault(_default int64) int64 {
+ if !u.HasX() {
+ return _default
+ }
+ return u.X
+}
+
+func (u *NewerSimpleTable) HasX() bool {
+ return u.XPresent
+}
+
+func (u *NewerSimpleTable) ClearX() {
+ u.XPresent = false
+}
+
+func (u *NewerSimpleTable) SetY(y int64) {
+ u.Y = y
+ u.YPresent = true
+}
+
+func (u *NewerSimpleTable) GetY() int64 {
+ return u.Y
+}
+
+func (u *NewerSimpleTable) GetYWithDefault(_default int64) int64 {
+ if !u.HasY() {
+ return _default
+ }
+ return u.Y
+}
+
+func (u *NewerSimpleTable) HasY() bool {
+ return u.YPresent
+}
+
+func (u *NewerSimpleTable) ClearY() {
+ u.YPresent = false
+}
+
+func (u *NewerSimpleTable) SetZ(z int64) {
+ u.Z = z
+ u.ZPresent = true
+}
+
+func (u *NewerSimpleTable) GetZ() int64 {
+ return u.Z
+}
+
+func (u *NewerSimpleTable) GetZWithDefault(_default int64) int64 {
+ if !u.HasZ() {
+ return _default
+ }
+ return u.Z
+}
+
+func (u *NewerSimpleTable) HasZ() bool {
+ return u.ZPresent
+}
+
+func (u *NewerSimpleTable) ClearZ() {
+ u.ZPresent = false
+}
+
+func (u *NewerSimpleTable) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *NewerSimpleTable) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+const (
+ Test1EchoOrdinal uint64 = 0x4adc92c9e871ae62
+ Test1NoResponseOrdinal uint64 = 0x584f4d438578f337
+ Test1EmptyResponseOrdinal uint64 = 0x12ee80a1f8a85427
+ Test1SurpriseOrdinal uint64 = 0xf93fd4731796fd9
+ Test1EchoHandleRightsOrdinal uint64 = 0x53b1df24e93e434e
+)
+
+type Test1WithCtxInterface _bindings.ChannelProxy
+
+func (p *Test1WithCtxInterface) Echo(ctx_ _bindings.Context, in *string) (*string, error) {
+ req_ := &test1WithCtxEchoRequest{
+ In: in,
+ }
+ resp_ := &test1WithCtxEchoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(Test1EchoOrdinal, req_, resp_)
+ return resp_.Out, err_
+}
+
+func (p *Test1WithCtxInterface) NoResponse(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(Test1NoResponseOrdinal, req_)
+ return err_
+}
+
+func (p *Test1WithCtxInterface) EmptyResponse(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ var resp_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(Test1EmptyResponseOrdinal, req_, resp_)
+ return err_
+}
+
+func (p *Test1WithCtxInterface) ExpectSurprise(ctx_ _bindings.Context) (string, error) {
+ resp_ := &test1WithCtxSurpriseResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(Test1SurpriseOrdinal, resp_)
+ return resp_.Foo, err_
+}
+
+func (p *Test1WithCtxInterface) EchoHandleRights(ctx_ _bindings.Context, h _zx.Port) (uint32, error) {
+ req_ := &test1WithCtxEchoHandleRightsRequest{
+ H: h,
+ }
+ resp_ := &test1WithCtxEchoHandleRightsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(Test1EchoHandleRightsOrdinal, req_, resp_)
+ return resp_.Rights, err_
+}
+
+type Test1WithCtx interface {
+ Echo(ctx_ _bindings.Context, in *string) (*string, error)
+ NoResponse(ctx_ _bindings.Context) error
+ EmptyResponse(ctx_ _bindings.Context) error
+ EchoHandleRights(ctx_ _bindings.Context, h _zx.Port) (uint32, error)
+}
+
+type Test1WithCtxTransitionalBase struct{}
+
+type Test1WithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewTest1WithCtxInterfaceRequest() (Test1WithCtxInterfaceRequest, *Test1WithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return Test1WithCtxInterfaceRequest(req), (*Test1WithCtxInterface)(cli), err
+}
+
+type Test1WithCtxStub struct {
+ Impl Test1WithCtx
+}
+
+func (s_ *Test1WithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case Test1EchoOrdinal:
+ in_ := test1WithCtxEchoRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ out, err_ := s_.Impl.Echo(args_.Ctx, in_.In)
+ out_ := test1WithCtxEchoResponse{}
+ out_.Out = out
+ return &out_, true, err_
+ case Test1NoResponseOrdinal:
+ err_ := s_.Impl.NoResponse(args_.Ctx)
+ return nil, false, err_
+ case Test1EmptyResponseOrdinal:
+ err_ := s_.Impl.EmptyResponse(args_.Ctx)
+ return nil, true, err_
+ case Test1EchoHandleRightsOrdinal:
+ in_ := test1WithCtxEchoHandleRightsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ rights, err_ := s_.Impl.EchoHandleRights(args_.Ctx, in_.H)
+ out_ := test1WithCtxEchoHandleRightsResponse{}
+ out_.Rights = rights
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type Test1EventProxy _bindings.ChannelProxy
+
+func (p *Test1EventProxy) Surprise(foo string) error {
+ event_ := &test1WithCtxSurpriseResponse{
+ Foo: foo,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(Test1SurpriseOrdinal, event_)
+}
+
+type ExampleProtocolWithCtxInterface _bindings.ChannelProxy
+
+type ExampleProtocolWithCtx interface {
+}
+
+type ExampleProtocolWithCtxTransitionalBase struct{}
+
+type ExampleProtocolWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewExampleProtocolWithCtxInterfaceRequest() (ExampleProtocolWithCtxInterfaceRequest, *ExampleProtocolWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return ExampleProtocolWithCtxInterfaceRequest(req), (*ExampleProtocolWithCtxInterface)(cli), err
+}
+
+type ExampleProtocolWithCtxStub struct {
+ Impl ExampleProtocolWithCtx
+}
+
+func (s_ *ExampleProtocolWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type ExampleProtocolEventProxy _bindings.ChannelProxy
+
+type EthernetDeviceWithCtxInterface _bindings.ChannelProxy
+
+type EthernetDeviceWithCtx interface {
+}
+
+type EthernetDeviceWithCtxTransitionalBase struct{}
+
+type EthernetDeviceWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewEthernetDeviceWithCtxInterfaceRequest() (EthernetDeviceWithCtxInterfaceRequest, *EthernetDeviceWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return EthernetDeviceWithCtxInterfaceRequest(req), (*EthernetDeviceWithCtxInterface)(cli), err
+}
+
+type EthernetDeviceWithCtxStub struct {
+ Impl EthernetDeviceWithCtx
+}
+
+func (s_ *EthernetDeviceWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type EthernetDeviceEventProxy _bindings.ChannelProxy
diff --git a/src/syscall/zx/fidl/internal/bindingstest/test.test.fidl b/src/syscall/zx/fidl/internal/bindingstest/test.test.fidl
new file mode 100644
index 0000000..f41a109
--- /dev/null
+++ b/src/syscall/zx/fidl/internal/bindingstest/test.test.fidl
@@ -0,0 +1,377 @@
+// 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.
+
+library bindingstest;
+
+using zx;
+
+struct TestSimple {
+ int64 x;
+};
+
+struct TestSimpleBool {
+ bool x;
+};
+
+struct TestAlignment1 {
+ int8 x;
+ int8 y;
+ uint32 z;
+};
+
+struct TestAlignment2 {
+ uint32 a;
+ uint32 b;
+ int8 c;
+ int8 d;
+ int8 e;
+ uint8 f;
+ uint32 g;
+ uint16 h;
+ uint16 i;
+};
+
+struct TestFloat1 {
+ float32 a;
+};
+
+struct TestFloat2 {
+ float64 a;
+};
+
+struct TestFloat3 {
+ float32 a;
+ float64 b;
+ uint64 c;
+ float32 d;
+};
+
+struct TestArray1 {
+ array<int8>:5 a;
+};
+
+struct TestArray2 {
+ float64 a;
+ array<float32>:1 b;
+};
+
+struct TestArray3 {
+ int32 a;
+ array<uint16>:3 b;
+ uint64 c;
+};
+
+struct TestArray4 {
+ array<bool>:9 a;
+};
+
+struct TestString1 {
+ string a;
+ string? b;
+};
+
+struct TestString2 {
+ array<string>:2 a;
+};
+
+struct TestString3 {
+ array<string:4>:2 a;
+ array<string:4?>:2 b;
+};
+
+struct TestStringWithBound {
+ string:8 a;
+};
+
+struct TestOptStringWithBound {
+ string:8? a;
+};
+
+struct TestVector1 {
+ vector<int8> a;
+ vector<int16>? b;
+ vector<int32>:2 c;
+ vector<int64>:2? d;
+};
+
+struct TestVector2 {
+ array<vector<int8>>:2 a;
+ vector<vector<int8>>:2 b;
+ vector<vector<string:5>:2?>:2 c;
+};
+
+struct TestStruct1 {
+ TestSimple a;
+ TestSimple? b;
+};
+
+struct TestStruct2 {
+ TestArray1 a;
+ TestFloat1 b;
+ TestVector1 c;
+ TestString1? d;
+};
+
+struct EmptyStruct {
+};
+
+union Union1 {
+ 1: array<int8>:3 a;
+ 2: TestSimple b;
+ 3: float32 d;
+};
+
+struct TestUnion1 {
+ Union1 a;
+ Union1? b;
+};
+
+struct TestUnion2 {
+ vector<Union1> a;
+ vector<Union1?> b;
+};
+
+flexible union XUnion1 {
+ 1: array<int8>:3 a;
+ 2: TestSimple b;
+ 3: float32 d;
+};
+
+struct XUnion1Struct {
+ XUnion1 xu;
+};
+
+union XUnion1AsUnion {
+ 1: array<int8>:3 a;
+ 2: TestSimple b;
+ 3: float32 d;
+};
+
+struct XUnion1AsUnionStruct {
+ XUnion1AsUnion xuau;
+};
+
+union UnionInsideUnion {
+ 1: float32 a;
+ 2: XUnion1AsUnion b;
+};
+
+struct UnionInsideUnionStruct {
+ UnionInsideUnion u;
+};
+
+flexible union XUnionInsideXUnion {
+ 1: float32 a;
+ 2: XUnion1 b;
+};
+
+struct XUnionInsideXUnionStruct {
+ XUnionInsideXUnion u;
+};
+
+struct TestXUnion1 {
+ XUnion1 a;
+ XUnion1? b;
+};
+
+struct TestXUnion2 {
+ vector<XUnion1> a;
+ vector<XUnion1?> b;
+};
+
+union StrictXUnion1 {
+ 1: array<int8>:3 a;
+ 2: TestSimple b;
+ 3: float32 d;
+};
+
+struct StrictXUnion1Struct {
+ StrictXUnion1 xu;
+};
+
+struct TestStrictXUnion1 {
+ StrictXUnion1 a;
+ StrictXUnion1? b;
+};
+
+struct TestStrictXUnion2 {
+ vector<StrictXUnion1> a;
+ vector<StrictXUnion1?> b;
+};
+
+resource struct TestHandle1 {
+ zx.handle a;
+ zx.handle? b;
+ zx.handle:VMO c;
+ zx.handle:VMO? d;
+};
+
+resource struct TestHandle2 {
+ vector<zx.handle>:1 a;
+ vector<zx.handle:VMO?>:1 b;
+};
+
+protocol Test1 {
+ Echo(string? in) -> (string? out);
+ NoResponse();
+ EmptyResponse() -> ();
+ -> Surprise(string foo);
+ // 7 is READ | TRANSFER | DUPLICATE
+ // TODO(fxbug.dev/43948) Replace with zx.rights.READ | ...
+ EchoHandleRights(zx.handle:<PORT, 7> h) -> (uint32 rights);
+};
+
+protocol ExampleProtocol {};
+
+resource struct HasClientEnd {
+ ExampleProtocol client_end;
+};
+
+resource struct HasServerEnd {
+ request<ExampleProtocol> server_end;
+};
+
+resource struct TestInterface1 {
+ Test1 a;
+ Test1? b;
+ request<Test1> c;
+ request<Test1>? d;
+};
+
+table SimpleTable {
+ 1: int64 x;
+ 2: reserved;
+ 3: reserved;
+ 4: reserved;
+ 5: int64 y;
+};
+
+struct TestSimpleTable {
+ SimpleTable table;
+};
+
+// A variant of SimpleTable that has just the first few fields.
+// Think of this as an older variant of that type!
+table OlderSimpleTable {
+ 1: int64 x;
+ 2: reserved;
+};
+
+struct TestOlderSimpleTable {
+ OlderSimpleTable table;
+};
+
+// A variant of SimpleTable that has some additional new fields.
+// Think of this as an newer variant of that type!
+table NewerSimpleTable {
+ 1: int64 x;
+ 2: reserved;
+ 3: reserved;
+ 4: reserved;
+ 5: int64 y;
+ 6: int64 z;
+ 7: reserved;
+};
+
+struct TestNewerSimpleTable {
+ NewerSimpleTable table;
+};
+
+struct TestWithTableAndInt {
+ SimpleTable table;
+ uint64 foo;
+};
+
+union SimpleUnion {
+ 1: int32 i32;
+ 2: int64 i64;
+ 3: Int64Struct s;
+ 4: string str;
+};
+
+struct Int64Struct {
+ int64 x;
+};
+
+// examples from fuchsia world.
+
+const uint64 kMaxBuf = 8192;
+
+struct TestFuchsiaIoReadAtResponse {
+ zx.status s;
+ vector<uint8>:kMaxBuf data;
+};
+
+struct TestFuchsiaIoWriteAtRequest {
+ vector<uint8>:kMaxBuf data;
+ uint64 offset;
+};
+
+struct TestFuchsiaPosixSocketSendMsgRequest {
+ bytes:128 sockaddr;
+ vector<bytes>:MAX data;
+ bytes control;
+ int16 flags;
+};
+
+protocol EthernetDevice {
+};
+
+struct InterfaceConfig {
+ string name;
+ IpAddressConfig ip_address_config;
+};
+
+union IpAddressConfig {
+ 1: array<uint32>:6 padding_size_24_align_4;
+ 2: bool dhcp;
+};
+
+resource struct TestAddEthernetDeviceRequest {
+ string topological_path;
+ InterfaceConfig config;
+ EthernetDevice device;
+};
+
+resource struct TestPackageResolverResolveRequest {
+ string package_url;
+ vector<string> selectors;
+ UpdatePolicy update_policy;
+ request<EthernetDevice> dir;
+};
+
+struct UpdatePolicy {
+ bool fetch_if_absent;
+ bool allow_old_versions;
+};
+
+enum TestUcharEnum : uint8 {
+ UcharEnum1 = 1;
+ UcharEnum2 = 2;
+};
+
+// TODO(pascallouis): Move to GIDL
+struct TestUcharEnumVec {
+ vector<TestUcharEnum:10> values;
+};
+
+resource struct HandleRightsSubtypeTestStruct {
+ // 3 is READ | TRANSFER
+ // TODO(fxbug.dev/43948) Replace with zx.rights.READ | ...
+ vector<zx.handle:<VMO, 3>> h;
+};
+
+resource struct PlainHandleTestStruct {
+ zx.handle h;
+};
+
+bits StrictBits {
+ ONE = 0b01;
+ TWO = 0b10;
+};
+
+flexible bits FlexibleBits {
+ ONE = 0b01;
+ TWO = 0b10;
+};
diff --git a/src/syscall/zx/fidl/internal/unsafevalue/unsafevalue.go b/src/syscall/zx/fidl/internal/unsafevalue/unsafevalue.go
new file mode 100644
index 0000000..ec9f083
--- /dev/null
+++ b/src/syscall/zx/fidl/internal/unsafevalue/unsafevalue.go
@@ -0,0 +1,199 @@
+// 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.
+
+// This package defines a reflect.Value-like interface that uses unsafe.Pointers
+// to reduce the amount of work for each operation, as compared with the
+// reflect package.
+// This is possible because the Marshaler is built for a specific type and
+// therefore the type and structure is known in advance and checks normally
+// performed by the reflect package are redundant.
+// ASSUMPTIONS:
+// - Go's interface implementation is two pointers, type followed by value.
+// - reflect.Type is an interface with the runtime type as the concrete
+// implementation.
+package unsafevalue
+
+import (
+ "reflect"
+ "unsafe"
+)
+
+// A pointer to a go value.
+type Value struct{ data unsafe.Pointer }
+
+// Construct a Value from an interface.
+// ValueOf(&x) is identical to ValueOf(x), except the latter will make a
+// copy of x (when putting it into the interface).
+func ValueOf(i interface{}) Value {
+ return Value{extractInterface(i).data}
+}
+
+func (v Value) UnsafeAddr() uintptr {
+ return uintptr(v.data)
+}
+
+func (v Value) Bool() bool {
+ return *(*bool)(v.data)
+}
+func (v Value) Int8() int8 {
+ return *(*int8)(v.data)
+}
+func (v Value) Int16() int16 {
+ return *(*int16)(v.data)
+}
+func (v Value) Int32() int32 {
+ return *(*int32)(v.data)
+}
+func (v Value) Int64() int64 {
+ return *(*int64)(v.data)
+}
+func (v Value) Uint8() uint8 {
+ return *(*uint8)(v.data)
+}
+func (v Value) Uint16() uint16 {
+ return *(*uint16)(v.data)
+}
+func (v Value) Uint32() uint32 {
+ return *(*uint32)(v.data)
+}
+func (v Value) Uint64() uint64 {
+ return *(*uint64)(v.data)
+}
+func (v Value) Float32() float32 {
+ return *(*float32)(v.data)
+}
+func (v Value) Float64() float64 {
+ return *(*float64)(v.data)
+}
+func (v Value) String() string {
+ return *(*string)(v.data)
+}
+func (v Value) Bytes() []byte {
+ return *(*[]byte)(v.data)
+}
+func (v Value) Interface() interface{} {
+ return *(*interface{})(v.data)
+}
+
+func (v Value) SetBool(b bool) {
+ *(*bool)(v.data) = b
+}
+func (v Value) SetInt8(i int8) {
+ *(*int8)(v.data) = i
+}
+func (v Value) SetInt16(i int16) {
+ *(*int16)(v.data) = i
+}
+func (v Value) SetInt32(i int32) {
+ *(*int32)(v.data) = i
+}
+func (v Value) SetInt64(i int64) {
+ *(*int64)(v.data) = i
+}
+func (v Value) SetUint8(i uint8) {
+ *(*uint8)(v.data) = i
+}
+func (v Value) SetUint16(i uint16) {
+ *(*uint16)(v.data) = i
+}
+func (v Value) SetUint32(i uint32) {
+ *(*uint32)(v.data) = i
+}
+func (v Value) SetUint64(i uint64) {
+ *(*uint64)(v.data) = i
+}
+func (v Value) SetFloat32(i float32) {
+ *(*float32)(v.data) = i
+}
+func (v Value) SetFloat64(i float64) {
+ *(*float64)(v.data) = i
+}
+func (v Value) SetString(s string) {
+ *(*string)(v.data) = s
+}
+func (v Value) SetBytes(b []byte) {
+ *(*[]byte)(v.data) = b
+}
+func (v Value) SetInterface(s interface{}) {
+ *(*interface{})(v.data) = s
+}
+
+func (v Value) SliceLen() int {
+ return (*reflect.SliceHeader)(v.data).Len
+}
+
+func (v Value) SliceCap() int {
+ return (*reflect.SliceHeader)(v.data).Cap
+}
+
+func (v Value) SliceIndex(elemSize uintptr, index int) Value {
+ return Value{unsafe.Pointer(uintptr((*reflect.SliceHeader)(v.data).Data) + uintptr(index)*elemSize)}
+}
+
+// Analogous to rv.Set(reflect.MakeSlice(elemType, len, cap)).
+func (v Value) SliceSetMakeSlice(elemType reflect.Type, len, cap int) {
+ sh := (*reflect.SliceHeader)(v.data)
+ sh.Len = len
+ sh.Cap = cap
+ sh.Data = uintptr(unsafe_NewArray(runtimeTypeFromReflectType(elemType), cap))
+}
+
+func (v Value) ArrayIndex(elemSize uintptr, index int) Value {
+ return Value{unsafe.Pointer(uintptr(v.data) + uintptr(index)*elemSize)}
+}
+
+func (v Value) StructFieldOffset(offset uintptr) Value {
+ return Value{unsafe.Pointer(uintptr(v.data) + offset)}
+}
+
+func (v Value) PointerElem() Value {
+ return Value{*(*unsafe.Pointer)(v.data)}
+}
+
+func (v Value) PointerIsNil() bool {
+ return *(*unsafe.Pointer)(v.data) == nil
+}
+
+func (v Value) PointerSetNil() {
+ *(*unsafe.Pointer)(v.data) = nil
+}
+
+// Analogous to rv.Set(reflect.New(elemType)).
+func (v Value) PointerSetNew(elemType reflect.Type) {
+ *(*unsafe.Pointer)(v.data) = unsafeNew(runtimeTypeFromReflectType(elemType))
+}
+
+// The runtime type of a value in go.
+// Equivalent to *reflect.rtype.
+type runtimeType uintptr
+
+// A struct representing the in-memory layout of a go interface.
+type runtimeInterfaceImpl struct {
+ rtype runtimeType
+ data unsafe.Pointer
+}
+
+// Extract the underlying in-memory structure from an interface.
+func extractInterface(i interface{}) *runtimeInterfaceImpl {
+ // It is also possible to get the data field via
+ // reflect.ValueOf(v).Elem().UnsafeAddr(), but this does
+ // not require a heap allocation and dereferences the
+ // pointer in the interface.
+ return (*runtimeInterfaceImpl)(unsafe.Pointer(&i))
+}
+
+// Extract the runtime type from a reflect.Type.
+func runtimeTypeFromReflectType(rt reflect.Type) runtimeType {
+ // A reflect type is an interface with rtype as its data.
+ // (see reflect/type.go)/
+ return runtimeType(extractInterface(rt).data)
+}
+
+// unsafeNew is equivalent to reflect.New(rt).Elem().UnsafeAddr().
+//go:linkname unsafeNew reflect.unsafe_New
+func unsafeNew(rtype runtimeType) unsafe.Pointer
+
+// unsafe_NewArray allocates a new array of the specified type.
+//go:linkname unsafe_NewArray reflect.unsafe_NewArray
+func unsafe_NewArray(rtype runtimeType, length int) unsafe.Pointer
diff --git a/src/syscall/zx/fidl/internal/unsafevalue/unsafevalue_test.go b/src/syscall/zx/fidl/internal/unsafevalue/unsafevalue_test.go
new file mode 100644
index 0000000..4926b77
--- /dev/null
+++ b/src/syscall/zx/fidl/internal/unsafevalue/unsafevalue_test.go
@@ -0,0 +1,428 @@
+// 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.
+
+package unsafevalue_test
+
+import (
+ "reflect"
+ "syscall/zx/fidl/internal/unsafevalue"
+ "testing"
+ "unsafe"
+)
+
+// We assume that the interface is two pointers (type, data).
+// We also assume that reflect.Type contains the runtime type in the data field.
+func TestAssumptionInterfaceAndTypeLayout(t *testing.T) {
+ var x int64
+ var y interface{} = &x
+
+ type interfaceLayout struct {
+ typ *int64
+ data *int64
+ }
+
+ if (*interfaceLayout)((unsafe.Pointer)(&y)).data != &x {
+ t.Errorf("data pointer doesn't match")
+ }
+
+ rtype := (*interfaceLayout)((unsafe.Pointer)(&y)).typ
+
+ rt := reflect.TypeOf(&x)
+ rtypeFromReflect := (*interfaceLayout)((unsafe.Pointer)(&rt)).data
+
+ if rtype != rtypeFromReflect {
+ t.Errorf("type pointer doesn't match")
+ }
+}
+
+func TestValueOfPointerInput(t *testing.T) {
+ var x int32
+ if got, want := (*int32)(unsafe.Pointer(unsafevalue.ValueOf(&x).UnsafeAddr())), &x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestValueOfValueInput(t *testing.T) {
+ var x int32 = 2
+ if got, want := *(*int32)(unsafe.Pointer(unsafevalue.ValueOf(x).UnsafeAddr())), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestValueOfNilInput(t *testing.T) {
+ if got, want := unsafevalue.ValueOf(nil).UnsafeAddr(), uintptr(0); got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestBool(t *testing.T) {
+ x := true
+ if got, want := unsafevalue.ValueOf(&x).Bool(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestInt8(t *testing.T) {
+ var x int8 = 2
+ if got, want := unsafevalue.ValueOf(&x).Int8(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestInt16(t *testing.T) {
+ var x int16 = 2
+ if got, want := unsafevalue.ValueOf(&x).Int16(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestInt32(t *testing.T) {
+ var x int32 = 2
+ if got, want := unsafevalue.ValueOf(&x).Int32(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestInt64(t *testing.T) {
+ var x int64 = 2
+ if got, want := unsafevalue.ValueOf(&x).Int64(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestUint8(t *testing.T) {
+ var x uint8 = 2
+ if got, want := unsafevalue.ValueOf(&x).Uint8(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestUint16(t *testing.T) {
+ var x uint16 = 2
+ if got, want := unsafevalue.ValueOf(&x).Uint16(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestUint32(t *testing.T) {
+ var x uint32 = 2
+ if got, want := unsafevalue.ValueOf(&x).Uint32(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestUint64(t *testing.T) {
+ var x uint64 = 2
+ if got, want := unsafevalue.ValueOf(&x).Uint64(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestFloat32(t *testing.T) {
+ var x float32 = 2.0
+ if got, want := unsafevalue.ValueOf(&x).Float32(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestFloat64(t *testing.T) {
+ var x float64 = 2.0
+ if got, want := unsafevalue.ValueOf(&x).Float64(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestString(t *testing.T) {
+ x := "abcd"
+ if got, want := unsafevalue.ValueOf(&x).String(), x; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestBytes(t *testing.T) {
+ x := []byte{1, 2, 3}
+ if got, want := unsafevalue.ValueOf(&x).Bytes(), x; !reflect.DeepEqual(got, want) {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetBool(t *testing.T) {
+ x := true
+ newval := false
+ unsafevalue.ValueOf(&x).SetBool(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetInt8(t *testing.T) {
+ var x int8 = 2
+ var newval int8 = 5
+ unsafevalue.ValueOf(&x).SetInt8(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetInt16(t *testing.T) {
+ var x int16 = 2
+ var newval int16 = 5
+ unsafevalue.ValueOf(&x).SetInt16(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetInt32(t *testing.T) {
+ var x int32 = 2
+ var newval int32 = 5
+ unsafevalue.ValueOf(&x).SetInt32(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetInt64(t *testing.T) {
+ var x int64 = 2
+ var newval int64 = 5
+ unsafevalue.ValueOf(&x).SetInt64(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetUint8(t *testing.T) {
+ var x uint8 = 2
+ var newval uint8 = 5
+ unsafevalue.ValueOf(&x).SetUint8(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetUint16(t *testing.T) {
+ var x uint16 = 2
+ var newval uint16 = 5
+ unsafevalue.ValueOf(&x).SetUint16(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetUint32(t *testing.T) {
+ var x uint32 = 2
+ var newval uint32 = 5
+ unsafevalue.ValueOf(&x).SetUint32(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetUint64(t *testing.T) {
+ var x uint64 = 2
+ var newval uint64 = 5
+ unsafevalue.ValueOf(&x).SetUint64(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetFloat32(t *testing.T) {
+ var x float32 = 2.0
+ var newval float32 = 5.0
+ unsafevalue.ValueOf(&x).SetFloat32(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetFloat64(t *testing.T) {
+ var x float64 = 2.0
+ var newval float64 = 5.0
+ unsafevalue.ValueOf(&x).SetFloat64(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetString(t *testing.T) {
+ x := "abcd"
+ newval := "xyz"
+ unsafevalue.ValueOf(&x).SetString(newval)
+ if got, want := x, newval; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSetBytes(t *testing.T) {
+ x := []byte{1, 2, 3}
+ newval := []byte{100, 101}
+ unsafevalue.ValueOf(&x).SetBytes(newval)
+ if got, want := x, newval; !reflect.DeepEqual(got, want) {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestNilSliceLen(t *testing.T) {
+ var x []int32
+ if got, want := unsafevalue.ValueOf(&x).SliceLen(), 0; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestNilSliceCap(t *testing.T) {
+ var x []int32
+ if got, want := unsafevalue.ValueOf(&x).SliceCap(), 0; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestNilSliceSetMakeSlice(t *testing.T) {
+ var x []int32
+ unsafevalue.ValueOf(&x).SliceSetMakeSlice(reflect.TypeOf(x).Elem(), 1, 2)
+ if got, want := len(x), 1; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := cap(x), 2; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := x[0], int32(0); got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ x = append(x, 1)
+ if got, want := len(x), 2; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := cap(x), 2; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := x[1], int32(1); got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSliceLen(t *testing.T) {
+ x := make([]int32, 3, 5)
+ if got, want := unsafevalue.ValueOf(&x).SliceLen(), 3; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSliceCap(t *testing.T) {
+ x := make([]int32, 3, 5)
+ if got, want := unsafevalue.ValueOf(&x).SliceCap(), 5; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSliceIndex(t *testing.T) {
+ x := []int32{1, 2, 3}
+ if got, want := unsafevalue.ValueOf(&x).SliceIndex(4, 0).Int32(), x[0]; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := unsafevalue.ValueOf(&x).SliceIndex(4, 1).Int32(), x[1]; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := unsafevalue.ValueOf(&x).SliceIndex(4, 2).Int32(), x[2]; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestSliceSetMakeSlice(t *testing.T) {
+ x := []int32{8, 9, 10}
+ unsafevalue.ValueOf(&x).SliceSetMakeSlice(reflect.TypeOf(x).Elem(), 1, 2)
+ if got, want := len(x), 1; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := cap(x), 2; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := x[0], int32(0); got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ x = append(x, 1)
+ if got, want := len(x), 2; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := cap(x), 2; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := x[1], int32(1); got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestArrayIndex(t *testing.T) {
+ x := [3]int32{1, 2, 3}
+ if got, want := unsafevalue.ValueOf(&x).ArrayIndex(4, 0).Int32(), x[0]; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := unsafevalue.ValueOf(&x).ArrayIndex(4, 1).Int32(), x[1]; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := unsafevalue.ValueOf(&x).ArrayIndex(4, 2).Int32(), x[2]; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestStructFieldOffset(t *testing.T) {
+ type X struct {
+ _ struct{}
+ A int32
+ B string
+ }
+ x := X{
+ A: 3,
+ B: "test",
+ }
+ v := unsafevalue.ValueOf(&x)
+ offsetA := reflect.TypeOf(x).Field(1).Offset
+ offsetB := reflect.TypeOf(x).Field(2).Offset
+ if got, want := v.StructFieldOffset(offsetA).Int32(), x.A; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+ if got, want := v.StructFieldOffset(offsetB).String(), x.B; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestNilPointerIsNil(t *testing.T) {
+ var x *int32
+ if got, want := unsafevalue.ValueOf(&x).PointerIsNil(), true; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestNonNilPointerIsNil(t *testing.T) {
+ var y int32
+ x := &y
+ if got, want := unsafevalue.ValueOf(&x).PointerIsNil(), false; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestPointerElem(t *testing.T) {
+ var y int32 = 2
+ x := &y
+ if got, want := unsafevalue.ValueOf(&x).PointerElem().Int32(), y; got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestPointerSetNil(t *testing.T) {
+ var y int32 = 2
+ x := &y
+ unsafevalue.ValueOf(&x).PointerSetNil()
+ if got, want := x, (*int32)(nil); got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
+
+func TestPointerSetNew(t *testing.T) {
+ var x *int32
+ unsafevalue.ValueOf(&x).PointerSetNew(reflect.TypeOf(x).Elem())
+ if got, want := *x, int32(0); got != want {
+ t.Errorf("got %v, want %v", got, want)
+ }
+}
diff --git a/src/syscall/zx/fidl/message.go b/src/syscall/zx/fidl/message.go
new file mode 100644
index 0000000..54f327d
--- /dev/null
+++ b/src/syscall/zx/fidl/message.go
@@ -0,0 +1,70 @@
+// 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 fidl
+
+import (
+ "sync"
+
+ "syscall/zx"
+)
+
+// messageBytesPool is a pool of buffers that can fit the data part of any
+// FIDL message.
+var messageBytesPool = sync.Pool{
+ New: func() interface{} {
+ return make([]byte, zx.ChannelMaxMessageBytes)
+ },
+}
+
+// messageHandleInfosPool is a pool of buffers that can fit the handle infos
+// for a FIDL message.
+var messageHandleInfosPool = sync.Pool{
+ New: func() interface{} {
+ return make([]zx.HandleInfo, zx.ChannelMaxMessageHandles)
+ },
+}
+
+// messageHandlesPool is a pool of buffers that can fit the handle dispositions
+// for a FIDL message.
+var messageHandleDispositionsPool = sync.Pool{
+ New: func() interface{} {
+ return make([]zx.HandleDisposition, zx.ChannelMaxMessageHandles)
+ },
+}
+
+// MarshalHeaderThenMessage marshals a transactional message
+// (see https://fuchsia.googlesource.com/fuchsia/+/master/docs/development/languages/fidl/reference/wire-format/README.md#messages-for-transactions).
+// It marshals a `MessageHeader`, optionally followed by a `Message` (body).
+func MarshalHeaderThenMessage(header *MessageHeader, body Message, data []byte, handleDispositions []zx.HandleDisposition) (int, int, error) {
+ hnb, _, err := Marshal(header, data, nil)
+ if err != nil {
+ return 0, 0, err
+ }
+ if body == nil {
+ return hnb, 0, nil
+ }
+ nb, nh, err := Marshal(body, data[hnb:], handleDispositions)
+ if err != nil {
+ return 0, 0, err
+ }
+ return hnb + nb, nh, nil
+}
+
+// UnmarshalHeaderThenMessage unmarshals a transactional message
+// (see https://fuchsia.googlesource.com/fuchsia/+/master/docs/development/languages/fidl/reference/wire-format/README.md#messages-for-transactions).
+// It unmarshals a `MessageHeader`, optionally followed by a `Message` (body).
+func UnmarshalHeaderThenMessage(data []byte, handleInfos []zx.HandleInfo, header *MessageHeader, body Message) error {
+ hnb, _, err := Unmarshal(data, nil, header)
+ if err != nil {
+ return err
+ }
+ if body == nil {
+ return nil
+ }
+ if _, _, err := UnmarshalWithContext2(header.NewCtx(), data[hnb:], handleInfos, body); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/src/syscall/zx/fidl/types.go b/src/syscall/zx/fidl/types.go
new file mode 100644
index 0000000..1bacc86
--- /dev/null
+++ b/src/syscall/zx/fidl/types.go
@@ -0,0 +1,44 @@
+// 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.
+
+package fidl
+
+import "syscall/zx"
+
+// Enum is implemented by any value that is a FIDL enum.
+//
+// During code generation, `fidlgen_go` ensures that all domain types generated
+// to represent FIDL enum implement this interface.
+type Enum interface {
+ // IsUnknown indicates whether this enum value is unknown, i.e. whether it
+ // falls outside of known FIDL enum members.
+ //
+ // While strict FIDL enums ensure that no unknown enums can be decoded, it
+ // is still possible to construct an unknown enum by casting a primitive
+ // value.
+ IsUnknown() bool
+}
+
+// Bits is implemented by any value that is a FIDL bits type.
+//
+// During code generation, `fidlgen_go` ensures that all domain types generated
+// to represent FIDL bits implement this interface.
+//
+// While strict FIDL bits ensure that no unknown bits can be decoded, it
+// is still possible to construct a bits value with unknown bits by casting
+// a primitive value.
+type Bits interface {
+ // HasUnknownBits indicates whether this bits value contains any unknown
+ // bits
+ HasUnknownBits() bool
+
+ // GetUnknownBits returns a uint64 containing only the unknown bits
+ GetUnknownBits() uint64
+}
+
+// UnknownData represents the raw bytes and handles of an unknown payload
+type UnknownData struct {
+ Bytes []byte
+ Handles []zx.HandleInfo
+}
diff --git a/src/syscall/zx/fidl/zx_fuchsia.go b/src/syscall/zx/fidl/zx_fuchsia.go
new file mode 100644
index 0000000..abff2cd
--- /dev/null
+++ b/src/syscall/zx/fidl/zx_fuchsia.go
@@ -0,0 +1,24 @@
+// 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 mod` ignores file names for the purpose of resolving
+// dependencies, and zxwait doesn't build on not-Fuchsia.
+// +build fuchsia
+
+package fidl
+
+import (
+ "syscall/zx"
+ "syscall/zx/zxwait"
+)
+
+var handleClose = (*zx.Handle).Close
+var handleReplace = zx.Handle.Replace
+
+var newChannel = zx.NewChannel
+var channelClose = (*zx.Channel).Close
+var channelReadEtc = (*zx.Channel).ReadEtc
+var channelWriteEtc = (*zx.Channel).WriteEtc
+
+var withRetry = zxwait.WithRetry
diff --git a/src/syscall/zx/fidl/zx_notfuchsia.go b/src/syscall/zx/fidl/zx_notfuchsia.go
new file mode 100644
index 0000000..92af953
--- /dev/null
+++ b/src/syscall/zx/fidl/zx_notfuchsia.go
@@ -0,0 +1,40 @@
+// 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.
+
+// +build !fuchsia
+
+package fidl
+
+import "syscall/zx"
+
+// Return nil rather than panicking so that tests can use fake handles on non-fuchsia.
+// Tests on non-fuchsia end up calling this because unmarshalers for strict types close
+// handles when they receive unknown data with handles.
+func handleClose(*zx.Handle) error {
+ return nil
+}
+
+func handleReplace(zx.Handle, zx.Rights) (zx.Handle, error) {
+ panic("handle replace only supported on fuchsia")
+}
+
+func newChannel(uint32) (zx.Channel, zx.Channel, error) {
+ panic("channel new only supported on fuchsia")
+}
+
+func channelClose(*zx.Channel) error {
+ panic("channel close only supported on fuchsia")
+}
+
+func channelReadEtc(*zx.Channel, []byte, []zx.HandleInfo, uint32) (uint32, uint32, error) {
+ panic("channel read etc only supported on fuchsia")
+}
+
+func channelWriteEtc(*zx.Channel, []byte, []zx.HandleDisposition, uint32) error {
+ panic("channel write etc only supported on fuchsia")
+}
+
+func withRetry(fn func() error, _ zx.Handle, _, _ zx.Signals) error {
+ return fn()
+}
diff --git a/src/syscall/zx/handle.go b/src/syscall/zx/handle.go
new file mode 100644
index 0000000..4d8efa0
--- /dev/null
+++ b/src/syscall/zx/handle.go
@@ -0,0 +1,41 @@
+// 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.
+
+package zx
+
+type Socket Handle
+type Event Handle
+type Channel Handle
+type Port Handle
+type VMO Handle
+type VMAR Handle
+type Log Handle
+
+func (s *Socket) Handle() *Handle {
+ return (*Handle)(s)
+}
+func (e *Event) Handle() *Handle {
+ return (*Handle)(e)
+}
+func (c *Channel) Handle() *Handle {
+ return (*Handle)(c)
+}
+func (p *Port) Handle() *Handle {
+ return (*Handle)(p)
+}
+func (vmo *VMO) Handle() *Handle {
+ return (*Handle)(vmo)
+}
+func (l *Log) Handle() *Handle {
+ return (*Handle)(l)
+}
+
+func (h *Handle) IsValid() bool {
+ return *h > HandleInvalid
+}
+
+const (
+ ChannelMaxMessageBytes = 65536
+ ChannelMaxMessageHandles = 64
+)
diff --git a/src/syscall/zx/handle_fuchsia.go b/src/syscall/zx/handle_fuchsia.go
new file mode 100644
index 0000000..6c47bb2
--- /dev/null
+++ b/src/syscall/zx/handle_fuchsia.go
@@ -0,0 +1,566 @@
+// 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.
+
+package zx
+
+import (
+ "internal/oserror"
+ "sync/atomic"
+ "unsafe"
+)
+
+// Process-wide FDIO handles.
+var (
+ StdioHandles [3]Handle // in/out/err
+ StdioHandleTypes [3]int
+ CwdHandle Handle
+ ProcHandle Handle
+ VMARRoot VMAR
+ RootNSMap map[string]Handle
+)
+
+const ZX_CPRNG_DRAW_MAX_LEN = 256
+
+func set_stdio_handle(n int, h uint32, t uint32) {
+ StdioHandles[n] = Handle(h)
+ StdioHandleTypes[n] = int(t)
+}
+
+func set_proc_handle(h uint32) {
+ ProcHandle = Handle(h)
+}
+
+func get_proc_handle() uint32 {
+ return uint32(ProcHandle)
+}
+
+func set_vmar_root(h uint32) {
+ VMARRoot = VMAR(h)
+}
+
+func set_namespace(ns map[string]uint32) {
+ if RootNSMap == nil {
+ RootNSMap = make(map[string]Handle)
+ }
+
+ for k, v := range ns {
+ RootNSMap[k] = Handle(v)
+ }
+}
+
+func (h Handle) Replace(rights Rights) (Handle, error) {
+ var out Handle
+ status := Sys_handle_replace(h, rights, &out)
+ if status != ErrOk {
+ return Handle(0), &Error{Status: status, Text: "zx.Handle.Replace"}
+ }
+ return out, nil
+}
+
+func bytesPtr(data []byte) unsafe.Pointer {
+ if len(data) > 0 {
+ return unsafe.Pointer(&data[0])
+ }
+ return nil
+}
+
+func (s *Socket) Read(data []byte, flags uint32) (int, error) {
+ var actual uint
+ status := Sys_socket_read(Handle(*s), flags, bytesPtr(data), uint(len(data)), &actual)
+ if status != ErrOk {
+ return int(actual), &Error{Status: status, Text: "zx.Socket.Read"}
+ }
+ return int(actual), nil
+}
+
+func (s *Socket) Write(data []byte, flags uint32) (int, error) {
+ var actual uint
+ status := Sys_socket_write(Handle(*s), flags, bytesPtr(data), uint(len(data)), &actual)
+ if status != ErrOk {
+ return int(actual), &Error{Status: status, Text: "zx.Socket.Write"}
+ }
+ return int(actual), nil
+}
+
+func (s *Socket) Close() error {
+ return s.Handle().Close()
+}
+
+func (s *Socket) Shutdown(flags uint32) error {
+ status := Sys_socket_shutdown(Handle(*s), flags)
+ if status != ErrOk {
+ return &Error{Status: status, Text: "zx.Socket.Shutdown"}
+ }
+ return nil
+}
+
+func NewSocket(flags uint32) (Socket, Socket, error) {
+ var h0, h1 Handle
+ if status := Sys_socket_create(flags, &h0, &h1); status != ErrOk {
+ return Socket(HandleInvalid), Socket(HandleInvalid), &Error{Status: status, Text: "zx.Socket"}
+ }
+ return Socket(h0), Socket(h1), nil
+}
+
+func NewEvent(options uint32) (Event, error) {
+ var h Handle
+ if status := Sys_event_create(options, &h); status != ErrOk {
+ return Event(HandleInvalid), &Error{Status: status, Text: "zx.Event"}
+ }
+ return Event(h), nil
+}
+
+func (e *Event) Close() error {
+ return e.Handle().Close()
+}
+
+func (e *Event) Duplicate(rights Rights) (Event, error) {
+ h := Handle(*e)
+ h, err := h.Duplicate(rights)
+ if err != nil {
+ return Event(HandleInvalid), err
+ }
+ return Event(h), nil
+}
+
+var zxwaitCloseFn = func(Handle, func(Handle) error) error { return nil }
+
+// SetZXWaitCloseFn is used by package zxwait to avoid a circular dependency.
+func SetZXWaitCloseFn(fn func(Handle, func(Handle) error) error) {
+ zxwaitCloseFn = fn
+}
+
+func (h *Handle) Close() error {
+ if handle := Handle(atomic.SwapUint32((*uint32)(h), uint32(HandleInvalid))); handle != HandleInvalid {
+ if err := zxwaitCloseFn(handle, closeHandle); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func closeHandle(handle Handle) error {
+ if status := Sys_handle_close(handle); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Handle.Close"}
+ }
+ return nil
+}
+
+func (h *Handle) Duplicate(rights Rights) (Handle, error) {
+ var dup Handle
+ if status := Sys_handle_duplicate(*h, rights, &dup); status != ErrOk {
+ return HandleInvalid, &Error{Status: status, Text: "zx.Handle.Duplicate"}
+ }
+ return dup, nil
+}
+
+func (h *Handle) Signal(clearMask, setMask Signals) error {
+ if status := Sys_object_signal(*h, uint32(clearMask), uint32(setMask)); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Handle.Signal"}
+ }
+ return nil
+}
+
+func (h *Handle) SignalPeer(clearMask, setMask Signals) error {
+ if status := Sys_object_signal_peer(*h, uint32(clearMask), uint32(setMask)); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Handle.SignalPeer"}
+ }
+ return nil
+}
+
+func (h *Handle) GetInfo(topic uint32, buffer unsafe.Pointer, bufferSize uint) error {
+ if status := Sys_object_get_info(*h, topic, buffer, bufferSize, nil, nil); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Handle.GetInfo"}
+ }
+ return nil
+}
+
+func (h *Handle) GetInfoHandleBasic() (InfoHandleBasic, error) {
+ var info InfoHandleBasic
+ err := h.GetInfo(ObjectInfoHandleBasic, unsafe.Pointer(&info), uint(unsafe.Sizeof(info)))
+ return info, err
+}
+
+func (h *Handle) GetInfoHandleValid() bool {
+ err := h.GetInfo(ObjectInfoHandleValid, nil, 0)
+ return err == nil
+}
+
+func (h *Handle) GetProperty(property uint32, data []byte) error {
+ var numBytes = uint(len(data))
+ if status := Sys_object_get_property(*h, property, bytesPtr(data), numBytes); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Handle.GetProperty"}
+ }
+ return nil
+}
+
+func (h *Handle) SetProperty(property uint32, data []byte) error {
+ var numBytes = uint(len(data))
+ if status := Sys_object_set_property(*h, property, bytesPtr(data), numBytes); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Handle.SetProperty"}
+ }
+ return nil
+}
+
+func WaitMany(items []WaitItem, timeout Time) error {
+ var ptr *WaitItem
+ if len(items) > 0 {
+ ptr = &items[0]
+ }
+ if status := Sys_object_wait_many(ptr, uint(len(items)), timeout); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Handle.WaitMany"}
+ }
+ return nil
+}
+
+func (c *Channel) Close() error {
+ return c.Handle().Close()
+}
+
+func handlePtr(data []Handle) *Handle {
+ if len(data) > 0 {
+ return &data[0]
+ }
+ return nil
+}
+
+func handleInfoPtr(data []HandleInfo) *HandleInfo {
+ if len(data) > 0 {
+ return &data[0]
+ }
+ return nil
+}
+
+func handleDispositionPtr(data []HandleDisposition) *HandleDisposition {
+ if len(data) > 0 {
+ return &data[0]
+ }
+ return nil
+}
+
+func (c *Channel) Read(data []byte, handles []Handle, flags uint32) (numBytes, numHandles uint32, _ error) {
+ numBytes = uint32(len(data))
+ numHandles = uint32(len(handles))
+ if status := Sys_channel_read(Handle(*c), flags, bytesPtr(data), handlePtr(handles), numBytes, numHandles, &numBytes, &numHandles); status != ErrOk {
+ return 0, 0, &Error{Status: status, Text: "zx.Channel.Read"}
+ }
+ return numBytes, numHandles, nil
+}
+
+func (c *Channel) ReadEtc(data []byte, handleInfos []HandleInfo, flags uint32) (numBytes, numHandles uint32, _ error) {
+ numBytes = uint32(len(data))
+ numHandles = uint32(len(handleInfos))
+ if status := Sys_channel_read_etc(Handle(*c), flags, bytesPtr(data), handleInfoPtr(handleInfos), numBytes, numHandles, &numBytes, &numHandles); status != ErrOk {
+ return 0, 0, &Error{Status: status, Text: "zx.Channel.ReadEtc"}
+ }
+ return numBytes, numHandles, nil
+}
+
+func (c *Channel) Write(data []byte, handles []Handle, flags uint32) error {
+ if status := Sys_channel_write(Handle(*c), flags, bytesPtr(data), uint32(len(data)), handlePtr(handles), uint32(len(handles))); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Channel.Write"}
+ }
+ return nil
+}
+
+func (c *Channel) WriteEtc(data []byte, handleDispositions []HandleDisposition, flags uint32) error {
+ if status := Sys_channel_write_etc(Handle(*c), flags, bytesPtr(data), uint32(len(data)), handleDispositionPtr(handleDispositions), uint32(len(handleDispositions))); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Channel.WriteEtc"}
+ }
+ return nil
+}
+
+func (c *Channel) Call(flags uint32, deadline Time, wData []byte, wHandles []Handle, rData []byte, rHandles []Handle) (actualBytes, actualHandles uint32, _ error) {
+ args := &ChannelCallArgs{
+ WriteBytes: bytesPtr(wData),
+ WriteHandles: handlePtr(wHandles),
+ ReadBytes: bytesPtr(rData),
+ ReadHandles: handlePtr(rHandles),
+ WriteNumBytes: uint32(len(wData)),
+ WriteNumHandles: uint32(len(wHandles)),
+ ReadNumBytes: uint32(len(rData)),
+ ReadNumHandles: uint32(len(rHandles)),
+ }
+
+ if status := Sys_channel_call(Handle(*c), flags, deadline, args, &actualBytes, &actualHandles); status != ErrOk {
+ return 0, 0, &Error{Status: status, Text: "zx.Channel.Call"}
+ }
+ return actualBytes, actualHandles, nil
+}
+
+func (c *Channel) CallEtc(flags uint32, deadline Time, wData []byte, wHandles []HandleDisposition, rData []byte, rHandles []HandleInfo) (actualBytes, actualHandles uint32, _ error) {
+ args := &ChannelCallEtcArgs{
+ WriteBytes: bytesPtr(wData),
+ WriteHandles: handleDispositionPtr(wHandles),
+ ReadBytes: bytesPtr(rData),
+ ReadHandles: handleInfoPtr(rHandles),
+ WriteNumBytes: uint32(len(wData)),
+ WriteNumHandles: uint32(len(wHandles)),
+ ReadNumBytes: uint32(len(rData)),
+ ReadNumHandles: uint32(len(rHandles)),
+ }
+
+ if status := Sys_channel_call_etc(Handle(*c), flags, deadline, args, &actualBytes, &actualHandles); status != ErrOk {
+ return 0, 0, &Error{Status: status, Text: "zx.Channel.CallEtc"}
+ }
+ return actualBytes, actualHandles, nil
+}
+
+func NewChannel(flags uint32) (Channel, Channel, error) {
+ var h0, h1 Handle
+ if status := Sys_channel_create(flags, &h0, &h1); status != ErrOk {
+ return Channel(HandleInvalid), Channel(HandleInvalid), &Error{Status: status, Text: "zx.Channel"}
+ }
+ return Channel(h0), Channel(h1), nil
+}
+
+const (
+ PortWaitAsyncOnce = iota
+ PortWaitAsyncTimestamp
+)
+
+const (
+ PortPacketTypeUser = iota
+ PortPacketTypeSignalOne
+ PortPacketTypeSignalRepeating
+)
+
+const (
+ PacketHeaderSize = uint(unsafe.Sizeof(PacketHeader{}))
+ PacketMaxSize = uint(unsafe.Sizeof(Packet{}))
+)
+
+type PortPacket interface {
+ Header() *PacketHeader
+}
+
+type PacketHeader struct {
+ Key uint64
+ Type uint32
+ Status Status
+}
+
+// Packet describes packets read from (*Port).Wait.
+type Packet struct {
+ Hdr PacketHeader
+ Bytes [32]uint8
+}
+
+func (p *Packet) Header() *PacketHeader {
+ return &p.Hdr
+}
+
+func (p *Packet) Signal() *PacketSignal {
+ return (*PacketSignal)(unsafe.Pointer(p))
+}
+
+// PacketSignal describes packets of type PortPacketTypeSignal.
+type PacketSignal struct {
+ Hdr PacketHeader
+ Trigger Signals
+ Observed Signals
+ Count uint64
+ Timestamp uint64
+ Reserved1 uint64
+}
+
+func (s *PacketSignal) Header() *PacketHeader {
+ return &s.Hdr
+}
+
+func (p *Port) Close() error {
+ return p.Handle().Close()
+}
+
+// Queue a PortPacket, which may have a varying size.
+func (p *Port) Queue(packet PortPacket) error {
+ if status := Sys_port_queue(Handle(*p), (*int)(unsafe.Pointer(packet.Header()))); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Port.Queue"}
+ }
+ return nil
+}
+
+// Wait for a Packet, which must be as large as the largest
+// possible packet that may be received.
+func (p *Port) Wait(packet *Packet, deadline Time) error {
+ if status := Sys_port_wait(Handle(*p), deadline, (*int)(unsafe.Pointer(packet))); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Port.Wait"}
+ }
+ return nil
+}
+
+func (p *Port) Cancel(source Handle, key uint64) error {
+ if status := Sys_port_cancel(Handle(*p), source, key); status != ErrOk {
+ return &Error{Status: status, Text: "zx.Port.Cancel"}
+ }
+ return nil
+}
+
+func (p *Port) WaitAsync(handle Handle, key uint64, signals Signals, options uint32) error {
+ if status := Sys_object_wait_async(handle, Handle(*p), key, signals, options); status != ErrOk {
+ return &Error{Status: status, Text: "fdio.Port.WaitAsync"}
+ }
+ return nil
+}
+
+func NewPort(options uint32) (Port, error) {
+ var h Handle
+ if status := Sys_port_create(options, &h); status != ErrOk {
+ return Port(HandleInvalid), &Error{Status: status, Text: "zx.Port"}
+ }
+ return Port(h), nil
+}
+
+func (vmo *VMO) CreateChild(options VMOChildOption, offset, size uint64) (VMO, error) {
+ var h Handle
+ if status := Sys_vmo_create_child(Handle(*vmo), uint32(options), offset, size, &h); status != ErrOk {
+ return VMO(HandleInvalid), &Error{Status: status, Text: "zx.VMO.CreateChild"}
+ }
+ return VMO(h), nil
+}
+
+func (vmo *VMO) Read(b []byte, offset uint64) error {
+ if status := Sys_vmo_read(Handle(*vmo), bytesPtr(b), offset, uint(len(b))); status != ErrOk {
+ return &Error{Status: status, Text: "zx.VMO.Read"}
+ }
+ return nil
+}
+
+func (vmo *VMO) Write(b []byte, offset uint64) error {
+ if status := Sys_vmo_write(Handle(*vmo), bytesPtr(b), offset, uint(len(b))); status != ErrOk {
+ return &Error{Status: status, Text: "zx.VMO.Write"}
+ }
+ return nil
+}
+
+func (vmo *VMO) Size() (uint64, error) {
+ var size uint64
+ if status := Sys_vmo_get_size(Handle(*vmo), &size); status != ErrOk {
+ return size, &Error{Status: status, Text: "zx.VMO.Size"}
+ }
+ return size, nil
+}
+
+func (vmo *VMO) SetSize(size uint64) error {
+ if status := Sys_vmo_set_size(Handle(*vmo), size); status != ErrOk {
+ return &Error{Status: status, Text: "zx.VMO.SetSize"}
+ }
+ return nil
+}
+
+func (vmo *VMO) OpRange(op uint32, offset, size uint64, b []byte) error {
+ if status := Sys_vmo_op_range(Handle(*vmo), op, offset, size, bytesPtr(b), uint(len(b))); status != ErrOk {
+ return &Error{Status: status, Text: "zx.VMO.OpRange"}
+ }
+ return nil
+}
+
+func (vmo *VMO) Close() error {
+ return vmo.Handle().Close()
+}
+
+func NewVMO(size uint64, options VMOOption) (VMO, error) {
+ var h Handle
+ if status := Sys_vmo_create(size, uint32(options), &h); status != ErrOk {
+ return VMO(HandleInvalid), &Error{Status: status, Text: "zx.VMO"}
+ }
+ return VMO(h), nil
+}
+
+func (v VMAR) Destroy() error {
+ if status := Sys_vmar_destroy(Handle(v)); status != ErrOk {
+ return &Error{Status: status, Text: "zx.VMAR.Destroy"}
+ }
+ return nil
+}
+
+func (v VMAR) Map(vmarOffset uint64, vmo VMO, vmoOffset, len uint64, flags VMFlag) (Vaddr, error) {
+ var addr Vaddr
+ if status := Sys_vmar_map(Handle(v), flags, uint(vmarOffset), Handle(vmo), vmoOffset, uint(len), &addr); status != ErrOk {
+ return 0, &Error{Status: status, Text: "zx.VMAR.Map"}
+ }
+ return addr, nil
+}
+
+func (v VMAR) Unmap(addr Vaddr, len uint64) error {
+ if status := Sys_vmar_unmap(Handle(v), addr, uint(len)); status != ErrOk {
+ return &Error{Status: status, Text: "zx.VMAR.Unmap"}
+ }
+ return nil
+}
+
+func (v VMAR) Protect(addr Vaddr, len uint64, flags VMFlag) error {
+ if status := Sys_vmar_protect(Handle(v), flags, addr, uint(len)); status != ErrOk {
+ return &Error{Status: status, Text: "zx.VMAR.Protect"}
+ }
+ return nil
+}
+
+func NewVMAR(parent VMAR, offset, size uint64, flags VMFlag) (VMAR, Vaddr, error) {
+ var childHandle Handle
+ var addr Vaddr
+ if status := Sys_vmar_allocate(Handle(parent), flags, uint(offset), uint(size), &childHandle, &addr); status != ErrOk {
+ return 0, 0, &Error{Status: status, Text: "zx.NewVMAR"}
+ }
+ return VMAR(childHandle), addr, nil
+}
+
+func NewLog(options uint32) Log {
+ var h Handle
+ status := Sys_debuglog_create(HandleInvalid, options, &h)
+ if status != ErrOk {
+ return Log(HandleInvalid)
+ }
+ return Log(h)
+}
+
+func (l Log) Write(b []byte) (int, error) {
+ if status := Sys_debuglog_write(Handle(l), 0, bytesPtr(b), uint(len(b))); status != ErrOk {
+ return 0, &Error{Status: status, Text: "zx.Log.Write"}
+ }
+ return len(b), nil
+}
+
+func (l Log) Read(b []byte) (int, error) {
+ if status := Sys_debuglog_read(Handle(l), 0, bytesPtr(b), uint(len(b))); status != ErrOk {
+ return 0, &Error{Status: status, Text: "zx.Log.Read"}
+ }
+ return len(b), nil
+}
+
+func (l *Log) Close() error {
+ return l.Handle().Close()
+}
+
+func RandRead(b []byte) {
+ Sys_cprng_draw(bytesPtr(b), uint(len(b)))
+}
+
+// Error is a Status with associated error text.
+// It is used as a Go error.
+type Error struct {
+ Status Status
+ Text string
+}
+
+var _ error = (*Error)(nil)
+
+func (e *Error) Error() string {
+ if e.Text == "" {
+ return "zx.Status: " + e.Status.String()
+ }
+ return e.Status.String() + ": " + e.Text
+}
+
+func (e *Error) Is(target error) bool {
+ switch target {
+ case oserror.ErrPermission:
+ return e.Status == ErrAccessDenied
+ case oserror.ErrExist:
+ return e.Status == ErrAlreadyExists
+ case oserror.ErrNotExist:
+ return e.Status == ErrNotFound
+ }
+ return false
+}
diff --git a/src/syscall/zx/hardware/ethernet/impl.go b/src/syscall/zx/hardware/ethernet/impl.go
new file mode 100644
index 0000000..e1a2f7a
--- /dev/null
+++ b/src/syscall/zx/hardware/ethernet/impl.go
@@ -0,0 +1,716 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package ethernet
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+)
+
+const (
+ // Signal that is asserted on the RX fifo whenever the Device has a status
+ // change. This is ZX_USER_SIGNAL_0.
+ SignalStatus uint32 = 16777216
+ // Max client name length
+ MaxClientNameLen uint32 = 15
+ // For compatibility with a past revision, allow one extra byte for an optional
+ // null-terminator.
+ SetClientNameMaxLen uint32 = 16
+)
+
+var _ _bindings.Bits = Features(0)
+
+// Features distinguishes between NICs with different features.
+type Features uint32
+
+const (
+ FeaturesWlan Features = 1
+ FeaturesSynthetic Features = 2
+ FeaturesLoopback Features = 4
+ Features_Mask Features = 7
+)
+
+func (_ Features) I_BitsMask() Features {
+ return Features_Mask
+}
+
+func (_ Features) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x Features) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x Features) GetUnknownBits() uint64 {
+ return uint64(^Features_Mask & x)
+}
+
+func (x Features) InvertBits() Features {
+ return Features_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x Features) HasBits(mask Features) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x Features) ClearBits(mask Features) Features {
+ return ^mask & x
+}
+
+func (x Features) String() string {
+ switch x {
+ case 1:
+ return "Wlan"
+ case 2:
+ return "Synthetic"
+ case 4:
+ return "Loopback"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = DeviceStatus(0)
+
+type DeviceStatus uint32
+
+const (
+ DeviceStatusOnline DeviceStatus = 1
+ DeviceStatus_Mask DeviceStatus = 1
+)
+
+func (_ DeviceStatus) I_BitsMask() DeviceStatus {
+ return DeviceStatus_Mask
+}
+
+func (_ DeviceStatus) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x DeviceStatus) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x DeviceStatus) GetUnknownBits() uint64 {
+ return uint64(^DeviceStatus_Mask & x)
+}
+
+func (x DeviceStatus) InvertBits() DeviceStatus {
+ return DeviceStatus_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x DeviceStatus) HasBits(mask DeviceStatus) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x DeviceStatus) ClearBits(mask DeviceStatus) DeviceStatus {
+ return ^mask & x
+}
+
+func (x DeviceStatus) String() string {
+ switch x {
+ case 1:
+ return "Online"
+ }
+ return "Unknown"
+}
+
+type MacAddress struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"6" fidl_alignment_v1:"1"`
+ Octets [6]uint8 `fidl_offset_v1:"0"`
+}
+
+var _mMacAddress = _bindings.CreateLazyMarshaler(MacAddress{})
+
+func (msg *MacAddress) Marshaler() _bindings.Marshaler {
+ return _mMacAddress
+}
+
+type Info struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"4"`
+ Features Features `fidl_offset_v1:"0"`
+ Mtu uint32 `fidl_offset_v1:"4"`
+ Mac MacAddress `fidl_offset_v1:"8"`
+}
+
+var _mInfo = _bindings.CreateLazyMarshaler(Info{})
+
+func (msg *Info) Marshaler() _bindings.Marshaler {
+ return _mInfo
+}
+
+type Fifos struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"4"`
+ Rx _zx.Handle `fidl_offset_v1:"0" fidl_handle_subtype:"19" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ Tx _zx.Handle `fidl_offset_v1:"4" fidl_handle_subtype:"19" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ RxDepth uint32 `fidl_offset_v1:"8"`
+ TxDepth uint32 `fidl_offset_v1:"12"`
+}
+
+var _mFifos = _bindings.CreateLazyMarshaler(Fifos{})
+
+func (msg *Fifos) Marshaler() _bindings.Marshaler {
+ return _mFifos
+}
+
+type deviceWithCtxGetInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info Info `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxGetInfoResponse = _bindings.CreateLazyMarshaler(deviceWithCtxGetInfoResponse{})
+
+func (msg *deviceWithCtxGetInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxGetInfoResponse
+}
+
+type deviceWithCtxGetFifosResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+ Info *Fifos `fidl_offset_v1:"8"`
+}
+
+var _mdeviceWithCtxGetFifosResponse = _bindings.CreateLazyMarshaler(deviceWithCtxGetFifosResponse{})
+
+func (msg *deviceWithCtxGetFifosResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxGetFifosResponse
+}
+
+type deviceWithCtxSetIoBufferRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ H _zx.VMO `fidl_offset_v1:"0" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mdeviceWithCtxSetIoBufferRequest = _bindings.CreateLazyMarshaler(deviceWithCtxSetIoBufferRequest{})
+
+func (msg *deviceWithCtxSetIoBufferRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxSetIoBufferRequest
+}
+
+type deviceWithCtxSetIoBufferResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxSetIoBufferResponse = _bindings.CreateLazyMarshaler(deviceWithCtxSetIoBufferResponse{})
+
+func (msg *deviceWithCtxSetIoBufferResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxSetIoBufferResponse
+}
+
+type deviceWithCtxStartResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxStartResponse = _bindings.CreateLazyMarshaler(deviceWithCtxStartResponse{})
+
+func (msg *deviceWithCtxStartResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxStartResponse
+}
+
+type deviceWithCtxListenStartResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxListenStartResponse = _bindings.CreateLazyMarshaler(deviceWithCtxListenStartResponse{})
+
+func (msg *deviceWithCtxListenStartResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxListenStartResponse
+}
+
+type deviceWithCtxSetClientNameRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Name string `fidl_offset_v1:"0" fidl_bounds:"16"`
+}
+
+var _mdeviceWithCtxSetClientNameRequest = _bindings.CreateLazyMarshaler(deviceWithCtxSetClientNameRequest{})
+
+func (msg *deviceWithCtxSetClientNameRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxSetClientNameRequest
+}
+
+type deviceWithCtxSetClientNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxSetClientNameResponse = _bindings.CreateLazyMarshaler(deviceWithCtxSetClientNameResponse{})
+
+func (msg *deviceWithCtxSetClientNameResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxSetClientNameResponse
+}
+
+type deviceWithCtxGetStatusResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ DeviceStatus DeviceStatus `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxGetStatusResponse = _bindings.CreateLazyMarshaler(deviceWithCtxGetStatusResponse{})
+
+func (msg *deviceWithCtxGetStatusResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxGetStatusResponse
+}
+
+type deviceWithCtxSetPromiscuousModeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Enabled bool `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxSetPromiscuousModeRequest = _bindings.CreateLazyMarshaler(deviceWithCtxSetPromiscuousModeRequest{})
+
+func (msg *deviceWithCtxSetPromiscuousModeRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxSetPromiscuousModeRequest
+}
+
+type deviceWithCtxSetPromiscuousModeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxSetPromiscuousModeResponse = _bindings.CreateLazyMarshaler(deviceWithCtxSetPromiscuousModeResponse{})
+
+func (msg *deviceWithCtxSetPromiscuousModeResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxSetPromiscuousModeResponse
+}
+
+type deviceWithCtxConfigMulticastAddMacRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Addr MacAddress `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxConfigMulticastAddMacRequest = _bindings.CreateLazyMarshaler(deviceWithCtxConfigMulticastAddMacRequest{})
+
+func (msg *deviceWithCtxConfigMulticastAddMacRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxConfigMulticastAddMacRequest
+}
+
+type deviceWithCtxConfigMulticastAddMacResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxConfigMulticastAddMacResponse = _bindings.CreateLazyMarshaler(deviceWithCtxConfigMulticastAddMacResponse{})
+
+func (msg *deviceWithCtxConfigMulticastAddMacResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxConfigMulticastAddMacResponse
+}
+
+type deviceWithCtxConfigMulticastDeleteMacRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Addr MacAddress `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxConfigMulticastDeleteMacRequest = _bindings.CreateLazyMarshaler(deviceWithCtxConfigMulticastDeleteMacRequest{})
+
+func (msg *deviceWithCtxConfigMulticastDeleteMacRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxConfigMulticastDeleteMacRequest
+}
+
+type deviceWithCtxConfigMulticastDeleteMacResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxConfigMulticastDeleteMacResponse = _bindings.CreateLazyMarshaler(deviceWithCtxConfigMulticastDeleteMacResponse{})
+
+func (msg *deviceWithCtxConfigMulticastDeleteMacResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxConfigMulticastDeleteMacResponse
+}
+
+type deviceWithCtxConfigMulticastSetPromiscuousModeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Enabled bool `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxConfigMulticastSetPromiscuousModeRequest = _bindings.CreateLazyMarshaler(deviceWithCtxConfigMulticastSetPromiscuousModeRequest{})
+
+func (msg *deviceWithCtxConfigMulticastSetPromiscuousModeRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxConfigMulticastSetPromiscuousModeRequest
+}
+
+type deviceWithCtxConfigMulticastSetPromiscuousModeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxConfigMulticastSetPromiscuousModeResponse = _bindings.CreateLazyMarshaler(deviceWithCtxConfigMulticastSetPromiscuousModeResponse{})
+
+func (msg *deviceWithCtxConfigMulticastSetPromiscuousModeResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxConfigMulticastSetPromiscuousModeResponse
+}
+
+type deviceWithCtxConfigMulticastTestFilterResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxConfigMulticastTestFilterResponse = _bindings.CreateLazyMarshaler(deviceWithCtxConfigMulticastTestFilterResponse{})
+
+func (msg *deviceWithCtxConfigMulticastTestFilterResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxConfigMulticastTestFilterResponse
+}
+
+type deviceWithCtxDumpRegistersResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxDumpRegistersResponse = _bindings.CreateLazyMarshaler(deviceWithCtxDumpRegistersResponse{})
+
+func (msg *deviceWithCtxDumpRegistersResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxDumpRegistersResponse
+}
+
+const (
+ DeviceGetInfoOrdinal uint64 = 0x7f8e9a8dda706422
+ DeviceGetFifosOrdinal uint64 = 0x57924e13bf602360
+ DeviceSetIoBufferOrdinal uint64 = 0x66af0a45e326fda8
+ DeviceStartOrdinal uint64 = 0x6e59b9bb7123be35
+ DeviceStopOrdinal uint64 = 0x4bea699d7725dffb
+ DeviceListenStartOrdinal uint64 = 0x2825d26aac1495d
+ DeviceListenStopOrdinal uint64 = 0x102cbf5639c2403a
+ DeviceSetClientNameOrdinal uint64 = 0x16226cf5bfe3a001
+ DeviceGetStatusOrdinal uint64 = 0x379a5ed530acd140
+ DeviceSetPromiscuousModeOrdinal uint64 = 0x6ae9e4516810f945
+ DeviceConfigMulticastAddMacOrdinal uint64 = 0x5cdb4b0bd52337b8
+ DeviceConfigMulticastDeleteMacOrdinal uint64 = 0x540f49129d9bfa07
+ DeviceConfigMulticastSetPromiscuousModeOrdinal uint64 = 0x53d4ba4a14dbe91a
+ DeviceConfigMulticastTestFilterOrdinal uint64 = 0x5a83a0ecc3d952a3
+ DeviceDumpRegistersOrdinal uint64 = 0x43a8fb0535f81274
+)
+
+type DeviceWithCtxInterface _bindings.ChannelProxy
+
+// Obtain information about device
+func (p *DeviceWithCtxInterface) GetInfo(ctx_ _bindings.Context) (Info, error) {
+ var req_ _bindings.Message
+ resp_ := &deviceWithCtxGetInfoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceGetInfoOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// Obtain a pair of fifos for queueing tx and rx operations
+func (p *DeviceWithCtxInterface) GetFifos(ctx_ _bindings.Context) (int32, *Fifos, error) {
+ var req_ _bindings.Message
+ resp_ := &deviceWithCtxGetFifosResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceGetFifosOrdinal, req_, resp_)
+ return resp_.Status, resp_.Info, err_
+}
+
+// Set the IO Buffer that will provide the data buffers for tx and rx operations
+func (p *DeviceWithCtxInterface) SetIoBuffer(ctx_ _bindings.Context, h _zx.VMO) (int32, error) {
+ req_ := &deviceWithCtxSetIoBufferRequest{
+ H: h,
+ }
+ resp_ := &deviceWithCtxSetIoBufferResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceSetIoBufferOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+// Start transferring packets
+// Start will not succeed (ZX_ERR_BAD_STATE) until the fifos have been
+// obtained and an io buffer vmo has been registered.
+func (p *DeviceWithCtxInterface) Start(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &deviceWithCtxStartResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceStartOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+// Stop transferring packets
+func (p *DeviceWithCtxInterface) Stop(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ var resp_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceStopOrdinal, req_, resp_)
+ return err_
+}
+
+// Start listening to the packets that we're transmitting
+// as well as the packets we're receiving.
+func (p *DeviceWithCtxInterface) ListenStart(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &deviceWithCtxListenStartResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceListenStartOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+// Stop listening to the packets that we're transmitting.
+func (p *DeviceWithCtxInterface) ListenStop(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ var resp_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceListenStopOrdinal, req_, resp_)
+ return err_
+}
+
+func (p *DeviceWithCtxInterface) SetClientName(ctx_ _bindings.Context, name string) (int32, error) {
+ req_ := &deviceWithCtxSetClientNameRequest{
+ Name: name,
+ }
+ resp_ := &deviceWithCtxSetClientNameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceSetClientNameOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+// Obtain the device status bits
+// When these change, the signal SIGNAL_STATUS is asserted on the rx fifo.
+// When these are read, the signal is deasserted.
+func (p *DeviceWithCtxInterface) GetStatus(ctx_ _bindings.Context) (DeviceStatus, error) {
+ var req_ _bindings.Message
+ resp_ := &deviceWithCtxGetStatusResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceGetStatusOrdinal, req_, resp_)
+ return resp_.DeviceStatus, err_
+}
+
+func (p *DeviceWithCtxInterface) SetPromiscuousMode(ctx_ _bindings.Context, enabled bool) (int32, error) {
+ req_ := &deviceWithCtxSetPromiscuousModeRequest{
+ Enabled: enabled,
+ }
+ resp_ := &deviceWithCtxSetPromiscuousModeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceSetPromiscuousModeOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+func (p *DeviceWithCtxInterface) ConfigMulticastAddMac(ctx_ _bindings.Context, addr MacAddress) (int32, error) {
+ req_ := &deviceWithCtxConfigMulticastAddMacRequest{
+ Addr: addr,
+ }
+ resp_ := &deviceWithCtxConfigMulticastAddMacResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceConfigMulticastAddMacOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+func (p *DeviceWithCtxInterface) ConfigMulticastDeleteMac(ctx_ _bindings.Context, addr MacAddress) (int32, error) {
+ req_ := &deviceWithCtxConfigMulticastDeleteMacRequest{
+ Addr: addr,
+ }
+ resp_ := &deviceWithCtxConfigMulticastDeleteMacResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceConfigMulticastDeleteMacOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+func (p *DeviceWithCtxInterface) ConfigMulticastSetPromiscuousMode(ctx_ _bindings.Context, enabled bool) (int32, error) {
+ req_ := &deviceWithCtxConfigMulticastSetPromiscuousModeRequest{
+ Enabled: enabled,
+ }
+ resp_ := &deviceWithCtxConfigMulticastSetPromiscuousModeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceConfigMulticastSetPromiscuousModeOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+func (p *DeviceWithCtxInterface) ConfigMulticastTestFilter(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &deviceWithCtxConfigMulticastTestFilterResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceConfigMulticastTestFilterOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+func (p *DeviceWithCtxInterface) DumpRegisters(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &deviceWithCtxDumpRegistersResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceDumpRegistersOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+// Operation
+//
+// Packets are transmitted by writing data into the IO buffer and writing
+// a FifoEntry referencing that data (offset + length) into the tx fifo.
+// When the driver is done accessing the data, a FifoEntry with the same
+// cookie value (opaque to the driver) will be readable from the tx fifo.
+//
+// Packets are received by writing a FifoEntry referencing an available
+// buffer (offset + length) in the IO buffer. When a packet is received,
+// a FifoEntry with the same cookie value (opaque to the driver) will be
+// readable from the rx fifo. The offset field will be the same as was
+// sent. The length field will reflect the actual size of the received
+// packet. The flags field will indicate success or a specific failure
+// condition.
+//
+// IMPORTANT: The driver *will not* buffer response messages. It is the
+// client's responsibility to ensure that there is space in the reply side
+// of each fifo for each outstanding tx or rx request. The fifo sizes
+// are returned along with the fifo handles from GetFifos().
+//
+// See //zircon/system/public/zircon/device/ethernet.h for fifo entry layout
+// and request / response message bits.
+type DeviceWithCtx interface {
+ // Obtain information about device
+ GetInfo(ctx_ _bindings.Context) (Info, error)
+ // Obtain a pair of fifos for queueing tx and rx operations
+ GetFifos(ctx_ _bindings.Context) (int32, *Fifos, error)
+ // Set the IO Buffer that will provide the data buffers for tx and rx operations
+ SetIoBuffer(ctx_ _bindings.Context, h _zx.VMO) (int32, error)
+ // Start transferring packets
+ // Start will not succeed (ZX_ERR_BAD_STATE) until the fifos have been
+ // obtained and an io buffer vmo has been registered.
+ Start(ctx_ _bindings.Context) (int32, error)
+ // Stop transferring packets
+ Stop(ctx_ _bindings.Context) error
+ // Start listening to the packets that we're transmitting
+ // as well as the packets we're receiving.
+ ListenStart(ctx_ _bindings.Context) (int32, error)
+ // Stop listening to the packets that we're transmitting.
+ ListenStop(ctx_ _bindings.Context) error
+ SetClientName(ctx_ _bindings.Context, name string) (int32, error)
+ // Obtain the device status bits
+ // When these change, the signal SIGNAL_STATUS is asserted on the rx fifo.
+ // When these are read, the signal is deasserted.
+ GetStatus(ctx_ _bindings.Context) (DeviceStatus, error)
+ SetPromiscuousMode(ctx_ _bindings.Context, enabled bool) (int32, error)
+ ConfigMulticastAddMac(ctx_ _bindings.Context, addr MacAddress) (int32, error)
+ ConfigMulticastDeleteMac(ctx_ _bindings.Context, addr MacAddress) (int32, error)
+ ConfigMulticastSetPromiscuousMode(ctx_ _bindings.Context, enabled bool) (int32, error)
+ ConfigMulticastTestFilter(ctx_ _bindings.Context) (int32, error)
+ DumpRegisters(ctx_ _bindings.Context) (int32, error)
+}
+
+type DeviceWithCtxTransitionalBase struct{}
+
+type DeviceWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDeviceWithCtxInterfaceRequest() (DeviceWithCtxInterfaceRequest, *DeviceWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DeviceWithCtxInterfaceRequest(req), (*DeviceWithCtxInterface)(cli), err
+}
+
+type DeviceWithCtxStub struct {
+ Impl DeviceWithCtx
+}
+
+func (s_ *DeviceWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DeviceGetInfoOrdinal:
+ info, err_ := s_.Impl.GetInfo(args_.Ctx)
+ out_ := deviceWithCtxGetInfoResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case DeviceGetFifosOrdinal:
+ status, info, err_ := s_.Impl.GetFifos(args_.Ctx)
+ out_ := deviceWithCtxGetFifosResponse{}
+ out_.Status = status
+ out_.Info = info
+ return &out_, true, err_
+ case DeviceSetIoBufferOrdinal:
+ in_ := deviceWithCtxSetIoBufferRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ status, err_ := s_.Impl.SetIoBuffer(args_.Ctx, in_.H)
+ out_ := deviceWithCtxSetIoBufferResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case DeviceStartOrdinal:
+ status, err_ := s_.Impl.Start(args_.Ctx)
+ out_ := deviceWithCtxStartResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case DeviceStopOrdinal:
+ err_ := s_.Impl.Stop(args_.Ctx)
+ return nil, true, err_
+ case DeviceListenStartOrdinal:
+ status, err_ := s_.Impl.ListenStart(args_.Ctx)
+ out_ := deviceWithCtxListenStartResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case DeviceListenStopOrdinal:
+ err_ := s_.Impl.ListenStop(args_.Ctx)
+ return nil, true, err_
+ case DeviceSetClientNameOrdinal:
+ in_ := deviceWithCtxSetClientNameRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ status, err_ := s_.Impl.SetClientName(args_.Ctx, in_.Name)
+ out_ := deviceWithCtxSetClientNameResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case DeviceGetStatusOrdinal:
+ deviceStatus, err_ := s_.Impl.GetStatus(args_.Ctx)
+ out_ := deviceWithCtxGetStatusResponse{}
+ out_.DeviceStatus = deviceStatus
+ return &out_, true, err_
+ case DeviceSetPromiscuousModeOrdinal:
+ in_ := deviceWithCtxSetPromiscuousModeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ status, err_ := s_.Impl.SetPromiscuousMode(args_.Ctx, in_.Enabled)
+ out_ := deviceWithCtxSetPromiscuousModeResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case DeviceConfigMulticastAddMacOrdinal:
+ in_ := deviceWithCtxConfigMulticastAddMacRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ status, err_ := s_.Impl.ConfigMulticastAddMac(args_.Ctx, in_.Addr)
+ out_ := deviceWithCtxConfigMulticastAddMacResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case DeviceConfigMulticastDeleteMacOrdinal:
+ in_ := deviceWithCtxConfigMulticastDeleteMacRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ status, err_ := s_.Impl.ConfigMulticastDeleteMac(args_.Ctx, in_.Addr)
+ out_ := deviceWithCtxConfigMulticastDeleteMacResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case DeviceConfigMulticastSetPromiscuousModeOrdinal:
+ in_ := deviceWithCtxConfigMulticastSetPromiscuousModeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ status, err_ := s_.Impl.ConfigMulticastSetPromiscuousMode(args_.Ctx, in_.Enabled)
+ out_ := deviceWithCtxConfigMulticastSetPromiscuousModeResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case DeviceConfigMulticastTestFilterOrdinal:
+ status, err_ := s_.Impl.ConfigMulticastTestFilter(args_.Ctx)
+ out_ := deviceWithCtxConfigMulticastTestFilterResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case DeviceDumpRegistersOrdinal:
+ status, err_ := s_.Impl.DumpRegisters(args_.Ctx)
+ out_ := deviceWithCtxDumpRegistersResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DeviceEventProxy _bindings.ChannelProxy
diff --git a/src/syscall/zx/hardware/network/impl.go b/src/syscall/zx/hardware/network/impl.go
new file mode 100644
index 0000000..a33ccb1
--- /dev/null
+++ b/src/syscall/zx/hardware/network/impl.go
@@ -0,0 +1,1800 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package network
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+ fuchsianet "syscall/zx/net"
+)
+
+const (
+ // Maximum numbers of supported frame types for rx or tx.
+ MaxFrameTypes uint32 = 4
+ // Maximum length of session label.
+ MaxSessionName uint32 = 64
+ // Maximum number of acceleration flags.
+ // Each descriptor has 16 bits of space for acceleration flags
+ // ([`fuchsia.hardware.network/RxFlags`] and [`fuchsia.hardware.network/TxFlags`]) thus the maximum
+ // number of reported accelerations is 16. Each descriptor reports which accelerations were applied
+ // (`RxFlags`) or are requested (`TxFlags`) by mapping indexes in the vector of supported
+ // accelerations ([`fuchsia.hardware.network/Info.rx_accel`] and
+ // ([`fuchsia.hardware.network/Info.tx_accel`]) to bits in the respective acceleration flags
+ // bitfield.
+ MaxAccelFlags uint32 = 16
+ // The maximum number of status samples that can be buffered by a
+ // [`fuchsia.hardware.network/StatusWatcher`].
+ MaxStatusBuffer uint32 = 50
+ // Blanket definition for raw frames. Devices that do not perform any sort of parsing of outbound
+ // traffic should define `FRAME_FEATURES_RAW` in the [`fuchsia.hardware.network/FrameTypeSupport`]
+ // entry.
+ FrameFeaturesRaw uint32 = 1
+ // Maximum number of chained descriptors that describe a single frame.
+ MaxDescriptorChain uint8 = 4
+)
+
+var _ _bindings.Enum = DeviceClass(0)
+
+// Network device class.
+// The network device's class is part of its [`fuchsia.hardware.network/Info`] reporting and can be
+// used by tools that enumerate network devices to present human-readable types, so it is easier
+// for a user to identify the listed devices. The [`fuchsia.hardware.network/Info.class`] value
+// does not imply any kind of capabilities or behavior.
+type DeviceClass uint16
+
+const (
+ DeviceClassUnknown DeviceClass = 0
+ DeviceClassEthernet DeviceClass = 1
+ DeviceClassWlan DeviceClass = 2
+ DeviceClassPpp DeviceClass = 3
+ DeviceClassBridge DeviceClass = 4
+)
+
+func (_ DeviceClass) I_EnumValues() []DeviceClass {
+ return []DeviceClass{
+ DeviceClassUnknown,
+ DeviceClassEthernet,
+ DeviceClassWlan,
+ DeviceClassPpp,
+ DeviceClassBridge,
+ }
+}
+
+func (_ DeviceClass) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x DeviceClass) IsUnknown() bool {
+ switch x {
+ case 0:
+ return true
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ case 4:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x DeviceClass) String() string {
+ switch x {
+ case 0:
+ return "Unknown"
+ case 1:
+ return "Ethernet"
+ case 2:
+ return "Wlan"
+ case 3:
+ return "Ppp"
+ case 4:
+ return "Bridge"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = FrameType(0)
+
+// Types of frames.
+type FrameType uint8
+
+const (
+ FrameTypeEthernet FrameType = 1
+ FrameTypeIpv4 FrameType = 2
+ FrameTypeIpv6 FrameType = 3
+)
+
+func (_ FrameType) I_EnumValues() []FrameType {
+ return []FrameType{
+ FrameTypeEthernet,
+ FrameTypeIpv4,
+ FrameTypeIpv6,
+ }
+}
+
+func (_ FrameType) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x FrameType) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x FrameType) String() string {
+ switch x {
+ case 1:
+ return "Ethernet"
+ case 2:
+ return "Ipv4"
+ case 3:
+ return "Ipv6"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = InfoType(0)
+
+// The type of metadata information appended to a frame, included in the descriptors VMO.
+type InfoType uint32
+
+const (
+
+ // No extra information is available.
+ InfoTypeNoInfo InfoType = 0
+)
+
+func (_ InfoType) I_EnumValues() []InfoType {
+ return []InfoType{
+ InfoTypeNoInfo,
+ }
+}
+
+func (_ InfoType) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x InfoType) IsUnknown() bool {
+ switch x {
+ case 0:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x InfoType) String() string {
+ switch x {
+ case 0:
+ return "NoInfo"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = RxAcceleration(0)
+
+// Available rx acceleration features. Features are mapped to the `RX_ACCEL_*` bits in descriptors
+// by the available values reported in [`fuchsia.hardware.network/Info.rx_accel`].
+type RxAcceleration uint8
+
+const (
+
+ // Inbound rx frame validated the Ethernet Frame Check Sequence.
+ RxAccelerationValidatedEthernetFcs RxAcceleration = 0
+
+ // Inbound rx frame validated the IPv4 checksum.
+ RxAccelerationValidatedIpv4Checksum RxAcceleration = 1
+
+ // Inbound rx frame validated the TCP checksum.
+ RxAccelerationValidatedTcpChecksum RxAcceleration = 2
+
+ // Inbound rx frame validated the UDP checksum.
+ RxAccelerationValidatedUdpChecksum RxAcceleration = 3
+)
+
+func (_ RxAcceleration) I_EnumValues() []RxAcceleration {
+ return []RxAcceleration{
+ RxAccelerationValidatedEthernetFcs,
+ RxAccelerationValidatedIpv4Checksum,
+ RxAccelerationValidatedTcpChecksum,
+ RxAccelerationValidatedUdpChecksum,
+ }
+}
+
+func (_ RxAcceleration) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x RxAcceleration) IsUnknown() bool {
+ switch x {
+ case 0:
+ return true
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x RxAcceleration) String() string {
+ switch x {
+ case 0:
+ return "ValidatedEthernetFcs"
+ case 1:
+ return "ValidatedIpv4Checksum"
+ case 2:
+ return "ValidatedTcpChecksum"
+ case 3:
+ return "ValidatedUdpChecksum"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = TxAcceleration(0)
+
+// Available tx acceleration features. Features are mapped to the `TX_ACCEL_*` bits in descriptors
+// by the available values reported in [`fuchsia.hardware.network/Info.tx_accel`].
+type TxAcceleration uint8
+
+const (
+
+ // Request that device calculate the Ethernet Frame Check Sequence and write it in place.
+ TxAccelerationComputeEthernetFcs TxAcceleration = 0
+
+ // Request that the device calculate the IPv4 checksum and write it in place.
+ TxAccelerationComputeIpv4Checksum TxAcceleration = 1
+
+ // Request that the device calculate the TCP checksum and write it in place.
+ TxAccelerationComputeTcpChecksum TxAcceleration = 2
+
+ // Request that the device calculate the UDP checksum and write it in place.
+ TxAccelerationComputeUdpChecksum TxAcceleration = 3
+)
+
+func (_ TxAcceleration) I_EnumValues() []TxAcceleration {
+ return []TxAcceleration{
+ TxAccelerationComputeEthernetFcs,
+ TxAccelerationComputeIpv4Checksum,
+ TxAccelerationComputeTcpChecksum,
+ TxAccelerationComputeUdpChecksum,
+ }
+}
+
+func (_ TxAcceleration) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x TxAcceleration) IsUnknown() bool {
+ switch x {
+ case 0:
+ return true
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x TxAcceleration) String() string {
+ switch x {
+ case 0:
+ return "ComputeEthernetFcs"
+ case 1:
+ return "ComputeIpv4Checksum"
+ case 2:
+ return "ComputeTcpChecksum"
+ case 3:
+ return "ComputeUdpChecksum"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = MacFilterMode(0)
+
+// The address filtering mode supported by MAC devices.
+type MacFilterMode uint32
+
+const (
+
+ // Device accepts only unicast frames addressed to its own unicast address, or multicast frames
+ // that are part of the multicast address filter list.
+ MacFilterModeMulticastFilter MacFilterMode = 0
+
+ // Device accepts unicast frames addressed to its own unicast address, or any multicast frames.
+ MacFilterModeMulticastPromiscuous MacFilterMode = 1
+
+ // Device accepts all frames.
+ MacFilterModePromiscuous MacFilterMode = 2
+)
+
+func (_ MacFilterMode) I_EnumValues() []MacFilterMode {
+ return []MacFilterMode{
+ MacFilterModeMulticastFilter,
+ MacFilterModeMulticastPromiscuous,
+ MacFilterModePromiscuous,
+ }
+}
+
+func (_ MacFilterMode) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x MacFilterMode) IsUnknown() bool {
+ switch x {
+ case 0:
+ return true
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x MacFilterMode) String() string {
+ switch x {
+ case 0:
+ return "MulticastFilter"
+ case 1:
+ return "MulticastPromiscuous"
+ case 2:
+ return "Promiscuous"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = StatusFlags(0)
+
+// Device status bits, reported in [`fuchsia.hardware.network/Info`].
+type StatusFlags uint32
+
+const (
+ StatusFlagsOnline StatusFlags = 1
+ StatusFlags_Mask StatusFlags = 1
+)
+
+func (_ StatusFlags) I_BitsMask() StatusFlags {
+ return StatusFlags_Mask
+}
+
+func (_ StatusFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x StatusFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x StatusFlags) GetUnknownBits() uint64 {
+ return uint64(^StatusFlags_Mask & x)
+}
+
+func (x StatusFlags) InvertBits() StatusFlags {
+ return StatusFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x StatusFlags) HasBits(mask StatusFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x StatusFlags) ClearBits(mask StatusFlags) StatusFlags {
+ return ^mask & x
+}
+
+func (x StatusFlags) String() string {
+ switch x {
+ case 1:
+ return "Online"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = EthernetFeatures(0)
+
+// Ethernet frame sub-types and features.
+type EthernetFeatures uint32
+
+const (
+ EthernetFeaturesRaw EthernetFeatures = 1
+ EthernetFeaturesEthernetIi EthernetFeatures = 2
+ EthernetFeaturesE8021Q EthernetFeatures = 4
+ EthernetFeaturesE8021QInQ EthernetFeatures = 8
+ EthernetFeaturesE8023LlcSnap EthernetFeatures = 16
+ EthernetFeatures_Mask EthernetFeatures = 31
+)
+
+func (_ EthernetFeatures) I_BitsMask() EthernetFeatures {
+ return EthernetFeatures_Mask
+}
+
+func (_ EthernetFeatures) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x EthernetFeatures) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x EthernetFeatures) GetUnknownBits() uint64 {
+ return uint64(^EthernetFeatures_Mask & x)
+}
+
+func (x EthernetFeatures) InvertBits() EthernetFeatures {
+ return EthernetFeatures_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x EthernetFeatures) HasBits(mask EthernetFeatures) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x EthernetFeatures) ClearBits(mask EthernetFeatures) EthernetFeatures {
+ return ^mask & x
+}
+
+func (x EthernetFeatures) String() string {
+ switch x {
+ case 1:
+ return "Raw"
+ case 2:
+ return "EthernetIi"
+ case 4:
+ return "E8021Q"
+ case 8:
+ return "E8021QInQ"
+ case 16:
+ return "E8023LlcSnap"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = RxFlags(0)
+
+// Flags set by a Device when handing a buffer to a client on the rx path. Set by devices on the
+// `inbound_flags` field of an rx descriptor.
+type RxFlags uint32
+
+const (
+ RxFlagsRxAccel0 RxFlags = 1
+ RxFlagsRxAccel1 RxFlags = 2
+ RxFlagsRxAccel2 RxFlags = 4
+ RxFlagsRxAccel3 RxFlags = 8
+ RxFlagsRxAccel4 RxFlags = 16
+ RxFlagsRxAccel5 RxFlags = 32
+ RxFlagsRxAccel6 RxFlags = 64
+ RxFlagsRxAccel7 RxFlags = 128
+ RxFlagsRxAccel8 RxFlags = 256
+ RxFlagsRxAccel9 RxFlags = 512
+ RxFlagsRxAccel10 RxFlags = 1024
+ RxFlagsRxAccel11 RxFlags = 2048
+ RxFlagsRxAccel12 RxFlags = 4096
+ RxFlagsRxAccel13 RxFlags = 8192
+ RxFlagsRxAccel14 RxFlags = 16384
+ RxFlagsRxAccel15 RxFlags = 32768
+ RxFlagsRxOverrun RxFlags = 536870912
+ RxFlagsRxValidationError RxFlags = 1073741824
+ RxFlagsRxEchoedTx RxFlags = 2147483648
+ RxFlags_Mask RxFlags = 3758161919
+)
+
+func (_ RxFlags) I_BitsMask() RxFlags {
+ return RxFlags_Mask
+}
+
+func (_ RxFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x RxFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x RxFlags) GetUnknownBits() uint64 {
+ return uint64(^RxFlags_Mask & x)
+}
+
+func (x RxFlags) InvertBits() RxFlags {
+ return RxFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x RxFlags) HasBits(mask RxFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x RxFlags) ClearBits(mask RxFlags) RxFlags {
+ return ^mask & x
+}
+
+func (x RxFlags) String() string {
+ switch x {
+ case 1:
+ return "RxAccel0"
+ case 2:
+ return "RxAccel1"
+ case 4:
+ return "RxAccel2"
+ case 8:
+ return "RxAccel3"
+ case 16:
+ return "RxAccel4"
+ case 32:
+ return "RxAccel5"
+ case 64:
+ return "RxAccel6"
+ case 128:
+ return "RxAccel7"
+ case 256:
+ return "RxAccel8"
+ case 512:
+ return "RxAccel9"
+ case 1024:
+ return "RxAccel10"
+ case 2048:
+ return "RxAccel11"
+ case 4096:
+ return "RxAccel12"
+ case 8192:
+ return "RxAccel13"
+ case 16384:
+ return "RxAccel14"
+ case 32768:
+ return "RxAccel15"
+ case 536870912:
+ return "RxOverrun"
+ case 1073741824:
+ return "RxValidationError"
+ case 2147483648:
+ return "RxEchoedTx"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = TxFlags(0)
+
+// Flags set by a Client when handing a buffer to a client on the tx path. Set by Clients on the
+// `inbound_flags` field of a tx descriptor.
+type TxFlags uint32
+
+const (
+ TxFlagsTxAccel0 TxFlags = 1
+ TxFlagsTxAccel1 TxFlags = 2
+ TxFlagsTxAccel2 TxFlags = 4
+ TxFlagsTxAccel3 TxFlags = 8
+ TxFlagsTxAccel4 TxFlags = 16
+ TxFlagsTxAccel5 TxFlags = 32
+ TxFlagsTxAccel6 TxFlags = 64
+ TxFlagsTxAccel7 TxFlags = 128
+ TxFlagsTxAccel8 TxFlags = 256
+ TxFlagsTxAccel9 TxFlags = 512
+ TxFlagsTxAccel10 TxFlags = 1024
+ TxFlagsTxAccel11 TxFlags = 2048
+ TxFlagsTxAccel12 TxFlags = 4096
+ TxFlagsTxAccel13 TxFlags = 8192
+ TxFlagsTxAccel14 TxFlags = 16384
+ TxFlagsTxAccel15 TxFlags = 32768
+ TxFlags_Mask TxFlags = 65535
+)
+
+func (_ TxFlags) I_BitsMask() TxFlags {
+ return TxFlags_Mask
+}
+
+func (_ TxFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x TxFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x TxFlags) GetUnknownBits() uint64 {
+ return uint64(^TxFlags_Mask & x)
+}
+
+func (x TxFlags) InvertBits() TxFlags {
+ return TxFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x TxFlags) HasBits(mask TxFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x TxFlags) ClearBits(mask TxFlags) TxFlags {
+ return ^mask & x
+}
+
+func (x TxFlags) String() string {
+ switch x {
+ case 1:
+ return "TxAccel0"
+ case 2:
+ return "TxAccel1"
+ case 4:
+ return "TxAccel2"
+ case 8:
+ return "TxAccel3"
+ case 16:
+ return "TxAccel4"
+ case 32:
+ return "TxAccel5"
+ case 64:
+ return "TxAccel6"
+ case 128:
+ return "TxAccel7"
+ case 256:
+ return "TxAccel8"
+ case 512:
+ return "TxAccel9"
+ case 1024:
+ return "TxAccel10"
+ case 2048:
+ return "TxAccel11"
+ case 4096:
+ return "TxAccel12"
+ case 8192:
+ return "TxAccel13"
+ case 16384:
+ return "TxAccel14"
+ case 32768:
+ return "TxAccel15"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = TxReturnFlags(0)
+
+// Flags set by a Device when returning a tx buffer back to a client. Set by Devices on the
+// `return_flags` field of a tx descriptor.
+type TxReturnFlags uint32
+
+const (
+ TxReturnFlagsTxRetNotSupported TxReturnFlags = 1
+ TxReturnFlagsTxRetOutOfResources TxReturnFlags = 2
+ TxReturnFlagsTxRetNotAvailable TxReturnFlags = 4
+ TxReturnFlagsTxRetError TxReturnFlags = 2147483648
+ TxReturnFlags_Mask TxReturnFlags = 2147483655
+)
+
+func (_ TxReturnFlags) I_BitsMask() TxReturnFlags {
+ return TxReturnFlags_Mask
+}
+
+func (_ TxReturnFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x TxReturnFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x TxReturnFlags) GetUnknownBits() uint64 {
+ return uint64(^TxReturnFlags_Mask & x)
+}
+
+func (x TxReturnFlags) InvertBits() TxReturnFlags {
+ return TxReturnFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x TxReturnFlags) HasBits(mask TxReturnFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x TxReturnFlags) ClearBits(mask TxReturnFlags) TxReturnFlags {
+ return ^mask & x
+}
+
+func (x TxReturnFlags) String() string {
+ switch x {
+ case 1:
+ return "TxRetNotSupported"
+ case 2:
+ return "TxRetOutOfResources"
+ case 4:
+ return "TxRetNotAvailable"
+ case 2147483648:
+ return "TxRetError"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = SessionFlags(0)
+
+// Additional session options.
+type SessionFlags uint16
+
+const (
+ SessionFlagsPrimary SessionFlags = 1
+ SessionFlagsListenTx SessionFlags = 2
+ SessionFlagsReportInvalidRx SessionFlags = 4
+ SessionFlags_Mask SessionFlags = 7
+)
+
+func (_ SessionFlags) I_BitsMask() SessionFlags {
+ return SessionFlags_Mask
+}
+
+func (_ SessionFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x SessionFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x SessionFlags) GetUnknownBits() uint64 {
+ return uint64(^SessionFlags_Mask & x)
+}
+
+func (x SessionFlags) InvertBits() SessionFlags {
+ return SessionFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x SessionFlags) HasBits(mask SessionFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x SessionFlags) ClearBits(mask SessionFlags) SessionFlags {
+ return ^mask & x
+}
+
+func (x SessionFlags) String() string {
+ switch x {
+ case 1:
+ return "Primary"
+ case 2:
+ return "ListenTx"
+ case 4:
+ return "ReportInvalidRx"
+ }
+ return "Unknown"
+}
+
+type DeviceOpenSessionResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"12" fidl_alignment_v1:"4"`
+ Session SessionWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+ Fifos Fifos `fidl_offset_v1:"4"`
+}
+
+var _mDeviceOpenSessionResponse = _bindings.CreateLazyMarshaler(DeviceOpenSessionResponse{})
+
+func (msg *DeviceOpenSessionResponse) Marshaler() _bindings.Marshaler {
+ return _mDeviceOpenSessionResponse
+}
+
+// Network device information.
+type Info struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"96" fidl_alignment_v1:"8"`
+ // Device's class, defined in [`fuchsia.hardware.network/DeviceClass`].
+ Class DeviceClass `fidl_offset_v1:"0"`
+ // Minimum descriptor length, in 64-bit words.
+ // Expresses the minimum length that each buffer descriptor must have for correct operation
+ // with this device. Devices that support extra frame metadata inform larger minimum descriptor
+ // lengths that reflect the minimum space needed to be able to store frame metadata.
+ MinDescriptorLength uint8 `fidl_offset_v1:"2"`
+ // Accepted descriptor version.
+ DescriptorVersion uint8 `fidl_offset_v1:"3"`
+ // Maximum number of items in rx FIFO (per session).
+ // `rx_depth` is calculated based on the size of the actual backing hardware rx queue.
+ RxDepth uint16 `fidl_offset_v1:"4"`
+ // Maximum number of items in tx FIFO (per session).
+ // `tx_depth` is calculated based on the size of the actual backing hardware tx queue.
+ TxDepth uint16 `fidl_offset_v1:"6"`
+ // Alignment requirement for buffers in the data VMO. All buffers in the data VMO *must* be
+ // aligned to `buffer_alignment` relative to the start of the VMO. `buffer_alignment == 0` is
+ // never reported.
+ BufferAlignment uint32 `fidl_offset_v1:"8"`
+ // Maximum supported length of buffers in the data VMO, in bytes.
+ MaxBufferLength uint32 `fidl_offset_v1:"12"`
+ // The minimum rx buffer length required for device.
+ MinRxBufferLength uint32 `fidl_offset_v1:"16"`
+ // The minimum tx buffer length required for the device.
+ //
+ // This value accounts only for tx payload length, `min_tx_buffer_head` and
+ // `min_tx_buffer_tail` are not part of this value.
+ //
+ // Clients must zero pad outgoing frames to meet the required minimum length.
+ MinTxBufferLength uint32 `fidl_offset_v1:"20"`
+ // The number of bytes the device requests be free as `head` space in a tx buffer.
+ MinTxBufferHead uint16 `fidl_offset_v1:"24"`
+ // The amount of bytes the device requests be free as `tail` space in a tx buffer.
+ MinTxBufferTail uint16 `fidl_offset_v1:"26"`
+ // Supported rx frame types on this device.
+ //
+ // Clients may open sessions subscribing to a subset of `rx_types` frame types on this device.
+ // Clients will only receive the frame types they are subscribed to in this session
+ RxTypes []FrameType `fidl_offset_v1:"32" fidl_bounds:"4"`
+ // Supported tx frame types on this device.
+ //
+ // A client is free to send any frame type on an open session, as long as the frame type is
+ // part of `tx_types`. Some network devices may need to perform partial frame parsing and
+ // serialization and, for that reason, `tx_types` is a vector of
+ // [`fuchsia.hardware.network/FrameTypeSupport`] which includes specific features per frame
+ // type.
+ //
+ // For example, a device that supports Ethernet frames but needs to convert the Ethernet header
+ // may only support standard EthernetII frames, and not any "raw" Ethernet frame.
+ TxTypes []FrameTypeSupport `fidl_offset_v1:"48" fidl_bounds:"4"`
+ // Available rx acceleration flags for this device. `rx_accel` maps the `RX_ACCEL_*` flags in
+ // the frame descriptors with semantic acceleration features described by
+ // [`fuchsia.hardware.network/RxAcceleration`]. Position `n` of `rx_accel` conveys the meaning
+ // of the `RX_ACCEL_n` flag.
+ RxAccel []RxAcceleration `fidl_offset_v1:"64" fidl_bounds:"16"`
+ // Available tx acceleration flags for this device. `tx_accel` maps the `TX_ACCEL_*` flags in
+ // the frame descriptors with semantic acceleration features described by
+ // [`fuchsia.hardware.network/TxAcceleration]`. Position `n` of `tx_accel` conveys the meaning
+ // of the `TX_ACCEL_n` flag.
+ TxAccel []TxAcceleration `fidl_offset_v1:"80" fidl_bounds:"16"`
+}
+
+var _mInfo = _bindings.CreateLazyMarshaler(Info{})
+
+func (msg *Info) Marshaler() _bindings.Marshaler {
+ return _mInfo
+}
+
+// Specifies a frame type and features and supported flags associated with that type.
+// This is used by clients to read the supported frames on the tx path for a given
+// Network Device.
+// Some Network Devices may parse outgoing frames to perform frame transformation or specific
+// hardware support. Each frame type has an associated
+// [`fuchsia.hardware.network/FrameTypeSupport.features`] bits enumeration that lists
+// FrameType-specific features that may or may not be supported. Devices that do not perform
+// parsing are encouraged to just use the [`fuchsia.hardware.network/FRAME_FEATURES_RAW`] bit in
+// `features`, which will inform the client that all frame features are allowed.
+type FrameTypeSupport struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"12" fidl_alignment_v1:"4"`
+ // The frame type this support entry refers to.
+ Type FrameType `fidl_offset_v1:"0"`
+ // The frame type-specific features supported.
+ Features uint32 `fidl_offset_v1:"4"`
+ // The flags supported for the given frame type.
+ SupportedFlags TxFlags `fidl_offset_v1:"8"`
+}
+
+var _mFrameTypeSupport = _bindings.CreateLazyMarshaler(FrameTypeSupport{})
+
+func (msg *FrameTypeSupport) Marshaler() _bindings.Marshaler {
+ return _mFrameTypeSupport
+}
+
+// Data-plane FIFOs.
+type Fifos struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"4"`
+ // Handle for the rx FIFO.
+ // Clients must write 16-bit descriptor indexes to this FIFO to be able to receive
+ // frames.
+ Rx _zx.Handle `fidl_offset_v1:"0" fidl_handle_subtype:"19" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ // Handle for the tx FIFO.
+ // Clients write 16-bit descriptor indexes to this FIFO to enqueue outgoing frames.
+ Tx _zx.Handle `fidl_offset_v1:"4" fidl_handle_subtype:"19" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mFifos = _bindings.CreateLazyMarshaler(Fifos{})
+
+func (msg *Fifos) Marshaler() _bindings.Marshaler {
+ return _mFifos
+}
+
+// Session configuration.
+type SessionInfo struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ // VMO containing the descriptors. 16-bit indices transmitted over the FIFOs index a descriptor
+ // in this VMO (byte offset = descriptor_length * 8 * index).
+ Descriptors _zx.VMO `fidl_offset_v1:"0" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ // VMO containing frame data. Descriptors contain byte-offsets that are used to index
+ // arbitrary regions in `data`.
+ Data _zx.VMO `fidl_offset_v1:"4" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ // Requested descriptor version. If the network device does not support the requested
+ // descriptor version, [`fuchsia.hardware.network/Device.OpenSession`] will fail with
+ // `ZX_ERR_NOT_SUPPORTED`.
+ DescriptorVersion uint8 `fidl_offset_v1:"8"`
+ // Descriptor length, in 64-bit words. The length of each descriptor in the `descriptors` VMO.
+ // This is used as a multiplier to find byte offsets in `descriptors` given a descriptor index
+ // passed through the rx or tx FIFOs.
+ DescriptorLength uint8 `fidl_offset_v1:"9"`
+ // Total number of descriptors that can be used by this session. Descriptor indices transferred
+ // through either the rx or tx FIFO must be in the range [0, `descriptor_count`).
+ DescriptorCount uint16 `fidl_offset_v1:"10"`
+ // Extra options.
+ Options SessionFlags `fidl_offset_v1:"12"`
+ // List of frame types the client is subscribing to.
+ RxFrames []FrameType `fidl_offset_v1:"16" fidl_bounds:"4"`
+}
+
+var _mSessionInfo = _bindings.CreateLazyMarshaler(SessionInfo{})
+
+func (msg *SessionInfo) Marshaler() _bindings.Marshaler {
+ return _mSessionInfo
+}
+
+type statusWatcherWithCtxWatchStatusResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ DeviceStatus Status `fidl_offset_v1:"0"`
+}
+
+var _mstatusWatcherWithCtxWatchStatusResponse = _bindings.CreateLazyMarshaler(statusWatcherWithCtxWatchStatusResponse{})
+
+func (msg *statusWatcherWithCtxWatchStatusResponse) Marshaler() _bindings.Marshaler {
+ return _mstatusWatcherWithCtxWatchStatusResponse
+}
+
+type deviceWithCtxGetInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"96" fidl_alignment_v1:"8"`
+ Info Info `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxGetInfoResponse = _bindings.CreateLazyMarshaler(deviceWithCtxGetInfoResponse{})
+
+func (msg *deviceWithCtxGetInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxGetInfoResponse
+}
+
+type deviceWithCtxGetStatusResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ DeviceStatus Status `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxGetStatusResponse = _bindings.CreateLazyMarshaler(deviceWithCtxGetStatusResponse{})
+
+func (msg *deviceWithCtxGetStatusResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxGetStatusResponse
+}
+
+type deviceWithCtxGetStatusWatcherRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Watcher StatusWatcherWithCtxInterfaceRequest `fidl_offset_v1:"0" fidl_handle_subtype:"4" fidl_bounds:"0"`
+ Buffer uint32 `fidl_offset_v1:"4"`
+}
+
+var _mdeviceWithCtxGetStatusWatcherRequest = _bindings.CreateLazyMarshaler(deviceWithCtxGetStatusWatcherRequest{})
+
+func (msg *deviceWithCtxGetStatusWatcherRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxGetStatusWatcherRequest
+}
+
+type deviceWithCtxOpenSessionRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"48" fidl_alignment_v1:"8"`
+ SessionName string `fidl_offset_v1:"0" fidl_bounds:"64"`
+ SessionInfo SessionInfo `fidl_offset_v1:"16"`
+}
+
+var _mdeviceWithCtxOpenSessionRequest = _bindings.CreateLazyMarshaler(deviceWithCtxOpenSessionRequest{})
+
+func (msg *deviceWithCtxOpenSessionRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxOpenSessionRequest
+}
+
+type deviceWithCtxOpenSessionResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result DeviceOpenSessionResult `fidl_offset_v1:"0"`
+}
+
+var _mdeviceWithCtxOpenSessionResponse = _bindings.CreateLazyMarshaler(deviceWithCtxOpenSessionResponse{})
+
+func (msg *deviceWithCtxOpenSessionResponse) Marshaler() _bindings.Marshaler {
+ return _mdeviceWithCtxOpenSessionResponse
+}
+
+type deviceInstanceWithCtxGetDeviceRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Device DeviceWithCtxInterfaceRequest `fidl_offset_v1:"0" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mdeviceInstanceWithCtxGetDeviceRequest = _bindings.CreateLazyMarshaler(deviceInstanceWithCtxGetDeviceRequest{})
+
+func (msg *deviceInstanceWithCtxGetDeviceRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceInstanceWithCtxGetDeviceRequest
+}
+
+type deviceInstanceWithCtxGetMacAddressingRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Mac MacAddressingWithCtxInterfaceRequest `fidl_offset_v1:"0" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mdeviceInstanceWithCtxGetMacAddressingRequest = _bindings.CreateLazyMarshaler(deviceInstanceWithCtxGetMacAddressingRequest{})
+
+func (msg *deviceInstanceWithCtxGetMacAddressingRequest) Marshaler() _bindings.Marshaler {
+ return _mdeviceInstanceWithCtxGetMacAddressingRequest
+}
+
+type macAddressingWithCtxGetUnicastAddressResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Address fuchsianet.MacAddress `fidl_offset_v1:"0"`
+}
+
+var _mmacAddressingWithCtxGetUnicastAddressResponse = _bindings.CreateLazyMarshaler(macAddressingWithCtxGetUnicastAddressResponse{})
+
+func (msg *macAddressingWithCtxGetUnicastAddressResponse) Marshaler() _bindings.Marshaler {
+ return _mmacAddressingWithCtxGetUnicastAddressResponse
+}
+
+type macAddressingWithCtxSetModeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Mode MacFilterMode `fidl_offset_v1:"0"`
+}
+
+var _mmacAddressingWithCtxSetModeRequest = _bindings.CreateLazyMarshaler(macAddressingWithCtxSetModeRequest{})
+
+func (msg *macAddressingWithCtxSetModeRequest) Marshaler() _bindings.Marshaler {
+ return _mmacAddressingWithCtxSetModeRequest
+}
+
+type macAddressingWithCtxSetModeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mmacAddressingWithCtxSetModeResponse = _bindings.CreateLazyMarshaler(macAddressingWithCtxSetModeResponse{})
+
+func (msg *macAddressingWithCtxSetModeResponse) Marshaler() _bindings.Marshaler {
+ return _mmacAddressingWithCtxSetModeResponse
+}
+
+type macAddressingWithCtxAddMulticastAddressRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Address fuchsianet.MacAddress `fidl_offset_v1:"0"`
+}
+
+var _mmacAddressingWithCtxAddMulticastAddressRequest = _bindings.CreateLazyMarshaler(macAddressingWithCtxAddMulticastAddressRequest{})
+
+func (msg *macAddressingWithCtxAddMulticastAddressRequest) Marshaler() _bindings.Marshaler {
+ return _mmacAddressingWithCtxAddMulticastAddressRequest
+}
+
+type macAddressingWithCtxAddMulticastAddressResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mmacAddressingWithCtxAddMulticastAddressResponse = _bindings.CreateLazyMarshaler(macAddressingWithCtxAddMulticastAddressResponse{})
+
+func (msg *macAddressingWithCtxAddMulticastAddressResponse) Marshaler() _bindings.Marshaler {
+ return _mmacAddressingWithCtxAddMulticastAddressResponse
+}
+
+type macAddressingWithCtxRemoveMulticastAddressRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Address fuchsianet.MacAddress `fidl_offset_v1:"0"`
+}
+
+var _mmacAddressingWithCtxRemoveMulticastAddressRequest = _bindings.CreateLazyMarshaler(macAddressingWithCtxRemoveMulticastAddressRequest{})
+
+func (msg *macAddressingWithCtxRemoveMulticastAddressRequest) Marshaler() _bindings.Marshaler {
+ return _mmacAddressingWithCtxRemoveMulticastAddressRequest
+}
+
+type macAddressingWithCtxRemoveMulticastAddressResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Status int32 `fidl_offset_v1:"0"`
+}
+
+var _mmacAddressingWithCtxRemoveMulticastAddressResponse = _bindings.CreateLazyMarshaler(macAddressingWithCtxRemoveMulticastAddressResponse{})
+
+func (msg *macAddressingWithCtxRemoveMulticastAddressResponse) Marshaler() _bindings.Marshaler {
+ return _mmacAddressingWithCtxRemoveMulticastAddressResponse
+}
+
+type sessionWithCtxSetPausedRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Paused bool `fidl_offset_v1:"0"`
+}
+
+var _msessionWithCtxSetPausedRequest = _bindings.CreateLazyMarshaler(sessionWithCtxSetPausedRequest{})
+
+func (msg *sessionWithCtxSetPausedRequest) Marshaler() _bindings.Marshaler {
+ return _msessionWithCtxSetPausedRequest
+}
+
+type I_deviceOpenSessionResultTag uint64
+
+const (
+ DeviceOpenSessionResultResponse = 1 // 0x00000001
+ DeviceOpenSessionResultErr = 2 // 0x00000002
+)
+
+type DeviceOpenSessionResult struct {
+ I_deviceOpenSessionResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response DeviceOpenSessionResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *DeviceOpenSessionResult) reset() {
+ switch _m.I_deviceOpenSessionResultTag {
+ case 1:
+ var _zeroed DeviceOpenSessionResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *DeviceOpenSessionResult) Which() I_deviceOpenSessionResultTag {
+ return _m.I_deviceOpenSessionResultTag
+}
+
+func (_m *DeviceOpenSessionResult) Ordinal() uint64 {
+ return uint64(_m.I_deviceOpenSessionResultTag)
+}
+
+func (_m *DeviceOpenSessionResult) SetResponse(response DeviceOpenSessionResponse) {
+ _m.reset()
+ _m.I_deviceOpenSessionResultTag = DeviceOpenSessionResultResponse
+ _m.Response = response
+}
+
+func DeviceOpenSessionResultWithResponse(response DeviceOpenSessionResponse) DeviceOpenSessionResult {
+ var _u DeviceOpenSessionResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *DeviceOpenSessionResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_deviceOpenSessionResultTag = DeviceOpenSessionResultErr
+ _m.Err = err
+}
+
+func DeviceOpenSessionResultWithErr(err int32) DeviceOpenSessionResult {
+ var _u DeviceOpenSessionResult
+ _u.SetErr(err)
+ return _u
+}
+
+// Dynamic device information.
+type Status struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // Device status flags.
+ Flags StatusFlags `fidl_ordinal:"1"`
+ FlagsPresent bool
+ // Maximum transmit unit for this device, in bytes. The reported `MTU` is the size of an ENTIRE
+ // frame, including any header and trailer bytes for whatever protocol the
+ // [`fuchsia.hardware.network/FrameType`]s of this device support.
+ Mtu uint32 `fidl_ordinal:"2"`
+ MtuPresent bool
+}
+
+func (u *Status) SetFlags(flags StatusFlags) {
+ u.Flags = flags
+ u.FlagsPresent = true
+}
+
+func (u *Status) GetFlags() StatusFlags {
+ return u.Flags
+}
+
+func (u *Status) GetFlagsWithDefault(_default StatusFlags) StatusFlags {
+ if !u.HasFlags() {
+ return _default
+ }
+ return u.Flags
+}
+
+func (u *Status) HasFlags() bool {
+ return u.FlagsPresent
+}
+
+func (u *Status) ClearFlags() {
+ u.FlagsPresent = false
+}
+
+func (u *Status) SetMtu(mtu uint32) {
+ u.Mtu = mtu
+ u.MtuPresent = true
+}
+
+func (u *Status) GetMtu() uint32 {
+ return u.Mtu
+}
+
+func (u *Status) GetMtuWithDefault(_default uint32) uint32 {
+ if !u.HasMtu() {
+ return _default
+ }
+ return u.Mtu
+}
+
+func (u *Status) HasMtu() bool {
+ return u.MtuPresent
+}
+
+func (u *Status) ClearMtu() {
+ u.MtuPresent = false
+}
+
+func (u *Status) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *Status) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+const (
+ StatusWatcherWatchStatusOrdinal uint64 = 0x1369a8125c0862b9
+)
+
+type StatusWatcherWithCtxInterface _bindings.ChannelProxy
+
+// `WatchStatus` will block until the device's status has changed.
+// The first call to `WatchStatus` will always return immediately with the current device
+// status, subsequent calls will only complete when the device status differs from the last one
+// that was returned through this `StatusWatcher`.
+// If `StatusWatcher` was created with a buffer value larger than 1, `WatchStatus` may return a
+// queued status change, depending on how many status changed happened since the last call to
+// `WatchStatus`.
+func (p *StatusWatcherWithCtxInterface) WatchStatus(ctx_ _bindings.Context) (Status, error) {
+ var req_ _bindings.Message
+ resp_ := &statusWatcherWithCtxWatchStatusResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StatusWatcherWatchStatusOrdinal, req_, resp_)
+ return resp_.DeviceStatus, err_
+}
+
+// Provides a way to receive updates on device status changes.
+type StatusWatcherWithCtx interface {
+ // `WatchStatus` will block until the device's status has changed.
+ // The first call to `WatchStatus` will always return immediately with the current device
+ // status, subsequent calls will only complete when the device status differs from the last one
+ // that was returned through this `StatusWatcher`.
+ // If `StatusWatcher` was created with a buffer value larger than 1, `WatchStatus` may return a
+ // queued status change, depending on how many status changed happened since the last call to
+ // `WatchStatus`.
+ WatchStatus(ctx_ _bindings.Context) (Status, error)
+}
+
+type StatusWatcherWithCtxTransitionalBase struct{}
+
+type StatusWatcherWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewStatusWatcherWithCtxInterfaceRequest() (StatusWatcherWithCtxInterfaceRequest, *StatusWatcherWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return StatusWatcherWithCtxInterfaceRequest(req), (*StatusWatcherWithCtxInterface)(cli), err
+}
+
+type StatusWatcherWithCtxStub struct {
+ Impl StatusWatcherWithCtx
+}
+
+func (s_ *StatusWatcherWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case StatusWatcherWatchStatusOrdinal:
+ deviceStatus, err_ := s_.Impl.WatchStatus(args_.Ctx)
+ out_ := statusWatcherWithCtxWatchStatusResponse{}
+ out_.DeviceStatus = deviceStatus
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type StatusWatcherEventProxy _bindings.ChannelProxy
+
+const (
+ DeviceGetInfoOrdinal uint64 = 0x3c500ca9341e8f56
+ DeviceGetStatusOrdinal uint64 = 0x3e15c944b7e06ced
+ DeviceGetStatusWatcherOrdinal uint64 = 0x65079698371e1163
+ DeviceOpenSessionOrdinal uint64 = 0x25940b82146dcf67
+)
+
+type DeviceWithCtxInterface _bindings.ChannelProxy
+
+// Obtain information about device
+func (p *DeviceWithCtxInterface) GetInfo(ctx_ _bindings.Context) (Info, error) {
+ var req_ _bindings.Message
+ resp_ := &deviceWithCtxGetInfoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceGetInfoOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// Obtain the operating device status.
+func (p *DeviceWithCtxInterface) GetStatus(ctx_ _bindings.Context) (Status, error) {
+ var req_ _bindings.Message
+ resp_ := &deviceWithCtxGetStatusResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceGetStatusOrdinal, req_, resp_)
+ return resp_.DeviceStatus, err_
+}
+
+// Connects to a [`fuchsia.hardware.network/StatusWatcher`] to observe device status changes.
+//
+// `buffer` is the number of status changes that the client requests to be stored by
+// `StatusWatcher`, limited to [`fuchsia.hardware.network/MAX_STATUS_BUFFER`]. A value of 0 or
+// 1 will cause the `StatusWatcher` to not keep any buffers on status changed. Clients that
+// need to observe all changes to status (as opposed to only the current state) are encouraged
+// to set a buffer value larger than 1, so that all edges can be observed. If `StatusWatcher`'s
+// internal queue is filled and new status changes occur, the oldest samples will be dropped to
+// make room for new ones.
+func (p *DeviceWithCtxInterface) GetStatusWatcher(ctx_ _bindings.Context, watcher StatusWatcherWithCtxInterfaceRequest, buffer uint32) error {
+ req_ := &deviceWithCtxGetStatusWatcherRequest{
+ Watcher: watcher,
+ Buffer: buffer,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DeviceGetStatusWatcherOrdinal, req_)
+ return err_
+}
+
+// Opens a new session with the network device.
+// `session_name` is used only as a debug label.
+// `session_info` contains the necessary information to setup the session's data exchange.
+func (p *DeviceWithCtxInterface) OpenSession(ctx_ _bindings.Context, sessionName string, sessionInfo SessionInfo) (DeviceOpenSessionResult, error) {
+ req_ := &deviceWithCtxOpenSessionRequest{
+ SessionName: sessionName,
+ SessionInfo: sessionInfo,
+ }
+ resp_ := &deviceWithCtxOpenSessionResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DeviceOpenSessionOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// A Network Device.
+type DeviceWithCtx interface {
+ // Obtain information about device
+ GetInfo(ctx_ _bindings.Context) (Info, error)
+ // Obtain the operating device status.
+ GetStatus(ctx_ _bindings.Context) (Status, error)
+ // Connects to a [`fuchsia.hardware.network/StatusWatcher`] to observe device status changes.
+ //
+ // `buffer` is the number of status changes that the client requests to be stored by
+ // `StatusWatcher`, limited to [`fuchsia.hardware.network/MAX_STATUS_BUFFER`]. A value of 0 or
+ // 1 will cause the `StatusWatcher` to not keep any buffers on status changed. Clients that
+ // need to observe all changes to status (as opposed to only the current state) are encouraged
+ // to set a buffer value larger than 1, so that all edges can be observed. If `StatusWatcher`'s
+ // internal queue is filled and new status changes occur, the oldest samples will be dropped to
+ // make room for new ones.
+ GetStatusWatcher(ctx_ _bindings.Context, watcher StatusWatcherWithCtxInterfaceRequest, buffer uint32) error
+ // Opens a new session with the network device.
+ // `session_name` is used only as a debug label.
+ // `session_info` contains the necessary information to setup the session's data exchange.
+ OpenSession(ctx_ _bindings.Context, sessionName string, sessionInfo SessionInfo) (DeviceOpenSessionResult, error)
+}
+
+type DeviceWithCtxTransitionalBase struct{}
+
+type DeviceWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDeviceWithCtxInterfaceRequest() (DeviceWithCtxInterfaceRequest, *DeviceWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DeviceWithCtxInterfaceRequest(req), (*DeviceWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ DeviceWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.hardware.network.Device"
+}
+func (c DeviceWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const DeviceName = "fuchsia.hardware.network.Device"
+
+type DeviceWithCtxStub struct {
+ Impl DeviceWithCtx
+}
+
+func (s_ *DeviceWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DeviceGetInfoOrdinal:
+ info, err_ := s_.Impl.GetInfo(args_.Ctx)
+ out_ := deviceWithCtxGetInfoResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case DeviceGetStatusOrdinal:
+ deviceStatus, err_ := s_.Impl.GetStatus(args_.Ctx)
+ out_ := deviceWithCtxGetStatusResponse{}
+ out_.DeviceStatus = deviceStatus
+ return &out_, true, err_
+ case DeviceGetStatusWatcherOrdinal:
+ in_ := deviceWithCtxGetStatusWatcherRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.GetStatusWatcher(args_.Ctx, in_.Watcher, in_.Buffer)
+ return nil, false, err_
+ case DeviceOpenSessionOrdinal:
+ in_ := deviceWithCtxOpenSessionRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.OpenSession(args_.Ctx, in_.SessionName, in_.SessionInfo)
+ out_ := deviceWithCtxOpenSessionResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DeviceEventProxy _bindings.ChannelProxy
+
+const (
+ DeviceInstanceGetDeviceOrdinal uint64 = 0x775270585575cef7
+ DeviceInstanceGetMacAddressingOrdinal uint64 = 0x545e6ef5d5737c62
+)
+
+type DeviceInstanceWithCtxInterface _bindings.ChannelProxy
+
+// Connects to the [`fuchsia.hardware.network/Device`] implementation, giving access to
+// data-plane features.
+func (p *DeviceInstanceWithCtxInterface) GetDevice(ctx_ _bindings.Context, device DeviceWithCtxInterfaceRequest) error {
+ req_ := &deviceInstanceWithCtxGetDeviceRequest{
+ Device: device,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DeviceInstanceGetDeviceOrdinal, req_)
+ return err_
+}
+
+// Connects to the [`fuchsia.hardware.network/MacAddressing`] implementation, giving access to
+// MAC filtering control. `DeviceInstance`s that do not support `MacAddressing` will have the
+// request immediately closed.
+func (p *DeviceInstanceWithCtxInterface) GetMacAddressing(ctx_ _bindings.Context, mac MacAddressingWithCtxInterfaceRequest) error {
+ req_ := &deviceInstanceWithCtxGetMacAddressingRequest{
+ Mac: mac,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DeviceInstanceGetMacAddressingOrdinal, req_)
+ return err_
+}
+
+// An instance of a network device that may be capable of MAC address filtering.
+type DeviceInstanceWithCtx interface {
+ // Connects to the [`fuchsia.hardware.network/Device`] implementation, giving access to
+ // data-plane features.
+ GetDevice(ctx_ _bindings.Context, device DeviceWithCtxInterfaceRequest) error
+ // Connects to the [`fuchsia.hardware.network/MacAddressing`] implementation, giving access to
+ // MAC filtering control. `DeviceInstance`s that do not support `MacAddressing` will have the
+ // request immediately closed.
+ GetMacAddressing(ctx_ _bindings.Context, mac MacAddressingWithCtxInterfaceRequest) error
+}
+
+type DeviceInstanceWithCtxTransitionalBase struct{}
+
+type DeviceInstanceWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDeviceInstanceWithCtxInterfaceRequest() (DeviceInstanceWithCtxInterfaceRequest, *DeviceInstanceWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DeviceInstanceWithCtxInterfaceRequest(req), (*DeviceInstanceWithCtxInterface)(cli), err
+}
+
+type DeviceInstanceWithCtxStub struct {
+ Impl DeviceInstanceWithCtx
+}
+
+func (s_ *DeviceInstanceWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DeviceInstanceGetDeviceOrdinal:
+ in_ := deviceInstanceWithCtxGetDeviceRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.GetDevice(args_.Ctx, in_.Device)
+ return nil, false, err_
+ case DeviceInstanceGetMacAddressingOrdinal:
+ in_ := deviceInstanceWithCtxGetMacAddressingRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.GetMacAddressing(args_.Ctx, in_.Mac)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DeviceInstanceEventProxy _bindings.ChannelProxy
+
+const (
+ MacAddressingGetUnicastAddressOrdinal uint64 = 0x2c60b82a4ecfaebe
+ MacAddressingSetModeOrdinal uint64 = 0x6297b8dbf03c58c
+ MacAddressingAddMulticastAddressOrdinal uint64 = 0xf5637ff11cf0c25
+ MacAddressingRemoveMulticastAddressOrdinal uint64 = 0x5dddf4e3ba4e2560
+)
+
+type MacAddressingWithCtxInterface _bindings.ChannelProxy
+
+// Gets the Device's current unicast MAC address.
+// Implementers of this API do not need to return a uniquely identifiable MAC; the unicast
+// address returned is the one that is *currently* in use to filter unicast frames, or that
+// identifies the device on a link it's *currently* on. Users of this API must not rely on the
+// stability or uniqueness of the returned value to identify or disambiguate device instances.
+func (p *MacAddressingWithCtxInterface) GetUnicastAddress(ctx_ _bindings.Context) (fuchsianet.MacAddress, error) {
+ var req_ _bindings.Message
+ resp_ := &macAddressingWithCtxGetUnicastAddressResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(MacAddressingGetUnicastAddressOrdinal, req_, resp_)
+ return resp_.Address, err_
+}
+
+// Sets requested operating mode of this device to `mode`.
+//
+// The requested mode is attached to the current client connection to the device. Because
+// multiple clients can be attached to the same device at once, the mode with the least
+// restrictions will be the one actively put into effect into the underlying device
+// implementation.
+//
+// If the device does not support the requested mode, but supports a mode that is more open
+// than the requested one, `SetMode` will succeed regardless. Otherwise, if the device only
+// supports *more restrictive* modes than the one requested, `SetMode` returns
+// `ZX_ERR_NOT_SUPPORTED`.
+//
+// Clients must be aware that the resource being accessed is shared, and that the device may be
+// effectively operating at a more open level than the one that was requested (although never
+// at one more restrictive).
+func (p *MacAddressingWithCtxInterface) SetMode(ctx_ _bindings.Context, mode MacFilterMode) (int32, error) {
+ req_ := &macAddressingWithCtxSetModeRequest{
+ Mode: mode,
+ }
+ resp_ := &macAddressingWithCtxSetModeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(MacAddressingSetModeOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+// Adds multicast address to the list of multicast groups.
+//
+// The list of multicast addresses kept is untouched by calls to `SetMode`. If the device's
+// mode is not `MULTICAST_FILTER`, the list of multicast addresses is ignored.
+//
+// Returns `ZX_ERR_INVALID_ARGS` if the provided `address` is not a multicast address.
+func (p *MacAddressingWithCtxInterface) AddMulticastAddress(ctx_ _bindings.Context, address fuchsianet.MacAddress) (int32, error) {
+ req_ := &macAddressingWithCtxAddMulticastAddressRequest{
+ Address: address,
+ }
+ resp_ := &macAddressingWithCtxAddMulticastAddressResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(MacAddressingAddMulticastAddressOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+// Removes multicast address from the list of multicast groups.
+//
+// Returns `ZX_ERR_INVALID_ARGS` if the provided `address` is not a multicast address.
+func (p *MacAddressingWithCtxInterface) RemoveMulticastAddress(ctx_ _bindings.Context, address fuchsianet.MacAddress) (int32, error) {
+ req_ := &macAddressingWithCtxRemoveMulticastAddressRequest{
+ Address: address,
+ }
+ resp_ := &macAddressingWithCtxRemoveMulticastAddressResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(MacAddressingRemoveMulticastAddressOrdinal, req_, resp_)
+ return resp_.Status, err_
+}
+
+type MacAddressingWithCtx interface {
+ // Gets the Device's current unicast MAC address.
+ // Implementers of this API do not need to return a uniquely identifiable MAC; the unicast
+ // address returned is the one that is *currently* in use to filter unicast frames, or that
+ // identifies the device on a link it's *currently* on. Users of this API must not rely on the
+ // stability or uniqueness of the returned value to identify or disambiguate device instances.
+ GetUnicastAddress(ctx_ _bindings.Context) (fuchsianet.MacAddress, error)
+ // Sets requested operating mode of this device to `mode`.
+ //
+ // The requested mode is attached to the current client connection to the device. Because
+ // multiple clients can be attached to the same device at once, the mode with the least
+ // restrictions will be the one actively put into effect into the underlying device
+ // implementation.
+ //
+ // If the device does not support the requested mode, but supports a mode that is more open
+ // than the requested one, `SetMode` will succeed regardless. Otherwise, if the device only
+ // supports *more restrictive* modes than the one requested, `SetMode` returns
+ // `ZX_ERR_NOT_SUPPORTED`.
+ //
+ // Clients must be aware that the resource being accessed is shared, and that the device may be
+ // effectively operating at a more open level than the one that was requested (although never
+ // at one more restrictive).
+ SetMode(ctx_ _bindings.Context, mode MacFilterMode) (int32, error)
+ // Adds multicast address to the list of multicast groups.
+ //
+ // The list of multicast addresses kept is untouched by calls to `SetMode`. If the device's
+ // mode is not `MULTICAST_FILTER`, the list of multicast addresses is ignored.
+ //
+ // Returns `ZX_ERR_INVALID_ARGS` if the provided `address` is not a multicast address.
+ AddMulticastAddress(ctx_ _bindings.Context, address fuchsianet.MacAddress) (int32, error)
+ // Removes multicast address from the list of multicast groups.
+ //
+ // Returns `ZX_ERR_INVALID_ARGS` if the provided `address` is not a multicast address.
+ RemoveMulticastAddress(ctx_ _bindings.Context, address fuchsianet.MacAddress) (int32, error)
+}
+
+type MacAddressingWithCtxTransitionalBase struct{}
+
+type MacAddressingWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewMacAddressingWithCtxInterfaceRequest() (MacAddressingWithCtxInterfaceRequest, *MacAddressingWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return MacAddressingWithCtxInterfaceRequest(req), (*MacAddressingWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ MacAddressingWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.hardware.network.MacAddressing"
+}
+func (c MacAddressingWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const MacAddressingName = "fuchsia.hardware.network.MacAddressing"
+
+type MacAddressingWithCtxStub struct {
+ Impl MacAddressingWithCtx
+}
+
+func (s_ *MacAddressingWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case MacAddressingGetUnicastAddressOrdinal:
+ address, err_ := s_.Impl.GetUnicastAddress(args_.Ctx)
+ out_ := macAddressingWithCtxGetUnicastAddressResponse{}
+ out_.Address = address
+ return &out_, true, err_
+ case MacAddressingSetModeOrdinal:
+ in_ := macAddressingWithCtxSetModeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ status, err_ := s_.Impl.SetMode(args_.Ctx, in_.Mode)
+ out_ := macAddressingWithCtxSetModeResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case MacAddressingAddMulticastAddressOrdinal:
+ in_ := macAddressingWithCtxAddMulticastAddressRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ status, err_ := s_.Impl.AddMulticastAddress(args_.Ctx, in_.Address)
+ out_ := macAddressingWithCtxAddMulticastAddressResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ case MacAddressingRemoveMulticastAddressOrdinal:
+ in_ := macAddressingWithCtxRemoveMulticastAddressRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ status, err_ := s_.Impl.RemoveMulticastAddress(args_.Ctx, in_.Address)
+ out_ := macAddressingWithCtxRemoveMulticastAddressResponse{}
+ out_.Status = status
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type MacAddressingEventProxy _bindings.ChannelProxy
+
+const (
+ SessionSetPausedOrdinal uint64 = 0x463e604fa765a658
+ SessionCloseOrdinal uint64 = 0x393d5070394a92f6
+)
+
+type SessionWithCtxInterface _bindings.ChannelProxy
+
+// Pauses or unpauses reception of frames on this session.
+func (p *SessionWithCtxInterface) SetPaused(ctx_ _bindings.Context, paused bool) error {
+ req_ := &sessionWithCtxSetPausedRequest{
+ Paused: paused,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(SessionSetPausedOrdinal, req_)
+ return err_
+}
+
+// Cleanly closes a session. This will cause the session to send a `ZX_ERR_CANCELLED` epitaph
+// and proceed to close the Session channel. Clients may only assume that they own all the
+// buffers that are currently owned by the session (sent over either the rx or tx FIFOs) once
+// the epitaph is received. Closing the rx or tx FIFO is equivalent to calling `Close`.
+func (p *SessionWithCtxInterface) Close(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(SessionCloseOrdinal, req_)
+ return err_
+}
+
+// Represents a session with a Network device.
+//
+// A session has a data plane and a control plane. The `Session` protocol represents the control
+// plane of the session and the FIFOs and VMOs exchanged during the
+// [`fuchsia.hardware.network/Device.OpenSession`] call are the data plane. Lifetime of the session
+// is controlled by a `Session` protocol handle. Sessions are always created in a paused state.
+//
+// The session will be closed with an error epitaph if an invalid buffer descriptor is sent over
+// either the tx or rx FIFOs. Invalid descriptors include:
+// - Descriptor index larger than [`fuchsia.hardware.network/SessionInfo.descriptor_count`].
+// - Descriptor chains larger than [`fuchsia.hardware.network/MAX_DESCRIPTOR_CHAIN`].
+// - rx buffers smaller than [`fuchsia.hardware.network/Info.min_rx_buffer_length`].
+// - tx buffers smaller than [`fuchsia.hardware.network/Info.min_tx_buffer_length`].
+// - tx buffers not respecting [`fuchsia.hardware.network/Info.min_tx_buffer_head`] or
+// [`fuchsia.hardware.network/Info.min_tx_buffer_tail`].
+type SessionWithCtx interface {
+ // Pauses or unpauses reception of frames on this session.
+ SetPaused(ctx_ _bindings.Context, paused bool) error
+ // Cleanly closes a session. This will cause the session to send a `ZX_ERR_CANCELLED` epitaph
+ // and proceed to close the Session channel. Clients may only assume that they own all the
+ // buffers that are currently owned by the session (sent over either the rx or tx FIFOs) once
+ // the epitaph is received. Closing the rx or tx FIFO is equivalent to calling `Close`.
+ Close(ctx_ _bindings.Context) error
+}
+
+type SessionWithCtxTransitionalBase struct{}
+
+type SessionWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewSessionWithCtxInterfaceRequest() (SessionWithCtxInterfaceRequest, *SessionWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return SessionWithCtxInterfaceRequest(req), (*SessionWithCtxInterface)(cli), err
+}
+
+type SessionWithCtxStub struct {
+ Impl SessionWithCtx
+}
+
+func (s_ *SessionWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case SessionSetPausedOrdinal:
+ in_ := sessionWithCtxSetPausedRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.SetPaused(args_.Ctx, in_.Paused)
+ return nil, false, err_
+ case SessionCloseOrdinal:
+ err_ := s_.Impl.Close(args_.Ctx)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type SessionEventProxy _bindings.ChannelProxy
diff --git a/src/syscall/zx/internal/context/context.go b/src/syscall/zx/internal/context/context.go
new file mode 100644
index 0000000..c51e5e2
--- /dev/null
+++ b/src/syscall/zx/internal/context/context.go
@@ -0,0 +1,204 @@
+// 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.
+
+// This is a copy of context.Context with all dependencies on "time" and "fmt"
+// removed in order to avoid a dependency cycle.
+//
+// TODO(fxb/43246) Break the dependency cycle when using context.Context and
+// use that instead.
+
+package context
+
+import (
+ "errors"
+ "reflect"
+ "sync"
+)
+
+type Context interface {
+ Done() <-chan struct{}
+
+ Err() error
+
+ Value(key interface{}) interface{}
+}
+
+var Canceled = errors.New("context canceled")
+
+type emptyCtx int
+
+func (*emptyCtx) Done() <-chan struct{} {
+ return nil
+}
+
+func (*emptyCtx) Err() error {
+ return nil
+}
+
+func (*emptyCtx) Value(key interface{}) interface{} {
+ return nil
+}
+
+var (
+ background = new(emptyCtx)
+ todo = new(emptyCtx)
+)
+
+func Background() Context {
+ return background
+}
+
+func TODO() Context {
+ return todo
+}
+
+type CancelFunc func()
+
+func WithCancel(parent Context) (ctx Context, cancel CancelFunc) {
+ c := newCancelCtx(parent)
+ propagateCancel(parent, &c)
+ return &c, func() { c.cancel(true, Canceled) }
+}
+
+func newCancelCtx(parent Context) cancelCtx {
+ return cancelCtx{Context: parent}
+}
+
+func propagateCancel(parent Context, child canceler) {
+ if parent.Done() == nil {
+ return // parent is never canceled
+ }
+ if p, ok := parentCancelCtx(parent); ok {
+ p.mu.Lock()
+ if p.err != nil {
+ // parent has already been canceled
+ child.cancel(false, p.err)
+ } else {
+ if p.children == nil {
+ p.children = make(map[canceler]struct{})
+ }
+ p.children[child] = struct{}{}
+ }
+ p.mu.Unlock()
+ } else {
+ go func() {
+ select {
+ case <-parent.Done():
+ child.cancel(false, parent.Err())
+ case <-child.Done():
+ }
+ }()
+ }
+}
+
+func parentCancelCtx(parent Context) (*cancelCtx, bool) {
+ for {
+ switch c := parent.(type) {
+ case *cancelCtx:
+ return c, true
+ case *valueCtx:
+ parent = c.Context
+ default:
+ return nil, false
+ }
+ }
+}
+
+func removeChild(parent Context, child canceler) {
+ p, ok := parentCancelCtx(parent)
+ if !ok {
+ return
+ }
+ p.mu.Lock()
+ if p.children != nil {
+ delete(p.children, child)
+ }
+ p.mu.Unlock()
+}
+
+type canceler interface {
+ cancel(removeFromParent bool, err error)
+ Done() <-chan struct{}
+}
+
+var closedchan = make(chan struct{})
+
+func init() {
+ close(closedchan)
+}
+
+type cancelCtx struct {
+ Context
+
+ mu sync.Mutex
+ done chan struct{}
+ children map[canceler]struct{}
+ err error
+}
+
+func (c *cancelCtx) Done() <-chan struct{} {
+ c.mu.Lock()
+ if c.done == nil {
+ c.done = make(chan struct{})
+ }
+ d := c.done
+ c.mu.Unlock()
+ return d
+}
+
+func (c *cancelCtx) Err() error {
+ c.mu.Lock()
+ err := c.err
+ c.mu.Unlock()
+ return err
+}
+
+func (c *cancelCtx) cancel(removeFromParent bool, err error) {
+ if err == nil {
+ panic("context: internal error: missing cancel error")
+ }
+ c.mu.Lock()
+ if c.err != nil {
+ c.mu.Unlock()
+ return // already canceled
+ }
+ c.err = err
+ if c.done == nil {
+ c.done = closedchan
+ } else {
+ close(c.done)
+ }
+ for child := range c.children {
+ // NOTE: acquiring the child's lock while holding parent's lock.
+ child.cancel(false, err)
+ }
+ c.children = nil
+ c.mu.Unlock()
+
+ if removeFromParent {
+ removeChild(c.Context, c)
+ }
+}
+
+func WithValue(parent Context, key, val interface{}) Context {
+ if key == nil {
+ panic("nil key")
+ }
+ if !reflect.TypeOf(key).Comparable() {
+ panic("key is not comparable")
+ }
+ return &valueCtx{parent, key, val}
+}
+
+type valueCtx struct {
+ Context
+ key, val interface{}
+}
+
+func (c *valueCtx) Value(key interface{}) interface{} {
+ if c.key == key {
+ return c.val
+ }
+ return c.Context.Value(key)
+}
diff --git a/src/syscall/zx/io/impl.go b/src/syscall/zx/io/impl.go
new file mode 100644
index 0000000..b2ff681
--- /dev/null
+++ b/src/syscall/zx/io/impl.go
@@ -0,0 +1,4327 @@
+// Copyright 2018 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package io
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+ fuchsiaio2 "syscall/zx/io2"
+ fuchsiamem "syscall/zx/mem"
+)
+
+const (
+ // Indicates the file is ready for reading.
+ FileSignalReadable uint32 = 16777216
+ // Indicates the file is ready for writing.
+ FileSignalWritable uint32 = 33554432
+ // Indicates the device is ready for reading.
+ DeviceSignalReadable uint32 = 16777216
+ // Indicates an out-of-band state transition has occurred.
+ DeviceSignalOob uint32 = 33554432
+ // Indicates the device is ready for writing.
+ DeviceSignalWritable uint32 = 67108864
+ // Indicates the device has encountered an error state.
+ DeviceSignalError uint32 = 134217728
+ // Indicates the device has hung up on the current connection.
+ DeviceSignalHangup uint32 = 268435456
+ // Can read from target object.
+ OpenRightReadable uint32 = 1
+ // Can write to target object.
+ OpenRightWritable uint32 = 2
+ // Connection can mount/umount filesystem.
+ OpenRightAdmin uint32 = 4
+ // Connection can map target object executable.
+ OpenRightExecutable uint32 = 8
+ // Create the object if it doesn't exist.
+ OpenFlagCreate uint32 = 65536
+ // (with Create) Fail if the object already exists.
+ OpenFlagCreateIfAbsent uint32 = 131072
+ // Truncate the object before usage.
+ OpenFlagTruncate uint32 = 262144
+ // Assert that the object to be opened is a directory.
+ // Return an error if the target object is not a directory.
+ OpenFlagDirectory uint32 = 524288
+ // Seek to the end of the object before all writes.
+ OpenFlagAppend uint32 = 1048576
+ // If the object is a mount point, open the local directory.
+ OpenFlagNoRemote uint32 = 2097152
+ // Open a reference to the object, not the object itself.
+ // It is ONLY valid to pass the following flags together with `OPEN_FLAG_NODE_REFERENCE`:
+ // - `OPEN_FLAG_DIRECTORY`
+ // - `OPEN_FLAG_NOT_DIRECTORY`
+ // - `OPEN_FLAG_DESCRIBE`
+ // otherwise an error is returned.
+ // If an object is opened or cloned using this method, the resulting connection does not carry
+ // any permission flags.
+ // The resulting node allows a limited set of operations: `GetAttr`, `Clone`, `Close`, `Describe`,
+ // and, if the node is a file, these extra operations: `GetFlags`, `SetFlags`.
+ OpenFlagNodeReference uint32 = 4194304
+ // Binary OR of `OPEN_FLAG_DIRECTORY`, OPEN_FLAG_NOT_DIRECTORY, OPEN_FLAG_DESCRIBE, and
+ // `OPEN_FLAG_NODE_REFERENCE`. Flags used when opening a node reference must fall within this mask.
+ OpenFlagsAllowedWithNodeReference uint32 = 46661632
+ // Requests that an "OnOpen" event is sent to the interface request.
+ // The event will contain a non-null NodeInfo if the open/clone is successful.
+ OpenFlagDescribe uint32 = 8388608
+ // Specify this flag to request POSIX-compatibility. Currently, it affects permission handling.
+ // During Open:
+ // - If the target path is a directory, the rights on the new connection expand to include
+ // `OPEN_RIGHT_WRITABLE` if and only if the current connection and all intermediate mount points
+ // are writable, and to include `OPEN_RIGHT_EXECUTABLE` if and only if the current connection and
+ // all intermediate mount points are executable.
+ // - Otherwise, this flag is ignored. It is an access denied error to request more rights
+ // than those on the current connection, or any intermediate mount points.
+ //
+ // If the posix compatibility flag is not specified, opening always uses the requested rights,
+ // failing the operation with access denied error if requested rights exceeds the rights attached
+ // to the current connection.
+ //
+ // If the requesting connection is read-only and the requested rights are read-only, the flag
+ // may be ignored by the server, and is not forwarded downstream. This is an implementation detail,
+ // necessary to enforce hierarchical permissions across mount points, and should have no effect
+ // on the expected behavior for clients.
+ OpenFlagPosix uint32 = 16777216
+ // Assert that the object to be opened is not a directory.
+ // Return an error if the target object is a directory.
+ OpenFlagNotDirectory uint32 = 33554432
+ // When used during clone, the new connection inherits the rights on the source connection,
+ // regardless if it is a file or directory. Otherwise, clone attempts to use the requested rights.
+ // It is invalid to pass any of the `OPEN_RIGHT_*` flags together with `CLONE_FLAG_SAME_RIGHTS`.
+ CloneFlagSameRights uint32 = 67108864
+ // Bits reserved for posix protections. Native fuchsia filesystems
+ // are not required to set bits contained within `MODE_PROTECTION_MASK`,
+ // but filesystems that wish to do so may refer to sys/stat.h for their
+ // definitions.
+ ModeProtectionMask uint32 = 4095
+ // Bits indicating node type. The canonical mechanism to check
+ // for a node type is to take 'mode', bitwise AND it with the
+ // `MODE_TYPE_MASK`, and check exact equality against a mode type.
+ ModeTypeMask uint32 = 1044480
+ ModeTypeDirectory uint32 = 16384
+ ModeTypeBlockDevice uint32 = 24576
+ ModeTypeFile uint32 = 32768
+ ModeTypeSocket uint32 = 49152
+ ModeTypeService uint32 = 65536
+ // The maximal buffer size which can be transmitted for buffered operations.
+ // This capacity is currently set somewhat arbitrarily.
+ MaxBuf uint64 = 8192
+ // The maximum length, in bytes, of a filesystem string.
+ MaxPath uint64 = 4096
+ // The maximum length, in bytes, of a single filesystem component.
+ MaxFilename uint64 = 255
+ // The fields of 'attributes' which are used to update the Node are indicated
+ // by the 'flags' argument.
+ NodeAttributeFlagCreationTime uint32 = 1
+ NodeAttributeFlagModificationTime uint32 = 2
+ // Requests that the VMO be readable.
+ VmoFlagRead uint32 = 1
+ // Requests that the VMO be writable.
+ VmoFlagWrite uint32 = 2
+ // Requests that the VMO be executable.
+ VmoFlagExec uint32 = 4
+ // Require a copy-on-write clone of the underlying VMO.
+ // The request should fail if the VMO is not cloned.
+ // May not be supplied with fuchsia_io_`VMO_FLAG_EXACT`.
+ VmoFlagPrivate uint32 = 65536
+ // Require an exact (non-cloned) handle to the underlying VMO.
+ // The request should fail if a handle to the exact VMO is not returned.
+ // May not be supplied with `VMO_FLAG_PRIVATE`.
+ VmoFlagExact uint32 = 131072
+ // A dirent with an unknown type.
+ DirentTypeUnknown uint8 = 0
+ // A dirent representing a directory object.
+ DirentTypeDirectory uint8 = 4
+ // A dirent representing a block device object.
+ DirentTypeBlockDevice uint8 = 6
+ // A dirent representing a file object.
+ DirentTypeFile uint8 = 8
+ // A dirent representing a socket object.
+ DirentTypeSocket uint8 = 12
+ // A dirent representing a service object.
+ DirentTypeService uint8 = 16
+ // Nodes which do not have ino values should return this value
+ // from Readdir and GetAttr.
+ InoUnknown uint64 = 18446744073709551615
+ // Indicates the directory being watched has been deleted.
+ WatchEventDeleted uint8 = 0
+ // Indicates a node has been created (either new or moved) into a directory.
+ WatchEventAdded uint8 = 1
+ // Identifies a node has been removed (either deleted or moved) from the directory.
+ WatchEventRemoved uint8 = 2
+ // Identifies a node already existed in the directory when watching started.
+ WatchEventExisting uint8 = 3
+ // Identifies that no more `WATCH_EVENT_EXISTING` events will be sent.
+ WatchEventIdle uint8 = 4
+ // Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_DELETED`.
+ WatchMaskDeleted uint32 = 1
+ // Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_ADDED`.
+ WatchMaskAdded uint32 = 2
+ // Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_REMOVED`.
+ WatchMaskRemoved uint32 = 4
+ // Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_EXISTING`.
+ WatchMaskExisting uint32 = 8
+ // Used by `Directory.Watch`. Requests transmission of `WATCH_EVENT_IDLE`.
+ WatchMaskIdle uint32 = 16
+ // Used by `Directory.Watch`. Requests transmission of all watcher events.
+ WatchMaskAll uint32 = 31
+ MountCreateFlagReplace uint32 = 1
+ MaxFsNameBuffer uint64 = 32
+)
+
+var _ _bindings.Enum = SeekOrigin(0)
+
+// Update the Seek offset.
+type SeekOrigin uint32
+
+const (
+
+ // Seek from the start of the file.
+ SeekOriginStart SeekOrigin = 0
+
+ // Seek from the current position in the file.
+ SeekOriginCurrent SeekOrigin = 1
+
+ // Seek from the end of the file.
+ SeekOriginEnd SeekOrigin = 2
+)
+
+func (_ SeekOrigin) I_EnumValues() []SeekOrigin {
+ return []SeekOrigin{
+ SeekOriginStart,
+ SeekOriginCurrent,
+ SeekOriginEnd,
+ }
+}
+
+func (_ SeekOrigin) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x SeekOrigin) IsUnknown() bool {
+ switch x {
+ case 0:
+ return true
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x SeekOrigin) String() string {
+ switch x {
+ case 0:
+ return "Start"
+ case 1:
+ return "Current"
+ case 2:
+ return "End"
+ }
+ return "Unknown"
+}
+
+// The default protocol, interface information must be acquired some
+// other way.
+type Service struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mService = _bindings.CreateLazyMarshaler(Service{})
+
+func (msg *Service) Marshaler() _bindings.Marshaler {
+ return _mService
+}
+
+// The object may be cast to interface 'File'.
+type FileObject struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"4"`
+ // An optional event which transmits information about an object's readability
+ // or writability. This event relays information about the underlying object, not
+ // the capability granted to client: this event may be signalled "readable" on a
+ // connection that does not have the capability to read.
+ //
+ // The "`FILE_SIGNAL_`" values may be observed on this event.
+ Event _zx.Event `fidl_offset_v1:"0" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
+ // A placeholder for future stream support.
+ //
+ // Currently, servers are required not to send a handle in this field.
+ Stream _zx.Handle `fidl_offset_v1:"4" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
+}
+
+var _mFileObject = _bindings.CreateLazyMarshaler(FileObject{})
+
+func (msg *FileObject) Marshaler() _bindings.Marshaler {
+ return _mFileObject
+}
+
+// The object may be cast to interface 'Directory'.
+type DirectoryObject struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mDirectoryObject = _bindings.CreateLazyMarshaler(DirectoryObject{})
+
+func (msg *DirectoryObject) Marshaler() _bindings.Marshaler {
+ return _mDirectoryObject
+}
+
+// The object is accompanied by a pipe.
+type Pipe struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ Socket _zx.Socket `fidl_offset_v1:"0" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mPipe = _bindings.CreateLazyMarshaler(Pipe{})
+
+func (msg *Pipe) Marshaler() _bindings.Marshaler {
+ return _mPipe
+}
+
+// The object is a file which is represented as an immutable VMO.
+// Although a VMO is returned as a part of this structure, this underlying object
+// may represent multiple Vmofiles. To identify the logical portion of the VMO
+// that represents the single file, an offset and length parameter are also supplied.
+type Vmofile struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ // The VMO which backs this file.
+ Vmo _zx.VMO `fidl_offset_v1:"0" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ // The index into `vmo` which represents the first byte of the file.
+ Offset uint64 `fidl_offset_v1:"8"`
+ // The number of bytes, starting at `offset`, which may be used to represent this file.
+ Length uint64 `fidl_offset_v1:"16"`
+}
+
+var _mVmofile = _bindings.CreateLazyMarshaler(Vmofile{})
+
+func (msg *Vmofile) Marshaler() _bindings.Marshaler {
+ return _mVmofile
+}
+
+// The object may be cast to interface 'Device'.
+type Device struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ // An optional event which transmits information about a device's state.
+ //
+ // The "`DEVICE_SIGNAL_`" values may be observed on this event.
+ Event _zx.Handle `fidl_offset_v1:"0" fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
+}
+
+var _mDevice = _bindings.CreateLazyMarshaler(Device{})
+
+func (msg *Device) Marshaler() _bindings.Marshaler {
+ return _mDevice
+}
+
+// The object may be cast to interface 'Tty'
+type Tty struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ Event _zx.Handle `fidl_offset_v1:"0" fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
+}
+
+var _mTty = _bindings.CreateLazyMarshaler(Tty{})
+
+func (msg *Tty) Marshaler() _bindings.Marshaler {
+ return _mTty
+}
+
+// The object may be cast to interface [`fuchsia.posix.socket.DatagramSocket`].
+type DatagramSocket struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ // See [`fuchsia.posix.socket.DatagramSocket`] for details.
+ Event _zx.Handle `fidl_offset_v1:"0" fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mDatagramSocket = _bindings.CreateLazyMarshaler(DatagramSocket{})
+
+func (msg *DatagramSocket) Marshaler() _bindings.Marshaler {
+ return _mDatagramSocket
+}
+
+// The object may be cast to interface [`fuchsia.posix.socket.StreamSocket`].
+type StreamSocket struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ Socket _zx.Socket `fidl_offset_v1:"0" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mStreamSocket = _bindings.CreateLazyMarshaler(StreamSocket{})
+
+func (msg *StreamSocket) Marshaler() _bindings.Marshaler {
+ return _mStreamSocket
+}
+
+// NodeAttributes defines generic information about a filesystem node.
+type NodeAttributes struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"56" fidl_alignment_v1:"8"`
+ // Protection bits and node type information describe in 'mode'.
+ Mode uint32 `fidl_offset_v1:"0"`
+ // A filesystem-unique ID.
+ Id uint64 `fidl_offset_v1:"8"`
+ // Node size, in bytes.
+ ContentSize uint64 `fidl_offset_v1:"16"`
+ // Space needed to store node (possibly larger than size), in bytes.
+ StorageSize uint64 `fidl_offset_v1:"24"`
+ // Hard link count.
+ LinkCount uint64 `fidl_offset_v1:"32"`
+ // Time of creation (may be updated manually after creation) in ns since Unix epoch, UTC.
+ CreationTime uint64 `fidl_offset_v1:"40"`
+ // Time of last modification in ns since Unix epoch, UTC.
+ ModificationTime uint64 `fidl_offset_v1:"48"`
+}
+
+var _mNodeAttributes = _bindings.CreateLazyMarshaler(NodeAttributes{})
+
+func (msg *NodeAttributes) Marshaler() _bindings.Marshaler {
+ return _mNodeAttributes
+}
+
+// WatchedEvent describes events returned from a DirectoryWatcher.
+type WatchedEvent struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Event uint8 `fidl_offset_v1:"0"`
+ Len uint8 `fidl_offset_v1:"1"`
+ Name []uint8 `fidl_offset_v1:"8" fidl_bounds:"255"`
+}
+
+var _mWatchedEvent = _bindings.CreateLazyMarshaler(WatchedEvent{})
+
+func (msg *WatchedEvent) Marshaler() _bindings.Marshaler {
+ return _mWatchedEvent
+}
+
+type FilesystemInfo struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"96" fidl_alignment_v1:"8"`
+ // The number of data bytes which may be stored in a filesystem.
+ TotalBytes uint64 `fidl_offset_v1:"0"`
+ // The number of data bytes which are in use by the filesystem.
+ UsedBytes uint64 `fidl_offset_v1:"8"`
+ // The number of nodes which may be stored in the filesystem.
+ TotalNodes uint64 `fidl_offset_v1:"16"`
+ // The number of nodes used by the filesystem.
+ UsedNodes uint64 `fidl_offset_v1:"24"`
+ // The amount of space which may be allocated from the underlying
+ // volume manager. If unsupported, this will be zero.
+ FreeSharedPoolBytes uint64 `fidl_offset_v1:"32"`
+ // A unique identifier for this filesystem instance. Will not be preserved
+ // across reboots.
+ FsId uint64 `fidl_offset_v1:"40"`
+ // The size of a single filesystem block.
+ BlockSize uint32 `fidl_offset_v1:"48"`
+ // The maximum length of a filesystem name.
+ MaxFilenameSize uint32 `fidl_offset_v1:"52"`
+ // A unique identifier for the type of the underlying filesystem.
+ FsType uint32 `fidl_offset_v1:"56"`
+ Padding uint32 `fidl_offset_v1:"60"`
+ Name [32]int8 `fidl_offset_v1:"64"`
+}
+
+var _mFilesystemInfo = _bindings.CreateLazyMarshaler(FilesystemInfo{})
+
+func (msg *FilesystemInfo) Marshaler() _bindings.Marshaler {
+ return _mFilesystemInfo
+}
+
+type nodeWithCtxCloneRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mnodeWithCtxCloneRequest = _bindings.CreateLazyMarshaler(nodeWithCtxCloneRequest{})
+
+func (msg *nodeWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxCloneRequest
+}
+
+type nodeWithCtxCloseResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxCloseResponse = _bindings.CreateLazyMarshaler(nodeWithCtxCloseResponse{})
+
+func (msg *nodeWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxCloseResponse
+}
+
+type nodeWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Info NodeInfo `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(nodeWithCtxDescribeResponse{})
+
+func (msg *nodeWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxDescribeResponse
+}
+
+type nodeWithCtxOnOpenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Info *NodeInfo `fidl_offset_v1:"8"`
+}
+
+var _mnodeWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(nodeWithCtxOnOpenResponse{})
+
+func (msg *nodeWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxOnOpenResponse
+}
+
+type nodeWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxSyncResponse = _bindings.CreateLazyMarshaler(nodeWithCtxSyncResponse{})
+
+func (msg *nodeWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxSyncResponse
+}
+
+type nodeWithCtxGetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Attributes NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mnodeWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(nodeWithCtxGetAttrResponse{})
+
+func (msg *nodeWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxGetAttrResponse
+}
+
+type nodeWithCtxSetAttrRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Attributes NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mnodeWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(nodeWithCtxSetAttrRequest{})
+
+func (msg *nodeWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxSetAttrRequest
+}
+
+type nodeWithCtxSetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(nodeWithCtxSetAttrResponse{})
+
+func (msg *nodeWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxSetAttrResponse
+}
+
+type nodeWithCtxNodeGetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Flags uint32 `fidl_offset_v1:"4"`
+}
+
+var _mnodeWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(nodeWithCtxNodeGetFlagsResponse{})
+
+func (msg *nodeWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxNodeGetFlagsResponse
+}
+
+type nodeWithCtxNodeSetFlagsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(nodeWithCtxNodeSetFlagsRequest{})
+
+func (msg *nodeWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxNodeSetFlagsRequest
+}
+
+type nodeWithCtxNodeSetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(nodeWithCtxNodeSetFlagsResponse{})
+
+func (msg *nodeWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxNodeSetFlagsResponse
+}
+
+type fileWithCtxAdvisoryLockRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Request fuchsiaio2.AdvisoryLockRequest `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxAdvisoryLockRequest = _bindings.CreateLazyMarshaler(fileWithCtxAdvisoryLockRequest{})
+
+func (msg *fileWithCtxAdvisoryLockRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxAdvisoryLockRequest
+}
+
+type fileWithCtxAdvisoryLockResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result fuchsiaio2.AdvisoryLockingAdvisoryLockResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(fileWithCtxAdvisoryLockResponse{})
+
+func (msg *fileWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxAdvisoryLockResponse
+}
+
+type fileWithCtxCloneRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mfileWithCtxCloneRequest = _bindings.CreateLazyMarshaler(fileWithCtxCloneRequest{})
+
+func (msg *fileWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxCloneRequest
+}
+
+type fileWithCtxCloseResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxCloseResponse = _bindings.CreateLazyMarshaler(fileWithCtxCloseResponse{})
+
+func (msg *fileWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxCloseResponse
+}
+
+type fileWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Info NodeInfo `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(fileWithCtxDescribeResponse{})
+
+func (msg *fileWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxDescribeResponse
+}
+
+type fileWithCtxOnOpenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Info *NodeInfo `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(fileWithCtxOnOpenResponse{})
+
+func (msg *fileWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxOnOpenResponse
+}
+
+type fileWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxSyncResponse = _bindings.CreateLazyMarshaler(fileWithCtxSyncResponse{})
+
+func (msg *fileWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSyncResponse
+}
+
+type fileWithCtxGetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Attributes NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetAttrResponse{})
+
+func (msg *fileWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxGetAttrResponse
+}
+
+type fileWithCtxSetAttrRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Attributes NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(fileWithCtxSetAttrRequest{})
+
+func (msg *fileWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSetAttrRequest
+}
+
+type fileWithCtxSetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(fileWithCtxSetAttrResponse{})
+
+func (msg *fileWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSetAttrResponse
+}
+
+type fileWithCtxNodeGetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Flags uint32 `fidl_offset_v1:"4"`
+}
+
+var _mfileWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(fileWithCtxNodeGetFlagsResponse{})
+
+func (msg *fileWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxNodeGetFlagsResponse
+}
+
+type fileWithCtxNodeSetFlagsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(fileWithCtxNodeSetFlagsRequest{})
+
+func (msg *fileWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxNodeSetFlagsRequest
+}
+
+type fileWithCtxNodeSetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(fileWithCtxNodeSetFlagsResponse{})
+
+func (msg *fileWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxNodeSetFlagsResponse
+}
+
+type fileWithCtxReadRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Count uint64 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxReadRequest = _bindings.CreateLazyMarshaler(fileWithCtxReadRequest{})
+
+func (msg *fileWithCtxReadRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxReadRequest
+}
+
+type fileWithCtxReadResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Data []uint8 `fidl_offset_v1:"8" fidl_bounds:"8192"`
+}
+
+var _mfileWithCtxReadResponse = _bindings.CreateLazyMarshaler(fileWithCtxReadResponse{})
+
+func (msg *fileWithCtxReadResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxReadResponse
+}
+
+type fileWithCtxReadAtRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Count uint64 `fidl_offset_v1:"0"`
+ Offset uint64 `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxReadAtRequest = _bindings.CreateLazyMarshaler(fileWithCtxReadAtRequest{})
+
+func (msg *fileWithCtxReadAtRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxReadAtRequest
+}
+
+type fileWithCtxReadAtResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Data []uint8 `fidl_offset_v1:"8" fidl_bounds:"8192"`
+}
+
+var _mfileWithCtxReadAtResponse = _bindings.CreateLazyMarshaler(fileWithCtxReadAtResponse{})
+
+func (msg *fileWithCtxReadAtResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxReadAtResponse
+}
+
+type fileWithCtxWriteRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Data []uint8 `fidl_offset_v1:"0" fidl_bounds:"8192"`
+}
+
+var _mfileWithCtxWriteRequest = _bindings.CreateLazyMarshaler(fileWithCtxWriteRequest{})
+
+func (msg *fileWithCtxWriteRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxWriteRequest
+}
+
+type fileWithCtxWriteResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Actual uint64 `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxWriteResponse = _bindings.CreateLazyMarshaler(fileWithCtxWriteResponse{})
+
+func (msg *fileWithCtxWriteResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxWriteResponse
+}
+
+type fileWithCtxWriteAtRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Data []uint8 `fidl_offset_v1:"0" fidl_bounds:"8192"`
+ Offset uint64 `fidl_offset_v1:"16"`
+}
+
+var _mfileWithCtxWriteAtRequest = _bindings.CreateLazyMarshaler(fileWithCtxWriteAtRequest{})
+
+func (msg *fileWithCtxWriteAtRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxWriteAtRequest
+}
+
+type fileWithCtxWriteAtResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Actual uint64 `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxWriteAtResponse = _bindings.CreateLazyMarshaler(fileWithCtxWriteAtResponse{})
+
+func (msg *fileWithCtxWriteAtResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxWriteAtResponse
+}
+
+type fileWithCtxSeekRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Offset int64 `fidl_offset_v1:"0"`
+ Start SeekOrigin `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxSeekRequest = _bindings.CreateLazyMarshaler(fileWithCtxSeekRequest{})
+
+func (msg *fileWithCtxSeekRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSeekRequest
+}
+
+type fileWithCtxSeekResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Offset uint64 `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxSeekResponse = _bindings.CreateLazyMarshaler(fileWithCtxSeekResponse{})
+
+func (msg *fileWithCtxSeekResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSeekResponse
+}
+
+type fileWithCtxTruncateRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Length uint64 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxTruncateRequest = _bindings.CreateLazyMarshaler(fileWithCtxTruncateRequest{})
+
+func (msg *fileWithCtxTruncateRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxTruncateRequest
+}
+
+type fileWithCtxTruncateResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxTruncateResponse = _bindings.CreateLazyMarshaler(fileWithCtxTruncateResponse{})
+
+func (msg *fileWithCtxTruncateResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxTruncateResponse
+}
+
+type fileWithCtxGetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Flags uint32 `fidl_offset_v1:"4"`
+}
+
+var _mfileWithCtxGetFlagsResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetFlagsResponse{})
+
+func (msg *fileWithCtxGetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxGetFlagsResponse
+}
+
+type fileWithCtxSetFlagsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxSetFlagsRequest = _bindings.CreateLazyMarshaler(fileWithCtxSetFlagsRequest{})
+
+func (msg *fileWithCtxSetFlagsRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSetFlagsRequest
+}
+
+type fileWithCtxSetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxSetFlagsResponse = _bindings.CreateLazyMarshaler(fileWithCtxSetFlagsResponse{})
+
+func (msg *fileWithCtxSetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSetFlagsResponse
+}
+
+type fileWithCtxGetBufferRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxGetBufferRequest = _bindings.CreateLazyMarshaler(fileWithCtxGetBufferRequest{})
+
+func (msg *fileWithCtxGetBufferRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxGetBufferRequest
+}
+
+type fileWithCtxGetBufferResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Buffer *fuchsiamem.Buffer `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxGetBufferResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetBufferResponse{})
+
+func (msg *fileWithCtxGetBufferResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxGetBufferResponse
+}
+
+type directoryWatcherWithCtxOnEventRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Events []uint8 `fidl_offset_v1:"0" fidl_bounds:"8192"`
+}
+
+var _mdirectoryWatcherWithCtxOnEventRequest = _bindings.CreateLazyMarshaler(directoryWatcherWithCtxOnEventRequest{})
+
+func (msg *directoryWatcherWithCtxOnEventRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWatcherWithCtxOnEventRequest
+}
+
+type directoryWithCtxCloneRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mdirectoryWithCtxCloneRequest = _bindings.CreateLazyMarshaler(directoryWithCtxCloneRequest{})
+
+func (msg *directoryWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxCloneRequest
+}
+
+type directoryWithCtxCloseResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxCloseResponse = _bindings.CreateLazyMarshaler(directoryWithCtxCloseResponse{})
+
+func (msg *directoryWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxCloseResponse
+}
+
+type directoryWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Info NodeInfo `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(directoryWithCtxDescribeResponse{})
+
+func (msg *directoryWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxDescribeResponse
+}
+
+type directoryWithCtxOnOpenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Info *NodeInfo `fidl_offset_v1:"8"`
+}
+
+var _mdirectoryWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(directoryWithCtxOnOpenResponse{})
+
+func (msg *directoryWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxOnOpenResponse
+}
+
+type directoryWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxSyncResponse = _bindings.CreateLazyMarshaler(directoryWithCtxSyncResponse{})
+
+func (msg *directoryWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxSyncResponse
+}
+
+type directoryWithCtxGetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Attributes NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mdirectoryWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetAttrResponse{})
+
+func (msg *directoryWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxGetAttrResponse
+}
+
+type directoryWithCtxSetAttrRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Attributes NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mdirectoryWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(directoryWithCtxSetAttrRequest{})
+
+func (msg *directoryWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxSetAttrRequest
+}
+
+type directoryWithCtxSetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(directoryWithCtxSetAttrResponse{})
+
+func (msg *directoryWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxSetAttrResponse
+}
+
+type directoryWithCtxNodeGetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Flags uint32 `fidl_offset_v1:"4"`
+}
+
+var _mdirectoryWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(directoryWithCtxNodeGetFlagsResponse{})
+
+func (msg *directoryWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxNodeGetFlagsResponse
+}
+
+type directoryWithCtxNodeSetFlagsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(directoryWithCtxNodeSetFlagsRequest{})
+
+func (msg *directoryWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxNodeSetFlagsRequest
+}
+
+type directoryWithCtxNodeSetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(directoryWithCtxNodeSetFlagsResponse{})
+
+func (msg *directoryWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxNodeSetFlagsResponse
+}
+
+type directoryWithCtxOpenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Mode uint32 `fidl_offset_v1:"4"`
+ Path string `fidl_offset_v1:"8" fidl_bounds:"4096"`
+ Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"24" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mdirectoryWithCtxOpenRequest = _bindings.CreateLazyMarshaler(directoryWithCtxOpenRequest{})
+
+func (msg *directoryWithCtxOpenRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxOpenRequest
+}
+
+type directoryWithCtxUnlinkRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Path string `fidl_offset_v1:"0" fidl_bounds:"4096"`
+}
+
+var _mdirectoryWithCtxUnlinkRequest = _bindings.CreateLazyMarshaler(directoryWithCtxUnlinkRequest{})
+
+func (msg *directoryWithCtxUnlinkRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxUnlinkRequest
+}
+
+type directoryWithCtxUnlinkResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxUnlinkResponse = _bindings.CreateLazyMarshaler(directoryWithCtxUnlinkResponse{})
+
+func (msg *directoryWithCtxUnlinkResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxUnlinkResponse
+}
+
+type directoryWithCtxReadDirentsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ MaxBytes uint64 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxReadDirentsRequest = _bindings.CreateLazyMarshaler(directoryWithCtxReadDirentsRequest{})
+
+func (msg *directoryWithCtxReadDirentsRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxReadDirentsRequest
+}
+
+type directoryWithCtxReadDirentsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Dirents []uint8 `fidl_offset_v1:"8" fidl_bounds:"8192"`
+}
+
+var _mdirectoryWithCtxReadDirentsResponse = _bindings.CreateLazyMarshaler(directoryWithCtxReadDirentsResponse{})
+
+func (msg *directoryWithCtxReadDirentsResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxReadDirentsResponse
+}
+
+type directoryWithCtxRewindResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxRewindResponse = _bindings.CreateLazyMarshaler(directoryWithCtxRewindResponse{})
+
+func (msg *directoryWithCtxRewindResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxRewindResponse
+}
+
+type directoryWithCtxGetTokenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Token _zx.Handle `fidl_offset_v1:"4" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
+}
+
+var _mdirectoryWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetTokenResponse{})
+
+func (msg *directoryWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxGetTokenResponse
+}
+
+type directoryWithCtxRenameRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Src string `fidl_offset_v1:"0" fidl_bounds:"4096"`
+ DstParentToken _zx.Handle `fidl_offset_v1:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ Dst string `fidl_offset_v1:"24" fidl_bounds:"4096"`
+}
+
+var _mdirectoryWithCtxRenameRequest = _bindings.CreateLazyMarshaler(directoryWithCtxRenameRequest{})
+
+func (msg *directoryWithCtxRenameRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxRenameRequest
+}
+
+type directoryWithCtxRenameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxRenameResponse = _bindings.CreateLazyMarshaler(directoryWithCtxRenameResponse{})
+
+func (msg *directoryWithCtxRenameResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxRenameResponse
+}
+
+type directoryWithCtxLinkRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Src string `fidl_offset_v1:"0" fidl_bounds:"4096"`
+ DstParentToken _zx.Handle `fidl_offset_v1:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ Dst string `fidl_offset_v1:"24" fidl_bounds:"4096"`
+}
+
+var _mdirectoryWithCtxLinkRequest = _bindings.CreateLazyMarshaler(directoryWithCtxLinkRequest{})
+
+func (msg *directoryWithCtxLinkRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxLinkRequest
+}
+
+type directoryWithCtxLinkResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxLinkResponse = _bindings.CreateLazyMarshaler(directoryWithCtxLinkResponse{})
+
+func (msg *directoryWithCtxLinkResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxLinkResponse
+}
+
+type directoryWithCtxWatchRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Mask uint32 `fidl_offset_v1:"0"`
+ Options uint32 `fidl_offset_v1:"4"`
+ Watcher _zx.Channel `fidl_offset_v1:"8" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mdirectoryWithCtxWatchRequest = _bindings.CreateLazyMarshaler(directoryWithCtxWatchRequest{})
+
+func (msg *directoryWithCtxWatchRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxWatchRequest
+}
+
+type directoryWithCtxWatchResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxWatchResponse = _bindings.CreateLazyMarshaler(directoryWithCtxWatchResponse{})
+
+func (msg *directoryWithCtxWatchResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxWatchResponse
+}
+
+type directoryAdminWithCtxCloneRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mdirectoryAdminWithCtxCloneRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxCloneRequest{})
+
+func (msg *directoryAdminWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxCloneRequest
+}
+
+type directoryAdminWithCtxCloseResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxCloseResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxCloseResponse{})
+
+func (msg *directoryAdminWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxCloseResponse
+}
+
+type directoryAdminWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Info NodeInfo `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxDescribeResponse{})
+
+func (msg *directoryAdminWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxDescribeResponse
+}
+
+type directoryAdminWithCtxOnOpenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Info *NodeInfo `fidl_offset_v1:"8"`
+}
+
+var _mdirectoryAdminWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxOnOpenResponse{})
+
+func (msg *directoryAdminWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxOnOpenResponse
+}
+
+type directoryAdminWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxSyncResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxSyncResponse{})
+
+func (msg *directoryAdminWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxSyncResponse
+}
+
+type directoryAdminWithCtxGetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Attributes NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mdirectoryAdminWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxGetAttrResponse{})
+
+func (msg *directoryAdminWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxGetAttrResponse
+}
+
+type directoryAdminWithCtxSetAttrRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Attributes NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mdirectoryAdminWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxSetAttrRequest{})
+
+func (msg *directoryAdminWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxSetAttrRequest
+}
+
+type directoryAdminWithCtxSetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxSetAttrResponse{})
+
+func (msg *directoryAdminWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxSetAttrResponse
+}
+
+type directoryAdminWithCtxNodeGetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Flags uint32 `fidl_offset_v1:"4"`
+}
+
+var _mdirectoryAdminWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxNodeGetFlagsResponse{})
+
+func (msg *directoryAdminWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxNodeGetFlagsResponse
+}
+
+type directoryAdminWithCtxNodeSetFlagsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxNodeSetFlagsRequest{})
+
+func (msg *directoryAdminWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxNodeSetFlagsRequest
+}
+
+type directoryAdminWithCtxNodeSetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxNodeSetFlagsResponse{})
+
+func (msg *directoryAdminWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxNodeSetFlagsResponse
+}
+
+type directoryAdminWithCtxOpenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Mode uint32 `fidl_offset_v1:"4"`
+ Path string `fidl_offset_v1:"8" fidl_bounds:"4096"`
+ Object NodeWithCtxInterfaceRequest `fidl_offset_v1:"24" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mdirectoryAdminWithCtxOpenRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxOpenRequest{})
+
+func (msg *directoryAdminWithCtxOpenRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxOpenRequest
+}
+
+type directoryAdminWithCtxUnlinkRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Path string `fidl_offset_v1:"0" fidl_bounds:"4096"`
+}
+
+var _mdirectoryAdminWithCtxUnlinkRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxUnlinkRequest{})
+
+func (msg *directoryAdminWithCtxUnlinkRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxUnlinkRequest
+}
+
+type directoryAdminWithCtxUnlinkResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxUnlinkResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxUnlinkResponse{})
+
+func (msg *directoryAdminWithCtxUnlinkResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxUnlinkResponse
+}
+
+type directoryAdminWithCtxReadDirentsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ MaxBytes uint64 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxReadDirentsRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxReadDirentsRequest{})
+
+func (msg *directoryAdminWithCtxReadDirentsRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxReadDirentsRequest
+}
+
+type directoryAdminWithCtxReadDirentsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Dirents []uint8 `fidl_offset_v1:"8" fidl_bounds:"8192"`
+}
+
+var _mdirectoryAdminWithCtxReadDirentsResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxReadDirentsResponse{})
+
+func (msg *directoryAdminWithCtxReadDirentsResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxReadDirentsResponse
+}
+
+type directoryAdminWithCtxRewindResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxRewindResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxRewindResponse{})
+
+func (msg *directoryAdminWithCtxRewindResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxRewindResponse
+}
+
+type directoryAdminWithCtxGetTokenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Token _zx.Handle `fidl_offset_v1:"4" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"1"`
+}
+
+var _mdirectoryAdminWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxGetTokenResponse{})
+
+func (msg *directoryAdminWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxGetTokenResponse
+}
+
+type directoryAdminWithCtxRenameRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Src string `fidl_offset_v1:"0" fidl_bounds:"4096"`
+ DstParentToken _zx.Handle `fidl_offset_v1:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ Dst string `fidl_offset_v1:"24" fidl_bounds:"4096"`
+}
+
+var _mdirectoryAdminWithCtxRenameRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxRenameRequest{})
+
+func (msg *directoryAdminWithCtxRenameRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxRenameRequest
+}
+
+type directoryAdminWithCtxRenameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxRenameResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxRenameResponse{})
+
+func (msg *directoryAdminWithCtxRenameResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxRenameResponse
+}
+
+type directoryAdminWithCtxLinkRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Src string `fidl_offset_v1:"0" fidl_bounds:"4096"`
+ DstParentToken _zx.Handle `fidl_offset_v1:"16" fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ Dst string `fidl_offset_v1:"24" fidl_bounds:"4096"`
+}
+
+var _mdirectoryAdminWithCtxLinkRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxLinkRequest{})
+
+func (msg *directoryAdminWithCtxLinkRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxLinkRequest
+}
+
+type directoryAdminWithCtxLinkResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxLinkResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxLinkResponse{})
+
+func (msg *directoryAdminWithCtxLinkResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxLinkResponse
+}
+
+type directoryAdminWithCtxWatchRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Mask uint32 `fidl_offset_v1:"0"`
+ Options uint32 `fidl_offset_v1:"4"`
+ Watcher _zx.Channel `fidl_offset_v1:"8" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mdirectoryAdminWithCtxWatchRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxWatchRequest{})
+
+func (msg *directoryAdminWithCtxWatchRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxWatchRequest
+}
+
+type directoryAdminWithCtxWatchResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxWatchResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxWatchResponse{})
+
+func (msg *directoryAdminWithCtxWatchResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxWatchResponse
+}
+
+type directoryAdminWithCtxMountRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Remote DirectoryWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+}
+
+var _mdirectoryAdminWithCtxMountRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxMountRequest{})
+
+func (msg *directoryAdminWithCtxMountRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxMountRequest
+}
+
+type directoryAdminWithCtxMountResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxMountResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxMountResponse{})
+
+func (msg *directoryAdminWithCtxMountResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxMountResponse
+}
+
+type directoryAdminWithCtxMountAndCreateRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ Remote DirectoryWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+ Name string `fidl_offset_v1:"8" fidl_bounds:"255"`
+ Flags uint32 `fidl_offset_v1:"24"`
+}
+
+var _mdirectoryAdminWithCtxMountAndCreateRequest = _bindings.CreateLazyMarshaler(directoryAdminWithCtxMountAndCreateRequest{})
+
+func (msg *directoryAdminWithCtxMountAndCreateRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxMountAndCreateRequest
+}
+
+type directoryAdminWithCtxMountAndCreateResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxMountAndCreateResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxMountAndCreateResponse{})
+
+func (msg *directoryAdminWithCtxMountAndCreateResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxMountAndCreateResponse
+}
+
+type directoryAdminWithCtxUnmountResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryAdminWithCtxUnmountResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxUnmountResponse{})
+
+func (msg *directoryAdminWithCtxUnmountResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxUnmountResponse
+}
+
+type directoryAdminWithCtxUnmountNodeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Remote DirectoryWithCtxInterface `fidl_offset_v1:"4" fidl_handle_subtype:"4"`
+}
+
+var _mdirectoryAdminWithCtxUnmountNodeResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxUnmountNodeResponse{})
+
+func (msg *directoryAdminWithCtxUnmountNodeResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxUnmountNodeResponse
+}
+
+type directoryAdminWithCtxQueryFilesystemResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Info *FilesystemInfo `fidl_offset_v1:"8"`
+}
+
+var _mdirectoryAdminWithCtxQueryFilesystemResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxQueryFilesystemResponse{})
+
+func (msg *directoryAdminWithCtxQueryFilesystemResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxQueryFilesystemResponse
+}
+
+type directoryAdminWithCtxGetDevicePathResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Path *string `fidl_offset_v1:"8" fidl_bounds:"4096"`
+}
+
+var _mdirectoryAdminWithCtxGetDevicePathResponse = _bindings.CreateLazyMarshaler(directoryAdminWithCtxGetDevicePathResponse{})
+
+func (msg *directoryAdminWithCtxGetDevicePathResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryAdminWithCtxGetDevicePathResponse
+}
+
+type I_nodeInfoTag uint64
+
+const (
+ NodeInfoService = 1 // 0x00000001
+ NodeInfoFile = 2 // 0x00000002
+ NodeInfoDirectory = 3 // 0x00000003
+ NodeInfoPipe = 4 // 0x00000004
+ NodeInfoVmofile = 5 // 0x00000005
+ NodeInfoDevice = 6 // 0x00000006
+ NodeInfoTty = 7 // 0x00000007
+ NodeInfoDatagramSocket = 9 // 0x00000009
+ NodeInfoStreamSocket = 10 // 0x0000000a
+)
+
+// Describes how the connection to an should be handled, as well as
+// how to interpret the optional handle.
+//
+// Refer to `Node.Describe()` and `Node.OnOpen()` for usage.
+type NodeInfo struct {
+ I_nodeInfoTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Service Service `fidl_ordinal:"1"`
+ File FileObject `fidl_ordinal:"2"`
+ Directory DirectoryObject `fidl_ordinal:"3"`
+ Pipe Pipe `fidl_ordinal:"4"`
+ Vmofile Vmofile `fidl_ordinal:"5"`
+ Device Device `fidl_ordinal:"6"`
+ Tty Tty `fidl_ordinal:"7"`
+ DatagramSocket DatagramSocket `fidl_ordinal:"9"`
+ StreamSocket StreamSocket `fidl_ordinal:"10"`
+}
+
+func (_m *NodeInfo) reset() {
+ switch _m.I_nodeInfoTag {
+ case 1:
+ var _zeroed Service
+ _m.Service = _zeroed
+ case 2:
+ var _zeroed FileObject
+ _m.File = _zeroed
+ case 3:
+ var _zeroed DirectoryObject
+ _m.Directory = _zeroed
+ case 4:
+ var _zeroed Pipe
+ _m.Pipe = _zeroed
+ case 5:
+ var _zeroed Vmofile
+ _m.Vmofile = _zeroed
+ case 6:
+ var _zeroed Device
+ _m.Device = _zeroed
+ case 7:
+ var _zeroed Tty
+ _m.Tty = _zeroed
+ case 9:
+ var _zeroed DatagramSocket
+ _m.DatagramSocket = _zeroed
+ case 10:
+ var _zeroed StreamSocket
+ _m.StreamSocket = _zeroed
+ }
+}
+
+func (_m *NodeInfo) Which() I_nodeInfoTag {
+ return _m.I_nodeInfoTag
+}
+
+func (_m *NodeInfo) Ordinal() uint64 {
+ return uint64(_m.I_nodeInfoTag)
+}
+
+func (_m *NodeInfo) SetService(service Service) {
+ _m.reset()
+ _m.I_nodeInfoTag = NodeInfoService
+ _m.Service = service
+}
+
+func NodeInfoWithService(service Service) NodeInfo {
+ var _u NodeInfo
+ _u.SetService(service)
+ return _u
+}
+
+func (_m *NodeInfo) SetFile(file FileObject) {
+ _m.reset()
+ _m.I_nodeInfoTag = NodeInfoFile
+ _m.File = file
+}
+
+func NodeInfoWithFile(file FileObject) NodeInfo {
+ var _u NodeInfo
+ _u.SetFile(file)
+ return _u
+}
+
+func (_m *NodeInfo) SetDirectory(directory DirectoryObject) {
+ _m.reset()
+ _m.I_nodeInfoTag = NodeInfoDirectory
+ _m.Directory = directory
+}
+
+func NodeInfoWithDirectory(directory DirectoryObject) NodeInfo {
+ var _u NodeInfo
+ _u.SetDirectory(directory)
+ return _u
+}
+
+func (_m *NodeInfo) SetPipe(pipe Pipe) {
+ _m.reset()
+ _m.I_nodeInfoTag = NodeInfoPipe
+ _m.Pipe = pipe
+}
+
+func NodeInfoWithPipe(pipe Pipe) NodeInfo {
+ var _u NodeInfo
+ _u.SetPipe(pipe)
+ return _u
+}
+
+func (_m *NodeInfo) SetVmofile(vmofile Vmofile) {
+ _m.reset()
+ _m.I_nodeInfoTag = NodeInfoVmofile
+ _m.Vmofile = vmofile
+}
+
+func NodeInfoWithVmofile(vmofile Vmofile) NodeInfo {
+ var _u NodeInfo
+ _u.SetVmofile(vmofile)
+ return _u
+}
+
+func (_m *NodeInfo) SetDevice(device Device) {
+ _m.reset()
+ _m.I_nodeInfoTag = NodeInfoDevice
+ _m.Device = device
+}
+
+func NodeInfoWithDevice(device Device) NodeInfo {
+ var _u NodeInfo
+ _u.SetDevice(device)
+ return _u
+}
+
+func (_m *NodeInfo) SetTty(tty Tty) {
+ _m.reset()
+ _m.I_nodeInfoTag = NodeInfoTty
+ _m.Tty = tty
+}
+
+func NodeInfoWithTty(tty Tty) NodeInfo {
+ var _u NodeInfo
+ _u.SetTty(tty)
+ return _u
+}
+
+func (_m *NodeInfo) SetDatagramSocket(datagramSocket DatagramSocket) {
+ _m.reset()
+ _m.I_nodeInfoTag = NodeInfoDatagramSocket
+ _m.DatagramSocket = datagramSocket
+}
+
+func NodeInfoWithDatagramSocket(datagramSocket DatagramSocket) NodeInfo {
+ var _u NodeInfo
+ _u.SetDatagramSocket(datagramSocket)
+ return _u
+}
+
+func (_m *NodeInfo) SetStreamSocket(streamSocket StreamSocket) {
+ _m.reset()
+ _m.I_nodeInfoTag = NodeInfoStreamSocket
+ _m.StreamSocket = streamSocket
+}
+
+func NodeInfoWithStreamSocket(streamSocket StreamSocket) NodeInfo {
+ var _u NodeInfo
+ _u.SetStreamSocket(streamSocket)
+ return _u
+}
+
+const (
+ NodeCloneOrdinal uint64 = 0x5a61678f293ce16f
+ NodeCloseOrdinal uint64 = 0x5309c5bd1c33dc44
+ NodeDescribeOrdinal uint64 = 0xffcec215078dea0
+ NodeOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
+ NodeSyncOrdinal uint64 = 0x189d88326c18b519
+ NodeGetAttrOrdinal uint64 = 0x78985e216314dafd
+ NodeSetAttrOrdinal uint64 = 0x4186c0f40d938f46
+ NodeNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
+ NodeNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
+)
+
+type NodeWithCtxInterface _bindings.ChannelProxy
+
+// Create another connection to the same remote object.
+//
+// `flags` may be any of:
+//
+// - `OPEN_RIGHT_*`
+// - `OPEN_FLAG_APPEND`
+// - `OPEN_FLAG_NO_REMOTE`
+// - `OPEN_FLAG_DESCRIBE`
+// - `CLONE_FLAG_SAME_RIGHTS`
+//
+// All other flags are ignored.
+//
+// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+// cloned object.
+// The cloned object must have rights less than or equal to the original object.
+// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+// `CLONE_FLAG_SAME_RIGHTS`.
+func (p *NodeWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error {
+ req_ := &nodeWithCtxCloneRequest{
+ Flags: flags,
+ Object: object,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(NodeCloneOrdinal, req_)
+ return err_
+}
+
+// Terminates connection with object.
+//
+// This method does not require any rights.
+func (p *NodeWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &nodeWithCtxCloseResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeCloseOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Returns extra information about the type of the object.
+// If the `Describe` operation fails, the connection is closed.
+//
+// This method does not require any rights.
+func (p *NodeWithCtxInterface) Describe(ctx_ _bindings.Context) (NodeInfo, error) {
+ var req_ _bindings.Message
+ resp_ := &nodeWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+//
+// Indicates the success or failure of the open operation, and optionally describes the
+// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+// (the same as would be returned by `Describe`).
+func (p *NodeWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfo, error) {
+ resp_ := &nodeWithCtxOnOpenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(NodeOnOpenOrdinal, resp_)
+ return resp_.S, resp_.Info, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method does not require any rights.
+func (p *NodeWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &nodeWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeSyncOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires information about the node.
+//
+// This method does not require any rights.
+func (p *NodeWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) {
+ var req_ _bindings.Message
+ resp_ := &nodeWithCtxGetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeGetAttrOrdinal, req_, resp_)
+ return resp_.S, resp_.Attributes, err_
+}
+
+// Updates information about the node.
+// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *NodeWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error) {
+ req_ := &nodeWithCtxSetAttrRequest{
+ Flags: flags,
+ Attributes: attributes,
+ }
+ resp_ := &nodeWithCtxSetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeSetAttrOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *NodeWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ var req_ _bindings.Message
+ resp_ := &nodeWithCtxNodeGetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeNodeGetFlagsOrdinal, req_, resp_)
+ return resp_.S, resp_.Flags, err_
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *NodeWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ req_ := &nodeWithCtxNodeSetFlagsRequest{
+ Flags: flags,
+ }
+ resp_ := &nodeWithCtxNodeSetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeNodeSetFlagsOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Node defines the minimal interface for entities which can be accessed in a filesystem.
+type NodeWithCtx interface {
+ // Create another connection to the same remote object.
+ //
+ // `flags` may be any of:
+ //
+ // - `OPEN_RIGHT_*`
+ // - `OPEN_FLAG_APPEND`
+ // - `OPEN_FLAG_NO_REMOTE`
+ // - `OPEN_FLAG_DESCRIBE`
+ // - `CLONE_FLAG_SAME_RIGHTS`
+ //
+ // All other flags are ignored.
+ //
+ // The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+ // cloned object.
+ // The cloned object must have rights less than or equal to the original object.
+ // Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+ // It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+ // `CLONE_FLAG_SAME_RIGHTS`.
+ Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error
+ // Terminates connection with object.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) (int32, error)
+ // Returns extra information about the type of the object.
+ // If the `Describe` operation fails, the connection is closed.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context) (NodeInfo, error)
+ // An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+ //
+ // Indicates the success or failure of the open operation, and optionally describes the
+ // object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+ // (the same as would be returned by `Describe`).
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (int32, error)
+ // Acquires information about the node.
+ //
+ // This method does not require any rights.
+ GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error)
+ // Updates information about the node.
+ // `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error)
+ // Acquires the `Directory.Open` rights and flags used to access this file.
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as GetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
+ // Changes the `Directory.Open` flags used to access the file.
+ // Supported flags which can be turned on / off:
+ // - `OPEN_FLAG_APPEND`
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as SetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
+}
+
+type NodeWithCtxTransitionalBase struct{}
+
+func (_ *NodeWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ panic("Not Implemented")
+}
+func (_ *NodeWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ panic("Not Implemented")
+}
+
+type NodeWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewNodeWithCtxInterfaceRequest() (NodeWithCtxInterfaceRequest, *NodeWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return NodeWithCtxInterfaceRequest(req), (*NodeWithCtxInterface)(cli), err
+}
+
+type NodeWithCtxStub struct {
+ Impl NodeWithCtx
+}
+
+func (s_ *NodeWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case NodeCloneOrdinal:
+ in_ := nodeWithCtxCloneRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
+ return nil, false, err_
+ case NodeCloseOrdinal:
+ s, err_ := s_.Impl.Close(args_.Ctx)
+ out_ := nodeWithCtxCloseResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case NodeDescribeOrdinal:
+ info, err_ := s_.Impl.Describe(args_.Ctx)
+ out_ := nodeWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case NodeSyncOrdinal:
+ s, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := nodeWithCtxSyncResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case NodeGetAttrOrdinal:
+ s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
+ out_ := nodeWithCtxGetAttrResponse{}
+ out_.S = s
+ out_.Attributes = attributes
+ return &out_, true, err_
+ case NodeSetAttrOrdinal:
+ in_ := nodeWithCtxSetAttrRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
+ out_ := nodeWithCtxSetAttrResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case NodeNodeGetFlagsOrdinal:
+ s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
+ out_ := nodeWithCtxNodeGetFlagsResponse{}
+ out_.S = s
+ out_.Flags = flags
+ return &out_, true, err_
+ case NodeNodeSetFlagsOrdinal:
+ in_ := nodeWithCtxNodeSetFlagsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
+ out_ := nodeWithCtxNodeSetFlagsResponse{}
+ out_.S = s
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type NodeEventProxy _bindings.ChannelProxy
+
+func (p *NodeEventProxy) OnOpen(s int32, info *NodeInfo) error {
+ event_ := &nodeWithCtxOnOpenResponse{
+ S: s,
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(NodeOnOpenOrdinal, event_)
+}
+
+const (
+ FileAdvisoryLockOrdinal uint64 = 0x6358e94c468026fa
+ FileCloneOrdinal uint64 = 0x5a61678f293ce16f
+ FileCloseOrdinal uint64 = 0x5309c5bd1c33dc44
+ FileDescribeOrdinal uint64 = 0xffcec215078dea0
+ FileOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
+ FileSyncOrdinal uint64 = 0x189d88326c18b519
+ FileGetAttrOrdinal uint64 = 0x78985e216314dafd
+ FileSetAttrOrdinal uint64 = 0x4186c0f40d938f46
+ FileNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
+ FileNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
+ FileReadOrdinal uint64 = 0x29b2b7074c95208c
+ FileReadAtOrdinal uint64 = 0x6527ee3fbc9c5749
+ FileWriteOrdinal uint64 = 0x3b6432f57914225b
+ FileWriteAtOrdinal uint64 = 0x4b29e1582ab379e4
+ FileSeekOrdinal uint64 = 0x324968e9b8a0e394
+ FileTruncateOrdinal uint64 = 0x5ec8f337359a2ddb
+ FileGetFlagsOrdinal uint64 = 0x200be82ca523ab96
+ FileSetFlagsOrdinal uint64 = 0x713f375258671141
+ FileGetBufferOrdinal uint64 = 0x4b93b8486666d951
+)
+
+type FileWithCtxInterface _bindings.ChannelProxy
+
+// Acquires an advisory lock on the underlying file.
+//
+// The lock lasts until either this connection is closed or
+// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
+// explicitly.
+//
+// Advisory locks are purely advisory. They do not prevent actual read or
+// write operations from occurring on the file, either through this
+// connection or through other connections.
+//
+// This method requires the following rights:
+//
+// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
+// * [`Rights.WRITE_BYTES`] if `request.type` is
+// [`AdvisoryLockType.WRITE`].
+//
+// # Errors
+//
+// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
+// example, another connection might hold a conflicting lock type.
+// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
+// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
+// to acquire the given type of lock.
+func (p *FileWithCtxInterface) AdvisoryLock(ctx_ _bindings.Context, request fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error) {
+ req_ := &fileWithCtxAdvisoryLockRequest{
+ Request: request,
+ }
+ resp_ := &fileWithCtxAdvisoryLockResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileAdvisoryLockOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Create another connection to the same remote object.
+//
+// `flags` may be any of:
+//
+// - `OPEN_RIGHT_*`
+// - `OPEN_FLAG_APPEND`
+// - `OPEN_FLAG_NO_REMOTE`
+// - `OPEN_FLAG_DESCRIBE`
+// - `CLONE_FLAG_SAME_RIGHTS`
+//
+// All other flags are ignored.
+//
+// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+// cloned object.
+// The cloned object must have rights less than or equal to the original object.
+// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+// `CLONE_FLAG_SAME_RIGHTS`.
+func (p *FileWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error {
+ req_ := &fileWithCtxCloneRequest{
+ Flags: flags,
+ Object: object,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(FileCloneOrdinal, req_)
+ return err_
+}
+
+// Terminates connection with object.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &fileWithCtxCloseResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileCloseOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Returns extra information about the type of the object.
+// If the `Describe` operation fails, the connection is closed.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) Describe(ctx_ _bindings.Context) (NodeInfo, error) {
+ var req_ _bindings.Message
+ resp_ := &fileWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+//
+// Indicates the success or failure of the open operation, and optionally describes the
+// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+// (the same as would be returned by `Describe`).
+func (p *FileWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfo, error) {
+ resp_ := &fileWithCtxOnOpenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(FileOnOpenOrdinal, resp_)
+ return resp_.S, resp_.Info, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &fileWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSyncOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires information about the node.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) {
+ var req_ _bindings.Message
+ resp_ := &fileWithCtxGetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetAttrOrdinal, req_, resp_)
+ return resp_.S, resp_.Attributes, err_
+}
+
+// Updates information about the node.
+// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *FileWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error) {
+ req_ := &fileWithCtxSetAttrRequest{
+ Flags: flags,
+ Attributes: attributes,
+ }
+ resp_ := &fileWithCtxSetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSetAttrOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *FileWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ var req_ _bindings.Message
+ resp_ := &fileWithCtxNodeGetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileNodeGetFlagsOrdinal, req_, resp_)
+ return resp_.S, resp_.Flags, err_
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *FileWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ req_ := &fileWithCtxNodeSetFlagsRequest{
+ Flags: flags,
+ }
+ resp_ := &fileWithCtxNodeSetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileNodeSetFlagsOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Reads `count` bytes at the seek offset.
+// The seek offset is moved forward by the number of bytes read.
+//
+// This method requires following rights: `OPEN_RIGHT_READABLE`, otherwise returns
+// `ZX_ERR_BAD_HANDLE`.
+func (p *FileWithCtxInterface) Read(ctx_ _bindings.Context, count uint64) (int32, []uint8, error) {
+ req_ := &fileWithCtxReadRequest{
+ Count: count,
+ }
+ resp_ := &fileWithCtxReadResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileReadOrdinal, req_, resp_)
+ return resp_.S, resp_.Data, err_
+}
+
+// Reads `count` bytes at the provided offset.
+// Does not affect the seek offset.
+//
+// This method requires following rights: `OPEN_RIGHT_READABLE`, otherwise returns
+// `ZX_ERR_BAD_HANDLE`.
+func (p *FileWithCtxInterface) ReadAt(ctx_ _bindings.Context, count uint64, offset uint64) (int32, []uint8, error) {
+ req_ := &fileWithCtxReadAtRequest{
+ Count: count,
+ Offset: offset,
+ }
+ resp_ := &fileWithCtxReadAtResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileReadAtOrdinal, req_, resp_)
+ return resp_.S, resp_.Data, err_
+}
+
+// Writes data at the seek offset.
+// The seek offset is moved forward by the number of bytes written.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
+// `ZX_ERR_BAD_HANDLE`.
+func (p *FileWithCtxInterface) Write(ctx_ _bindings.Context, data []uint8) (int32, uint64, error) {
+ req_ := &fileWithCtxWriteRequest{
+ Data: data,
+ }
+ resp_ := &fileWithCtxWriteResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileWriteOrdinal, req_, resp_)
+ return resp_.S, resp_.Actual, err_
+}
+
+// Writes data to the provided offset.
+// Does not affect the seek offset.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
+// `ZX_ERR_BAD_HANDLE`.
+func (p *FileWithCtxInterface) WriteAt(ctx_ _bindings.Context, data []uint8, offset uint64) (int32, uint64, error) {
+ req_ := &fileWithCtxWriteAtRequest{
+ Data: data,
+ Offset: offset,
+ }
+ resp_ := &fileWithCtxWriteAtResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileWriteAtOrdinal, req_, resp_)
+ return resp_.S, resp_.Actual, err_
+}
+
+// Moves the offset at which the next invocation of `Read()` or `Write()` will
+// occur.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) Seek(ctx_ _bindings.Context, offset int64, start SeekOrigin) (int32, uint64, error) {
+ req_ := &fileWithCtxSeekRequest{
+ Offset: offset,
+ Start: start,
+ }
+ resp_ := &fileWithCtxSeekResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSeekOrdinal, req_, resp_)
+ return resp_.S, resp_.Offset, err_
+}
+
+// Shrinks the file size to 'length' bytes.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
+// `ZX_ERR_BAD_HANDLE`.
+func (p *FileWithCtxInterface) Truncate(ctx_ _bindings.Context, length uint64) (int32, error) {
+ req_ := &fileWithCtxTruncateRequest{
+ Length: length,
+ }
+ resp_ := &fileWithCtxTruncateResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileTruncateOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) GetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ var req_ _bindings.Message
+ resp_ := &fileWithCtxGetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetFlagsOrdinal, req_, resp_)
+ return resp_.S, resp_.Flags, err_
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) SetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ req_ := &fileWithCtxSetFlagsRequest{
+ Flags: flags,
+ }
+ resp_ := &fileWithCtxSetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSetFlagsOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires a buffer representing this file, if there is one, with the
+// requested access rights.
+//
+// `flags` may be any of `VMO_FLAG_*`.
+//
+// This method requires following rights:
+//
+// - `OPEN_RIGHT_WRITABLE` if `flags` includes `VMO_FLAG_WRITE`.
+// - `OPEN_RIGHT_READABLE` if `flags` includes `VMO_FLAG_READ` or `VMO_FLAG_EXEC`.
+func (p *FileWithCtxInterface) GetBuffer(ctx_ _bindings.Context, flags uint32) (int32, *fuchsiamem.Buffer, error) {
+ req_ := &fileWithCtxGetBufferRequest{
+ Flags: flags,
+ }
+ resp_ := &fileWithCtxGetBufferResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetBufferOrdinal, req_, resp_)
+ return resp_.S, resp_.Buffer, err_
+}
+
+// File defines the interface of a node which contains a flat layout of data.
+type FileWithCtx interface {
+ // Acquires an advisory lock on the underlying file.
+ //
+ // The lock lasts until either this connection is closed or
+ // this method is called with |AdvisoryLockType.UNLOCK| to release the lock
+ // explicitly.
+ //
+ // Advisory locks are purely advisory. They do not prevent actual read or
+ // write operations from occurring on the file, either through this
+ // connection or through other connections.
+ //
+ // This method requires the following rights:
+ //
+ // * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
+ // * [`Rights.WRITE_BYTES`] if `request.type` is
+ // [`AdvisoryLockType.WRITE`].
+ //
+ // # Errors
+ //
+ // * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
+ // example, another connection might hold a conflicting lock type.
+ // * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
+ // * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
+ // to acquire the given type of lock.
+ AdvisoryLock(ctx_ _bindings.Context, request fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error)
+ // Create another connection to the same remote object.
+ //
+ // `flags` may be any of:
+ //
+ // - `OPEN_RIGHT_*`
+ // - `OPEN_FLAG_APPEND`
+ // - `OPEN_FLAG_NO_REMOTE`
+ // - `OPEN_FLAG_DESCRIBE`
+ // - `CLONE_FLAG_SAME_RIGHTS`
+ //
+ // All other flags are ignored.
+ //
+ // The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+ // cloned object.
+ // The cloned object must have rights less than or equal to the original object.
+ // Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+ // It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+ // `CLONE_FLAG_SAME_RIGHTS`.
+ Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error
+ // Terminates connection with object.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) (int32, error)
+ // Returns extra information about the type of the object.
+ // If the `Describe` operation fails, the connection is closed.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context) (NodeInfo, error)
+ // An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+ //
+ // Indicates the success or failure of the open operation, and optionally describes the
+ // object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+ // (the same as would be returned by `Describe`).
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (int32, error)
+ // Acquires information about the node.
+ //
+ // This method does not require any rights.
+ GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error)
+ // Updates information about the node.
+ // `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error)
+ // Acquires the `Directory.Open` rights and flags used to access this file.
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as GetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
+ // Changes the `Directory.Open` flags used to access the file.
+ // Supported flags which can be turned on / off:
+ // - `OPEN_FLAG_APPEND`
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as SetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
+ // Reads `count` bytes at the seek offset.
+ // The seek offset is moved forward by the number of bytes read.
+ //
+ // This method requires following rights: `OPEN_RIGHT_READABLE`, otherwise returns
+ // `ZX_ERR_BAD_HANDLE`.
+ Read(ctx_ _bindings.Context, count uint64) (int32, []uint8, error)
+ // Reads `count` bytes at the provided offset.
+ // Does not affect the seek offset.
+ //
+ // This method requires following rights: `OPEN_RIGHT_READABLE`, otherwise returns
+ // `ZX_ERR_BAD_HANDLE`.
+ ReadAt(ctx_ _bindings.Context, count uint64, offset uint64) (int32, []uint8, error)
+ // Writes data at the seek offset.
+ // The seek offset is moved forward by the number of bytes written.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
+ // `ZX_ERR_BAD_HANDLE`.
+ Write(ctx_ _bindings.Context, data []uint8) (int32, uint64, error)
+ // Writes data to the provided offset.
+ // Does not affect the seek offset.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
+ // `ZX_ERR_BAD_HANDLE`.
+ WriteAt(ctx_ _bindings.Context, data []uint8, offset uint64) (int32, uint64, error)
+ // Moves the offset at which the next invocation of `Read()` or `Write()` will
+ // occur.
+ //
+ // This method does not require any rights.
+ Seek(ctx_ _bindings.Context, offset int64, start SeekOrigin) (int32, uint64, error)
+ // Shrinks the file size to 'length' bytes.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`, otherwise returns
+ // `ZX_ERR_BAD_HANDLE`.
+ Truncate(ctx_ _bindings.Context, length uint64) (int32, error)
+ // Acquires the `Directory.Open` rights and flags used to access this file.
+ //
+ // This method does not require any rights.
+ GetFlags(ctx_ _bindings.Context) (int32, uint32, error)
+ // Changes the `Directory.Open` flags used to access the file.
+ // Supported flags which can be turned on / off:
+ // - `OPEN_FLAG_APPEND`
+ //
+ // This method does not require any rights.
+ SetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
+ // Acquires a buffer representing this file, if there is one, with the
+ // requested access rights.
+ //
+ // `flags` may be any of `VMO_FLAG_*`.
+ //
+ // This method requires following rights:
+ //
+ // - `OPEN_RIGHT_WRITABLE` if `flags` includes `VMO_FLAG_WRITE`.
+ // - `OPEN_RIGHT_READABLE` if `flags` includes `VMO_FLAG_READ` or `VMO_FLAG_EXEC`.
+ GetBuffer(ctx_ _bindings.Context, flags uint32) (int32, *fuchsiamem.Buffer, error)
+}
+
+type FileWithCtxTransitionalBase struct{}
+
+func (_ *FileWithCtxTransitionalBase) AdvisoryLock(ctx_ _bindings.Context, request fuchsiaio2.AdvisoryLockRequest) (fuchsiaio2.AdvisoryLockingAdvisoryLockResult, error) {
+ panic("Not Implemented")
+}
+func (_ *FileWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ panic("Not Implemented")
+}
+func (_ *FileWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ panic("Not Implemented")
+}
+
+type FileWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewFileWithCtxInterfaceRequest() (FileWithCtxInterfaceRequest, *FileWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return FileWithCtxInterfaceRequest(req), (*FileWithCtxInterface)(cli), err
+}
+
+type FileWithCtxStub struct {
+ Impl FileWithCtx
+}
+
+func (s_ *FileWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case FileAdvisoryLockOrdinal:
+ in_ := fileWithCtxAdvisoryLockRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, in_.Request)
+ out_ := fileWithCtxAdvisoryLockResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileCloneOrdinal:
+ in_ := fileWithCtxCloneRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
+ return nil, false, err_
+ case FileCloseOrdinal:
+ s, err_ := s_.Impl.Close(args_.Ctx)
+ out_ := fileWithCtxCloseResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case FileDescribeOrdinal:
+ info, err_ := s_.Impl.Describe(args_.Ctx)
+ out_ := fileWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case FileSyncOrdinal:
+ s, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := fileWithCtxSyncResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case FileGetAttrOrdinal:
+ s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
+ out_ := fileWithCtxGetAttrResponse{}
+ out_.S = s
+ out_.Attributes = attributes
+ return &out_, true, err_
+ case FileSetAttrOrdinal:
+ in_ := fileWithCtxSetAttrRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
+ out_ := fileWithCtxSetAttrResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case FileNodeGetFlagsOrdinal:
+ s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
+ out_ := fileWithCtxNodeGetFlagsResponse{}
+ out_.S = s
+ out_.Flags = flags
+ return &out_, true, err_
+ case FileNodeSetFlagsOrdinal:
+ in_ := fileWithCtxNodeSetFlagsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
+ out_ := fileWithCtxNodeSetFlagsResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case FileReadOrdinal:
+ in_ := fileWithCtxReadRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, data, err_ := s_.Impl.Read(args_.Ctx, in_.Count)
+ out_ := fileWithCtxReadResponse{}
+ out_.S = s
+ out_.Data = data
+ return &out_, true, err_
+ case FileReadAtOrdinal:
+ in_ := fileWithCtxReadAtRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, data, err_ := s_.Impl.ReadAt(args_.Ctx, in_.Count, in_.Offset)
+ out_ := fileWithCtxReadAtResponse{}
+ out_.S = s
+ out_.Data = data
+ return &out_, true, err_
+ case FileWriteOrdinal:
+ in_ := fileWithCtxWriteRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, actual, err_ := s_.Impl.Write(args_.Ctx, in_.Data)
+ out_ := fileWithCtxWriteResponse{}
+ out_.S = s
+ out_.Actual = actual
+ return &out_, true, err_
+ case FileWriteAtOrdinal:
+ in_ := fileWithCtxWriteAtRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, actual, err_ := s_.Impl.WriteAt(args_.Ctx, in_.Data, in_.Offset)
+ out_ := fileWithCtxWriteAtResponse{}
+ out_.S = s
+ out_.Actual = actual
+ return &out_, true, err_
+ case FileSeekOrdinal:
+ in_ := fileWithCtxSeekRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, offset, err_ := s_.Impl.Seek(args_.Ctx, in_.Offset, in_.Start)
+ out_ := fileWithCtxSeekResponse{}
+ out_.S = s
+ out_.Offset = offset
+ return &out_, true, err_
+ case FileTruncateOrdinal:
+ in_ := fileWithCtxTruncateRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Truncate(args_.Ctx, in_.Length)
+ out_ := fileWithCtxTruncateResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case FileGetFlagsOrdinal:
+ s, flags, err_ := s_.Impl.GetFlags(args_.Ctx)
+ out_ := fileWithCtxGetFlagsResponse{}
+ out_.S = s
+ out_.Flags = flags
+ return &out_, true, err_
+ case FileSetFlagsOrdinal:
+ in_ := fileWithCtxSetFlagsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.SetFlags(args_.Ctx, in_.Flags)
+ out_ := fileWithCtxSetFlagsResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case FileGetBufferOrdinal:
+ in_ := fileWithCtxGetBufferRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, buffer, err_ := s_.Impl.GetBuffer(args_.Ctx, in_.Flags)
+ out_ := fileWithCtxGetBufferResponse{}
+ out_.S = s
+ out_.Buffer = buffer
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type FileEventProxy _bindings.ChannelProxy
+
+func (p *FileEventProxy) OnOpen(s int32, info *NodeInfo) error {
+ event_ := &fileWithCtxOnOpenResponse{
+ S: s,
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(FileOnOpenOrdinal, event_)
+}
+
+const (
+ DirectoryWatcherOnEventOrdinal uint64 = 0x3937a088fe53412a
+)
+
+type DirectoryWatcherWithCtxInterface _bindings.ChannelProxy
+
+func (p *DirectoryWatcherWithCtxInterface) OnEvent(ctx_ _bindings.Context, events []uint8) error {
+ req_ := &directoryWatcherWithCtxOnEventRequest{
+ Events: events,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryWatcherOnEventOrdinal, req_)
+ return err_
+}
+
+// DirectoryWatcher transmits messages from a filesystem server
+// about events happening in the filesystem. Clients can register
+// new watchers using the `Directory.Watch` method, where they can
+// filter which events they want to receive notifications for.
+type DirectoryWatcherWithCtx interface {
+ OnEvent(ctx_ _bindings.Context, events []uint8) error
+}
+
+type DirectoryWatcherWithCtxTransitionalBase struct{}
+
+type DirectoryWatcherWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDirectoryWatcherWithCtxInterfaceRequest() (DirectoryWatcherWithCtxInterfaceRequest, *DirectoryWatcherWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DirectoryWatcherWithCtxInterfaceRequest(req), (*DirectoryWatcherWithCtxInterface)(cli), err
+}
+
+type DirectoryWatcherWithCtxStub struct {
+ Impl DirectoryWatcherWithCtx
+}
+
+func (s_ *DirectoryWatcherWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DirectoryWatcherOnEventOrdinal:
+ in_ := directoryWatcherWithCtxOnEventRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.OnEvent(args_.Ctx, in_.Events)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DirectoryWatcherEventProxy _bindings.ChannelProxy
+
+const (
+ DirectoryCloneOrdinal uint64 = 0x5a61678f293ce16f
+ DirectoryCloseOrdinal uint64 = 0x5309c5bd1c33dc44
+ DirectoryDescribeOrdinal uint64 = 0xffcec215078dea0
+ DirectoryOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
+ DirectorySyncOrdinal uint64 = 0x189d88326c18b519
+ DirectoryGetAttrOrdinal uint64 = 0x78985e216314dafd
+ DirectorySetAttrOrdinal uint64 = 0x4186c0f40d938f46
+ DirectoryNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
+ DirectoryNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
+ DirectoryOpenOrdinal uint64 = 0x2c5044561d685ec0
+ DirectoryUnlinkOrdinal uint64 = 0x5a0ff90760a8bc23
+ DirectoryReadDirentsOrdinal uint64 = 0x3582806bf27faa0a
+ DirectoryRewindOrdinal uint64 = 0x16b1202af0f34c71
+ DirectoryGetTokenOrdinal uint64 = 0x26ae9d18763c8655
+ DirectoryRenameOrdinal uint64 = 0xa8e00a247f3c905
+ DirectoryLinkOrdinal uint64 = 0x740604c0c7c930e7
+ DirectoryWatchOrdinal uint64 = 0x5717193a59d66d91
+)
+
+type DirectoryWithCtxInterface _bindings.ChannelProxy
+
+// Create another connection to the same remote object.
+//
+// `flags` may be any of:
+//
+// - `OPEN_RIGHT_*`
+// - `OPEN_FLAG_APPEND`
+// - `OPEN_FLAG_NO_REMOTE`
+// - `OPEN_FLAG_DESCRIBE`
+// - `CLONE_FLAG_SAME_RIGHTS`
+//
+// All other flags are ignored.
+//
+// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+// cloned object.
+// The cloned object must have rights less than or equal to the original object.
+// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+// `CLONE_FLAG_SAME_RIGHTS`.
+func (p *DirectoryWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error {
+ req_ := &directoryWithCtxCloneRequest{
+ Flags: flags,
+ Object: object,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryCloneOrdinal, req_)
+ return err_
+}
+
+// Terminates connection with object.
+//
+// This method does not require any rights.
+func (p *DirectoryWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWithCtxCloseResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryCloseOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Returns extra information about the type of the object.
+// If the `Describe` operation fails, the connection is closed.
+//
+// This method does not require any rights.
+func (p *DirectoryWithCtxInterface) Describe(ctx_ _bindings.Context) (NodeInfo, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+//
+// Indicates the success or failure of the open operation, and optionally describes the
+// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+// (the same as would be returned by `Describe`).
+func (p *DirectoryWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfo, error) {
+ resp_ := &directoryWithCtxOnOpenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(DirectoryOnOpenOrdinal, resp_)
+ return resp_.S, resp_.Info, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method does not require any rights.
+func (p *DirectoryWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectorySyncOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires information about the node.
+//
+// This method does not require any rights.
+func (p *DirectoryWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWithCtxGetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetAttrOrdinal, req_, resp_)
+ return resp_.S, resp_.Attributes, err_
+}
+
+// Updates information about the node.
+// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error) {
+ req_ := &directoryWithCtxSetAttrRequest{
+ Flags: flags,
+ Attributes: attributes,
+ }
+ resp_ := &directoryWithCtxSetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectorySetAttrOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DirectoryWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWithCtxNodeGetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryNodeGetFlagsOrdinal, req_, resp_)
+ return resp_.S, resp_.Flags, err_
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DirectoryWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ req_ := &directoryWithCtxNodeSetFlagsRequest{
+ Flags: flags,
+ }
+ resp_ := &directoryWithCtxNodeSetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryNodeSetFlagsOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Opens a new object relative to this directory object.
+//
+// `path` may contain multiple segments, separated by "/" characters,
+// and should never be empty; i.e., "" is an invalid path. Paths should not contain
+// a leading "/".
+//
+// `flags` may be any of the `OPEN_FLAG_*` and `OPEN_RIGHT_*` values, bitwise ORed together.
+// The `OPEN_FLAG_DESCRIBE` flag may cause an `OnOpen` event to be transmitted
+// on the `object` handle, indicating the type of object opened.
+//
+// If an unknown value is sent for either flags or mode, the connection should
+// be closed.
+//
+// `OPEN_RIGHT_*` flags provided in `flags` will restrict access rights on
+// the `object` channel which will be connected to the opened entity.
+//
+// Rights are never increased. When you open a nested entity within a directory, you may only
+// request the same rights as what the directory connection already has, or a subset of those.
+// Exceeding those rights causes an access denied error to be transmitted in the
+// `OnOpen` event if applicable, and the `object` connection closed.
+//
+// The caller must specify either one or more of the `OPEN_RIGHT_*` flags, or
+// the `OPEN_FLAG_NODE_REFERENCE` flag.
+func (p *DirectoryWithCtxInterface) Open(ctx_ _bindings.Context, flags uint32, mode uint32, path string, object NodeWithCtxInterfaceRequest) error {
+ req_ := &directoryWithCtxOpenRequest{
+ Flags: flags,
+ Mode: mode,
+ Path: path,
+ Object: object,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryOpenOrdinal, req_)
+ return err_
+}
+
+// Detaches an object from this directory object.
+//
+// The underlying object may or may not be deleted after this method
+// completes: although the link will be removed from the containing directory,
+// objects with multiple references (such as files which are still open)
+// will not actually be destroyed until all references are removed.
+//
+// If a directory is unlinked while it still has an open reference,
+// it must become read-only, preventing new entries from being created
+// until all references close and the directory is destroyed.
+//
+// `path` identifies the file which should be detached.
+// If `path` contains multiple segments, separated by "/" characters,
+// then the directory is traversed, one segment at a time, relative to the
+// originally accessed Directory.
+//
+// Returns:
+// `ZX_ERR_ACCESS_DENIED` if the connection (or the underlying filesystem) does not
+// allow writable access.
+// `ZX_ERR_INVALID_ARGS` if `path` contains ".." segments.
+// `ZX_ERR_NOT_EMPTY` if `path` refers to a non-empty directory.
+// `ZX_ERR_UNAVAILABLE` if `path` refers to a mount point, containing a remote channel.
+// `ZX_ERR_UNAVAILABLE` if `path` is ".".
+//
+// Other errors may be returned for filesystem-specific reasons.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryWithCtxInterface) Unlink(ctx_ _bindings.Context, path string) (int32, error) {
+ req_ := &directoryWithCtxUnlinkRequest{
+ Path: path,
+ }
+ resp_ := &directoryWithCtxUnlinkResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryUnlinkOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Reads a collection of variably sized dirents into a buffer.
+// The number of dirents in a directory may be very large: akin to
+// calling read multiple times on a file, directories have a seek
+// offset which is updated on subsequent calls to ReadDirents.
+//
+// These dirents are of the form:
+// ```
+// struct dirent {
+// // Describes the inode of the entry.
+// uint64 ino;
+// // Describes the length of the dirent name in bytes.
+// uint8 size;
+// // Describes the type of the entry. Aligned with the
+// // POSIX d_type values. Use `DIRENT_TYPE_*` constants.
+// uint8 type;
+// // Unterminated name of entry.
+// char name[0];
+// }
+// ```
+//
+// This method does not require any rights, since one could always probe for
+// directory contents by triggering name conflicts during file creation.
+func (p *DirectoryWithCtxInterface) ReadDirents(ctx_ _bindings.Context, maxBytes uint64) (int32, []uint8, error) {
+ req_ := &directoryWithCtxReadDirentsRequest{
+ MaxBytes: maxBytes,
+ }
+ resp_ := &directoryWithCtxReadDirentsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryReadDirentsOrdinal, req_, resp_)
+ return resp_.S, resp_.Dirents, err_
+}
+
+// Resets the directory seek offset.
+//
+// This method does not require any rights, similar to ReadDirents.
+func (p *DirectoryWithCtxInterface) Rewind(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWithCtxRewindResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryRewindOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires a token to a Directory which can be used to identify
+// access to it at a later point in time.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryWithCtxInterface) GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWithCtxGetTokenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetTokenOrdinal, req_, resp_)
+ return resp_.S, resp_.Token, err_
+}
+
+// Renames an object named src to the name dst, in a directory represented by token.
+//
+// `src/dst` must be resolved object names. Including "/" in any position
+// other than the end of the string will return `ZX_ERR_INVALID_ARGS`.
+// Returning "/" at the end of either string implies that it must be a
+// directory, or else `ZX_ERR_NOT_DIR` should be returned.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryWithCtxInterface) Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) {
+ req_ := &directoryWithCtxRenameRequest{
+ Src: src,
+ DstParentToken: dstParentToken,
+ Dst: dst,
+ }
+ resp_ := &directoryWithCtxRenameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryRenameOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Creates a link to an object named src by the name dst, within a directory represented by
+// token.
+//
+// `src` must be a resolved object name. Including "/" in the string will
+// return `ZX_ERR_INVALID_ARGS`.
+//
+// `dst` must be a resolved object name. Including "/" in the string will
+// return `ZX_ERR_INVALID_ARGS`.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryWithCtxInterface) Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) {
+ req_ := &directoryWithCtxLinkRequest{
+ Src: src,
+ DstParentToken: dstParentToken,
+ Dst: dst,
+ }
+ resp_ := &directoryWithCtxLinkResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryLinkOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Watches a directory, receiving events of added messages on the
+// watcher request channel.
+//
+// The `watcher` handle will send messages of the form:
+// ```
+// struct {
+// uint8 event;
+// uint8 len;
+// char name[];
+// };
+// ```
+// Where names are NOT null-terminated.
+//
+// This API is unstable; in the future, watcher will be a `DirectoryWatcher` client.
+//
+// Mask specifies a bitmask of events to observe.
+// Options must be zero; it is reserved.
+//
+// This method does not require any rights, similar to ReadDirents.
+func (p *DirectoryWithCtxInterface) Watch(ctx_ _bindings.Context, mask uint32, options uint32, watcher _zx.Channel) (int32, error) {
+ req_ := &directoryWithCtxWatchRequest{
+ Mask: mask,
+ Options: options,
+ Watcher: watcher,
+ }
+ resp_ := &directoryWithCtxWatchResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryWatchOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Directory defines a node which is capable of containing other Objects.
+type DirectoryWithCtx interface {
+ // Create another connection to the same remote object.
+ //
+ // `flags` may be any of:
+ //
+ // - `OPEN_RIGHT_*`
+ // - `OPEN_FLAG_APPEND`
+ // - `OPEN_FLAG_NO_REMOTE`
+ // - `OPEN_FLAG_DESCRIBE`
+ // - `CLONE_FLAG_SAME_RIGHTS`
+ //
+ // All other flags are ignored.
+ //
+ // The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+ // cloned object.
+ // The cloned object must have rights less than or equal to the original object.
+ // Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+ // It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+ // `CLONE_FLAG_SAME_RIGHTS`.
+ Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error
+ // Terminates connection with object.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) (int32, error)
+ // Returns extra information about the type of the object.
+ // If the `Describe` operation fails, the connection is closed.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context) (NodeInfo, error)
+ // An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+ //
+ // Indicates the success or failure of the open operation, and optionally describes the
+ // object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+ // (the same as would be returned by `Describe`).
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (int32, error)
+ // Acquires information about the node.
+ //
+ // This method does not require any rights.
+ GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error)
+ // Updates information about the node.
+ // `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error)
+ // Acquires the `Directory.Open` rights and flags used to access this file.
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as GetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
+ // Changes the `Directory.Open` flags used to access the file.
+ // Supported flags which can be turned on / off:
+ // - `OPEN_FLAG_APPEND`
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as SetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
+ // Opens a new object relative to this directory object.
+ //
+ // `path` may contain multiple segments, separated by "/" characters,
+ // and should never be empty; i.e., "" is an invalid path. Paths should not contain
+ // a leading "/".
+ //
+ // `flags` may be any of the `OPEN_FLAG_*` and `OPEN_RIGHT_*` values, bitwise ORed together.
+ // The `OPEN_FLAG_DESCRIBE` flag may cause an `OnOpen` event to be transmitted
+ // on the `object` handle, indicating the type of object opened.
+ //
+ // If an unknown value is sent for either flags or mode, the connection should
+ // be closed.
+ //
+ // `OPEN_RIGHT_*` flags provided in `flags` will restrict access rights on
+ // the `object` channel which will be connected to the opened entity.
+ //
+ // Rights are never increased. When you open a nested entity within a directory, you may only
+ // request the same rights as what the directory connection already has, or a subset of those.
+ // Exceeding those rights causes an access denied error to be transmitted in the
+ // `OnOpen` event if applicable, and the `object` connection closed.
+ //
+ // The caller must specify either one or more of the `OPEN_RIGHT_*` flags, or
+ // the `OPEN_FLAG_NODE_REFERENCE` flag.
+ Open(ctx_ _bindings.Context, flags uint32, mode uint32, path string, object NodeWithCtxInterfaceRequest) error
+ // Detaches an object from this directory object.
+ //
+ // The underlying object may or may not be deleted after this method
+ // completes: although the link will be removed from the containing directory,
+ // objects with multiple references (such as files which are still open)
+ // will not actually be destroyed until all references are removed.
+ //
+ // If a directory is unlinked while it still has an open reference,
+ // it must become read-only, preventing new entries from being created
+ // until all references close and the directory is destroyed.
+ //
+ // `path` identifies the file which should be detached.
+ // If `path` contains multiple segments, separated by "/" characters,
+ // then the directory is traversed, one segment at a time, relative to the
+ // originally accessed Directory.
+ //
+ // Returns:
+ // `ZX_ERR_ACCESS_DENIED` if the connection (or the underlying filesystem) does not
+ // allow writable access.
+ // `ZX_ERR_INVALID_ARGS` if `path` contains ".." segments.
+ // `ZX_ERR_NOT_EMPTY` if `path` refers to a non-empty directory.
+ // `ZX_ERR_UNAVAILABLE` if `path` refers to a mount point, containing a remote channel.
+ // `ZX_ERR_UNAVAILABLE` if `path` is ".".
+ //
+ // Other errors may be returned for filesystem-specific reasons.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ Unlink(ctx_ _bindings.Context, path string) (int32, error)
+ // Reads a collection of variably sized dirents into a buffer.
+ // The number of dirents in a directory may be very large: akin to
+ // calling read multiple times on a file, directories have a seek
+ // offset which is updated on subsequent calls to ReadDirents.
+ //
+ // These dirents are of the form:
+ // ```
+ // struct dirent {
+ // // Describes the inode of the entry.
+ // uint64 ino;
+ // // Describes the length of the dirent name in bytes.
+ // uint8 size;
+ // // Describes the type of the entry. Aligned with the
+ // // POSIX d_type values. Use `DIRENT_TYPE_*` constants.
+ // uint8 type;
+ // // Unterminated name of entry.
+ // char name[0];
+ // }
+ // ```
+ //
+ // This method does not require any rights, since one could always probe for
+ // directory contents by triggering name conflicts during file creation.
+ ReadDirents(ctx_ _bindings.Context, maxBytes uint64) (int32, []uint8, error)
+ // Resets the directory seek offset.
+ //
+ // This method does not require any rights, similar to ReadDirents.
+ Rewind(ctx_ _bindings.Context) (int32, error)
+ // Acquires a token to a Directory which can be used to identify
+ // access to it at a later point in time.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error)
+ // Renames an object named src to the name dst, in a directory represented by token.
+ //
+ // `src/dst` must be resolved object names. Including "/" in any position
+ // other than the end of the string will return `ZX_ERR_INVALID_ARGS`.
+ // Returning "/" at the end of either string implies that it must be a
+ // directory, or else `ZX_ERR_NOT_DIR` should be returned.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error)
+ // Creates a link to an object named src by the name dst, within a directory represented by
+ // token.
+ //
+ // `src` must be a resolved object name. Including "/" in the string will
+ // return `ZX_ERR_INVALID_ARGS`.
+ //
+ // `dst` must be a resolved object name. Including "/" in the string will
+ // return `ZX_ERR_INVALID_ARGS`.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error)
+ // Watches a directory, receiving events of added messages on the
+ // watcher request channel.
+ //
+ // The `watcher` handle will send messages of the form:
+ // ```
+ // struct {
+ // uint8 event;
+ // uint8 len;
+ // char name[];
+ // };
+ // ```
+ // Where names are NOT null-terminated.
+ //
+ // This API is unstable; in the future, watcher will be a `DirectoryWatcher` client.
+ //
+ // Mask specifies a bitmask of events to observe.
+ // Options must be zero; it is reserved.
+ //
+ // This method does not require any rights, similar to ReadDirents.
+ Watch(ctx_ _bindings.Context, mask uint32, options uint32, watcher _zx.Channel) (int32, error)
+}
+
+type DirectoryWithCtxTransitionalBase struct{}
+
+func (_ *DirectoryWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ panic("Not Implemented")
+}
+func (_ *DirectoryWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ panic("Not Implemented")
+}
+
+type DirectoryWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDirectoryWithCtxInterfaceRequest() (DirectoryWithCtxInterfaceRequest, *DirectoryWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DirectoryWithCtxInterfaceRequest(req), (*DirectoryWithCtxInterface)(cli), err
+}
+
+type DirectoryWithCtxStub struct {
+ Impl DirectoryWithCtx
+}
+
+func (s_ *DirectoryWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DirectoryCloneOrdinal:
+ in_ := directoryWithCtxCloneRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
+ return nil, false, err_
+ case DirectoryCloseOrdinal:
+ s, err_ := s_.Impl.Close(args_.Ctx)
+ out_ := directoryWithCtxCloseResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryDescribeOrdinal:
+ info, err_ := s_.Impl.Describe(args_.Ctx)
+ out_ := directoryWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case DirectorySyncOrdinal:
+ s, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := directoryWithCtxSyncResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryGetAttrOrdinal:
+ s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
+ out_ := directoryWithCtxGetAttrResponse{}
+ out_.S = s
+ out_.Attributes = attributes
+ return &out_, true, err_
+ case DirectorySetAttrOrdinal:
+ in_ := directoryWithCtxSetAttrRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
+ out_ := directoryWithCtxSetAttrResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryNodeGetFlagsOrdinal:
+ s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
+ out_ := directoryWithCtxNodeGetFlagsResponse{}
+ out_.S = s
+ out_.Flags = flags
+ return &out_, true, err_
+ case DirectoryNodeSetFlagsOrdinal:
+ in_ := directoryWithCtxNodeSetFlagsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
+ out_ := directoryWithCtxNodeSetFlagsResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryOpenOrdinal:
+ in_ := directoryWithCtxOpenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Open(args_.Ctx, in_.Flags, in_.Mode, in_.Path, in_.Object)
+ return nil, false, err_
+ case DirectoryUnlinkOrdinal:
+ in_ := directoryWithCtxUnlinkRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Unlink(args_.Ctx, in_.Path)
+ out_ := directoryWithCtxUnlinkResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryReadDirentsOrdinal:
+ in_ := directoryWithCtxReadDirentsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, dirents, err_ := s_.Impl.ReadDirents(args_.Ctx, in_.MaxBytes)
+ out_ := directoryWithCtxReadDirentsResponse{}
+ out_.S = s
+ out_.Dirents = dirents
+ return &out_, true, err_
+ case DirectoryRewindOrdinal:
+ s, err_ := s_.Impl.Rewind(args_.Ctx)
+ out_ := directoryWithCtxRewindResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryGetTokenOrdinal:
+ s, token, err_ := s_.Impl.GetToken(args_.Ctx)
+ out_ := directoryWithCtxGetTokenResponse{}
+ out_.S = s
+ out_.Token = token
+ return &out_, true, err_
+ case DirectoryRenameOrdinal:
+ in_ := directoryWithCtxRenameRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Rename(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
+ out_ := directoryWithCtxRenameResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryLinkOrdinal:
+ in_ := directoryWithCtxLinkRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Link(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
+ out_ := directoryWithCtxLinkResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryWatchOrdinal:
+ in_ := directoryWithCtxWatchRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Watch(args_.Ctx, in_.Mask, in_.Options, in_.Watcher)
+ out_ := directoryWithCtxWatchResponse{}
+ out_.S = s
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DirectoryEventProxy _bindings.ChannelProxy
+
+func (p *DirectoryEventProxy) OnOpen(s int32, info *NodeInfo) error {
+ event_ := &directoryWithCtxOnOpenResponse{
+ S: s,
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(DirectoryOnOpenOrdinal, event_)
+}
+
+const (
+ DirectoryAdminCloneOrdinal uint64 = 0x5a61678f293ce16f
+ DirectoryAdminCloseOrdinal uint64 = 0x5309c5bd1c33dc44
+ DirectoryAdminDescribeOrdinal uint64 = 0xffcec215078dea0
+ DirectoryAdminOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
+ DirectoryAdminSyncOrdinal uint64 = 0x189d88326c18b519
+ DirectoryAdminGetAttrOrdinal uint64 = 0x78985e216314dafd
+ DirectoryAdminSetAttrOrdinal uint64 = 0x4186c0f40d938f46
+ DirectoryAdminNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
+ DirectoryAdminNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
+ DirectoryAdminOpenOrdinal uint64 = 0x2c5044561d685ec0
+ DirectoryAdminUnlinkOrdinal uint64 = 0x5a0ff90760a8bc23
+ DirectoryAdminReadDirentsOrdinal uint64 = 0x3582806bf27faa0a
+ DirectoryAdminRewindOrdinal uint64 = 0x16b1202af0f34c71
+ DirectoryAdminGetTokenOrdinal uint64 = 0x26ae9d18763c8655
+ DirectoryAdminRenameOrdinal uint64 = 0xa8e00a247f3c905
+ DirectoryAdminLinkOrdinal uint64 = 0x740604c0c7c930e7
+ DirectoryAdminWatchOrdinal uint64 = 0x5717193a59d66d91
+ DirectoryAdminMountOrdinal uint64 = 0xfa166d1522c27d0
+ DirectoryAdminMountAndCreateOrdinal uint64 = 0x7bc782242022b3b3
+ DirectoryAdminUnmountOrdinal uint64 = 0x7da45d654c35c9a4
+ DirectoryAdminUnmountNodeOrdinal uint64 = 0x26b9d90ebe5f93db
+ DirectoryAdminQueryFilesystemOrdinal uint64 = 0x4a879480f1d7875d
+ DirectoryAdminGetDevicePathOrdinal uint64 = 0x76f2e3c7331f815b
+)
+
+type DirectoryAdminWithCtxInterface _bindings.ChannelProxy
+
+// Create another connection to the same remote object.
+//
+// `flags` may be any of:
+//
+// - `OPEN_RIGHT_*`
+// - `OPEN_FLAG_APPEND`
+// - `OPEN_FLAG_NO_REMOTE`
+// - `OPEN_FLAG_DESCRIBE`
+// - `CLONE_FLAG_SAME_RIGHTS`
+//
+// All other flags are ignored.
+//
+// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+// cloned object.
+// The cloned object must have rights less than or equal to the original object.
+// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+// `CLONE_FLAG_SAME_RIGHTS`.
+func (p *DirectoryAdminWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error {
+ req_ := &directoryAdminWithCtxCloneRequest{
+ Flags: flags,
+ Object: object,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryAdminCloneOrdinal, req_)
+ return err_
+}
+
+// Terminates connection with object.
+//
+// This method does not require any rights.
+func (p *DirectoryAdminWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxCloseResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminCloseOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Returns extra information about the type of the object.
+// If the `Describe` operation fails, the connection is closed.
+//
+// This method does not require any rights.
+func (p *DirectoryAdminWithCtxInterface) Describe(ctx_ _bindings.Context) (NodeInfo, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+//
+// Indicates the success or failure of the open operation, and optionally describes the
+// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+// (the same as would be returned by `Describe`).
+func (p *DirectoryAdminWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *NodeInfo, error) {
+ resp_ := &directoryAdminWithCtxOnOpenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(DirectoryAdminOnOpenOrdinal, resp_)
+ return resp_.S, resp_.Info, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method does not require any rights.
+func (p *DirectoryAdminWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminSyncOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires information about the node.
+//
+// This method does not require any rights.
+func (p *DirectoryAdminWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxGetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminGetAttrOrdinal, req_, resp_)
+ return resp_.S, resp_.Attributes, err_
+}
+
+// Updates information about the node.
+// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryAdminWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error) {
+ req_ := &directoryAdminWithCtxSetAttrRequest{
+ Flags: flags,
+ Attributes: attributes,
+ }
+ resp_ := &directoryAdminWithCtxSetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminSetAttrOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DirectoryAdminWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxNodeGetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminNodeGetFlagsOrdinal, req_, resp_)
+ return resp_.S, resp_.Flags, err_
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DirectoryAdminWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ req_ := &directoryAdminWithCtxNodeSetFlagsRequest{
+ Flags: flags,
+ }
+ resp_ := &directoryAdminWithCtxNodeSetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminNodeSetFlagsOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Opens a new object relative to this directory object.
+//
+// `path` may contain multiple segments, separated by "/" characters,
+// and should never be empty; i.e., "" is an invalid path. Paths should not contain
+// a leading "/".
+//
+// `flags` may be any of the `OPEN_FLAG_*` and `OPEN_RIGHT_*` values, bitwise ORed together.
+// The `OPEN_FLAG_DESCRIBE` flag may cause an `OnOpen` event to be transmitted
+// on the `object` handle, indicating the type of object opened.
+//
+// If an unknown value is sent for either flags or mode, the connection should
+// be closed.
+//
+// `OPEN_RIGHT_*` flags provided in `flags` will restrict access rights on
+// the `object` channel which will be connected to the opened entity.
+//
+// Rights are never increased. When you open a nested entity within a directory, you may only
+// request the same rights as what the directory connection already has, or a subset of those.
+// Exceeding those rights causes an access denied error to be transmitted in the
+// `OnOpen` event if applicable, and the `object` connection closed.
+//
+// The caller must specify either one or more of the `OPEN_RIGHT_*` flags, or
+// the `OPEN_FLAG_NODE_REFERENCE` flag.
+func (p *DirectoryAdminWithCtxInterface) Open(ctx_ _bindings.Context, flags uint32, mode uint32, path string, object NodeWithCtxInterfaceRequest) error {
+ req_ := &directoryAdminWithCtxOpenRequest{
+ Flags: flags,
+ Mode: mode,
+ Path: path,
+ Object: object,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryAdminOpenOrdinal, req_)
+ return err_
+}
+
+// Detaches an object from this directory object.
+//
+// The underlying object may or may not be deleted after this method
+// completes: although the link will be removed from the containing directory,
+// objects with multiple references (such as files which are still open)
+// will not actually be destroyed until all references are removed.
+//
+// If a directory is unlinked while it still has an open reference,
+// it must become read-only, preventing new entries from being created
+// until all references close and the directory is destroyed.
+//
+// `path` identifies the file which should be detached.
+// If `path` contains multiple segments, separated by "/" characters,
+// then the directory is traversed, one segment at a time, relative to the
+// originally accessed Directory.
+//
+// Returns:
+// `ZX_ERR_ACCESS_DENIED` if the connection (or the underlying filesystem) does not
+// allow writable access.
+// `ZX_ERR_INVALID_ARGS` if `path` contains ".." segments.
+// `ZX_ERR_NOT_EMPTY` if `path` refers to a non-empty directory.
+// `ZX_ERR_UNAVAILABLE` if `path` refers to a mount point, containing a remote channel.
+// `ZX_ERR_UNAVAILABLE` if `path` is ".".
+//
+// Other errors may be returned for filesystem-specific reasons.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryAdminWithCtxInterface) Unlink(ctx_ _bindings.Context, path string) (int32, error) {
+ req_ := &directoryAdminWithCtxUnlinkRequest{
+ Path: path,
+ }
+ resp_ := &directoryAdminWithCtxUnlinkResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminUnlinkOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Reads a collection of variably sized dirents into a buffer.
+// The number of dirents in a directory may be very large: akin to
+// calling read multiple times on a file, directories have a seek
+// offset which is updated on subsequent calls to ReadDirents.
+//
+// These dirents are of the form:
+// ```
+// struct dirent {
+// // Describes the inode of the entry.
+// uint64 ino;
+// // Describes the length of the dirent name in bytes.
+// uint8 size;
+// // Describes the type of the entry. Aligned with the
+// // POSIX d_type values. Use `DIRENT_TYPE_*` constants.
+// uint8 type;
+// // Unterminated name of entry.
+// char name[0];
+// }
+// ```
+//
+// This method does not require any rights, since one could always probe for
+// directory contents by triggering name conflicts during file creation.
+func (p *DirectoryAdminWithCtxInterface) ReadDirents(ctx_ _bindings.Context, maxBytes uint64) (int32, []uint8, error) {
+ req_ := &directoryAdminWithCtxReadDirentsRequest{
+ MaxBytes: maxBytes,
+ }
+ resp_ := &directoryAdminWithCtxReadDirentsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminReadDirentsOrdinal, req_, resp_)
+ return resp_.S, resp_.Dirents, err_
+}
+
+// Resets the directory seek offset.
+//
+// This method does not require any rights, similar to ReadDirents.
+func (p *DirectoryAdminWithCtxInterface) Rewind(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxRewindResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminRewindOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires a token to a Directory which can be used to identify
+// access to it at a later point in time.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryAdminWithCtxInterface) GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxGetTokenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminGetTokenOrdinal, req_, resp_)
+ return resp_.S, resp_.Token, err_
+}
+
+// Renames an object named src to the name dst, in a directory represented by token.
+//
+// `src/dst` must be resolved object names. Including "/" in any position
+// other than the end of the string will return `ZX_ERR_INVALID_ARGS`.
+// Returning "/" at the end of either string implies that it must be a
+// directory, or else `ZX_ERR_NOT_DIR` should be returned.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryAdminWithCtxInterface) Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) {
+ req_ := &directoryAdminWithCtxRenameRequest{
+ Src: src,
+ DstParentToken: dstParentToken,
+ Dst: dst,
+ }
+ resp_ := &directoryAdminWithCtxRenameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminRenameOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Creates a link to an object named src by the name dst, within a directory represented by
+// token.
+//
+// `src` must be a resolved object name. Including "/" in the string will
+// return `ZX_ERR_INVALID_ARGS`.
+//
+// `dst` must be a resolved object name. Including "/" in the string will
+// return `ZX_ERR_INVALID_ARGS`.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DirectoryAdminWithCtxInterface) Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error) {
+ req_ := &directoryAdminWithCtxLinkRequest{
+ Src: src,
+ DstParentToken: dstParentToken,
+ Dst: dst,
+ }
+ resp_ := &directoryAdminWithCtxLinkResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminLinkOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Watches a directory, receiving events of added messages on the
+// watcher request channel.
+//
+// The `watcher` handle will send messages of the form:
+// ```
+// struct {
+// uint8 event;
+// uint8 len;
+// char name[];
+// };
+// ```
+// Where names are NOT null-terminated.
+//
+// This API is unstable; in the future, watcher will be a `DirectoryWatcher` client.
+//
+// Mask specifies a bitmask of events to observe.
+// Options must be zero; it is reserved.
+//
+// This method does not require any rights, similar to ReadDirents.
+func (p *DirectoryAdminWithCtxInterface) Watch(ctx_ _bindings.Context, mask uint32, options uint32, watcher _zx.Channel) (int32, error) {
+ req_ := &directoryAdminWithCtxWatchRequest{
+ Mask: mask,
+ Options: options,
+ Watcher: watcher,
+ }
+ resp_ := &directoryAdminWithCtxWatchResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminWatchOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Mount a channel representing a remote filesystem onto this directory.
+// All future requests to this node will be forwarded to the remote filesystem.
+// To re-open a node without forwarding to the remote target, the node
+// should be opened with `OPEN_FLAG_NO_REMOTE`.
+func (p *DirectoryAdminWithCtxInterface) Mount(ctx_ _bindings.Context, remote DirectoryWithCtxInterface) (int32, error) {
+ req_ := &directoryAdminWithCtxMountRequest{
+ Remote: remote,
+ }
+ resp_ := &directoryAdminWithCtxMountResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminMountOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Atomically create a directory with a provided path, and mount the
+// remote handle to the newly created directory.
+func (p *DirectoryAdminWithCtxInterface) MountAndCreate(ctx_ _bindings.Context, remote DirectoryWithCtxInterface, name string, flags uint32) (int32, error) {
+ req_ := &directoryAdminWithCtxMountAndCreateRequest{
+ Remote: remote,
+ Name: name,
+ Flags: flags,
+ }
+ resp_ := &directoryAdminWithCtxMountAndCreateResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminMountAndCreateOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Unmount this filesystem. After this function returns successfully,
+// all connections to the filesystem will be terminated.
+func (p *DirectoryAdminWithCtxInterface) Unmount(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxUnmountResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminUnmountOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Detach a node which was previously attached to this directory
+// with Mount.
+func (p *DirectoryAdminWithCtxInterface) UnmountNode(ctx_ _bindings.Context) (int32, DirectoryWithCtxInterface, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxUnmountNodeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminUnmountNodeOrdinal, req_, resp_)
+ return resp_.S, resp_.Remote, err_
+}
+
+// Query the filesystem for filesystem-specific information.
+func (p *DirectoryAdminWithCtxInterface) QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxQueryFilesystemResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminQueryFilesystemOrdinal, req_, resp_)
+ return resp_.S, resp_.Info, err_
+}
+
+// Acquire the path to the device backing this filesystem, if there is one.
+func (p *DirectoryAdminWithCtxInterface) GetDevicePath(ctx_ _bindings.Context) (int32, *string, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryAdminWithCtxGetDevicePathResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryAdminGetDevicePathOrdinal, req_, resp_)
+ return resp_.S, resp_.Path, err_
+}
+
+// DirectoryAdmin defines a directory which is capable of handling
+// administrator tasks within the filesystem.
+type DirectoryAdminWithCtx interface {
+ // Create another connection to the same remote object.
+ //
+ // `flags` may be any of:
+ //
+ // - `OPEN_RIGHT_*`
+ // - `OPEN_FLAG_APPEND`
+ // - `OPEN_FLAG_NO_REMOTE`
+ // - `OPEN_FLAG_DESCRIBE`
+ // - `CLONE_FLAG_SAME_RIGHTS`
+ //
+ // All other flags are ignored.
+ //
+ // The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+ // cloned object.
+ // The cloned object must have rights less than or equal to the original object.
+ // Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+ // It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+ // `CLONE_FLAG_SAME_RIGHTS`.
+ Clone(ctx_ _bindings.Context, flags uint32, object NodeWithCtxInterfaceRequest) error
+ // Terminates connection with object.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) (int32, error)
+ // Returns extra information about the type of the object.
+ // If the `Describe` operation fails, the connection is closed.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context) (NodeInfo, error)
+ // An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+ //
+ // Indicates the success or failure of the open operation, and optionally describes the
+ // object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+ // (the same as would be returned by `Describe`).
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (int32, error)
+ // Acquires information about the node.
+ //
+ // This method does not require any rights.
+ GetAttr(ctx_ _bindings.Context) (int32, NodeAttributes, error)
+ // Updates information about the node.
+ // `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ SetAttr(ctx_ _bindings.Context, flags uint32, attributes NodeAttributes) (int32, error)
+ // Acquires the `Directory.Open` rights and flags used to access this file.
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as GetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
+ // Changes the `Directory.Open` flags used to access the file.
+ // Supported flags which can be turned on / off:
+ // - `OPEN_FLAG_APPEND`
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as SetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
+ // Opens a new object relative to this directory object.
+ //
+ // `path` may contain multiple segments, separated by "/" characters,
+ // and should never be empty; i.e., "" is an invalid path. Paths should not contain
+ // a leading "/".
+ //
+ // `flags` may be any of the `OPEN_FLAG_*` and `OPEN_RIGHT_*` values, bitwise ORed together.
+ // The `OPEN_FLAG_DESCRIBE` flag may cause an `OnOpen` event to be transmitted
+ // on the `object` handle, indicating the type of object opened.
+ //
+ // If an unknown value is sent for either flags or mode, the connection should
+ // be closed.
+ //
+ // `OPEN_RIGHT_*` flags provided in `flags` will restrict access rights on
+ // the `object` channel which will be connected to the opened entity.
+ //
+ // Rights are never increased. When you open a nested entity within a directory, you may only
+ // request the same rights as what the directory connection already has, or a subset of those.
+ // Exceeding those rights causes an access denied error to be transmitted in the
+ // `OnOpen` event if applicable, and the `object` connection closed.
+ //
+ // The caller must specify either one or more of the `OPEN_RIGHT_*` flags, or
+ // the `OPEN_FLAG_NODE_REFERENCE` flag.
+ Open(ctx_ _bindings.Context, flags uint32, mode uint32, path string, object NodeWithCtxInterfaceRequest) error
+ // Detaches an object from this directory object.
+ //
+ // The underlying object may or may not be deleted after this method
+ // completes: although the link will be removed from the containing directory,
+ // objects with multiple references (such as files which are still open)
+ // will not actually be destroyed until all references are removed.
+ //
+ // If a directory is unlinked while it still has an open reference,
+ // it must become read-only, preventing new entries from being created
+ // until all references close and the directory is destroyed.
+ //
+ // `path` identifies the file which should be detached.
+ // If `path` contains multiple segments, separated by "/" characters,
+ // then the directory is traversed, one segment at a time, relative to the
+ // originally accessed Directory.
+ //
+ // Returns:
+ // `ZX_ERR_ACCESS_DENIED` if the connection (or the underlying filesystem) does not
+ // allow writable access.
+ // `ZX_ERR_INVALID_ARGS` if `path` contains ".." segments.
+ // `ZX_ERR_NOT_EMPTY` if `path` refers to a non-empty directory.
+ // `ZX_ERR_UNAVAILABLE` if `path` refers to a mount point, containing a remote channel.
+ // `ZX_ERR_UNAVAILABLE` if `path` is ".".
+ //
+ // Other errors may be returned for filesystem-specific reasons.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ Unlink(ctx_ _bindings.Context, path string) (int32, error)
+ // Reads a collection of variably sized dirents into a buffer.
+ // The number of dirents in a directory may be very large: akin to
+ // calling read multiple times on a file, directories have a seek
+ // offset which is updated on subsequent calls to ReadDirents.
+ //
+ // These dirents are of the form:
+ // ```
+ // struct dirent {
+ // // Describes the inode of the entry.
+ // uint64 ino;
+ // // Describes the length of the dirent name in bytes.
+ // uint8 size;
+ // // Describes the type of the entry. Aligned with the
+ // // POSIX d_type values. Use `DIRENT_TYPE_*` constants.
+ // uint8 type;
+ // // Unterminated name of entry.
+ // char name[0];
+ // }
+ // ```
+ //
+ // This method does not require any rights, since one could always probe for
+ // directory contents by triggering name conflicts during file creation.
+ ReadDirents(ctx_ _bindings.Context, maxBytes uint64) (int32, []uint8, error)
+ // Resets the directory seek offset.
+ //
+ // This method does not require any rights, similar to ReadDirents.
+ Rewind(ctx_ _bindings.Context) (int32, error)
+ // Acquires a token to a Directory which can be used to identify
+ // access to it at a later point in time.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ GetToken(ctx_ _bindings.Context) (int32, _zx.Handle, error)
+ // Renames an object named src to the name dst, in a directory represented by token.
+ //
+ // `src/dst` must be resolved object names. Including "/" in any position
+ // other than the end of the string will return `ZX_ERR_INVALID_ARGS`.
+ // Returning "/" at the end of either string implies that it must be a
+ // directory, or else `ZX_ERR_NOT_DIR` should be returned.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error)
+ // Creates a link to an object named src by the name dst, within a directory represented by
+ // token.
+ //
+ // `src` must be a resolved object name. Including "/" in the string will
+ // return `ZX_ERR_INVALID_ARGS`.
+ //
+ // `dst` must be a resolved object name. Including "/" in the string will
+ // return `ZX_ERR_INVALID_ARGS`.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Handle, dst string) (int32, error)
+ // Watches a directory, receiving events of added messages on the
+ // watcher request channel.
+ //
+ // The `watcher` handle will send messages of the form:
+ // ```
+ // struct {
+ // uint8 event;
+ // uint8 len;
+ // char name[];
+ // };
+ // ```
+ // Where names are NOT null-terminated.
+ //
+ // This API is unstable; in the future, watcher will be a `DirectoryWatcher` client.
+ //
+ // Mask specifies a bitmask of events to observe.
+ // Options must be zero; it is reserved.
+ //
+ // This method does not require any rights, similar to ReadDirents.
+ Watch(ctx_ _bindings.Context, mask uint32, options uint32, watcher _zx.Channel) (int32, error)
+ // Mount a channel representing a remote filesystem onto this directory.
+ // All future requests to this node will be forwarded to the remote filesystem.
+ // To re-open a node without forwarding to the remote target, the node
+ // should be opened with `OPEN_FLAG_NO_REMOTE`.
+ Mount(ctx_ _bindings.Context, remote DirectoryWithCtxInterface) (int32, error)
+ // Atomically create a directory with a provided path, and mount the
+ // remote handle to the newly created directory.
+ MountAndCreate(ctx_ _bindings.Context, remote DirectoryWithCtxInterface, name string, flags uint32) (int32, error)
+ // Unmount this filesystem. After this function returns successfully,
+ // all connections to the filesystem will be terminated.
+ Unmount(ctx_ _bindings.Context) (int32, error)
+ // Detach a node which was previously attached to this directory
+ // with Mount.
+ UnmountNode(ctx_ _bindings.Context) (int32, DirectoryWithCtxInterface, error)
+ // Query the filesystem for filesystem-specific information.
+ QueryFilesystem(ctx_ _bindings.Context) (int32, *FilesystemInfo, error)
+ // Acquire the path to the device backing this filesystem, if there is one.
+ GetDevicePath(ctx_ _bindings.Context) (int32, *string, error)
+}
+
+type DirectoryAdminWithCtxTransitionalBase struct{}
+
+func (_ *DirectoryAdminWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ panic("Not Implemented")
+}
+func (_ *DirectoryAdminWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ panic("Not Implemented")
+}
+
+type DirectoryAdminWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDirectoryAdminWithCtxInterfaceRequest() (DirectoryAdminWithCtxInterfaceRequest, *DirectoryAdminWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DirectoryAdminWithCtxInterfaceRequest(req), (*DirectoryAdminWithCtxInterface)(cli), err
+}
+
+type DirectoryAdminWithCtxStub struct {
+ Impl DirectoryAdminWithCtx
+}
+
+func (s_ *DirectoryAdminWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DirectoryAdminCloneOrdinal:
+ in_ := directoryAdminWithCtxCloneRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
+ return nil, false, err_
+ case DirectoryAdminCloseOrdinal:
+ s, err_ := s_.Impl.Close(args_.Ctx)
+ out_ := directoryAdminWithCtxCloseResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminDescribeOrdinal:
+ info, err_ := s_.Impl.Describe(args_.Ctx)
+ out_ := directoryAdminWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case DirectoryAdminSyncOrdinal:
+ s, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := directoryAdminWithCtxSyncResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminGetAttrOrdinal:
+ s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
+ out_ := directoryAdminWithCtxGetAttrResponse{}
+ out_.S = s
+ out_.Attributes = attributes
+ return &out_, true, err_
+ case DirectoryAdminSetAttrOrdinal:
+ in_ := directoryAdminWithCtxSetAttrRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
+ out_ := directoryAdminWithCtxSetAttrResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminNodeGetFlagsOrdinal:
+ s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
+ out_ := directoryAdminWithCtxNodeGetFlagsResponse{}
+ out_.S = s
+ out_.Flags = flags
+ return &out_, true, err_
+ case DirectoryAdminNodeSetFlagsOrdinal:
+ in_ := directoryAdminWithCtxNodeSetFlagsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
+ out_ := directoryAdminWithCtxNodeSetFlagsResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminOpenOrdinal:
+ in_ := directoryAdminWithCtxOpenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Open(args_.Ctx, in_.Flags, in_.Mode, in_.Path, in_.Object)
+ return nil, false, err_
+ case DirectoryAdminUnlinkOrdinal:
+ in_ := directoryAdminWithCtxUnlinkRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Unlink(args_.Ctx, in_.Path)
+ out_ := directoryAdminWithCtxUnlinkResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminReadDirentsOrdinal:
+ in_ := directoryAdminWithCtxReadDirentsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, dirents, err_ := s_.Impl.ReadDirents(args_.Ctx, in_.MaxBytes)
+ out_ := directoryAdminWithCtxReadDirentsResponse{}
+ out_.S = s
+ out_.Dirents = dirents
+ return &out_, true, err_
+ case DirectoryAdminRewindOrdinal:
+ s, err_ := s_.Impl.Rewind(args_.Ctx)
+ out_ := directoryAdminWithCtxRewindResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminGetTokenOrdinal:
+ s, token, err_ := s_.Impl.GetToken(args_.Ctx)
+ out_ := directoryAdminWithCtxGetTokenResponse{}
+ out_.S = s
+ out_.Token = token
+ return &out_, true, err_
+ case DirectoryAdminRenameOrdinal:
+ in_ := directoryAdminWithCtxRenameRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Rename(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
+ out_ := directoryAdminWithCtxRenameResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminLinkOrdinal:
+ in_ := directoryAdminWithCtxLinkRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Link(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
+ out_ := directoryAdminWithCtxLinkResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminWatchOrdinal:
+ in_ := directoryAdminWithCtxWatchRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Watch(args_.Ctx, in_.Mask, in_.Options, in_.Watcher)
+ out_ := directoryAdminWithCtxWatchResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminMountOrdinal:
+ in_ := directoryAdminWithCtxMountRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.Mount(args_.Ctx, in_.Remote)
+ out_ := directoryAdminWithCtxMountResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminMountAndCreateOrdinal:
+ in_ := directoryAdminWithCtxMountAndCreateRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.MountAndCreate(args_.Ctx, in_.Remote, in_.Name, in_.Flags)
+ out_ := directoryAdminWithCtxMountAndCreateResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminUnmountOrdinal:
+ s, err_ := s_.Impl.Unmount(args_.Ctx)
+ out_ := directoryAdminWithCtxUnmountResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DirectoryAdminUnmountNodeOrdinal:
+ s, remote, err_ := s_.Impl.UnmountNode(args_.Ctx)
+ out_ := directoryAdminWithCtxUnmountNodeResponse{}
+ out_.S = s
+ out_.Remote = remote
+ return &out_, true, err_
+ case DirectoryAdminQueryFilesystemOrdinal:
+ s, info, err_ := s_.Impl.QueryFilesystem(args_.Ctx)
+ out_ := directoryAdminWithCtxQueryFilesystemResponse{}
+ out_.S = s
+ out_.Info = info
+ return &out_, true, err_
+ case DirectoryAdminGetDevicePathOrdinal:
+ s, path, err_ := s_.Impl.GetDevicePath(args_.Ctx)
+ out_ := directoryAdminWithCtxGetDevicePathResponse{}
+ out_.S = s
+ out_.Path = path
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DirectoryAdminEventProxy _bindings.ChannelProxy
+
+func (p *DirectoryAdminEventProxy) OnOpen(s int32, info *NodeInfo) error {
+ event_ := &directoryAdminWithCtxOnOpenResponse{
+ S: s,
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(DirectoryAdminOnOpenOrdinal, event_)
+}
diff --git a/src/syscall/zx/io2/impl.go b/src/syscall/zx/io2/impl.go
new file mode 100644
index 0000000..31ba261
--- /dev/null
+++ b/src/syscall/zx/io2/impl.go
@@ -0,0 +1,7605 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package io2
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+ fuchsiamem "syscall/zx/mem"
+)
+
+const (
+ // The maximum number of directory entires or watcher events returned
+ // in a batch by a hanging-get pattern.
+ MaxDirectoryBatchSize uint64 = 8192
+ // The maximum I/O size that is allowed for read/write operations using
+ // byte vectors.
+ MaxTransferSize uint64 = 8192
+ // The maximum length, in bytes, of a single filesystem component.
+ MaxNameLength uint64 = 255
+ // The maximum length, in bytes, of a filesystem path.
+ MaxPathLength uint64 = 4095
+ // Right Aliases - Useful constants for commonly used collections of
+ // rights. Currently FIDL doesn't support expressions on assignment so
+ // these cannot be defined. They are left here as documentation.
+ // Alias for directory permission alias r*
+ // CONNECT | ENUMERATE | TRAVERSE | READ_BYTES | GET_ATTRIBUTES
+ RStarDir uint64 = 211
+ // Alias for directory permission alias rw*
+ // CONNECT | ENUMERATE | TRAVERSE | READ_BYTES | WRITE_BYTES |
+ // MODIFY_DIRECTORY | GET_ATTRIBUTES | UPDATE_ATTRIBUTES
+ RwStarDir uint64 = 503
+ // Alias for directory permission alias rx*
+ // CONNECT | ENUMERATE | TRAVERSE | READ_BYTES | GET_ATTRIBUTES | EXECUTE
+ RxStarDir uint64 = 219
+ // Alias for directory permission alias w*
+ // CONNECT | ENUMERATE | TRAVERSE | WRITE_BYTES | MODIFY_DIRECTORY |
+ // UPDATE_ATTRIBUTES
+ WStarDir uint64 = 485
+ // Alias for directory permission alias x*
+ // CONNECT | ENUMERATE | TRAVERSE | EXECUTE
+ XStarDir uint64 = 201
+)
+
+var _ _bindings.Enum = RightsResolution(0)
+
+// When an `Open`/`Reopen` request reaches its final remote server, it should
+// assign rights on the new connection based on one of these modes.
+type RightsResolution uint32
+
+const (
+
+ // The rights will be the intersection between [`RightsRequest.at_most`]
+ // and the connection where the `Open`/`Reopen` request was received,
+ // closing `object_request` with `ZX_ERR_ACCESS_DENIED` if it is empty.
+ RightsResolutionMaximize RightsResolution = 1
+
+ // The rights will be determined by the following rules:
+ //
+ // * If the negotiated protocol on the new connection is
+ // [`fuchsia.io2/Directory`], the rules from the `MAXIMIZE` case applies.
+ // * Otherwise, the rights will be [`RightsRequest.at_least`] if it
+ // does not exceed rights on the current connection.
+ // * Otherwise, `object_request` should be closed with
+ // `ZX_ERR_ACCESS_DENIED`.
+ //
+ // The motivation for this enum is to facilitate implementing POSIX
+ // compatibility layers. The POSIX file permission model relies on ambient
+ // authority: access control on files are resolved based on the `mode` of
+ // the file, and the current user. There is no concept of hierarchical
+ // permissions. Fuchsia, on the other hand, restricts rights on file
+ // connections to never exceed that of its containing directory connection.
+ RightsResolutionPosix RightsResolution = 2
+)
+
+func (_ RightsResolution) I_EnumValues() []RightsResolution {
+ return []RightsResolution{
+ RightsResolutionMaximize,
+ RightsResolutionPosix,
+ }
+}
+
+func (_ RightsResolution) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x RightsResolution) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x RightsResolution) String() string {
+ switch x {
+ case 1:
+ return "Maximize"
+ case 2:
+ return "Posix"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = OpenMode(0)
+
+// Options related to node creation during [`Directory.Open`].
+type OpenMode uint32
+
+const (
+
+ // Only succeed if the object exists.
+ OpenModeOpenExisting OpenMode = 1
+
+ // Create the object if it does not exist, otherwise open existing.
+ // The check and the creation are performed in one atomic step.
+ OpenModeMaybeCreate OpenMode = 2
+
+ // Assert that the object does not exist, then create it.
+ // The assertion and creation are performed in one atomic step.
+ OpenModeAlwaysCreate OpenMode = 3
+
+ // If the object is a mount point, open the local directory
+ // instead of forwarding the request. The object must be a directory.
+ //
+ // This option implies the behavior of `OPEN_EXISTING`.
+ OpenModeOpenMountPoint OpenMode = 268435456
+)
+
+func (_ OpenMode) I_EnumValues() []OpenMode {
+ return []OpenMode{
+ OpenModeOpenExisting,
+ OpenModeMaybeCreate,
+ OpenModeAlwaysCreate,
+ OpenModeOpenMountPoint,
+ }
+}
+
+func (_ OpenMode) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x OpenMode) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ case 268435456:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x OpenMode) String() string {
+ switch x {
+ case 1:
+ return "OpenExisting"
+ case 2:
+ return "MaybeCreate"
+ case 3:
+ return "AlwaysCreate"
+ case 268435456:
+ return "OpenMountPoint"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = SeekOrigin(0)
+
+// The reference point for updating the seek offset. See [`File.Seek`].
+//
+// This enum matches the `zx_stream_seek_origin_t` enum.
+type SeekOrigin uint32
+
+const (
+
+ // Seek from the start of the file.
+ // The seek offset will be set to `offset` bytes.
+ // The seek offset cannot be negative in this case.
+ SeekOriginStart SeekOrigin = 0
+
+ // Seek from the current position in the file.
+ // The seek offset will be the current seek offset plus `offset` bytes.
+ SeekOriginCurrent SeekOrigin = 1
+
+ // Seek from the end of the file.
+ // The seek offset will be the file size plus `offset` bytes.
+ SeekOriginEnd SeekOrigin = 2
+)
+
+func (_ SeekOrigin) I_EnumValues() []SeekOrigin {
+ return []SeekOrigin{
+ SeekOriginStart,
+ SeekOriginCurrent,
+ SeekOriginEnd,
+ }
+}
+
+func (_ SeekOrigin) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x SeekOrigin) IsUnknown() bool {
+ switch x {
+ case 0:
+ return true
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x SeekOrigin) String() string {
+ switch x {
+ case 0:
+ return "Start"
+ case 1:
+ return "Current"
+ case 2:
+ return "End"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = AdvisoryLockType(0)
+
+// A type of advisory lock.
+//
+// Used with [`AdvisoryLocking.AdvisoryLock`].
+type AdvisoryLockType uint32
+
+const (
+
+ // Zero or more connections can hold read locks on a file simultaneously.
+ AdvisoryLockTypeRead AdvisoryLockType = 1
+
+ // At most one connection can hold a write lock on a file simultaneously.
+ // When a write lock is held on a file, no other types of locks can be held
+ // on that file.
+ AdvisoryLockTypeWrite AdvisoryLockType = 2
+
+ // The region specifies a region to be unlocked.
+ AdvisoryLockTypeUnlock AdvisoryLockType = 3
+)
+
+func (_ AdvisoryLockType) I_EnumValues() []AdvisoryLockType {
+ return []AdvisoryLockType{
+ AdvisoryLockTypeRead,
+ AdvisoryLockTypeWrite,
+ AdvisoryLockTypeUnlock,
+ }
+}
+
+func (_ AdvisoryLockType) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x AdvisoryLockType) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x AdvisoryLockType) String() string {
+ switch x {
+ case 1:
+ return "Read"
+ case 2:
+ return "Write"
+ case 3:
+ return "Unlock"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = ConnectionInfoQuery(0)
+
+// Set the relevant bit to one to fetch the corresponding field
+// during [`fuchsia.io2/Node.Describe`].
+type ConnectionInfoQuery uint64
+
+const (
+ ConnectionInfoQueryRepresentation ConnectionInfoQuery = 1
+ ConnectionInfoQueryRights ConnectionInfoQuery = 2
+ ConnectionInfoQueryAvailableOperations ConnectionInfoQuery = 4
+ ConnectionInfoQuery_Mask ConnectionInfoQuery = 7
+)
+
+func (_ ConnectionInfoQuery) I_BitsMask() ConnectionInfoQuery {
+ return ConnectionInfoQuery_Mask
+}
+
+func (_ ConnectionInfoQuery) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x ConnectionInfoQuery) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x ConnectionInfoQuery) GetUnknownBits() uint64 {
+ return uint64(^ConnectionInfoQuery_Mask & x)
+}
+
+func (x ConnectionInfoQuery) InvertBits() ConnectionInfoQuery {
+ return ConnectionInfoQuery_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x ConnectionInfoQuery) HasBits(mask ConnectionInfoQuery) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x ConnectionInfoQuery) ClearBits(mask ConnectionInfoQuery) ConnectionInfoQuery {
+ return ^mask & x
+}
+
+func (x ConnectionInfoQuery) String() string {
+ switch x {
+ case 1:
+ return "Representation"
+ case 2:
+ return "Rights"
+ case 4:
+ return "AvailableOperations"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = NodeProtocols(0)
+
+// A node may have multiple supported representations when opening, even though
+// it may have a fixed underlying identity.
+//
+// Today, a file is accessed via the [`fuchsia.io2/File`] protocol, and sends a
+// [`Representation.FileInfo`] when opened with `GET_CONNECTION_INFO`. However,
+// in the future we might introduce a more sophisticated `FileV2` protocol, or
+// a more efficient `SuperFastFile` backed by a specialized kernel object.
+// New clients can request the more advanced representations by specifying
+// the corresponding bits in [`NodeProtocols`], whereas existing clients
+// would continue to talk to the node via the old representation.
+//
+// [`NodeProtocols`] enables forward-compatibility through a form of protocol
+// negotiation.
+//
+// The elements have one-to-one correspondence with the members of
+// [`Representation`].
+type NodeProtocols uint64
+
+const (
+ NodeProtocolsConnector NodeProtocols = 1
+ NodeProtocolsDirectory NodeProtocols = 2
+ NodeProtocolsFile NodeProtocols = 4
+ NodeProtocolsMemory NodeProtocols = 8
+ NodeProtocolsPosixSocket NodeProtocols = 16
+ NodeProtocolsPipe NodeProtocols = 32
+ NodeProtocolsDebuglog NodeProtocols = 64
+ NodeProtocolsDevice NodeProtocols = 268435456
+ NodeProtocolsTty NodeProtocols = 536870912
+ NodeProtocols_Mask NodeProtocols = 805306495
+)
+
+func (_ NodeProtocols) I_BitsMask() NodeProtocols {
+ return NodeProtocols_Mask
+}
+
+func (_ NodeProtocols) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x NodeProtocols) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x NodeProtocols) GetUnknownBits() uint64 {
+ return uint64(^NodeProtocols_Mask & x)
+}
+
+func (x NodeProtocols) InvertBits() NodeProtocols {
+ return NodeProtocols_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x NodeProtocols) HasBits(mask NodeProtocols) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x NodeProtocols) ClearBits(mask NodeProtocols) NodeProtocols {
+ return ^mask & x
+}
+
+func (x NodeProtocols) String() string {
+ switch x {
+ case 1:
+ return "Connector"
+ case 2:
+ return "Directory"
+ case 4:
+ return "File"
+ case 8:
+ return "Memory"
+ case 16:
+ return "PosixSocket"
+ case 32:
+ return "Pipe"
+ case 64:
+ return "Debuglog"
+ case 268435456:
+ return "Device"
+ case 536870912:
+ return "Tty"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = ConnectionFlags(0)
+
+// Flags applicable to both [`Directory.Open`] and [`Node.Reopen`].
+type ConnectionFlags uint64
+
+const (
+ ConnectionFlagsGetConnectionInfo ConnectionFlags = 1
+ ConnectionFlagsConnect ConnectionFlags = 2
+ ConnectionFlagsAppend ConnectionFlags = 4
+ ConnectionFlagsTruncate ConnectionFlags = 8
+ ConnectionFlags_Mask ConnectionFlags = 15
+)
+
+func (_ ConnectionFlags) I_BitsMask() ConnectionFlags {
+ return ConnectionFlags_Mask
+}
+
+func (_ ConnectionFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x ConnectionFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x ConnectionFlags) GetUnknownBits() uint64 {
+ return uint64(^ConnectionFlags_Mask & x)
+}
+
+func (x ConnectionFlags) InvertBits() ConnectionFlags {
+ return ConnectionFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x ConnectionFlags) HasBits(mask ConnectionFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x ConnectionFlags) ClearBits(mask ConnectionFlags) ConnectionFlags {
+ return ^mask & x
+}
+
+func (x ConnectionFlags) String() string {
+ switch x {
+ case 1:
+ return "GetConnectionInfo"
+ case 2:
+ return "Connect"
+ case 4:
+ return "Append"
+ case 8:
+ return "Truncate"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = DeviceSignal(0)
+
+type DeviceSignal uint32
+
+const (
+ DeviceSignalReadable DeviceSignal = 16777216
+ DeviceSignalWritable DeviceSignal = 33554432
+ DeviceSignalError DeviceSignal = 67108864
+ DeviceSignalHangup DeviceSignal = 134217728
+ DeviceSignalOob DeviceSignal = 268435456
+ DeviceSignal_Mask DeviceSignal = 520093696
+)
+
+func (_ DeviceSignal) I_BitsMask() DeviceSignal {
+ return DeviceSignal_Mask
+}
+
+func (_ DeviceSignal) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x DeviceSignal) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x DeviceSignal) GetUnknownBits() uint64 {
+ return uint64(^DeviceSignal_Mask & x)
+}
+
+func (x DeviceSignal) InvertBits() DeviceSignal {
+ return DeviceSignal_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x DeviceSignal) HasBits(mask DeviceSignal) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x DeviceSignal) ClearBits(mask DeviceSignal) DeviceSignal {
+ return ^mask & x
+}
+
+func (x DeviceSignal) String() string {
+ switch x {
+ case 16777216:
+ return "Readable"
+ case 33554432:
+ return "Writable"
+ case 67108864:
+ return "Error"
+ case 134217728:
+ return "Hangup"
+ case 268435456:
+ return "Oob"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = DirectoryWatchMask(0)
+
+// Used by [`fuchsia.io2/Directory.Watch`] to indicate the types of events
+// interested by a watcher.
+type DirectoryWatchMask uint64
+
+const (
+ DirectoryWatchMaskExisting DirectoryWatchMask = 1
+ DirectoryWatchMaskIdle DirectoryWatchMask = 2
+ DirectoryWatchMaskAdded DirectoryWatchMask = 4
+ DirectoryWatchMaskRemoved DirectoryWatchMask = 8
+ DirectoryWatchMask_Mask DirectoryWatchMask = 15
+)
+
+func (_ DirectoryWatchMask) I_BitsMask() DirectoryWatchMask {
+ return DirectoryWatchMask_Mask
+}
+
+func (_ DirectoryWatchMask) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x DirectoryWatchMask) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x DirectoryWatchMask) GetUnknownBits() uint64 {
+ return uint64(^DirectoryWatchMask_Mask & x)
+}
+
+func (x DirectoryWatchMask) InvertBits() DirectoryWatchMask {
+ return DirectoryWatchMask_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x DirectoryWatchMask) HasBits(mask DirectoryWatchMask) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x DirectoryWatchMask) ClearBits(mask DirectoryWatchMask) DirectoryWatchMask {
+ return ^mask & x
+}
+
+func (x DirectoryWatchMask) String() string {
+ switch x {
+ case 1:
+ return "Existing"
+ case 2:
+ return "Idle"
+ case 4:
+ return "Added"
+ case 8:
+ return "Removed"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = VmoFlags(0)
+
+type VmoFlags uint64
+
+const (
+ VmoFlagsRead VmoFlags = 1
+ VmoFlagsWrite VmoFlags = 2
+ VmoFlagsExecute VmoFlags = 4
+ VmoFlagsPrivateClone VmoFlags = 65536
+ VmoFlagsSharedBuffer VmoFlags = 131072
+ VmoFlags_Mask VmoFlags = 196615
+)
+
+func (_ VmoFlags) I_BitsMask() VmoFlags {
+ return VmoFlags_Mask
+}
+
+func (_ VmoFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x VmoFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x VmoFlags) GetUnknownBits() uint64 {
+ return uint64(^VmoFlags_Mask & x)
+}
+
+func (x VmoFlags) InvertBits() VmoFlags {
+ return VmoFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x VmoFlags) HasBits(mask VmoFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x VmoFlags) ClearBits(mask VmoFlags) VmoFlags {
+ return ^mask & x
+}
+
+func (x VmoFlags) String() string {
+ switch x {
+ case 1:
+ return "Read"
+ case 2:
+ return "Write"
+ case 4:
+ return "Execute"
+ case 65536:
+ return "PrivateClone"
+ case 131072:
+ return "SharedBuffer"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = FileSignal(0)
+
+type FileSignal uint32
+
+const (
+ FileSignalReadable FileSignal = 16777216
+ FileSignalWritable FileSignal = 33554432
+ FileSignal_Mask FileSignal = 50331648
+)
+
+func (_ FileSignal) I_BitsMask() FileSignal {
+ return FileSignal_Mask
+}
+
+func (_ FileSignal) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x FileSignal) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x FileSignal) GetUnknownBits() uint64 {
+ return uint64(^FileSignal_Mask & x)
+}
+
+func (x FileSignal) InvertBits() FileSignal {
+ return FileSignal_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x FileSignal) HasBits(mask FileSignal) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x FileSignal) ClearBits(mask FileSignal) FileSignal {
+ return ^mask & x
+}
+
+func (x FileSignal) String() string {
+ switch x {
+ case 16777216:
+ return "Readable"
+ case 33554432:
+ return "Writable"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = NodeAttributesQuery(0)
+
+// When calling [`Node.GetAttributes`], set the corresponding bit to one
+// to query that particular attribute.
+// The elements here correspond one-to-one with [`NodeAttributes`].
+type NodeAttributesQuery uint64
+
+const (
+ NodeAttributesQueryProtocols NodeAttributesQuery = 1
+ NodeAttributesQueryAbilities NodeAttributesQuery = 2
+ NodeAttributesQueryContentSize NodeAttributesQuery = 4
+ NodeAttributesQueryStorageSize NodeAttributesQuery = 8
+ NodeAttributesQueryLinkCount NodeAttributesQuery = 16
+ NodeAttributesQueryCreationTime NodeAttributesQuery = 32
+ NodeAttributesQueryModificationTime NodeAttributesQuery = 64
+ NodeAttributesQueryId NodeAttributesQuery = 128
+ NodeAttributesQuery_Mask NodeAttributesQuery = 255
+)
+
+func (_ NodeAttributesQuery) I_BitsMask() NodeAttributesQuery {
+ return NodeAttributesQuery_Mask
+}
+
+func (_ NodeAttributesQuery) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x NodeAttributesQuery) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x NodeAttributesQuery) GetUnknownBits() uint64 {
+ return uint64(^NodeAttributesQuery_Mask & x)
+}
+
+func (x NodeAttributesQuery) InvertBits() NodeAttributesQuery {
+ return NodeAttributesQuery_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x NodeAttributesQuery) HasBits(mask NodeAttributesQuery) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x NodeAttributesQuery) ClearBits(mask NodeAttributesQuery) NodeAttributesQuery {
+ return ^mask & x
+}
+
+func (x NodeAttributesQuery) String() string {
+ switch x {
+ case 1:
+ return "Protocols"
+ case 2:
+ return "Abilities"
+ case 4:
+ return "ContentSize"
+ case 8:
+ return "StorageSize"
+ case 16:
+ return "LinkCount"
+ case 32:
+ return "CreationTime"
+ case 64:
+ return "ModificationTime"
+ case 128:
+ return "Id"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = Operations(0)
+
+// The common members definition behind [`Rights`] and [`Abilities`].
+// Note that Directory operations are distinct from File operations, with the
+// exception of some common operations (e.g. `GET_ATTRIBUTES`) defined on the
+// underlying [`fuchsia.io2/Node`].
+type Operations uint64
+
+const (
+ OperationsConnect Operations = 1
+ OperationsReadBytes Operations = 2
+ OperationsWriteBytes Operations = 4
+ OperationsExecute Operations = 8
+ OperationsGetAttributes Operations = 16
+ OperationsUpdateAttributes Operations = 32
+ OperationsEnumerate Operations = 64
+ OperationsTraverse Operations = 128
+ OperationsModifyDirectory Operations = 256
+ OperationsAdmin Operations = 72057594037927936
+ Operations_Mask Operations = 72057594037928447
+)
+
+func (_ Operations) I_BitsMask() Operations {
+ return Operations_Mask
+}
+
+func (_ Operations) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x Operations) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x Operations) GetUnknownBits() uint64 {
+ return uint64(^Operations_Mask & x)
+}
+
+func (x Operations) InvertBits() Operations {
+ return Operations_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x Operations) HasBits(mask Operations) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x Operations) ClearBits(mask Operations) Operations {
+ return ^mask & x
+}
+
+func (x Operations) String() string {
+ switch x {
+ case 1:
+ return "Connect"
+ case 2:
+ return "ReadBytes"
+ case 4:
+ return "WriteBytes"
+ case 8:
+ return "Execute"
+ case 16:
+ return "GetAttributes"
+ case 32:
+ return "UpdateAttributes"
+ case 64:
+ return "Enumerate"
+ case 128:
+ return "Traverse"
+ case 256:
+ return "ModifyDirectory"
+ case 72057594037927936:
+ return "Admin"
+ }
+ return "Unknown"
+}
+
+// Options for requesting rights on the new connection. Because opening a
+// new connection may involve multiple hops through directory proxies,
+// we require the client to set an upper bound and lower bound on the
+// rights request, and intermediate proxies to refine these bounds.
+//
+// The rights manipulation should be implemented mechanically
+// without knowledge of any specific rights, and servers should propagate
+// unknown bits members, to gracefully handle future rights extensions.
+//
+// ## Implementation Notes
+//
+// It could be common for a client to request an exact set of rights.
+// We recommend client libraries to define a helper function like follows:
+//
+// ```
+// fn Exact(exact_rights: Rights) -> RightsRequest {
+// RightsRequest {
+// at_most: exact_rights,
+// at_least: exact_rights,
+// resolution: RightsResolution.MAXIMIZE,
+// }
+// }
+// ```
+type RightsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ // Sets an upper bound on the resulting rights. The exact rights will
+ // depend on `resolution`.
+ //
+ // ## Implementation Notes
+ //
+ // When a directory proxy encounters this variant, it should compute the
+ // intersection between this and the rights on the connection where it
+ // received the request, to shrink the rights.
+ //
+ // * If the intersection is empty, or not a superset of `at_least`,
+ // the proxy should close `object_request` with the
+ // `ZX_ERR_ACCESS_DENIED` epitaph.
+ // * Otherwise, the proxy should forward the `Open` call as usual,
+ // but update `at_most` with the shrunk rights.
+ AtMost Operations `fidl_offset_v1:"0"`
+ // Sets a lower bound on the resulting rights. The exact rights will
+ // depend on `resolution`.
+ //
+ // + During [`Directory.Open`], you may only specify the same rights as
+ // what the directory connection already has, or a subset of those.
+ // + During [`Node.Reopen`], similarly, you may only specify the same or
+ // a subset of rights possessed by the original connection.
+ // + Exceeding those rights causes `object_request` to be closed with a
+ // `ZX_ERR_ACCESS_DENIED` epitaph.
+ //
+ // Therefore there are these invariants which should be maintained:
+ //
+ // ```
+ // at_most ⊋ {}
+ // at_most ⊃ at_least
+ // rights_on_connection_where_open_is_received ⊋ {}
+ // rights_on_connection_where_open_is_received ⊃ at_least
+ // ```
+ //
+ // using the superset (`⊃`), proper superset (`⊋`),
+ // and empty set (`{}`) notations.
+ AtLeast Operations `fidl_offset_v1:"8"`
+ // Controls how the rights on the new connection are computed from
+ // `at_most` and `at_least`. See [`fuchsia.io2/RightsResolution`].
+ Resolution RightsResolution `fidl_offset_v1:"16"`
+}
+
+var _mRightsRequest = _bindings.CreateLazyMarshaler(RightsRequest{})
+
+func (msg *RightsRequest) Marshaler() _bindings.Marshaler {
+ return _mRightsRequest
+}
+
+type DirectoryUnlinkResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mDirectoryUnlinkResponse = _bindings.CreateLazyMarshaler(DirectoryUnlinkResponse{})
+
+func (msg *DirectoryUnlinkResponse) Marshaler() _bindings.Marshaler {
+ return _mDirectoryUnlinkResponse
+}
+
+type DirectoryRenameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mDirectoryRenameResponse = _bindings.CreateLazyMarshaler(DirectoryRenameResponse{})
+
+func (msg *DirectoryRenameResponse) Marshaler() _bindings.Marshaler {
+ return _mDirectoryRenameResponse
+}
+
+type DirectoryLinkResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mDirectoryLinkResponse = _bindings.CreateLazyMarshaler(DirectoryLinkResponse{})
+
+func (msg *DirectoryLinkResponse) Marshaler() _bindings.Marshaler {
+ return _mDirectoryLinkResponse
+}
+
+type DirectoryIteratorGetNextResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Entries []DirectoryEntry `fidl_offset_v1:"0" fidl_bounds:"8192"`
+}
+
+var _mDirectoryIteratorGetNextResponse = _bindings.CreateLazyMarshaler(DirectoryIteratorGetNextResponse{})
+
+func (msg *DirectoryIteratorGetNextResponse) Marshaler() _bindings.Marshaler {
+ return _mDirectoryIteratorGetNextResponse
+}
+
+type IdleEvent struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mIdleEvent = _bindings.CreateLazyMarshaler(IdleEvent{})
+
+func (msg *IdleEvent) Marshaler() _bindings.Marshaler {
+ return _mIdleEvent
+}
+
+type FileSeekResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ OffsetFromStart uint64 `fidl_offset_v1:"0"`
+}
+
+var _mFileSeekResponse = _bindings.CreateLazyMarshaler(FileSeekResponse{})
+
+func (msg *FileSeekResponse) Marshaler() _bindings.Marshaler {
+ return _mFileSeekResponse
+}
+
+type FileReadResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Data []uint8 `fidl_offset_v1:"0" fidl_bounds:"8192"`
+}
+
+var _mFileReadResponse = _bindings.CreateLazyMarshaler(FileReadResponse{})
+
+func (msg *FileReadResponse) Marshaler() _bindings.Marshaler {
+ return _mFileReadResponse
+}
+
+type FileWriteResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ ActualCount uint64 `fidl_offset_v1:"0"`
+}
+
+var _mFileWriteResponse = _bindings.CreateLazyMarshaler(FileWriteResponse{})
+
+func (msg *FileWriteResponse) Marshaler() _bindings.Marshaler {
+ return _mFileWriteResponse
+}
+
+type FileReadAtResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Data []uint8 `fidl_offset_v1:"0" fidl_bounds:"8192"`
+}
+
+var _mFileReadAtResponse = _bindings.CreateLazyMarshaler(FileReadAtResponse{})
+
+func (msg *FileReadAtResponse) Marshaler() _bindings.Marshaler {
+ return _mFileReadAtResponse
+}
+
+type FileWriteAtResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ ActualCount uint64 `fidl_offset_v1:"0"`
+}
+
+var _mFileWriteAtResponse = _bindings.CreateLazyMarshaler(FileWriteAtResponse{})
+
+func (msg *FileWriteAtResponse) Marshaler() _bindings.Marshaler {
+ return _mFileWriteAtResponse
+}
+
+type FileResizeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mFileResizeResponse = _bindings.CreateLazyMarshaler(FileResizeResponse{})
+
+func (msg *FileResizeResponse) Marshaler() _bindings.Marshaler {
+ return _mFileResizeResponse
+}
+
+type FileGetMemRangeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Buffer fuchsiamem.Range `fidl_offset_v1:"0"`
+}
+
+var _mFileGetMemRangeResponse = _bindings.CreateLazyMarshaler(FileGetMemRangeResponse{})
+
+func (msg *FileGetMemRangeResponse) Marshaler() _bindings.Marshaler {
+ return _mFileGetMemRangeResponse
+}
+
+type AdvisoryLockingAdvisoryLockResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mAdvisoryLockingAdvisoryLockResponse = _bindings.CreateLazyMarshaler(AdvisoryLockingAdvisoryLockResponse{})
+
+func (msg *AdvisoryLockingAdvisoryLockResponse) Marshaler() _bindings.Marshaler {
+ return _mAdvisoryLockingAdvisoryLockResponse
+}
+
+// A range within a file associated with an advisory lock.
+//
+// The range can extend beyond the end of the file but cannot extend beyond
+// the beginning of the file.
+type AdvisoryLockRange struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ // The location in the file from which [`offset`] is computed.
+ Origin SeekOrigin `fidl_offset_v1:"0"`
+ // The start of the byte range, expressed as an offset from [`origin`].
+ // Cannot be negative if [`origin`] is [`SeekOrigin.START`].
+ Offset int64 `fidl_offset_v1:"8"`
+ // The length of the byte range in bytes.
+ //
+ // If the length is zero, then the byte range exends until the end of the
+ // file, regardless of how large the file becomes.
+ //
+ // If the length is negative, the byte range includes the bytes `offset` +
+ // `length` up to, and including, `offset` - 1, provided this range does
+ // not extend beyond the beginning of the file.
+ Length int64 `fidl_offset_v1:"16"`
+}
+
+var _mAdvisoryLockRange = _bindings.CreateLazyMarshaler(AdvisoryLockRange{})
+
+func (msg *AdvisoryLockRange) Marshaler() _bindings.Marshaler {
+ return _mAdvisoryLockRange
+}
+
+type NodeGetTokenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ Token _zx.Event `fidl_offset_v1:"0" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mNodeGetTokenResponse = _bindings.CreateLazyMarshaler(NodeGetTokenResponse{})
+
+func (msg *NodeGetTokenResponse) Marshaler() _bindings.Marshaler {
+ return _mNodeGetTokenResponse
+}
+
+type NodeGetAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Attributes NodeAttributes `fidl_offset_v1:"0"`
+}
+
+var _mNodeGetAttributesResponse = _bindings.CreateLazyMarshaler(NodeGetAttributesResponse{})
+
+func (msg *NodeGetAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mNodeGetAttributesResponse
+}
+
+type NodeUpdateAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mNodeUpdateAttributesResponse = _bindings.CreateLazyMarshaler(NodeUpdateAttributesResponse{})
+
+func (msg *NodeUpdateAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mNodeUpdateAttributesResponse
+}
+
+type NodeSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mNodeSyncResponse = _bindings.CreateLazyMarshaler(NodeSyncResponse{})
+
+func (msg *NodeSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mNodeSyncResponse
+}
+
+type debuglogWithCtxReopenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Options ConnectionOptions `fidl_offset_v1:"0"`
+ ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mdebuglogWithCtxReopenRequest = _bindings.CreateLazyMarshaler(debuglogWithCtxReopenRequest{})
+
+func (msg *debuglogWithCtxReopenRequest) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxReopenRequest
+}
+
+type debuglogWithCtxDescribeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query ConnectionInfoQuery `fidl_offset_v1:"0"`
+}
+
+var _mdebuglogWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(debuglogWithCtxDescribeRequest{})
+
+func (msg *debuglogWithCtxDescribeRequest) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxDescribeRequest
+}
+
+type debuglogWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mdebuglogWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxDescribeResponse{})
+
+func (msg *debuglogWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxDescribeResponse
+}
+
+type debuglogWithCtxOnConnectionInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mdebuglogWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxOnConnectionInfoResponse{})
+
+func (msg *debuglogWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxOnConnectionInfoResponse
+}
+
+type debuglogWithCtxGetTokenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetTokenResult `fidl_offset_v1:"0"`
+}
+
+var _mdebuglogWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxGetTokenResponse{})
+
+func (msg *debuglogWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxGetTokenResponse
+}
+
+type debuglogWithCtxGetAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query NodeAttributesQuery `fidl_offset_v1:"0"`
+}
+
+var _mdebuglogWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(debuglogWithCtxGetAttributesRequest{})
+
+func (msg *debuglogWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxGetAttributesRequest
+}
+
+type debuglogWithCtxGetAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mdebuglogWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxGetAttributesResponse{})
+
+func (msg *debuglogWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxGetAttributesResponse
+}
+
+type debuglogWithCtxUpdateAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Attributes NodeAttributes `fidl_offset_v1:"0"`
+}
+
+var _mdebuglogWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(debuglogWithCtxUpdateAttributesRequest{})
+
+func (msg *debuglogWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxUpdateAttributesRequest
+}
+
+type debuglogWithCtxUpdateAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeUpdateAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mdebuglogWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxUpdateAttributesResponse{})
+
+func (msg *debuglogWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxUpdateAttributesResponse
+}
+
+type debuglogWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeSyncResult `fidl_offset_v1:"0"`
+}
+
+var _mdebuglogWithCtxSyncResponse = _bindings.CreateLazyMarshaler(debuglogWithCtxSyncResponse{})
+
+func (msg *debuglogWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mdebuglogWithCtxSyncResponse
+}
+
+type directoryWithCtxReopenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Options ConnectionOptions `fidl_offset_v1:"0"`
+ ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mdirectoryWithCtxReopenRequest = _bindings.CreateLazyMarshaler(directoryWithCtxReopenRequest{})
+
+func (msg *directoryWithCtxReopenRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxReopenRequest
+}
+
+type directoryWithCtxDescribeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query ConnectionInfoQuery `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(directoryWithCtxDescribeRequest{})
+
+func (msg *directoryWithCtxDescribeRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxDescribeRequest
+}
+
+type directoryWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(directoryWithCtxDescribeResponse{})
+
+func (msg *directoryWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxDescribeResponse
+}
+
+type directoryWithCtxOnConnectionInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(directoryWithCtxOnConnectionInfoResponse{})
+
+func (msg *directoryWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxOnConnectionInfoResponse
+}
+
+type directoryWithCtxGetTokenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetTokenResult `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetTokenResponse{})
+
+func (msg *directoryWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxGetTokenResponse
+}
+
+type directoryWithCtxGetAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query NodeAttributesQuery `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(directoryWithCtxGetAttributesRequest{})
+
+func (msg *directoryWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxGetAttributesRequest
+}
+
+type directoryWithCtxGetAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(directoryWithCtxGetAttributesResponse{})
+
+func (msg *directoryWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxGetAttributesResponse
+}
+
+type directoryWithCtxUpdateAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Attributes NodeAttributes `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(directoryWithCtxUpdateAttributesRequest{})
+
+func (msg *directoryWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxUpdateAttributesRequest
+}
+
+type directoryWithCtxUpdateAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeUpdateAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(directoryWithCtxUpdateAttributesResponse{})
+
+func (msg *directoryWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxUpdateAttributesResponse
+}
+
+type directoryWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeSyncResult `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxSyncResponse = _bindings.CreateLazyMarshaler(directoryWithCtxSyncResponse{})
+
+func (msg *directoryWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxSyncResponse
+}
+
+type directoryWithCtxOpenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"48" fidl_alignment_v1:"8"`
+ Path string `fidl_offset_v1:"0" fidl_bounds:"4095"`
+ Mode OpenMode `fidl_offset_v1:"16"`
+ Options ConnectionOptions `fidl_offset_v1:"24"`
+ ObjectRequest _zx.Channel `fidl_offset_v1:"40" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mdirectoryWithCtxOpenRequest = _bindings.CreateLazyMarshaler(directoryWithCtxOpenRequest{})
+
+func (msg *directoryWithCtxOpenRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxOpenRequest
+}
+
+type directoryWithCtxUnlinkRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Path string `fidl_offset_v1:"0" fidl_bounds:"4095"`
+}
+
+var _mdirectoryWithCtxUnlinkRequest = _bindings.CreateLazyMarshaler(directoryWithCtxUnlinkRequest{})
+
+func (msg *directoryWithCtxUnlinkRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxUnlinkRequest
+}
+
+type directoryWithCtxUnlinkResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result DirectoryUnlinkResult `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxUnlinkResponse = _bindings.CreateLazyMarshaler(directoryWithCtxUnlinkResponse{})
+
+func (msg *directoryWithCtxUnlinkResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxUnlinkResponse
+}
+
+type directoryWithCtxEnumerateRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Options DirectoryEnumerateOptions `fidl_offset_v1:"0"`
+ Iterator DirectoryIteratorWithCtxInterfaceRequest `fidl_offset_v1:"16" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mdirectoryWithCtxEnumerateRequest = _bindings.CreateLazyMarshaler(directoryWithCtxEnumerateRequest{})
+
+func (msg *directoryWithCtxEnumerateRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxEnumerateRequest
+}
+
+type directoryWithCtxRenameRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Src string `fidl_offset_v1:"0" fidl_bounds:"255"`
+ DstParentToken _zx.Event `fidl_offset_v1:"16" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ Dst string `fidl_offset_v1:"24" fidl_bounds:"255"`
+}
+
+var _mdirectoryWithCtxRenameRequest = _bindings.CreateLazyMarshaler(directoryWithCtxRenameRequest{})
+
+func (msg *directoryWithCtxRenameRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxRenameRequest
+}
+
+type directoryWithCtxRenameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result DirectoryRenameResult `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxRenameResponse = _bindings.CreateLazyMarshaler(directoryWithCtxRenameResponse{})
+
+func (msg *directoryWithCtxRenameResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxRenameResponse
+}
+
+type directoryWithCtxLinkRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Src string `fidl_offset_v1:"0" fidl_bounds:"255"`
+ DstParentToken _zx.Event `fidl_offset_v1:"16" fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ Dst string `fidl_offset_v1:"24" fidl_bounds:"255"`
+}
+
+var _mdirectoryWithCtxLinkRequest = _bindings.CreateLazyMarshaler(directoryWithCtxLinkRequest{})
+
+func (msg *directoryWithCtxLinkRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxLinkRequest
+}
+
+type directoryWithCtxLinkResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result DirectoryLinkResult `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryWithCtxLinkResponse = _bindings.CreateLazyMarshaler(directoryWithCtxLinkResponse{})
+
+func (msg *directoryWithCtxLinkResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxLinkResponse
+}
+
+type directoryWithCtxWatchRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ Mask DirectoryWatchMask `fidl_offset_v1:"0"`
+ Options DirectoryWatchOptions `fidl_offset_v1:"8"`
+ Watcher DirectoryWatcherWithCtxInterfaceRequest `fidl_offset_v1:"24" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mdirectoryWithCtxWatchRequest = _bindings.CreateLazyMarshaler(directoryWithCtxWatchRequest{})
+
+func (msg *directoryWithCtxWatchRequest) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWithCtxWatchRequest
+}
+
+type directoryIteratorWithCtxGetNextResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result DirectoryIteratorGetNextResult `fidl_offset_v1:"0"`
+}
+
+var _mdirectoryIteratorWithCtxGetNextResponse = _bindings.CreateLazyMarshaler(directoryIteratorWithCtxGetNextResponse{})
+
+func (msg *directoryIteratorWithCtxGetNextResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryIteratorWithCtxGetNextResponse
+}
+
+type directoryWatcherWithCtxGetNextResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Events []DirectoryWatchedEvent `fidl_offset_v1:"0" fidl_bounds:"8192"`
+}
+
+var _mdirectoryWatcherWithCtxGetNextResponse = _bindings.CreateLazyMarshaler(directoryWatcherWithCtxGetNextResponse{})
+
+func (msg *directoryWatcherWithCtxGetNextResponse) Marshaler() _bindings.Marshaler {
+ return _mdirectoryWatcherWithCtxGetNextResponse
+}
+
+type fileWithCtxAdvisoryLockRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Request AdvisoryLockRequest `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxAdvisoryLockRequest = _bindings.CreateLazyMarshaler(fileWithCtxAdvisoryLockRequest{})
+
+func (msg *fileWithCtxAdvisoryLockRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxAdvisoryLockRequest
+}
+
+type fileWithCtxAdvisoryLockResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result AdvisoryLockingAdvisoryLockResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(fileWithCtxAdvisoryLockResponse{})
+
+func (msg *fileWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxAdvisoryLockResponse
+}
+
+type fileWithCtxReopenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Options ConnectionOptions `fidl_offset_v1:"0"`
+ ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mfileWithCtxReopenRequest = _bindings.CreateLazyMarshaler(fileWithCtxReopenRequest{})
+
+func (msg *fileWithCtxReopenRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxReopenRequest
+}
+
+type fileWithCtxDescribeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query ConnectionInfoQuery `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(fileWithCtxDescribeRequest{})
+
+func (msg *fileWithCtxDescribeRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxDescribeRequest
+}
+
+type fileWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(fileWithCtxDescribeResponse{})
+
+func (msg *fileWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxDescribeResponse
+}
+
+type fileWithCtxOnConnectionInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(fileWithCtxOnConnectionInfoResponse{})
+
+func (msg *fileWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxOnConnectionInfoResponse
+}
+
+type fileWithCtxGetTokenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetTokenResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetTokenResponse{})
+
+func (msg *fileWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxGetTokenResponse
+}
+
+type fileWithCtxGetAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query NodeAttributesQuery `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(fileWithCtxGetAttributesRequest{})
+
+func (msg *fileWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxGetAttributesRequest
+}
+
+type fileWithCtxGetAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetAttributesResponse{})
+
+func (msg *fileWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxGetAttributesResponse
+}
+
+type fileWithCtxUpdateAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Attributes NodeAttributes `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(fileWithCtxUpdateAttributesRequest{})
+
+func (msg *fileWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxUpdateAttributesRequest
+}
+
+type fileWithCtxUpdateAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeUpdateAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(fileWithCtxUpdateAttributesResponse{})
+
+func (msg *fileWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxUpdateAttributesResponse
+}
+
+type fileWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeSyncResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxSyncResponse = _bindings.CreateLazyMarshaler(fileWithCtxSyncResponse{})
+
+func (msg *fileWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSyncResponse
+}
+
+type fileWithCtxSeekRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Origin SeekOrigin `fidl_offset_v1:"0"`
+ Offset int64 `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxSeekRequest = _bindings.CreateLazyMarshaler(fileWithCtxSeekRequest{})
+
+func (msg *fileWithCtxSeekRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSeekRequest
+}
+
+type fileWithCtxSeekResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result FileSeekResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxSeekResponse = _bindings.CreateLazyMarshaler(fileWithCtxSeekResponse{})
+
+func (msg *fileWithCtxSeekResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxSeekResponse
+}
+
+type fileWithCtxReadRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Count uint64 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxReadRequest = _bindings.CreateLazyMarshaler(fileWithCtxReadRequest{})
+
+func (msg *fileWithCtxReadRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxReadRequest
+}
+
+type fileWithCtxReadResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result FileReadResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxReadResponse = _bindings.CreateLazyMarshaler(fileWithCtxReadResponse{})
+
+func (msg *fileWithCtxReadResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxReadResponse
+}
+
+type fileWithCtxWriteRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Data []uint8 `fidl_offset_v1:"0" fidl_bounds:"8192"`
+}
+
+var _mfileWithCtxWriteRequest = _bindings.CreateLazyMarshaler(fileWithCtxWriteRequest{})
+
+func (msg *fileWithCtxWriteRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxWriteRequest
+}
+
+type fileWithCtxWriteResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result FileWriteResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxWriteResponse = _bindings.CreateLazyMarshaler(fileWithCtxWriteResponse{})
+
+func (msg *fileWithCtxWriteResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxWriteResponse
+}
+
+type fileWithCtxReadAtRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Count uint64 `fidl_offset_v1:"0"`
+ Offset uint64 `fidl_offset_v1:"8"`
+}
+
+var _mfileWithCtxReadAtRequest = _bindings.CreateLazyMarshaler(fileWithCtxReadAtRequest{})
+
+func (msg *fileWithCtxReadAtRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxReadAtRequest
+}
+
+type fileWithCtxReadAtResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result FileReadAtResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxReadAtResponse = _bindings.CreateLazyMarshaler(fileWithCtxReadAtResponse{})
+
+func (msg *fileWithCtxReadAtResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxReadAtResponse
+}
+
+type fileWithCtxWriteAtRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Data []uint8 `fidl_offset_v1:"0" fidl_bounds:"8192"`
+ Offset uint64 `fidl_offset_v1:"16"`
+}
+
+var _mfileWithCtxWriteAtRequest = _bindings.CreateLazyMarshaler(fileWithCtxWriteAtRequest{})
+
+func (msg *fileWithCtxWriteAtRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxWriteAtRequest
+}
+
+type fileWithCtxWriteAtResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result FileWriteAtResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxWriteAtResponse = _bindings.CreateLazyMarshaler(fileWithCtxWriteAtResponse{})
+
+func (msg *fileWithCtxWriteAtResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxWriteAtResponse
+}
+
+type fileWithCtxResizeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Length uint64 `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxResizeRequest = _bindings.CreateLazyMarshaler(fileWithCtxResizeRequest{})
+
+func (msg *fileWithCtxResizeRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxResizeRequest
+}
+
+type fileWithCtxResizeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result FileResizeResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxResizeResponse = _bindings.CreateLazyMarshaler(fileWithCtxResizeResponse{})
+
+func (msg *fileWithCtxResizeResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxResizeResponse
+}
+
+type fileWithCtxGetMemRangeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags VmoFlags `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxGetMemRangeRequest = _bindings.CreateLazyMarshaler(fileWithCtxGetMemRangeRequest{})
+
+func (msg *fileWithCtxGetMemRangeRequest) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxGetMemRangeRequest
+}
+
+type fileWithCtxGetMemRangeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result FileGetMemRangeResult `fidl_offset_v1:"0"`
+}
+
+var _mfileWithCtxGetMemRangeResponse = _bindings.CreateLazyMarshaler(fileWithCtxGetMemRangeResponse{})
+
+func (msg *fileWithCtxGetMemRangeResponse) Marshaler() _bindings.Marshaler {
+ return _mfileWithCtxGetMemRangeResponse
+}
+
+type advisoryLockingWithCtxAdvisoryLockRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Request AdvisoryLockRequest `fidl_offset_v1:"0"`
+}
+
+var _madvisoryLockingWithCtxAdvisoryLockRequest = _bindings.CreateLazyMarshaler(advisoryLockingWithCtxAdvisoryLockRequest{})
+
+func (msg *advisoryLockingWithCtxAdvisoryLockRequest) Marshaler() _bindings.Marshaler {
+ return _madvisoryLockingWithCtxAdvisoryLockRequest
+}
+
+type advisoryLockingWithCtxAdvisoryLockResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result AdvisoryLockingAdvisoryLockResult `fidl_offset_v1:"0"`
+}
+
+var _madvisoryLockingWithCtxAdvisoryLockResponse = _bindings.CreateLazyMarshaler(advisoryLockingWithCtxAdvisoryLockResponse{})
+
+func (msg *advisoryLockingWithCtxAdvisoryLockResponse) Marshaler() _bindings.Marshaler {
+ return _madvisoryLockingWithCtxAdvisoryLockResponse
+}
+
+type memoryWithCtxReopenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Options ConnectionOptions `fidl_offset_v1:"0"`
+ ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mmemoryWithCtxReopenRequest = _bindings.CreateLazyMarshaler(memoryWithCtxReopenRequest{})
+
+func (msg *memoryWithCtxReopenRequest) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxReopenRequest
+}
+
+type memoryWithCtxDescribeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query ConnectionInfoQuery `fidl_offset_v1:"0"`
+}
+
+var _mmemoryWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(memoryWithCtxDescribeRequest{})
+
+func (msg *memoryWithCtxDescribeRequest) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxDescribeRequest
+}
+
+type memoryWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mmemoryWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(memoryWithCtxDescribeResponse{})
+
+func (msg *memoryWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxDescribeResponse
+}
+
+type memoryWithCtxOnConnectionInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mmemoryWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(memoryWithCtxOnConnectionInfoResponse{})
+
+func (msg *memoryWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxOnConnectionInfoResponse
+}
+
+type memoryWithCtxGetTokenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetTokenResult `fidl_offset_v1:"0"`
+}
+
+var _mmemoryWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(memoryWithCtxGetTokenResponse{})
+
+func (msg *memoryWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxGetTokenResponse
+}
+
+type memoryWithCtxGetAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query NodeAttributesQuery `fidl_offset_v1:"0"`
+}
+
+var _mmemoryWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(memoryWithCtxGetAttributesRequest{})
+
+func (msg *memoryWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxGetAttributesRequest
+}
+
+type memoryWithCtxGetAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mmemoryWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(memoryWithCtxGetAttributesResponse{})
+
+func (msg *memoryWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxGetAttributesResponse
+}
+
+type memoryWithCtxUpdateAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Attributes NodeAttributes `fidl_offset_v1:"0"`
+}
+
+var _mmemoryWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(memoryWithCtxUpdateAttributesRequest{})
+
+func (msg *memoryWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxUpdateAttributesRequest
+}
+
+type memoryWithCtxUpdateAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeUpdateAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mmemoryWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(memoryWithCtxUpdateAttributesResponse{})
+
+func (msg *memoryWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxUpdateAttributesResponse
+}
+
+type memoryWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeSyncResult `fidl_offset_v1:"0"`
+}
+
+var _mmemoryWithCtxSyncResponse = _bindings.CreateLazyMarshaler(memoryWithCtxSyncResponse{})
+
+func (msg *memoryWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mmemoryWithCtxSyncResponse
+}
+
+type nodeWithCtxReopenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Options ConnectionOptions `fidl_offset_v1:"0"`
+ ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mnodeWithCtxReopenRequest = _bindings.CreateLazyMarshaler(nodeWithCtxReopenRequest{})
+
+func (msg *nodeWithCtxReopenRequest) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxReopenRequest
+}
+
+type nodeWithCtxDescribeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query ConnectionInfoQuery `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(nodeWithCtxDescribeRequest{})
+
+func (msg *nodeWithCtxDescribeRequest) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxDescribeRequest
+}
+
+type nodeWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(nodeWithCtxDescribeResponse{})
+
+func (msg *nodeWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxDescribeResponse
+}
+
+type nodeWithCtxOnConnectionInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(nodeWithCtxOnConnectionInfoResponse{})
+
+func (msg *nodeWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxOnConnectionInfoResponse
+}
+
+type nodeWithCtxGetTokenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetTokenResult `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(nodeWithCtxGetTokenResponse{})
+
+func (msg *nodeWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxGetTokenResponse
+}
+
+type nodeWithCtxGetAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query NodeAttributesQuery `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(nodeWithCtxGetAttributesRequest{})
+
+func (msg *nodeWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxGetAttributesRequest
+}
+
+type nodeWithCtxGetAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(nodeWithCtxGetAttributesResponse{})
+
+func (msg *nodeWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxGetAttributesResponse
+}
+
+type nodeWithCtxUpdateAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Attributes NodeAttributes `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(nodeWithCtxUpdateAttributesRequest{})
+
+func (msg *nodeWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxUpdateAttributesRequest
+}
+
+type nodeWithCtxUpdateAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeUpdateAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(nodeWithCtxUpdateAttributesResponse{})
+
+func (msg *nodeWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxUpdateAttributesResponse
+}
+
+type nodeWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeSyncResult `fidl_offset_v1:"0"`
+}
+
+var _mnodeWithCtxSyncResponse = _bindings.CreateLazyMarshaler(nodeWithCtxSyncResponse{})
+
+func (msg *nodeWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mnodeWithCtxSyncResponse
+}
+
+type pipeWithCtxReopenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Options ConnectionOptions `fidl_offset_v1:"0"`
+ ObjectRequest _zx.Channel `fidl_offset_v1:"16" fidl_handle_subtype:"4" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mpipeWithCtxReopenRequest = _bindings.CreateLazyMarshaler(pipeWithCtxReopenRequest{})
+
+func (msg *pipeWithCtxReopenRequest) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxReopenRequest
+}
+
+type pipeWithCtxDescribeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query ConnectionInfoQuery `fidl_offset_v1:"0"`
+}
+
+var _mpipeWithCtxDescribeRequest = _bindings.CreateLazyMarshaler(pipeWithCtxDescribeRequest{})
+
+func (msg *pipeWithCtxDescribeRequest) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxDescribeRequest
+}
+
+type pipeWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mpipeWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(pipeWithCtxDescribeResponse{})
+
+func (msg *pipeWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxDescribeResponse
+}
+
+type pipeWithCtxOnConnectionInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Info ConnectionInfo `fidl_offset_v1:"0"`
+}
+
+var _mpipeWithCtxOnConnectionInfoResponse = _bindings.CreateLazyMarshaler(pipeWithCtxOnConnectionInfoResponse{})
+
+func (msg *pipeWithCtxOnConnectionInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxOnConnectionInfoResponse
+}
+
+type pipeWithCtxGetTokenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetTokenResult `fidl_offset_v1:"0"`
+}
+
+var _mpipeWithCtxGetTokenResponse = _bindings.CreateLazyMarshaler(pipeWithCtxGetTokenResponse{})
+
+func (msg *pipeWithCtxGetTokenResponse) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxGetTokenResponse
+}
+
+type pipeWithCtxGetAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Query NodeAttributesQuery `fidl_offset_v1:"0"`
+}
+
+var _mpipeWithCtxGetAttributesRequest = _bindings.CreateLazyMarshaler(pipeWithCtxGetAttributesRequest{})
+
+func (msg *pipeWithCtxGetAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxGetAttributesRequest
+}
+
+type pipeWithCtxGetAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeGetAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mpipeWithCtxGetAttributesResponse = _bindings.CreateLazyMarshaler(pipeWithCtxGetAttributesResponse{})
+
+func (msg *pipeWithCtxGetAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxGetAttributesResponse
+}
+
+type pipeWithCtxUpdateAttributesRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Attributes NodeAttributes `fidl_offset_v1:"0"`
+}
+
+var _mpipeWithCtxUpdateAttributesRequest = _bindings.CreateLazyMarshaler(pipeWithCtxUpdateAttributesRequest{})
+
+func (msg *pipeWithCtxUpdateAttributesRequest) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxUpdateAttributesRequest
+}
+
+type pipeWithCtxUpdateAttributesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeUpdateAttributesResult `fidl_offset_v1:"0"`
+}
+
+var _mpipeWithCtxUpdateAttributesResponse = _bindings.CreateLazyMarshaler(pipeWithCtxUpdateAttributesResponse{})
+
+func (msg *pipeWithCtxUpdateAttributesResponse) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxUpdateAttributesResponse
+}
+
+type pipeWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NodeSyncResult `fidl_offset_v1:"0"`
+}
+
+var _mpipeWithCtxSyncResponse = _bindings.CreateLazyMarshaler(pipeWithCtxSyncResponse{})
+
+func (msg *pipeWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mpipeWithCtxSyncResponse
+}
+
+type I_representationTag uint64
+
+const (
+ Representation_unknownData = 0 // 0x00000000
+ RepresentationConnector = 1 // 0x00000001
+ RepresentationDirectory = 2 // 0x00000002
+ RepresentationFile = 3 // 0x00000003
+ RepresentationMemory = 4 // 0x00000004
+ RepresentationPosixSocket = 5 // 0x00000005
+ RepresentationPipe = 6 // 0x00000006
+ RepresentationDebuglog = 7 // 0x00000007
+ RepresentationDevice = 8 // 0x00000008
+ RepresentationTty = 9 // 0x00000009
+)
+
+// Describes how the connection should be handled, and provides auxiliary
+// handles and information for the connection where applicable.
+// Refer to [`Node.Describe`] and [`Node.OnConnectionInfo`].
+//
+// If handles are returned which offer alternative ways of access to the node,
+// the rights on the handles should correspond to the rights on the connection.
+//
+// If the client specified more than one protocol in `protocols` during
+// [`Directory.Open`] or [`Node.Reopen`], the [`Representation`] xunion carries
+// additionally the result of the connection-time negotiation via its tag.
+//
+// The elements have one-to-one correspondence with the members of
+// [`NodeProtocols`].
+type Representation struct {
+ I_representationTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // See [`NodeProtocols.CONNECTOR`].
+ Connector ConnectorInfo `fidl_ordinal:"1"`
+ // See [`NodeProtocols.DIRECTORY`].
+ Directory DirectoryInfo `fidl_ordinal:"2"`
+ // See [`NodeProtocols.FILE`].
+ File FileInfo `fidl_ordinal:"3"`
+ // See [`NodeProtocols.MEMORY`].
+ Memory MemoryInfo `fidl_ordinal:"4"`
+ // See [`NodeProtocols.POSIX_SOCKET`].
+ PosixSocket PosixSocketInfo `fidl_ordinal:"5"`
+ // See [`NodeProtocols.PIPE`].
+ Pipe PipeInfo `fidl_ordinal:"6"`
+ // See [`NodeProtocols.DEBUGLOG`].
+ Debuglog DebuglogInfo `fidl_ordinal:"7"`
+ Device DeviceInfo `fidl_ordinal:"8"`
+ Tty TtyInfo `fidl_ordinal:"9"`
+}
+
+func (_m *Representation) reset() {
+ switch _m.I_representationTag {
+ case 1:
+ var _zeroed ConnectorInfo
+ _m.Connector = _zeroed
+ case 2:
+ var _zeroed DirectoryInfo
+ _m.Directory = _zeroed
+ case 3:
+ var _zeroed FileInfo
+ _m.File = _zeroed
+ case 4:
+ var _zeroed MemoryInfo
+ _m.Memory = _zeroed
+ case 5:
+ var _zeroed PosixSocketInfo
+ _m.PosixSocket = _zeroed
+ case 6:
+ var _zeroed PipeInfo
+ _m.Pipe = _zeroed
+ case 7:
+ var _zeroed DebuglogInfo
+ _m.Debuglog = _zeroed
+ case 8:
+ var _zeroed DeviceInfo
+ _m.Device = _zeroed
+ case 9:
+ var _zeroed TtyInfo
+ _m.Tty = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *Representation) Which() I_representationTag {
+ switch _m.I_representationTag {
+ case 1:
+ return RepresentationConnector
+ case 2:
+ return RepresentationDirectory
+ case 3:
+ return RepresentationFile
+ case 4:
+ return RepresentationMemory
+ case 5:
+ return RepresentationPosixSocket
+ case 6:
+ return RepresentationPipe
+ case 7:
+ return RepresentationDebuglog
+ case 8:
+ return RepresentationDevice
+ case 9:
+ return RepresentationTty
+ default:
+ return Representation_unknownData
+ }
+}
+
+func (_m *Representation) Ordinal() uint64 {
+ return uint64(_m.I_representationTag)
+}
+
+func (_m *Representation) SetConnector(connector ConnectorInfo) {
+ _m.reset()
+ _m.I_representationTag = RepresentationConnector
+ _m.Connector = connector
+}
+
+func RepresentationWithConnector(connector ConnectorInfo) Representation {
+ var _u Representation
+ _u.SetConnector(connector)
+ return _u
+}
+
+func (_m *Representation) SetDirectory(directory DirectoryInfo) {
+ _m.reset()
+ _m.I_representationTag = RepresentationDirectory
+ _m.Directory = directory
+}
+
+func RepresentationWithDirectory(directory DirectoryInfo) Representation {
+ var _u Representation
+ _u.SetDirectory(directory)
+ return _u
+}
+
+func (_m *Representation) SetFile(file FileInfo) {
+ _m.reset()
+ _m.I_representationTag = RepresentationFile
+ _m.File = file
+}
+
+func RepresentationWithFile(file FileInfo) Representation {
+ var _u Representation
+ _u.SetFile(file)
+ return _u
+}
+
+func (_m *Representation) SetMemory(memory MemoryInfo) {
+ _m.reset()
+ _m.I_representationTag = RepresentationMemory
+ _m.Memory = memory
+}
+
+func RepresentationWithMemory(memory MemoryInfo) Representation {
+ var _u Representation
+ _u.SetMemory(memory)
+ return _u
+}
+
+func (_m *Representation) SetPosixSocket(posixSocket PosixSocketInfo) {
+ _m.reset()
+ _m.I_representationTag = RepresentationPosixSocket
+ _m.PosixSocket = posixSocket
+}
+
+func RepresentationWithPosixSocket(posixSocket PosixSocketInfo) Representation {
+ var _u Representation
+ _u.SetPosixSocket(posixSocket)
+ return _u
+}
+
+func (_m *Representation) SetPipe(pipe PipeInfo) {
+ _m.reset()
+ _m.I_representationTag = RepresentationPipe
+ _m.Pipe = pipe
+}
+
+func RepresentationWithPipe(pipe PipeInfo) Representation {
+ var _u Representation
+ _u.SetPipe(pipe)
+ return _u
+}
+
+func (_m *Representation) SetDebuglog(debuglog DebuglogInfo) {
+ _m.reset()
+ _m.I_representationTag = RepresentationDebuglog
+ _m.Debuglog = debuglog
+}
+
+func RepresentationWithDebuglog(debuglog DebuglogInfo) Representation {
+ var _u Representation
+ _u.SetDebuglog(debuglog)
+ return _u
+}
+
+func (_m *Representation) SetDevice(device DeviceInfo) {
+ _m.reset()
+ _m.I_representationTag = RepresentationDevice
+ _m.Device = device
+}
+
+func RepresentationWithDevice(device DeviceInfo) Representation {
+ var _u Representation
+ _u.SetDevice(device)
+ return _u
+}
+
+func (_m *Representation) SetTty(tty TtyInfo) {
+ _m.reset()
+ _m.I_representationTag = RepresentationTty
+ _m.Tty = tty
+}
+
+func RepresentationWithTty(tty TtyInfo) Representation {
+ var _u Representation
+ _u.SetTty(tty)
+ return _u
+}
+func (_m *Representation) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
+
+type I_directoryUnlinkResultTag uint64
+
+const (
+ DirectoryUnlinkResultResponse = 1 // 0x00000001
+ DirectoryUnlinkResultErr = 2 // 0x00000002
+)
+
+type DirectoryUnlinkResult struct {
+ I_directoryUnlinkResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response DirectoryUnlinkResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *DirectoryUnlinkResult) reset() {
+ switch _m.I_directoryUnlinkResultTag {
+ case 1:
+ var _zeroed DirectoryUnlinkResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *DirectoryUnlinkResult) Which() I_directoryUnlinkResultTag {
+ return _m.I_directoryUnlinkResultTag
+}
+
+func (_m *DirectoryUnlinkResult) Ordinal() uint64 {
+ return uint64(_m.I_directoryUnlinkResultTag)
+}
+
+func (_m *DirectoryUnlinkResult) SetResponse(response DirectoryUnlinkResponse) {
+ _m.reset()
+ _m.I_directoryUnlinkResultTag = DirectoryUnlinkResultResponse
+ _m.Response = response
+}
+
+func DirectoryUnlinkResultWithResponse(response DirectoryUnlinkResponse) DirectoryUnlinkResult {
+ var _u DirectoryUnlinkResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *DirectoryUnlinkResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_directoryUnlinkResultTag = DirectoryUnlinkResultErr
+ _m.Err = err
+}
+
+func DirectoryUnlinkResultWithErr(err int32) DirectoryUnlinkResult {
+ var _u DirectoryUnlinkResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_directoryRenameResultTag uint64
+
+const (
+ DirectoryRenameResultResponse = 1 // 0x00000001
+ DirectoryRenameResultErr = 2 // 0x00000002
+)
+
+type DirectoryRenameResult struct {
+ I_directoryRenameResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response DirectoryRenameResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *DirectoryRenameResult) reset() {
+ switch _m.I_directoryRenameResultTag {
+ case 1:
+ var _zeroed DirectoryRenameResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *DirectoryRenameResult) Which() I_directoryRenameResultTag {
+ return _m.I_directoryRenameResultTag
+}
+
+func (_m *DirectoryRenameResult) Ordinal() uint64 {
+ return uint64(_m.I_directoryRenameResultTag)
+}
+
+func (_m *DirectoryRenameResult) SetResponse(response DirectoryRenameResponse) {
+ _m.reset()
+ _m.I_directoryRenameResultTag = DirectoryRenameResultResponse
+ _m.Response = response
+}
+
+func DirectoryRenameResultWithResponse(response DirectoryRenameResponse) DirectoryRenameResult {
+ var _u DirectoryRenameResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *DirectoryRenameResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_directoryRenameResultTag = DirectoryRenameResultErr
+ _m.Err = err
+}
+
+func DirectoryRenameResultWithErr(err int32) DirectoryRenameResult {
+ var _u DirectoryRenameResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_directoryLinkResultTag uint64
+
+const (
+ DirectoryLinkResultResponse = 1 // 0x00000001
+ DirectoryLinkResultErr = 2 // 0x00000002
+)
+
+type DirectoryLinkResult struct {
+ I_directoryLinkResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response DirectoryLinkResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *DirectoryLinkResult) reset() {
+ switch _m.I_directoryLinkResultTag {
+ case 1:
+ var _zeroed DirectoryLinkResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *DirectoryLinkResult) Which() I_directoryLinkResultTag {
+ return _m.I_directoryLinkResultTag
+}
+
+func (_m *DirectoryLinkResult) Ordinal() uint64 {
+ return uint64(_m.I_directoryLinkResultTag)
+}
+
+func (_m *DirectoryLinkResult) SetResponse(response DirectoryLinkResponse) {
+ _m.reset()
+ _m.I_directoryLinkResultTag = DirectoryLinkResultResponse
+ _m.Response = response
+}
+
+func DirectoryLinkResultWithResponse(response DirectoryLinkResponse) DirectoryLinkResult {
+ var _u DirectoryLinkResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *DirectoryLinkResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_directoryLinkResultTag = DirectoryLinkResultErr
+ _m.Err = err
+}
+
+func DirectoryLinkResultWithErr(err int32) DirectoryLinkResult {
+ var _u DirectoryLinkResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_directoryIteratorGetNextResultTag uint64
+
+const (
+ DirectoryIteratorGetNextResultResponse = 1 // 0x00000001
+ DirectoryIteratorGetNextResultErr = 2 // 0x00000002
+)
+
+type DirectoryIteratorGetNextResult struct {
+ I_directoryIteratorGetNextResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response DirectoryIteratorGetNextResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *DirectoryIteratorGetNextResult) reset() {
+ switch _m.I_directoryIteratorGetNextResultTag {
+ case 1:
+ var _zeroed DirectoryIteratorGetNextResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *DirectoryIteratorGetNextResult) Which() I_directoryIteratorGetNextResultTag {
+ return _m.I_directoryIteratorGetNextResultTag
+}
+
+func (_m *DirectoryIteratorGetNextResult) Ordinal() uint64 {
+ return uint64(_m.I_directoryIteratorGetNextResultTag)
+}
+
+func (_m *DirectoryIteratorGetNextResult) SetResponse(response DirectoryIteratorGetNextResponse) {
+ _m.reset()
+ _m.I_directoryIteratorGetNextResultTag = DirectoryIteratorGetNextResultResponse
+ _m.Response = response
+}
+
+func DirectoryIteratorGetNextResultWithResponse(response DirectoryIteratorGetNextResponse) DirectoryIteratorGetNextResult {
+ var _u DirectoryIteratorGetNextResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *DirectoryIteratorGetNextResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_directoryIteratorGetNextResultTag = DirectoryIteratorGetNextResultErr
+ _m.Err = err
+}
+
+func DirectoryIteratorGetNextResultWithErr(err int32) DirectoryIteratorGetNextResult {
+ var _u DirectoryIteratorGetNextResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_directoryWatchedEventTag uint64
+
+const (
+ DirectoryWatchedEvent_unknownData = 0 // 0x00000000
+ DirectoryWatchedEventExisting = 1 // 0x00000001
+ DirectoryWatchedEventIdle = 2 // 0x00000002
+ DirectoryWatchedEventAdded = 3 // 0x00000003
+ DirectoryWatchedEventRemoved = 4 // 0x00000004
+)
+
+// Events returned from [`DirectoryWatcher.GetNext`].
+type DirectoryWatchedEvent struct {
+ I_directoryWatchedEventTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // Indicates a node already existed in the directory when watching started.
+ Existing DirectoryEntry `fidl_ordinal:"1"`
+ // Indicates that no more `existing` events will be sent.
+ Idle IdleEvent `fidl_ordinal:"2"`
+ // Indicates a node has been created (either new or moved) into a
+ // directory.
+ Added DirectoryEntry `fidl_ordinal:"3"`
+ // Indicates a node has been removed (either deleted or moved) from the
+ // directory.
+ Removed string `fidl_bounds:"255" fidl_ordinal:"4"`
+}
+
+func (_m *DirectoryWatchedEvent) reset() {
+ switch _m.I_directoryWatchedEventTag {
+ case 1:
+ var _zeroed DirectoryEntry
+ _m.Existing = _zeroed
+ case 2:
+ var _zeroed IdleEvent
+ _m.Idle = _zeroed
+ case 3:
+ var _zeroed DirectoryEntry
+ _m.Added = _zeroed
+ case 4:
+ var _zeroed string
+ _m.Removed = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *DirectoryWatchedEvent) Which() I_directoryWatchedEventTag {
+ switch _m.I_directoryWatchedEventTag {
+ case 1:
+ return DirectoryWatchedEventExisting
+ case 2:
+ return DirectoryWatchedEventIdle
+ case 3:
+ return DirectoryWatchedEventAdded
+ case 4:
+ return DirectoryWatchedEventRemoved
+ default:
+ return DirectoryWatchedEvent_unknownData
+ }
+}
+
+func (_m *DirectoryWatchedEvent) Ordinal() uint64 {
+ return uint64(_m.I_directoryWatchedEventTag)
+}
+
+func (_m *DirectoryWatchedEvent) SetExisting(existing DirectoryEntry) {
+ _m.reset()
+ _m.I_directoryWatchedEventTag = DirectoryWatchedEventExisting
+ _m.Existing = existing
+}
+
+func DirectoryWatchedEventWithExisting(existing DirectoryEntry) DirectoryWatchedEvent {
+ var _u DirectoryWatchedEvent
+ _u.SetExisting(existing)
+ return _u
+}
+
+func (_m *DirectoryWatchedEvent) SetIdle(idle IdleEvent) {
+ _m.reset()
+ _m.I_directoryWatchedEventTag = DirectoryWatchedEventIdle
+ _m.Idle = idle
+}
+
+func DirectoryWatchedEventWithIdle(idle IdleEvent) DirectoryWatchedEvent {
+ var _u DirectoryWatchedEvent
+ _u.SetIdle(idle)
+ return _u
+}
+
+func (_m *DirectoryWatchedEvent) SetAdded(added DirectoryEntry) {
+ _m.reset()
+ _m.I_directoryWatchedEventTag = DirectoryWatchedEventAdded
+ _m.Added = added
+}
+
+func DirectoryWatchedEventWithAdded(added DirectoryEntry) DirectoryWatchedEvent {
+ var _u DirectoryWatchedEvent
+ _u.SetAdded(added)
+ return _u
+}
+
+func (_m *DirectoryWatchedEvent) SetRemoved(removed string) {
+ _m.reset()
+ _m.I_directoryWatchedEventTag = DirectoryWatchedEventRemoved
+ _m.Removed = removed
+}
+
+func DirectoryWatchedEventWithRemoved(removed string) DirectoryWatchedEvent {
+ var _u DirectoryWatchedEvent
+ _u.SetRemoved(removed)
+ return _u
+}
+func (_m *DirectoryWatchedEvent) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
+
+type I_fileSeekResultTag uint64
+
+const (
+ FileSeekResultResponse = 1 // 0x00000001
+ FileSeekResultErr = 2 // 0x00000002
+)
+
+type FileSeekResult struct {
+ I_fileSeekResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response FileSeekResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *FileSeekResult) reset() {
+ switch _m.I_fileSeekResultTag {
+ case 1:
+ var _zeroed FileSeekResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *FileSeekResult) Which() I_fileSeekResultTag {
+ return _m.I_fileSeekResultTag
+}
+
+func (_m *FileSeekResult) Ordinal() uint64 {
+ return uint64(_m.I_fileSeekResultTag)
+}
+
+func (_m *FileSeekResult) SetResponse(response FileSeekResponse) {
+ _m.reset()
+ _m.I_fileSeekResultTag = FileSeekResultResponse
+ _m.Response = response
+}
+
+func FileSeekResultWithResponse(response FileSeekResponse) FileSeekResult {
+ var _u FileSeekResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *FileSeekResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_fileSeekResultTag = FileSeekResultErr
+ _m.Err = err
+}
+
+func FileSeekResultWithErr(err int32) FileSeekResult {
+ var _u FileSeekResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_fileReadResultTag uint64
+
+const (
+ FileReadResultResponse = 1 // 0x00000001
+ FileReadResultErr = 2 // 0x00000002
+)
+
+type FileReadResult struct {
+ I_fileReadResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response FileReadResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *FileReadResult) reset() {
+ switch _m.I_fileReadResultTag {
+ case 1:
+ var _zeroed FileReadResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *FileReadResult) Which() I_fileReadResultTag {
+ return _m.I_fileReadResultTag
+}
+
+func (_m *FileReadResult) Ordinal() uint64 {
+ return uint64(_m.I_fileReadResultTag)
+}
+
+func (_m *FileReadResult) SetResponse(response FileReadResponse) {
+ _m.reset()
+ _m.I_fileReadResultTag = FileReadResultResponse
+ _m.Response = response
+}
+
+func FileReadResultWithResponse(response FileReadResponse) FileReadResult {
+ var _u FileReadResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *FileReadResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_fileReadResultTag = FileReadResultErr
+ _m.Err = err
+}
+
+func FileReadResultWithErr(err int32) FileReadResult {
+ var _u FileReadResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_fileWriteResultTag uint64
+
+const (
+ FileWriteResultResponse = 1 // 0x00000001
+ FileWriteResultErr = 2 // 0x00000002
+)
+
+type FileWriteResult struct {
+ I_fileWriteResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response FileWriteResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *FileWriteResult) reset() {
+ switch _m.I_fileWriteResultTag {
+ case 1:
+ var _zeroed FileWriteResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *FileWriteResult) Which() I_fileWriteResultTag {
+ return _m.I_fileWriteResultTag
+}
+
+func (_m *FileWriteResult) Ordinal() uint64 {
+ return uint64(_m.I_fileWriteResultTag)
+}
+
+func (_m *FileWriteResult) SetResponse(response FileWriteResponse) {
+ _m.reset()
+ _m.I_fileWriteResultTag = FileWriteResultResponse
+ _m.Response = response
+}
+
+func FileWriteResultWithResponse(response FileWriteResponse) FileWriteResult {
+ var _u FileWriteResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *FileWriteResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_fileWriteResultTag = FileWriteResultErr
+ _m.Err = err
+}
+
+func FileWriteResultWithErr(err int32) FileWriteResult {
+ var _u FileWriteResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_fileReadAtResultTag uint64
+
+const (
+ FileReadAtResultResponse = 1 // 0x00000001
+ FileReadAtResultErr = 2 // 0x00000002
+)
+
+type FileReadAtResult struct {
+ I_fileReadAtResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response FileReadAtResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *FileReadAtResult) reset() {
+ switch _m.I_fileReadAtResultTag {
+ case 1:
+ var _zeroed FileReadAtResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *FileReadAtResult) Which() I_fileReadAtResultTag {
+ return _m.I_fileReadAtResultTag
+}
+
+func (_m *FileReadAtResult) Ordinal() uint64 {
+ return uint64(_m.I_fileReadAtResultTag)
+}
+
+func (_m *FileReadAtResult) SetResponse(response FileReadAtResponse) {
+ _m.reset()
+ _m.I_fileReadAtResultTag = FileReadAtResultResponse
+ _m.Response = response
+}
+
+func FileReadAtResultWithResponse(response FileReadAtResponse) FileReadAtResult {
+ var _u FileReadAtResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *FileReadAtResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_fileReadAtResultTag = FileReadAtResultErr
+ _m.Err = err
+}
+
+func FileReadAtResultWithErr(err int32) FileReadAtResult {
+ var _u FileReadAtResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_fileWriteAtResultTag uint64
+
+const (
+ FileWriteAtResultResponse = 1 // 0x00000001
+ FileWriteAtResultErr = 2 // 0x00000002
+)
+
+type FileWriteAtResult struct {
+ I_fileWriteAtResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response FileWriteAtResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *FileWriteAtResult) reset() {
+ switch _m.I_fileWriteAtResultTag {
+ case 1:
+ var _zeroed FileWriteAtResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *FileWriteAtResult) Which() I_fileWriteAtResultTag {
+ return _m.I_fileWriteAtResultTag
+}
+
+func (_m *FileWriteAtResult) Ordinal() uint64 {
+ return uint64(_m.I_fileWriteAtResultTag)
+}
+
+func (_m *FileWriteAtResult) SetResponse(response FileWriteAtResponse) {
+ _m.reset()
+ _m.I_fileWriteAtResultTag = FileWriteAtResultResponse
+ _m.Response = response
+}
+
+func FileWriteAtResultWithResponse(response FileWriteAtResponse) FileWriteAtResult {
+ var _u FileWriteAtResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *FileWriteAtResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_fileWriteAtResultTag = FileWriteAtResultErr
+ _m.Err = err
+}
+
+func FileWriteAtResultWithErr(err int32) FileWriteAtResult {
+ var _u FileWriteAtResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_fileResizeResultTag uint64
+
+const (
+ FileResizeResultResponse = 1 // 0x00000001
+ FileResizeResultErr = 2 // 0x00000002
+)
+
+type FileResizeResult struct {
+ I_fileResizeResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response FileResizeResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *FileResizeResult) reset() {
+ switch _m.I_fileResizeResultTag {
+ case 1:
+ var _zeroed FileResizeResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *FileResizeResult) Which() I_fileResizeResultTag {
+ return _m.I_fileResizeResultTag
+}
+
+func (_m *FileResizeResult) Ordinal() uint64 {
+ return uint64(_m.I_fileResizeResultTag)
+}
+
+func (_m *FileResizeResult) SetResponse(response FileResizeResponse) {
+ _m.reset()
+ _m.I_fileResizeResultTag = FileResizeResultResponse
+ _m.Response = response
+}
+
+func FileResizeResultWithResponse(response FileResizeResponse) FileResizeResult {
+ var _u FileResizeResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *FileResizeResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_fileResizeResultTag = FileResizeResultErr
+ _m.Err = err
+}
+
+func FileResizeResultWithErr(err int32) FileResizeResult {
+ var _u FileResizeResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_fileGetMemRangeResultTag uint64
+
+const (
+ FileGetMemRangeResultResponse = 1 // 0x00000001
+ FileGetMemRangeResultErr = 2 // 0x00000002
+)
+
+type FileGetMemRangeResult struct {
+ I_fileGetMemRangeResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response FileGetMemRangeResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *FileGetMemRangeResult) reset() {
+ switch _m.I_fileGetMemRangeResultTag {
+ case 1:
+ var _zeroed FileGetMemRangeResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *FileGetMemRangeResult) Which() I_fileGetMemRangeResultTag {
+ return _m.I_fileGetMemRangeResultTag
+}
+
+func (_m *FileGetMemRangeResult) Ordinal() uint64 {
+ return uint64(_m.I_fileGetMemRangeResultTag)
+}
+
+func (_m *FileGetMemRangeResult) SetResponse(response FileGetMemRangeResponse) {
+ _m.reset()
+ _m.I_fileGetMemRangeResultTag = FileGetMemRangeResultResponse
+ _m.Response = response
+}
+
+func FileGetMemRangeResultWithResponse(response FileGetMemRangeResponse) FileGetMemRangeResult {
+ var _u FileGetMemRangeResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *FileGetMemRangeResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_fileGetMemRangeResultTag = FileGetMemRangeResultErr
+ _m.Err = err
+}
+
+func FileGetMemRangeResultWithErr(err int32) FileGetMemRangeResult {
+ var _u FileGetMemRangeResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_advisoryLockingAdvisoryLockResultTag uint64
+
+const (
+ AdvisoryLockingAdvisoryLockResultResponse = 1 // 0x00000001
+ AdvisoryLockingAdvisoryLockResultErr = 2 // 0x00000002
+)
+
+type AdvisoryLockingAdvisoryLockResult struct {
+ I_advisoryLockingAdvisoryLockResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response AdvisoryLockingAdvisoryLockResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *AdvisoryLockingAdvisoryLockResult) reset() {
+ switch _m.I_advisoryLockingAdvisoryLockResultTag {
+ case 1:
+ var _zeroed AdvisoryLockingAdvisoryLockResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *AdvisoryLockingAdvisoryLockResult) Which() I_advisoryLockingAdvisoryLockResultTag {
+ return _m.I_advisoryLockingAdvisoryLockResultTag
+}
+
+func (_m *AdvisoryLockingAdvisoryLockResult) Ordinal() uint64 {
+ return uint64(_m.I_advisoryLockingAdvisoryLockResultTag)
+}
+
+func (_m *AdvisoryLockingAdvisoryLockResult) SetResponse(response AdvisoryLockingAdvisoryLockResponse) {
+ _m.reset()
+ _m.I_advisoryLockingAdvisoryLockResultTag = AdvisoryLockingAdvisoryLockResultResponse
+ _m.Response = response
+}
+
+func AdvisoryLockingAdvisoryLockResultWithResponse(response AdvisoryLockingAdvisoryLockResponse) AdvisoryLockingAdvisoryLockResult {
+ var _u AdvisoryLockingAdvisoryLockResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *AdvisoryLockingAdvisoryLockResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_advisoryLockingAdvisoryLockResultTag = AdvisoryLockingAdvisoryLockResultErr
+ _m.Err = err
+}
+
+func AdvisoryLockingAdvisoryLockResultWithErr(err int32) AdvisoryLockingAdvisoryLockResult {
+ var _u AdvisoryLockingAdvisoryLockResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_nodeGetTokenResultTag uint64
+
+const (
+ NodeGetTokenResultResponse = 1 // 0x00000001
+ NodeGetTokenResultErr = 2 // 0x00000002
+)
+
+type NodeGetTokenResult struct {
+ I_nodeGetTokenResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response NodeGetTokenResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *NodeGetTokenResult) reset() {
+ switch _m.I_nodeGetTokenResultTag {
+ case 1:
+ var _zeroed NodeGetTokenResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *NodeGetTokenResult) Which() I_nodeGetTokenResultTag {
+ return _m.I_nodeGetTokenResultTag
+}
+
+func (_m *NodeGetTokenResult) Ordinal() uint64 {
+ return uint64(_m.I_nodeGetTokenResultTag)
+}
+
+func (_m *NodeGetTokenResult) SetResponse(response NodeGetTokenResponse) {
+ _m.reset()
+ _m.I_nodeGetTokenResultTag = NodeGetTokenResultResponse
+ _m.Response = response
+}
+
+func NodeGetTokenResultWithResponse(response NodeGetTokenResponse) NodeGetTokenResult {
+ var _u NodeGetTokenResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *NodeGetTokenResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_nodeGetTokenResultTag = NodeGetTokenResultErr
+ _m.Err = err
+}
+
+func NodeGetTokenResultWithErr(err int32) NodeGetTokenResult {
+ var _u NodeGetTokenResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_nodeGetAttributesResultTag uint64
+
+const (
+ NodeGetAttributesResultResponse = 1 // 0x00000001
+ NodeGetAttributesResultErr = 2 // 0x00000002
+)
+
+type NodeGetAttributesResult struct {
+ I_nodeGetAttributesResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response NodeGetAttributesResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *NodeGetAttributesResult) reset() {
+ switch _m.I_nodeGetAttributesResultTag {
+ case 1:
+ var _zeroed NodeGetAttributesResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *NodeGetAttributesResult) Which() I_nodeGetAttributesResultTag {
+ return _m.I_nodeGetAttributesResultTag
+}
+
+func (_m *NodeGetAttributesResult) Ordinal() uint64 {
+ return uint64(_m.I_nodeGetAttributesResultTag)
+}
+
+func (_m *NodeGetAttributesResult) SetResponse(response NodeGetAttributesResponse) {
+ _m.reset()
+ _m.I_nodeGetAttributesResultTag = NodeGetAttributesResultResponse
+ _m.Response = response
+}
+
+func NodeGetAttributesResultWithResponse(response NodeGetAttributesResponse) NodeGetAttributesResult {
+ var _u NodeGetAttributesResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *NodeGetAttributesResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_nodeGetAttributesResultTag = NodeGetAttributesResultErr
+ _m.Err = err
+}
+
+func NodeGetAttributesResultWithErr(err int32) NodeGetAttributesResult {
+ var _u NodeGetAttributesResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_nodeUpdateAttributesResultTag uint64
+
+const (
+ NodeUpdateAttributesResultResponse = 1 // 0x00000001
+ NodeUpdateAttributesResultErr = 2 // 0x00000002
+)
+
+type NodeUpdateAttributesResult struct {
+ I_nodeUpdateAttributesResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response NodeUpdateAttributesResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *NodeUpdateAttributesResult) reset() {
+ switch _m.I_nodeUpdateAttributesResultTag {
+ case 1:
+ var _zeroed NodeUpdateAttributesResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *NodeUpdateAttributesResult) Which() I_nodeUpdateAttributesResultTag {
+ return _m.I_nodeUpdateAttributesResultTag
+}
+
+func (_m *NodeUpdateAttributesResult) Ordinal() uint64 {
+ return uint64(_m.I_nodeUpdateAttributesResultTag)
+}
+
+func (_m *NodeUpdateAttributesResult) SetResponse(response NodeUpdateAttributesResponse) {
+ _m.reset()
+ _m.I_nodeUpdateAttributesResultTag = NodeUpdateAttributesResultResponse
+ _m.Response = response
+}
+
+func NodeUpdateAttributesResultWithResponse(response NodeUpdateAttributesResponse) NodeUpdateAttributesResult {
+ var _u NodeUpdateAttributesResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *NodeUpdateAttributesResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_nodeUpdateAttributesResultTag = NodeUpdateAttributesResultErr
+ _m.Err = err
+}
+
+func NodeUpdateAttributesResultWithErr(err int32) NodeUpdateAttributesResult {
+ var _u NodeUpdateAttributesResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_nodeSyncResultTag uint64
+
+const (
+ NodeSyncResultResponse = 1 // 0x00000001
+ NodeSyncResultErr = 2 // 0x00000002
+)
+
+type NodeSyncResult struct {
+ I_nodeSyncResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response NodeSyncResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *NodeSyncResult) reset() {
+ switch _m.I_nodeSyncResultTag {
+ case 1:
+ var _zeroed NodeSyncResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *NodeSyncResult) Which() I_nodeSyncResultTag {
+ return _m.I_nodeSyncResultTag
+}
+
+func (_m *NodeSyncResult) Ordinal() uint64 {
+ return uint64(_m.I_nodeSyncResultTag)
+}
+
+func (_m *NodeSyncResult) SetResponse(response NodeSyncResponse) {
+ _m.reset()
+ _m.I_nodeSyncResultTag = NodeSyncResultResponse
+ _m.Response = response
+}
+
+func NodeSyncResultWithResponse(response NodeSyncResponse) NodeSyncResult {
+ var _u NodeSyncResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *NodeSyncResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_nodeSyncResultTag = NodeSyncResultErr
+ _m.Err = err
+}
+
+func NodeSyncResultWithErr(err int32) NodeSyncResult {
+ var _u NodeSyncResult
+ _u.SetErr(err)
+ return _u
+}
+
+// Returns run-time information about a node that is specific to the
+// current connection.
+type ConnectionInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // The active variant corresponds to one of the supported protocols
+ // of the node, and represents the result of the connection-time
+ // negotiation. Provides auxiliary handles if applicable.
+ Representation Representation `fidl_ordinal:"1"`
+ RepresentationPresent bool
+ // Information about the rights possessed by the current connection.
+ // Note: `rights` limits the set of operations allowed on the connection,
+ // but does not guarantee their availability. For example, one may have
+ // the [`Rights.EXECUTE`] right on a file connection, but the file itself
+ // does not have the `EXECUTE` ability, and hence cannot be executed.
+ // See [`ConnectionOptions.rights`].
+ Rights Operations `fidl_ordinal:"2"`
+ RightsPresent bool
+ // The set of available operations on this channel. It is always the
+ // intersection between the rights possessed by this connection, and the
+ // abilities of the node. The value may be zero in the case of an empty
+ // intersection.
+ // See [`ConnectionOptions.rights`].
+ AvailableOperations Operations `fidl_ordinal:"3"`
+ AvailableOperationsPresent bool
+}
+
+func (u *ConnectionInfo) SetRepresentation(representation Representation) {
+ u.Representation = representation
+ u.RepresentationPresent = true
+}
+
+func (u *ConnectionInfo) GetRepresentation() Representation {
+ return u.Representation
+}
+
+func (u *ConnectionInfo) GetRepresentationWithDefault(_default Representation) Representation {
+ if !u.HasRepresentation() {
+ return _default
+ }
+ return u.Representation
+}
+
+func (u *ConnectionInfo) HasRepresentation() bool {
+ return u.RepresentationPresent
+}
+
+func (u *ConnectionInfo) ClearRepresentation() {
+ u.RepresentationPresent = false
+}
+
+func (u *ConnectionInfo) SetRights(rights Operations) {
+ u.Rights = rights
+ u.RightsPresent = true
+}
+
+func (u *ConnectionInfo) GetRights() Operations {
+ return u.Rights
+}
+
+func (u *ConnectionInfo) GetRightsWithDefault(_default Operations) Operations {
+ if !u.HasRights() {
+ return _default
+ }
+ return u.Rights
+}
+
+func (u *ConnectionInfo) HasRights() bool {
+ return u.RightsPresent
+}
+
+func (u *ConnectionInfo) ClearRights() {
+ u.RightsPresent = false
+}
+
+func (u *ConnectionInfo) SetAvailableOperations(availableOperations Operations) {
+ u.AvailableOperations = availableOperations
+ u.AvailableOperationsPresent = true
+}
+
+func (u *ConnectionInfo) GetAvailableOperations() Operations {
+ return u.AvailableOperations
+}
+
+func (u *ConnectionInfo) GetAvailableOperationsWithDefault(_default Operations) Operations {
+ if !u.HasAvailableOperations() {
+ return _default
+ }
+ return u.AvailableOperations
+}
+
+func (u *ConnectionInfo) HasAvailableOperations() bool {
+ return u.AvailableOperationsPresent
+}
+
+func (u *ConnectionInfo) ClearAvailableOperations() {
+ u.AvailableOperationsPresent = false
+}
+
+func (u *ConnectionInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *ConnectionInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Options for [`Directory.Open`] and [`Node.Reopen`].
+type ConnectionOptions struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // Flags which can affect the behavior when opening and reopening.
+ // If absent, assumes a default of zero.
+ Flags ConnectionFlags `fidl_ordinal:"1"`
+ FlagsPresent bool
+ // Specifies the set of representations accepted by the client, to support
+ // a form of protocol negotiation on the node being opened.
+ // Refer to the definition of [`NodeProtocols`] for more details.
+ // It cannot be zero.
+ //
+ // In addition, clients may assert the type of the object by setting
+ // the protocol corresponding to the expected type:
+ //
+ // * If the caller expected a directory but the node cannot be accessed
+ // as a directory, the error is `ZX_ERR_NOT_DIR`.
+ // * If the caller expected a file but the node cannot be accessed as a
+ // file, the error is `ZX_ERR_NOT_FILE`.
+ // * In other mismatched cases, the error is `ZX_ERR_WRONG_TYPE`.
+ //
+ // During [`Directory.Open`], if a new object is to be created, `protocols`
+ // determines the type of object to create; it must be present.
+ // If a valid object type cannot be unambiguously inferred e.g.
+ // both `DIRECTORY` and `FILE` were set, the request must fail.
+ //
+ // During [`Node.Reopen`], clients may specify a different but compatible
+ // `protocols` to do a "protocol upgrade".
+ //
+ // If more than one protocol is present in `protocols`, the resultant
+ // protocol may become any one of them. Clients should specify
+ // [`ConnectionFlags.GET_CONNECTION_INFO`] to receive a
+ // [`Node.OnConnectionInfo`] event, in order to ascertain the protocol.
+ //
+ // If absent, indicates that the caller accepts any type of node, and
+ // the resulting protocol is unspecified.
+ Protocols NodeProtocols `fidl_ordinal:"2"`
+ ProtocolsPresent bool
+ // Requests rights on the new connection according to the specified rules.
+ // See [`fuchsia.io2/RightsRequest`].
+ //
+ // ## Rights Hierarchy
+ //
+ // Respecting principles of least privileges, rights in general must meet
+ // the following restrictions:
+ //
+ // * A connection must have nonzero rights.
+ // * From the perspective of a client, rights must never increase in a
+ // derived connection.
+ // * From the perspective of a directory proxy, it must ensure that
+ // new connections opened through it cannot have more rights than
+ // the connection where the proxy received the `Open`/`Reopen` call.
+ //
+ // The proper enforcement of the rights hierarchy is a powerful refinement
+ // over the existing access control facilities offered by directory
+ // sandboxing.
+ //
+ // ## Rights Inheritance
+ //
+ // If `rights_request` is absent, inherits at most the rights on the source
+ // connection:
+ //
+ // * During [`Node.Reopen`], the new connection would have the same rights
+ // as the connection where the `Reopen` call is made.
+ // * During [`Directory.Open`], the rights on the connection would inherit
+ // from the connection where the `Open` call is made. If the path crosses
+ // intermediate proxies, a proxy may strip elements from the resulting
+ // rights if the intermediate connection does not have the corresponding
+ // rights.
+ //
+ // ## Rights vs Abilities
+ //
+ // The rights on a connection limits the set of operations allowed on that
+ // connection, but does not guarantee their availability, because the
+ // object may not support it. For convenience, clients may query the
+ // [`ConnectionInfo.available_operations`] field on a new connection,
+ // which is the intersection of the rights and abilities and indicates the
+ // guaranteed set of available operations.
+ //
+ // See [`fuchsia.io2/Rights`] and [`fuchsia.io2/Abilities`].
+ //
+ // ## Implementation Notes
+ //
+ // When a directory proxy encounters an absent `rights` field, let `r` be
+ // the rights on the connection where it received this request, the proxy
+ // should fill in this field with the following:
+ //
+ // ```
+ // RightsRequest {
+ // at_most: r,
+ // at_least: 0,
+ // resolution: RightsResolution.MAXIMIZE,
+ // }
+ // ```
+ //
+ // before forwarding the request to the remote party.
+ RightsRequest RightsRequest `fidl_ordinal:"3"`
+ RightsRequestPresent bool
+}
+
+func (u *ConnectionOptions) SetFlags(flags ConnectionFlags) {
+ u.Flags = flags
+ u.FlagsPresent = true
+}
+
+func (u *ConnectionOptions) GetFlags() ConnectionFlags {
+ return u.Flags
+}
+
+func (u *ConnectionOptions) GetFlagsWithDefault(_default ConnectionFlags) ConnectionFlags {
+ if !u.HasFlags() {
+ return _default
+ }
+ return u.Flags
+}
+
+func (u *ConnectionOptions) HasFlags() bool {
+ return u.FlagsPresent
+}
+
+func (u *ConnectionOptions) ClearFlags() {
+ u.FlagsPresent = false
+}
+
+func (u *ConnectionOptions) SetProtocols(protocols NodeProtocols) {
+ u.Protocols = protocols
+ u.ProtocolsPresent = true
+}
+
+func (u *ConnectionOptions) GetProtocols() NodeProtocols {
+ return u.Protocols
+}
+
+func (u *ConnectionOptions) GetProtocolsWithDefault(_default NodeProtocols) NodeProtocols {
+ if !u.HasProtocols() {
+ return _default
+ }
+ return u.Protocols
+}
+
+func (u *ConnectionOptions) HasProtocols() bool {
+ return u.ProtocolsPresent
+}
+
+func (u *ConnectionOptions) ClearProtocols() {
+ u.ProtocolsPresent = false
+}
+
+func (u *ConnectionOptions) SetRightsRequest(rightsRequest RightsRequest) {
+ u.RightsRequest = rightsRequest
+ u.RightsRequestPresent = true
+}
+
+func (u *ConnectionOptions) GetRightsRequest() RightsRequest {
+ return u.RightsRequest
+}
+
+func (u *ConnectionOptions) GetRightsRequestWithDefault(_default RightsRequest) RightsRequest {
+ if !u.HasRightsRequest() {
+ return _default
+ }
+ return u.RightsRequest
+}
+
+func (u *ConnectionOptions) HasRightsRequest() bool {
+ return u.RightsRequestPresent
+}
+
+func (u *ConnectionOptions) ClearRightsRequest() {
+ u.RightsRequestPresent = false
+}
+
+func (u *ConnectionOptions) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *ConnectionOptions) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Auxiliary data for the connector representation of a node, used for
+// protocol discovery and connection.
+//
+// It supports connecting to arbitrary protocols exported by the filesystem
+// server at a path, including ones that do not compose [`fuchsia.io2/Node`].
+type ConnectorInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+}
+
+func (u *ConnectorInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *ConnectorInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// The debuglog representation of a node.
+// The selection of this variant in [`Representation`] implies that the
+// connection speaks the [`fuchsia.io2/Debuglog`] protocol.
+type DebuglogInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // The backing debuglog kernel object.
+ Debuglog _zx.Log `fidl_handle_subtype:"12" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"`
+ DebuglogPresent bool
+}
+
+func (u *DebuglogInfo) SetDebuglog(debuglog _zx.Log) {
+ u.Debuglog = debuglog
+ u.DebuglogPresent = true
+}
+
+func (u *DebuglogInfo) GetDebuglog() _zx.Log {
+ return u.Debuglog
+}
+
+func (u *DebuglogInfo) GetDebuglogWithDefault(_default _zx.Log) _zx.Log {
+ if !u.HasDebuglog() {
+ return _default
+ }
+ return u.Debuglog
+}
+
+func (u *DebuglogInfo) HasDebuglog() bool {
+ return u.DebuglogPresent
+}
+
+func (u *DebuglogInfo) ClearDebuglog() {
+ u.DebuglogPresent = false
+}
+
+func (u *DebuglogInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *DebuglogInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// The object may be cast to the shared interface of devices.
+type DeviceInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // An optional event which transmits information about a device's state.
+ //
+ // The [`DeviceSignal`] values may be observed on this event.
+ Event _zx.Handle `fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"`
+ EventPresent bool
+}
+
+func (u *DeviceInfo) SetEvent(event _zx.Handle) {
+ u.Event = event
+ u.EventPresent = true
+}
+
+func (u *DeviceInfo) GetEvent() _zx.Handle {
+ return u.Event
+}
+
+func (u *DeviceInfo) GetEventWithDefault(_default _zx.Handle) _zx.Handle {
+ if !u.HasEvent() {
+ return _default
+ }
+ return u.Event
+}
+
+func (u *DeviceInfo) HasEvent() bool {
+ return u.EventPresent
+}
+
+func (u *DeviceInfo) ClearEvent() {
+ u.EventPresent = false
+}
+
+func (u *DeviceInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *DeviceInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// The object may be cast to a Tty interface.
+type TtyInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // An optional event which transmits information about a device's state.
+ //
+ // The [`DeviceSignal`] values may be observed on this event.
+ Event _zx.Handle `fidl_handle_subtype:"16" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"`
+ EventPresent bool
+}
+
+func (u *TtyInfo) SetEvent(event _zx.Handle) {
+ u.Event = event
+ u.EventPresent = true
+}
+
+func (u *TtyInfo) GetEvent() _zx.Handle {
+ return u.Event
+}
+
+func (u *TtyInfo) GetEventWithDefault(_default _zx.Handle) _zx.Handle {
+ if !u.HasEvent() {
+ return _default
+ }
+ return u.Event
+}
+
+func (u *TtyInfo) HasEvent() bool {
+ return u.EventPresent
+}
+
+func (u *TtyInfo) ClearEvent() {
+ u.EventPresent = false
+}
+
+func (u *TtyInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *TtyInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Information about an immediate child node of a directory.
+//
+// If a particular attribute is not applicable or not supported,
+// implementations should leave the corresponding field absent.
+type DirectoryEntry struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // Name of the node. This field must be present.
+ Name string `fidl_bounds:"255" fidl_ordinal:"1"`
+ NamePresent bool
+ // Describes the kinds of representations supported by the node.
+ Protocols NodeProtocols `fidl_ordinal:"2"`
+ ProtocolsPresent bool
+ // Describes the kinds of operations supported by the node.
+ Abilities Operations `fidl_ordinal:"3"`
+ AbilitiesPresent bool
+ // An ID for the node. See [`fuchsia.io2/Id`].
+ // This `id` should be unique among all entries of a directory.
+ Id uint64 `fidl_ordinal:"4"`
+ IdPresent bool
+}
+
+func (u *DirectoryEntry) SetName(name string) {
+ u.Name = name
+ u.NamePresent = true
+}
+
+func (u *DirectoryEntry) GetName() string {
+ return u.Name
+}
+
+func (u *DirectoryEntry) GetNameWithDefault(_default string) string {
+ if !u.HasName() {
+ return _default
+ }
+ return u.Name
+}
+
+func (u *DirectoryEntry) HasName() bool {
+ return u.NamePresent
+}
+
+func (u *DirectoryEntry) ClearName() {
+ u.NamePresent = false
+}
+
+func (u *DirectoryEntry) SetProtocols(protocols NodeProtocols) {
+ u.Protocols = protocols
+ u.ProtocolsPresent = true
+}
+
+func (u *DirectoryEntry) GetProtocols() NodeProtocols {
+ return u.Protocols
+}
+
+func (u *DirectoryEntry) GetProtocolsWithDefault(_default NodeProtocols) NodeProtocols {
+ if !u.HasProtocols() {
+ return _default
+ }
+ return u.Protocols
+}
+
+func (u *DirectoryEntry) HasProtocols() bool {
+ return u.ProtocolsPresent
+}
+
+func (u *DirectoryEntry) ClearProtocols() {
+ u.ProtocolsPresent = false
+}
+
+func (u *DirectoryEntry) SetAbilities(abilities Operations) {
+ u.Abilities = abilities
+ u.AbilitiesPresent = true
+}
+
+func (u *DirectoryEntry) GetAbilities() Operations {
+ return u.Abilities
+}
+
+func (u *DirectoryEntry) GetAbilitiesWithDefault(_default Operations) Operations {
+ if !u.HasAbilities() {
+ return _default
+ }
+ return u.Abilities
+}
+
+func (u *DirectoryEntry) HasAbilities() bool {
+ return u.AbilitiesPresent
+}
+
+func (u *DirectoryEntry) ClearAbilities() {
+ u.AbilitiesPresent = false
+}
+
+func (u *DirectoryEntry) SetId(id uint64) {
+ u.Id = id
+ u.IdPresent = true
+}
+
+func (u *DirectoryEntry) GetId() uint64 {
+ return u.Id
+}
+
+func (u *DirectoryEntry) GetIdWithDefault(_default uint64) uint64 {
+ if !u.HasId() {
+ return _default
+ }
+ return u.Id
+}
+
+func (u *DirectoryEntry) HasId() bool {
+ return u.IdPresent
+}
+
+func (u *DirectoryEntry) ClearId() {
+ u.IdPresent = false
+}
+
+func (u *DirectoryEntry) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *DirectoryEntry) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Auxiliary data for the directory representation of a node.
+// The selection of this variant in [`Representation`] implies that the
+// connection speaks the [`fuchsia.io2/Directory`] protocol.
+type DirectoryInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+}
+
+func (u *DirectoryInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *DirectoryInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Options to pass to [`fuchsia.io2/Directory.Enumerate`].
+type DirectoryEnumerateOptions struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+}
+
+func (u *DirectoryEnumerateOptions) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *DirectoryEnumerateOptions) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+type DirectoryWatchOptions struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+}
+
+func (u *DirectoryWatchOptions) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *DirectoryWatchOptions) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Auxiliary data for the file representation of a node.
+// The selection of this variant in [`Representation`] implies that the
+// connection speaks the [`fuchsia.io2/File`] protocol.
+type FileInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // An optional event which transmits information about an object's
+ // readability or writability. This event relays information about the
+ // underlying object, not the capability granted to client: this event
+ // may be signalled "readable" on a connection that does not have
+ // the capability to read.
+ //
+ // This event will be present if the following conditions are met:
+ //
+ // - The `available_operations` on the file connection is not empty.
+ // - The filesystem supports signalling readability/writability events.
+ //
+ // The [`FileSignal`] values may be observed on this event.
+ Observer _zx.Event `fidl_handle_subtype:"5" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"`
+ ObserverPresent bool
+ // Returns if the file is opened in append mode.
+ // In append mode, the seek offset is moved to the end before every
+ // write, the two steps performed in an atomic manner.
+ IsAppend bool `fidl_ordinal:"2"`
+ IsAppendPresent bool
+ // An optional stream object, which can be used to read to and write from
+ // the file.
+ //
+ // Reading and writing the file using the stream object can be up to 20x
+ // faster than reading and writing the file using the Read and Write
+ // operations in the [`fuchsia.io2/File`] protocol.
+ Stream _zx.Handle `fidl_handle_subtype:"0" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"3"`
+ StreamPresent bool
+}
+
+func (u *FileInfo) SetObserver(observer _zx.Event) {
+ u.Observer = observer
+ u.ObserverPresent = true
+}
+
+func (u *FileInfo) GetObserver() _zx.Event {
+ return u.Observer
+}
+
+func (u *FileInfo) GetObserverWithDefault(_default _zx.Event) _zx.Event {
+ if !u.HasObserver() {
+ return _default
+ }
+ return u.Observer
+}
+
+func (u *FileInfo) HasObserver() bool {
+ return u.ObserverPresent
+}
+
+func (u *FileInfo) ClearObserver() {
+ u.ObserverPresent = false
+}
+
+func (u *FileInfo) SetIsAppend(isAppend bool) {
+ u.IsAppend = isAppend
+ u.IsAppendPresent = true
+}
+
+func (u *FileInfo) GetIsAppend() bool {
+ return u.IsAppend
+}
+
+func (u *FileInfo) GetIsAppendWithDefault(_default bool) bool {
+ if !u.HasIsAppend() {
+ return _default
+ }
+ return u.IsAppend
+}
+
+func (u *FileInfo) HasIsAppend() bool {
+ return u.IsAppendPresent
+}
+
+func (u *FileInfo) ClearIsAppend() {
+ u.IsAppendPresent = false
+}
+
+func (u *FileInfo) SetStream(stream _zx.Handle) {
+ u.Stream = stream
+ u.StreamPresent = true
+}
+
+func (u *FileInfo) GetStream() _zx.Handle {
+ return u.Stream
+}
+
+func (u *FileInfo) GetStreamWithDefault(_default _zx.Handle) _zx.Handle {
+ if !u.HasStream() {
+ return _default
+ }
+ return u.Stream
+}
+
+func (u *FileInfo) HasStream() bool {
+ return u.StreamPresent
+}
+
+func (u *FileInfo) ClearStream() {
+ u.StreamPresent = false
+}
+
+func (u *FileInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *FileInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+type AdvisoryLockRequest struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // The type of lock to be acquired.
+ //
+ // If this field is absent, the [`AdvisoryLock`] method will fail
+ // with ZX_ERR_INVALID_ARGS.
+ Type AdvisoryLockType `fidl_ordinal:"1"`
+ TypePresent bool
+ // The byte range within the file to be locked. See [`AdvisoryLockRange`]
+ // for semantics.
+ //
+ // If this field is absent, the range defaults to the entire file.
+ Range AdvisoryLockRange `fidl_ordinal:"2"`
+ RangePresent bool
+ // Whether the file should wait reply to the [`AdvisoryLock`]
+ // method until the requested lock can be acquired.
+ //
+ // If this field is absent, the file will not wait.
+ Wait bool `fidl_ordinal:"3"`
+ WaitPresent bool
+}
+
+func (u *AdvisoryLockRequest) SetType(type_ AdvisoryLockType) {
+ u.Type = type_
+ u.TypePresent = true
+}
+
+func (u *AdvisoryLockRequest) GetType() AdvisoryLockType {
+ return u.Type
+}
+
+func (u *AdvisoryLockRequest) GetTypeWithDefault(_default AdvisoryLockType) AdvisoryLockType {
+ if !u.HasType() {
+ return _default
+ }
+ return u.Type
+}
+
+func (u *AdvisoryLockRequest) HasType() bool {
+ return u.TypePresent
+}
+
+func (u *AdvisoryLockRequest) ClearType() {
+ u.TypePresent = false
+}
+
+func (u *AdvisoryLockRequest) SetRange(range_ AdvisoryLockRange) {
+ u.Range = range_
+ u.RangePresent = true
+}
+
+func (u *AdvisoryLockRequest) GetRange() AdvisoryLockRange {
+ return u.Range
+}
+
+func (u *AdvisoryLockRequest) GetRangeWithDefault(_default AdvisoryLockRange) AdvisoryLockRange {
+ if !u.HasRange() {
+ return _default
+ }
+ return u.Range
+}
+
+func (u *AdvisoryLockRequest) HasRange() bool {
+ return u.RangePresent
+}
+
+func (u *AdvisoryLockRequest) ClearRange() {
+ u.RangePresent = false
+}
+
+func (u *AdvisoryLockRequest) SetWait(wait bool) {
+ u.Wait = wait
+ u.WaitPresent = true
+}
+
+func (u *AdvisoryLockRequest) GetWait() bool {
+ return u.Wait
+}
+
+func (u *AdvisoryLockRequest) GetWaitWithDefault(_default bool) bool {
+ if !u.HasWait() {
+ return _default
+ }
+ return u.Wait
+}
+
+func (u *AdvisoryLockRequest) HasWait() bool {
+ return u.WaitPresent
+}
+
+func (u *AdvisoryLockRequest) ClearWait() {
+ u.WaitPresent = false
+}
+
+func (u *AdvisoryLockRequest) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *AdvisoryLockRequest) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Auxiliary data for the memory object representation of a node.
+// The node is a file which is represented as a VMO.
+// The selection of this variant in [`Representation`] implies that the
+// connection speaks the [`fuchsia.io2/Memory`] protocol.
+type MemoryInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // Although a VMO is returned as a part of this structure, that VMO may
+ // back multiple files. To identify the logical portion of the VMO that
+ // represents the single file, offset and size are also supplied.
+ //
+ // If the range covers the entire VMO (i.e. the offset is zero and the
+ // length matches the size of the VMO), then all clients must receive a
+ // VMO with the same koid. This can be a duplicate of the same underlying
+ // page-aligned VMO.
+ //
+ // The rights on this VMO should correspond to the rights on the
+ // node connection.
+ Buffer fuchsiamem.Range `fidl_ordinal:"1"`
+ BufferPresent bool
+}
+
+func (u *MemoryInfo) SetBuffer(buffer fuchsiamem.Range) {
+ u.Buffer = buffer
+ u.BufferPresent = true
+}
+
+func (u *MemoryInfo) GetBuffer() fuchsiamem.Range {
+ return u.Buffer
+}
+
+func (u *MemoryInfo) GetBufferWithDefault(_default fuchsiamem.Range) fuchsiamem.Range {
+ if !u.HasBuffer() {
+ return _default
+ }
+ return u.Buffer
+}
+
+func (u *MemoryInfo) HasBuffer() bool {
+ return u.BufferPresent
+}
+
+func (u *MemoryInfo) ClearBuffer() {
+ u.BufferPresent = false
+}
+
+func (u *MemoryInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *MemoryInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Objective information about a filesystem node.
+// See [`Node.GetAttributes`] and [`Node.UpdateAttributes`].
+//
+// The attributes of a node should be stable, independent of the
+// specific protocol used to access it.
+//
+// If a particular attribute is not applicable or not supported,
+// filesystems should leave the corresponding field absent.
+type NodeAttributes struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // Describes the kinds of representations supported by the node.
+ // Note: This is not the result of the connection-time negotiation,
+ // which is conveyed via `representation`.
+ //
+ // This attribute is read-only.
+ Protocols NodeProtocols `fidl_ordinal:"1"`
+ ProtocolsPresent bool
+ // Describes the kinds of operations supported by the node.
+ // Note: This is distinct from the rights used at connection time.
+ //
+ // This attribute is read-only.
+ Abilities Operations `fidl_ordinal:"2"`
+ AbilitiesPresent bool
+ // Node size, in bytes.
+ //
+ // This attribute is read-only.
+ ContentSize uint64 `fidl_ordinal:"3"`
+ ContentSizePresent bool
+ // Space needed to store the node (possibly larger than size), in bytes.
+ //
+ // This attribute is read-only.
+ StorageSize uint64 `fidl_ordinal:"4"`
+ StorageSizePresent bool
+ // Number of hard links to the node. It must be at least one.
+ //
+ // This attribute is read-only.
+ LinkCount uint64 `fidl_ordinal:"5"`
+ LinkCountPresent bool
+ // Time of creation in nanoseconds since the Unix epoch, UTC.
+ // It may be updated manually after creation.
+ CreationTime uint64 `fidl_ordinal:"6"`
+ CreationTimePresent bool
+ // Time of last modification in nanoseconds since the Unix epoch, UTC.
+ ModificationTime uint64 `fidl_ordinal:"7"`
+ ModificationTimePresent bool
+ // An ID for the node. See [`fuchsia.io2/Id`].
+ // This `id` should be unique among all entries of a directory.
+ //
+ // This attribute is read-only.
+ Id uint64 `fidl_ordinal:"8"`
+ IdPresent bool
+}
+
+func (u *NodeAttributes) SetProtocols(protocols NodeProtocols) {
+ u.Protocols = protocols
+ u.ProtocolsPresent = true
+}
+
+func (u *NodeAttributes) GetProtocols() NodeProtocols {
+ return u.Protocols
+}
+
+func (u *NodeAttributes) GetProtocolsWithDefault(_default NodeProtocols) NodeProtocols {
+ if !u.HasProtocols() {
+ return _default
+ }
+ return u.Protocols
+}
+
+func (u *NodeAttributes) HasProtocols() bool {
+ return u.ProtocolsPresent
+}
+
+func (u *NodeAttributes) ClearProtocols() {
+ u.ProtocolsPresent = false
+}
+
+func (u *NodeAttributes) SetAbilities(abilities Operations) {
+ u.Abilities = abilities
+ u.AbilitiesPresent = true
+}
+
+func (u *NodeAttributes) GetAbilities() Operations {
+ return u.Abilities
+}
+
+func (u *NodeAttributes) GetAbilitiesWithDefault(_default Operations) Operations {
+ if !u.HasAbilities() {
+ return _default
+ }
+ return u.Abilities
+}
+
+func (u *NodeAttributes) HasAbilities() bool {
+ return u.AbilitiesPresent
+}
+
+func (u *NodeAttributes) ClearAbilities() {
+ u.AbilitiesPresent = false
+}
+
+func (u *NodeAttributes) SetContentSize(contentSize uint64) {
+ u.ContentSize = contentSize
+ u.ContentSizePresent = true
+}
+
+func (u *NodeAttributes) GetContentSize() uint64 {
+ return u.ContentSize
+}
+
+func (u *NodeAttributes) GetContentSizeWithDefault(_default uint64) uint64 {
+ if !u.HasContentSize() {
+ return _default
+ }
+ return u.ContentSize
+}
+
+func (u *NodeAttributes) HasContentSize() bool {
+ return u.ContentSizePresent
+}
+
+func (u *NodeAttributes) ClearContentSize() {
+ u.ContentSizePresent = false
+}
+
+func (u *NodeAttributes) SetStorageSize(storageSize uint64) {
+ u.StorageSize = storageSize
+ u.StorageSizePresent = true
+}
+
+func (u *NodeAttributes) GetStorageSize() uint64 {
+ return u.StorageSize
+}
+
+func (u *NodeAttributes) GetStorageSizeWithDefault(_default uint64) uint64 {
+ if !u.HasStorageSize() {
+ return _default
+ }
+ return u.StorageSize
+}
+
+func (u *NodeAttributes) HasStorageSize() bool {
+ return u.StorageSizePresent
+}
+
+func (u *NodeAttributes) ClearStorageSize() {
+ u.StorageSizePresent = false
+}
+
+func (u *NodeAttributes) SetLinkCount(linkCount uint64) {
+ u.LinkCount = linkCount
+ u.LinkCountPresent = true
+}
+
+func (u *NodeAttributes) GetLinkCount() uint64 {
+ return u.LinkCount
+}
+
+func (u *NodeAttributes) GetLinkCountWithDefault(_default uint64) uint64 {
+ if !u.HasLinkCount() {
+ return _default
+ }
+ return u.LinkCount
+}
+
+func (u *NodeAttributes) HasLinkCount() bool {
+ return u.LinkCountPresent
+}
+
+func (u *NodeAttributes) ClearLinkCount() {
+ u.LinkCountPresent = false
+}
+
+func (u *NodeAttributes) SetCreationTime(creationTime uint64) {
+ u.CreationTime = creationTime
+ u.CreationTimePresent = true
+}
+
+func (u *NodeAttributes) GetCreationTime() uint64 {
+ return u.CreationTime
+}
+
+func (u *NodeAttributes) GetCreationTimeWithDefault(_default uint64) uint64 {
+ if !u.HasCreationTime() {
+ return _default
+ }
+ return u.CreationTime
+}
+
+func (u *NodeAttributes) HasCreationTime() bool {
+ return u.CreationTimePresent
+}
+
+func (u *NodeAttributes) ClearCreationTime() {
+ u.CreationTimePresent = false
+}
+
+func (u *NodeAttributes) SetModificationTime(modificationTime uint64) {
+ u.ModificationTime = modificationTime
+ u.ModificationTimePresent = true
+}
+
+func (u *NodeAttributes) GetModificationTime() uint64 {
+ return u.ModificationTime
+}
+
+func (u *NodeAttributes) GetModificationTimeWithDefault(_default uint64) uint64 {
+ if !u.HasModificationTime() {
+ return _default
+ }
+ return u.ModificationTime
+}
+
+func (u *NodeAttributes) HasModificationTime() bool {
+ return u.ModificationTimePresent
+}
+
+func (u *NodeAttributes) ClearModificationTime() {
+ u.ModificationTimePresent = false
+}
+
+func (u *NodeAttributes) SetId(id uint64) {
+ u.Id = id
+ u.IdPresent = true
+}
+
+func (u *NodeAttributes) GetId() uint64 {
+ return u.Id
+}
+
+func (u *NodeAttributes) GetIdWithDefault(_default uint64) uint64 {
+ if !u.HasId() {
+ return _default
+ }
+ return u.Id
+}
+
+func (u *NodeAttributes) HasId() bool {
+ return u.IdPresent
+}
+
+func (u *NodeAttributes) ClearId() {
+ u.IdPresent = false
+}
+
+func (u *NodeAttributes) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *NodeAttributes) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// The pipe representation of a node.
+// A pipe is a data streaming interface, commonly used for standard in/out.
+// There is no universal requirement as to if it is uni- or bi-directional.
+// The selection of this variant in [`Representation`] implies that the
+// connection speaks the [`fuchsia.io2/Pipe`] protocol.
+type PipeInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // The backing socket transport for the pipe.
+ // The rights on this socket should correspond to the rights on the
+ // node connection.
+ Socket _zx.Socket `fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"`
+ SocketPresent bool
+}
+
+func (u *PipeInfo) SetSocket(socket _zx.Socket) {
+ u.Socket = socket
+ u.SocketPresent = true
+}
+
+func (u *PipeInfo) GetSocket() _zx.Socket {
+ return u.Socket
+}
+
+func (u *PipeInfo) GetSocketWithDefault(_default _zx.Socket) _zx.Socket {
+ if !u.HasSocket() {
+ return _default
+ }
+ return u.Socket
+}
+
+func (u *PipeInfo) HasSocket() bool {
+ return u.SocketPresent
+}
+
+func (u *PipeInfo) ClearSocket() {
+ u.SocketPresent = false
+}
+
+func (u *PipeInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *PipeInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Auxiliary data for the POSIX socket representation of a node.
+// The selection of this variant in [`Representation`] implies that the
+// connection speaks the [`fuchsia.posix.socket/Control`] protocol.
+type PosixSocketInfo struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // The backing transport for the socket.
+ // The rights on this socket should correspond to the rights on the
+ // node connection.
+ Socket _zx.Socket `fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0" fidl_ordinal:"1"`
+ SocketPresent bool
+}
+
+func (u *PosixSocketInfo) SetSocket(socket _zx.Socket) {
+ u.Socket = socket
+ u.SocketPresent = true
+}
+
+func (u *PosixSocketInfo) GetSocket() _zx.Socket {
+ return u.Socket
+}
+
+func (u *PosixSocketInfo) GetSocketWithDefault(_default _zx.Socket) _zx.Socket {
+ if !u.HasSocket() {
+ return _default
+ }
+ return u.Socket
+}
+
+func (u *PosixSocketInfo) HasSocket() bool {
+ return u.SocketPresent
+}
+
+func (u *PosixSocketInfo) ClearSocket() {
+ u.SocketPresent = false
+}
+
+func (u *PosixSocketInfo) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *PosixSocketInfo) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+const (
+ DebuglogReopenOrdinal uint64 = 0x74170eb73121c69f
+ DebuglogCloseOrdinal uint64 = 0x2dec2818386e5d68
+ DebuglogDescribeOrdinal uint64 = 0x4aac591060c65c2f
+ DebuglogOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437
+ DebuglogGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4
+ DebuglogGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4
+ DebuglogUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5
+ DebuglogSyncOrdinal uint64 = 0xac3a8c1a2e063ad
+)
+
+type DebuglogWithCtxInterface _bindings.ChannelProxy
+
+// Creates another connection to the same node.
+//
+// + `options` options applicable to both `Open` and `Reopen`,
+// including negotiating protocol and restricting rights.
+// See [`fuchsia.io2/ConnectionOptions`].
+// + `object_request` is the server end of a channel created for the new
+// connection. The caller may proceed to send messages on the
+// corresponding client end right away.
+//
+// For files, the cloned connection and the original connection have
+// independent seek offsets.
+func (p *DebuglogWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error {
+ req_ := &debuglogWithCtxReopenRequest{
+ Options: options,
+ ObjectRequest: objectRequest,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DebuglogReopenOrdinal, req_)
+ return err_
+}
+
+// Terminates the connection to the node.
+//
+// After calling `Close`, the client must not send any other requests.
+// The result of `Close` arrives as an epitaph, where the channel is closed
+// by the server upon processing this operation.
+//
+// Closing the client end of the channel should be semantically equivalent
+// to calling `Close` without monitoring the status epitaph.
+//
+// This method does not require any rights.
+func (p *DebuglogWithCtxInterface) Close(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DebuglogCloseOrdinal, req_)
+ return err_
+}
+
+// Returns extra connection information and auxiliary handles.
+//
+// + `query` specifies the fields in `ConnectionInfo` that the caller is
+// interested in.
+// - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+//
+// When all known bits in `query` are set, the return value matches
+// the one from [`OnConnectionInfo`], as if the caller requested that event
+// using [`ConnectionFlags.GET_CONNECTION_INFO`].
+//
+// If the `Describe` operation fails, the connection is closed with the
+// associated error.
+//
+// This method does not require any rights.
+func (p *DebuglogWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) {
+ req_ := &debuglogWithCtxDescribeRequest{
+ Query: query,
+ }
+ resp_ := &debuglogWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by the server if requested by
+// [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+// first message from the server, and is sent exactly once.
+//
+// - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+// All members should be present.
+//
+// Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+// always manifested as an epitaph.
+func (p *DebuglogWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) {
+ resp_ := &debuglogWithCtxOnConnectionInfoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(DebuglogOnConnectionInfoOrdinal, resp_)
+ return resp_.Info, err_
+}
+
+// Acquires a token which can be used to identify this connection at
+// a later point in time.
+//
+// This method does not require any rights. Note that the token identifies
+// the connection, hence carries the rights information on this connection.
+func (p *DebuglogWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) {
+ var req_ _bindings.Message
+ resp_ := &debuglogWithCtxGetTokenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogGetTokenOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Acquires information about the node.
+//
+// The attributes of a node should be stable, independent of the
+// specific protocol used to access it.
+//
+// + `query` a bit-mask specifying which attributes to fetch. The server
+// should not return more than necessary.
+// - `attributes` the returned attributes.
+//
+// This method requires the [`Rights.GET_ATTRIBUTES`] right.
+func (p *DebuglogWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) {
+ req_ := &debuglogWithCtxGetAttributesRequest{
+ Query: query,
+ }
+ resp_ := &debuglogWithCtxGetAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogGetAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Updates information about the node.
+//
+// + `attributes` the presence of a table field in `attributes` indicates
+// the intent to update the corresponding attribute.
+//
+// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+func (p *DebuglogWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) {
+ req_ := &debuglogWithCtxUpdateAttributesRequest{
+ Attributes: attributes,
+ }
+ resp_ := &debuglogWithCtxUpdateAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogUpdateAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method will return when the filesystem server has flushed the
+// relevant updates to the underlying media, but does not guarantee the
+// underlying media has persisted the information, nor that any information
+// is committed to hardware. Clients may use `Sync` to ensure ordering
+// between operations.
+//
+// This method does not require any rights.
+func (p *DebuglogWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) {
+ var req_ _bindings.Message
+ resp_ := &debuglogWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DebuglogSyncOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// A node for interacting with the kernel debug log.
+// It may be manipulated via the debuglog object returned from
+// the `DebuglogInfo` member in [`fuchsia.io2/Representation`].
+type DebuglogWithCtx interface {
+ // Creates another connection to the same node.
+ //
+ // + `options` options applicable to both `Open` and `Reopen`,
+ // including negotiating protocol and restricting rights.
+ // See [`fuchsia.io2/ConnectionOptions`].
+ // + `object_request` is the server end of a channel created for the new
+ // connection. The caller may proceed to send messages on the
+ // corresponding client end right away.
+ //
+ // For files, the cloned connection and the original connection have
+ // independent seek offsets.
+ Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error
+ // Terminates the connection to the node.
+ //
+ // After calling `Close`, the client must not send any other requests.
+ // The result of `Close` arrives as an epitaph, where the channel is closed
+ // by the server upon processing this operation.
+ //
+ // Closing the client end of the channel should be semantically equivalent
+ // to calling `Close` without monitoring the status epitaph.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) error
+ // Returns extra connection information and auxiliary handles.
+ //
+ // + `query` specifies the fields in `ConnectionInfo` that the caller is
+ // interested in.
+ // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ //
+ // When all known bits in `query` are set, the return value matches
+ // the one from [`OnConnectionInfo`], as if the caller requested that event
+ // using [`ConnectionFlags.GET_CONNECTION_INFO`].
+ //
+ // If the `Describe` operation fails, the connection is closed with the
+ // associated error.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error)
+ // An event produced eagerly by the server if requested by
+ // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+ // first message from the server, and is sent exactly once.
+ //
+ // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ // All members should be present.
+ //
+ // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+ // always manifested as an epitaph.
+ // Acquires a token which can be used to identify this connection at
+ // a later point in time.
+ //
+ // This method does not require any rights. Note that the token identifies
+ // the connection, hence carries the rights information on this connection.
+ GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error)
+ // Acquires information about the node.
+ //
+ // The attributes of a node should be stable, independent of the
+ // specific protocol used to access it.
+ //
+ // + `query` a bit-mask specifying which attributes to fetch. The server
+ // should not return more than necessary.
+ // - `attributes` the returned attributes.
+ //
+ // This method requires the [`Rights.GET_ATTRIBUTES`] right.
+ GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error)
+ // Updates information about the node.
+ //
+ // + `attributes` the presence of a table field in `attributes` indicates
+ // the intent to update the corresponding attribute.
+ //
+ // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+ UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error)
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method will return when the filesystem server has flushed the
+ // relevant updates to the underlying media, but does not guarantee the
+ // underlying media has persisted the information, nor that any information
+ // is committed to hardware. Clients may use `Sync` to ensure ordering
+ // between operations.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (NodeSyncResult, error)
+}
+
+type DebuglogWithCtxTransitionalBase struct{}
+
+type DebuglogWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDebuglogWithCtxInterfaceRequest() (DebuglogWithCtxInterfaceRequest, *DebuglogWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DebuglogWithCtxInterfaceRequest(req), (*DebuglogWithCtxInterface)(cli), err
+}
+
+type DebuglogWithCtxStub struct {
+ Impl DebuglogWithCtx
+}
+
+func (s_ *DebuglogWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DebuglogReopenOrdinal:
+ in_ := debuglogWithCtxReopenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest)
+ return nil, false, err_
+ case DebuglogCloseOrdinal:
+ err_ := s_.Impl.Close(args_.Ctx)
+ return nil, false, err_
+ case DebuglogDescribeOrdinal:
+ in_ := debuglogWithCtxDescribeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query)
+ out_ := debuglogWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case DebuglogGetTokenOrdinal:
+ result, err_ := s_.Impl.GetToken(args_.Ctx)
+ out_ := debuglogWithCtxGetTokenResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DebuglogGetAttributesOrdinal:
+ in_ := debuglogWithCtxGetAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query)
+ out_ := debuglogWithCtxGetAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DebuglogUpdateAttributesOrdinal:
+ in_ := debuglogWithCtxUpdateAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes)
+ out_ := debuglogWithCtxUpdateAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DebuglogSyncOrdinal:
+ result, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := debuglogWithCtxSyncResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DebuglogEventProxy _bindings.ChannelProxy
+
+func (p *DebuglogEventProxy) OnConnectionInfo(info ConnectionInfo) error {
+ event_ := &debuglogWithCtxOnConnectionInfoResponse{
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(DebuglogOnConnectionInfoOrdinal, event_)
+}
+
+const (
+ DirectoryReopenOrdinal uint64 = 0x74170eb73121c69f
+ DirectoryCloseOrdinal uint64 = 0x2dec2818386e5d68
+ DirectoryDescribeOrdinal uint64 = 0x4aac591060c65c2f
+ DirectoryOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437
+ DirectoryGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4
+ DirectoryGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4
+ DirectoryUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5
+ DirectorySyncOrdinal uint64 = 0xac3a8c1a2e063ad
+ DirectoryOpenOrdinal uint64 = 0x38473cc20ba23253
+ DirectoryUnlinkOrdinal uint64 = 0x6c6dd97d65572cdb
+ DirectoryEnumerateOrdinal uint64 = 0xbe14c8b05a90a63
+ DirectoryRenameOrdinal uint64 = 0x1fe02df8f70742b7
+ DirectoryLinkOrdinal uint64 = 0x42634f09df52fdcc
+ DirectoryWatchOrdinal uint64 = 0x7f88ab8c3f500618
+)
+
+type DirectoryWithCtxInterface _bindings.ChannelProxy
+
+// Creates another connection to the same node.
+//
+// + `options` options applicable to both `Open` and `Reopen`,
+// including negotiating protocol and restricting rights.
+// See [`fuchsia.io2/ConnectionOptions`].
+// + `object_request` is the server end of a channel created for the new
+// connection. The caller may proceed to send messages on the
+// corresponding client end right away.
+//
+// For files, the cloned connection and the original connection have
+// independent seek offsets.
+func (p *DirectoryWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error {
+ req_ := &directoryWithCtxReopenRequest{
+ Options: options,
+ ObjectRequest: objectRequest,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryReopenOrdinal, req_)
+ return err_
+}
+
+// Terminates the connection to the node.
+//
+// After calling `Close`, the client must not send any other requests.
+// The result of `Close` arrives as an epitaph, where the channel is closed
+// by the server upon processing this operation.
+//
+// Closing the client end of the channel should be semantically equivalent
+// to calling `Close` without monitoring the status epitaph.
+//
+// This method does not require any rights.
+func (p *DirectoryWithCtxInterface) Close(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryCloseOrdinal, req_)
+ return err_
+}
+
+// Returns extra connection information and auxiliary handles.
+//
+// + `query` specifies the fields in `ConnectionInfo` that the caller is
+// interested in.
+// - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+//
+// When all known bits in `query` are set, the return value matches
+// the one from [`OnConnectionInfo`], as if the caller requested that event
+// using [`ConnectionFlags.GET_CONNECTION_INFO`].
+//
+// If the `Describe` operation fails, the connection is closed with the
+// associated error.
+//
+// This method does not require any rights.
+func (p *DirectoryWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) {
+ req_ := &directoryWithCtxDescribeRequest{
+ Query: query,
+ }
+ resp_ := &directoryWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by the server if requested by
+// [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+// first message from the server, and is sent exactly once.
+//
+// - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+// All members should be present.
+//
+// Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+// always manifested as an epitaph.
+func (p *DirectoryWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) {
+ resp_ := &directoryWithCtxOnConnectionInfoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(DirectoryOnConnectionInfoOrdinal, resp_)
+ return resp_.Info, err_
+}
+
+// Acquires a token which can be used to identify this connection at
+// a later point in time.
+//
+// This method does not require any rights. Note that the token identifies
+// the connection, hence carries the rights information on this connection.
+func (p *DirectoryWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWithCtxGetTokenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetTokenOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Acquires information about the node.
+//
+// The attributes of a node should be stable, independent of the
+// specific protocol used to access it.
+//
+// + `query` a bit-mask specifying which attributes to fetch. The server
+// should not return more than necessary.
+// - `attributes` the returned attributes.
+//
+// This method requires the [`Rights.GET_ATTRIBUTES`] right.
+func (p *DirectoryWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) {
+ req_ := &directoryWithCtxGetAttributesRequest{
+ Query: query,
+ }
+ resp_ := &directoryWithCtxGetAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryGetAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Updates information about the node.
+//
+// + `attributes` the presence of a table field in `attributes` indicates
+// the intent to update the corresponding attribute.
+//
+// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+func (p *DirectoryWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) {
+ req_ := &directoryWithCtxUpdateAttributesRequest{
+ Attributes: attributes,
+ }
+ resp_ := &directoryWithCtxUpdateAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryUpdateAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method will return when the filesystem server has flushed the
+// relevant updates to the underlying media, but does not guarantee the
+// underlying media has persisted the information, nor that any information
+// is committed to hardware. Clients may use `Sync` to ensure ordering
+// between operations.
+//
+// This method does not require any rights.
+func (p *DirectoryWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectorySyncOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Opens or creates a new node relative to this directory node.
+//
+// + `path` identifies the node to open.
+// If `path` contains multiple segments, then the directory is traversed,
+// one segment at a time, relative to the directory represented by this
+// connection.
+// See [`fuchsia.io2/Path`] for what constitutes a valid path.
+// To open another connection to the current directory, use
+// [`fuchsia.io2/Node.Reopen`] instead.
+// + `mode` controls whether to open existing/create new etc.
+// + `options` additional options applicable to both `Open` and `Reopen`,
+// including negotiating protocol and restricting rights.
+// See [`fuchsia.io2/ConnectionOptions`].
+// + `object_request` is the server end of a channel created for the new
+// connection. The caller may proceed to send messages on the
+// corresponding client end right away.
+//
+// This method requires the following rights on the current connection:
+//
+// * [`Rights.ENUMERATE`]
+// * [`Rights.TRAVERSE`]
+//
+// Errors are presented as an epitaph on the `object_request` channel.
+//
+// * error `ZX_ERR_ACCESS_DENIED` if the requested rights exceeds
+// what is allowed.
+// * error `ZX_ERR_BAD_PATH` if `path` is invalid.
+func (p *DirectoryWithCtxInterface) Open(ctx_ _bindings.Context, path string, mode OpenMode, options ConnectionOptions, objectRequest _zx.Channel) error {
+ req_ := &directoryWithCtxOpenRequest{
+ Path: path,
+ Mode: mode,
+ Options: options,
+ ObjectRequest: objectRequest,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryOpenOrdinal, req_)
+ return err_
+}
+
+// Removes a child node from the this directory's list of entries.
+//
+// Note: this does not guarantee that the underlying object is destroyed.
+// Although the link will be removed from the containing directory,
+// objects with multiple references (such as files which are still open)
+// will not actually be destroyed until all references are closed.
+//
+// + `path` identifies the node to be detached.
+// If `path` contains multiple segments, then the directory is traversed,
+// one segment at a time, relative to the directory represented by this
+// connection.
+//
+// * error `ZX_ERR_ACCESS_DENIED` if the connection does not have
+// [`Rights.WRITE_BYTES`].
+// * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not
+// support writing.
+// * error `ZX_ERR_BAD_PATH` if `path` is invalid.
+// * error `ZX_ERR_NOT_EMPTY` if `path` refers to a non-empty directory.
+// * error `ZX_ERR_UNAVAILABLE` if `path` refers to a mount point,
+// containing a remote channel.
+//
+// Other errors may be returned for filesystem-specific reasons.
+//
+// This method requires the following rights:
+//
+// * [`Rights.ENUMERATE`]
+// * [`Rights.MODIFY_DIRECTORY`]
+func (p *DirectoryWithCtxInterface) Unlink(ctx_ _bindings.Context, path string) (DirectoryUnlinkResult, error) {
+ req_ := &directoryWithCtxUnlinkRequest{
+ Path: path,
+ }
+ resp_ := &directoryWithCtxUnlinkResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryUnlinkOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Initiates a directory listing operation over the input channel,
+// starting at seek offset 0.
+//
+// This method requires the [`Rights.ENUMERATE`] right. If this right is
+// absent, `iterator` will be closed with a `ZX_ERR_ACCESS_DENIED` epitaph.
+func (p *DirectoryWithCtxInterface) Enumerate(ctx_ _bindings.Context, options DirectoryEnumerateOptions, iterator DirectoryIteratorWithCtxInterfaceRequest) error {
+ req_ := &directoryWithCtxEnumerateRequest{
+ Options: options,
+ Iterator: iterator,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryEnumerateOrdinal, req_)
+ return err_
+}
+
+// Renames a node named `src` to the name `dst`, in a directory represented
+// by `dst_parent_token`.
+//
+// `src` and `dst` must be valid node names.
+// See [`fuchsia.io2/Name`] for what constitutes a valid name.
+//
+// This method requires the following rights on both the current
+// connection, and the connection identified by `dst_parent_token`:
+//
+// * [`Rights.ENUMERATE`]
+// * [`Rights.MODIFY_DIRECTORY`]
+//
+// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
+func (p *DirectoryWithCtxInterface) Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryRenameResult, error) {
+ req_ := &directoryWithCtxRenameRequest{
+ Src: src,
+ DstParentToken: dstParentToken,
+ Dst: dst,
+ }
+ resp_ := &directoryWithCtxRenameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryRenameOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Creates a link to a node named `src` by the name `dst`,
+// in a directory represented by `dst_parent_token`.
+//
+// Directories cannot be linked, to prevent reference cycles.
+//
+// `src` and `dst` must be valid node names.
+// See [`fuchsia.io2/Name`] for what constitutes a valid name.
+//
+// This method requires the following rights on both the current
+// connection, and the connection identified by `dst_parent_token`:
+//
+// * [`Rights.ENUMERATE`]
+// * [`Rights.MODIFY_DIRECTORY`]
+//
+// * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
+// * error `ZX_ERR_INVALID_ARGS` if `src` is a directory.
+func (p *DirectoryWithCtxInterface) Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryLinkResult, error) {
+ req_ := &directoryWithCtxLinkRequest{
+ Src: src,
+ DstParentToken: dstParentToken,
+ Dst: dst,
+ }
+ resp_ := &directoryWithCtxLinkResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryLinkOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Watches a directory, monitoring events for children being added or
+// removed on the server end of the `watcher` channel.
+//
+// Mask specifies a bit mask of events to observe.
+//
+// This method requires the [`Rights.ENUMERATE`] right. If this right is
+// absent, `watcher` will be closed with a `ZX_ERR_ACCESS_DENIED` epitaph.
+func (p *DirectoryWithCtxInterface) Watch(ctx_ _bindings.Context, mask DirectoryWatchMask, options DirectoryWatchOptions, watcher DirectoryWatcherWithCtxInterfaceRequest) error {
+ req_ := &directoryWithCtxWatchRequest{
+ Mask: mask,
+ Options: options,
+ Watcher: watcher,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DirectoryWatchOrdinal, req_)
+ return err_
+}
+
+// A [`fuchsia.io2/Node`] that is capable of containing other nodes.
+type DirectoryWithCtx interface {
+ // Creates another connection to the same node.
+ //
+ // + `options` options applicable to both `Open` and `Reopen`,
+ // including negotiating protocol and restricting rights.
+ // See [`fuchsia.io2/ConnectionOptions`].
+ // + `object_request` is the server end of a channel created for the new
+ // connection. The caller may proceed to send messages on the
+ // corresponding client end right away.
+ //
+ // For files, the cloned connection and the original connection have
+ // independent seek offsets.
+ Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error
+ // Terminates the connection to the node.
+ //
+ // After calling `Close`, the client must not send any other requests.
+ // The result of `Close` arrives as an epitaph, where the channel is closed
+ // by the server upon processing this operation.
+ //
+ // Closing the client end of the channel should be semantically equivalent
+ // to calling `Close` without monitoring the status epitaph.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) error
+ // Returns extra connection information and auxiliary handles.
+ //
+ // + `query` specifies the fields in `ConnectionInfo` that the caller is
+ // interested in.
+ // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ //
+ // When all known bits in `query` are set, the return value matches
+ // the one from [`OnConnectionInfo`], as if the caller requested that event
+ // using [`ConnectionFlags.GET_CONNECTION_INFO`].
+ //
+ // If the `Describe` operation fails, the connection is closed with the
+ // associated error.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error)
+ // An event produced eagerly by the server if requested by
+ // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+ // first message from the server, and is sent exactly once.
+ //
+ // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ // All members should be present.
+ //
+ // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+ // always manifested as an epitaph.
+ // Acquires a token which can be used to identify this connection at
+ // a later point in time.
+ //
+ // This method does not require any rights. Note that the token identifies
+ // the connection, hence carries the rights information on this connection.
+ GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error)
+ // Acquires information about the node.
+ //
+ // The attributes of a node should be stable, independent of the
+ // specific protocol used to access it.
+ //
+ // + `query` a bit-mask specifying which attributes to fetch. The server
+ // should not return more than necessary.
+ // - `attributes` the returned attributes.
+ //
+ // This method requires the [`Rights.GET_ATTRIBUTES`] right.
+ GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error)
+ // Updates information about the node.
+ //
+ // + `attributes` the presence of a table field in `attributes` indicates
+ // the intent to update the corresponding attribute.
+ //
+ // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+ UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error)
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method will return when the filesystem server has flushed the
+ // relevant updates to the underlying media, but does not guarantee the
+ // underlying media has persisted the information, nor that any information
+ // is committed to hardware. Clients may use `Sync` to ensure ordering
+ // between operations.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (NodeSyncResult, error)
+ // Opens or creates a new node relative to this directory node.
+ //
+ // + `path` identifies the node to open.
+ // If `path` contains multiple segments, then the directory is traversed,
+ // one segment at a time, relative to the directory represented by this
+ // connection.
+ // See [`fuchsia.io2/Path`] for what constitutes a valid path.
+ // To open another connection to the current directory, use
+ // [`fuchsia.io2/Node.Reopen`] instead.
+ // + `mode` controls whether to open existing/create new etc.
+ // + `options` additional options applicable to both `Open` and `Reopen`,
+ // including negotiating protocol and restricting rights.
+ // See [`fuchsia.io2/ConnectionOptions`].
+ // + `object_request` is the server end of a channel created for the new
+ // connection. The caller may proceed to send messages on the
+ // corresponding client end right away.
+ //
+ // This method requires the following rights on the current connection:
+ //
+ // * [`Rights.ENUMERATE`]
+ // * [`Rights.TRAVERSE`]
+ //
+ // Errors are presented as an epitaph on the `object_request` channel.
+ //
+ // * error `ZX_ERR_ACCESS_DENIED` if the requested rights exceeds
+ // what is allowed.
+ // * error `ZX_ERR_BAD_PATH` if `path` is invalid.
+ Open(ctx_ _bindings.Context, path string, mode OpenMode, options ConnectionOptions, objectRequest _zx.Channel) error
+ // Removes a child node from the this directory's list of entries.
+ //
+ // Note: this does not guarantee that the underlying object is destroyed.
+ // Although the link will be removed from the containing directory,
+ // objects with multiple references (such as files which are still open)
+ // will not actually be destroyed until all references are closed.
+ //
+ // + `path` identifies the node to be detached.
+ // If `path` contains multiple segments, then the directory is traversed,
+ // one segment at a time, relative to the directory represented by this
+ // connection.
+ //
+ // * error `ZX_ERR_ACCESS_DENIED` if the connection does not have
+ // [`Rights.WRITE_BYTES`].
+ // * error `ZX_ERR_NOT_SUPPORTED` if the underlying filesystem does not
+ // support writing.
+ // * error `ZX_ERR_BAD_PATH` if `path` is invalid.
+ // * error `ZX_ERR_NOT_EMPTY` if `path` refers to a non-empty directory.
+ // * error `ZX_ERR_UNAVAILABLE` if `path` refers to a mount point,
+ // containing a remote channel.
+ //
+ // Other errors may be returned for filesystem-specific reasons.
+ //
+ // This method requires the following rights:
+ //
+ // * [`Rights.ENUMERATE`]
+ // * [`Rights.MODIFY_DIRECTORY`]
+ Unlink(ctx_ _bindings.Context, path string) (DirectoryUnlinkResult, error)
+ // Initiates a directory listing operation over the input channel,
+ // starting at seek offset 0.
+ //
+ // This method requires the [`Rights.ENUMERATE`] right. If this right is
+ // absent, `iterator` will be closed with a `ZX_ERR_ACCESS_DENIED` epitaph.
+ Enumerate(ctx_ _bindings.Context, options DirectoryEnumerateOptions, iterator DirectoryIteratorWithCtxInterfaceRequest) error
+ // Renames a node named `src` to the name `dst`, in a directory represented
+ // by `dst_parent_token`.
+ //
+ // `src` and `dst` must be valid node names.
+ // See [`fuchsia.io2/Name`] for what constitutes a valid name.
+ //
+ // This method requires the following rights on both the current
+ // connection, and the connection identified by `dst_parent_token`:
+ //
+ // * [`Rights.ENUMERATE`]
+ // * [`Rights.MODIFY_DIRECTORY`]
+ //
+ // * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
+ Rename(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryRenameResult, error)
+ // Creates a link to a node named `src` by the name `dst`,
+ // in a directory represented by `dst_parent_token`.
+ //
+ // Directories cannot be linked, to prevent reference cycles.
+ //
+ // `src` and `dst` must be valid node names.
+ // See [`fuchsia.io2/Name`] for what constitutes a valid name.
+ //
+ // This method requires the following rights on both the current
+ // connection, and the connection identified by `dst_parent_token`:
+ //
+ // * [`Rights.ENUMERATE`]
+ // * [`Rights.MODIFY_DIRECTORY`]
+ //
+ // * error `ZX_ERR_INVALID_ARGS` if `src` or `dst` is invalid.
+ // * error `ZX_ERR_INVALID_ARGS` if `src` is a directory.
+ Link(ctx_ _bindings.Context, src string, dstParentToken _zx.Event, dst string) (DirectoryLinkResult, error)
+ // Watches a directory, monitoring events for children being added or
+ // removed on the server end of the `watcher` channel.
+ //
+ // Mask specifies a bit mask of events to observe.
+ //
+ // This method requires the [`Rights.ENUMERATE`] right. If this right is
+ // absent, `watcher` will be closed with a `ZX_ERR_ACCESS_DENIED` epitaph.
+ Watch(ctx_ _bindings.Context, mask DirectoryWatchMask, options DirectoryWatchOptions, watcher DirectoryWatcherWithCtxInterfaceRequest) error
+}
+
+type DirectoryWithCtxTransitionalBase struct{}
+
+type DirectoryWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDirectoryWithCtxInterfaceRequest() (DirectoryWithCtxInterfaceRequest, *DirectoryWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DirectoryWithCtxInterfaceRequest(req), (*DirectoryWithCtxInterface)(cli), err
+}
+
+type DirectoryWithCtxStub struct {
+ Impl DirectoryWithCtx
+}
+
+func (s_ *DirectoryWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DirectoryReopenOrdinal:
+ in_ := directoryWithCtxReopenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest)
+ return nil, false, err_
+ case DirectoryCloseOrdinal:
+ err_ := s_.Impl.Close(args_.Ctx)
+ return nil, false, err_
+ case DirectoryDescribeOrdinal:
+ in_ := directoryWithCtxDescribeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query)
+ out_ := directoryWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case DirectoryGetTokenOrdinal:
+ result, err_ := s_.Impl.GetToken(args_.Ctx)
+ out_ := directoryWithCtxGetTokenResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DirectoryGetAttributesOrdinal:
+ in_ := directoryWithCtxGetAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query)
+ out_ := directoryWithCtxGetAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DirectoryUpdateAttributesOrdinal:
+ in_ := directoryWithCtxUpdateAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes)
+ out_ := directoryWithCtxUpdateAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DirectorySyncOrdinal:
+ result, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := directoryWithCtxSyncResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DirectoryOpenOrdinal:
+ in_ := directoryWithCtxOpenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Open(args_.Ctx, in_.Path, in_.Mode, in_.Options, in_.ObjectRequest)
+ return nil, false, err_
+ case DirectoryUnlinkOrdinal:
+ in_ := directoryWithCtxUnlinkRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Unlink(args_.Ctx, in_.Path)
+ out_ := directoryWithCtxUnlinkResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DirectoryEnumerateOrdinal:
+ in_ := directoryWithCtxEnumerateRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Enumerate(args_.Ctx, in_.Options, in_.Iterator)
+ return nil, false, err_
+ case DirectoryRenameOrdinal:
+ in_ := directoryWithCtxRenameRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Rename(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
+ out_ := directoryWithCtxRenameResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DirectoryLinkOrdinal:
+ in_ := directoryWithCtxLinkRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Link(args_.Ctx, in_.Src, in_.DstParentToken, in_.Dst)
+ out_ := directoryWithCtxLinkResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DirectoryWatchOrdinal:
+ in_ := directoryWithCtxWatchRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Watch(args_.Ctx, in_.Mask, in_.Options, in_.Watcher)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DirectoryEventProxy _bindings.ChannelProxy
+
+func (p *DirectoryEventProxy) OnConnectionInfo(info ConnectionInfo) error {
+ event_ := &directoryWithCtxOnConnectionInfoResponse{
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(DirectoryOnConnectionInfoOrdinal, event_)
+}
+
+const (
+ DirectoryIteratorGetNextOrdinal uint64 = 0x5d2068db7393845c
+)
+
+type DirectoryIteratorWithCtxInterface _bindings.ChannelProxy
+
+// Reads a collection of variably sized directory entries into a buffer.
+//
+// The number of entries in a directory may be very large: akin to
+// calling read multiple times on a file, directories have a seek
+// offset which is updated on subsequent calls to `Enumerate`.
+// The caller should always use a receiving buffer size as large as the
+// maximum channel limit.
+//
+// When the end of iteration is reached, the returned `entries` vector
+// will be empty.
+//
+// This method does not require any rights, as the rights are checked
+// in the [`Directory.Enumerate`] call.
+func (p *DirectoryIteratorWithCtxInterface) GetNext(ctx_ _bindings.Context) (DirectoryIteratorGetNextResult, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryIteratorWithCtxGetNextResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryIteratorGetNextOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+type DirectoryIteratorWithCtx interface {
+ // Reads a collection of variably sized directory entries into a buffer.
+ //
+ // The number of entries in a directory may be very large: akin to
+ // calling read multiple times on a file, directories have a seek
+ // offset which is updated on subsequent calls to `Enumerate`.
+ // The caller should always use a receiving buffer size as large as the
+ // maximum channel limit.
+ //
+ // When the end of iteration is reached, the returned `entries` vector
+ // will be empty.
+ //
+ // This method does not require any rights, as the rights are checked
+ // in the [`Directory.Enumerate`] call.
+ GetNext(ctx_ _bindings.Context) (DirectoryIteratorGetNextResult, error)
+}
+
+type DirectoryIteratorWithCtxTransitionalBase struct{}
+
+type DirectoryIteratorWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDirectoryIteratorWithCtxInterfaceRequest() (DirectoryIteratorWithCtxInterfaceRequest, *DirectoryIteratorWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DirectoryIteratorWithCtxInterfaceRequest(req), (*DirectoryIteratorWithCtxInterface)(cli), err
+}
+
+type DirectoryIteratorWithCtxStub struct {
+ Impl DirectoryIteratorWithCtx
+}
+
+func (s_ *DirectoryIteratorWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DirectoryIteratorGetNextOrdinal:
+ result, err_ := s_.Impl.GetNext(args_.Ctx)
+ out_ := directoryIteratorWithCtxGetNextResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DirectoryIteratorEventProxy _bindings.ChannelProxy
+
+const (
+ DirectoryWatcherGetNextOrdinal uint64 = 0x74de3b9a6548cb77
+)
+
+type DirectoryWatcherWithCtxInterface _bindings.ChannelProxy
+
+// A hanging get to obtain the next batch of events.
+//
+// The caller should always use a receiving buffer size as large as the
+// maximum channel limit.
+//
+// Clients should attempt to maintain one in-flight `GetNext` call as much
+// as possible. If `GetNext` is not constantly polled, the filesystem
+// server might hit an upper limit on the number of buffered events,
+// resulting in dropping. Should this happen, the connection will be closed
+// with a `ZX_ERR_IO_OVERRUN` epitaph.
+//
+// When the watched directory is deleted, this connection will be closed
+// with a `ZX_ERR_UNAVAILABLE` epitaph.
+// When the filesystem server is dying, this connection will be closed
+// with a `ZX_ERR_PEER_CLOSED` epitaph.
+func (p *DirectoryWatcherWithCtxInterface) GetNext(ctx_ _bindings.Context) ([]DirectoryWatchedEvent, error) {
+ var req_ _bindings.Message
+ resp_ := &directoryWatcherWithCtxGetNextResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DirectoryWatcherGetNextOrdinal, req_, resp_)
+ return resp_.Events, err_
+}
+
+// DirectoryWatcher transmits messages from a filesystem server about
+// events happening in the filesystem. Clients can register new watchers
+// using the [`fuchsia.io2/Directory.Watch`] method, where they can
+// filter which events they want to receive notifications for.
+type DirectoryWatcherWithCtx interface {
+ // A hanging get to obtain the next batch of events.
+ //
+ // The caller should always use a receiving buffer size as large as the
+ // maximum channel limit.
+ //
+ // Clients should attempt to maintain one in-flight `GetNext` call as much
+ // as possible. If `GetNext` is not constantly polled, the filesystem
+ // server might hit an upper limit on the number of buffered events,
+ // resulting in dropping. Should this happen, the connection will be closed
+ // with a `ZX_ERR_IO_OVERRUN` epitaph.
+ //
+ // When the watched directory is deleted, this connection will be closed
+ // with a `ZX_ERR_UNAVAILABLE` epitaph.
+ // When the filesystem server is dying, this connection will be closed
+ // with a `ZX_ERR_PEER_CLOSED` epitaph.
+ GetNext(ctx_ _bindings.Context) ([]DirectoryWatchedEvent, error)
+}
+
+type DirectoryWatcherWithCtxTransitionalBase struct{}
+
+type DirectoryWatcherWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDirectoryWatcherWithCtxInterfaceRequest() (DirectoryWatcherWithCtxInterfaceRequest, *DirectoryWatcherWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DirectoryWatcherWithCtxInterfaceRequest(req), (*DirectoryWatcherWithCtxInterface)(cli), err
+}
+
+type DirectoryWatcherWithCtxStub struct {
+ Impl DirectoryWatcherWithCtx
+}
+
+func (s_ *DirectoryWatcherWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DirectoryWatcherGetNextOrdinal:
+ events, err_ := s_.Impl.GetNext(args_.Ctx)
+ out_ := directoryWatcherWithCtxGetNextResponse{}
+ out_.Events = events
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DirectoryWatcherEventProxy _bindings.ChannelProxy
+
+const (
+ FileAdvisoryLockOrdinal uint64 = 0x6358e94c468026fa
+ FileReopenOrdinal uint64 = 0x74170eb73121c69f
+ FileCloseOrdinal uint64 = 0x2dec2818386e5d68
+ FileDescribeOrdinal uint64 = 0x4aac591060c65c2f
+ FileOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437
+ FileGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4
+ FileGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4
+ FileUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5
+ FileSyncOrdinal uint64 = 0xac3a8c1a2e063ad
+ FileSeekOrdinal uint64 = 0x6cd7bdfcc294f64e
+ FileReadOrdinal uint64 = 0x6ab0b2e9f1e01f70
+ FileWriteOrdinal uint64 = 0x17872fc3d6725e01
+ FileReadAtOrdinal uint64 = 0x774898cce31c78aa
+ FileWriteAtOrdinal uint64 = 0x7b2af74fa0191292
+ FileResizeOrdinal uint64 = 0x57e9585fedaeaa1c
+ FileGetMemRangeOrdinal uint64 = 0x53842973559bd6ab
+)
+
+type FileWithCtxInterface _bindings.ChannelProxy
+
+// Acquires an advisory lock on the underlying file.
+//
+// The lock lasts until either this connection is closed or
+// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
+// explicitly.
+//
+// Advisory locks are purely advisory. They do not prevent actual read or
+// write operations from occurring on the file, either through this
+// connection or through other connections.
+//
+// This method requires the following rights:
+//
+// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
+// * [`Rights.WRITE_BYTES`] if `request.type` is
+// [`AdvisoryLockType.WRITE`].
+//
+// # Errors
+//
+// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
+// example, another connection might hold a conflicting lock type.
+// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
+// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
+// to acquire the given type of lock.
+func (p *FileWithCtxInterface) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) {
+ req_ := &fileWithCtxAdvisoryLockRequest{
+ Request: request,
+ }
+ resp_ := &fileWithCtxAdvisoryLockResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileAdvisoryLockOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Creates another connection to the same node.
+//
+// + `options` options applicable to both `Open` and `Reopen`,
+// including negotiating protocol and restricting rights.
+// See [`fuchsia.io2/ConnectionOptions`].
+// + `object_request` is the server end of a channel created for the new
+// connection. The caller may proceed to send messages on the
+// corresponding client end right away.
+//
+// For files, the cloned connection and the original connection have
+// independent seek offsets.
+func (p *FileWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error {
+ req_ := &fileWithCtxReopenRequest{
+ Options: options,
+ ObjectRequest: objectRequest,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(FileReopenOrdinal, req_)
+ return err_
+}
+
+// Terminates the connection to the node.
+//
+// After calling `Close`, the client must not send any other requests.
+// The result of `Close` arrives as an epitaph, where the channel is closed
+// by the server upon processing this operation.
+//
+// Closing the client end of the channel should be semantically equivalent
+// to calling `Close` without monitoring the status epitaph.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) Close(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(FileCloseOrdinal, req_)
+ return err_
+}
+
+// Returns extra connection information and auxiliary handles.
+//
+// + `query` specifies the fields in `ConnectionInfo` that the caller is
+// interested in.
+// - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+//
+// When all known bits in `query` are set, the return value matches
+// the one from [`OnConnectionInfo`], as if the caller requested that event
+// using [`ConnectionFlags.GET_CONNECTION_INFO`].
+//
+// If the `Describe` operation fails, the connection is closed with the
+// associated error.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) {
+ req_ := &fileWithCtxDescribeRequest{
+ Query: query,
+ }
+ resp_ := &fileWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by the server if requested by
+// [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+// first message from the server, and is sent exactly once.
+//
+// - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+// All members should be present.
+//
+// Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+// always manifested as an epitaph.
+func (p *FileWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) {
+ resp_ := &fileWithCtxOnConnectionInfoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(FileOnConnectionInfoOrdinal, resp_)
+ return resp_.Info, err_
+}
+
+// Acquires a token which can be used to identify this connection at
+// a later point in time.
+//
+// This method does not require any rights. Note that the token identifies
+// the connection, hence carries the rights information on this connection.
+func (p *FileWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) {
+ var req_ _bindings.Message
+ resp_ := &fileWithCtxGetTokenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetTokenOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Acquires information about the node.
+//
+// The attributes of a node should be stable, independent of the
+// specific protocol used to access it.
+//
+// + `query` a bit-mask specifying which attributes to fetch. The server
+// should not return more than necessary.
+// - `attributes` the returned attributes.
+//
+// This method requires the [`Rights.GET_ATTRIBUTES`] right.
+func (p *FileWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) {
+ req_ := &fileWithCtxGetAttributesRequest{
+ Query: query,
+ }
+ resp_ := &fileWithCtxGetAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Updates information about the node.
+//
+// + `attributes` the presence of a table field in `attributes` indicates
+// the intent to update the corresponding attribute.
+//
+// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+func (p *FileWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) {
+ req_ := &fileWithCtxUpdateAttributesRequest{
+ Attributes: attributes,
+ }
+ resp_ := &fileWithCtxUpdateAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileUpdateAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method will return when the filesystem server has flushed the
+// relevant updates to the underlying media, but does not guarantee the
+// underlying media has persisted the information, nor that any information
+// is committed to hardware. Clients may use `Sync` to ensure ordering
+// between operations.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) {
+ var req_ _bindings.Message
+ resp_ := &fileWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSyncOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Moves the offset at which the next invocation of [`Read`] or [`Write`]
+// will occur. The seek offset is specific to each file connection.
+//
+// + request `origin` the reference point where `offset` will be based on.
+// + request `offset` the number of bytes to seek.
+// - response `offset_from_start` the adjusted seek offset, from the start
+// of the file.
+//
+// This method does not require any rights.
+func (p *FileWithCtxInterface) Seek(ctx_ _bindings.Context, origin SeekOrigin, offset int64) (FileSeekResult, error) {
+ req_ := &fileWithCtxSeekRequest{
+ Origin: origin,
+ Offset: offset,
+ }
+ resp_ := &fileWithCtxSeekResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileSeekOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Reads up to 'count' bytes at the seek offset.
+// The seek offset is moved forward by the number of bytes read.
+//
+// ## Invariants
+//
+// * The returned `data.length` will never be greater than `count`.
+// * If `data.length` is less than `count`, it means that the seek offset
+// has reached the end of file as part of this operation.
+// * If `data.length` is zero while `count` is not, it means that the
+// seek offset is already at or beyond the end of file, and no data could
+// be read.
+// * If `count` is zero, the server should perform all the checks ensuring
+// read access without actually read anything, and return an empty
+// `data` vector.
+//
+// This method requires the [`Rights.READ_BYTES`] right.
+func (p *FileWithCtxInterface) Read(ctx_ _bindings.Context, count uint64) (FileReadResult, error) {
+ req_ := &fileWithCtxReadRequest{
+ Count: count,
+ }
+ resp_ := &fileWithCtxReadResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileReadOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Writes data at the seek offset.
+// The seek offset is moved forward by the number of bytes written.
+// If the file is in append mode, the seek offset is first set to the end
+// of the file, followed by the write, in one atomic step.
+//
+// The file size may grow if the seek offset plus `data.length` is beyond
+// the current end of file.
+//
+// + request `data` the byte buffer to write to the file.
+// - response `actual_count` the number of bytes written.
+//
+// ## Invariants
+//
+// * The returned `actual_count` will never be greater than `data.length`.
+// * If the server is unable to write all the data due to e.g. not enough
+// space, `actual_count` may be less than `data.length`.
+// * If `data.length` is zero, the server should perform all the checks
+// ensuring write access without mutating the file. The seek offset
+// is still updated if in append mode.
+//
+// This method requires the [`Rights.WRITE_BYTES`] right.
+func (p *FileWithCtxInterface) Write(ctx_ _bindings.Context, data []uint8) (FileWriteResult, error) {
+ req_ := &fileWithCtxWriteRequest{
+ Data: data,
+ }
+ resp_ := &fileWithCtxWriteResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileWriteOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Reads up to 'count' bytes at the provided offset.
+// Does not affect the seek offset.
+//
+// ## Invariants
+//
+// * The returned `data.length` will never be greater than `count`.
+// * If `data.length` is less than `count`, it means that `ReadAt` has hit
+// the end of file as part of this operation.
+// * If `data.length` is zero while `count` is not, it means that `offset`
+// is at or past the end of file, and no data can be read.
+// * If `count` is zero, the server should perform all the checks ensuring
+// read access without actually reading anything, and return an empty
+// `data` vector.
+//
+// This method requires the [`Rights.READ_BYTES`] right.
+func (p *FileWithCtxInterface) ReadAt(ctx_ _bindings.Context, count uint64, offset uint64) (FileReadAtResult, error) {
+ req_ := &fileWithCtxReadAtRequest{
+ Count: count,
+ Offset: offset,
+ }
+ resp_ := &fileWithCtxReadAtResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileReadAtOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Writes data at the provided offset.
+// Does not affect the seek offset.
+//
+// The file size may grow if `offset` plus `data.length` is past the
+// current end of file.
+//
+// + request `data` the byte buffer to write to the file.
+// + request `offset` the offset from start of the file to begin writing.
+// - response `actual_count` the number of bytes written.
+//
+// ## Invariants
+//
+// * The returned `actual_count` will never be greater than `data.length`.
+// * If the server is unable to write all the data due to e.g. not enough
+// space, `actual_count` may be less than `data.length`.
+// * If `data.length` is zero, the server should perform all the checks
+// ensuring write access without mutating the file.
+//
+// This method requires the [`Rights.WRITE_BYTES`] right.
+func (p *FileWithCtxInterface) WriteAt(ctx_ _bindings.Context, data []uint8, offset uint64) (FileWriteAtResult, error) {
+ req_ := &fileWithCtxWriteAtRequest{
+ Data: data,
+ Offset: offset,
+ }
+ resp_ := &fileWithCtxWriteAtResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileWriteAtOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Shrinks or grows the file size to 'length' bytes.
+//
+// If file size is reduced by this operation, the extra trailing data'
+// is discarded.
+// If file size is increased by this operation, the extended area appears
+// as if it was zeroed.
+//
+// This method requires the [`Rights.WRITE_BYTES`] right.
+func (p *FileWithCtxInterface) Resize(ctx_ _bindings.Context, length uint64) (FileResizeResult, error) {
+ req_ := &fileWithCtxResizeRequest{
+ Length: length,
+ }
+ resp_ := &fileWithCtxResizeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileResizeOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Acquires a [`fuchsia.mem/Range`] representing this file, if
+// there is one, with the requested access rights.
+//
+// + request `flags` a [`VmoFlags`] indicating the desired mode of access.
+// - response `buffer` the requested [`fuchsia.mem/Range`].
+// * error a [`zx.status`] value indicating the failure.
+//
+// This method requires the following rights:
+//
+// * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].
+// * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].
+// * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].
+func (p *FileWithCtxInterface) GetMemRange(ctx_ _bindings.Context, flags VmoFlags) (FileGetMemRangeResult, error) {
+ req_ := &fileWithCtxGetMemRangeRequest{
+ Flags: flags,
+ }
+ resp_ := &fileWithCtxGetMemRangeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(FileGetMemRangeOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// A [`fuchsia.io2/Node`] which contains a sequence of bytes of definite
+// length.
+type FileWithCtx interface {
+ // Acquires an advisory lock on the underlying file.
+ //
+ // The lock lasts until either this connection is closed or
+ // this method is called with |AdvisoryLockType.UNLOCK| to release the lock
+ // explicitly.
+ //
+ // Advisory locks are purely advisory. They do not prevent actual read or
+ // write operations from occurring on the file, either through this
+ // connection or through other connections.
+ //
+ // This method requires the following rights:
+ //
+ // * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
+ // * [`Rights.WRITE_BYTES`] if `request.type` is
+ // [`AdvisoryLockType.WRITE`].
+ //
+ // # Errors
+ //
+ // * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
+ // example, another connection might hold a conflicting lock type.
+ // * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
+ // * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
+ // to acquire the given type of lock.
+ AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error)
+ // Creates another connection to the same node.
+ //
+ // + `options` options applicable to both `Open` and `Reopen`,
+ // including negotiating protocol and restricting rights.
+ // See [`fuchsia.io2/ConnectionOptions`].
+ // + `object_request` is the server end of a channel created for the new
+ // connection. The caller may proceed to send messages on the
+ // corresponding client end right away.
+ //
+ // For files, the cloned connection and the original connection have
+ // independent seek offsets.
+ Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error
+ // Terminates the connection to the node.
+ //
+ // After calling `Close`, the client must not send any other requests.
+ // The result of `Close` arrives as an epitaph, where the channel is closed
+ // by the server upon processing this operation.
+ //
+ // Closing the client end of the channel should be semantically equivalent
+ // to calling `Close` without monitoring the status epitaph.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) error
+ // Returns extra connection information and auxiliary handles.
+ //
+ // + `query` specifies the fields in `ConnectionInfo` that the caller is
+ // interested in.
+ // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ //
+ // When all known bits in `query` are set, the return value matches
+ // the one from [`OnConnectionInfo`], as if the caller requested that event
+ // using [`ConnectionFlags.GET_CONNECTION_INFO`].
+ //
+ // If the `Describe` operation fails, the connection is closed with the
+ // associated error.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error)
+ // An event produced eagerly by the server if requested by
+ // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+ // first message from the server, and is sent exactly once.
+ //
+ // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ // All members should be present.
+ //
+ // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+ // always manifested as an epitaph.
+ // Acquires a token which can be used to identify this connection at
+ // a later point in time.
+ //
+ // This method does not require any rights. Note that the token identifies
+ // the connection, hence carries the rights information on this connection.
+ GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error)
+ // Acquires information about the node.
+ //
+ // The attributes of a node should be stable, independent of the
+ // specific protocol used to access it.
+ //
+ // + `query` a bit-mask specifying which attributes to fetch. The server
+ // should not return more than necessary.
+ // - `attributes` the returned attributes.
+ //
+ // This method requires the [`Rights.GET_ATTRIBUTES`] right.
+ GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error)
+ // Updates information about the node.
+ //
+ // + `attributes` the presence of a table field in `attributes` indicates
+ // the intent to update the corresponding attribute.
+ //
+ // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+ UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error)
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method will return when the filesystem server has flushed the
+ // relevant updates to the underlying media, but does not guarantee the
+ // underlying media has persisted the information, nor that any information
+ // is committed to hardware. Clients may use `Sync` to ensure ordering
+ // between operations.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (NodeSyncResult, error)
+ // Moves the offset at which the next invocation of [`Read`] or [`Write`]
+ // will occur. The seek offset is specific to each file connection.
+ //
+ // + request `origin` the reference point where `offset` will be based on.
+ // + request `offset` the number of bytes to seek.
+ // - response `offset_from_start` the adjusted seek offset, from the start
+ // of the file.
+ //
+ // This method does not require any rights.
+ Seek(ctx_ _bindings.Context, origin SeekOrigin, offset int64) (FileSeekResult, error)
+ // Reads up to 'count' bytes at the seek offset.
+ // The seek offset is moved forward by the number of bytes read.
+ //
+ // ## Invariants
+ //
+ // * The returned `data.length` will never be greater than `count`.
+ // * If `data.length` is less than `count`, it means that the seek offset
+ // has reached the end of file as part of this operation.
+ // * If `data.length` is zero while `count` is not, it means that the
+ // seek offset is already at or beyond the end of file, and no data could
+ // be read.
+ // * If `count` is zero, the server should perform all the checks ensuring
+ // read access without actually read anything, and return an empty
+ // `data` vector.
+ //
+ // This method requires the [`Rights.READ_BYTES`] right.
+ Read(ctx_ _bindings.Context, count uint64) (FileReadResult, error)
+ // Writes data at the seek offset.
+ // The seek offset is moved forward by the number of bytes written.
+ // If the file is in append mode, the seek offset is first set to the end
+ // of the file, followed by the write, in one atomic step.
+ //
+ // The file size may grow if the seek offset plus `data.length` is beyond
+ // the current end of file.
+ //
+ // + request `data` the byte buffer to write to the file.
+ // - response `actual_count` the number of bytes written.
+ //
+ // ## Invariants
+ //
+ // * The returned `actual_count` will never be greater than `data.length`.
+ // * If the server is unable to write all the data due to e.g. not enough
+ // space, `actual_count` may be less than `data.length`.
+ // * If `data.length` is zero, the server should perform all the checks
+ // ensuring write access without mutating the file. The seek offset
+ // is still updated if in append mode.
+ //
+ // This method requires the [`Rights.WRITE_BYTES`] right.
+ Write(ctx_ _bindings.Context, data []uint8) (FileWriteResult, error)
+ // Reads up to 'count' bytes at the provided offset.
+ // Does not affect the seek offset.
+ //
+ // ## Invariants
+ //
+ // * The returned `data.length` will never be greater than `count`.
+ // * If `data.length` is less than `count`, it means that `ReadAt` has hit
+ // the end of file as part of this operation.
+ // * If `data.length` is zero while `count` is not, it means that `offset`
+ // is at or past the end of file, and no data can be read.
+ // * If `count` is zero, the server should perform all the checks ensuring
+ // read access without actually reading anything, and return an empty
+ // `data` vector.
+ //
+ // This method requires the [`Rights.READ_BYTES`] right.
+ ReadAt(ctx_ _bindings.Context, count uint64, offset uint64) (FileReadAtResult, error)
+ // Writes data at the provided offset.
+ // Does not affect the seek offset.
+ //
+ // The file size may grow if `offset` plus `data.length` is past the
+ // current end of file.
+ //
+ // + request `data` the byte buffer to write to the file.
+ // + request `offset` the offset from start of the file to begin writing.
+ // - response `actual_count` the number of bytes written.
+ //
+ // ## Invariants
+ //
+ // * The returned `actual_count` will never be greater than `data.length`.
+ // * If the server is unable to write all the data due to e.g. not enough
+ // space, `actual_count` may be less than `data.length`.
+ // * If `data.length` is zero, the server should perform all the checks
+ // ensuring write access without mutating the file.
+ //
+ // This method requires the [`Rights.WRITE_BYTES`] right.
+ WriteAt(ctx_ _bindings.Context, data []uint8, offset uint64) (FileWriteAtResult, error)
+ // Shrinks or grows the file size to 'length' bytes.
+ //
+ // If file size is reduced by this operation, the extra trailing data'
+ // is discarded.
+ // If file size is increased by this operation, the extended area appears
+ // as if it was zeroed.
+ //
+ // This method requires the [`Rights.WRITE_BYTES`] right.
+ Resize(ctx_ _bindings.Context, length uint64) (FileResizeResult, error)
+ // Acquires a [`fuchsia.mem/Range`] representing this file, if
+ // there is one, with the requested access rights.
+ //
+ // + request `flags` a [`VmoFlags`] indicating the desired mode of access.
+ // - response `buffer` the requested [`fuchsia.mem/Range`].
+ // * error a [`zx.status`] value indicating the failure.
+ //
+ // This method requires the following rights:
+ //
+ // * [`Rights.READ_BYTES`] if `flags` includes [`VmoFlags.READ`].
+ // * [`Rights.WRITE_BYTES`] if `flags` includes [`VmoFlags.WRITE`].
+ // * [`Rights.EXECUTE`] if `flags` includes [`VmoFlags.EXECUTE`].
+ GetMemRange(ctx_ _bindings.Context, flags VmoFlags) (FileGetMemRangeResult, error)
+}
+
+type FileWithCtxTransitionalBase struct{}
+
+func (_ *FileWithCtxTransitionalBase) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) {
+ panic("Not Implemented")
+}
+
+type FileWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewFileWithCtxInterfaceRequest() (FileWithCtxInterfaceRequest, *FileWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return FileWithCtxInterfaceRequest(req), (*FileWithCtxInterface)(cli), err
+}
+
+type FileWithCtxStub struct {
+ Impl FileWithCtx
+}
+
+func (s_ *FileWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case FileAdvisoryLockOrdinal:
+ in_ := fileWithCtxAdvisoryLockRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, in_.Request)
+ out_ := fileWithCtxAdvisoryLockResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileReopenOrdinal:
+ in_ := fileWithCtxReopenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest)
+ return nil, false, err_
+ case FileCloseOrdinal:
+ err_ := s_.Impl.Close(args_.Ctx)
+ return nil, false, err_
+ case FileDescribeOrdinal:
+ in_ := fileWithCtxDescribeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query)
+ out_ := fileWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case FileGetTokenOrdinal:
+ result, err_ := s_.Impl.GetToken(args_.Ctx)
+ out_ := fileWithCtxGetTokenResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileGetAttributesOrdinal:
+ in_ := fileWithCtxGetAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query)
+ out_ := fileWithCtxGetAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileUpdateAttributesOrdinal:
+ in_ := fileWithCtxUpdateAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes)
+ out_ := fileWithCtxUpdateAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileSyncOrdinal:
+ result, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := fileWithCtxSyncResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileSeekOrdinal:
+ in_ := fileWithCtxSeekRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Seek(args_.Ctx, in_.Origin, in_.Offset)
+ out_ := fileWithCtxSeekResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileReadOrdinal:
+ in_ := fileWithCtxReadRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Read(args_.Ctx, in_.Count)
+ out_ := fileWithCtxReadResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileWriteOrdinal:
+ in_ := fileWithCtxWriteRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Write(args_.Ctx, in_.Data)
+ out_ := fileWithCtxWriteResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileReadAtOrdinal:
+ in_ := fileWithCtxReadAtRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.ReadAt(args_.Ctx, in_.Count, in_.Offset)
+ out_ := fileWithCtxReadAtResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileWriteAtOrdinal:
+ in_ := fileWithCtxWriteAtRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.WriteAt(args_.Ctx, in_.Data, in_.Offset)
+ out_ := fileWithCtxWriteAtResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileResizeOrdinal:
+ in_ := fileWithCtxResizeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Resize(args_.Ctx, in_.Length)
+ out_ := fileWithCtxResizeResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case FileGetMemRangeOrdinal:
+ in_ := fileWithCtxGetMemRangeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetMemRange(args_.Ctx, in_.Flags)
+ out_ := fileWithCtxGetMemRangeResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type FileEventProxy _bindings.ChannelProxy
+
+func (p *FileEventProxy) OnConnectionInfo(info ConnectionInfo) error {
+ event_ := &fileWithCtxOnConnectionInfoResponse{
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(FileOnConnectionInfoOrdinal, event_)
+}
+
+const (
+ AdvisoryLockingAdvisoryLockOrdinal uint64 = 0x6358e94c468026fa
+)
+
+type AdvisoryLockingWithCtxInterface _bindings.ChannelProxy
+
+// Acquires an advisory lock on the underlying file.
+//
+// The lock lasts until either this connection is closed or
+// this method is called with |AdvisoryLockType.UNLOCK| to release the lock
+// explicitly.
+//
+// Advisory locks are purely advisory. They do not prevent actual read or
+// write operations from occurring on the file, either through this
+// connection or through other connections.
+//
+// This method requires the following rights:
+//
+// * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
+// * [`Rights.WRITE_BYTES`] if `request.type` is
+// [`AdvisoryLockType.WRITE`].
+//
+// # Errors
+//
+// * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
+// example, another connection might hold a conflicting lock type.
+// * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
+// * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
+// to acquire the given type of lock.
+func (p *AdvisoryLockingWithCtxInterface) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) {
+ req_ := &advisoryLockingWithCtxAdvisoryLockRequest{
+ Request: request,
+ }
+ resp_ := &advisoryLockingWithCtxAdvisoryLockResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(AdvisoryLockingAdvisoryLockOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Advisory locking protocol.
+//
+// This protocol is intended to be composed into the |File| protocol to
+// provide support for advisory locking.
+//
+// Advisory locks are purely advisory. They do not prevent actual read or
+// write operations from occurring on the file, either through this
+// connection or through other connections.
+//
+// These primitives are designed to support the flock() and fcntl(),
+// specifically F_SETLK, F_SETLKW, and F_GETLK, functionality that code
+// running on Fuchsia expects from other operating systems.
+type AdvisoryLockingWithCtx interface {
+ // Acquires an advisory lock on the underlying file.
+ //
+ // The lock lasts until either this connection is closed or
+ // this method is called with |AdvisoryLockType.UNLOCK| to release the lock
+ // explicitly.
+ //
+ // Advisory locks are purely advisory. They do not prevent actual read or
+ // write operations from occurring on the file, either through this
+ // connection or through other connections.
+ //
+ // This method requires the following rights:
+ //
+ // * [`Rights.READ_BYTES`] if `request.type` is [`AdvisoryLockType.READ`].
+ // * [`Rights.WRITE_BYTES`] if `request.type` is
+ // [`AdvisoryLockType.WRITE`].
+ //
+ // # Errors
+ //
+ // * `ZX_ERR_BAD_STATE` The specified type of lock cannot be acquired. For
+ // example, another connection might hold a conflicting lock type.
+ // * `ZX_ERR_NOT_SUPPORTED` This file does not support advisory locking.
+ // * `ZX_ERR_ACCESS_DENIED` This connection does not have sufficient rights
+ // to acquire the given type of lock.
+ AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error)
+}
+
+type AdvisoryLockingWithCtxTransitionalBase struct{}
+
+func (_ *AdvisoryLockingWithCtxTransitionalBase) AdvisoryLock(ctx_ _bindings.Context, request AdvisoryLockRequest) (AdvisoryLockingAdvisoryLockResult, error) {
+ panic("Not Implemented")
+}
+
+type AdvisoryLockingWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewAdvisoryLockingWithCtxInterfaceRequest() (AdvisoryLockingWithCtxInterfaceRequest, *AdvisoryLockingWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return AdvisoryLockingWithCtxInterfaceRequest(req), (*AdvisoryLockingWithCtxInterface)(cli), err
+}
+
+type AdvisoryLockingWithCtxStub struct {
+ Impl AdvisoryLockingWithCtx
+}
+
+func (s_ *AdvisoryLockingWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case AdvisoryLockingAdvisoryLockOrdinal:
+ in_ := advisoryLockingWithCtxAdvisoryLockRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.AdvisoryLock(args_.Ctx, in_.Request)
+ out_ := advisoryLockingWithCtxAdvisoryLockResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type AdvisoryLockingEventProxy _bindings.ChannelProxy
+
+const (
+ MemoryReopenOrdinal uint64 = 0x74170eb73121c69f
+ MemoryCloseOrdinal uint64 = 0x2dec2818386e5d68
+ MemoryDescribeOrdinal uint64 = 0x4aac591060c65c2f
+ MemoryOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437
+ MemoryGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4
+ MemoryGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4
+ MemoryUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5
+ MemorySyncOrdinal uint64 = 0xac3a8c1a2e063ad
+)
+
+type MemoryWithCtxInterface _bindings.ChannelProxy
+
+// Creates another connection to the same node.
+//
+// + `options` options applicable to both `Open` and `Reopen`,
+// including negotiating protocol and restricting rights.
+// See [`fuchsia.io2/ConnectionOptions`].
+// + `object_request` is the server end of a channel created for the new
+// connection. The caller may proceed to send messages on the
+// corresponding client end right away.
+//
+// For files, the cloned connection and the original connection have
+// independent seek offsets.
+func (p *MemoryWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error {
+ req_ := &memoryWithCtxReopenRequest{
+ Options: options,
+ ObjectRequest: objectRequest,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(MemoryReopenOrdinal, req_)
+ return err_
+}
+
+// Terminates the connection to the node.
+//
+// After calling `Close`, the client must not send any other requests.
+// The result of `Close` arrives as an epitaph, where the channel is closed
+// by the server upon processing this operation.
+//
+// Closing the client end of the channel should be semantically equivalent
+// to calling `Close` without monitoring the status epitaph.
+//
+// This method does not require any rights.
+func (p *MemoryWithCtxInterface) Close(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(MemoryCloseOrdinal, req_)
+ return err_
+}
+
+// Returns extra connection information and auxiliary handles.
+//
+// + `query` specifies the fields in `ConnectionInfo` that the caller is
+// interested in.
+// - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+//
+// When all known bits in `query` are set, the return value matches
+// the one from [`OnConnectionInfo`], as if the caller requested that event
+// using [`ConnectionFlags.GET_CONNECTION_INFO`].
+//
+// If the `Describe` operation fails, the connection is closed with the
+// associated error.
+//
+// This method does not require any rights.
+func (p *MemoryWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) {
+ req_ := &memoryWithCtxDescribeRequest{
+ Query: query,
+ }
+ resp_ := &memoryWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(MemoryDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by the server if requested by
+// [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+// first message from the server, and is sent exactly once.
+//
+// - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+// All members should be present.
+//
+// Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+// always manifested as an epitaph.
+func (p *MemoryWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) {
+ resp_ := &memoryWithCtxOnConnectionInfoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(MemoryOnConnectionInfoOrdinal, resp_)
+ return resp_.Info, err_
+}
+
+// Acquires a token which can be used to identify this connection at
+// a later point in time.
+//
+// This method does not require any rights. Note that the token identifies
+// the connection, hence carries the rights information on this connection.
+func (p *MemoryWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) {
+ var req_ _bindings.Message
+ resp_ := &memoryWithCtxGetTokenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(MemoryGetTokenOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Acquires information about the node.
+//
+// The attributes of a node should be stable, independent of the
+// specific protocol used to access it.
+//
+// + `query` a bit-mask specifying which attributes to fetch. The server
+// should not return more than necessary.
+// - `attributes` the returned attributes.
+//
+// This method requires the [`Rights.GET_ATTRIBUTES`] right.
+func (p *MemoryWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) {
+ req_ := &memoryWithCtxGetAttributesRequest{
+ Query: query,
+ }
+ resp_ := &memoryWithCtxGetAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(MemoryGetAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Updates information about the node.
+//
+// + `attributes` the presence of a table field in `attributes` indicates
+// the intent to update the corresponding attribute.
+//
+// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+func (p *MemoryWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) {
+ req_ := &memoryWithCtxUpdateAttributesRequest{
+ Attributes: attributes,
+ }
+ resp_ := &memoryWithCtxUpdateAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(MemoryUpdateAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method will return when the filesystem server has flushed the
+// relevant updates to the underlying media, but does not guarantee the
+// underlying media has persisted the information, nor that any information
+// is committed to hardware. Clients may use `Sync` to ensure ordering
+// between operations.
+//
+// This method does not require any rights.
+func (p *MemoryWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) {
+ var req_ _bindings.Message
+ resp_ := &memoryWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(MemorySyncOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// A file-like node backed by a VMO.
+// No memory-specific methods are provided by this protocol.
+// The client should access it via the the [`MemoryInfo.buffer`] object in
+// [`fuchsia.io2/Representation`].
+type MemoryWithCtx interface {
+ // Creates another connection to the same node.
+ //
+ // + `options` options applicable to both `Open` and `Reopen`,
+ // including negotiating protocol and restricting rights.
+ // See [`fuchsia.io2/ConnectionOptions`].
+ // + `object_request` is the server end of a channel created for the new
+ // connection. The caller may proceed to send messages on the
+ // corresponding client end right away.
+ //
+ // For files, the cloned connection and the original connection have
+ // independent seek offsets.
+ Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error
+ // Terminates the connection to the node.
+ //
+ // After calling `Close`, the client must not send any other requests.
+ // The result of `Close` arrives as an epitaph, where the channel is closed
+ // by the server upon processing this operation.
+ //
+ // Closing the client end of the channel should be semantically equivalent
+ // to calling `Close` without monitoring the status epitaph.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) error
+ // Returns extra connection information and auxiliary handles.
+ //
+ // + `query` specifies the fields in `ConnectionInfo` that the caller is
+ // interested in.
+ // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ //
+ // When all known bits in `query` are set, the return value matches
+ // the one from [`OnConnectionInfo`], as if the caller requested that event
+ // using [`ConnectionFlags.GET_CONNECTION_INFO`].
+ //
+ // If the `Describe` operation fails, the connection is closed with the
+ // associated error.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error)
+ // An event produced eagerly by the server if requested by
+ // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+ // first message from the server, and is sent exactly once.
+ //
+ // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ // All members should be present.
+ //
+ // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+ // always manifested as an epitaph.
+ // Acquires a token which can be used to identify this connection at
+ // a later point in time.
+ //
+ // This method does not require any rights. Note that the token identifies
+ // the connection, hence carries the rights information on this connection.
+ GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error)
+ // Acquires information about the node.
+ //
+ // The attributes of a node should be stable, independent of the
+ // specific protocol used to access it.
+ //
+ // + `query` a bit-mask specifying which attributes to fetch. The server
+ // should not return more than necessary.
+ // - `attributes` the returned attributes.
+ //
+ // This method requires the [`Rights.GET_ATTRIBUTES`] right.
+ GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error)
+ // Updates information about the node.
+ //
+ // + `attributes` the presence of a table field in `attributes` indicates
+ // the intent to update the corresponding attribute.
+ //
+ // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+ UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error)
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method will return when the filesystem server has flushed the
+ // relevant updates to the underlying media, but does not guarantee the
+ // underlying media has persisted the information, nor that any information
+ // is committed to hardware. Clients may use `Sync` to ensure ordering
+ // between operations.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (NodeSyncResult, error)
+}
+
+type MemoryWithCtxTransitionalBase struct{}
+
+type MemoryWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewMemoryWithCtxInterfaceRequest() (MemoryWithCtxInterfaceRequest, *MemoryWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return MemoryWithCtxInterfaceRequest(req), (*MemoryWithCtxInterface)(cli), err
+}
+
+type MemoryWithCtxStub struct {
+ Impl MemoryWithCtx
+}
+
+func (s_ *MemoryWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case MemoryReopenOrdinal:
+ in_ := memoryWithCtxReopenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest)
+ return nil, false, err_
+ case MemoryCloseOrdinal:
+ err_ := s_.Impl.Close(args_.Ctx)
+ return nil, false, err_
+ case MemoryDescribeOrdinal:
+ in_ := memoryWithCtxDescribeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query)
+ out_ := memoryWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case MemoryGetTokenOrdinal:
+ result, err_ := s_.Impl.GetToken(args_.Ctx)
+ out_ := memoryWithCtxGetTokenResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case MemoryGetAttributesOrdinal:
+ in_ := memoryWithCtxGetAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query)
+ out_ := memoryWithCtxGetAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case MemoryUpdateAttributesOrdinal:
+ in_ := memoryWithCtxUpdateAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes)
+ out_ := memoryWithCtxUpdateAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case MemorySyncOrdinal:
+ result, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := memoryWithCtxSyncResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type MemoryEventProxy _bindings.ChannelProxy
+
+func (p *MemoryEventProxy) OnConnectionInfo(info ConnectionInfo) error {
+ event_ := &memoryWithCtxOnConnectionInfoResponse{
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(MemoryOnConnectionInfoOrdinal, event_)
+}
+
+const (
+ NodeReopenOrdinal uint64 = 0x74170eb73121c69f
+ NodeCloseOrdinal uint64 = 0x2dec2818386e5d68
+ NodeDescribeOrdinal uint64 = 0x4aac591060c65c2f
+ NodeOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437
+ NodeGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4
+ NodeGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4
+ NodeUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5
+ NodeSyncOrdinal uint64 = 0xac3a8c1a2e063ad
+)
+
+type NodeWithCtxInterface _bindings.ChannelProxy
+
+// Creates another connection to the same node.
+//
+// + `options` options applicable to both `Open` and `Reopen`,
+// including negotiating protocol and restricting rights.
+// See [`fuchsia.io2/ConnectionOptions`].
+// + `object_request` is the server end of a channel created for the new
+// connection. The caller may proceed to send messages on the
+// corresponding client end right away.
+//
+// For files, the cloned connection and the original connection have
+// independent seek offsets.
+func (p *NodeWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error {
+ req_ := &nodeWithCtxReopenRequest{
+ Options: options,
+ ObjectRequest: objectRequest,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(NodeReopenOrdinal, req_)
+ return err_
+}
+
+// Terminates the connection to the node.
+//
+// After calling `Close`, the client must not send any other requests.
+// The result of `Close` arrives as an epitaph, where the channel is closed
+// by the server upon processing this operation.
+//
+// Closing the client end of the channel should be semantically equivalent
+// to calling `Close` without monitoring the status epitaph.
+//
+// This method does not require any rights.
+func (p *NodeWithCtxInterface) Close(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(NodeCloseOrdinal, req_)
+ return err_
+}
+
+// Returns extra connection information and auxiliary handles.
+//
+// + `query` specifies the fields in `ConnectionInfo` that the caller is
+// interested in.
+// - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+//
+// When all known bits in `query` are set, the return value matches
+// the one from [`OnConnectionInfo`], as if the caller requested that event
+// using [`ConnectionFlags.GET_CONNECTION_INFO`].
+//
+// If the `Describe` operation fails, the connection is closed with the
+// associated error.
+//
+// This method does not require any rights.
+func (p *NodeWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) {
+ req_ := &nodeWithCtxDescribeRequest{
+ Query: query,
+ }
+ resp_ := &nodeWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by the server if requested by
+// [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+// first message from the server, and is sent exactly once.
+//
+// - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+// All members should be present.
+//
+// Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+// always manifested as an epitaph.
+func (p *NodeWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) {
+ resp_ := &nodeWithCtxOnConnectionInfoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(NodeOnConnectionInfoOrdinal, resp_)
+ return resp_.Info, err_
+}
+
+// Acquires a token which can be used to identify this connection at
+// a later point in time.
+//
+// This method does not require any rights. Note that the token identifies
+// the connection, hence carries the rights information on this connection.
+func (p *NodeWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) {
+ var req_ _bindings.Message
+ resp_ := &nodeWithCtxGetTokenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeGetTokenOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Acquires information about the node.
+//
+// The attributes of a node should be stable, independent of the
+// specific protocol used to access it.
+//
+// + `query` a bit-mask specifying which attributes to fetch. The server
+// should not return more than necessary.
+// - `attributes` the returned attributes.
+//
+// This method requires the [`Rights.GET_ATTRIBUTES`] right.
+func (p *NodeWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) {
+ req_ := &nodeWithCtxGetAttributesRequest{
+ Query: query,
+ }
+ resp_ := &nodeWithCtxGetAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeGetAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Updates information about the node.
+//
+// + `attributes` the presence of a table field in `attributes` indicates
+// the intent to update the corresponding attribute.
+//
+// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+func (p *NodeWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) {
+ req_ := &nodeWithCtxUpdateAttributesRequest{
+ Attributes: attributes,
+ }
+ resp_ := &nodeWithCtxUpdateAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeUpdateAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method will return when the filesystem server has flushed the
+// relevant updates to the underlying media, but does not guarantee the
+// underlying media has persisted the information, nor that any information
+// is committed to hardware. Clients may use `Sync` to ensure ordering
+// between operations.
+//
+// This method does not require any rights.
+func (p *NodeWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) {
+ var req_ _bindings.Message
+ resp_ := &nodeWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NodeSyncOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Node defines the minimal protocol for entities which can be accessed
+// in a filesystem.
+type NodeWithCtx interface {
+ // Creates another connection to the same node.
+ //
+ // + `options` options applicable to both `Open` and `Reopen`,
+ // including negotiating protocol and restricting rights.
+ // See [`fuchsia.io2/ConnectionOptions`].
+ // + `object_request` is the server end of a channel created for the new
+ // connection. The caller may proceed to send messages on the
+ // corresponding client end right away.
+ //
+ // For files, the cloned connection and the original connection have
+ // independent seek offsets.
+ Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error
+ // Terminates the connection to the node.
+ //
+ // After calling `Close`, the client must not send any other requests.
+ // The result of `Close` arrives as an epitaph, where the channel is closed
+ // by the server upon processing this operation.
+ //
+ // Closing the client end of the channel should be semantically equivalent
+ // to calling `Close` without monitoring the status epitaph.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) error
+ // Returns extra connection information and auxiliary handles.
+ //
+ // + `query` specifies the fields in `ConnectionInfo` that the caller is
+ // interested in.
+ // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ //
+ // When all known bits in `query` are set, the return value matches
+ // the one from [`OnConnectionInfo`], as if the caller requested that event
+ // using [`ConnectionFlags.GET_CONNECTION_INFO`].
+ //
+ // If the `Describe` operation fails, the connection is closed with the
+ // associated error.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error)
+ // An event produced eagerly by the server if requested by
+ // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+ // first message from the server, and is sent exactly once.
+ //
+ // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ // All members should be present.
+ //
+ // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+ // always manifested as an epitaph.
+ // Acquires a token which can be used to identify this connection at
+ // a later point in time.
+ //
+ // This method does not require any rights. Note that the token identifies
+ // the connection, hence carries the rights information on this connection.
+ GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error)
+ // Acquires information about the node.
+ //
+ // The attributes of a node should be stable, independent of the
+ // specific protocol used to access it.
+ //
+ // + `query` a bit-mask specifying which attributes to fetch. The server
+ // should not return more than necessary.
+ // - `attributes` the returned attributes.
+ //
+ // This method requires the [`Rights.GET_ATTRIBUTES`] right.
+ GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error)
+ // Updates information about the node.
+ //
+ // + `attributes` the presence of a table field in `attributes` indicates
+ // the intent to update the corresponding attribute.
+ //
+ // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+ UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error)
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method will return when the filesystem server has flushed the
+ // relevant updates to the underlying media, but does not guarantee the
+ // underlying media has persisted the information, nor that any information
+ // is committed to hardware. Clients may use `Sync` to ensure ordering
+ // between operations.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (NodeSyncResult, error)
+}
+
+type NodeWithCtxTransitionalBase struct{}
+
+type NodeWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewNodeWithCtxInterfaceRequest() (NodeWithCtxInterfaceRequest, *NodeWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return NodeWithCtxInterfaceRequest(req), (*NodeWithCtxInterface)(cli), err
+}
+
+type NodeWithCtxStub struct {
+ Impl NodeWithCtx
+}
+
+func (s_ *NodeWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case NodeReopenOrdinal:
+ in_ := nodeWithCtxReopenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest)
+ return nil, false, err_
+ case NodeCloseOrdinal:
+ err_ := s_.Impl.Close(args_.Ctx)
+ return nil, false, err_
+ case NodeDescribeOrdinal:
+ in_ := nodeWithCtxDescribeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query)
+ out_ := nodeWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case NodeGetTokenOrdinal:
+ result, err_ := s_.Impl.GetToken(args_.Ctx)
+ out_ := nodeWithCtxGetTokenResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case NodeGetAttributesOrdinal:
+ in_ := nodeWithCtxGetAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query)
+ out_ := nodeWithCtxGetAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case NodeUpdateAttributesOrdinal:
+ in_ := nodeWithCtxUpdateAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes)
+ out_ := nodeWithCtxUpdateAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case NodeSyncOrdinal:
+ result, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := nodeWithCtxSyncResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type NodeEventProxy _bindings.ChannelProxy
+
+func (p *NodeEventProxy) OnConnectionInfo(info ConnectionInfo) error {
+ event_ := &nodeWithCtxOnConnectionInfoResponse{
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(NodeOnConnectionInfoOrdinal, event_)
+}
+
+const (
+ PipeReopenOrdinal uint64 = 0x74170eb73121c69f
+ PipeCloseOrdinal uint64 = 0x2dec2818386e5d68
+ PipeDescribeOrdinal uint64 = 0x4aac591060c65c2f
+ PipeOnConnectionInfoOrdinal uint64 = 0x6637fc43ceeaa437
+ PipeGetTokenOrdinal uint64 = 0x4f2b25c934c5d8e4
+ PipeGetAttributesOrdinal uint64 = 0x675e1e73d076d1e4
+ PipeUpdateAttributesOrdinal uint64 = 0x7d59d73f59ba21b5
+ PipeSyncOrdinal uint64 = 0xac3a8c1a2e063ad
+)
+
+type PipeWithCtxInterface _bindings.ChannelProxy
+
+// Creates another connection to the same node.
+//
+// + `options` options applicable to both `Open` and `Reopen`,
+// including negotiating protocol and restricting rights.
+// See [`fuchsia.io2/ConnectionOptions`].
+// + `object_request` is the server end of a channel created for the new
+// connection. The caller may proceed to send messages on the
+// corresponding client end right away.
+//
+// For files, the cloned connection and the original connection have
+// independent seek offsets.
+func (p *PipeWithCtxInterface) Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error {
+ req_ := &pipeWithCtxReopenRequest{
+ Options: options,
+ ObjectRequest: objectRequest,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(PipeReopenOrdinal, req_)
+ return err_
+}
+
+// Terminates the connection to the node.
+//
+// After calling `Close`, the client must not send any other requests.
+// The result of `Close` arrives as an epitaph, where the channel is closed
+// by the server upon processing this operation.
+//
+// Closing the client end of the channel should be semantically equivalent
+// to calling `Close` without monitoring the status epitaph.
+//
+// This method does not require any rights.
+func (p *PipeWithCtxInterface) Close(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(PipeCloseOrdinal, req_)
+ return err_
+}
+
+// Returns extra connection information and auxiliary handles.
+//
+// + `query` specifies the fields in `ConnectionInfo` that the caller is
+// interested in.
+// - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+//
+// When all known bits in `query` are set, the return value matches
+// the one from [`OnConnectionInfo`], as if the caller requested that event
+// using [`ConnectionFlags.GET_CONNECTION_INFO`].
+//
+// If the `Describe` operation fails, the connection is closed with the
+// associated error.
+//
+// This method does not require any rights.
+func (p *PipeWithCtxInterface) Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error) {
+ req_ := &pipeWithCtxDescribeRequest{
+ Query: query,
+ }
+ resp_ := &pipeWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by the server if requested by
+// [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+// first message from the server, and is sent exactly once.
+//
+// - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+// All members should be present.
+//
+// Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+// always manifested as an epitaph.
+func (p *PipeWithCtxInterface) ExpectOnConnectionInfo(ctx_ _bindings.Context) (ConnectionInfo, error) {
+ resp_ := &pipeWithCtxOnConnectionInfoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(PipeOnConnectionInfoOrdinal, resp_)
+ return resp_.Info, err_
+}
+
+// Acquires a token which can be used to identify this connection at
+// a later point in time.
+//
+// This method does not require any rights. Note that the token identifies
+// the connection, hence carries the rights information on this connection.
+func (p *PipeWithCtxInterface) GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error) {
+ var req_ _bindings.Message
+ resp_ := &pipeWithCtxGetTokenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeGetTokenOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Acquires information about the node.
+//
+// The attributes of a node should be stable, independent of the
+// specific protocol used to access it.
+//
+// + `query` a bit-mask specifying which attributes to fetch. The server
+// should not return more than necessary.
+// - `attributes` the returned attributes.
+//
+// This method requires the [`Rights.GET_ATTRIBUTES`] right.
+func (p *PipeWithCtxInterface) GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error) {
+ req_ := &pipeWithCtxGetAttributesRequest{
+ Query: query,
+ }
+ resp_ := &pipeWithCtxGetAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeGetAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Updates information about the node.
+//
+// + `attributes` the presence of a table field in `attributes` indicates
+// the intent to update the corresponding attribute.
+//
+// This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+func (p *PipeWithCtxInterface) UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error) {
+ req_ := &pipeWithCtxUpdateAttributesRequest{
+ Attributes: attributes,
+ }
+ resp_ := &pipeWithCtxUpdateAttributesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeUpdateAttributesOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method will return when the filesystem server has flushed the
+// relevant updates to the underlying media, but does not guarantee the
+// underlying media has persisted the information, nor that any information
+// is committed to hardware. Clients may use `Sync` to ensure ordering
+// between operations.
+//
+// This method does not require any rights.
+func (p *PipeWithCtxInterface) Sync(ctx_ _bindings.Context) (NodeSyncResult, error) {
+ var req_ _bindings.Message
+ resp_ := &pipeWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(PipeSyncOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// A node for streaming unstructured data.
+// No pipe-specific methods are provided by this protocol. The client should
+// access the pipe via the socket object returned from the `PipeInfo` member
+// in [`fuchsia.io2/Representation`].
+type PipeWithCtx interface {
+ // Creates another connection to the same node.
+ //
+ // + `options` options applicable to both `Open` and `Reopen`,
+ // including negotiating protocol and restricting rights.
+ // See [`fuchsia.io2/ConnectionOptions`].
+ // + `object_request` is the server end of a channel created for the new
+ // connection. The caller may proceed to send messages on the
+ // corresponding client end right away.
+ //
+ // For files, the cloned connection and the original connection have
+ // independent seek offsets.
+ Reopen(ctx_ _bindings.Context, options ConnectionOptions, objectRequest _zx.Channel) error
+ // Terminates the connection to the node.
+ //
+ // After calling `Close`, the client must not send any other requests.
+ // The result of `Close` arrives as an epitaph, where the channel is closed
+ // by the server upon processing this operation.
+ //
+ // Closing the client end of the channel should be semantically equivalent
+ // to calling `Close` without monitoring the status epitaph.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) error
+ // Returns extra connection information and auxiliary handles.
+ //
+ // + `query` specifies the fields in `ConnectionInfo` that the caller is
+ // interested in.
+ // - `info` see [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ //
+ // When all known bits in `query` are set, the return value matches
+ // the one from [`OnConnectionInfo`], as if the caller requested that event
+ // using [`ConnectionFlags.GET_CONNECTION_INFO`].
+ //
+ // If the `Describe` operation fails, the connection is closed with the
+ // associated error.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context, query ConnectionInfoQuery) (ConnectionInfo, error)
+ // An event produced eagerly by the server if requested by
+ // [`ConnectionFlags.GET_CONNECTION_INFO`]. This event will be the
+ // first message from the server, and is sent exactly once.
+ //
+ // - `info` See [`fuchsia.io2/ConnectionInfo`] for details on the fields.
+ // All members should be present.
+ //
+ // Different from [`fuchsia.io/OnOpen`], an error during open/reopen is
+ // always manifested as an epitaph.
+ // Acquires a token which can be used to identify this connection at
+ // a later point in time.
+ //
+ // This method does not require any rights. Note that the token identifies
+ // the connection, hence carries the rights information on this connection.
+ GetToken(ctx_ _bindings.Context) (NodeGetTokenResult, error)
+ // Acquires information about the node.
+ //
+ // The attributes of a node should be stable, independent of the
+ // specific protocol used to access it.
+ //
+ // + `query` a bit-mask specifying which attributes to fetch. The server
+ // should not return more than necessary.
+ // - `attributes` the returned attributes.
+ //
+ // This method requires the [`Rights.GET_ATTRIBUTES`] right.
+ GetAttributes(ctx_ _bindings.Context, query NodeAttributesQuery) (NodeGetAttributesResult, error)
+ // Updates information about the node.
+ //
+ // + `attributes` the presence of a table field in `attributes` indicates
+ // the intent to update the corresponding attribute.
+ //
+ // This method requires the [`Rights.UPDATE_ATTRIBUTES`] right.
+ UpdateAttributes(ctx_ _bindings.Context, attributes NodeAttributes) (NodeUpdateAttributesResult, error)
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method will return when the filesystem server has flushed the
+ // relevant updates to the underlying media, but does not guarantee the
+ // underlying media has persisted the information, nor that any information
+ // is committed to hardware. Clients may use `Sync` to ensure ordering
+ // between operations.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (NodeSyncResult, error)
+}
+
+type PipeWithCtxTransitionalBase struct{}
+
+type PipeWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewPipeWithCtxInterfaceRequest() (PipeWithCtxInterfaceRequest, *PipeWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return PipeWithCtxInterfaceRequest(req), (*PipeWithCtxInterface)(cli), err
+}
+
+type PipeWithCtxStub struct {
+ Impl PipeWithCtx
+}
+
+func (s_ *PipeWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case PipeReopenOrdinal:
+ in_ := pipeWithCtxReopenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Reopen(args_.Ctx, in_.Options, in_.ObjectRequest)
+ return nil, false, err_
+ case PipeCloseOrdinal:
+ err_ := s_.Impl.Close(args_.Ctx)
+ return nil, false, err_
+ case PipeDescribeOrdinal:
+ in_ := pipeWithCtxDescribeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ info, err_ := s_.Impl.Describe(args_.Ctx, in_.Query)
+ out_ := pipeWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case PipeGetTokenOrdinal:
+ result, err_ := s_.Impl.GetToken(args_.Ctx)
+ out_ := pipeWithCtxGetTokenResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case PipeGetAttributesOrdinal:
+ in_ := pipeWithCtxGetAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetAttributes(args_.Ctx, in_.Query)
+ out_ := pipeWithCtxGetAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case PipeUpdateAttributesOrdinal:
+ in_ := pipeWithCtxUpdateAttributesRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.UpdateAttributes(args_.Ctx, in_.Attributes)
+ out_ := pipeWithCtxUpdateAttributesResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case PipeSyncOrdinal:
+ result, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := pipeWithCtxSyncResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type PipeEventProxy _bindings.ChannelProxy
+
+func (p *PipeEventProxy) OnConnectionInfo(info ConnectionInfo) error {
+ event_ := &pipeWithCtxOnConnectionInfoResponse{
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(PipeOnConnectionInfoOrdinal, event_)
+}
diff --git a/src/syscall/zx/logger/impl.go b/src/syscall/zx/logger/impl.go
new file mode 100644
index 0000000..c64e7af
--- /dev/null
+++ b/src/syscall/zx/logger/impl.go
@@ -0,0 +1,867 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package logger
+
+import (
+ _zx "syscall/zx"
+ fuchsiadiagnostics "syscall/zx/diagnostics"
+ _bindings "syscall/zx/fidl"
+)
+
+const (
+ // The interval between discrete log severity levels
+ LogSeverityStepSize uint8 = 16
+ // Maximum available log severity.
+ LogSeverityMaxStep uint8 = 6
+ // The interval between discrete log verbosity levels
+ LogVerbosityStepSize uint8 = 1
+ // Default log level used to initialize loggers.
+ LogLevelDefault uint8 = 48
+ // Max number of tags that can be passed to filter by listener.
+ MaxTags uint8 = 8
+ // Max tag length that can be passed to filter by listener.
+ MaxTagLenBytes uint8 = 63
+ // A placeholder tag which indicates to a `LogSink` that the tag should be replaced with
+ // the actual name of the logging component. If that name is unavailable, `LogSink`
+ // implementations should replace this value with `UNKNOWN`.
+ ComponentNamePlaceholderTag string = "COMPONENT_NAME"
+ // Max number of LogInterestSelectors that can be specified via a listener.
+ MaxLogSelectors uint8 = 5
+ // Max tags that will be attached to a LogMessage.
+ MaxTagsPerLogMessage uint8 = 5
+ // Max byte size for message payload.
+ MaxDatagramLenBytes uint32 = 32768
+ // Max log bytes per call to a listener.
+ MaxLogManySizeBytes uint64 = 16384
+)
+
+var _ _bindings.Enum = LogLevelFilter(0)
+
+// Log levels used with log related filtering.
+// Filtering uses a heuristic based on a threshold of
+// minimum severity level - with any log equal to or
+// greater than the threshold being included in the
+// printable logs.
+type LogLevelFilter int8
+
+const (
+ LogLevelFilterDeprecatedNone LogLevelFilter = -1
+ LogLevelFilterDeprecatedInfo LogLevelFilter = 0
+ LogLevelFilterDeprecatedWarn LogLevelFilter = 1
+ LogLevelFilterDeprecatedError LogLevelFilter = 2
+ LogLevelFilterDeprecatedFatal LogLevelFilter = 3
+ LogLevelFilterAll LogLevelFilter = -127
+ LogLevelFilterTrace LogLevelFilter = 16
+ LogLevelFilterDebug LogLevelFilter = 32
+ LogLevelFilterInfo LogLevelFilter = 48
+ LogLevelFilterWarn LogLevelFilter = 64
+ LogLevelFilterError LogLevelFilter = 80
+ LogLevelFilterFatal LogLevelFilter = 96
+ LogLevelFilterNone LogLevelFilter = 127
+)
+
+func (_ LogLevelFilter) I_EnumValues() []LogLevelFilter {
+ return []LogLevelFilter{
+ LogLevelFilterDeprecatedNone,
+ LogLevelFilterDeprecatedInfo,
+ LogLevelFilterDeprecatedWarn,
+ LogLevelFilterDeprecatedError,
+ LogLevelFilterDeprecatedFatal,
+ LogLevelFilterAll,
+ LogLevelFilterTrace,
+ LogLevelFilterDebug,
+ LogLevelFilterInfo,
+ LogLevelFilterWarn,
+ LogLevelFilterError,
+ LogLevelFilterFatal,
+ LogLevelFilterNone,
+ }
+}
+
+func (_ LogLevelFilter) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x LogLevelFilter) IsUnknown() bool {
+ switch x {
+ case -1:
+ return true
+ case 0:
+ return true
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ case -127:
+ return true
+ case 16:
+ return true
+ case 32:
+ return true
+ case 48:
+ return true
+ case 64:
+ return true
+ case 80:
+ return true
+ case 96:
+ return true
+ case 127:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x LogLevelFilter) String() string {
+ switch x {
+ case -1:
+ return "DeprecatedNone"
+ case 0:
+ return "DeprecatedInfo"
+ case 1:
+ return "DeprecatedWarn"
+ case 2:
+ return "DeprecatedError"
+ case 3:
+ return "DeprecatedFatal"
+ case -127:
+ return "All"
+ case 16:
+ return "Trace"
+ case 32:
+ return "Debug"
+ case 48:
+ return "Info"
+ case 64:
+ return "Warn"
+ case 80:
+ return "Error"
+ case 96:
+ return "Fatal"
+ case 127:
+ return "None"
+ }
+ return "Unknown"
+}
+
+type LogFilterOptions struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"56" fidl_alignment_v1:"8"`
+ FilterByPid bool `fidl_offset_v1:"0"`
+ Pid uint64 `fidl_offset_v1:"8"`
+ FilterByTid bool `fidl_offset_v1:"16"`
+ Tid uint64 `fidl_offset_v1:"24"`
+ // If more than zero, logs would be filtered based on verbosity and
+ // `min_severity` would be ignored.
+ Verbosity uint8 `fidl_offset_v1:"32"`
+ // Severity used as threshold to determine logging level.
+ MinSeverity LogLevelFilter `fidl_offset_v1:"33"`
+ // If non-empty, return all messages which contain at least one specified
+ // tag. If empty, messages will not be filtered by tag.
+ // Passed tags should not be more than `MAX_TAG_LEN_BYTES` bytes in length
+ // and max tags can be `MAX_TAGS`.
+ // Listener would be discarded if the limit is not followed.
+ Tags []string `fidl_offset_v1:"40" fidl_bounds:"8,63"`
+}
+
+var _mLogFilterOptions = _bindings.CreateLazyMarshaler(LogFilterOptions{})
+
+func (msg *LogFilterOptions) Marshaler() _bindings.Marshaler {
+ return _mLogFilterOptions
+}
+
+// Conveyance to couple a specified Interest with it's designated target,
+// specified via a ComponentSelector.
+type LogInterestSelector struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ Selector fuchsiadiagnostics.ComponentSelector `fidl_offset_v1:"0"`
+ Interest fuchsiadiagnostics.Interest `fidl_offset_v1:"16"`
+}
+
+var _mLogInterestSelector = _bindings.CreateLazyMarshaler(LogInterestSelector{})
+
+func (msg *LogInterestSelector) Marshaler() _bindings.Marshaler {
+ return _mLogInterestSelector
+}
+
+type LogMessage struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Pid uint64 `fidl_offset_v1:"0"`
+ Tid uint64 `fidl_offset_v1:"8"`
+ // https://fuchsia.dev/fuchsia-src/reference/syscalls/clock_get_monotonic.md
+ Time int64 `fidl_offset_v1:"16"`
+ Severity int32 `fidl_offset_v1:"24"`
+ // See //zircon/system/ulib/syslog/include/lib/syslog/wire_format.h. As messages
+ // can be served out of order, this should only be logged if more than last
+ // count.
+ DroppedLogs uint32 `fidl_offset_v1:"28"`
+ Tags []string `fidl_offset_v1:"32" fidl_bounds:"5,63"`
+ Msg string `fidl_offset_v1:"48" fidl_bounds:"32768"`
+}
+
+var _mLogMessage = _bindings.CreateLazyMarshaler(LogMessage{})
+
+func (msg *LogMessage) Marshaler() _bindings.Marshaler {
+ return _mLogMessage
+}
+
+type logWithCtxListenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ LogListener LogListenerWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+ Options *LogFilterOptions `fidl_offset_v1:"8"`
+}
+
+var _mlogWithCtxListenRequest = _bindings.CreateLazyMarshaler(logWithCtxListenRequest{})
+
+func (msg *logWithCtxListenRequest) Marshaler() _bindings.Marshaler {
+ return _mlogWithCtxListenRequest
+}
+
+type logWithCtxDumpLogsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ LogListener LogListenerWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+ Options *LogFilterOptions `fidl_offset_v1:"8"`
+}
+
+var _mlogWithCtxDumpLogsRequest = _bindings.CreateLazyMarshaler(logWithCtxDumpLogsRequest{})
+
+func (msg *logWithCtxDumpLogsRequest) Marshaler() _bindings.Marshaler {
+ return _mlogWithCtxDumpLogsRequest
+}
+
+type logWithCtxListenSafeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ LogListener LogListenerSafeWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+ Options *LogFilterOptions `fidl_offset_v1:"8"`
+}
+
+var _mlogWithCtxListenSafeRequest = _bindings.CreateLazyMarshaler(logWithCtxListenSafeRequest{})
+
+func (msg *logWithCtxListenSafeRequest) Marshaler() _bindings.Marshaler {
+ return _mlogWithCtxListenSafeRequest
+}
+
+type logWithCtxDumpLogsSafeRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ LogListener LogListenerSafeWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+ Options *LogFilterOptions `fidl_offset_v1:"8"`
+}
+
+var _mlogWithCtxDumpLogsSafeRequest = _bindings.CreateLazyMarshaler(logWithCtxDumpLogsSafeRequest{})
+
+func (msg *logWithCtxDumpLogsSafeRequest) Marshaler() _bindings.Marshaler {
+ return _mlogWithCtxDumpLogsSafeRequest
+}
+
+type logWithCtxListenSafeWithSelectorsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ LogListener LogListenerSafeWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+ Options *LogFilterOptions `fidl_offset_v1:"8"`
+ Selectors []LogInterestSelector `fidl_offset_v1:"16" fidl_bounds:"5"`
+}
+
+var _mlogWithCtxListenSafeWithSelectorsRequest = _bindings.CreateLazyMarshaler(logWithCtxListenSafeWithSelectorsRequest{})
+
+func (msg *logWithCtxListenSafeWithSelectorsRequest) Marshaler() _bindings.Marshaler {
+ return _mlogWithCtxListenSafeWithSelectorsRequest
+}
+
+type logSinkWithCtxConnectRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Socket _zx.Socket `fidl_offset_v1:"0" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mlogSinkWithCtxConnectRequest = _bindings.CreateLazyMarshaler(logSinkWithCtxConnectRequest{})
+
+func (msg *logSinkWithCtxConnectRequest) Marshaler() _bindings.Marshaler {
+ return _mlogSinkWithCtxConnectRequest
+}
+
+type logSinkWithCtxConnectStructuredRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Socket _zx.Socket `fidl_offset_v1:"0" fidl_handle_subtype:"14" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+}
+
+var _mlogSinkWithCtxConnectStructuredRequest = _bindings.CreateLazyMarshaler(logSinkWithCtxConnectStructuredRequest{})
+
+func (msg *logSinkWithCtxConnectStructuredRequest) Marshaler() _bindings.Marshaler {
+ return _mlogSinkWithCtxConnectStructuredRequest
+}
+
+type logSinkWithCtxOnRegisterInterestResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Interest fuchsiadiagnostics.Interest `fidl_offset_v1:"0"`
+}
+
+var _mlogSinkWithCtxOnRegisterInterestResponse = _bindings.CreateLazyMarshaler(logSinkWithCtxOnRegisterInterestResponse{})
+
+func (msg *logSinkWithCtxOnRegisterInterestResponse) Marshaler() _bindings.Marshaler {
+ return _mlogSinkWithCtxOnRegisterInterestResponse
+}
+
+type logSinkWithCtxOnInterestChangedResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Interest fuchsiadiagnostics.Interest `fidl_offset_v1:"0"`
+}
+
+var _mlogSinkWithCtxOnInterestChangedResponse = _bindings.CreateLazyMarshaler(logSinkWithCtxOnInterestChangedResponse{})
+
+func (msg *logSinkWithCtxOnInterestChangedResponse) Marshaler() _bindings.Marshaler {
+ return _mlogSinkWithCtxOnInterestChangedResponse
+}
+
+type logListenerWithCtxLogRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Log LogMessage `fidl_offset_v1:"0"`
+}
+
+var _mlogListenerWithCtxLogRequest = _bindings.CreateLazyMarshaler(logListenerWithCtxLogRequest{})
+
+func (msg *logListenerWithCtxLogRequest) Marshaler() _bindings.Marshaler {
+ return _mlogListenerWithCtxLogRequest
+}
+
+type logListenerWithCtxLogManyRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Log []LogMessage `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mlogListenerWithCtxLogManyRequest = _bindings.CreateLazyMarshaler(logListenerWithCtxLogManyRequest{})
+
+func (msg *logListenerWithCtxLogManyRequest) Marshaler() _bindings.Marshaler {
+ return _mlogListenerWithCtxLogManyRequest
+}
+
+type logListenerSafeWithCtxLogRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Log LogMessage `fidl_offset_v1:"0"`
+}
+
+var _mlogListenerSafeWithCtxLogRequest = _bindings.CreateLazyMarshaler(logListenerSafeWithCtxLogRequest{})
+
+func (msg *logListenerSafeWithCtxLogRequest) Marshaler() _bindings.Marshaler {
+ return _mlogListenerSafeWithCtxLogRequest
+}
+
+type logListenerSafeWithCtxLogManyRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Log []LogMessage `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mlogListenerSafeWithCtxLogManyRequest = _bindings.CreateLazyMarshaler(logListenerSafeWithCtxLogManyRequest{})
+
+func (msg *logListenerSafeWithCtxLogManyRequest) Marshaler() _bindings.Marshaler {
+ return _mlogListenerSafeWithCtxLogManyRequest
+}
+
+const (
+ LogListenOrdinal uint64 = 0x4813203a753ef858
+ LogDumpLogsOrdinal uint64 = 0x4ec997e714d1bcda
+ LogListenSafeOrdinal uint64 = 0x4e523b04952a61b1
+ LogDumpLogsSafeOrdinal uint64 = 0x14e39f9cada72519
+ LogListenSafeWithSelectorsOrdinal uint64 = 0x1b365178771a007e
+)
+
+type LogWithCtxInterface _bindings.ChannelProxy
+
+func (p *LogWithCtxInterface) Listen(ctx_ _bindings.Context, logListener LogListenerWithCtxInterface, options *LogFilterOptions) error {
+ req_ := &logWithCtxListenRequest{
+ LogListener: logListener,
+ Options: options,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogListenOrdinal, req_)
+ return err_
+}
+
+func (p *LogWithCtxInterface) DumpLogs(ctx_ _bindings.Context, logListener LogListenerWithCtxInterface, options *LogFilterOptions) error {
+ req_ := &logWithCtxDumpLogsRequest{
+ LogListener: logListener,
+ Options: options,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogDumpLogsOrdinal, req_)
+ return err_
+}
+
+// Dumps all cached logs by calling LogMany() in batches followed by Log() for each new log
+// message.
+// A null `options` indicates no filtering is requested.
+func (p *LogWithCtxInterface) ListenSafe(ctx_ _bindings.Context, logListener LogListenerSafeWithCtxInterface, options *LogFilterOptions) error {
+ req_ := &logWithCtxListenSafeRequest{
+ LogListener: logListener,
+ Options: options,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogListenSafeOrdinal, req_)
+ return err_
+}
+
+// Dumps all cached logs by calling LogMany() followed by Done() on `log_listener`.
+// A null `options` indicates no filtering is requested.
+func (p *LogWithCtxInterface) DumpLogsSafe(ctx_ _bindings.Context, logListener LogListenerSafeWithCtxInterface, options *LogFilterOptions) error {
+ req_ := &logWithCtxDumpLogsSafeRequest{
+ LogListener: logListener,
+ Options: options,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogDumpLogsSafeOrdinal, req_)
+ return err_
+}
+
+// Listens to new log entries by calling Log() on `log_listener`.
+// A null `options` indicates no filtering is requested.
+func (p *LogWithCtxInterface) ListenSafeWithSelectors(ctx_ _bindings.Context, logListener LogListenerSafeWithCtxInterface, options *LogFilterOptions, selectors []LogInterestSelector) error {
+ req_ := &logWithCtxListenSafeWithSelectorsRequest{
+ LogListener: logListener,
+ Options: options,
+ Selectors: selectors,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogListenSafeWithSelectorsOrdinal, req_)
+ return err_
+}
+
+// Interface for LogListenerSafe to register to listen to logs.
+type LogWithCtx interface {
+ Listen(ctx_ _bindings.Context, logListener LogListenerWithCtxInterface, options *LogFilterOptions) error
+ DumpLogs(ctx_ _bindings.Context, logListener LogListenerWithCtxInterface, options *LogFilterOptions) error
+ // Dumps all cached logs by calling LogMany() in batches followed by Log() for each new log
+ // message.
+ // A null `options` indicates no filtering is requested.
+ ListenSafe(ctx_ _bindings.Context, logListener LogListenerSafeWithCtxInterface, options *LogFilterOptions) error
+ // Dumps all cached logs by calling LogMany() followed by Done() on `log_listener`.
+ // A null `options` indicates no filtering is requested.
+ DumpLogsSafe(ctx_ _bindings.Context, logListener LogListenerSafeWithCtxInterface, options *LogFilterOptions) error
+ // Listens to new log entries by calling Log() on `log_listener`.
+ // A null `options` indicates no filtering is requested.
+ ListenSafeWithSelectors(ctx_ _bindings.Context, logListener LogListenerSafeWithCtxInterface, options *LogFilterOptions, selectors []LogInterestSelector) error
+}
+
+type LogWithCtxTransitionalBase struct{}
+
+func (_ *LogWithCtxTransitionalBase) ListenSafe(ctx_ _bindings.Context, logListener LogListenerSafeWithCtxInterface, options *LogFilterOptions) error {
+ panic("Not Implemented")
+}
+func (_ *LogWithCtxTransitionalBase) DumpLogsSafe(ctx_ _bindings.Context, logListener LogListenerSafeWithCtxInterface, options *LogFilterOptions) error {
+ panic("Not Implemented")
+}
+func (_ *LogWithCtxTransitionalBase) ListenSafeWithSelectors(ctx_ _bindings.Context, logListener LogListenerSafeWithCtxInterface, options *LogFilterOptions, selectors []LogInterestSelector) error {
+ panic("Not Implemented")
+}
+
+type LogWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewLogWithCtxInterfaceRequest() (LogWithCtxInterfaceRequest, *LogWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return LogWithCtxInterfaceRequest(req), (*LogWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ LogWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.logger.Log"
+}
+func (c LogWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const LogName = "fuchsia.logger.Log"
+
+type LogWithCtxStub struct {
+ Impl LogWithCtx
+}
+
+func (s_ *LogWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case LogListenOrdinal:
+ in_ := logWithCtxListenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Listen(args_.Ctx, in_.LogListener, in_.Options)
+ return nil, false, err_
+ case LogDumpLogsOrdinal:
+ in_ := logWithCtxDumpLogsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.DumpLogs(args_.Ctx, in_.LogListener, in_.Options)
+ return nil, false, err_
+ case LogListenSafeOrdinal:
+ in_ := logWithCtxListenSafeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.ListenSafe(args_.Ctx, in_.LogListener, in_.Options)
+ return nil, false, err_
+ case LogDumpLogsSafeOrdinal:
+ in_ := logWithCtxDumpLogsSafeRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.DumpLogsSafe(args_.Ctx, in_.LogListener, in_.Options)
+ return nil, false, err_
+ case LogListenSafeWithSelectorsOrdinal:
+ in_ := logWithCtxListenSafeWithSelectorsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.ListenSafeWithSelectors(args_.Ctx, in_.LogListener, in_.Options, in_.Selectors)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type LogEventProxy _bindings.ChannelProxy
+
+const (
+ LogSinkConnectOrdinal uint64 = 0x64cc4b58ae95c61b
+ LogSinkConnectStructuredOrdinal uint64 = 0x635424b504b2a74c
+ LogSinkOnRegisterInterestOrdinal uint64 = 0x1d63381c1eedaab7
+ LogSinkOnInterestChangedOrdinal uint64 = 0x66fd34c652fef3e
+)
+
+type LogSinkWithCtxInterface _bindings.ChannelProxy
+
+// Send this socket to be drained.
+//
+// See //zircon/system/ulib/syslog/include/lib/syslog/wire_format.h for what is expected to be
+// received over the socket.
+func (p *LogSinkWithCtxInterface) Connect(ctx_ _bindings.Context, socket _zx.Socket) error {
+ req_ := &logSinkWithCtxConnectRequest{
+ Socket: socket,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogSinkConnectOrdinal, req_)
+ return err_
+}
+
+// Send this socket to be drained, using the structured logs format.
+//
+// See //docs/reference/diagnostics/logs/encoding.md for what is expected to be recieved over
+// the socket.
+func (p *LogSinkWithCtxInterface) ConnectStructured(ctx_ _bindings.Context, socket _zx.Socket) error {
+ req_ := &logSinkWithCtxConnectStructuredRequest{
+ Socket: socket,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogSinkConnectStructuredOrdinal, req_)
+ return err_
+}
+
+// LogSink implementers emit this event whenever the scope of their
+// interest changes. Clients are expected to emit messages based on
+// the registered Interest. In the event that an empty interest is
+// conveyed, clients should emit messages based on their default
+// (compile time) configuration.
+func (p *LogSinkWithCtxInterface) ExpectOnRegisterInterest(ctx_ _bindings.Context) (fuchsiadiagnostics.Interest, error) {
+ resp_ := &logSinkWithCtxOnRegisterInterestResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(LogSinkOnRegisterInterestOrdinal, resp_)
+ return resp_.Interest, err_
+}
+
+// Use OnRegisterInterest instead.
+func (p *LogSinkWithCtxInterface) ExpectOnInterestChanged(ctx_ _bindings.Context) (fuchsiadiagnostics.Interest, error) {
+ resp_ := &logSinkWithCtxOnInterestChangedResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(LogSinkOnInterestChangedOrdinal, resp_)
+ return resp_.Interest, err_
+}
+
+// Drains a program's logs.
+type LogSinkWithCtx interface {
+ // Send this socket to be drained.
+ //
+ // See //zircon/system/ulib/syslog/include/lib/syslog/wire_format.h for what is expected to be
+ // received over the socket.
+ Connect(ctx_ _bindings.Context, socket _zx.Socket) error
+ // Send this socket to be drained, using the structured logs format.
+ //
+ // See //docs/reference/diagnostics/logs/encoding.md for what is expected to be recieved over
+ // the socket.
+ ConnectStructured(ctx_ _bindings.Context, socket _zx.Socket) error
+ // LogSink implementers emit this event whenever the scope of their
+ // interest changes. Clients are expected to emit messages based on
+ // the registered Interest. In the event that an empty interest is
+ // conveyed, clients should emit messages based on their default
+ // (compile time) configuration.
+ // Use OnRegisterInterest instead.
+}
+
+type LogSinkWithCtxTransitionalBase struct{}
+
+func (_ *LogSinkWithCtxTransitionalBase) ConnectStructured(ctx_ _bindings.Context, socket _zx.Socket) error {
+ panic("Not Implemented")
+}
+
+type LogSinkWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewLogSinkWithCtxInterfaceRequest() (LogSinkWithCtxInterfaceRequest, *LogSinkWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return LogSinkWithCtxInterfaceRequest(req), (*LogSinkWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ LogSinkWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.logger.LogSink"
+}
+func (c LogSinkWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const LogSinkName = "fuchsia.logger.LogSink"
+
+type LogSinkWithCtxStub struct {
+ Impl LogSinkWithCtx
+}
+
+func (s_ *LogSinkWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case LogSinkConnectOrdinal:
+ in_ := logSinkWithCtxConnectRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Connect(args_.Ctx, in_.Socket)
+ return nil, false, err_
+ case LogSinkConnectStructuredOrdinal:
+ in_ := logSinkWithCtxConnectStructuredRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.ConnectStructured(args_.Ctx, in_.Socket)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type LogSinkEventProxy _bindings.ChannelProxy
+
+func (p *LogSinkEventProxy) OnRegisterInterest(interest fuchsiadiagnostics.Interest) error {
+ event_ := &logSinkWithCtxOnRegisterInterestResponse{
+ Interest: interest,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(LogSinkOnRegisterInterestOrdinal, event_)
+}
+func (p *LogSinkEventProxy) OnInterestChanged(interest fuchsiadiagnostics.Interest) error {
+ event_ := &logSinkWithCtxOnInterestChangedResponse{
+ Interest: interest,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(LogSinkOnInterestChangedOrdinal, event_)
+}
+
+const (
+ LogListenerLogOrdinal uint64 = 0x427f2fe40ec94ab8
+ LogListenerLogManyOrdinal uint64 = 0x1834352f26b3e4ac
+ LogListenerDoneOrdinal uint64 = 0x613072ccb3e808da
+)
+
+type LogListenerWithCtxInterface _bindings.ChannelProxy
+
+func (p *LogListenerWithCtxInterface) Log(ctx_ _bindings.Context, log LogMessage) error {
+ req_ := &logListenerWithCtxLogRequest{
+ Log: log,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogListenerLogOrdinal, req_)
+ return err_
+}
+
+func (p *LogListenerWithCtxInterface) LogMany(ctx_ _bindings.Context, log []LogMessage) error {
+ req_ := &logListenerWithCtxLogManyRequest{
+ Log: log,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogListenerLogManyOrdinal, req_)
+ return err_
+}
+
+func (p *LogListenerWithCtxInterface) Done(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogListenerDoneOrdinal, req_)
+ return err_
+}
+
+// Included temporarily for backwards compatiblity. Use `LogListenerSafe`.
+type LogListenerWithCtx interface {
+ Log(ctx_ _bindings.Context, log LogMessage) error
+ LogMany(ctx_ _bindings.Context, log []LogMessage) error
+ Done(ctx_ _bindings.Context) error
+}
+
+type LogListenerWithCtxTransitionalBase struct{}
+
+type LogListenerWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewLogListenerWithCtxInterfaceRequest() (LogListenerWithCtxInterfaceRequest, *LogListenerWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return LogListenerWithCtxInterfaceRequest(req), (*LogListenerWithCtxInterface)(cli), err
+}
+
+type LogListenerWithCtxStub struct {
+ Impl LogListenerWithCtx
+}
+
+func (s_ *LogListenerWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case LogListenerLogOrdinal:
+ in_ := logListenerWithCtxLogRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Log(args_.Ctx, in_.Log)
+ return nil, false, err_
+ case LogListenerLogManyOrdinal:
+ in_ := logListenerWithCtxLogManyRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.LogMany(args_.Ctx, in_.Log)
+ return nil, false, err_
+ case LogListenerDoneOrdinal:
+ err_ := s_.Impl.Done(args_.Ctx)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type LogListenerEventProxy _bindings.ChannelProxy
+
+const (
+ LogListenerSafeLogOrdinal uint64 = 0x51a39de355d5bd0a
+ LogListenerSafeLogManyOrdinal uint64 = 0x1f056431bcd626a
+ LogListenerSafeDoneOrdinal uint64 = 0x34986151fcb584b8
+)
+
+type LogListenerSafeWithCtxInterface _bindings.ChannelProxy
+
+// Called for single messages.
+//
+// The return value is used for flow control, and implementers should acknowledge receipt of
+// each message in order to continue receiving future messages.
+func (p *LogListenerSafeWithCtxInterface) Log(ctx_ _bindings.Context, log LogMessage) error {
+ req_ := &logListenerSafeWithCtxLogRequest{
+ Log: log,
+ }
+ var resp_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(LogListenerSafeLogOrdinal, req_, resp_)
+ return err_
+}
+
+// Called when serving cached logs.
+//
+// Max logs size per call is `MAX_LOG_MANY_SIZE_BYTES` bytes.
+//
+// The return value is used for flow control, and implementers should acknowledge receipt of
+// each batch in order to continue receiving future messages.
+func (p *LogListenerSafeWithCtxInterface) LogMany(ctx_ _bindings.Context, log []LogMessage) error {
+ req_ := &logListenerSafeWithCtxLogManyRequest{
+ Log: log,
+ }
+ var resp_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(LogListenerSafeLogManyOrdinal, req_, resp_)
+ return err_
+}
+
+// Called when this listener was passed to `DumpLogsSafe()` and all cached logs have been sent.
+func (p *LogListenerSafeWithCtxInterface) Done(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(LogListenerSafeDoneOrdinal, req_)
+ return err_
+}
+
+// A listener who will notify the `Log` of the receipt of each message.
+type LogListenerSafeWithCtx interface {
+ // Called for single messages.
+ //
+ // The return value is used for flow control, and implementers should acknowledge receipt of
+ // each message in order to continue receiving future messages.
+ Log(ctx_ _bindings.Context, log LogMessage) error
+ // Called when serving cached logs.
+ //
+ // Max logs size per call is `MAX_LOG_MANY_SIZE_BYTES` bytes.
+ //
+ // The return value is used for flow control, and implementers should acknowledge receipt of
+ // each batch in order to continue receiving future messages.
+ LogMany(ctx_ _bindings.Context, log []LogMessage) error
+ // Called when this listener was passed to `DumpLogsSafe()` and all cached logs have been sent.
+ Done(ctx_ _bindings.Context) error
+}
+
+type LogListenerSafeWithCtxTransitionalBase struct{}
+
+type LogListenerSafeWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewLogListenerSafeWithCtxInterfaceRequest() (LogListenerSafeWithCtxInterfaceRequest, *LogListenerSafeWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return LogListenerSafeWithCtxInterfaceRequest(req), (*LogListenerSafeWithCtxInterface)(cli), err
+}
+
+type LogListenerSafeWithCtxStub struct {
+ Impl LogListenerSafeWithCtx
+}
+
+func (s_ *LogListenerSafeWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case LogListenerSafeLogOrdinal:
+ in_ := logListenerSafeWithCtxLogRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Log(args_.Ctx, in_.Log)
+ return nil, true, err_
+ case LogListenerSafeLogManyOrdinal:
+ in_ := logListenerSafeWithCtxLogManyRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.LogMany(args_.Ctx, in_.Log)
+ return nil, true, err_
+ case LogListenerSafeDoneOrdinal:
+ err_ := s_.Impl.Done(args_.Ctx)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type LogListenerSafeEventProxy _bindings.ChannelProxy
diff --git a/src/syscall/zx/mem/impl.go b/src/syscall/zx/mem/impl.go
new file mode 100644
index 0000000..068dd87
--- /dev/null
+++ b/src/syscall/zx/mem/impl.go
@@ -0,0 +1,145 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package mem
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+)
+
+// A buffer for data whose size is not necessarily a multiple of the page
+// size.
+//
+// VMO objects have a physical size that is always a multiple of the page
+// size. As such, VMO alone cannot serve as a buffer for arbitrarly sized
+// data. `fuchsia.mem.Buffer` is a standard struct that aggregate the VMO
+// and its size.
+type Buffer struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ // The vmo that contains the buffer.
+ Vmo _zx.VMO `fidl_offset_v1:"0" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ // The number of bytes in the buffer.
+ //
+ // The content of the buffer begin at the start of the VMO and continue
+ // for `size` bytes. To specify a range of bytes that do not start at
+ // the beginning of the VMO, use `Range` rather than buffer.
+ //
+ // This size must not be greater than the physical size of the VMO.
+ Size uint64 `fidl_offset_v1:"8"`
+}
+
+var _mBuffer = _bindings.CreateLazyMarshaler(Buffer{})
+
+func (msg *Buffer) Marshaler() _bindings.Marshaler {
+ return _mBuffer
+}
+
+// A range of bytes within a VMO.
+type Range struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ // The vmo that contains the bytes.
+ Vmo _zx.VMO `fidl_offset_v1:"0" fidl_handle_subtype:"3" fidl_handle_rights:"2147483648" fidl_bounds:"0"`
+ // The offset of the first byte within the range relative to the start of
+ // the VMO.
+ //
+ // For example, if `offset` is zero, then the first byte in the range is
+ // the first byte in the VMO.
+ Offset uint64 `fidl_offset_v1:"8"`
+ // The number of bytes in the range.
+ //
+ // For example, if the offset is 3 and the size is 2, and the VMO starts
+ // with "abcdefg...", then the range contains "de".
+ //
+ // The sum of the offset and the size must not be greater than the
+ // physical size of the VMO.
+ Size uint64 `fidl_offset_v1:"16"`
+}
+
+var _mRange = _bindings.CreateLazyMarshaler(Range{})
+
+func (msg *Range) Marshaler() _bindings.Marshaler {
+ return _mRange
+}
+
+type I_dataTag uint64
+
+const (
+ Data_unknownData = 0 // 0x00000000
+ DataBytes = 1 // 0x00000001
+ DataBuffer = 2 // 0x00000002
+)
+
+// Binary data that might be stored inline or in a VMO.
+//
+// Useful for performance-sensitive protocols that sometimes receive small
+// amounts of binary data (i.e., which is more efficient to provide using
+// `bytes`) but also need to support arbitrary amounts of data (i.e., which
+// need to be provided out-of-line in a `Buffer`).
+type Data struct {
+ I_dataTag `fidl:"x" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ I_unknownData interface{}
+ // The binary data provided inline in the message.
+ Bytes []uint8 `fidl_bounds:"" fidl_ordinal:"1"`
+ // The binary data provided out-of-line in a `Buffer`.
+ Buffer Buffer `fidl_ordinal:"2"`
+}
+
+func (_m *Data) reset() {
+ switch _m.I_dataTag {
+ case 1:
+ var _zeroed []uint8
+ _m.Bytes = _zeroed
+ case 2:
+ var _zeroed Buffer
+ _m.Buffer = _zeroed
+ default:
+ var _zeroed interface{}
+ _m.I_unknownData = _zeroed
+ }
+}
+
+func (_m *Data) Which() I_dataTag {
+ switch _m.I_dataTag {
+ case 1:
+ return DataBytes
+ case 2:
+ return DataBuffer
+ default:
+ return Data_unknownData
+ }
+}
+
+func (_m *Data) Ordinal() uint64 {
+ return uint64(_m.I_dataTag)
+}
+
+func (_m *Data) SetBytes(bytes []uint8) {
+ _m.reset()
+ _m.I_dataTag = DataBytes
+ _m.Bytes = bytes
+}
+
+func DataWithBytes(bytes []uint8) Data {
+ var _u Data
+ _u.SetBytes(bytes)
+ return _u
+}
+
+func (_m *Data) SetBuffer(buffer Buffer) {
+ _m.reset()
+ _m.I_dataTag = DataBuffer
+ _m.Buffer = buffer
+}
+
+func DataWithBuffer(buffer Buffer) Data {
+ var _u Data
+ _u.SetBuffer(buffer)
+ return _u
+}
+func (_m *Data) GetUnknownData() _bindings.UnknownData {
+ return _m.I_unknownData.(_bindings.UnknownData)
+}
diff --git a/src/syscall/zx/net/impl.go b/src/syscall/zx/net/impl.go
new file mode 100644
index 0000000..a19d7dd
--- /dev/null
+++ b/src/syscall/zx/net/impl.go
@@ -0,0 +1,911 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package net
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+)
+
+const (
+ // The maximum number of IPs returned by a lookup.
+ MaxLookupIps uint64 = 256
+ // The maximum length of a hostname, as per [RFC 1035 section 2.3.4](https://tools.ietf.org/html/rfc1035#section-2.3.4).
+ MaxHostnameSize uint64 = 255
+)
+
+var _ _bindings.Enum = LookupError(0)
+
+type LookupError uint32
+
+const (
+
+ // No result was found for this query.
+ LookupErrorNotFound LookupError = 1
+
+ // The lookup failed, but may succeed at a later time. For instance, the
+ // network or DNS server may be unreachable.
+ LookupErrorTransient LookupError = 2
+
+ // The lookup failed due to an invalid argument (for instance, the hostname was not encoded
+ // correctly, or was too long).
+ LookupErrorInvalidArgs LookupError = 3
+
+ // The lookup failed due to an internal error.
+ LookupErrorInternalError LookupError = 4
+)
+
+func (_ LookupError) I_EnumValues() []LookupError {
+ return []LookupError{
+ LookupErrorNotFound,
+ LookupErrorTransient,
+ LookupErrorInvalidArgs,
+ LookupErrorInternalError,
+ }
+}
+
+func (_ LookupError) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x LookupError) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ case 4:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x LookupError) String() string {
+ switch x {
+ case 1:
+ return "NotFound"
+ case 2:
+ return "Transient"
+ case 3:
+ return "InvalidArgs"
+ case 4:
+ return "InternalError"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = LookupIpOptions(0)
+
+type LookupIpOptions uint8
+
+const (
+ LookupIpOptionsV4Addrs LookupIpOptions = 1
+ LookupIpOptionsV6Addrs LookupIpOptions = 2
+ LookupIpOptionsCnameLookup LookupIpOptions = 4
+ LookupIpOptions_Mask LookupIpOptions = 7
+)
+
+func (_ LookupIpOptions) I_BitsMask() LookupIpOptions {
+ return LookupIpOptions_Mask
+}
+
+func (_ LookupIpOptions) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x LookupIpOptions) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x LookupIpOptions) GetUnknownBits() uint64 {
+ return uint64(^LookupIpOptions_Mask & x)
+}
+
+func (x LookupIpOptions) InvertBits() LookupIpOptions {
+ return LookupIpOptions_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x LookupIpOptions) HasBits(mask LookupIpOptions) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x LookupIpOptions) ClearBits(mask LookupIpOptions) LookupIpOptions {
+ return ^mask & x
+}
+
+func (x LookupIpOptions) String() string {
+ switch x {
+ case 1:
+ return "V4Addrs"
+ case 2:
+ return "V6Addrs"
+ case 4:
+ return "CnameLookup"
+ }
+ return "Unknown"
+}
+
+type NameLookupLookupIpResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"48" fidl_alignment_v1:"8"`
+ Addr IpAddressInfo `fidl_offset_v1:"0"`
+}
+
+var _mNameLookupLookupIpResponse = _bindings.CreateLazyMarshaler(NameLookupLookupIpResponse{})
+
+func (msg *NameLookupLookupIpResponse) Marshaler() _bindings.Marshaler {
+ return _mNameLookupLookupIpResponse
+}
+
+type NameLookupLookupIp2Response struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Result LookupResult `fidl_offset_v1:"0"`
+}
+
+var _mNameLookupLookupIp2Response = _bindings.CreateLazyMarshaler(NameLookupLookupIp2Response{})
+
+func (msg *NameLookupLookupIp2Response) Marshaler() _bindings.Marshaler {
+ return _mNameLookupLookupIp2Response
+}
+
+type NameLookupLookupHostnameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Hostname string `fidl_offset_v1:"0" fidl_bounds:"255"`
+}
+
+var _mNameLookupLookupHostnameResponse = _bindings.CreateLazyMarshaler(NameLookupLookupHostnameResponse{})
+
+func (msg *NameLookupLookupHostnameResponse) Marshaler() _bindings.Marshaler {
+ return _mNameLookupLookupHostnameResponse
+}
+
+type IpAddressInfo struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"48" fidl_alignment_v1:"8"`
+ // All of the IPv4 addresses for the requested hostname.
+ Ipv4Addrs []Ipv4Address `fidl_offset_v1:"0" fidl_bounds:"256"`
+ // All of the IPv6 addresses for the requested hostname.
+ Ipv6Addrs []Ipv6Address `fidl_offset_v1:"16" fidl_bounds:"256"`
+ // The canonical name of the requested hostname (usually the DNS CNAME record, if one exists).
+ CanonicalName *string `fidl_offset_v1:"32" fidl_bounds:"256"`
+}
+
+var _mIpAddressInfo = _bindings.CreateLazyMarshaler(IpAddressInfo{})
+
+func (msg *IpAddressInfo) Marshaler() _bindings.Marshaler {
+ return _mIpAddressInfo
+}
+
+// Ipv4Address is expressed in network byte order, so the most significant byte
+// ("127" in the address "127.0.0.1") will be at index 0.
+type Ipv4Address struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"1"`
+ Addr [4]uint8 `fidl_offset_v1:"0"`
+}
+
+var _mIpv4Address = _bindings.CreateLazyMarshaler(Ipv4Address{})
+
+func (msg *Ipv4Address) Marshaler() _bindings.Marshaler {
+ return _mIpv4Address
+}
+
+// Ipv6Address is expressed in network byte order, so the most significant byte
+// ("ff" in the address "ff02::1") will be at index 0.
+type Ipv6Address struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"1"`
+ Addr [16]uint8 `fidl_offset_v1:"0"`
+}
+
+var _mIpv6Address = _bindings.CreateLazyMarshaler(Ipv6Address{})
+
+func (msg *Ipv6Address) Marshaler() _bindings.Marshaler {
+ return _mIpv6Address
+}
+
+// An IP address with its subnet prefix length.
+type Subnet struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ // The Ipv4 or Ipv6 address.
+ Addr IpAddress `fidl_offset_v1:"0"`
+ // The prefix length of the netmask. E.g. for 192.168.1.0/24, the prefix
+ // length is 24, corresponding to a netmask of 255.255.255.0.
+ // For Ipv4, prefix_len must be in the range [0, 32].
+ // For Ipv6, prefix_len must be in the range [0, 128].
+ PrefixLen uint8 `fidl_offset_v1:"24"`
+}
+
+var _mSubnet = _bindings.CreateLazyMarshaler(Subnet{})
+
+func (msg *Subnet) Marshaler() _bindings.Marshaler {
+ return _mSubnet
+}
+
+// A MAC address used to identify a network interface on the data link layer within the network.
+type MacAddress struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"6" fidl_alignment_v1:"1"`
+ Octets [6]uint8 `fidl_offset_v1:"0"`
+}
+
+var _mMacAddress = _bindings.CreateLazyMarshaler(MacAddress{})
+
+func (msg *MacAddress) Marshaler() _bindings.Marshaler {
+ return _mMacAddress
+}
+
+// An IPv4 socket address, composed of an IPv4 address and a port.
+//
+// Inspired by the address definition in the [POSIX specification].
+//
+// [POSIX specification]: https://pubs.opengroup.org/onlinepubs/9699919799/
+type Ipv4SocketAddress struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"6" fidl_alignment_v1:"2"`
+ // IPv4 Address.
+ Address Ipv4Address `fidl_offset_v1:"0"`
+ // Transport-layer port.
+ Port uint16 `fidl_offset_v1:"4"`
+}
+
+var _mIpv4SocketAddress = _bindings.CreateLazyMarshaler(Ipv4SocketAddress{})
+
+func (msg *Ipv4SocketAddress) Marshaler() _bindings.Marshaler {
+ return _mIpv4SocketAddress
+}
+
+// An IPV6 socket address, composed of an IPv6 address, a port, and a scope identifier.
+//
+// Inspired by the address definition in the [POSIX specification].
+//
+// [POSIX specification]: https://pubs.opengroup.org/onlinepubs/9699919799/
+type Ipv6SocketAddress struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ // IPv6 Address.
+ Address Ipv6Address `fidl_offset_v1:"0"`
+ // Transport-layer port.
+ Port uint16 `fidl_offset_v1:"16"`
+ // Provides a means to identify to which zone a non-global address belongs.
+ //
+ // A node may have interfaces attached to different zones of the same scope, for example
+ // different link-local zones are disambiguated by the use of a `zone_index` providing the
+ // interface identifier.
+ //
+ // `zone_index` 0 is the default zone.
+ //
+ // See [RFC 4007] for terminology and examples.
+ //
+ // [RFC 4007]: https://tools.ietf.org/html/rfc4007
+ ZoneIndex uint64 `fidl_offset_v1:"24"`
+}
+
+var _mIpv6SocketAddress = _bindings.CreateLazyMarshaler(Ipv6SocketAddress{})
+
+func (msg *Ipv6SocketAddress) Marshaler() _bindings.Marshaler {
+ return _mIpv6SocketAddress
+}
+
+type nameLookupWithCtxLookupIpRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Hostname string `fidl_offset_v1:"0" fidl_bounds:"255"`
+ Options LookupIpOptions `fidl_offset_v1:"16"`
+}
+
+var _mnameLookupWithCtxLookupIpRequest = _bindings.CreateLazyMarshaler(nameLookupWithCtxLookupIpRequest{})
+
+func (msg *nameLookupWithCtxLookupIpRequest) Marshaler() _bindings.Marshaler {
+ return _mnameLookupWithCtxLookupIpRequest
+}
+
+type nameLookupWithCtxLookupIpResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NameLookupLookupIpResult `fidl_offset_v1:"0"`
+}
+
+var _mnameLookupWithCtxLookupIpResponse = _bindings.CreateLazyMarshaler(nameLookupWithCtxLookupIpResponse{})
+
+func (msg *nameLookupWithCtxLookupIpResponse) Marshaler() _bindings.Marshaler {
+ return _mnameLookupWithCtxLookupIpResponse
+}
+
+type nameLookupWithCtxLookupIp2Request struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ Hostname string `fidl_offset_v1:"0" fidl_bounds:"255"`
+ Options LookupIpOptions2 `fidl_offset_v1:"16"`
+}
+
+var _mnameLookupWithCtxLookupIp2Request = _bindings.CreateLazyMarshaler(nameLookupWithCtxLookupIp2Request{})
+
+func (msg *nameLookupWithCtxLookupIp2Request) Marshaler() _bindings.Marshaler {
+ return _mnameLookupWithCtxLookupIp2Request
+}
+
+type nameLookupWithCtxLookupIp2Response struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NameLookupLookupIp2Result `fidl_offset_v1:"0"`
+}
+
+var _mnameLookupWithCtxLookupIp2Response = _bindings.CreateLazyMarshaler(nameLookupWithCtxLookupIp2Response{})
+
+func (msg *nameLookupWithCtxLookupIp2Response) Marshaler() _bindings.Marshaler {
+ return _mnameLookupWithCtxLookupIp2Response
+}
+
+type nameLookupWithCtxLookupHostnameRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Addr IpAddress `fidl_offset_v1:"0"`
+}
+
+var _mnameLookupWithCtxLookupHostnameRequest = _bindings.CreateLazyMarshaler(nameLookupWithCtxLookupHostnameRequest{})
+
+func (msg *nameLookupWithCtxLookupHostnameRequest) Marshaler() _bindings.Marshaler {
+ return _mnameLookupWithCtxLookupHostnameRequest
+}
+
+type nameLookupWithCtxLookupHostnameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result NameLookupLookupHostnameResult `fidl_offset_v1:"0"`
+}
+
+var _mnameLookupWithCtxLookupHostnameResponse = _bindings.CreateLazyMarshaler(nameLookupWithCtxLookupHostnameResponse{})
+
+func (msg *nameLookupWithCtxLookupHostnameResponse) Marshaler() _bindings.Marshaler {
+ return _mnameLookupWithCtxLookupHostnameResponse
+}
+
+type I_nameLookupLookupIpResultTag uint64
+
+const (
+ NameLookupLookupIpResultResponse = 1 // 0x00000001
+ NameLookupLookupIpResultErr = 2 // 0x00000002
+)
+
+type NameLookupLookupIpResult struct {
+ I_nameLookupLookupIpResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response NameLookupLookupIpResponse `fidl_ordinal:"1"`
+ Err LookupError `fidl_ordinal:"2"`
+}
+
+func (_m *NameLookupLookupIpResult) reset() {
+ switch _m.I_nameLookupLookupIpResultTag {
+ case 1:
+ var _zeroed NameLookupLookupIpResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed LookupError
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *NameLookupLookupIpResult) Which() I_nameLookupLookupIpResultTag {
+ return _m.I_nameLookupLookupIpResultTag
+}
+
+func (_m *NameLookupLookupIpResult) Ordinal() uint64 {
+ return uint64(_m.I_nameLookupLookupIpResultTag)
+}
+
+func (_m *NameLookupLookupIpResult) SetResponse(response NameLookupLookupIpResponse) {
+ _m.reset()
+ _m.I_nameLookupLookupIpResultTag = NameLookupLookupIpResultResponse
+ _m.Response = response
+}
+
+func NameLookupLookupIpResultWithResponse(response NameLookupLookupIpResponse) NameLookupLookupIpResult {
+ var _u NameLookupLookupIpResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *NameLookupLookupIpResult) SetErr(err LookupError) {
+ _m.reset()
+ _m.I_nameLookupLookupIpResultTag = NameLookupLookupIpResultErr
+ _m.Err = err
+}
+
+func NameLookupLookupIpResultWithErr(err LookupError) NameLookupLookupIpResult {
+ var _u NameLookupLookupIpResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_nameLookupLookupIp2ResultTag uint64
+
+const (
+ NameLookupLookupIp2ResultResponse = 1 // 0x00000001
+ NameLookupLookupIp2ResultErr = 2 // 0x00000002
+)
+
+type NameLookupLookupIp2Result struct {
+ I_nameLookupLookupIp2ResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response NameLookupLookupIp2Response `fidl_ordinal:"1"`
+ Err LookupError `fidl_ordinal:"2"`
+}
+
+func (_m *NameLookupLookupIp2Result) reset() {
+ switch _m.I_nameLookupLookupIp2ResultTag {
+ case 1:
+ var _zeroed NameLookupLookupIp2Response
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed LookupError
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *NameLookupLookupIp2Result) Which() I_nameLookupLookupIp2ResultTag {
+ return _m.I_nameLookupLookupIp2ResultTag
+}
+
+func (_m *NameLookupLookupIp2Result) Ordinal() uint64 {
+ return uint64(_m.I_nameLookupLookupIp2ResultTag)
+}
+
+func (_m *NameLookupLookupIp2Result) SetResponse(response NameLookupLookupIp2Response) {
+ _m.reset()
+ _m.I_nameLookupLookupIp2ResultTag = NameLookupLookupIp2ResultResponse
+ _m.Response = response
+}
+
+func NameLookupLookupIp2ResultWithResponse(response NameLookupLookupIp2Response) NameLookupLookupIp2Result {
+ var _u NameLookupLookupIp2Result
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *NameLookupLookupIp2Result) SetErr(err LookupError) {
+ _m.reset()
+ _m.I_nameLookupLookupIp2ResultTag = NameLookupLookupIp2ResultErr
+ _m.Err = err
+}
+
+func NameLookupLookupIp2ResultWithErr(err LookupError) NameLookupLookupIp2Result {
+ var _u NameLookupLookupIp2Result
+ _u.SetErr(err)
+ return _u
+}
+
+type I_nameLookupLookupHostnameResultTag uint64
+
+const (
+ NameLookupLookupHostnameResultResponse = 1 // 0x00000001
+ NameLookupLookupHostnameResultErr = 2 // 0x00000002
+)
+
+type NameLookupLookupHostnameResult struct {
+ I_nameLookupLookupHostnameResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response NameLookupLookupHostnameResponse `fidl_ordinal:"1"`
+ Err LookupError `fidl_ordinal:"2"`
+}
+
+func (_m *NameLookupLookupHostnameResult) reset() {
+ switch _m.I_nameLookupLookupHostnameResultTag {
+ case 1:
+ var _zeroed NameLookupLookupHostnameResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed LookupError
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *NameLookupLookupHostnameResult) Which() I_nameLookupLookupHostnameResultTag {
+ return _m.I_nameLookupLookupHostnameResultTag
+}
+
+func (_m *NameLookupLookupHostnameResult) Ordinal() uint64 {
+ return uint64(_m.I_nameLookupLookupHostnameResultTag)
+}
+
+func (_m *NameLookupLookupHostnameResult) SetResponse(response NameLookupLookupHostnameResponse) {
+ _m.reset()
+ _m.I_nameLookupLookupHostnameResultTag = NameLookupLookupHostnameResultResponse
+ _m.Response = response
+}
+
+func NameLookupLookupHostnameResultWithResponse(response NameLookupLookupHostnameResponse) NameLookupLookupHostnameResult {
+ var _u NameLookupLookupHostnameResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *NameLookupLookupHostnameResult) SetErr(err LookupError) {
+ _m.reset()
+ _m.I_nameLookupLookupHostnameResultTag = NameLookupLookupHostnameResultErr
+ _m.Err = err
+}
+
+func NameLookupLookupHostnameResultWithErr(err LookupError) NameLookupLookupHostnameResult {
+ var _u NameLookupLookupHostnameResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_ipAddressTag uint64
+
+const (
+ IpAddressIpv4 = 1 // 0x00000001
+ IpAddressIpv6 = 2 // 0x00000002
+)
+
+// Represents an IP address that may be either v4 or v6.
+type IpAddress struct {
+ I_ipAddressTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ Ipv4 Ipv4Address `fidl_ordinal:"1"`
+ Ipv6 Ipv6Address `fidl_ordinal:"2"`
+}
+
+func (_m *IpAddress) reset() {
+ switch _m.I_ipAddressTag {
+ case 1:
+ var _zeroed Ipv4Address
+ _m.Ipv4 = _zeroed
+ case 2:
+ var _zeroed Ipv6Address
+ _m.Ipv6 = _zeroed
+ }
+}
+
+func (_m *IpAddress) Which() I_ipAddressTag {
+ return _m.I_ipAddressTag
+}
+
+func (_m *IpAddress) Ordinal() uint64 {
+ return uint64(_m.I_ipAddressTag)
+}
+
+func (_m *IpAddress) SetIpv4(ipv4 Ipv4Address) {
+ _m.reset()
+ _m.I_ipAddressTag = IpAddressIpv4
+ _m.Ipv4 = ipv4
+}
+
+func IpAddressWithIpv4(ipv4 Ipv4Address) IpAddress {
+ var _u IpAddress
+ _u.SetIpv4(ipv4)
+ return _u
+}
+
+func (_m *IpAddress) SetIpv6(ipv6 Ipv6Address) {
+ _m.reset()
+ _m.I_ipAddressTag = IpAddressIpv6
+ _m.Ipv6 = ipv6
+}
+
+func IpAddressWithIpv6(ipv6 Ipv6Address) IpAddress {
+ var _u IpAddress
+ _u.SetIpv6(ipv6)
+ return _u
+}
+
+type I_socketAddressTag uint64
+
+const (
+ SocketAddressIpv4 = 1 // 0x00000001
+ SocketAddressIpv6 = 2 // 0x00000002
+)
+
+// Represents an IP socket address that may be either v4 or v6.
+type SocketAddress struct {
+ I_socketAddressTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ Ipv4 Ipv4SocketAddress `fidl_ordinal:"1"`
+ Ipv6 Ipv6SocketAddress `fidl_ordinal:"2"`
+}
+
+func (_m *SocketAddress) reset() {
+ switch _m.I_socketAddressTag {
+ case 1:
+ var _zeroed Ipv4SocketAddress
+ _m.Ipv4 = _zeroed
+ case 2:
+ var _zeroed Ipv6SocketAddress
+ _m.Ipv6 = _zeroed
+ }
+}
+
+func (_m *SocketAddress) Which() I_socketAddressTag {
+ return _m.I_socketAddressTag
+}
+
+func (_m *SocketAddress) Ordinal() uint64 {
+ return uint64(_m.I_socketAddressTag)
+}
+
+func (_m *SocketAddress) SetIpv4(ipv4 Ipv4SocketAddress) {
+ _m.reset()
+ _m.I_socketAddressTag = SocketAddressIpv4
+ _m.Ipv4 = ipv4
+}
+
+func SocketAddressWithIpv4(ipv4 Ipv4SocketAddress) SocketAddress {
+ var _u SocketAddress
+ _u.SetIpv4(ipv4)
+ return _u
+}
+
+func (_m *SocketAddress) SetIpv6(ipv6 Ipv6SocketAddress) {
+ _m.reset()
+ _m.I_socketAddressTag = SocketAddressIpv6
+ _m.Ipv6 = ipv6
+}
+
+func SocketAddressWithIpv6(ipv6 Ipv6SocketAddress) SocketAddress {
+ var _u SocketAddress
+ _u.SetIpv6(ipv6)
+ return _u
+}
+
+// Lookup operation options.
+type LookupIpOptions2 struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // Include IPv4 results. Defaults to false.
+ Ipv4Lookup bool `fidl_ordinal:"1"`
+ Ipv4LookupPresent bool
+ // Include IPv6 results. Defaults to false.
+ Ipv6Lookup bool `fidl_ordinal:"2"`
+ Ipv6LookupPresent bool
+ // Sort addresses in order of preference.
+ //
+ // It true, Addresses are sorted according to destination address selection described in [RFC
+ // 6724 Section 6](https://tools.ietf.org/html/rfc6724#section-6).
+ //
+ // Defaults to false.
+ SortAddresses bool `fidl_ordinal:"3"`
+ SortAddressesPresent bool
+}
+
+func (u *LookupIpOptions2) SetIpv4Lookup(ipv4Lookup bool) {
+ u.Ipv4Lookup = ipv4Lookup
+ u.Ipv4LookupPresent = true
+}
+
+func (u *LookupIpOptions2) GetIpv4Lookup() bool {
+ return u.Ipv4Lookup
+}
+
+func (u *LookupIpOptions2) GetIpv4LookupWithDefault(_default bool) bool {
+ if !u.HasIpv4Lookup() {
+ return _default
+ }
+ return u.Ipv4Lookup
+}
+
+func (u *LookupIpOptions2) HasIpv4Lookup() bool {
+ return u.Ipv4LookupPresent
+}
+
+func (u *LookupIpOptions2) ClearIpv4Lookup() {
+ u.Ipv4LookupPresent = false
+}
+
+func (u *LookupIpOptions2) SetIpv6Lookup(ipv6Lookup bool) {
+ u.Ipv6Lookup = ipv6Lookup
+ u.Ipv6LookupPresent = true
+}
+
+func (u *LookupIpOptions2) GetIpv6Lookup() bool {
+ return u.Ipv6Lookup
+}
+
+func (u *LookupIpOptions2) GetIpv6LookupWithDefault(_default bool) bool {
+ if !u.HasIpv6Lookup() {
+ return _default
+ }
+ return u.Ipv6Lookup
+}
+
+func (u *LookupIpOptions2) HasIpv6Lookup() bool {
+ return u.Ipv6LookupPresent
+}
+
+func (u *LookupIpOptions2) ClearIpv6Lookup() {
+ u.Ipv6LookupPresent = false
+}
+
+func (u *LookupIpOptions2) SetSortAddresses(sortAddresses bool) {
+ u.SortAddresses = sortAddresses
+ u.SortAddressesPresent = true
+}
+
+func (u *LookupIpOptions2) GetSortAddresses() bool {
+ return u.SortAddresses
+}
+
+func (u *LookupIpOptions2) GetSortAddressesWithDefault(_default bool) bool {
+ if !u.HasSortAddresses() {
+ return _default
+ }
+ return u.SortAddresses
+}
+
+func (u *LookupIpOptions2) HasSortAddresses() bool {
+ return u.SortAddressesPresent
+}
+
+func (u *LookupIpOptions2) ClearSortAddresses() {
+ u.SortAddressesPresent = false
+}
+
+func (u *LookupIpOptions2) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *LookupIpOptions2) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// The result of a lookup operation.
+type LookupResult struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // The IP addresses resulting from a lookup.
+ //
+ // If sorting was requested, `addresses` is sorted in order of preference, most preferred
+ // destination address first.
+ Addresses []IpAddress `fidl_bounds:"256" fidl_ordinal:"1"`
+ AddressesPresent bool
+}
+
+func (u *LookupResult) SetAddresses(addresses []IpAddress) {
+ u.Addresses = addresses
+ u.AddressesPresent = true
+}
+
+func (u *LookupResult) GetAddresses() []IpAddress {
+ return u.Addresses
+}
+
+func (u *LookupResult) GetAddressesWithDefault(_default []IpAddress) []IpAddress {
+ if !u.HasAddresses() {
+ return _default
+ }
+ return u.Addresses
+}
+
+func (u *LookupResult) HasAddresses() bool {
+ return u.AddressesPresent
+}
+
+func (u *LookupResult) ClearAddresses() {
+ u.AddressesPresent = false
+}
+
+func (u *LookupResult) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *LookupResult) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+const (
+ NameLookupLookupIpOrdinal uint64 = 0x58576c7210cd0f32
+ NameLookupLookupIp2Ordinal uint64 = 0x6d89c37498abf754
+ NameLookupLookupHostnameOrdinal uint64 = 0x5dfea9b2c92f510a
+)
+
+type NameLookupWithCtxInterface _bindings.ChannelProxy
+
+// Look up a list of IP addresses by hostname.
+//
+// If `hostname` is an Internationalized Domain Name, it must be encoded as per RFC 3490.
+func (p *NameLookupWithCtxInterface) LookupIp(ctx_ _bindings.Context, hostname string, options LookupIpOptions) (NameLookupLookupIpResult, error) {
+ req_ := &nameLookupWithCtxLookupIpRequest{
+ Hostname: hostname,
+ Options: options,
+ }
+ resp_ := &nameLookupWithCtxLookupIpResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NameLookupLookupIpOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Lookup a list of IP addresses by hostname.
+//
+// If `hostname` is an Internationalized Domain Name, it must be encoded as per RFC 3490.
+func (p *NameLookupWithCtxInterface) LookupIp2(ctx_ _bindings.Context, hostname string, options LookupIpOptions2) (NameLookupLookupIp2Result, error) {
+ req_ := &nameLookupWithCtxLookupIp2Request{
+ Hostname: hostname,
+ Options: options,
+ }
+ resp_ := &nameLookupWithCtxLookupIp2Response{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NameLookupLookupIp2Ordinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Look up a hostname by IP address.
+func (p *NameLookupWithCtxInterface) LookupHostname(ctx_ _bindings.Context, addr IpAddress) (NameLookupLookupHostnameResult, error) {
+ req_ := &nameLookupWithCtxLookupHostnameRequest{
+ Addr: addr,
+ }
+ resp_ := &nameLookupWithCtxLookupHostnameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(NameLookupLookupHostnameOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+type NameLookupWithCtx interface {
+ // Look up a list of IP addresses by hostname.
+ //
+ // If `hostname` is an Internationalized Domain Name, it must be encoded as per RFC 3490.
+ LookupIp(ctx_ _bindings.Context, hostname string, options LookupIpOptions) (NameLookupLookupIpResult, error)
+ // Lookup a list of IP addresses by hostname.
+ //
+ // If `hostname` is an Internationalized Domain Name, it must be encoded as per RFC 3490.
+ LookupIp2(ctx_ _bindings.Context, hostname string, options LookupIpOptions2) (NameLookupLookupIp2Result, error)
+ // Look up a hostname by IP address.
+ LookupHostname(ctx_ _bindings.Context, addr IpAddress) (NameLookupLookupHostnameResult, error)
+}
+
+type NameLookupWithCtxTransitionalBase struct{}
+
+type NameLookupWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewNameLookupWithCtxInterfaceRequest() (NameLookupWithCtxInterfaceRequest, *NameLookupWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return NameLookupWithCtxInterfaceRequest(req), (*NameLookupWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ NameLookupWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.net.NameLookup"
+}
+func (c NameLookupWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const NameLookupName = "fuchsia.net.NameLookup"
+
+type NameLookupWithCtxStub struct {
+ Impl NameLookupWithCtx
+}
+
+func (s_ *NameLookupWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case NameLookupLookupIpOrdinal:
+ in_ := nameLookupWithCtxLookupIpRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.LookupIp(args_.Ctx, in_.Hostname, in_.Options)
+ out_ := nameLookupWithCtxLookupIpResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case NameLookupLookupIp2Ordinal:
+ in_ := nameLookupWithCtxLookupIp2Request{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.LookupIp2(args_.Ctx, in_.Hostname, in_.Options)
+ out_ := nameLookupWithCtxLookupIp2Response{}
+ out_.Result = result
+ return &out_, true, err_
+ case NameLookupLookupHostnameOrdinal:
+ in_ := nameLookupWithCtxLookupHostnameRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.LookupHostname(args_.Ctx, in_.Addr)
+ out_ := nameLookupWithCtxLookupHostnameResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type NameLookupEventProxy _bindings.ChannelProxy
diff --git a/src/syscall/zx/net/name/impl.go b/src/syscall/zx/net/name/impl.go
new file mode 100644
index 0000000..6c79262
--- /dev/null
+++ b/src/syscall/zx/net/name/impl.go
@@ -0,0 +1,593 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package name
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+ fuchsianet "syscall/zx/net"
+)
+
+type LookupAdminSetDnsServersResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mLookupAdminSetDnsServersResponse = _bindings.CreateLazyMarshaler(LookupAdminSetDnsServersResponse{})
+
+func (msg *LookupAdminSetDnsServersResponse) Marshaler() _bindings.Marshaler {
+ return _mLookupAdminSetDnsServersResponse
+}
+
+type lookupAdminWithCtxSetDnsServersRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Servers []fuchsianet.SocketAddress `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mlookupAdminWithCtxSetDnsServersRequest = _bindings.CreateLazyMarshaler(lookupAdminWithCtxSetDnsServersRequest{})
+
+func (msg *lookupAdminWithCtxSetDnsServersRequest) Marshaler() _bindings.Marshaler {
+ return _mlookupAdminWithCtxSetDnsServersRequest
+}
+
+type lookupAdminWithCtxSetDnsServersResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result LookupAdminSetDnsServersResult `fidl_offset_v1:"0"`
+}
+
+var _mlookupAdminWithCtxSetDnsServersResponse = _bindings.CreateLazyMarshaler(lookupAdminWithCtxSetDnsServersResponse{})
+
+func (msg *lookupAdminWithCtxSetDnsServersResponse) Marshaler() _bindings.Marshaler {
+ return _mlookupAdminWithCtxSetDnsServersResponse
+}
+
+type lookupAdminWithCtxGetDnsServersResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Servers []fuchsianet.SocketAddress `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mlookupAdminWithCtxGetDnsServersResponse = _bindings.CreateLazyMarshaler(lookupAdminWithCtxGetDnsServersResponse{})
+
+func (msg *lookupAdminWithCtxGetDnsServersResponse) Marshaler() _bindings.Marshaler {
+ return _mlookupAdminWithCtxGetDnsServersResponse
+}
+
+type dnsServerWatcherWithCtxWatchServersResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Servers []DnsServer `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mdnsServerWatcherWithCtxWatchServersResponse = _bindings.CreateLazyMarshaler(dnsServerWatcherWithCtxWatchServersResponse{})
+
+func (msg *dnsServerWatcherWithCtxWatchServersResponse) Marshaler() _bindings.Marshaler {
+ return _mdnsServerWatcherWithCtxWatchServersResponse
+}
+
+type I_dnsServerSourceTag uint64
+
+const (
+ DnsServerSourceStaticSource = 1 // 0x00000001
+ DnsServerSourceDhcp = 2 // 0x00000002
+ DnsServerSourceNdp = 3 // 0x00000003
+ DnsServerSourceDhcpv6 = 4 // 0x00000004
+)
+
+// The configuration source for a [`fuchsia.net.name/DnsServer`].
+type DnsServerSource struct {
+ I_dnsServerSourceTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ // The server is statically configured through
+ // [`fuchsia.net.name/LookupAdmin.SetDefaultServers`].
+ StaticSource StaticDnsServerSource `fidl_ordinal:"1"`
+ // The server was discovered through DHCPv4.
+ Dhcp DhcpDnsServerSource `fidl_ordinal:"2"`
+ // The server was discovered through an NDP Router Advertisement.
+ Ndp NdpDnsServerSource `fidl_ordinal:"3"`
+ // The server was discovered through DHCPv6.
+ Dhcpv6 Dhcpv6DnsServerSource `fidl_ordinal:"4"`
+}
+
+func (_m *DnsServerSource) reset() {
+ switch _m.I_dnsServerSourceTag {
+ case 1:
+ var _zeroed StaticDnsServerSource
+ _m.StaticSource = _zeroed
+ case 2:
+ var _zeroed DhcpDnsServerSource
+ _m.Dhcp = _zeroed
+ case 3:
+ var _zeroed NdpDnsServerSource
+ _m.Ndp = _zeroed
+ case 4:
+ var _zeroed Dhcpv6DnsServerSource
+ _m.Dhcpv6 = _zeroed
+ }
+}
+
+func (_m *DnsServerSource) Which() I_dnsServerSourceTag {
+ return _m.I_dnsServerSourceTag
+}
+
+func (_m *DnsServerSource) Ordinal() uint64 {
+ return uint64(_m.I_dnsServerSourceTag)
+}
+
+func (_m *DnsServerSource) SetStaticSource(staticSource StaticDnsServerSource) {
+ _m.reset()
+ _m.I_dnsServerSourceTag = DnsServerSourceStaticSource
+ _m.StaticSource = staticSource
+}
+
+func DnsServerSourceWithStaticSource(staticSource StaticDnsServerSource) DnsServerSource {
+ var _u DnsServerSource
+ _u.SetStaticSource(staticSource)
+ return _u
+}
+
+func (_m *DnsServerSource) SetDhcp(dhcp DhcpDnsServerSource) {
+ _m.reset()
+ _m.I_dnsServerSourceTag = DnsServerSourceDhcp
+ _m.Dhcp = dhcp
+}
+
+func DnsServerSourceWithDhcp(dhcp DhcpDnsServerSource) DnsServerSource {
+ var _u DnsServerSource
+ _u.SetDhcp(dhcp)
+ return _u
+}
+
+func (_m *DnsServerSource) SetNdp(ndp NdpDnsServerSource) {
+ _m.reset()
+ _m.I_dnsServerSourceTag = DnsServerSourceNdp
+ _m.Ndp = ndp
+}
+
+func DnsServerSourceWithNdp(ndp NdpDnsServerSource) DnsServerSource {
+ var _u DnsServerSource
+ _u.SetNdp(ndp)
+ return _u
+}
+
+func (_m *DnsServerSource) SetDhcpv6(dhcpv6 Dhcpv6DnsServerSource) {
+ _m.reset()
+ _m.I_dnsServerSourceTag = DnsServerSourceDhcpv6
+ _m.Dhcpv6 = dhcpv6
+}
+
+func DnsServerSourceWithDhcpv6(dhcpv6 Dhcpv6DnsServerSource) DnsServerSource {
+ var _u DnsServerSource
+ _u.SetDhcpv6(dhcpv6)
+ return _u
+}
+
+type I_lookupAdminSetDnsServersResultTag uint64
+
+const (
+ LookupAdminSetDnsServersResultResponse = 1 // 0x00000001
+ LookupAdminSetDnsServersResultErr = 2 // 0x00000002
+)
+
+type LookupAdminSetDnsServersResult struct {
+ I_lookupAdminSetDnsServersResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response LookupAdminSetDnsServersResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *LookupAdminSetDnsServersResult) reset() {
+ switch _m.I_lookupAdminSetDnsServersResultTag {
+ case 1:
+ var _zeroed LookupAdminSetDnsServersResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *LookupAdminSetDnsServersResult) Which() I_lookupAdminSetDnsServersResultTag {
+ return _m.I_lookupAdminSetDnsServersResultTag
+}
+
+func (_m *LookupAdminSetDnsServersResult) Ordinal() uint64 {
+ return uint64(_m.I_lookupAdminSetDnsServersResultTag)
+}
+
+func (_m *LookupAdminSetDnsServersResult) SetResponse(response LookupAdminSetDnsServersResponse) {
+ _m.reset()
+ _m.I_lookupAdminSetDnsServersResultTag = LookupAdminSetDnsServersResultResponse
+ _m.Response = response
+}
+
+func LookupAdminSetDnsServersResultWithResponse(response LookupAdminSetDnsServersResponse) LookupAdminSetDnsServersResult {
+ var _u LookupAdminSetDnsServersResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *LookupAdminSetDnsServersResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_lookupAdminSetDnsServersResultTag = LookupAdminSetDnsServersResultErr
+ _m.Err = err
+}
+
+func LookupAdminSetDnsServersResultWithErr(err int32) LookupAdminSetDnsServersResult {
+ var _u LookupAdminSetDnsServersResult
+ _u.SetErr(err)
+ return _u
+}
+
+// Extra information about statically set DNS servers.
+type StaticDnsServerSource struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+}
+
+func (u *StaticDnsServerSource) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *StaticDnsServerSource) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Extra information about DNS servers discovered through DHCPv4.
+type DhcpDnsServerSource struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // The interface index over which this server was discovered.
+ SourceInterface uint64 `fidl_ordinal:"1"`
+ SourceInterfacePresent bool
+}
+
+func (u *DhcpDnsServerSource) SetSourceInterface(sourceInterface uint64) {
+ u.SourceInterface = sourceInterface
+ u.SourceInterfacePresent = true
+}
+
+func (u *DhcpDnsServerSource) GetSourceInterface() uint64 {
+ return u.SourceInterface
+}
+
+func (u *DhcpDnsServerSource) GetSourceInterfaceWithDefault(_default uint64) uint64 {
+ if !u.HasSourceInterface() {
+ return _default
+ }
+ return u.SourceInterface
+}
+
+func (u *DhcpDnsServerSource) HasSourceInterface() bool {
+ return u.SourceInterfacePresent
+}
+
+func (u *DhcpDnsServerSource) ClearSourceInterface() {
+ u.SourceInterfacePresent = false
+}
+
+func (u *DhcpDnsServerSource) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *DhcpDnsServerSource) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Extra information about DNS servers discovered through NDP.
+type NdpDnsServerSource struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // The interface index over which this server was discovered.
+ SourceInterface uint64 `fidl_ordinal:"1"`
+ SourceInterfacePresent bool
+}
+
+func (u *NdpDnsServerSource) SetSourceInterface(sourceInterface uint64) {
+ u.SourceInterface = sourceInterface
+ u.SourceInterfacePresent = true
+}
+
+func (u *NdpDnsServerSource) GetSourceInterface() uint64 {
+ return u.SourceInterface
+}
+
+func (u *NdpDnsServerSource) GetSourceInterfaceWithDefault(_default uint64) uint64 {
+ if !u.HasSourceInterface() {
+ return _default
+ }
+ return u.SourceInterface
+}
+
+func (u *NdpDnsServerSource) HasSourceInterface() bool {
+ return u.SourceInterfacePresent
+}
+
+func (u *NdpDnsServerSource) ClearSourceInterface() {
+ u.SourceInterfacePresent = false
+}
+
+func (u *NdpDnsServerSource) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *NdpDnsServerSource) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Extra information about DNS servers discovered through DHCPv6.
+type Dhcpv6DnsServerSource struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // The interface index over which this server was discovered.
+ SourceInterface uint64 `fidl_ordinal:"1"`
+ SourceInterfacePresent bool
+}
+
+func (u *Dhcpv6DnsServerSource) SetSourceInterface(sourceInterface uint64) {
+ u.SourceInterface = sourceInterface
+ u.SourceInterfacePresent = true
+}
+
+func (u *Dhcpv6DnsServerSource) GetSourceInterface() uint64 {
+ return u.SourceInterface
+}
+
+func (u *Dhcpv6DnsServerSource) GetSourceInterfaceWithDefault(_default uint64) uint64 {
+ if !u.HasSourceInterface() {
+ return _default
+ }
+ return u.SourceInterface
+}
+
+func (u *Dhcpv6DnsServerSource) HasSourceInterface() bool {
+ return u.SourceInterfacePresent
+}
+
+func (u *Dhcpv6DnsServerSource) ClearSourceInterface() {
+ u.SourceInterfacePresent = false
+}
+
+func (u *Dhcpv6DnsServerSource) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *Dhcpv6DnsServerSource) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// A DNS server configuration.
+type DnsServer struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // The server's address, must be provided.
+ Address fuchsianet.SocketAddress `fidl_ordinal:"1"`
+ AddressPresent bool
+ // The configuration source for this server. Defaults to
+ // [`fuchsia.net.name/DnsServerSource.static_source`].
+ Source DnsServerSource `fidl_ordinal:"2"`
+ SourcePresent bool
+}
+
+func (u *DnsServer) SetAddress(address fuchsianet.SocketAddress) {
+ u.Address = address
+ u.AddressPresent = true
+}
+
+func (u *DnsServer) GetAddress() fuchsianet.SocketAddress {
+ return u.Address
+}
+
+func (u *DnsServer) GetAddressWithDefault(_default fuchsianet.SocketAddress) fuchsianet.SocketAddress {
+ if !u.HasAddress() {
+ return _default
+ }
+ return u.Address
+}
+
+func (u *DnsServer) HasAddress() bool {
+ return u.AddressPresent
+}
+
+func (u *DnsServer) ClearAddress() {
+ u.AddressPresent = false
+}
+
+func (u *DnsServer) SetSource(source DnsServerSource) {
+ u.Source = source
+ u.SourcePresent = true
+}
+
+func (u *DnsServer) GetSource() DnsServerSource {
+ return u.Source
+}
+
+func (u *DnsServer) GetSourceWithDefault(_default DnsServerSource) DnsServerSource {
+ if !u.HasSource() {
+ return _default
+ }
+ return u.Source
+}
+
+func (u *DnsServer) HasSource() bool {
+ return u.SourcePresent
+}
+
+func (u *DnsServer) ClearSource() {
+ u.SourcePresent = false
+}
+
+func (u *DnsServer) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *DnsServer) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+const (
+ LookupAdminSetDnsServersOrdinal uint64 = 0x55e2b9fcc777be96
+ LookupAdminGetDnsServersOrdinal uint64 = 0x614303bf6e72f80f
+)
+
+type LookupAdminWithCtxInterface _bindings.ChannelProxy
+
+// Sets the DNS servers to `servers`
+//
+// + request `servers` The list of servers to use for domain name resolution, in priority
+// order. An empty list means no servers will be used and name resolution may fail. Each
+// `SocketAddress` in `servers` must be a valid unicast socket address. The list of servers
+// will be deduplicated.
+// * error Returns `ZX_ERR_INVALID_ARGS` if any of the provided addresses does not meet the
+// conditions above.
+func (p *LookupAdminWithCtxInterface) SetDnsServers(ctx_ _bindings.Context, servers []fuchsianet.SocketAddress) (LookupAdminSetDnsServersResult, error) {
+ req_ := &lookupAdminWithCtxSetDnsServersRequest{
+ Servers: servers,
+ }
+ resp_ := &lookupAdminWithCtxSetDnsServersResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(LookupAdminSetDnsServersOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Gets the DNS servers currently in use to resolve name lookups.
+// - response `servers` The list of servers in use by `LookupAdmin`, in priority order.
+func (p *LookupAdminWithCtxInterface) GetDnsServers(ctx_ _bindings.Context) ([]fuchsianet.SocketAddress, error) {
+ var req_ _bindings.Message
+ resp_ := &lookupAdminWithCtxGetDnsServersResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(LookupAdminGetDnsServersOrdinal, req_, resp_)
+ return resp_.Servers, err_
+}
+
+// Provides administration controls over name resolution settings.
+type LookupAdminWithCtx interface {
+ // Sets the DNS servers to `servers`
+ //
+ // + request `servers` The list of servers to use for domain name resolution, in priority
+ // order. An empty list means no servers will be used and name resolution may fail. Each
+ // `SocketAddress` in `servers` must be a valid unicast socket address. The list of servers
+ // will be deduplicated.
+ // * error Returns `ZX_ERR_INVALID_ARGS` if any of the provided addresses does not meet the
+ // conditions above.
+ SetDnsServers(ctx_ _bindings.Context, servers []fuchsianet.SocketAddress) (LookupAdminSetDnsServersResult, error)
+ // Gets the DNS servers currently in use to resolve name lookups.
+ // - response `servers` The list of servers in use by `LookupAdmin`, in priority order.
+ GetDnsServers(ctx_ _bindings.Context) ([]fuchsianet.SocketAddress, error)
+}
+
+type LookupAdminWithCtxTransitionalBase struct{}
+
+type LookupAdminWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewLookupAdminWithCtxInterfaceRequest() (LookupAdminWithCtxInterfaceRequest, *LookupAdminWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return LookupAdminWithCtxInterfaceRequest(req), (*LookupAdminWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ LookupAdminWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.net.name.LookupAdmin"
+}
+func (c LookupAdminWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const LookupAdminName = "fuchsia.net.name.LookupAdmin"
+
+type LookupAdminWithCtxStub struct {
+ Impl LookupAdminWithCtx
+}
+
+func (s_ *LookupAdminWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case LookupAdminSetDnsServersOrdinal:
+ in_ := lookupAdminWithCtxSetDnsServersRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.SetDnsServers(args_.Ctx, in_.Servers)
+ out_ := lookupAdminWithCtxSetDnsServersResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case LookupAdminGetDnsServersOrdinal:
+ servers, err_ := s_.Impl.GetDnsServers(args_.Ctx)
+ out_ := lookupAdminWithCtxGetDnsServersResponse{}
+ out_.Servers = servers
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type LookupAdminEventProxy _bindings.ChannelProxy
+
+const (
+ DnsServerWatcherWatchServersOrdinal uint64 = 0x5748907e7f11b632
+)
+
+type DnsServerWatcherWithCtxInterface _bindings.ChannelProxy
+
+// Returns a list of DNS servers.
+//
+// First call always returns a snapshot of the current list of servers or blocks if an empty
+// list would be returned. Subsequent calls will block until the list of servers changes.
+//
+// The list of servers changes over time by configuration or network topology changes,
+// expiration, etc. Callers must repeatedly call `WatchServers` and replace any previously
+// returned `servers` with new ones to avoid using stale or expired entries.
+//
+// It is invalid to call `WatchServers` while a previous call is still pending. Doing so will
+// cause the `DnsServerWatcher` channel to be closed.
+//
+// - response `servers` The list of servers to use for DNS resolution, in priority order.
+func (p *DnsServerWatcherWithCtxInterface) WatchServers(ctx_ _bindings.Context) ([]DnsServer, error) {
+ var req_ _bindings.Message
+ resp_ := &dnsServerWatcherWithCtxWatchServersResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DnsServerWatcherWatchServersOrdinal, req_, resp_)
+ return resp_.Servers, err_
+}
+
+// Provides a hanging get interface to watch for DNS servers configuration.
+type DnsServerWatcherWithCtx interface {
+ // Returns a list of DNS servers.
+ //
+ // First call always returns a snapshot of the current list of servers or blocks if an empty
+ // list would be returned. Subsequent calls will block until the list of servers changes.
+ //
+ // The list of servers changes over time by configuration or network topology changes,
+ // expiration, etc. Callers must repeatedly call `WatchServers` and replace any previously
+ // returned `servers` with new ones to avoid using stale or expired entries.
+ //
+ // It is invalid to call `WatchServers` while a previous call is still pending. Doing so will
+ // cause the `DnsServerWatcher` channel to be closed.
+ //
+ // - response `servers` The list of servers to use for DNS resolution, in priority order.
+ WatchServers(ctx_ _bindings.Context) ([]DnsServer, error)
+}
+
+type DnsServerWatcherWithCtxTransitionalBase struct{}
+
+type DnsServerWatcherWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDnsServerWatcherWithCtxInterfaceRequest() (DnsServerWatcherWithCtxInterfaceRequest, *DnsServerWatcherWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DnsServerWatcherWithCtxInterfaceRequest(req), (*DnsServerWatcherWithCtxInterface)(cli), err
+}
+
+type DnsServerWatcherWithCtxStub struct {
+ Impl DnsServerWatcherWithCtx
+}
+
+func (s_ *DnsServerWatcherWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DnsServerWatcherWatchServersOrdinal:
+ servers, err_ := s_.Impl.WatchServers(args_.Ctx)
+ out_ := dnsServerWatcherWithCtxWatchServersResponse{}
+ out_.Servers = servers
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DnsServerWatcherEventProxy _bindings.ChannelProxy
diff --git a/src/syscall/zx/net/stack/impl.go b/src/syscall/zx/net/stack/impl.go
new file mode 100644
index 0000000..031ae4c
--- /dev/null
+++ b/src/syscall/zx/net/stack/impl.go
@@ -0,0 +1,2374 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package stack
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+ fuchsiahardwareethernet "syscall/zx/hardware/ethernet"
+ fuchsiahardwarenetwork "syscall/zx/hardware/network"
+ fuchsialogger "syscall/zx/logger"
+ fuchsianet "syscall/zx/net"
+ fuchsianetname "syscall/zx/net/name"
+)
+
+var _ _bindings.Enum = PresenceStatus(0)
+
+type PresenceStatus uint32
+
+const (
+
+ // The interface is added.
+ PresenceStatusAdded PresenceStatus = 1
+
+ // The interface is removed.
+ PresenceStatusRemoved PresenceStatus = 2
+)
+
+func (_ PresenceStatus) I_EnumValues() []PresenceStatus {
+ return []PresenceStatus{
+ PresenceStatusAdded,
+ PresenceStatusRemoved,
+ }
+}
+
+func (_ PresenceStatus) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x PresenceStatus) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x PresenceStatus) String() string {
+ switch x {
+ case 1:
+ return "Added"
+ case 2:
+ return "Removed"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = PhysicalStatus(0)
+
+type PhysicalStatus uint32
+
+const (
+
+ // The link is not attached to the medium.
+ PhysicalStatusDown PhysicalStatus = 1
+
+ // The link is attached to the medium.
+ PhysicalStatusUp PhysicalStatus = 2
+)
+
+func (_ PhysicalStatus) I_EnumValues() []PhysicalStatus {
+ return []PhysicalStatus{
+ PhysicalStatusDown,
+ PhysicalStatusUp,
+ }
+}
+
+func (_ PhysicalStatus) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x PhysicalStatus) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x PhysicalStatus) String() string {
+ switch x {
+ case 1:
+ return "Down"
+ case 2:
+ return "Up"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = AdministrativeStatus(0)
+
+type AdministrativeStatus uint32
+
+const (
+
+ // The interface is administratively disabled.
+ AdministrativeStatusDisabled AdministrativeStatus = 1
+
+ // The interface is administratively enabled.
+ AdministrativeStatusEnabled AdministrativeStatus = 2
+)
+
+func (_ AdministrativeStatus) I_EnumValues() []AdministrativeStatus {
+ return []AdministrativeStatus{
+ AdministrativeStatusDisabled,
+ AdministrativeStatusEnabled,
+ }
+}
+
+func (_ AdministrativeStatus) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x AdministrativeStatus) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x AdministrativeStatus) String() string {
+ switch x {
+ case 1:
+ return "Disabled"
+ case 2:
+ return "Enabled"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = Error(0)
+
+type Error uint32
+
+const (
+ ErrorInternal Error = 1
+ ErrorNotSupported Error = 2
+ ErrorInvalidArgs Error = 3
+ ErrorBadState Error = 4
+ ErrorTimeOut Error = 5
+ ErrorNotFound Error = 6
+ ErrorAlreadyExists Error = 7
+ ErrorIo Error = 8
+)
+
+func (_ Error) I_EnumValues() []Error {
+ return []Error{
+ ErrorInternal,
+ ErrorNotSupported,
+ ErrorInvalidArgs,
+ ErrorBadState,
+ ErrorTimeOut,
+ ErrorNotFound,
+ ErrorAlreadyExists,
+ ErrorIo,
+ }
+}
+
+func (_ Error) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x Error) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ case 4:
+ return true
+ case 5:
+ return true
+ case 6:
+ return true
+ case 7:
+ return true
+ case 8:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x Error) String() string {
+ switch x {
+ case 1:
+ return "Internal"
+ case 2:
+ return "NotSupported"
+ case 3:
+ return "InvalidArgs"
+ case 4:
+ return "BadState"
+ case 5:
+ return "TimeOut"
+ case 6:
+ return "NotFound"
+ case 7:
+ return "AlreadyExists"
+ case 8:
+ return "Io"
+ }
+ return "Unknown"
+}
+
+type StackAddEthernetInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+}
+
+var _mStackAddEthernetInterfaceResponse = _bindings.CreateLazyMarshaler(StackAddEthernetInterfaceResponse{})
+
+func (msg *StackAddEthernetInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mStackAddEthernetInterfaceResponse
+}
+
+type StackAddInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+}
+
+var _mStackAddInterfaceResponse = _bindings.CreateLazyMarshaler(StackAddInterfaceResponse{})
+
+func (msg *StackAddInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mStackAddInterfaceResponse
+}
+
+type StackDelEthernetInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStackDelEthernetInterfaceResponse = _bindings.CreateLazyMarshaler(StackDelEthernetInterfaceResponse{})
+
+func (msg *StackDelEthernetInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mStackDelEthernetInterfaceResponse
+}
+
+type StackGetInterfaceInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"96" fidl_alignment_v1:"8"`
+ Info InterfaceInfo `fidl_offset_v1:"0"`
+}
+
+var _mStackGetInterfaceInfoResponse = _bindings.CreateLazyMarshaler(StackGetInterfaceInfoResponse{})
+
+func (msg *StackGetInterfaceInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mStackGetInterfaceInfoResponse
+}
+
+type StackEnableInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStackEnableInterfaceResponse = _bindings.CreateLazyMarshaler(StackEnableInterfaceResponse{})
+
+func (msg *StackEnableInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mStackEnableInterfaceResponse
+}
+
+type StackDisableInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStackDisableInterfaceResponse = _bindings.CreateLazyMarshaler(StackDisableInterfaceResponse{})
+
+func (msg *StackDisableInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mStackDisableInterfaceResponse
+}
+
+type StackAddInterfaceAddressResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStackAddInterfaceAddressResponse = _bindings.CreateLazyMarshaler(StackAddInterfaceAddressResponse{})
+
+func (msg *StackAddInterfaceAddressResponse) Marshaler() _bindings.Marshaler {
+ return _mStackAddInterfaceAddressResponse
+}
+
+type StackDelInterfaceAddressResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStackDelInterfaceAddressResponse = _bindings.CreateLazyMarshaler(StackDelInterfaceAddressResponse{})
+
+func (msg *StackDelInterfaceAddressResponse) Marshaler() _bindings.Marshaler {
+ return _mStackDelInterfaceAddressResponse
+}
+
+type StackAddForwardingEntryResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStackAddForwardingEntryResponse = _bindings.CreateLazyMarshaler(StackAddForwardingEntryResponse{})
+
+func (msg *StackAddForwardingEntryResponse) Marshaler() _bindings.Marshaler {
+ return _mStackAddForwardingEntryResponse
+}
+
+type StackDelForwardingEntryResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStackDelForwardingEntryResponse = _bindings.CreateLazyMarshaler(StackDelForwardingEntryResponse{})
+
+func (msg *StackDelForwardingEntryResponse) Marshaler() _bindings.Marshaler {
+ return _mStackDelForwardingEntryResponse
+}
+
+type StackEnablePacketFilterResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStackEnablePacketFilterResponse = _bindings.CreateLazyMarshaler(StackEnablePacketFilterResponse{})
+
+func (msg *StackEnablePacketFilterResponse) Marshaler() _bindings.Marshaler {
+ return _mStackEnablePacketFilterResponse
+}
+
+type StackDisablePacketFilterResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStackDisablePacketFilterResponse = _bindings.CreateLazyMarshaler(StackDisablePacketFilterResponse{})
+
+func (msg *StackDisablePacketFilterResponse) Marshaler() _bindings.Marshaler {
+ return _mStackDisablePacketFilterResponse
+}
+
+type LogSetLogLevelResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mLogSetLogLevelResponse = _bindings.CreateLazyMarshaler(LogSetLogLevelResponse{})
+
+func (msg *LogSetLogLevelResponse) Marshaler() _bindings.Marshaler {
+ return _mLogSetLogLevelResponse
+}
+
+type InterfaceInfo struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"96" fidl_alignment_v1:"8"`
+ // An opaque identifier for the interface, assigned by the stack.
+ // This identifier will never be 0, and will not be reused even if the device is removed and
+ // subsequently re-added. It is not stable across netstack instances.
+ Id uint64 `fidl_offset_v1:"0"`
+ // All info of an interface except the interface name.
+ Properties InterfaceProperties `fidl_offset_v1:"8"`
+}
+
+var _mInterfaceInfo = _bindings.CreateLazyMarshaler(InterfaceInfo{})
+
+func (msg *InterfaceInfo) Marshaler() _bindings.Marshaler {
+ return _mInterfaceInfo
+}
+
+type InterfaceProperties struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"88" fidl_alignment_v1:"8"`
+ // Human-readable name of the interface. eg. eth001, wlanx35.
+ Name string `fidl_offset_v1:"0" fidl_bounds:"15"`
+ // The topological path to the device, representing a stable identifier for the interface
+ // hardware.
+ Topopath string `fidl_offset_v1:"16" fidl_bounds:"255"`
+ // An unstable file path corresponding to the interface. Used in watching the creation
+ // and destruction of the interface, or in accessing the interface using netdump.
+ Filepath string `fidl_offset_v1:"32" fidl_bounds:"255"`
+ // The MAC address of the interface, if available.
+ Mac *fuchsiahardwareethernet.MacAddress `fidl_offset_v1:"48"`
+ // The maximum transmission unit for the interface in bytes.
+ Mtu uint32 `fidl_offset_v1:"56"`
+ // The features present on the interface.
+ Features fuchsiahardwareethernet.Features `fidl_offset_v1:"60"`
+ // The administrative status of the interface.
+ AdministrativeStatus AdministrativeStatus `fidl_offset_v1:"64"`
+ // The physical link status of the interface.
+ PhysicalStatus PhysicalStatus `fidl_offset_v1:"68"`
+ // The list of addresses currently assigned to the interface.
+ Addresses []fuchsianet.Subnet `fidl_offset_v1:"72" fidl_bounds:""`
+}
+
+var _mInterfaceProperties = _bindings.CreateLazyMarshaler(InterfaceProperties{})
+
+func (msg *InterfaceProperties) Marshaler() _bindings.Marshaler {
+ return _mInterfaceProperties
+}
+
+// An entry in the forwarding table for the network stack.
+type ForwardingEntry struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"56" fidl_alignment_v1:"8"`
+ // The subnet is the key for the entry in the table.
+ Subnet fuchsianet.Subnet `fidl_offset_v1:"0"`
+ // The destination that will receive the forwarded packet.
+ Destination ForwardingDestination `fidl_offset_v1:"32"`
+}
+
+var _mForwardingEntry = _bindings.CreateLazyMarshaler(ForwardingEntry{})
+
+func (msg *ForwardingEntry) Marshaler() _bindings.Marshaler {
+ return _mForwardingEntry
+}
+
+type InterfaceStatusChange struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ // The opaque identifier of the device that had its status change.
+ Id uint64 `fidl_offset_v1:"0"`
+ // The new status.
+ Status InterfaceStatus `fidl_offset_v1:"8"`
+}
+
+var _mInterfaceStatusChange = _bindings.CreateLazyMarshaler(InterfaceStatusChange{})
+
+func (msg *InterfaceStatusChange) Marshaler() _bindings.Marshaler {
+ return _mInterfaceStatusChange
+}
+
+// An Ethernet device.
+// The provided `network_device` is expected to support `Ethernet` frames.
+// Its MAC address and MAC filtering is controlled by the provided `mac` channel.
+type EthernetDeviceDefinition struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"4"`
+ // The connection to the device's data plane.
+ NetworkDevice fuchsiahardwarenetwork.DeviceWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+ // The connection to the device's addressing control plane.
+ Mac fuchsiahardwarenetwork.MacAddressingWithCtxInterface `fidl_offset_v1:"4" fidl_handle_subtype:"4"`
+}
+
+var _mEthernetDeviceDefinition = _bindings.CreateLazyMarshaler(EthernetDeviceDefinition{})
+
+func (msg *EthernetDeviceDefinition) Marshaler() _bindings.Marshaler {
+ return _mEthernetDeviceDefinition
+}
+
+type stackWithCtxAddEthernetInterfaceRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ TopologicalPath string `fidl_offset_v1:"0" fidl_bounds:"255"`
+ Device fuchsiahardwareethernet.DeviceWithCtxInterface `fidl_offset_v1:"16" fidl_handle_subtype:"4"`
+}
+
+var _mstackWithCtxAddEthernetInterfaceRequest = _bindings.CreateLazyMarshaler(stackWithCtxAddEthernetInterfaceRequest{})
+
+func (msg *stackWithCtxAddEthernetInterfaceRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxAddEthernetInterfaceRequest
+}
+
+type stackWithCtxAddEthernetInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackAddEthernetInterfaceResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxAddEthernetInterfaceResponse = _bindings.CreateLazyMarshaler(stackWithCtxAddEthernetInterfaceResponse{})
+
+func (msg *stackWithCtxAddEthernetInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxAddEthernetInterfaceResponse
+}
+
+type stackWithCtxAddInterfaceRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Config InterfaceConfig `fidl_offset_v1:"0"`
+ Device DeviceDefinition `fidl_offset_v1:"16"`
+}
+
+var _mstackWithCtxAddInterfaceRequest = _bindings.CreateLazyMarshaler(stackWithCtxAddInterfaceRequest{})
+
+func (msg *stackWithCtxAddInterfaceRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxAddInterfaceRequest
+}
+
+type stackWithCtxAddInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackAddInterfaceResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxAddInterfaceResponse = _bindings.CreateLazyMarshaler(stackWithCtxAddInterfaceResponse{})
+
+func (msg *stackWithCtxAddInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxAddInterfaceResponse
+}
+
+type stackWithCtxDelEthernetInterfaceRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxDelEthernetInterfaceRequest = _bindings.CreateLazyMarshaler(stackWithCtxDelEthernetInterfaceRequest{})
+
+func (msg *stackWithCtxDelEthernetInterfaceRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDelEthernetInterfaceRequest
+}
+
+type stackWithCtxDelEthernetInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackDelEthernetInterfaceResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxDelEthernetInterfaceResponse = _bindings.CreateLazyMarshaler(stackWithCtxDelEthernetInterfaceResponse{})
+
+func (msg *stackWithCtxDelEthernetInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDelEthernetInterfaceResponse
+}
+
+type stackWithCtxListInterfacesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Ifs []InterfaceInfo `fidl_offset_v1:"0" fidl_bounds:"255"`
+}
+
+var _mstackWithCtxListInterfacesResponse = _bindings.CreateLazyMarshaler(stackWithCtxListInterfacesResponse{})
+
+func (msg *stackWithCtxListInterfacesResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxListInterfacesResponse
+}
+
+type stackWithCtxGetInterfaceInfoRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxGetInterfaceInfoRequest = _bindings.CreateLazyMarshaler(stackWithCtxGetInterfaceInfoRequest{})
+
+func (msg *stackWithCtxGetInterfaceInfoRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxGetInterfaceInfoRequest
+}
+
+type stackWithCtxGetInterfaceInfoResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackGetInterfaceInfoResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxGetInterfaceInfoResponse = _bindings.CreateLazyMarshaler(stackWithCtxGetInterfaceInfoResponse{})
+
+func (msg *stackWithCtxGetInterfaceInfoResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxGetInterfaceInfoResponse
+}
+
+type stackWithCtxEnableInterfaceRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxEnableInterfaceRequest = _bindings.CreateLazyMarshaler(stackWithCtxEnableInterfaceRequest{})
+
+func (msg *stackWithCtxEnableInterfaceRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxEnableInterfaceRequest
+}
+
+type stackWithCtxEnableInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackEnableInterfaceResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxEnableInterfaceResponse = _bindings.CreateLazyMarshaler(stackWithCtxEnableInterfaceResponse{})
+
+func (msg *stackWithCtxEnableInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxEnableInterfaceResponse
+}
+
+type stackWithCtxDisableInterfaceRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxDisableInterfaceRequest = _bindings.CreateLazyMarshaler(stackWithCtxDisableInterfaceRequest{})
+
+func (msg *stackWithCtxDisableInterfaceRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDisableInterfaceRequest
+}
+
+type stackWithCtxDisableInterfaceResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackDisableInterfaceResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxDisableInterfaceResponse = _bindings.CreateLazyMarshaler(stackWithCtxDisableInterfaceResponse{})
+
+func (msg *stackWithCtxDisableInterfaceResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDisableInterfaceResponse
+}
+
+type stackWithCtxAddInterfaceAddressRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+ Addr fuchsianet.Subnet `fidl_offset_v1:"8"`
+}
+
+var _mstackWithCtxAddInterfaceAddressRequest = _bindings.CreateLazyMarshaler(stackWithCtxAddInterfaceAddressRequest{})
+
+func (msg *stackWithCtxAddInterfaceAddressRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxAddInterfaceAddressRequest
+}
+
+type stackWithCtxAddInterfaceAddressResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackAddInterfaceAddressResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxAddInterfaceAddressResponse = _bindings.CreateLazyMarshaler(stackWithCtxAddInterfaceAddressResponse{})
+
+func (msg *stackWithCtxAddInterfaceAddressResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxAddInterfaceAddressResponse
+}
+
+type stackWithCtxDelInterfaceAddressRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"40" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+ Addr fuchsianet.Subnet `fidl_offset_v1:"8"`
+}
+
+var _mstackWithCtxDelInterfaceAddressRequest = _bindings.CreateLazyMarshaler(stackWithCtxDelInterfaceAddressRequest{})
+
+func (msg *stackWithCtxDelInterfaceAddressRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDelInterfaceAddressRequest
+}
+
+type stackWithCtxDelInterfaceAddressResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackDelInterfaceAddressResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxDelInterfaceAddressResponse = _bindings.CreateLazyMarshaler(stackWithCtxDelInterfaceAddressResponse{})
+
+func (msg *stackWithCtxDelInterfaceAddressResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDelInterfaceAddressResponse
+}
+
+type stackWithCtxGetForwardingTableResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Table []ForwardingEntry `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mstackWithCtxGetForwardingTableResponse = _bindings.CreateLazyMarshaler(stackWithCtxGetForwardingTableResponse{})
+
+func (msg *stackWithCtxGetForwardingTableResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxGetForwardingTableResponse
+}
+
+type stackWithCtxAddForwardingEntryRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"56" fidl_alignment_v1:"8"`
+ Entry ForwardingEntry `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxAddForwardingEntryRequest = _bindings.CreateLazyMarshaler(stackWithCtxAddForwardingEntryRequest{})
+
+func (msg *stackWithCtxAddForwardingEntryRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxAddForwardingEntryRequest
+}
+
+type stackWithCtxAddForwardingEntryResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackAddForwardingEntryResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxAddForwardingEntryResponse = _bindings.CreateLazyMarshaler(stackWithCtxAddForwardingEntryResponse{})
+
+func (msg *stackWithCtxAddForwardingEntryResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxAddForwardingEntryResponse
+}
+
+type stackWithCtxDelForwardingEntryRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ Subnet fuchsianet.Subnet `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxDelForwardingEntryRequest = _bindings.CreateLazyMarshaler(stackWithCtxDelForwardingEntryRequest{})
+
+func (msg *stackWithCtxDelForwardingEntryRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDelForwardingEntryRequest
+}
+
+type stackWithCtxDelForwardingEntryResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackDelForwardingEntryResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxDelForwardingEntryResponse = _bindings.CreateLazyMarshaler(stackWithCtxDelForwardingEntryResponse{})
+
+func (msg *stackWithCtxDelForwardingEntryResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDelForwardingEntryResponse
+}
+
+type stackWithCtxEnablePacketFilterRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxEnablePacketFilterRequest = _bindings.CreateLazyMarshaler(stackWithCtxEnablePacketFilterRequest{})
+
+func (msg *stackWithCtxEnablePacketFilterRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxEnablePacketFilterRequest
+}
+
+type stackWithCtxEnablePacketFilterResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackEnablePacketFilterResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxEnablePacketFilterResponse = _bindings.CreateLazyMarshaler(stackWithCtxEnablePacketFilterResponse{})
+
+func (msg *stackWithCtxEnablePacketFilterResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxEnablePacketFilterResponse
+}
+
+type stackWithCtxDisablePacketFilterRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Id uint64 `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxDisablePacketFilterRequest = _bindings.CreateLazyMarshaler(stackWithCtxDisablePacketFilterRequest{})
+
+func (msg *stackWithCtxDisablePacketFilterRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDisablePacketFilterRequest
+}
+
+type stackWithCtxDisablePacketFilterResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StackDisablePacketFilterResult `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxDisablePacketFilterResponse = _bindings.CreateLazyMarshaler(stackWithCtxDisablePacketFilterResponse{})
+
+func (msg *stackWithCtxDisablePacketFilterResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxDisablePacketFilterResponse
+}
+
+type stackWithCtxGetDnsServerWatcherRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Watcher fuchsianetname.DnsServerWatcherWithCtxInterfaceRequest `fidl_offset_v1:"0" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mstackWithCtxGetDnsServerWatcherRequest = _bindings.CreateLazyMarshaler(stackWithCtxGetDnsServerWatcherRequest{})
+
+func (msg *stackWithCtxGetDnsServerWatcherRequest) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxGetDnsServerWatcherRequest
+}
+
+type stackWithCtxOnInterfaceStatusChangeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ Info InterfaceStatusChange `fidl_offset_v1:"0"`
+}
+
+var _mstackWithCtxOnInterfaceStatusChangeResponse = _bindings.CreateLazyMarshaler(stackWithCtxOnInterfaceStatusChangeResponse{})
+
+func (msg *stackWithCtxOnInterfaceStatusChangeResponse) Marshaler() _bindings.Marshaler {
+ return _mstackWithCtxOnInterfaceStatusChangeResponse
+}
+
+type logWithCtxSetLogLevelRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Level fuchsialogger.LogLevelFilter `fidl_offset_v1:"0"`
+}
+
+var _mlogWithCtxSetLogLevelRequest = _bindings.CreateLazyMarshaler(logWithCtxSetLogLevelRequest{})
+
+func (msg *logWithCtxSetLogLevelRequest) Marshaler() _bindings.Marshaler {
+ return _mlogWithCtxSetLogLevelRequest
+}
+
+type logWithCtxSetLogLevelResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result LogSetLogLevelResult `fidl_offset_v1:"0"`
+}
+
+var _mlogWithCtxSetLogLevelResponse = _bindings.CreateLazyMarshaler(logWithCtxSetLogLevelResponse{})
+
+func (msg *logWithCtxSetLogLevelResponse) Marshaler() _bindings.Marshaler {
+ return _mlogWithCtxSetLogLevelResponse
+}
+
+type logWithCtxSetLogPacketsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Enabled bool `fidl_offset_v1:"0"`
+}
+
+var _mlogWithCtxSetLogPacketsRequest = _bindings.CreateLazyMarshaler(logWithCtxSetLogPacketsRequest{})
+
+func (msg *logWithCtxSetLogPacketsRequest) Marshaler() _bindings.Marshaler {
+ return _mlogWithCtxSetLogPacketsRequest
+}
+
+type I_stackAddEthernetInterfaceResultTag uint64
+
+const (
+ StackAddEthernetInterfaceResultResponse = 1 // 0x00000001
+ StackAddEthernetInterfaceResultErr = 2 // 0x00000002
+)
+
+type StackAddEthernetInterfaceResult struct {
+ I_stackAddEthernetInterfaceResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackAddEthernetInterfaceResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackAddEthernetInterfaceResult) reset() {
+ switch _m.I_stackAddEthernetInterfaceResultTag {
+ case 1:
+ var _zeroed StackAddEthernetInterfaceResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackAddEthernetInterfaceResult) Which() I_stackAddEthernetInterfaceResultTag {
+ return _m.I_stackAddEthernetInterfaceResultTag
+}
+
+func (_m *StackAddEthernetInterfaceResult) Ordinal() uint64 {
+ return uint64(_m.I_stackAddEthernetInterfaceResultTag)
+}
+
+func (_m *StackAddEthernetInterfaceResult) SetResponse(response StackAddEthernetInterfaceResponse) {
+ _m.reset()
+ _m.I_stackAddEthernetInterfaceResultTag = StackAddEthernetInterfaceResultResponse
+ _m.Response = response
+}
+
+func StackAddEthernetInterfaceResultWithResponse(response StackAddEthernetInterfaceResponse) StackAddEthernetInterfaceResult {
+ var _u StackAddEthernetInterfaceResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackAddEthernetInterfaceResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackAddEthernetInterfaceResultTag = StackAddEthernetInterfaceResultErr
+ _m.Err = err
+}
+
+func StackAddEthernetInterfaceResultWithErr(err Error) StackAddEthernetInterfaceResult {
+ var _u StackAddEthernetInterfaceResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackAddInterfaceResultTag uint64
+
+const (
+ StackAddInterfaceResultResponse = 1 // 0x00000001
+ StackAddInterfaceResultErr = 2 // 0x00000002
+)
+
+type StackAddInterfaceResult struct {
+ I_stackAddInterfaceResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackAddInterfaceResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackAddInterfaceResult) reset() {
+ switch _m.I_stackAddInterfaceResultTag {
+ case 1:
+ var _zeroed StackAddInterfaceResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackAddInterfaceResult) Which() I_stackAddInterfaceResultTag {
+ return _m.I_stackAddInterfaceResultTag
+}
+
+func (_m *StackAddInterfaceResult) Ordinal() uint64 {
+ return uint64(_m.I_stackAddInterfaceResultTag)
+}
+
+func (_m *StackAddInterfaceResult) SetResponse(response StackAddInterfaceResponse) {
+ _m.reset()
+ _m.I_stackAddInterfaceResultTag = StackAddInterfaceResultResponse
+ _m.Response = response
+}
+
+func StackAddInterfaceResultWithResponse(response StackAddInterfaceResponse) StackAddInterfaceResult {
+ var _u StackAddInterfaceResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackAddInterfaceResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackAddInterfaceResultTag = StackAddInterfaceResultErr
+ _m.Err = err
+}
+
+func StackAddInterfaceResultWithErr(err Error) StackAddInterfaceResult {
+ var _u StackAddInterfaceResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackDelEthernetInterfaceResultTag uint64
+
+const (
+ StackDelEthernetInterfaceResultResponse = 1 // 0x00000001
+ StackDelEthernetInterfaceResultErr = 2 // 0x00000002
+)
+
+type StackDelEthernetInterfaceResult struct {
+ I_stackDelEthernetInterfaceResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackDelEthernetInterfaceResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackDelEthernetInterfaceResult) reset() {
+ switch _m.I_stackDelEthernetInterfaceResultTag {
+ case 1:
+ var _zeroed StackDelEthernetInterfaceResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackDelEthernetInterfaceResult) Which() I_stackDelEthernetInterfaceResultTag {
+ return _m.I_stackDelEthernetInterfaceResultTag
+}
+
+func (_m *StackDelEthernetInterfaceResult) Ordinal() uint64 {
+ return uint64(_m.I_stackDelEthernetInterfaceResultTag)
+}
+
+func (_m *StackDelEthernetInterfaceResult) SetResponse(response StackDelEthernetInterfaceResponse) {
+ _m.reset()
+ _m.I_stackDelEthernetInterfaceResultTag = StackDelEthernetInterfaceResultResponse
+ _m.Response = response
+}
+
+func StackDelEthernetInterfaceResultWithResponse(response StackDelEthernetInterfaceResponse) StackDelEthernetInterfaceResult {
+ var _u StackDelEthernetInterfaceResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackDelEthernetInterfaceResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackDelEthernetInterfaceResultTag = StackDelEthernetInterfaceResultErr
+ _m.Err = err
+}
+
+func StackDelEthernetInterfaceResultWithErr(err Error) StackDelEthernetInterfaceResult {
+ var _u StackDelEthernetInterfaceResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackGetInterfaceInfoResultTag uint64
+
+const (
+ StackGetInterfaceInfoResultResponse = 1 // 0x00000001
+ StackGetInterfaceInfoResultErr = 2 // 0x00000002
+)
+
+type StackGetInterfaceInfoResult struct {
+ I_stackGetInterfaceInfoResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackGetInterfaceInfoResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackGetInterfaceInfoResult) reset() {
+ switch _m.I_stackGetInterfaceInfoResultTag {
+ case 1:
+ var _zeroed StackGetInterfaceInfoResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackGetInterfaceInfoResult) Which() I_stackGetInterfaceInfoResultTag {
+ return _m.I_stackGetInterfaceInfoResultTag
+}
+
+func (_m *StackGetInterfaceInfoResult) Ordinal() uint64 {
+ return uint64(_m.I_stackGetInterfaceInfoResultTag)
+}
+
+func (_m *StackGetInterfaceInfoResult) SetResponse(response StackGetInterfaceInfoResponse) {
+ _m.reset()
+ _m.I_stackGetInterfaceInfoResultTag = StackGetInterfaceInfoResultResponse
+ _m.Response = response
+}
+
+func StackGetInterfaceInfoResultWithResponse(response StackGetInterfaceInfoResponse) StackGetInterfaceInfoResult {
+ var _u StackGetInterfaceInfoResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackGetInterfaceInfoResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackGetInterfaceInfoResultTag = StackGetInterfaceInfoResultErr
+ _m.Err = err
+}
+
+func StackGetInterfaceInfoResultWithErr(err Error) StackGetInterfaceInfoResult {
+ var _u StackGetInterfaceInfoResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackEnableInterfaceResultTag uint64
+
+const (
+ StackEnableInterfaceResultResponse = 1 // 0x00000001
+ StackEnableInterfaceResultErr = 2 // 0x00000002
+)
+
+type StackEnableInterfaceResult struct {
+ I_stackEnableInterfaceResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackEnableInterfaceResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackEnableInterfaceResult) reset() {
+ switch _m.I_stackEnableInterfaceResultTag {
+ case 1:
+ var _zeroed StackEnableInterfaceResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackEnableInterfaceResult) Which() I_stackEnableInterfaceResultTag {
+ return _m.I_stackEnableInterfaceResultTag
+}
+
+func (_m *StackEnableInterfaceResult) Ordinal() uint64 {
+ return uint64(_m.I_stackEnableInterfaceResultTag)
+}
+
+func (_m *StackEnableInterfaceResult) SetResponse(response StackEnableInterfaceResponse) {
+ _m.reset()
+ _m.I_stackEnableInterfaceResultTag = StackEnableInterfaceResultResponse
+ _m.Response = response
+}
+
+func StackEnableInterfaceResultWithResponse(response StackEnableInterfaceResponse) StackEnableInterfaceResult {
+ var _u StackEnableInterfaceResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackEnableInterfaceResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackEnableInterfaceResultTag = StackEnableInterfaceResultErr
+ _m.Err = err
+}
+
+func StackEnableInterfaceResultWithErr(err Error) StackEnableInterfaceResult {
+ var _u StackEnableInterfaceResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackDisableInterfaceResultTag uint64
+
+const (
+ StackDisableInterfaceResultResponse = 1 // 0x00000001
+ StackDisableInterfaceResultErr = 2 // 0x00000002
+)
+
+type StackDisableInterfaceResult struct {
+ I_stackDisableInterfaceResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackDisableInterfaceResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackDisableInterfaceResult) reset() {
+ switch _m.I_stackDisableInterfaceResultTag {
+ case 1:
+ var _zeroed StackDisableInterfaceResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackDisableInterfaceResult) Which() I_stackDisableInterfaceResultTag {
+ return _m.I_stackDisableInterfaceResultTag
+}
+
+func (_m *StackDisableInterfaceResult) Ordinal() uint64 {
+ return uint64(_m.I_stackDisableInterfaceResultTag)
+}
+
+func (_m *StackDisableInterfaceResult) SetResponse(response StackDisableInterfaceResponse) {
+ _m.reset()
+ _m.I_stackDisableInterfaceResultTag = StackDisableInterfaceResultResponse
+ _m.Response = response
+}
+
+func StackDisableInterfaceResultWithResponse(response StackDisableInterfaceResponse) StackDisableInterfaceResult {
+ var _u StackDisableInterfaceResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackDisableInterfaceResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackDisableInterfaceResultTag = StackDisableInterfaceResultErr
+ _m.Err = err
+}
+
+func StackDisableInterfaceResultWithErr(err Error) StackDisableInterfaceResult {
+ var _u StackDisableInterfaceResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackAddInterfaceAddressResultTag uint64
+
+const (
+ StackAddInterfaceAddressResultResponse = 1 // 0x00000001
+ StackAddInterfaceAddressResultErr = 2 // 0x00000002
+)
+
+type StackAddInterfaceAddressResult struct {
+ I_stackAddInterfaceAddressResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackAddInterfaceAddressResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackAddInterfaceAddressResult) reset() {
+ switch _m.I_stackAddInterfaceAddressResultTag {
+ case 1:
+ var _zeroed StackAddInterfaceAddressResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackAddInterfaceAddressResult) Which() I_stackAddInterfaceAddressResultTag {
+ return _m.I_stackAddInterfaceAddressResultTag
+}
+
+func (_m *StackAddInterfaceAddressResult) Ordinal() uint64 {
+ return uint64(_m.I_stackAddInterfaceAddressResultTag)
+}
+
+func (_m *StackAddInterfaceAddressResult) SetResponse(response StackAddInterfaceAddressResponse) {
+ _m.reset()
+ _m.I_stackAddInterfaceAddressResultTag = StackAddInterfaceAddressResultResponse
+ _m.Response = response
+}
+
+func StackAddInterfaceAddressResultWithResponse(response StackAddInterfaceAddressResponse) StackAddInterfaceAddressResult {
+ var _u StackAddInterfaceAddressResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackAddInterfaceAddressResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackAddInterfaceAddressResultTag = StackAddInterfaceAddressResultErr
+ _m.Err = err
+}
+
+func StackAddInterfaceAddressResultWithErr(err Error) StackAddInterfaceAddressResult {
+ var _u StackAddInterfaceAddressResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackDelInterfaceAddressResultTag uint64
+
+const (
+ StackDelInterfaceAddressResultResponse = 1 // 0x00000001
+ StackDelInterfaceAddressResultErr = 2 // 0x00000002
+)
+
+type StackDelInterfaceAddressResult struct {
+ I_stackDelInterfaceAddressResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackDelInterfaceAddressResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackDelInterfaceAddressResult) reset() {
+ switch _m.I_stackDelInterfaceAddressResultTag {
+ case 1:
+ var _zeroed StackDelInterfaceAddressResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackDelInterfaceAddressResult) Which() I_stackDelInterfaceAddressResultTag {
+ return _m.I_stackDelInterfaceAddressResultTag
+}
+
+func (_m *StackDelInterfaceAddressResult) Ordinal() uint64 {
+ return uint64(_m.I_stackDelInterfaceAddressResultTag)
+}
+
+func (_m *StackDelInterfaceAddressResult) SetResponse(response StackDelInterfaceAddressResponse) {
+ _m.reset()
+ _m.I_stackDelInterfaceAddressResultTag = StackDelInterfaceAddressResultResponse
+ _m.Response = response
+}
+
+func StackDelInterfaceAddressResultWithResponse(response StackDelInterfaceAddressResponse) StackDelInterfaceAddressResult {
+ var _u StackDelInterfaceAddressResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackDelInterfaceAddressResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackDelInterfaceAddressResultTag = StackDelInterfaceAddressResultErr
+ _m.Err = err
+}
+
+func StackDelInterfaceAddressResultWithErr(err Error) StackDelInterfaceAddressResult {
+ var _u StackDelInterfaceAddressResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackAddForwardingEntryResultTag uint64
+
+const (
+ StackAddForwardingEntryResultResponse = 1 // 0x00000001
+ StackAddForwardingEntryResultErr = 2 // 0x00000002
+)
+
+type StackAddForwardingEntryResult struct {
+ I_stackAddForwardingEntryResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackAddForwardingEntryResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackAddForwardingEntryResult) reset() {
+ switch _m.I_stackAddForwardingEntryResultTag {
+ case 1:
+ var _zeroed StackAddForwardingEntryResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackAddForwardingEntryResult) Which() I_stackAddForwardingEntryResultTag {
+ return _m.I_stackAddForwardingEntryResultTag
+}
+
+func (_m *StackAddForwardingEntryResult) Ordinal() uint64 {
+ return uint64(_m.I_stackAddForwardingEntryResultTag)
+}
+
+func (_m *StackAddForwardingEntryResult) SetResponse(response StackAddForwardingEntryResponse) {
+ _m.reset()
+ _m.I_stackAddForwardingEntryResultTag = StackAddForwardingEntryResultResponse
+ _m.Response = response
+}
+
+func StackAddForwardingEntryResultWithResponse(response StackAddForwardingEntryResponse) StackAddForwardingEntryResult {
+ var _u StackAddForwardingEntryResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackAddForwardingEntryResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackAddForwardingEntryResultTag = StackAddForwardingEntryResultErr
+ _m.Err = err
+}
+
+func StackAddForwardingEntryResultWithErr(err Error) StackAddForwardingEntryResult {
+ var _u StackAddForwardingEntryResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackDelForwardingEntryResultTag uint64
+
+const (
+ StackDelForwardingEntryResultResponse = 1 // 0x00000001
+ StackDelForwardingEntryResultErr = 2 // 0x00000002
+)
+
+type StackDelForwardingEntryResult struct {
+ I_stackDelForwardingEntryResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackDelForwardingEntryResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackDelForwardingEntryResult) reset() {
+ switch _m.I_stackDelForwardingEntryResultTag {
+ case 1:
+ var _zeroed StackDelForwardingEntryResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackDelForwardingEntryResult) Which() I_stackDelForwardingEntryResultTag {
+ return _m.I_stackDelForwardingEntryResultTag
+}
+
+func (_m *StackDelForwardingEntryResult) Ordinal() uint64 {
+ return uint64(_m.I_stackDelForwardingEntryResultTag)
+}
+
+func (_m *StackDelForwardingEntryResult) SetResponse(response StackDelForwardingEntryResponse) {
+ _m.reset()
+ _m.I_stackDelForwardingEntryResultTag = StackDelForwardingEntryResultResponse
+ _m.Response = response
+}
+
+func StackDelForwardingEntryResultWithResponse(response StackDelForwardingEntryResponse) StackDelForwardingEntryResult {
+ var _u StackDelForwardingEntryResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackDelForwardingEntryResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackDelForwardingEntryResultTag = StackDelForwardingEntryResultErr
+ _m.Err = err
+}
+
+func StackDelForwardingEntryResultWithErr(err Error) StackDelForwardingEntryResult {
+ var _u StackDelForwardingEntryResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackEnablePacketFilterResultTag uint64
+
+const (
+ StackEnablePacketFilterResultResponse = 1 // 0x00000001
+ StackEnablePacketFilterResultErr = 2 // 0x00000002
+)
+
+type StackEnablePacketFilterResult struct {
+ I_stackEnablePacketFilterResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackEnablePacketFilterResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackEnablePacketFilterResult) reset() {
+ switch _m.I_stackEnablePacketFilterResultTag {
+ case 1:
+ var _zeroed StackEnablePacketFilterResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackEnablePacketFilterResult) Which() I_stackEnablePacketFilterResultTag {
+ return _m.I_stackEnablePacketFilterResultTag
+}
+
+func (_m *StackEnablePacketFilterResult) Ordinal() uint64 {
+ return uint64(_m.I_stackEnablePacketFilterResultTag)
+}
+
+func (_m *StackEnablePacketFilterResult) SetResponse(response StackEnablePacketFilterResponse) {
+ _m.reset()
+ _m.I_stackEnablePacketFilterResultTag = StackEnablePacketFilterResultResponse
+ _m.Response = response
+}
+
+func StackEnablePacketFilterResultWithResponse(response StackEnablePacketFilterResponse) StackEnablePacketFilterResult {
+ var _u StackEnablePacketFilterResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackEnablePacketFilterResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackEnablePacketFilterResultTag = StackEnablePacketFilterResultErr
+ _m.Err = err
+}
+
+func StackEnablePacketFilterResultWithErr(err Error) StackEnablePacketFilterResult {
+ var _u StackEnablePacketFilterResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_stackDisablePacketFilterResultTag uint64
+
+const (
+ StackDisablePacketFilterResultResponse = 1 // 0x00000001
+ StackDisablePacketFilterResultErr = 2 // 0x00000002
+)
+
+type StackDisablePacketFilterResult struct {
+ I_stackDisablePacketFilterResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StackDisablePacketFilterResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *StackDisablePacketFilterResult) reset() {
+ switch _m.I_stackDisablePacketFilterResultTag {
+ case 1:
+ var _zeroed StackDisablePacketFilterResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StackDisablePacketFilterResult) Which() I_stackDisablePacketFilterResultTag {
+ return _m.I_stackDisablePacketFilterResultTag
+}
+
+func (_m *StackDisablePacketFilterResult) Ordinal() uint64 {
+ return uint64(_m.I_stackDisablePacketFilterResultTag)
+}
+
+func (_m *StackDisablePacketFilterResult) SetResponse(response StackDisablePacketFilterResponse) {
+ _m.reset()
+ _m.I_stackDisablePacketFilterResultTag = StackDisablePacketFilterResultResponse
+ _m.Response = response
+}
+
+func StackDisablePacketFilterResultWithResponse(response StackDisablePacketFilterResponse) StackDisablePacketFilterResult {
+ var _u StackDisablePacketFilterResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StackDisablePacketFilterResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_stackDisablePacketFilterResultTag = StackDisablePacketFilterResultErr
+ _m.Err = err
+}
+
+func StackDisablePacketFilterResultWithErr(err Error) StackDisablePacketFilterResult {
+ var _u StackDisablePacketFilterResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_logSetLogLevelResultTag uint64
+
+const (
+ LogSetLogLevelResultResponse = 1 // 0x00000001
+ LogSetLogLevelResultErr = 2 // 0x00000002
+)
+
+type LogSetLogLevelResult struct {
+ I_logSetLogLevelResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response LogSetLogLevelResponse `fidl_ordinal:"1"`
+ Err Error `fidl_ordinal:"2"`
+}
+
+func (_m *LogSetLogLevelResult) reset() {
+ switch _m.I_logSetLogLevelResultTag {
+ case 1:
+ var _zeroed LogSetLogLevelResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed Error
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *LogSetLogLevelResult) Which() I_logSetLogLevelResultTag {
+ return _m.I_logSetLogLevelResultTag
+}
+
+func (_m *LogSetLogLevelResult) Ordinal() uint64 {
+ return uint64(_m.I_logSetLogLevelResultTag)
+}
+
+func (_m *LogSetLogLevelResult) SetResponse(response LogSetLogLevelResponse) {
+ _m.reset()
+ _m.I_logSetLogLevelResultTag = LogSetLogLevelResultResponse
+ _m.Response = response
+}
+
+func LogSetLogLevelResultWithResponse(response LogSetLogLevelResponse) LogSetLogLevelResult {
+ var _u LogSetLogLevelResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *LogSetLogLevelResult) SetErr(err Error) {
+ _m.reset()
+ _m.I_logSetLogLevelResultTag = LogSetLogLevelResultErr
+ _m.Err = err
+}
+
+func LogSetLogLevelResultWithErr(err Error) LogSetLogLevelResult {
+ var _u LogSetLogLevelResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_interfaceStatusTag uint64
+
+const (
+ InterfaceStatusPresence = 1 // 0x00000001
+ InterfaceStatusPhysical = 2 // 0x00000002
+ InterfaceStatusAdministrative = 3 // 0x00000003
+)
+
+type InterfaceStatus struct {
+ I_interfaceStatusTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ Presence PresenceStatus `fidl_ordinal:"1"`
+ Physical PhysicalStatus `fidl_ordinal:"2"`
+ Administrative AdministrativeStatus `fidl_ordinal:"3"`
+}
+
+func (_m *InterfaceStatus) reset() {
+ switch _m.I_interfaceStatusTag {
+ case 1:
+ var _zeroed PresenceStatus
+ _m.Presence = _zeroed
+ case 2:
+ var _zeroed PhysicalStatus
+ _m.Physical = _zeroed
+ case 3:
+ var _zeroed AdministrativeStatus
+ _m.Administrative = _zeroed
+ }
+}
+
+func (_m *InterfaceStatus) Which() I_interfaceStatusTag {
+ return _m.I_interfaceStatusTag
+}
+
+func (_m *InterfaceStatus) Ordinal() uint64 {
+ return uint64(_m.I_interfaceStatusTag)
+}
+
+func (_m *InterfaceStatus) SetPresence(presence PresenceStatus) {
+ _m.reset()
+ _m.I_interfaceStatusTag = InterfaceStatusPresence
+ _m.Presence = presence
+}
+
+func InterfaceStatusWithPresence(presence PresenceStatus) InterfaceStatus {
+ var _u InterfaceStatus
+ _u.SetPresence(presence)
+ return _u
+}
+
+func (_m *InterfaceStatus) SetPhysical(physical PhysicalStatus) {
+ _m.reset()
+ _m.I_interfaceStatusTag = InterfaceStatusPhysical
+ _m.Physical = physical
+}
+
+func InterfaceStatusWithPhysical(physical PhysicalStatus) InterfaceStatus {
+ var _u InterfaceStatus
+ _u.SetPhysical(physical)
+ return _u
+}
+
+func (_m *InterfaceStatus) SetAdministrative(administrative AdministrativeStatus) {
+ _m.reset()
+ _m.I_interfaceStatusTag = InterfaceStatusAdministrative
+ _m.Administrative = administrative
+}
+
+func InterfaceStatusWithAdministrative(administrative AdministrativeStatus) InterfaceStatus {
+ var _u InterfaceStatus
+ _u.SetAdministrative(administrative)
+ return _u
+}
+
+type I_forwardingDestinationTag uint64
+
+const (
+ ForwardingDestinationDeviceId = 1 // 0x00000001
+ ForwardingDestinationNextHop = 2 // 0x00000002
+)
+
+// A ForwardingDestination represents either the device that should transmit a packet or the address
+// of the next hop in the route.
+type ForwardingDestination struct {
+ I_forwardingDestinationTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"false"`
+ // The opaque identifier of the device to which packets should be forwarded.
+ DeviceId uint64 `fidl_ordinal:"1"`
+ // The IP address of the next hop, used to look up the next forwarding entry.
+ NextHop fuchsianet.IpAddress `fidl_ordinal:"2"`
+}
+
+func (_m *ForwardingDestination) reset() {
+ switch _m.I_forwardingDestinationTag {
+ case 1:
+ var _zeroed uint64
+ _m.DeviceId = _zeroed
+ case 2:
+ var _zeroed fuchsianet.IpAddress
+ _m.NextHop = _zeroed
+ }
+}
+
+func (_m *ForwardingDestination) Which() I_forwardingDestinationTag {
+ return _m.I_forwardingDestinationTag
+}
+
+func (_m *ForwardingDestination) Ordinal() uint64 {
+ return uint64(_m.I_forwardingDestinationTag)
+}
+
+func (_m *ForwardingDestination) SetDeviceId(deviceId uint64) {
+ _m.reset()
+ _m.I_forwardingDestinationTag = ForwardingDestinationDeviceId
+ _m.DeviceId = deviceId
+}
+
+func ForwardingDestinationWithDeviceId(deviceId uint64) ForwardingDestination {
+ var _u ForwardingDestination
+ _u.SetDeviceId(deviceId)
+ return _u
+}
+
+func (_m *ForwardingDestination) SetNextHop(nextHop fuchsianet.IpAddress) {
+ _m.reset()
+ _m.I_forwardingDestinationTag = ForwardingDestinationNextHop
+ _m.NextHop = nextHop
+}
+
+func ForwardingDestinationWithNextHop(nextHop fuchsianet.IpAddress) ForwardingDestination {
+ var _u ForwardingDestination
+ _u.SetNextHop(nextHop)
+ return _u
+}
+
+type I_deviceDefinitionTag uint64
+
+const (
+ DeviceDefinitionIp = 1 // 0x00000001
+ DeviceDefinitionEthernet = 2 // 0x00000002
+)
+
+// Devices that can be used to back a `Stack` interface.
+type DeviceDefinition struct {
+ I_deviceDefinitionTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ // A `fuchsia.hardware.network.Device` that exchanges only IP frames. It either doesn't have a
+ // layer 2 or its layer 2 is irrelevant to the `Stack`.
+ Ip fuchsiahardwarenetwork.DeviceWithCtxInterface `fidl_handle_subtype:"4" fidl_ordinal:"1"`
+ // An Ethernet device.
+ Ethernet EthernetDeviceDefinition `fidl_ordinal:"2"`
+}
+
+func (_m *DeviceDefinition) reset() {
+ switch _m.I_deviceDefinitionTag {
+ case 1:
+ var _zeroed fuchsiahardwarenetwork.DeviceWithCtxInterface
+ _m.Ip = _zeroed
+ case 2:
+ var _zeroed EthernetDeviceDefinition
+ _m.Ethernet = _zeroed
+ }
+}
+
+func (_m *DeviceDefinition) Which() I_deviceDefinitionTag {
+ return _m.I_deviceDefinitionTag
+}
+
+func (_m *DeviceDefinition) Ordinal() uint64 {
+ return uint64(_m.I_deviceDefinitionTag)
+}
+
+func (_m *DeviceDefinition) SetIp(ip fuchsiahardwarenetwork.DeviceWithCtxInterface) {
+ _m.reset()
+ _m.I_deviceDefinitionTag = DeviceDefinitionIp
+ _m.Ip = ip
+}
+
+func DeviceDefinitionWithIp(ip fuchsiahardwarenetwork.DeviceWithCtxInterface) DeviceDefinition {
+ var _u DeviceDefinition
+ _u.SetIp(ip)
+ return _u
+}
+
+func (_m *DeviceDefinition) SetEthernet(ethernet EthernetDeviceDefinition) {
+ _m.reset()
+ _m.I_deviceDefinitionTag = DeviceDefinitionEthernet
+ _m.Ethernet = ethernet
+}
+
+func DeviceDefinitionWithEthernet(ethernet EthernetDeviceDefinition) DeviceDefinition {
+ var _u DeviceDefinition
+ _u.SetEthernet(ethernet)
+ return _u
+}
+
+// Base configuration for `Stack` interfaces.
+type InterfaceConfig struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // Human-readable name of the interface. eg. eth001, wlanx35.
+ // Will be set to a default generic name if not provided.
+ Name string `fidl_bounds:"15" fidl_ordinal:"1"`
+ NamePresent bool
+ // The topological path to the device, representing a stable identifier for the interface
+ // hardware.
+ Topopath string `fidl_bounds:"255" fidl_ordinal:"2"`
+ TopopathPresent bool
+ // The default metric value used for routes to this interface.
+ Metric uint32 `fidl_ordinal:"3"`
+ MetricPresent bool
+}
+
+func (u *InterfaceConfig) SetName(name string) {
+ u.Name = name
+ u.NamePresent = true
+}
+
+func (u *InterfaceConfig) GetName() string {
+ return u.Name
+}
+
+func (u *InterfaceConfig) GetNameWithDefault(_default string) string {
+ if !u.HasName() {
+ return _default
+ }
+ return u.Name
+}
+
+func (u *InterfaceConfig) HasName() bool {
+ return u.NamePresent
+}
+
+func (u *InterfaceConfig) ClearName() {
+ u.NamePresent = false
+}
+
+func (u *InterfaceConfig) SetTopopath(topopath string) {
+ u.Topopath = topopath
+ u.TopopathPresent = true
+}
+
+func (u *InterfaceConfig) GetTopopath() string {
+ return u.Topopath
+}
+
+func (u *InterfaceConfig) GetTopopathWithDefault(_default string) string {
+ if !u.HasTopopath() {
+ return _default
+ }
+ return u.Topopath
+}
+
+func (u *InterfaceConfig) HasTopopath() bool {
+ return u.TopopathPresent
+}
+
+func (u *InterfaceConfig) ClearTopopath() {
+ u.TopopathPresent = false
+}
+
+func (u *InterfaceConfig) SetMetric(metric uint32) {
+ u.Metric = metric
+ u.MetricPresent = true
+}
+
+func (u *InterfaceConfig) GetMetric() uint32 {
+ return u.Metric
+}
+
+func (u *InterfaceConfig) GetMetricWithDefault(_default uint32) uint32 {
+ if !u.HasMetric() {
+ return _default
+ }
+ return u.Metric
+}
+
+func (u *InterfaceConfig) HasMetric() bool {
+ return u.MetricPresent
+}
+
+func (u *InterfaceConfig) ClearMetric() {
+ u.MetricPresent = false
+}
+
+func (u *InterfaceConfig) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *InterfaceConfig) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+const (
+ StackAddEthernetInterfaceOrdinal uint64 = 0x5f5733e9cf647a5b
+ StackAddInterfaceOrdinal uint64 = 0x16c731272a79a2c9
+ StackDelEthernetInterfaceOrdinal uint64 = 0x1e7f3b1fe503a8eb
+ StackListInterfacesOrdinal uint64 = 0x7858623a6d268864
+ StackGetInterfaceInfoOrdinal uint64 = 0x55567267dd660333
+ StackEnableInterfaceOrdinal uint64 = 0x2723e7e9dabca8f2
+ StackDisableInterfaceOrdinal uint64 = 0x1703c5cf0b2f4d87
+ StackAddInterfaceAddressOrdinal uint64 = 0x6c21cb598c262ea3
+ StackDelInterfaceAddressOrdinal uint64 = 0x73159e96f5537eed
+ StackGetForwardingTableOrdinal uint64 = 0x6df035986328d2ef
+ StackAddForwardingEntryOrdinal uint64 = 0x5fe2020877107909
+ StackDelForwardingEntryOrdinal uint64 = 0x560f3944c4cb51bd
+ StackEnablePacketFilterOrdinal uint64 = 0x1fbd56c90ca0b19d
+ StackDisablePacketFilterOrdinal uint64 = 0x40743d436c82c863
+ StackEnableIpForwardingOrdinal uint64 = 0x28e1915a9b177e6c
+ StackDisableIpForwardingOrdinal uint64 = 0x477f3f3bb42cf1f4
+ StackGetDnsServerWatcherOrdinal uint64 = 0x14cf0817fc2cf386
+ StackOnInterfaceStatusChangeOrdinal uint64 = 0x6b4da146f5d921fe
+)
+
+type StackWithCtxInterface _bindings.ChannelProxy
+
+// Add an Ethernet interface to the network stack. On success, returns the identifier assigned
+// by the stack for use in subsequent calls.
+func (p *StackWithCtxInterface) AddEthernetInterface(ctx_ _bindings.Context, topologicalPath string, device fuchsiahardwareethernet.DeviceWithCtxInterface) (StackAddEthernetInterfaceResult, error) {
+ req_ := &stackWithCtxAddEthernetInterfaceRequest{
+ TopologicalPath: topologicalPath,
+ Device: device,
+ }
+ resp_ := &stackWithCtxAddEthernetInterfaceResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackAddEthernetInterfaceOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Add a new interface to the network stack backed by the provided `DeviceDefinition`. On
+// success, returns the identifier assigned by the stack for use in subsequent calls.
+func (p *StackWithCtxInterface) AddInterface(ctx_ _bindings.Context, config InterfaceConfig, device DeviceDefinition) (StackAddInterfaceResult, error) {
+ req_ := &stackWithCtxAddInterfaceRequest{
+ Config: config,
+ Device: device,
+ }
+ resp_ := &stackWithCtxAddInterfaceResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackAddInterfaceOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Remove an Ethernet interface from the network stack.
+func (p *StackWithCtxInterface) DelEthernetInterface(ctx_ _bindings.Context, id uint64) (StackDelEthernetInterfaceResult, error) {
+ req_ := &stackWithCtxDelEthernetInterfaceRequest{
+ Id: id,
+ }
+ resp_ := &stackWithCtxDelEthernetInterfaceResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackDelEthernetInterfaceOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// List all the interfaces available in the network stack.
+func (p *StackWithCtxInterface) ListInterfaces(ctx_ _bindings.Context) ([]InterfaceInfo, error) {
+ var req_ _bindings.Message
+ resp_ := &stackWithCtxListInterfacesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackListInterfacesOrdinal, req_, resp_)
+ return resp_.Ifs, err_
+}
+
+// Retrieve info about a specific interface.
+func (p *StackWithCtxInterface) GetInterfaceInfo(ctx_ _bindings.Context, id uint64) (StackGetInterfaceInfoResult, error) {
+ req_ := &stackWithCtxGetInterfaceInfoRequest{
+ Id: id,
+ }
+ resp_ := &stackWithCtxGetInterfaceInfoResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackGetInterfaceInfoOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Enable the interface. Packets may be processed by the stack after this call is processed.
+func (p *StackWithCtxInterface) EnableInterface(ctx_ _bindings.Context, id uint64) (StackEnableInterfaceResult, error) {
+ req_ := &stackWithCtxEnableInterfaceRequest{
+ Id: id,
+ }
+ resp_ := &stackWithCtxEnableInterfaceResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackEnableInterfaceOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Disable the interface. The stack will no longer process packets after this call.
+func (p *StackWithCtxInterface) DisableInterface(ctx_ _bindings.Context, id uint64) (StackDisableInterfaceResult, error) {
+ req_ := &stackWithCtxDisableInterfaceRequest{
+ Id: id,
+ }
+ resp_ := &stackWithCtxDisableInterfaceResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackDisableInterfaceOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Add an address to the interface. If the interface already has an address of a given type that
+// does not allow duplicates, this method will return an error.
+func (p *StackWithCtxInterface) AddInterfaceAddress(ctx_ _bindings.Context, id uint64, addr fuchsianet.Subnet) (StackAddInterfaceAddressResult, error) {
+ req_ := &stackWithCtxAddInterfaceAddressRequest{
+ Id: id,
+ Addr: addr,
+ }
+ resp_ := &stackWithCtxAddInterfaceAddressResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackAddInterfaceAddressOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Remove the address from the interface. If the address is not assigned to the interface, an
+// error is returned.
+func (p *StackWithCtxInterface) DelInterfaceAddress(ctx_ _bindings.Context, id uint64, addr fuchsianet.Subnet) (StackDelInterfaceAddressResult, error) {
+ req_ := &stackWithCtxDelInterfaceAddressRequest{
+ Id: id,
+ Addr: addr,
+ }
+ resp_ := &stackWithCtxDelInterfaceAddressResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackDelInterfaceAddressOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// List all the entries in the forwarding table for the network stack.
+func (p *StackWithCtxInterface) GetForwardingTable(ctx_ _bindings.Context) ([]ForwardingEntry, error) {
+ var req_ _bindings.Message
+ resp_ := &stackWithCtxGetForwardingTableResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackGetForwardingTableOrdinal, req_, resp_)
+ return resp_.Table, err_
+}
+
+// Add a new entry to the forwarding table. If the table already contains an entry with the same
+// subnet, an error is returned. The entry may be deleted using DelForwardingEntry first.
+func (p *StackWithCtxInterface) AddForwardingEntry(ctx_ _bindings.Context, entry ForwardingEntry) (StackAddForwardingEntryResult, error) {
+ req_ := &stackWithCtxAddForwardingEntryRequest{
+ Entry: entry,
+ }
+ resp_ := &stackWithCtxAddForwardingEntryResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackAddForwardingEntryOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Removes the forwarding entry with the given subnet. This will not affect any overlapping
+// subnets (superset or subset) so the subnet must exactly match an entry in the forwarding
+// table. If no entry for the subnet exists, an error is returned.
+func (p *StackWithCtxInterface) DelForwardingEntry(ctx_ _bindings.Context, subnet fuchsianet.Subnet) (StackDelForwardingEntryResult, error) {
+ req_ := &stackWithCtxDelForwardingEntryRequest{
+ Subnet: subnet,
+ }
+ resp_ := &stackWithCtxDelForwardingEntryResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackDelForwardingEntryOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Enable the packet filter on a specific interface.
+func (p *StackWithCtxInterface) EnablePacketFilter(ctx_ _bindings.Context, id uint64) (StackEnablePacketFilterResult, error) {
+ req_ := &stackWithCtxEnablePacketFilterRequest{
+ Id: id,
+ }
+ resp_ := &stackWithCtxEnablePacketFilterResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackEnablePacketFilterOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Disable the packet filter on a specific interface.
+func (p *StackWithCtxInterface) DisablePacketFilter(ctx_ _bindings.Context, id uint64) (StackDisablePacketFilterResult, error) {
+ req_ := &stackWithCtxDisablePacketFilterRequest{
+ Id: id,
+ }
+ resp_ := &stackWithCtxDisablePacketFilterResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackDisablePacketFilterOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Enable IP Forwarding.
+func (p *StackWithCtxInterface) EnableIpForwarding(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ var resp_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackEnableIpForwardingOrdinal, req_, resp_)
+ return err_
+}
+
+// Disable IP Forwarding.
+func (p *StackWithCtxInterface) DisableIpForwarding(ctx_ _bindings.Context) error {
+ var req_ _bindings.Message
+ var resp_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StackDisableIpForwardingOrdinal, req_, resp_)
+ return err_
+}
+
+// Get a [`fuchsia.net.name/DnsServerWatcher`].
+func (p *StackWithCtxInterface) GetDnsServerWatcher(ctx_ _bindings.Context, watcher fuchsianetname.DnsServerWatcherWithCtxInterfaceRequest) error {
+ req_ := &stackWithCtxGetDnsServerWatcherRequest{
+ Watcher: watcher,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(StackGetDnsServerWatcherOrdinal, req_)
+ return err_
+}
+
+// A status change event is triggered whenever an interface's status changes.
+func (p *StackWithCtxInterface) ExpectOnInterfaceStatusChange(ctx_ _bindings.Context) (InterfaceStatusChange, error) {
+ resp_ := &stackWithCtxOnInterfaceStatusChangeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(StackOnInterfaceStatusChangeOrdinal, resp_)
+ return resp_.Info, err_
+}
+
+type StackWithCtx interface {
+ // Add an Ethernet interface to the network stack. On success, returns the identifier assigned
+ // by the stack for use in subsequent calls.
+ AddEthernetInterface(ctx_ _bindings.Context, topologicalPath string, device fuchsiahardwareethernet.DeviceWithCtxInterface) (StackAddEthernetInterfaceResult, error)
+ // Add a new interface to the network stack backed by the provided `DeviceDefinition`. On
+ // success, returns the identifier assigned by the stack for use in subsequent calls.
+ AddInterface(ctx_ _bindings.Context, config InterfaceConfig, device DeviceDefinition) (StackAddInterfaceResult, error)
+ // Remove an Ethernet interface from the network stack.
+ DelEthernetInterface(ctx_ _bindings.Context, id uint64) (StackDelEthernetInterfaceResult, error)
+ // List all the interfaces available in the network stack.
+ ListInterfaces(ctx_ _bindings.Context) ([]InterfaceInfo, error)
+ // Retrieve info about a specific interface.
+ GetInterfaceInfo(ctx_ _bindings.Context, id uint64) (StackGetInterfaceInfoResult, error)
+ // Enable the interface. Packets may be processed by the stack after this call is processed.
+ EnableInterface(ctx_ _bindings.Context, id uint64) (StackEnableInterfaceResult, error)
+ // Disable the interface. The stack will no longer process packets after this call.
+ DisableInterface(ctx_ _bindings.Context, id uint64) (StackDisableInterfaceResult, error)
+ // Add an address to the interface. If the interface already has an address of a given type that
+ // does not allow duplicates, this method will return an error.
+ AddInterfaceAddress(ctx_ _bindings.Context, id uint64, addr fuchsianet.Subnet) (StackAddInterfaceAddressResult, error)
+ // Remove the address from the interface. If the address is not assigned to the interface, an
+ // error is returned.
+ DelInterfaceAddress(ctx_ _bindings.Context, id uint64, addr fuchsianet.Subnet) (StackDelInterfaceAddressResult, error)
+ // List all the entries in the forwarding table for the network stack.
+ GetForwardingTable(ctx_ _bindings.Context) ([]ForwardingEntry, error)
+ // Add a new entry to the forwarding table. If the table already contains an entry with the same
+ // subnet, an error is returned. The entry may be deleted using DelForwardingEntry first.
+ AddForwardingEntry(ctx_ _bindings.Context, entry ForwardingEntry) (StackAddForwardingEntryResult, error)
+ // Removes the forwarding entry with the given subnet. This will not affect any overlapping
+ // subnets (superset or subset) so the subnet must exactly match an entry in the forwarding
+ // table. If no entry for the subnet exists, an error is returned.
+ DelForwardingEntry(ctx_ _bindings.Context, subnet fuchsianet.Subnet) (StackDelForwardingEntryResult, error)
+ // Enable the packet filter on a specific interface.
+ EnablePacketFilter(ctx_ _bindings.Context, id uint64) (StackEnablePacketFilterResult, error)
+ // Disable the packet filter on a specific interface.
+ DisablePacketFilter(ctx_ _bindings.Context, id uint64) (StackDisablePacketFilterResult, error)
+ // Enable IP Forwarding.
+ EnableIpForwarding(ctx_ _bindings.Context) error
+ // Disable IP Forwarding.
+ DisableIpForwarding(ctx_ _bindings.Context) error
+ // Get a [`fuchsia.net.name/DnsServerWatcher`].
+ GetDnsServerWatcher(ctx_ _bindings.Context, watcher fuchsianetname.DnsServerWatcherWithCtxInterfaceRequest) error
+ // A status change event is triggered whenever an interface's status changes.
+}
+
+type StackWithCtxTransitionalBase struct{}
+
+type StackWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewStackWithCtxInterfaceRequest() (StackWithCtxInterfaceRequest, *StackWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return StackWithCtxInterfaceRequest(req), (*StackWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ StackWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.net.stack.Stack"
+}
+func (c StackWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const StackName = "fuchsia.net.stack.Stack"
+
+type StackWithCtxStub struct {
+ Impl StackWithCtx
+}
+
+func (s_ *StackWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case StackAddEthernetInterfaceOrdinal:
+ in_ := stackWithCtxAddEthernetInterfaceRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.AddEthernetInterface(args_.Ctx, in_.TopologicalPath, in_.Device)
+ out_ := stackWithCtxAddEthernetInterfaceResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackAddInterfaceOrdinal:
+ in_ := stackWithCtxAddInterfaceRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.AddInterface(args_.Ctx, in_.Config, in_.Device)
+ out_ := stackWithCtxAddInterfaceResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackDelEthernetInterfaceOrdinal:
+ in_ := stackWithCtxDelEthernetInterfaceRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.DelEthernetInterface(args_.Ctx, in_.Id)
+ out_ := stackWithCtxDelEthernetInterfaceResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackListInterfacesOrdinal:
+ ifs, err_ := s_.Impl.ListInterfaces(args_.Ctx)
+ out_ := stackWithCtxListInterfacesResponse{}
+ out_.Ifs = ifs
+ return &out_, true, err_
+ case StackGetInterfaceInfoOrdinal:
+ in_ := stackWithCtxGetInterfaceInfoRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetInterfaceInfo(args_.Ctx, in_.Id)
+ out_ := stackWithCtxGetInterfaceInfoResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackEnableInterfaceOrdinal:
+ in_ := stackWithCtxEnableInterfaceRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.EnableInterface(args_.Ctx, in_.Id)
+ out_ := stackWithCtxEnableInterfaceResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackDisableInterfaceOrdinal:
+ in_ := stackWithCtxDisableInterfaceRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.DisableInterface(args_.Ctx, in_.Id)
+ out_ := stackWithCtxDisableInterfaceResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackAddInterfaceAddressOrdinal:
+ in_ := stackWithCtxAddInterfaceAddressRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.AddInterfaceAddress(args_.Ctx, in_.Id, in_.Addr)
+ out_ := stackWithCtxAddInterfaceAddressResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackDelInterfaceAddressOrdinal:
+ in_ := stackWithCtxDelInterfaceAddressRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.DelInterfaceAddress(args_.Ctx, in_.Id, in_.Addr)
+ out_ := stackWithCtxDelInterfaceAddressResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackGetForwardingTableOrdinal:
+ table, err_ := s_.Impl.GetForwardingTable(args_.Ctx)
+ out_ := stackWithCtxGetForwardingTableResponse{}
+ out_.Table = table
+ return &out_, true, err_
+ case StackAddForwardingEntryOrdinal:
+ in_ := stackWithCtxAddForwardingEntryRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.AddForwardingEntry(args_.Ctx, in_.Entry)
+ out_ := stackWithCtxAddForwardingEntryResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackDelForwardingEntryOrdinal:
+ in_ := stackWithCtxDelForwardingEntryRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.DelForwardingEntry(args_.Ctx, in_.Subnet)
+ out_ := stackWithCtxDelForwardingEntryResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackEnablePacketFilterOrdinal:
+ in_ := stackWithCtxEnablePacketFilterRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.EnablePacketFilter(args_.Ctx, in_.Id)
+ out_ := stackWithCtxEnablePacketFilterResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackDisablePacketFilterOrdinal:
+ in_ := stackWithCtxDisablePacketFilterRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.DisablePacketFilter(args_.Ctx, in_.Id)
+ out_ := stackWithCtxDisablePacketFilterResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StackEnableIpForwardingOrdinal:
+ err_ := s_.Impl.EnableIpForwarding(args_.Ctx)
+ return nil, true, err_
+ case StackDisableIpForwardingOrdinal:
+ err_ := s_.Impl.DisableIpForwarding(args_.Ctx)
+ return nil, true, err_
+ case StackGetDnsServerWatcherOrdinal:
+ in_ := stackWithCtxGetDnsServerWatcherRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.GetDnsServerWatcher(args_.Ctx, in_.Watcher)
+ return nil, false, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type StackEventProxy _bindings.ChannelProxy
+
+func (p *StackEventProxy) OnInterfaceStatusChange(info InterfaceStatusChange) error {
+ event_ := &stackWithCtxOnInterfaceStatusChangeResponse{
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(StackOnInterfaceStatusChangeOrdinal, event_)
+}
+
+const (
+ LogSetLogLevelOrdinal uint64 = 0x5fea0a401ca44550
+ LogSetLogPacketsOrdinal uint64 = 0x2176044cba5f378e
+)
+
+type LogWithCtxInterface _bindings.ChannelProxy
+
+// Dynamically set a syslog level.
+func (p *LogWithCtxInterface) SetLogLevel(ctx_ _bindings.Context, level fuchsialogger.LogLevelFilter) (LogSetLogLevelResult, error) {
+ req_ := &logWithCtxSetLogLevelRequest{
+ Level: level,
+ }
+ resp_ := &logWithCtxSetLogLevelResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(LogSetLogLevelOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Dynamically set packet logging.
+func (p *LogWithCtxInterface) SetLogPackets(ctx_ _bindings.Context, enabled bool) error {
+ req_ := &logWithCtxSetLogPacketsRequest{
+ Enabled: enabled,
+ }
+ var resp_ _bindings.Message
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(LogSetLogPacketsOrdinal, req_, resp_)
+ return err_
+}
+
+type LogWithCtx interface {
+ // Dynamically set a syslog level.
+ SetLogLevel(ctx_ _bindings.Context, level fuchsialogger.LogLevelFilter) (LogSetLogLevelResult, error)
+ // Dynamically set packet logging.
+ SetLogPackets(ctx_ _bindings.Context, enabled bool) error
+}
+
+type LogWithCtxTransitionalBase struct{}
+
+type LogWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewLogWithCtxInterfaceRequest() (LogWithCtxInterfaceRequest, *LogWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return LogWithCtxInterfaceRequest(req), (*LogWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ LogWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.net.stack.Log"
+}
+func (c LogWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const LogName = "fuchsia.net.stack.Log"
+
+type LogWithCtxStub struct {
+ Impl LogWithCtx
+}
+
+func (s_ *LogWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case LogSetLogLevelOrdinal:
+ in_ := logWithCtxSetLogLevelRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.SetLogLevel(args_.Ctx, in_.Level)
+ out_ := logWithCtxSetLogLevelResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case LogSetLogPacketsOrdinal:
+ in_ := logWithCtxSetLogPacketsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.SetLogPackets(args_.Ctx, in_.Enabled)
+ return nil, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type LogEventProxy _bindings.ChannelProxy
diff --git a/src/syscall/zx/panics_test.go b/src/syscall/zx/panics_test.go
new file mode 100644
index 0000000..ce6d8c9
--- /dev/null
+++ b/src/syscall/zx/panics_test.go
@@ -0,0 +1,33 @@
+// 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.
+
+package zx_test
+
+import (
+ "testing"
+)
+
+func testPanicRecoverInner(t *testing.T, causePanic func()) {
+ defer func() {
+ if e := recover(); e == nil {
+ t.Error("failed to recover from panic")
+ }
+ }()
+ causePanic()
+}
+
+func testPanicRecover(t *testing.T, causePanic func()) {
+ for i := 0; i < 10; i++ {
+ testPanicRecoverInner(t, causePanic)
+ }
+}
+
+// NB: There's a similar test in the runtime package, but those don't run on
+// Fuchsia yet.
+func TestPanicRecoverMemoryAccess(t *testing.T) {
+ testPanicRecover(t, func() {
+ var x *int
+ *x = 0xF0BA
+ })
+}
diff --git a/src/syscall/zx/posix/impl.go b/src/syscall/zx/posix/impl.go
new file mode 100644
index 0000000..0126297
--- /dev/null
+++ b/src/syscall/zx/posix/impl.go
@@ -0,0 +1,838 @@
+// Copyright 2020 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package posix
+
+import (
+ _bindings "syscall/zx/fidl"
+)
+
+const (
+ // `EWOULDBLOCK` is aliased to `EAGAIN`.
+ Ewouldblock Errno = ErrnoEagain
+ // `EDEADLOCK` is aliased to `EDEADLK`.
+ Edeadlock Errno = ErrnoEdeadlk
+ // `ENOTSUP` is aliased to `EOPNOTSUPP`.
+ Enotsup Errno = ErrnoEopnotsupp
+)
+
+var _ _bindings.Enum = Errno(0)
+
+// POSIX style errnos.
+//
+// See https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html for more information.
+type Errno int32
+
+const (
+ ErrnoEperm Errno = 1
+ ErrnoEnoent Errno = 2
+ ErrnoEsrch Errno = 3
+ ErrnoEintr Errno = 4
+ ErrnoEio Errno = 5
+ ErrnoEnxio Errno = 6
+ ErrnoE2Big Errno = 7
+ ErrnoEnoexec Errno = 8
+ ErrnoEbadf Errno = 9
+ ErrnoEchild Errno = 10
+ ErrnoEagain Errno = 11
+ ErrnoEnomem Errno = 12
+ ErrnoEacces Errno = 13
+ ErrnoEfault Errno = 14
+ ErrnoEnotblk Errno = 15
+ ErrnoEbusy Errno = 16
+ ErrnoEexist Errno = 17
+ ErrnoExdev Errno = 18
+ ErrnoEnodev Errno = 19
+ ErrnoEnotdir Errno = 20
+ ErrnoEisdir Errno = 21
+ ErrnoEinval Errno = 22
+ ErrnoEnfile Errno = 23
+ ErrnoEmfile Errno = 24
+ ErrnoEnotty Errno = 25
+ ErrnoEtxtbsy Errno = 26
+ ErrnoEfbig Errno = 27
+ ErrnoEnospc Errno = 28
+ ErrnoEspipe Errno = 29
+ ErrnoErofs Errno = 30
+ ErrnoEmlink Errno = 31
+ ErrnoEpipe Errno = 32
+ ErrnoEdom Errno = 33
+ ErrnoErange Errno = 34
+ ErrnoEdeadlk Errno = 35
+ ErrnoEnametoolong Errno = 36
+ ErrnoEnolck Errno = 37
+ ErrnoEnosys Errno = 38
+ ErrnoEnotempty Errno = 39
+ ErrnoEloop Errno = 40
+ ErrnoEnomsg Errno = 42
+ ErrnoEidrm Errno = 43
+ ErrnoEchrng Errno = 44
+ ErrnoEl2Nsync Errno = 45
+ ErrnoEl3Hlt Errno = 46
+ ErrnoEl3Rst Errno = 47
+ ErrnoElnrng Errno = 48
+ ErrnoEunatch Errno = 49
+ ErrnoEnocsi Errno = 50
+ ErrnoEl2Hlt Errno = 51
+ ErrnoEbade Errno = 52
+ ErrnoEbadr Errno = 53
+ ErrnoExfull Errno = 54
+ ErrnoEnoano Errno = 55
+ ErrnoEbadrqc Errno = 56
+ ErrnoEbadslt Errno = 57
+ ErrnoEbfont Errno = 59
+ ErrnoEnostr Errno = 60
+ ErrnoEnodata Errno = 61
+ ErrnoEtime Errno = 62
+ ErrnoEnosr Errno = 63
+ ErrnoEnonet Errno = 64
+ ErrnoEnopkg Errno = 65
+ ErrnoEremote Errno = 66
+ ErrnoEnolink Errno = 67
+ ErrnoEadv Errno = 68
+ ErrnoEsrmnt Errno = 69
+ ErrnoEcomm Errno = 70
+ ErrnoEproto Errno = 71
+ ErrnoEmultihop Errno = 72
+ ErrnoEdotdot Errno = 73
+ ErrnoEbadmsg Errno = 74
+ ErrnoEoverflow Errno = 75
+ ErrnoEnotuniq Errno = 76
+ ErrnoEbadfd Errno = 77
+ ErrnoEremchg Errno = 78
+ ErrnoElibacc Errno = 79
+ ErrnoElibbad Errno = 80
+ ErrnoElibscn Errno = 81
+ ErrnoElibmax Errno = 82
+ ErrnoElibexec Errno = 83
+ ErrnoEilseq Errno = 84
+ ErrnoErestart Errno = 85
+ ErrnoEstrpipe Errno = 86
+ ErrnoEusers Errno = 87
+ ErrnoEnotsock Errno = 88
+ ErrnoEdestaddrreq Errno = 89
+ ErrnoEmsgsize Errno = 90
+ ErrnoEprototype Errno = 91
+ ErrnoEnoprotoopt Errno = 92
+ ErrnoEprotonosupport Errno = 93
+ ErrnoEsocktnosupport Errno = 94
+ ErrnoEopnotsupp Errno = 95
+ ErrnoEpfnosupport Errno = 96
+ ErrnoEafnosupport Errno = 97
+ ErrnoEaddrinuse Errno = 98
+ ErrnoEaddrnotavail Errno = 99
+ ErrnoEnetdown Errno = 100
+ ErrnoEnetunreach Errno = 101
+ ErrnoEnetreset Errno = 102
+ ErrnoEconnaborted Errno = 103
+ ErrnoEconnreset Errno = 104
+ ErrnoEnobufs Errno = 105
+ ErrnoEisconn Errno = 106
+ ErrnoEnotconn Errno = 107
+ ErrnoEshutdown Errno = 108
+ ErrnoEtoomanyrefs Errno = 109
+ ErrnoEtimedout Errno = 110
+ ErrnoEconnrefused Errno = 111
+ ErrnoEhostdown Errno = 112
+ ErrnoEhostunreach Errno = 113
+ ErrnoEalready Errno = 114
+ ErrnoEinprogress Errno = 115
+ ErrnoEstale Errno = 116
+ ErrnoEuclean Errno = 117
+ ErrnoEnotnam Errno = 118
+ ErrnoEnavail Errno = 119
+ ErrnoEisnam Errno = 120
+ ErrnoEremoteio Errno = 121
+ ErrnoEdquot Errno = 122
+ ErrnoEnomedium Errno = 123
+ ErrnoEmediumtype Errno = 124
+ ErrnoEcanceled Errno = 125
+ ErrnoEnokey Errno = 126
+ ErrnoEkeyexpired Errno = 127
+ ErrnoEkeyrevoked Errno = 128
+ ErrnoEkeyrejected Errno = 129
+ ErrnoEownerdead Errno = 130
+ ErrnoEnotrecoverable Errno = 131
+ ErrnoErfkill Errno = 132
+ ErrnoEhwpoison Errno = 133
+)
+
+func (_ Errno) I_EnumValues() []Errno {
+ return []Errno{
+ ErrnoEperm,
+ ErrnoEnoent,
+ ErrnoEsrch,
+ ErrnoEintr,
+ ErrnoEio,
+ ErrnoEnxio,
+ ErrnoE2Big,
+ ErrnoEnoexec,
+ ErrnoEbadf,
+ ErrnoEchild,
+ ErrnoEagain,
+ ErrnoEnomem,
+ ErrnoEacces,
+ ErrnoEfault,
+ ErrnoEnotblk,
+ ErrnoEbusy,
+ ErrnoEexist,
+ ErrnoExdev,
+ ErrnoEnodev,
+ ErrnoEnotdir,
+ ErrnoEisdir,
+ ErrnoEinval,
+ ErrnoEnfile,
+ ErrnoEmfile,
+ ErrnoEnotty,
+ ErrnoEtxtbsy,
+ ErrnoEfbig,
+ ErrnoEnospc,
+ ErrnoEspipe,
+ ErrnoErofs,
+ ErrnoEmlink,
+ ErrnoEpipe,
+ ErrnoEdom,
+ ErrnoErange,
+ ErrnoEdeadlk,
+ ErrnoEnametoolong,
+ ErrnoEnolck,
+ ErrnoEnosys,
+ ErrnoEnotempty,
+ ErrnoEloop,
+ ErrnoEnomsg,
+ ErrnoEidrm,
+ ErrnoEchrng,
+ ErrnoEl2Nsync,
+ ErrnoEl3Hlt,
+ ErrnoEl3Rst,
+ ErrnoElnrng,
+ ErrnoEunatch,
+ ErrnoEnocsi,
+ ErrnoEl2Hlt,
+ ErrnoEbade,
+ ErrnoEbadr,
+ ErrnoExfull,
+ ErrnoEnoano,
+ ErrnoEbadrqc,
+ ErrnoEbadslt,
+ ErrnoEbfont,
+ ErrnoEnostr,
+ ErrnoEnodata,
+ ErrnoEtime,
+ ErrnoEnosr,
+ ErrnoEnonet,
+ ErrnoEnopkg,
+ ErrnoEremote,
+ ErrnoEnolink,
+ ErrnoEadv,
+ ErrnoEsrmnt,
+ ErrnoEcomm,
+ ErrnoEproto,
+ ErrnoEmultihop,
+ ErrnoEdotdot,
+ ErrnoEbadmsg,
+ ErrnoEoverflow,
+ ErrnoEnotuniq,
+ ErrnoEbadfd,
+ ErrnoEremchg,
+ ErrnoElibacc,
+ ErrnoElibbad,
+ ErrnoElibscn,
+ ErrnoElibmax,
+ ErrnoElibexec,
+ ErrnoEilseq,
+ ErrnoErestart,
+ ErrnoEstrpipe,
+ ErrnoEusers,
+ ErrnoEnotsock,
+ ErrnoEdestaddrreq,
+ ErrnoEmsgsize,
+ ErrnoEprototype,
+ ErrnoEnoprotoopt,
+ ErrnoEprotonosupport,
+ ErrnoEsocktnosupport,
+ ErrnoEopnotsupp,
+ ErrnoEpfnosupport,
+ ErrnoEafnosupport,
+ ErrnoEaddrinuse,
+ ErrnoEaddrnotavail,
+ ErrnoEnetdown,
+ ErrnoEnetunreach,
+ ErrnoEnetreset,
+ ErrnoEconnaborted,
+ ErrnoEconnreset,
+ ErrnoEnobufs,
+ ErrnoEisconn,
+ ErrnoEnotconn,
+ ErrnoEshutdown,
+ ErrnoEtoomanyrefs,
+ ErrnoEtimedout,
+ ErrnoEconnrefused,
+ ErrnoEhostdown,
+ ErrnoEhostunreach,
+ ErrnoEalready,
+ ErrnoEinprogress,
+ ErrnoEstale,
+ ErrnoEuclean,
+ ErrnoEnotnam,
+ ErrnoEnavail,
+ ErrnoEisnam,
+ ErrnoEremoteio,
+ ErrnoEdquot,
+ ErrnoEnomedium,
+ ErrnoEmediumtype,
+ ErrnoEcanceled,
+ ErrnoEnokey,
+ ErrnoEkeyexpired,
+ ErrnoEkeyrevoked,
+ ErrnoEkeyrejected,
+ ErrnoEownerdead,
+ ErrnoEnotrecoverable,
+ ErrnoErfkill,
+ ErrnoEhwpoison,
+ }
+}
+
+func (_ Errno) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x Errno) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ case 3:
+ return true
+ case 4:
+ return true
+ case 5:
+ return true
+ case 6:
+ return true
+ case 7:
+ return true
+ case 8:
+ return true
+ case 9:
+ return true
+ case 10:
+ return true
+ case 11:
+ return true
+ case 12:
+ return true
+ case 13:
+ return true
+ case 14:
+ return true
+ case 15:
+ return true
+ case 16:
+ return true
+ case 17:
+ return true
+ case 18:
+ return true
+ case 19:
+ return true
+ case 20:
+ return true
+ case 21:
+ return true
+ case 22:
+ return true
+ case 23:
+ return true
+ case 24:
+ return true
+ case 25:
+ return true
+ case 26:
+ return true
+ case 27:
+ return true
+ case 28:
+ return true
+ case 29:
+ return true
+ case 30:
+ return true
+ case 31:
+ return true
+ case 32:
+ return true
+ case 33:
+ return true
+ case 34:
+ return true
+ case 35:
+ return true
+ case 36:
+ return true
+ case 37:
+ return true
+ case 38:
+ return true
+ case 39:
+ return true
+ case 40:
+ return true
+ case 42:
+ return true
+ case 43:
+ return true
+ case 44:
+ return true
+ case 45:
+ return true
+ case 46:
+ return true
+ case 47:
+ return true
+ case 48:
+ return true
+ case 49:
+ return true
+ case 50:
+ return true
+ case 51:
+ return true
+ case 52:
+ return true
+ case 53:
+ return true
+ case 54:
+ return true
+ case 55:
+ return true
+ case 56:
+ return true
+ case 57:
+ return true
+ case 59:
+ return true
+ case 60:
+ return true
+ case 61:
+ return true
+ case 62:
+ return true
+ case 63:
+ return true
+ case 64:
+ return true
+ case 65:
+ return true
+ case 66:
+ return true
+ case 67:
+ return true
+ case 68:
+ return true
+ case 69:
+ return true
+ case 70:
+ return true
+ case 71:
+ return true
+ case 72:
+ return true
+ case 73:
+ return true
+ case 74:
+ return true
+ case 75:
+ return true
+ case 76:
+ return true
+ case 77:
+ return true
+ case 78:
+ return true
+ case 79:
+ return true
+ case 80:
+ return true
+ case 81:
+ return true
+ case 82:
+ return true
+ case 83:
+ return true
+ case 84:
+ return true
+ case 85:
+ return true
+ case 86:
+ return true
+ case 87:
+ return true
+ case 88:
+ return true
+ case 89:
+ return true
+ case 90:
+ return true
+ case 91:
+ return true
+ case 92:
+ return true
+ case 93:
+ return true
+ case 94:
+ return true
+ case 95:
+ return true
+ case 96:
+ return true
+ case 97:
+ return true
+ case 98:
+ return true
+ case 99:
+ return true
+ case 100:
+ return true
+ case 101:
+ return true
+ case 102:
+ return true
+ case 103:
+ return true
+ case 104:
+ return true
+ case 105:
+ return true
+ case 106:
+ return true
+ case 107:
+ return true
+ case 108:
+ return true
+ case 109:
+ return true
+ case 110:
+ return true
+ case 111:
+ return true
+ case 112:
+ return true
+ case 113:
+ return true
+ case 114:
+ return true
+ case 115:
+ return true
+ case 116:
+ return true
+ case 117:
+ return true
+ case 118:
+ return true
+ case 119:
+ return true
+ case 120:
+ return true
+ case 121:
+ return true
+ case 122:
+ return true
+ case 123:
+ return true
+ case 124:
+ return true
+ case 125:
+ return true
+ case 126:
+ return true
+ case 127:
+ return true
+ case 128:
+ return true
+ case 129:
+ return true
+ case 130:
+ return true
+ case 131:
+ return true
+ case 132:
+ return true
+ case 133:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x Errno) String() string {
+ switch x {
+ case 1:
+ return "Eperm"
+ case 2:
+ return "Enoent"
+ case 3:
+ return "Esrch"
+ case 4:
+ return "Eintr"
+ case 5:
+ return "Eio"
+ case 6:
+ return "Enxio"
+ case 7:
+ return "E2Big"
+ case 8:
+ return "Enoexec"
+ case 9:
+ return "Ebadf"
+ case 10:
+ return "Echild"
+ case 11:
+ return "Eagain"
+ case 12:
+ return "Enomem"
+ case 13:
+ return "Eacces"
+ case 14:
+ return "Efault"
+ case 15:
+ return "Enotblk"
+ case 16:
+ return "Ebusy"
+ case 17:
+ return "Eexist"
+ case 18:
+ return "Exdev"
+ case 19:
+ return "Enodev"
+ case 20:
+ return "Enotdir"
+ case 21:
+ return "Eisdir"
+ case 22:
+ return "Einval"
+ case 23:
+ return "Enfile"
+ case 24:
+ return "Emfile"
+ case 25:
+ return "Enotty"
+ case 26:
+ return "Etxtbsy"
+ case 27:
+ return "Efbig"
+ case 28:
+ return "Enospc"
+ case 29:
+ return "Espipe"
+ case 30:
+ return "Erofs"
+ case 31:
+ return "Emlink"
+ case 32:
+ return "Epipe"
+ case 33:
+ return "Edom"
+ case 34:
+ return "Erange"
+ case 35:
+ return "Edeadlk"
+ case 36:
+ return "Enametoolong"
+ case 37:
+ return "Enolck"
+ case 38:
+ return "Enosys"
+ case 39:
+ return "Enotempty"
+ case 40:
+ return "Eloop"
+ case 42:
+ return "Enomsg"
+ case 43:
+ return "Eidrm"
+ case 44:
+ return "Echrng"
+ case 45:
+ return "El2Nsync"
+ case 46:
+ return "El3Hlt"
+ case 47:
+ return "El3Rst"
+ case 48:
+ return "Elnrng"
+ case 49:
+ return "Eunatch"
+ case 50:
+ return "Enocsi"
+ case 51:
+ return "El2Hlt"
+ case 52:
+ return "Ebade"
+ case 53:
+ return "Ebadr"
+ case 54:
+ return "Exfull"
+ case 55:
+ return "Enoano"
+ case 56:
+ return "Ebadrqc"
+ case 57:
+ return "Ebadslt"
+ case 59:
+ return "Ebfont"
+ case 60:
+ return "Enostr"
+ case 61:
+ return "Enodata"
+ case 62:
+ return "Etime"
+ case 63:
+ return "Enosr"
+ case 64:
+ return "Enonet"
+ case 65:
+ return "Enopkg"
+ case 66:
+ return "Eremote"
+ case 67:
+ return "Enolink"
+ case 68:
+ return "Eadv"
+ case 69:
+ return "Esrmnt"
+ case 70:
+ return "Ecomm"
+ case 71:
+ return "Eproto"
+ case 72:
+ return "Emultihop"
+ case 73:
+ return "Edotdot"
+ case 74:
+ return "Ebadmsg"
+ case 75:
+ return "Eoverflow"
+ case 76:
+ return "Enotuniq"
+ case 77:
+ return "Ebadfd"
+ case 78:
+ return "Eremchg"
+ case 79:
+ return "Elibacc"
+ case 80:
+ return "Elibbad"
+ case 81:
+ return "Elibscn"
+ case 82:
+ return "Elibmax"
+ case 83:
+ return "Elibexec"
+ case 84:
+ return "Eilseq"
+ case 85:
+ return "Erestart"
+ case 86:
+ return "Estrpipe"
+ case 87:
+ return "Eusers"
+ case 88:
+ return "Enotsock"
+ case 89:
+ return "Edestaddrreq"
+ case 90:
+ return "Emsgsize"
+ case 91:
+ return "Eprototype"
+ case 92:
+ return "Enoprotoopt"
+ case 93:
+ return "Eprotonosupport"
+ case 94:
+ return "Esocktnosupport"
+ case 95:
+ return "Eopnotsupp"
+ case 96:
+ return "Epfnosupport"
+ case 97:
+ return "Eafnosupport"
+ case 98:
+ return "Eaddrinuse"
+ case 99:
+ return "Eaddrnotavail"
+ case 100:
+ return "Enetdown"
+ case 101:
+ return "Enetunreach"
+ case 102:
+ return "Enetreset"
+ case 103:
+ return "Econnaborted"
+ case 104:
+ return "Econnreset"
+ case 105:
+ return "Enobufs"
+ case 106:
+ return "Eisconn"
+ case 107:
+ return "Enotconn"
+ case 108:
+ return "Eshutdown"
+ case 109:
+ return "Etoomanyrefs"
+ case 110:
+ return "Etimedout"
+ case 111:
+ return "Econnrefused"
+ case 112:
+ return "Ehostdown"
+ case 113:
+ return "Ehostunreach"
+ case 114:
+ return "Ealready"
+ case 115:
+ return "Einprogress"
+ case 116:
+ return "Estale"
+ case 117:
+ return "Euclean"
+ case 118:
+ return "Enotnam"
+ case 119:
+ return "Enavail"
+ case 120:
+ return "Eisnam"
+ case 121:
+ return "Eremoteio"
+ case 122:
+ return "Edquot"
+ case 123:
+ return "Enomedium"
+ case 124:
+ return "Emediumtype"
+ case 125:
+ return "Ecanceled"
+ case 126:
+ return "Enokey"
+ case 127:
+ return "Ekeyexpired"
+ case 128:
+ return "Ekeyrevoked"
+ case 129:
+ return "Ekeyrejected"
+ case 130:
+ return "Eownerdead"
+ case 131:
+ return "Enotrecoverable"
+ case 132:
+ return "Erfkill"
+ case 133:
+ return "Ehwpoison"
+ }
+ return "Unknown"
+}
diff --git a/src/syscall/zx/posix/socket/impl.go b/src/syscall/zx/posix/socket/impl.go
new file mode 100644
index 0000000..2f89534
--- /dev/null
+++ b/src/syscall/zx/posix/socket/impl.go
@@ -0,0 +1,4446 @@
+// Copyright 2018 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
+
+package socket
+
+import (
+ _zx "syscall/zx"
+ _bindings "syscall/zx/fidl"
+ fuchsiaio "syscall/zx/io"
+ fuchsianet "syscall/zx/net"
+ fuchsiaposix "syscall/zx/posix"
+)
+
+const (
+ // The maximum length of an interface name.
+ InterfaceNameLength uint8 = 15
+)
+
+var _ _bindings.Enum = Domain(0)
+
+// A socket's domain.
+//
+// Determines the addressing domain for a socket.
+type Domain int16
+
+const (
+
+ // An IPv4 socket. Equivalent to `AF_INET`.
+ DomainIpv4 Domain = 0
+
+ // An IPv6 socket. Equivalent to `AF_INET6`.
+ DomainIpv6 Domain = 1
+)
+
+func (_ Domain) I_EnumValues() []Domain {
+ return []Domain{
+ DomainIpv4,
+ DomainIpv6,
+ }
+}
+
+func (_ Domain) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x Domain) IsUnknown() bool {
+ switch x {
+ case 0:
+ return true
+ case 1:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x Domain) String() string {
+ switch x {
+ case 0:
+ return "Ipv4"
+ case 1:
+ return "Ipv6"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = DatagramSocketProtocol(0)
+
+// Protocols supported by [`fuchsia.posix.socket/DatagramSocket`].
+//
+// `DatagramSocketProtocol` enumerates the protocols supported by the network stack over datagram
+// sockets.
+type DatagramSocketProtocol uint32
+
+const (
+
+ // UDP (User Datagram Protocol).
+ //
+ // A UDP socket is equivalent to the POSIX API of `SOCK_DGRAM` with a protocol of 0 or
+ // `IPPROTO_UDP`.
+ DatagramSocketProtocolUdp DatagramSocketProtocol = 1
+
+ // ICMP (Internet Control Message Protocol) echo.
+ //
+ // An ICMP echo socket is equivalent to the POSIX API of `SOCK_DGRAM` with a protocol of
+ // `IPPROTO_ICMP` `IPPROTO_ICMPV6` (depending on provided domain).
+ //
+ // Datagrams sent over an ICMP echo socket *must* have a valid ICMP or ICMPv6 echo header.
+ DatagramSocketProtocolIcmpEcho DatagramSocketProtocol = 2
+)
+
+func (_ DatagramSocketProtocol) I_EnumValues() []DatagramSocketProtocol {
+ return []DatagramSocketProtocol{
+ DatagramSocketProtocolUdp,
+ DatagramSocketProtocolIcmpEcho,
+ }
+}
+
+func (_ DatagramSocketProtocol) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x DatagramSocketProtocol) IsUnknown() bool {
+ switch x {
+ case 1:
+ return true
+ case 2:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x DatagramSocketProtocol) String() string {
+ switch x {
+ case 1:
+ return "Udp"
+ case 2:
+ return "IcmpEcho"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Enum = StreamSocketProtocol(0)
+
+// Protocols supported by [`fuchsia.posix.socket/StreamSocket`].
+//
+// `StreamSocketProtocol` enumerates the protocols supported by the network stack over stream
+// sockets.
+type StreamSocketProtocol uint32
+
+const (
+
+ // TCP (Transmission Control Protocol).
+ //
+ // A TCP socket is equivalent to the POSIX API of `SOCK_STREAM` with a protocol of 0 or
+ // `IPPROTO_TCP`.
+ StreamSocketProtocolTcp StreamSocketProtocol = 0
+)
+
+func (_ StreamSocketProtocol) I_EnumValues() []StreamSocketProtocol {
+ return []StreamSocketProtocol{
+ StreamSocketProtocolTcp,
+ }
+}
+
+func (_ StreamSocketProtocol) I_EnumIsStrict() bool {
+ return true
+}
+
+func (x StreamSocketProtocol) IsUnknown() bool {
+ switch x {
+ case 0:
+ return true
+ default:
+ return false
+ }
+}
+
+func (x StreamSocketProtocol) String() string {
+ switch x {
+ case 0:
+ return "Tcp"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = RecvMsgFlags(0)
+
+// Flags controlling RecvMsg behavior.
+type RecvMsgFlags uint16
+
+const (
+ RecvMsgFlagsPeek RecvMsgFlags = 2
+ RecvMsgFlags_Mask RecvMsgFlags = 2
+)
+
+func (_ RecvMsgFlags) I_BitsMask() RecvMsgFlags {
+ return RecvMsgFlags_Mask
+}
+
+func (_ RecvMsgFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x RecvMsgFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x RecvMsgFlags) GetUnknownBits() uint64 {
+ return uint64(^RecvMsgFlags_Mask & x)
+}
+
+func (x RecvMsgFlags) InvertBits() RecvMsgFlags {
+ return RecvMsgFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x RecvMsgFlags) HasBits(mask RecvMsgFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x RecvMsgFlags) ClearBits(mask RecvMsgFlags) RecvMsgFlags {
+ return ^mask & x
+}
+
+func (x RecvMsgFlags) String() string {
+ switch x {
+ case 2:
+ return "Peek"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = SendMsgFlags(0)
+
+type SendMsgFlags uint16
+
+const (
+ SendMsgFlagsReserved SendMsgFlags = 32768
+ SendMsgFlags_Mask SendMsgFlags = 32768
+)
+
+func (_ SendMsgFlags) I_BitsMask() SendMsgFlags {
+ return SendMsgFlags_Mask
+}
+
+func (_ SendMsgFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x SendMsgFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x SendMsgFlags) GetUnknownBits() uint64 {
+ return uint64(^SendMsgFlags_Mask & x)
+}
+
+func (x SendMsgFlags) InvertBits() SendMsgFlags {
+ return SendMsgFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x SendMsgFlags) HasBits(mask SendMsgFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x SendMsgFlags) ClearBits(mask SendMsgFlags) SendMsgFlags {
+ return ^mask & x
+}
+
+func (x SendMsgFlags) String() string {
+ switch x {
+ case 32768:
+ return "Reserved"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = ShutdownMode(0)
+
+// Socket shutdown mode.
+type ShutdownMode uint16
+
+const (
+ ShutdownModeRead ShutdownMode = 1
+ ShutdownModeWrite ShutdownMode = 2
+ ShutdownMode_Mask ShutdownMode = 3
+)
+
+func (_ ShutdownMode) I_BitsMask() ShutdownMode {
+ return ShutdownMode_Mask
+}
+
+func (_ ShutdownMode) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x ShutdownMode) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x ShutdownMode) GetUnknownBits() uint64 {
+ return uint64(^ShutdownMode_Mask & x)
+}
+
+func (x ShutdownMode) InvertBits() ShutdownMode {
+ return ShutdownMode_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x ShutdownMode) HasBits(mask ShutdownMode) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x ShutdownMode) ClearBits(mask ShutdownMode) ShutdownMode {
+ return ^mask & x
+}
+
+func (x ShutdownMode) String() string {
+ switch x {
+ case 1:
+ return "Read"
+ case 2:
+ return "Write"
+ }
+ return "Unknown"
+}
+
+var _ _bindings.Bits = InterfaceFlags(0)
+
+// Bits representing the interface flags as returned by the SIOCGIFFLAGS ioctl
+// operation. These bitmasks are intended to track the C API definition. For
+// example, `InterfaceFlags.UP` corresponds to `IFF_UP`, etc.
+type InterfaceFlags uint16
+
+const (
+ InterfaceFlagsUp InterfaceFlags = 1
+ InterfaceFlagsBroadcast InterfaceFlags = 2
+ InterfaceFlagsDebug InterfaceFlags = 4
+ InterfaceFlagsLoopback InterfaceFlags = 8
+ InterfaceFlagsPointtopoint InterfaceFlags = 16
+ InterfaceFlagsNotrailers InterfaceFlags = 32
+ InterfaceFlagsRunning InterfaceFlags = 64
+ InterfaceFlagsNoarp InterfaceFlags = 128
+ InterfaceFlagsPromisc InterfaceFlags = 256
+ InterfaceFlagsAllmulti InterfaceFlags = 512
+ InterfaceFlagsLeader InterfaceFlags = 1024
+ InterfaceFlagsFollower InterfaceFlags = 2048
+ InterfaceFlagsMulticast InterfaceFlags = 4096
+ InterfaceFlagsPortsel InterfaceFlags = 8192
+ InterfaceFlagsAutomedia InterfaceFlags = 16384
+ InterfaceFlagsDynamic InterfaceFlags = 32768
+ InterfaceFlags_Mask InterfaceFlags = 65535
+)
+
+func (_ InterfaceFlags) I_BitsMask() InterfaceFlags {
+ return InterfaceFlags_Mask
+}
+
+func (_ InterfaceFlags) I_BitsIsStrict() bool {
+ return true
+}
+
+func (x InterfaceFlags) HasUnknownBits() bool {
+ return x.GetUnknownBits() != 0
+}
+
+func (x InterfaceFlags) GetUnknownBits() uint64 {
+ return uint64(^InterfaceFlags_Mask & x)
+}
+
+func (x InterfaceFlags) InvertBits() InterfaceFlags {
+ return InterfaceFlags_Mask & ^x
+}
+
+// HasBits validates that all flipped bits in the mask are set.
+func (x InterfaceFlags) HasBits(mask InterfaceFlags) bool {
+ return mask|x == x
+}
+
+// ClearBits ensures all flipped bits in the mask are unset.
+func (x InterfaceFlags) ClearBits(mask InterfaceFlags) InterfaceFlags {
+ return ^mask & x
+}
+
+func (x InterfaceFlags) String() string {
+ switch x {
+ case 1:
+ return "Up"
+ case 2:
+ return "Broadcast"
+ case 4:
+ return "Debug"
+ case 8:
+ return "Loopback"
+ case 16:
+ return "Pointtopoint"
+ case 32:
+ return "Notrailers"
+ case 64:
+ return "Running"
+ case 128:
+ return "Noarp"
+ case 256:
+ return "Promisc"
+ case 512:
+ return "Allmulti"
+ case 1024:
+ return "Leader"
+ case 2048:
+ return "Follower"
+ case 4096:
+ return "Multicast"
+ case 8192:
+ return "Portsel"
+ case 16384:
+ return "Automedia"
+ case 32768:
+ return "Dynamic"
+ }
+ return "Unknown"
+}
+
+type BaseSocketBindResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mBaseSocketBindResponse = _bindings.CreateLazyMarshaler(BaseSocketBindResponse{})
+
+func (msg *BaseSocketBindResponse) Marshaler() _bindings.Marshaler {
+ return _mBaseSocketBindResponse
+}
+
+type BaseSocketConnectResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mBaseSocketConnectResponse = _bindings.CreateLazyMarshaler(BaseSocketConnectResponse{})
+
+func (msg *BaseSocketConnectResponse) Marshaler() _bindings.Marshaler {
+ return _mBaseSocketConnectResponse
+}
+
+type BaseSocketDisconnectResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mBaseSocketDisconnectResponse = _bindings.CreateLazyMarshaler(BaseSocketDisconnectResponse{})
+
+func (msg *BaseSocketDisconnectResponse) Marshaler() _bindings.Marshaler {
+ return _mBaseSocketDisconnectResponse
+}
+
+type BaseSocketGetSockNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+}
+
+var _mBaseSocketGetSockNameResponse = _bindings.CreateLazyMarshaler(BaseSocketGetSockNameResponse{})
+
+func (msg *BaseSocketGetSockNameResponse) Marshaler() _bindings.Marshaler {
+ return _mBaseSocketGetSockNameResponse
+}
+
+type BaseSocketGetPeerNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+}
+
+var _mBaseSocketGetPeerNameResponse = _bindings.CreateLazyMarshaler(BaseSocketGetPeerNameResponse{})
+
+func (msg *BaseSocketGetPeerNameResponse) Marshaler() _bindings.Marshaler {
+ return _mBaseSocketGetPeerNameResponse
+}
+
+type BaseSocketSetSockOptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mBaseSocketSetSockOptResponse = _bindings.CreateLazyMarshaler(BaseSocketSetSockOptResponse{})
+
+func (msg *BaseSocketSetSockOptResponse) Marshaler() _bindings.Marshaler {
+ return _mBaseSocketSetSockOptResponse
+}
+
+type BaseSocketGetSockOptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Optval []uint8 `fidl_offset_v1:"0" fidl_bounds:"900"`
+}
+
+var _mBaseSocketGetSockOptResponse = _bindings.CreateLazyMarshaler(BaseSocketGetSockOptResponse{})
+
+func (msg *BaseSocketGetSockOptResponse) Marshaler() _bindings.Marshaler {
+ return _mBaseSocketGetSockOptResponse
+}
+
+type DatagramSocketShutdownResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mDatagramSocketShutdownResponse = _bindings.CreateLazyMarshaler(DatagramSocketShutdownResponse{})
+
+func (msg *DatagramSocketShutdownResponse) Marshaler() _bindings.Marshaler {
+ return _mDatagramSocketShutdownResponse
+}
+
+type DatagramSocketRecvMsgResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Addr *fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+ Data []uint8 `fidl_offset_v1:"24" fidl_bounds:""`
+ Control RecvControlData `fidl_offset_v1:"40"`
+ Truncated uint32 `fidl_offset_v1:"56"`
+}
+
+var _mDatagramSocketRecvMsgResponse = _bindings.CreateLazyMarshaler(DatagramSocketRecvMsgResponse{})
+
+func (msg *DatagramSocketRecvMsgResponse) Marshaler() _bindings.Marshaler {
+ return _mDatagramSocketRecvMsgResponse
+}
+
+type DatagramSocketSendMsgResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Len int64 `fidl_offset_v1:"0"`
+}
+
+var _mDatagramSocketSendMsgResponse = _bindings.CreateLazyMarshaler(DatagramSocketSendMsgResponse{})
+
+func (msg *DatagramSocketSendMsgResponse) Marshaler() _bindings.Marshaler {
+ return _mDatagramSocketSendMsgResponse
+}
+
+type StreamSocketListenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mStreamSocketListenResponse = _bindings.CreateLazyMarshaler(StreamSocketListenResponse{})
+
+func (msg *StreamSocketListenResponse) Marshaler() _bindings.Marshaler {
+ return _mStreamSocketListenResponse
+}
+
+type StreamSocketAcceptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ Addr *fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+ S StreamSocketWithCtxInterface `fidl_offset_v1:"24" fidl_handle_subtype:"4"`
+}
+
+var _mStreamSocketAcceptResponse = _bindings.CreateLazyMarshaler(StreamSocketAcceptResponse{})
+
+func (msg *StreamSocketAcceptResponse) Marshaler() _bindings.Marshaler {
+ return _mStreamSocketAcceptResponse
+}
+
+type ProviderStreamSocketResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ S StreamSocketWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+}
+
+var _mProviderStreamSocketResponse = _bindings.CreateLazyMarshaler(ProviderStreamSocketResponse{})
+
+func (msg *ProviderStreamSocketResponse) Marshaler() _bindings.Marshaler {
+ return _mProviderStreamSocketResponse
+}
+
+type ProviderDatagramSocketResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
+ S DatagramSocketWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
+}
+
+var _mProviderDatagramSocketResponse = _bindings.CreateLazyMarshaler(ProviderDatagramSocketResponse{})
+
+func (msg *ProviderDatagramSocketResponse) Marshaler() _bindings.Marshaler {
+ return _mProviderDatagramSocketResponse
+}
+
+type ProviderInterfaceIndexToNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Name string `fidl_offset_v1:"0" fidl_bounds:"15"`
+}
+
+var _mProviderInterfaceIndexToNameResponse = _bindings.CreateLazyMarshaler(ProviderInterfaceIndexToNameResponse{})
+
+func (msg *ProviderInterfaceIndexToNameResponse) Marshaler() _bindings.Marshaler {
+ return _mProviderInterfaceIndexToNameResponse
+}
+
+type ProviderInterfaceNameToIndexResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Index uint64 `fidl_offset_v1:"0"`
+}
+
+var _mProviderInterfaceNameToIndexResponse = _bindings.CreateLazyMarshaler(ProviderInterfaceNameToIndexResponse{})
+
+func (msg *ProviderInterfaceNameToIndexResponse) Marshaler() _bindings.Marshaler {
+ return _mProviderInterfaceNameToIndexResponse
+}
+
+type ProviderInterfaceNameToFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"2" fidl_alignment_v1:"2"`
+ Flags InterfaceFlags `fidl_offset_v1:"0"`
+}
+
+var _mProviderInterfaceNameToFlagsResponse = _bindings.CreateLazyMarshaler(ProviderInterfaceNameToFlagsResponse{})
+
+func (msg *ProviderInterfaceNameToFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mProviderInterfaceNameToFlagsResponse
+}
+
+type Empty struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
+}
+
+var _mEmpty = _bindings.CreateLazyMarshaler(Empty{})
+
+func (msg *Empty) Marshaler() _bindings.Marshaler {
+ return _mEmpty
+}
+
+type baseSocketWithCtxCloneRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Object fuchsiaio.NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mbaseSocketWithCtxCloneRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxCloneRequest{})
+
+func (msg *baseSocketWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxCloneRequest
+}
+
+type baseSocketWithCtxCloseResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxCloseResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxCloseResponse{})
+
+func (msg *baseSocketWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxCloseResponse
+}
+
+type baseSocketWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Info fuchsiaio.NodeInfo `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxDescribeResponse{})
+
+func (msg *baseSocketWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxDescribeResponse
+}
+
+type baseSocketWithCtxOnOpenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Info *fuchsiaio.NodeInfo `fidl_offset_v1:"8"`
+}
+
+var _mbaseSocketWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxOnOpenResponse{})
+
+func (msg *baseSocketWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxOnOpenResponse
+}
+
+type baseSocketWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxSyncResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxSyncResponse{})
+
+func (msg *baseSocketWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxSyncResponse
+}
+
+type baseSocketWithCtxGetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mbaseSocketWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetAttrResponse{})
+
+func (msg *baseSocketWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxGetAttrResponse
+}
+
+type baseSocketWithCtxSetAttrRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mbaseSocketWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxSetAttrRequest{})
+
+func (msg *baseSocketWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxSetAttrRequest
+}
+
+type baseSocketWithCtxSetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxSetAttrResponse{})
+
+func (msg *baseSocketWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxSetAttrResponse
+}
+
+type baseSocketWithCtxNodeGetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Flags uint32 `fidl_offset_v1:"4"`
+}
+
+var _mbaseSocketWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxNodeGetFlagsResponse{})
+
+func (msg *baseSocketWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxNodeGetFlagsResponse
+}
+
+type baseSocketWithCtxNodeSetFlagsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxNodeSetFlagsRequest{})
+
+func (msg *baseSocketWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxNodeSetFlagsRequest
+}
+
+type baseSocketWithCtxNodeSetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxNodeSetFlagsResponse{})
+
+func (msg *baseSocketWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxNodeSetFlagsResponse
+}
+
+type baseSocketWithCtxBindRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxBindRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxBindRequest{})
+
+func (msg *baseSocketWithCtxBindRequest) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxBindRequest
+}
+
+type baseSocketWithCtxBindResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketBindResult `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxBindResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxBindResponse{})
+
+func (msg *baseSocketWithCtxBindResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxBindResponse
+}
+
+type baseSocketWithCtxConnectRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxConnectRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxConnectRequest{})
+
+func (msg *baseSocketWithCtxConnectRequest) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxConnectRequest
+}
+
+type baseSocketWithCtxConnectResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketConnectResult `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxConnectResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxConnectResponse{})
+
+func (msg *baseSocketWithCtxConnectResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxConnectResponse
+}
+
+type baseSocketWithCtxDisconnectResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketDisconnectResult `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxDisconnectResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxDisconnectResponse{})
+
+func (msg *baseSocketWithCtxDisconnectResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxDisconnectResponse
+}
+
+type baseSocketWithCtxGetSockNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketGetSockNameResult `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxGetSockNameResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetSockNameResponse{})
+
+func (msg *baseSocketWithCtxGetSockNameResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxGetSockNameResponse
+}
+
+type baseSocketWithCtxGetPeerNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketGetPeerNameResult `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxGetPeerNameResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetPeerNameResponse{})
+
+func (msg *baseSocketWithCtxGetPeerNameResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxGetPeerNameResponse
+}
+
+type baseSocketWithCtxSetSockOptRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Level int16 `fidl_offset_v1:"0"`
+ Optname int16 `fidl_offset_v1:"2"`
+ Optval []uint8 `fidl_offset_v1:"8" fidl_bounds:"900"`
+}
+
+var _mbaseSocketWithCtxSetSockOptRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxSetSockOptRequest{})
+
+func (msg *baseSocketWithCtxSetSockOptRequest) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxSetSockOptRequest
+}
+
+type baseSocketWithCtxSetSockOptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketSetSockOptResult `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxSetSockOptResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxSetSockOptResponse{})
+
+func (msg *baseSocketWithCtxSetSockOptResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxSetSockOptResponse
+}
+
+type baseSocketWithCtxGetSockOptRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Level int16 `fidl_offset_v1:"0"`
+ Optname int16 `fidl_offset_v1:"2"`
+}
+
+var _mbaseSocketWithCtxGetSockOptRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetSockOptRequest{})
+
+func (msg *baseSocketWithCtxGetSockOptRequest) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxGetSockOptRequest
+}
+
+type baseSocketWithCtxGetSockOptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketGetSockOptResult `fidl_offset_v1:"0"`
+}
+
+var _mbaseSocketWithCtxGetSockOptResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetSockOptResponse{})
+
+func (msg *baseSocketWithCtxGetSockOptResponse) Marshaler() _bindings.Marshaler {
+ return _mbaseSocketWithCtxGetSockOptResponse
+}
+
+type datagramSocketWithCtxCloneRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Object fuchsiaio.NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mdatagramSocketWithCtxCloneRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxCloneRequest{})
+
+func (msg *datagramSocketWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxCloneRequest
+}
+
+type datagramSocketWithCtxCloseResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxCloseResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxCloseResponse{})
+
+func (msg *datagramSocketWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxCloseResponse
+}
+
+type datagramSocketWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Info fuchsiaio.NodeInfo `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxDescribeResponse{})
+
+func (msg *datagramSocketWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxDescribeResponse
+}
+
+type datagramSocketWithCtxOnOpenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Info *fuchsiaio.NodeInfo `fidl_offset_v1:"8"`
+}
+
+var _mdatagramSocketWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxOnOpenResponse{})
+
+func (msg *datagramSocketWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxOnOpenResponse
+}
+
+type datagramSocketWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxSyncResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSyncResponse{})
+
+func (msg *datagramSocketWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxSyncResponse
+}
+
+type datagramSocketWithCtxGetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mdatagramSocketWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetAttrResponse{})
+
+func (msg *datagramSocketWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxGetAttrResponse
+}
+
+type datagramSocketWithCtxSetAttrRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mdatagramSocketWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSetAttrRequest{})
+
+func (msg *datagramSocketWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxSetAttrRequest
+}
+
+type datagramSocketWithCtxSetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSetAttrResponse{})
+
+func (msg *datagramSocketWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxSetAttrResponse
+}
+
+type datagramSocketWithCtxNodeGetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Flags uint32 `fidl_offset_v1:"4"`
+}
+
+var _mdatagramSocketWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxNodeGetFlagsResponse{})
+
+func (msg *datagramSocketWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxNodeGetFlagsResponse
+}
+
+type datagramSocketWithCtxNodeSetFlagsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxNodeSetFlagsRequest{})
+
+func (msg *datagramSocketWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxNodeSetFlagsRequest
+}
+
+type datagramSocketWithCtxNodeSetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxNodeSetFlagsResponse{})
+
+func (msg *datagramSocketWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxNodeSetFlagsResponse
+}
+
+type datagramSocketWithCtxBindRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxBindRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxBindRequest{})
+
+func (msg *datagramSocketWithCtxBindRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxBindRequest
+}
+
+type datagramSocketWithCtxBindResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketBindResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxBindResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxBindResponse{})
+
+func (msg *datagramSocketWithCtxBindResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxBindResponse
+}
+
+type datagramSocketWithCtxConnectRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxConnectRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxConnectRequest{})
+
+func (msg *datagramSocketWithCtxConnectRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxConnectRequest
+}
+
+type datagramSocketWithCtxConnectResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketConnectResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxConnectResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxConnectResponse{})
+
+func (msg *datagramSocketWithCtxConnectResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxConnectResponse
+}
+
+type datagramSocketWithCtxDisconnectResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketDisconnectResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxDisconnectResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxDisconnectResponse{})
+
+func (msg *datagramSocketWithCtxDisconnectResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxDisconnectResponse
+}
+
+type datagramSocketWithCtxGetSockNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketGetSockNameResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxGetSockNameResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetSockNameResponse{})
+
+func (msg *datagramSocketWithCtxGetSockNameResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxGetSockNameResponse
+}
+
+type datagramSocketWithCtxGetPeerNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketGetPeerNameResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxGetPeerNameResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetPeerNameResponse{})
+
+func (msg *datagramSocketWithCtxGetPeerNameResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxGetPeerNameResponse
+}
+
+type datagramSocketWithCtxSetSockOptRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Level int16 `fidl_offset_v1:"0"`
+ Optname int16 `fidl_offset_v1:"2"`
+ Optval []uint8 `fidl_offset_v1:"8" fidl_bounds:"900"`
+}
+
+var _mdatagramSocketWithCtxSetSockOptRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSetSockOptRequest{})
+
+func (msg *datagramSocketWithCtxSetSockOptRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxSetSockOptRequest
+}
+
+type datagramSocketWithCtxSetSockOptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketSetSockOptResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxSetSockOptResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSetSockOptResponse{})
+
+func (msg *datagramSocketWithCtxSetSockOptResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxSetSockOptResponse
+}
+
+type datagramSocketWithCtxGetSockOptRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Level int16 `fidl_offset_v1:"0"`
+ Optname int16 `fidl_offset_v1:"2"`
+}
+
+var _mdatagramSocketWithCtxGetSockOptRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetSockOptRequest{})
+
+func (msg *datagramSocketWithCtxGetSockOptRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxGetSockOptRequest
+}
+
+type datagramSocketWithCtxGetSockOptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketGetSockOptResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxGetSockOptResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetSockOptResponse{})
+
+func (msg *datagramSocketWithCtxGetSockOptResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxGetSockOptResponse
+}
+
+type datagramSocketWithCtxShutdownRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Mode ShutdownMode `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxShutdownRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxShutdownRequest{})
+
+func (msg *datagramSocketWithCtxShutdownRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxShutdownRequest
+}
+
+type datagramSocketWithCtxShutdownResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result DatagramSocketShutdownResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxShutdownResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxShutdownResponse{})
+
+func (msg *datagramSocketWithCtxShutdownResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxShutdownResponse
+}
+
+type datagramSocketWithCtxRecvMsgRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ WantAddr bool `fidl_offset_v1:"0"`
+ DataLen uint32 `fidl_offset_v1:"4"`
+ WantControl bool `fidl_offset_v1:"8"`
+ Flags RecvMsgFlags `fidl_offset_v1:"10"`
+}
+
+var _mdatagramSocketWithCtxRecvMsgRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxRecvMsgRequest{})
+
+func (msg *datagramSocketWithCtxRecvMsgRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxRecvMsgRequest
+}
+
+type datagramSocketWithCtxRecvMsgResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result DatagramSocketRecvMsgResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxRecvMsgResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxRecvMsgResponse{})
+
+func (msg *datagramSocketWithCtxRecvMsgResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxRecvMsgResponse
+}
+
+type datagramSocketWithCtxSendMsgRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Addr *fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+ Data []uint8 `fidl_offset_v1:"24" fidl_bounds:""`
+ Control SendControlData `fidl_offset_v1:"40"`
+ Flags SendMsgFlags `fidl_offset_v1:"56"`
+}
+
+var _mdatagramSocketWithCtxSendMsgRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSendMsgRequest{})
+
+func (msg *datagramSocketWithCtxSendMsgRequest) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxSendMsgRequest
+}
+
+type datagramSocketWithCtxSendMsgResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result DatagramSocketSendMsgResult `fidl_offset_v1:"0"`
+}
+
+var _mdatagramSocketWithCtxSendMsgResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSendMsgResponse{})
+
+func (msg *datagramSocketWithCtxSendMsgResponse) Marshaler() _bindings.Marshaler {
+ return _mdatagramSocketWithCtxSendMsgResponse
+}
+
+type streamSocketWithCtxCloneRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Object fuchsiaio.NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
+}
+
+var _mstreamSocketWithCtxCloneRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxCloneRequest{})
+
+func (msg *streamSocketWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxCloneRequest
+}
+
+type streamSocketWithCtxCloseResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxCloseResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxCloseResponse{})
+
+func (msg *streamSocketWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxCloseResponse
+}
+
+type streamSocketWithCtxDescribeResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Info fuchsiaio.NodeInfo `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxDescribeResponse{})
+
+func (msg *streamSocketWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxDescribeResponse
+}
+
+type streamSocketWithCtxOnOpenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Info *fuchsiaio.NodeInfo `fidl_offset_v1:"8"`
+}
+
+var _mstreamSocketWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxOnOpenResponse{})
+
+func (msg *streamSocketWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxOnOpenResponse
+}
+
+type streamSocketWithCtxSyncResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxSyncResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxSyncResponse{})
+
+func (msg *streamSocketWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxSyncResponse
+}
+
+type streamSocketWithCtxGetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mstreamSocketWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetAttrResponse{})
+
+func (msg *streamSocketWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxGetAttrResponse
+}
+
+type streamSocketWithCtxSetAttrRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+ Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
+}
+
+var _mstreamSocketWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxSetAttrRequest{})
+
+func (msg *streamSocketWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxSetAttrRequest
+}
+
+type streamSocketWithCtxSetAttrResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxSetAttrResponse{})
+
+func (msg *streamSocketWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxSetAttrResponse
+}
+
+type streamSocketWithCtxNodeGetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+ Flags uint32 `fidl_offset_v1:"4"`
+}
+
+var _mstreamSocketWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxNodeGetFlagsResponse{})
+
+func (msg *streamSocketWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxNodeGetFlagsResponse
+}
+
+type streamSocketWithCtxNodeSetFlagsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Flags uint32 `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxNodeSetFlagsRequest{})
+
+func (msg *streamSocketWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxNodeSetFlagsRequest
+}
+
+type streamSocketWithCtxNodeSetFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ S int32 `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxNodeSetFlagsResponse{})
+
+func (msg *streamSocketWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxNodeSetFlagsResponse
+}
+
+type streamSocketWithCtxBindRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxBindRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxBindRequest{})
+
+func (msg *streamSocketWithCtxBindRequest) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxBindRequest
+}
+
+type streamSocketWithCtxBindResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketBindResult `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxBindResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxBindResponse{})
+
+func (msg *streamSocketWithCtxBindResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxBindResponse
+}
+
+type streamSocketWithCtxConnectRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxConnectRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxConnectRequest{})
+
+func (msg *streamSocketWithCtxConnectRequest) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxConnectRequest
+}
+
+type streamSocketWithCtxConnectResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketConnectResult `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxConnectResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxConnectResponse{})
+
+func (msg *streamSocketWithCtxConnectResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxConnectResponse
+}
+
+type streamSocketWithCtxDisconnectResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketDisconnectResult `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxDisconnectResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxDisconnectResponse{})
+
+func (msg *streamSocketWithCtxDisconnectResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxDisconnectResponse
+}
+
+type streamSocketWithCtxGetSockNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketGetSockNameResult `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxGetSockNameResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetSockNameResponse{})
+
+func (msg *streamSocketWithCtxGetSockNameResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxGetSockNameResponse
+}
+
+type streamSocketWithCtxGetPeerNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketGetPeerNameResult `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxGetPeerNameResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetPeerNameResponse{})
+
+func (msg *streamSocketWithCtxGetPeerNameResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxGetPeerNameResponse
+}
+
+type streamSocketWithCtxSetSockOptRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Level int16 `fidl_offset_v1:"0"`
+ Optname int16 `fidl_offset_v1:"2"`
+ Optval []uint8 `fidl_offset_v1:"8" fidl_bounds:"900"`
+}
+
+var _mstreamSocketWithCtxSetSockOptRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxSetSockOptRequest{})
+
+func (msg *streamSocketWithCtxSetSockOptRequest) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxSetSockOptRequest
+}
+
+type streamSocketWithCtxSetSockOptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketSetSockOptResult `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxSetSockOptResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxSetSockOptResponse{})
+
+func (msg *streamSocketWithCtxSetSockOptResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxSetSockOptResponse
+}
+
+type streamSocketWithCtxGetSockOptRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Level int16 `fidl_offset_v1:"0"`
+ Optname int16 `fidl_offset_v1:"2"`
+}
+
+var _mstreamSocketWithCtxGetSockOptRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetSockOptRequest{})
+
+func (msg *streamSocketWithCtxGetSockOptRequest) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxGetSockOptRequest
+}
+
+type streamSocketWithCtxGetSockOptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result BaseSocketGetSockOptResult `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxGetSockOptResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetSockOptResponse{})
+
+func (msg *streamSocketWithCtxGetSockOptResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxGetSockOptResponse
+}
+
+type streamSocketWithCtxListenRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Backlog int16 `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxListenRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxListenRequest{})
+
+func (msg *streamSocketWithCtxListenRequest) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxListenRequest
+}
+
+type streamSocketWithCtxListenResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StreamSocketListenResult `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxListenResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxListenResponse{})
+
+func (msg *streamSocketWithCtxListenResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxListenResponse
+}
+
+type streamSocketWithCtxAcceptRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ WantAddr bool `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxAcceptRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxAcceptRequest{})
+
+func (msg *streamSocketWithCtxAcceptRequest) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxAcceptRequest
+}
+
+type streamSocketWithCtxAcceptResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result StreamSocketAcceptResult `fidl_offset_v1:"0"`
+}
+
+var _mstreamSocketWithCtxAcceptResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxAcceptResponse{})
+
+func (msg *streamSocketWithCtxAcceptResponse) Marshaler() _bindings.Marshaler {
+ return _mstreamSocketWithCtxAcceptResponse
+}
+
+type providerWithCtxStreamSocketRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Domain Domain `fidl_offset_v1:"0"`
+ Proto StreamSocketProtocol `fidl_offset_v1:"4"`
+}
+
+var _mproviderWithCtxStreamSocketRequest = _bindings.CreateLazyMarshaler(providerWithCtxStreamSocketRequest{})
+
+func (msg *providerWithCtxStreamSocketRequest) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxStreamSocketRequest
+}
+
+type providerWithCtxStreamSocketResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result ProviderStreamSocketResult `fidl_offset_v1:"0"`
+}
+
+var _mproviderWithCtxStreamSocketResponse = _bindings.CreateLazyMarshaler(providerWithCtxStreamSocketResponse{})
+
+func (msg *providerWithCtxStreamSocketResponse) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxStreamSocketResponse
+}
+
+type providerWithCtxDatagramSocketRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Domain Domain `fidl_offset_v1:"0"`
+ Proto DatagramSocketProtocol `fidl_offset_v1:"4"`
+}
+
+var _mproviderWithCtxDatagramSocketRequest = _bindings.CreateLazyMarshaler(providerWithCtxDatagramSocketRequest{})
+
+func (msg *providerWithCtxDatagramSocketRequest) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxDatagramSocketRequest
+}
+
+type providerWithCtxDatagramSocketResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result ProviderDatagramSocketResult `fidl_offset_v1:"0"`
+}
+
+var _mproviderWithCtxDatagramSocketResponse = _bindings.CreateLazyMarshaler(providerWithCtxDatagramSocketResponse{})
+
+func (msg *providerWithCtxDatagramSocketResponse) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxDatagramSocketResponse
+}
+
+type providerWithCtxInterfaceIndexToNameRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
+ Index uint64 `fidl_offset_v1:"0"`
+}
+
+var _mproviderWithCtxInterfaceIndexToNameRequest = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceIndexToNameRequest{})
+
+func (msg *providerWithCtxInterfaceIndexToNameRequest) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxInterfaceIndexToNameRequest
+}
+
+type providerWithCtxInterfaceIndexToNameResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result ProviderInterfaceIndexToNameResult `fidl_offset_v1:"0"`
+}
+
+var _mproviderWithCtxInterfaceIndexToNameResponse = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceIndexToNameResponse{})
+
+func (msg *providerWithCtxInterfaceIndexToNameResponse) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxInterfaceIndexToNameResponse
+}
+
+type providerWithCtxInterfaceNameToIndexRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Name string `fidl_offset_v1:"0" fidl_bounds:"15"`
+}
+
+var _mproviderWithCtxInterfaceNameToIndexRequest = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceNameToIndexRequest{})
+
+func (msg *providerWithCtxInterfaceNameToIndexRequest) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxInterfaceNameToIndexRequest
+}
+
+type providerWithCtxInterfaceNameToIndexResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result ProviderInterfaceNameToIndexResult `fidl_offset_v1:"0"`
+}
+
+var _mproviderWithCtxInterfaceNameToIndexResponse = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceNameToIndexResponse{})
+
+func (msg *providerWithCtxInterfaceNameToIndexResponse) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxInterfaceNameToIndexResponse
+}
+
+type providerWithCtxInterfaceNameToFlagsRequest struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Name string `fidl_offset_v1:"0" fidl_bounds:"15"`
+}
+
+var _mproviderWithCtxInterfaceNameToFlagsRequest = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceNameToFlagsRequest{})
+
+func (msg *providerWithCtxInterfaceNameToFlagsRequest) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxInterfaceNameToFlagsRequest
+}
+
+type providerWithCtxInterfaceNameToFlagsResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
+ Result ProviderInterfaceNameToFlagsResult `fidl_offset_v1:"0"`
+}
+
+var _mproviderWithCtxInterfaceNameToFlagsResponse = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceNameToFlagsResponse{})
+
+func (msg *providerWithCtxInterfaceNameToFlagsResponse) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxInterfaceNameToFlagsResponse
+}
+
+type providerWithCtxGetInterfaceAddressesResponse struct {
+ _ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Interfaces []InterfaceAddresses `fidl_offset_v1:"0" fidl_bounds:""`
+}
+
+var _mproviderWithCtxGetInterfaceAddressesResponse = _bindings.CreateLazyMarshaler(providerWithCtxGetInterfaceAddressesResponse{})
+
+func (msg *providerWithCtxGetInterfaceAddressesResponse) Marshaler() _bindings.Marshaler {
+ return _mproviderWithCtxGetInterfaceAddressesResponse
+}
+
+type I_baseSocketBindResultTag uint64
+
+const (
+ BaseSocketBindResultResponse = 1 // 0x00000001
+ BaseSocketBindResultErr = 2 // 0x00000002
+)
+
+type BaseSocketBindResult struct {
+ I_baseSocketBindResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response BaseSocketBindResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *BaseSocketBindResult) reset() {
+ switch _m.I_baseSocketBindResultTag {
+ case 1:
+ var _zeroed BaseSocketBindResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *BaseSocketBindResult) Which() I_baseSocketBindResultTag {
+ return _m.I_baseSocketBindResultTag
+}
+
+func (_m *BaseSocketBindResult) Ordinal() uint64 {
+ return uint64(_m.I_baseSocketBindResultTag)
+}
+
+func (_m *BaseSocketBindResult) SetResponse(response BaseSocketBindResponse) {
+ _m.reset()
+ _m.I_baseSocketBindResultTag = BaseSocketBindResultResponse
+ _m.Response = response
+}
+
+func BaseSocketBindResultWithResponse(response BaseSocketBindResponse) BaseSocketBindResult {
+ var _u BaseSocketBindResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *BaseSocketBindResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_baseSocketBindResultTag = BaseSocketBindResultErr
+ _m.Err = err
+}
+
+func BaseSocketBindResultWithErr(err fuchsiaposix.Errno) BaseSocketBindResult {
+ var _u BaseSocketBindResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_baseSocketConnectResultTag uint64
+
+const (
+ BaseSocketConnectResultResponse = 1 // 0x00000001
+ BaseSocketConnectResultErr = 2 // 0x00000002
+)
+
+type BaseSocketConnectResult struct {
+ I_baseSocketConnectResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response BaseSocketConnectResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *BaseSocketConnectResult) reset() {
+ switch _m.I_baseSocketConnectResultTag {
+ case 1:
+ var _zeroed BaseSocketConnectResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *BaseSocketConnectResult) Which() I_baseSocketConnectResultTag {
+ return _m.I_baseSocketConnectResultTag
+}
+
+func (_m *BaseSocketConnectResult) Ordinal() uint64 {
+ return uint64(_m.I_baseSocketConnectResultTag)
+}
+
+func (_m *BaseSocketConnectResult) SetResponse(response BaseSocketConnectResponse) {
+ _m.reset()
+ _m.I_baseSocketConnectResultTag = BaseSocketConnectResultResponse
+ _m.Response = response
+}
+
+func BaseSocketConnectResultWithResponse(response BaseSocketConnectResponse) BaseSocketConnectResult {
+ var _u BaseSocketConnectResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *BaseSocketConnectResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_baseSocketConnectResultTag = BaseSocketConnectResultErr
+ _m.Err = err
+}
+
+func BaseSocketConnectResultWithErr(err fuchsiaposix.Errno) BaseSocketConnectResult {
+ var _u BaseSocketConnectResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_baseSocketDisconnectResultTag uint64
+
+const (
+ BaseSocketDisconnectResultResponse = 1 // 0x00000001
+ BaseSocketDisconnectResultErr = 2 // 0x00000002
+)
+
+type BaseSocketDisconnectResult struct {
+ I_baseSocketDisconnectResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response BaseSocketDisconnectResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *BaseSocketDisconnectResult) reset() {
+ switch _m.I_baseSocketDisconnectResultTag {
+ case 1:
+ var _zeroed BaseSocketDisconnectResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *BaseSocketDisconnectResult) Which() I_baseSocketDisconnectResultTag {
+ return _m.I_baseSocketDisconnectResultTag
+}
+
+func (_m *BaseSocketDisconnectResult) Ordinal() uint64 {
+ return uint64(_m.I_baseSocketDisconnectResultTag)
+}
+
+func (_m *BaseSocketDisconnectResult) SetResponse(response BaseSocketDisconnectResponse) {
+ _m.reset()
+ _m.I_baseSocketDisconnectResultTag = BaseSocketDisconnectResultResponse
+ _m.Response = response
+}
+
+func BaseSocketDisconnectResultWithResponse(response BaseSocketDisconnectResponse) BaseSocketDisconnectResult {
+ var _u BaseSocketDisconnectResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *BaseSocketDisconnectResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_baseSocketDisconnectResultTag = BaseSocketDisconnectResultErr
+ _m.Err = err
+}
+
+func BaseSocketDisconnectResultWithErr(err fuchsiaposix.Errno) BaseSocketDisconnectResult {
+ var _u BaseSocketDisconnectResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_baseSocketGetSockNameResultTag uint64
+
+const (
+ BaseSocketGetSockNameResultResponse = 1 // 0x00000001
+ BaseSocketGetSockNameResultErr = 2 // 0x00000002
+)
+
+type BaseSocketGetSockNameResult struct {
+ I_baseSocketGetSockNameResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response BaseSocketGetSockNameResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *BaseSocketGetSockNameResult) reset() {
+ switch _m.I_baseSocketGetSockNameResultTag {
+ case 1:
+ var _zeroed BaseSocketGetSockNameResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *BaseSocketGetSockNameResult) Which() I_baseSocketGetSockNameResultTag {
+ return _m.I_baseSocketGetSockNameResultTag
+}
+
+func (_m *BaseSocketGetSockNameResult) Ordinal() uint64 {
+ return uint64(_m.I_baseSocketGetSockNameResultTag)
+}
+
+func (_m *BaseSocketGetSockNameResult) SetResponse(response BaseSocketGetSockNameResponse) {
+ _m.reset()
+ _m.I_baseSocketGetSockNameResultTag = BaseSocketGetSockNameResultResponse
+ _m.Response = response
+}
+
+func BaseSocketGetSockNameResultWithResponse(response BaseSocketGetSockNameResponse) BaseSocketGetSockNameResult {
+ var _u BaseSocketGetSockNameResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *BaseSocketGetSockNameResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_baseSocketGetSockNameResultTag = BaseSocketGetSockNameResultErr
+ _m.Err = err
+}
+
+func BaseSocketGetSockNameResultWithErr(err fuchsiaposix.Errno) BaseSocketGetSockNameResult {
+ var _u BaseSocketGetSockNameResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_baseSocketGetPeerNameResultTag uint64
+
+const (
+ BaseSocketGetPeerNameResultResponse = 1 // 0x00000001
+ BaseSocketGetPeerNameResultErr = 2 // 0x00000002
+)
+
+type BaseSocketGetPeerNameResult struct {
+ I_baseSocketGetPeerNameResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response BaseSocketGetPeerNameResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *BaseSocketGetPeerNameResult) reset() {
+ switch _m.I_baseSocketGetPeerNameResultTag {
+ case 1:
+ var _zeroed BaseSocketGetPeerNameResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *BaseSocketGetPeerNameResult) Which() I_baseSocketGetPeerNameResultTag {
+ return _m.I_baseSocketGetPeerNameResultTag
+}
+
+func (_m *BaseSocketGetPeerNameResult) Ordinal() uint64 {
+ return uint64(_m.I_baseSocketGetPeerNameResultTag)
+}
+
+func (_m *BaseSocketGetPeerNameResult) SetResponse(response BaseSocketGetPeerNameResponse) {
+ _m.reset()
+ _m.I_baseSocketGetPeerNameResultTag = BaseSocketGetPeerNameResultResponse
+ _m.Response = response
+}
+
+func BaseSocketGetPeerNameResultWithResponse(response BaseSocketGetPeerNameResponse) BaseSocketGetPeerNameResult {
+ var _u BaseSocketGetPeerNameResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *BaseSocketGetPeerNameResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_baseSocketGetPeerNameResultTag = BaseSocketGetPeerNameResultErr
+ _m.Err = err
+}
+
+func BaseSocketGetPeerNameResultWithErr(err fuchsiaposix.Errno) BaseSocketGetPeerNameResult {
+ var _u BaseSocketGetPeerNameResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_baseSocketSetSockOptResultTag uint64
+
+const (
+ BaseSocketSetSockOptResultResponse = 1 // 0x00000001
+ BaseSocketSetSockOptResultErr = 2 // 0x00000002
+)
+
+type BaseSocketSetSockOptResult struct {
+ I_baseSocketSetSockOptResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response BaseSocketSetSockOptResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *BaseSocketSetSockOptResult) reset() {
+ switch _m.I_baseSocketSetSockOptResultTag {
+ case 1:
+ var _zeroed BaseSocketSetSockOptResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *BaseSocketSetSockOptResult) Which() I_baseSocketSetSockOptResultTag {
+ return _m.I_baseSocketSetSockOptResultTag
+}
+
+func (_m *BaseSocketSetSockOptResult) Ordinal() uint64 {
+ return uint64(_m.I_baseSocketSetSockOptResultTag)
+}
+
+func (_m *BaseSocketSetSockOptResult) SetResponse(response BaseSocketSetSockOptResponse) {
+ _m.reset()
+ _m.I_baseSocketSetSockOptResultTag = BaseSocketSetSockOptResultResponse
+ _m.Response = response
+}
+
+func BaseSocketSetSockOptResultWithResponse(response BaseSocketSetSockOptResponse) BaseSocketSetSockOptResult {
+ var _u BaseSocketSetSockOptResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *BaseSocketSetSockOptResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_baseSocketSetSockOptResultTag = BaseSocketSetSockOptResultErr
+ _m.Err = err
+}
+
+func BaseSocketSetSockOptResultWithErr(err fuchsiaposix.Errno) BaseSocketSetSockOptResult {
+ var _u BaseSocketSetSockOptResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_baseSocketGetSockOptResultTag uint64
+
+const (
+ BaseSocketGetSockOptResultResponse = 1 // 0x00000001
+ BaseSocketGetSockOptResultErr = 2 // 0x00000002
+)
+
+type BaseSocketGetSockOptResult struct {
+ I_baseSocketGetSockOptResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response BaseSocketGetSockOptResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *BaseSocketGetSockOptResult) reset() {
+ switch _m.I_baseSocketGetSockOptResultTag {
+ case 1:
+ var _zeroed BaseSocketGetSockOptResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *BaseSocketGetSockOptResult) Which() I_baseSocketGetSockOptResultTag {
+ return _m.I_baseSocketGetSockOptResultTag
+}
+
+func (_m *BaseSocketGetSockOptResult) Ordinal() uint64 {
+ return uint64(_m.I_baseSocketGetSockOptResultTag)
+}
+
+func (_m *BaseSocketGetSockOptResult) SetResponse(response BaseSocketGetSockOptResponse) {
+ _m.reset()
+ _m.I_baseSocketGetSockOptResultTag = BaseSocketGetSockOptResultResponse
+ _m.Response = response
+}
+
+func BaseSocketGetSockOptResultWithResponse(response BaseSocketGetSockOptResponse) BaseSocketGetSockOptResult {
+ var _u BaseSocketGetSockOptResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *BaseSocketGetSockOptResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_baseSocketGetSockOptResultTag = BaseSocketGetSockOptResultErr
+ _m.Err = err
+}
+
+func BaseSocketGetSockOptResultWithErr(err fuchsiaposix.Errno) BaseSocketGetSockOptResult {
+ var _u BaseSocketGetSockOptResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_datagramSocketShutdownResultTag uint64
+
+const (
+ DatagramSocketShutdownResultResponse = 1 // 0x00000001
+ DatagramSocketShutdownResultErr = 2 // 0x00000002
+)
+
+type DatagramSocketShutdownResult struct {
+ I_datagramSocketShutdownResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response DatagramSocketShutdownResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *DatagramSocketShutdownResult) reset() {
+ switch _m.I_datagramSocketShutdownResultTag {
+ case 1:
+ var _zeroed DatagramSocketShutdownResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *DatagramSocketShutdownResult) Which() I_datagramSocketShutdownResultTag {
+ return _m.I_datagramSocketShutdownResultTag
+}
+
+func (_m *DatagramSocketShutdownResult) Ordinal() uint64 {
+ return uint64(_m.I_datagramSocketShutdownResultTag)
+}
+
+func (_m *DatagramSocketShutdownResult) SetResponse(response DatagramSocketShutdownResponse) {
+ _m.reset()
+ _m.I_datagramSocketShutdownResultTag = DatagramSocketShutdownResultResponse
+ _m.Response = response
+}
+
+func DatagramSocketShutdownResultWithResponse(response DatagramSocketShutdownResponse) DatagramSocketShutdownResult {
+ var _u DatagramSocketShutdownResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *DatagramSocketShutdownResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_datagramSocketShutdownResultTag = DatagramSocketShutdownResultErr
+ _m.Err = err
+}
+
+func DatagramSocketShutdownResultWithErr(err fuchsiaposix.Errno) DatagramSocketShutdownResult {
+ var _u DatagramSocketShutdownResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_datagramSocketRecvMsgResultTag uint64
+
+const (
+ DatagramSocketRecvMsgResultResponse = 1 // 0x00000001
+ DatagramSocketRecvMsgResultErr = 2 // 0x00000002
+)
+
+type DatagramSocketRecvMsgResult struct {
+ I_datagramSocketRecvMsgResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response DatagramSocketRecvMsgResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *DatagramSocketRecvMsgResult) reset() {
+ switch _m.I_datagramSocketRecvMsgResultTag {
+ case 1:
+ var _zeroed DatagramSocketRecvMsgResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *DatagramSocketRecvMsgResult) Which() I_datagramSocketRecvMsgResultTag {
+ return _m.I_datagramSocketRecvMsgResultTag
+}
+
+func (_m *DatagramSocketRecvMsgResult) Ordinal() uint64 {
+ return uint64(_m.I_datagramSocketRecvMsgResultTag)
+}
+
+func (_m *DatagramSocketRecvMsgResult) SetResponse(response DatagramSocketRecvMsgResponse) {
+ _m.reset()
+ _m.I_datagramSocketRecvMsgResultTag = DatagramSocketRecvMsgResultResponse
+ _m.Response = response
+}
+
+func DatagramSocketRecvMsgResultWithResponse(response DatagramSocketRecvMsgResponse) DatagramSocketRecvMsgResult {
+ var _u DatagramSocketRecvMsgResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *DatagramSocketRecvMsgResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_datagramSocketRecvMsgResultTag = DatagramSocketRecvMsgResultErr
+ _m.Err = err
+}
+
+func DatagramSocketRecvMsgResultWithErr(err fuchsiaposix.Errno) DatagramSocketRecvMsgResult {
+ var _u DatagramSocketRecvMsgResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_datagramSocketSendMsgResultTag uint64
+
+const (
+ DatagramSocketSendMsgResultResponse = 1 // 0x00000001
+ DatagramSocketSendMsgResultErr = 2 // 0x00000002
+)
+
+type DatagramSocketSendMsgResult struct {
+ I_datagramSocketSendMsgResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response DatagramSocketSendMsgResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *DatagramSocketSendMsgResult) reset() {
+ switch _m.I_datagramSocketSendMsgResultTag {
+ case 1:
+ var _zeroed DatagramSocketSendMsgResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *DatagramSocketSendMsgResult) Which() I_datagramSocketSendMsgResultTag {
+ return _m.I_datagramSocketSendMsgResultTag
+}
+
+func (_m *DatagramSocketSendMsgResult) Ordinal() uint64 {
+ return uint64(_m.I_datagramSocketSendMsgResultTag)
+}
+
+func (_m *DatagramSocketSendMsgResult) SetResponse(response DatagramSocketSendMsgResponse) {
+ _m.reset()
+ _m.I_datagramSocketSendMsgResultTag = DatagramSocketSendMsgResultResponse
+ _m.Response = response
+}
+
+func DatagramSocketSendMsgResultWithResponse(response DatagramSocketSendMsgResponse) DatagramSocketSendMsgResult {
+ var _u DatagramSocketSendMsgResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *DatagramSocketSendMsgResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_datagramSocketSendMsgResultTag = DatagramSocketSendMsgResultErr
+ _m.Err = err
+}
+
+func DatagramSocketSendMsgResultWithErr(err fuchsiaposix.Errno) DatagramSocketSendMsgResult {
+ var _u DatagramSocketSendMsgResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_streamSocketListenResultTag uint64
+
+const (
+ StreamSocketListenResultResponse = 1 // 0x00000001
+ StreamSocketListenResultErr = 2 // 0x00000002
+)
+
+type StreamSocketListenResult struct {
+ I_streamSocketListenResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StreamSocketListenResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *StreamSocketListenResult) reset() {
+ switch _m.I_streamSocketListenResultTag {
+ case 1:
+ var _zeroed StreamSocketListenResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StreamSocketListenResult) Which() I_streamSocketListenResultTag {
+ return _m.I_streamSocketListenResultTag
+}
+
+func (_m *StreamSocketListenResult) Ordinal() uint64 {
+ return uint64(_m.I_streamSocketListenResultTag)
+}
+
+func (_m *StreamSocketListenResult) SetResponse(response StreamSocketListenResponse) {
+ _m.reset()
+ _m.I_streamSocketListenResultTag = StreamSocketListenResultResponse
+ _m.Response = response
+}
+
+func StreamSocketListenResultWithResponse(response StreamSocketListenResponse) StreamSocketListenResult {
+ var _u StreamSocketListenResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StreamSocketListenResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_streamSocketListenResultTag = StreamSocketListenResultErr
+ _m.Err = err
+}
+
+func StreamSocketListenResultWithErr(err fuchsiaposix.Errno) StreamSocketListenResult {
+ var _u StreamSocketListenResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_streamSocketAcceptResultTag uint64
+
+const (
+ StreamSocketAcceptResultResponse = 1 // 0x00000001
+ StreamSocketAcceptResultErr = 2 // 0x00000002
+)
+
+type StreamSocketAcceptResult struct {
+ I_streamSocketAcceptResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response StreamSocketAcceptResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *StreamSocketAcceptResult) reset() {
+ switch _m.I_streamSocketAcceptResultTag {
+ case 1:
+ var _zeroed StreamSocketAcceptResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *StreamSocketAcceptResult) Which() I_streamSocketAcceptResultTag {
+ return _m.I_streamSocketAcceptResultTag
+}
+
+func (_m *StreamSocketAcceptResult) Ordinal() uint64 {
+ return uint64(_m.I_streamSocketAcceptResultTag)
+}
+
+func (_m *StreamSocketAcceptResult) SetResponse(response StreamSocketAcceptResponse) {
+ _m.reset()
+ _m.I_streamSocketAcceptResultTag = StreamSocketAcceptResultResponse
+ _m.Response = response
+}
+
+func StreamSocketAcceptResultWithResponse(response StreamSocketAcceptResponse) StreamSocketAcceptResult {
+ var _u StreamSocketAcceptResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *StreamSocketAcceptResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_streamSocketAcceptResultTag = StreamSocketAcceptResultErr
+ _m.Err = err
+}
+
+func StreamSocketAcceptResultWithErr(err fuchsiaposix.Errno) StreamSocketAcceptResult {
+ var _u StreamSocketAcceptResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_providerStreamSocketResultTag uint64
+
+const (
+ ProviderStreamSocketResultResponse = 1 // 0x00000001
+ ProviderStreamSocketResultErr = 2 // 0x00000002
+)
+
+type ProviderStreamSocketResult struct {
+ I_providerStreamSocketResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response ProviderStreamSocketResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *ProviderStreamSocketResult) reset() {
+ switch _m.I_providerStreamSocketResultTag {
+ case 1:
+ var _zeroed ProviderStreamSocketResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *ProviderStreamSocketResult) Which() I_providerStreamSocketResultTag {
+ return _m.I_providerStreamSocketResultTag
+}
+
+func (_m *ProviderStreamSocketResult) Ordinal() uint64 {
+ return uint64(_m.I_providerStreamSocketResultTag)
+}
+
+func (_m *ProviderStreamSocketResult) SetResponse(response ProviderStreamSocketResponse) {
+ _m.reset()
+ _m.I_providerStreamSocketResultTag = ProviderStreamSocketResultResponse
+ _m.Response = response
+}
+
+func ProviderStreamSocketResultWithResponse(response ProviderStreamSocketResponse) ProviderStreamSocketResult {
+ var _u ProviderStreamSocketResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *ProviderStreamSocketResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_providerStreamSocketResultTag = ProviderStreamSocketResultErr
+ _m.Err = err
+}
+
+func ProviderStreamSocketResultWithErr(err fuchsiaposix.Errno) ProviderStreamSocketResult {
+ var _u ProviderStreamSocketResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_providerDatagramSocketResultTag uint64
+
+const (
+ ProviderDatagramSocketResultResponse = 1 // 0x00000001
+ ProviderDatagramSocketResultErr = 2 // 0x00000002
+)
+
+type ProviderDatagramSocketResult struct {
+ I_providerDatagramSocketResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response ProviderDatagramSocketResponse `fidl_ordinal:"1"`
+ Err fuchsiaposix.Errno `fidl_ordinal:"2"`
+}
+
+func (_m *ProviderDatagramSocketResult) reset() {
+ switch _m.I_providerDatagramSocketResultTag {
+ case 1:
+ var _zeroed ProviderDatagramSocketResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed fuchsiaposix.Errno
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *ProviderDatagramSocketResult) Which() I_providerDatagramSocketResultTag {
+ return _m.I_providerDatagramSocketResultTag
+}
+
+func (_m *ProviderDatagramSocketResult) Ordinal() uint64 {
+ return uint64(_m.I_providerDatagramSocketResultTag)
+}
+
+func (_m *ProviderDatagramSocketResult) SetResponse(response ProviderDatagramSocketResponse) {
+ _m.reset()
+ _m.I_providerDatagramSocketResultTag = ProviderDatagramSocketResultResponse
+ _m.Response = response
+}
+
+func ProviderDatagramSocketResultWithResponse(response ProviderDatagramSocketResponse) ProviderDatagramSocketResult {
+ var _u ProviderDatagramSocketResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *ProviderDatagramSocketResult) SetErr(err fuchsiaposix.Errno) {
+ _m.reset()
+ _m.I_providerDatagramSocketResultTag = ProviderDatagramSocketResultErr
+ _m.Err = err
+}
+
+func ProviderDatagramSocketResultWithErr(err fuchsiaposix.Errno) ProviderDatagramSocketResult {
+ var _u ProviderDatagramSocketResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_providerInterfaceIndexToNameResultTag uint64
+
+const (
+ ProviderInterfaceIndexToNameResultResponse = 1 // 0x00000001
+ ProviderInterfaceIndexToNameResultErr = 2 // 0x00000002
+)
+
+type ProviderInterfaceIndexToNameResult struct {
+ I_providerInterfaceIndexToNameResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response ProviderInterfaceIndexToNameResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *ProviderInterfaceIndexToNameResult) reset() {
+ switch _m.I_providerInterfaceIndexToNameResultTag {
+ case 1:
+ var _zeroed ProviderInterfaceIndexToNameResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *ProviderInterfaceIndexToNameResult) Which() I_providerInterfaceIndexToNameResultTag {
+ return _m.I_providerInterfaceIndexToNameResultTag
+}
+
+func (_m *ProviderInterfaceIndexToNameResult) Ordinal() uint64 {
+ return uint64(_m.I_providerInterfaceIndexToNameResultTag)
+}
+
+func (_m *ProviderInterfaceIndexToNameResult) SetResponse(response ProviderInterfaceIndexToNameResponse) {
+ _m.reset()
+ _m.I_providerInterfaceIndexToNameResultTag = ProviderInterfaceIndexToNameResultResponse
+ _m.Response = response
+}
+
+func ProviderInterfaceIndexToNameResultWithResponse(response ProviderInterfaceIndexToNameResponse) ProviderInterfaceIndexToNameResult {
+ var _u ProviderInterfaceIndexToNameResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *ProviderInterfaceIndexToNameResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_providerInterfaceIndexToNameResultTag = ProviderInterfaceIndexToNameResultErr
+ _m.Err = err
+}
+
+func ProviderInterfaceIndexToNameResultWithErr(err int32) ProviderInterfaceIndexToNameResult {
+ var _u ProviderInterfaceIndexToNameResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_providerInterfaceNameToIndexResultTag uint64
+
+const (
+ ProviderInterfaceNameToIndexResultResponse = 1 // 0x00000001
+ ProviderInterfaceNameToIndexResultErr = 2 // 0x00000002
+)
+
+type ProviderInterfaceNameToIndexResult struct {
+ I_providerInterfaceNameToIndexResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response ProviderInterfaceNameToIndexResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *ProviderInterfaceNameToIndexResult) reset() {
+ switch _m.I_providerInterfaceNameToIndexResultTag {
+ case 1:
+ var _zeroed ProviderInterfaceNameToIndexResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *ProviderInterfaceNameToIndexResult) Which() I_providerInterfaceNameToIndexResultTag {
+ return _m.I_providerInterfaceNameToIndexResultTag
+}
+
+func (_m *ProviderInterfaceNameToIndexResult) Ordinal() uint64 {
+ return uint64(_m.I_providerInterfaceNameToIndexResultTag)
+}
+
+func (_m *ProviderInterfaceNameToIndexResult) SetResponse(response ProviderInterfaceNameToIndexResponse) {
+ _m.reset()
+ _m.I_providerInterfaceNameToIndexResultTag = ProviderInterfaceNameToIndexResultResponse
+ _m.Response = response
+}
+
+func ProviderInterfaceNameToIndexResultWithResponse(response ProviderInterfaceNameToIndexResponse) ProviderInterfaceNameToIndexResult {
+ var _u ProviderInterfaceNameToIndexResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *ProviderInterfaceNameToIndexResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_providerInterfaceNameToIndexResultTag = ProviderInterfaceNameToIndexResultErr
+ _m.Err = err
+}
+
+func ProviderInterfaceNameToIndexResultWithErr(err int32) ProviderInterfaceNameToIndexResult {
+ var _u ProviderInterfaceNameToIndexResult
+ _u.SetErr(err)
+ return _u
+}
+
+type I_providerInterfaceNameToFlagsResultTag uint64
+
+const (
+ ProviderInterfaceNameToFlagsResultResponse = 1 // 0x00000001
+ ProviderInterfaceNameToFlagsResultErr = 2 // 0x00000002
+)
+
+type ProviderInterfaceNameToFlagsResult struct {
+ I_providerInterfaceNameToFlagsResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_resource:"true"`
+ Response ProviderInterfaceNameToFlagsResponse `fidl_ordinal:"1"`
+ Err int32 `fidl_ordinal:"2"`
+}
+
+func (_m *ProviderInterfaceNameToFlagsResult) reset() {
+ switch _m.I_providerInterfaceNameToFlagsResultTag {
+ case 1:
+ var _zeroed ProviderInterfaceNameToFlagsResponse
+ _m.Response = _zeroed
+ case 2:
+ var _zeroed int32
+ _m.Err = _zeroed
+ }
+}
+
+func (_m *ProviderInterfaceNameToFlagsResult) Which() I_providerInterfaceNameToFlagsResultTag {
+ return _m.I_providerInterfaceNameToFlagsResultTag
+}
+
+func (_m *ProviderInterfaceNameToFlagsResult) Ordinal() uint64 {
+ return uint64(_m.I_providerInterfaceNameToFlagsResultTag)
+}
+
+func (_m *ProviderInterfaceNameToFlagsResult) SetResponse(response ProviderInterfaceNameToFlagsResponse) {
+ _m.reset()
+ _m.I_providerInterfaceNameToFlagsResultTag = ProviderInterfaceNameToFlagsResultResponse
+ _m.Response = response
+}
+
+func ProviderInterfaceNameToFlagsResultWithResponse(response ProviderInterfaceNameToFlagsResponse) ProviderInterfaceNameToFlagsResult {
+ var _u ProviderInterfaceNameToFlagsResult
+ _u.SetResponse(response)
+ return _u
+}
+
+func (_m *ProviderInterfaceNameToFlagsResult) SetErr(err int32) {
+ _m.reset()
+ _m.I_providerInterfaceNameToFlagsResultTag = ProviderInterfaceNameToFlagsResultErr
+ _m.Err = err
+}
+
+func ProviderInterfaceNameToFlagsResultWithErr(err int32) ProviderInterfaceNameToFlagsResult {
+ var _u ProviderInterfaceNameToFlagsResult
+ _u.SetErr(err)
+ return _u
+}
+
+// Ancillary data for sending datagram sockets.
+type SendControlData struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+}
+
+func (u *SendControlData) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *SendControlData) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Ancillary data for received datagram sockets.
+type RecvControlData struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+}
+
+func (u *RecvControlData) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *RecvControlData) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+// Holds information about an interface and its addresses.
+type InterfaceAddresses struct {
+ _ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_resource:"false"`
+ I_unknownData interface{}
+ // ID of the interface.
+ Id uint64 `fidl_ordinal:"1"`
+ IdPresent bool
+ // Name of the interface.
+ Name string `fidl_bounds:"15" fidl_ordinal:"2"`
+ NamePresent bool
+ // Contains the interface flags, as returned by the SIOCGIFFLAGS ioctl
+ // operation.
+ //
+ // TODO(fxbug.dev/64758): remove this once all clients are transitioned to
+ // use more strongly-typed `interface_flags`.
+ Flags uint32 `fidl_ordinal:"3"`
+ FlagsPresent bool
+ // All addresses currently assigned to the interface.
+ Addresses []fuchsianet.Subnet `fidl_bounds:"" fidl_ordinal:"4"`
+ AddressesPresent bool
+ // Contains the interface flags, as returned by the SIOCGIFFLAGS ioctl
+ // operation.
+ InterfaceFlags InterfaceFlags `fidl_ordinal:"5"`
+ InterfaceFlagsPresent bool
+}
+
+func (u *InterfaceAddresses) SetId(id uint64) {
+ u.Id = id
+ u.IdPresent = true
+}
+
+func (u *InterfaceAddresses) GetId() uint64 {
+ return u.Id
+}
+
+func (u *InterfaceAddresses) GetIdWithDefault(_default uint64) uint64 {
+ if !u.HasId() {
+ return _default
+ }
+ return u.Id
+}
+
+func (u *InterfaceAddresses) HasId() bool {
+ return u.IdPresent
+}
+
+func (u *InterfaceAddresses) ClearId() {
+ u.IdPresent = false
+}
+
+func (u *InterfaceAddresses) SetName(name string) {
+ u.Name = name
+ u.NamePresent = true
+}
+
+func (u *InterfaceAddresses) GetName() string {
+ return u.Name
+}
+
+func (u *InterfaceAddresses) GetNameWithDefault(_default string) string {
+ if !u.HasName() {
+ return _default
+ }
+ return u.Name
+}
+
+func (u *InterfaceAddresses) HasName() bool {
+ return u.NamePresent
+}
+
+func (u *InterfaceAddresses) ClearName() {
+ u.NamePresent = false
+}
+
+func (u *InterfaceAddresses) SetFlags(flags uint32) {
+ u.Flags = flags
+ u.FlagsPresent = true
+}
+
+func (u *InterfaceAddresses) GetFlags() uint32 {
+ return u.Flags
+}
+
+func (u *InterfaceAddresses) GetFlagsWithDefault(_default uint32) uint32 {
+ if !u.HasFlags() {
+ return _default
+ }
+ return u.Flags
+}
+
+func (u *InterfaceAddresses) HasFlags() bool {
+ return u.FlagsPresent
+}
+
+func (u *InterfaceAddresses) ClearFlags() {
+ u.FlagsPresent = false
+}
+
+func (u *InterfaceAddresses) SetAddresses(addresses []fuchsianet.Subnet) {
+ u.Addresses = addresses
+ u.AddressesPresent = true
+}
+
+func (u *InterfaceAddresses) GetAddresses() []fuchsianet.Subnet {
+ return u.Addresses
+}
+
+func (u *InterfaceAddresses) GetAddressesWithDefault(_default []fuchsianet.Subnet) []fuchsianet.Subnet {
+ if !u.HasAddresses() {
+ return _default
+ }
+ return u.Addresses
+}
+
+func (u *InterfaceAddresses) HasAddresses() bool {
+ return u.AddressesPresent
+}
+
+func (u *InterfaceAddresses) ClearAddresses() {
+ u.AddressesPresent = false
+}
+
+func (u *InterfaceAddresses) SetInterfaceFlags(interfaceFlags InterfaceFlags) {
+ u.InterfaceFlags = interfaceFlags
+ u.InterfaceFlagsPresent = true
+}
+
+func (u *InterfaceAddresses) GetInterfaceFlags() InterfaceFlags {
+ return u.InterfaceFlags
+}
+
+func (u *InterfaceAddresses) GetInterfaceFlagsWithDefault(_default InterfaceFlags) InterfaceFlags {
+ if !u.HasInterfaceFlags() {
+ return _default
+ }
+ return u.InterfaceFlags
+}
+
+func (u *InterfaceAddresses) HasInterfaceFlags() bool {
+ return u.InterfaceFlagsPresent
+}
+
+func (u *InterfaceAddresses) ClearInterfaceFlags() {
+ u.InterfaceFlagsPresent = false
+}
+
+func (u *InterfaceAddresses) HasUnknownData() bool {
+ return u.I_unknownData != nil
+}
+
+func (u *InterfaceAddresses) GetUnknownData() map[uint64]_bindings.UnknownData {
+ return u.I_unknownData.(map[uint64]_bindings.UnknownData)
+}
+
+const (
+ BaseSocketCloneOrdinal uint64 = 0x5a61678f293ce16f
+ BaseSocketCloseOrdinal uint64 = 0x5309c5bd1c33dc44
+ BaseSocketDescribeOrdinal uint64 = 0xffcec215078dea0
+ BaseSocketOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
+ BaseSocketSyncOrdinal uint64 = 0x189d88326c18b519
+ BaseSocketGetAttrOrdinal uint64 = 0x78985e216314dafd
+ BaseSocketSetAttrOrdinal uint64 = 0x4186c0f40d938f46
+ BaseSocketNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
+ BaseSocketNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
+ BaseSocketBindOrdinal uint64 = 0xf8457e6b05e15bc
+ BaseSocketConnectOrdinal uint64 = 0x17abeee0b9843bb1
+ BaseSocketDisconnectOrdinal uint64 = 0x20eaedba2e0f70a4
+ BaseSocketGetSockNameOrdinal uint64 = 0x41a618ef19a91f9d
+ BaseSocketGetPeerNameOrdinal uint64 = 0x4009d08a4beb5e95
+ BaseSocketSetSockOptOrdinal uint64 = 0x93c6f802203e6f1
+ BaseSocketGetSockOptOrdinal uint64 = 0x6dfaf70f0ed40544
+)
+
+type BaseSocketWithCtxInterface _bindings.ChannelProxy
+
+// Create another connection to the same remote object.
+//
+// `flags` may be any of:
+//
+// - `OPEN_RIGHT_*`
+// - `OPEN_FLAG_APPEND`
+// - `OPEN_FLAG_NO_REMOTE`
+// - `OPEN_FLAG_DESCRIBE`
+// - `CLONE_FLAG_SAME_RIGHTS`
+//
+// All other flags are ignored.
+//
+// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+// cloned object.
+// The cloned object must have rights less than or equal to the original object.
+// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+// `CLONE_FLAG_SAME_RIGHTS`.
+func (p *BaseSocketWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error {
+ req_ := &baseSocketWithCtxCloneRequest{
+ Flags: flags,
+ Object: object,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(BaseSocketCloneOrdinal, req_)
+ return err_
+}
+
+// Terminates connection with object.
+//
+// This method does not require any rights.
+func (p *BaseSocketWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &baseSocketWithCtxCloseResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketCloseOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Returns extra information about the type of the object.
+// If the `Describe` operation fails, the connection is closed.
+//
+// This method does not require any rights.
+func (p *BaseSocketWithCtxInterface) Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error) {
+ var req_ _bindings.Message
+ resp_ := &baseSocketWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+//
+// Indicates the success or failure of the open operation, and optionally describes the
+// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+// (the same as would be returned by `Describe`).
+func (p *BaseSocketWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *fuchsiaio.NodeInfo, error) {
+ resp_ := &baseSocketWithCtxOnOpenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(BaseSocketOnOpenOrdinal, resp_)
+ return resp_.S, resp_.Info, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method does not require any rights.
+func (p *BaseSocketWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &baseSocketWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketSyncOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires information about the node.
+//
+// This method does not require any rights.
+func (p *BaseSocketWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error) {
+ var req_ _bindings.Message
+ resp_ := &baseSocketWithCtxGetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketGetAttrOrdinal, req_, resp_)
+ return resp_.S, resp_.Attributes, err_
+}
+
+// Updates information about the node.
+// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *BaseSocketWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error) {
+ req_ := &baseSocketWithCtxSetAttrRequest{
+ Flags: flags,
+ Attributes: attributes,
+ }
+ resp_ := &baseSocketWithCtxSetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketSetAttrOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *BaseSocketWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ var req_ _bindings.Message
+ resp_ := &baseSocketWithCtxNodeGetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketNodeGetFlagsOrdinal, req_, resp_)
+ return resp_.S, resp_.Flags, err_
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *BaseSocketWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ req_ := &baseSocketWithCtxNodeSetFlagsRequest{
+ Flags: flags,
+ }
+ resp_ := &baseSocketWithCtxNodeSetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketNodeSetFlagsOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Sets the local address used for the socket.
+func (p *BaseSocketWithCtxInterface) Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error) {
+ req_ := &baseSocketWithCtxBindRequest{
+ Addr: addr,
+ }
+ resp_ := &baseSocketWithCtxBindResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketBindOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Initiates a connection to a remote address.
+func (p *BaseSocketWithCtxInterface) Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error) {
+ req_ := &baseSocketWithCtxConnectRequest{
+ Addr: addr,
+ }
+ resp_ := &baseSocketWithCtxConnectResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketConnectOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Clears connection information from this socket.
+func (p *BaseSocketWithCtxInterface) Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error) {
+ var req_ _bindings.Message
+ resp_ := &baseSocketWithCtxDisconnectResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketDisconnectOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Retrieves the local socket address.
+func (p *BaseSocketWithCtxInterface) GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error) {
+ var req_ _bindings.Message
+ resp_ := &baseSocketWithCtxGetSockNameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketGetSockNameOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Retrieves the remote socket address.
+func (p *BaseSocketWithCtxInterface) GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error) {
+ var req_ _bindings.Message
+ resp_ := &baseSocketWithCtxGetPeerNameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketGetPeerNameOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Sets the value of a socket option.
+func (p *BaseSocketWithCtxInterface) SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error) {
+ req_ := &baseSocketWithCtxSetSockOptRequest{
+ Level: level,
+ Optname: optname,
+ Optval: optval,
+ }
+ resp_ := &baseSocketWithCtxSetSockOptResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketSetSockOptOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Retrieves the value of a socket option.
+func (p *BaseSocketWithCtxInterface) GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error) {
+ req_ := &baseSocketWithCtxGetSockOptRequest{
+ Level: level,
+ Optname: optname,
+ }
+ resp_ := &baseSocketWithCtxGetSockOptResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketGetSockOptOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// A network socket.
+//
+// Once a socket has been retrieved from a `Provider`, this interface is then used to further
+// configure and use the socket. This interface is essentially POSIX. Its implementation must
+// support Linux-specific arguments to {Get,Set}SockOpt.
+//
+// All methods on this type are nonblocking; their exact behaviors match their Linux counterparts.
+//
+// *Warning:* This protocol is not yet ready for direct use by clients. Instead, clients should
+// use the BSD sockets API to interact with sockets. We plan to change this protocol substantially
+// and clients that couple directly to this protocol will make those changes more difficult.
+type BaseSocketWithCtx interface {
+ // Create another connection to the same remote object.
+ //
+ // `flags` may be any of:
+ //
+ // - `OPEN_RIGHT_*`
+ // - `OPEN_FLAG_APPEND`
+ // - `OPEN_FLAG_NO_REMOTE`
+ // - `OPEN_FLAG_DESCRIBE`
+ // - `CLONE_FLAG_SAME_RIGHTS`
+ //
+ // All other flags are ignored.
+ //
+ // The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+ // cloned object.
+ // The cloned object must have rights less than or equal to the original object.
+ // Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+ // It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+ // `CLONE_FLAG_SAME_RIGHTS`.
+ Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error
+ // Terminates connection with object.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) (int32, error)
+ // Returns extra information about the type of the object.
+ // If the `Describe` operation fails, the connection is closed.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error)
+ // An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+ //
+ // Indicates the success or failure of the open operation, and optionally describes the
+ // object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+ // (the same as would be returned by `Describe`).
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (int32, error)
+ // Acquires information about the node.
+ //
+ // This method does not require any rights.
+ GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error)
+ // Updates information about the node.
+ // `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error)
+ // Acquires the `Directory.Open` rights and flags used to access this file.
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as GetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
+ // Changes the `Directory.Open` flags used to access the file.
+ // Supported flags which can be turned on / off:
+ // - `OPEN_FLAG_APPEND`
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as SetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
+ // Sets the local address used for the socket.
+ Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error)
+ // Initiates a connection to a remote address.
+ Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error)
+ // Clears connection information from this socket.
+ Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error)
+ // Retrieves the local socket address.
+ GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error)
+ // Retrieves the remote socket address.
+ GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error)
+ // Sets the value of a socket option.
+ SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error)
+ // Retrieves the value of a socket option.
+ GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error)
+}
+
+type BaseSocketWithCtxTransitionalBase struct{}
+
+func (_ *BaseSocketWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ panic("Not Implemented")
+}
+func (_ *BaseSocketWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ panic("Not Implemented")
+}
+
+type BaseSocketWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewBaseSocketWithCtxInterfaceRequest() (BaseSocketWithCtxInterfaceRequest, *BaseSocketWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return BaseSocketWithCtxInterfaceRequest(req), (*BaseSocketWithCtxInterface)(cli), err
+}
+
+type BaseSocketWithCtxStub struct {
+ Impl BaseSocketWithCtx
+}
+
+func (s_ *BaseSocketWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case BaseSocketCloneOrdinal:
+ in_ := baseSocketWithCtxCloneRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
+ return nil, false, err_
+ case BaseSocketCloseOrdinal:
+ s, err_ := s_.Impl.Close(args_.Ctx)
+ out_ := baseSocketWithCtxCloseResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case BaseSocketDescribeOrdinal:
+ info, err_ := s_.Impl.Describe(args_.Ctx)
+ out_ := baseSocketWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case BaseSocketSyncOrdinal:
+ s, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := baseSocketWithCtxSyncResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case BaseSocketGetAttrOrdinal:
+ s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
+ out_ := baseSocketWithCtxGetAttrResponse{}
+ out_.S = s
+ out_.Attributes = attributes
+ return &out_, true, err_
+ case BaseSocketSetAttrOrdinal:
+ in_ := baseSocketWithCtxSetAttrRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
+ out_ := baseSocketWithCtxSetAttrResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case BaseSocketNodeGetFlagsOrdinal:
+ s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
+ out_ := baseSocketWithCtxNodeGetFlagsResponse{}
+ out_.S = s
+ out_.Flags = flags
+ return &out_, true, err_
+ case BaseSocketNodeSetFlagsOrdinal:
+ in_ := baseSocketWithCtxNodeSetFlagsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
+ out_ := baseSocketWithCtxNodeSetFlagsResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case BaseSocketBindOrdinal:
+ in_ := baseSocketWithCtxBindRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Bind(args_.Ctx, in_.Addr)
+ out_ := baseSocketWithCtxBindResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case BaseSocketConnectOrdinal:
+ in_ := baseSocketWithCtxConnectRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Connect(args_.Ctx, in_.Addr)
+ out_ := baseSocketWithCtxConnectResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case BaseSocketDisconnectOrdinal:
+ result, err_ := s_.Impl.Disconnect(args_.Ctx)
+ out_ := baseSocketWithCtxDisconnectResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case BaseSocketGetSockNameOrdinal:
+ result, err_ := s_.Impl.GetSockName(args_.Ctx)
+ out_ := baseSocketWithCtxGetSockNameResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case BaseSocketGetPeerNameOrdinal:
+ result, err_ := s_.Impl.GetPeerName(args_.Ctx)
+ out_ := baseSocketWithCtxGetPeerNameResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case BaseSocketSetSockOptOrdinal:
+ in_ := baseSocketWithCtxSetSockOptRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.SetSockOpt(args_.Ctx, in_.Level, in_.Optname, in_.Optval)
+ out_ := baseSocketWithCtxSetSockOptResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case BaseSocketGetSockOptOrdinal:
+ in_ := baseSocketWithCtxGetSockOptRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetSockOpt(args_.Ctx, in_.Level, in_.Optname)
+ out_ := baseSocketWithCtxGetSockOptResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type BaseSocketEventProxy _bindings.ChannelProxy
+
+func (p *BaseSocketEventProxy) OnOpen(s int32, info *fuchsiaio.NodeInfo) error {
+ event_ := &baseSocketWithCtxOnOpenResponse{
+ S: s,
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(BaseSocketOnOpenOrdinal, event_)
+}
+
+const (
+ DatagramSocketCloneOrdinal uint64 = 0x5a61678f293ce16f
+ DatagramSocketCloseOrdinal uint64 = 0x5309c5bd1c33dc44
+ DatagramSocketDescribeOrdinal uint64 = 0xffcec215078dea0
+ DatagramSocketOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
+ DatagramSocketSyncOrdinal uint64 = 0x189d88326c18b519
+ DatagramSocketGetAttrOrdinal uint64 = 0x78985e216314dafd
+ DatagramSocketSetAttrOrdinal uint64 = 0x4186c0f40d938f46
+ DatagramSocketNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
+ DatagramSocketNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
+ DatagramSocketBindOrdinal uint64 = 0xf8457e6b05e15bc
+ DatagramSocketConnectOrdinal uint64 = 0x17abeee0b9843bb1
+ DatagramSocketDisconnectOrdinal uint64 = 0x20eaedba2e0f70a4
+ DatagramSocketGetSockNameOrdinal uint64 = 0x41a618ef19a91f9d
+ DatagramSocketGetPeerNameOrdinal uint64 = 0x4009d08a4beb5e95
+ DatagramSocketSetSockOptOrdinal uint64 = 0x93c6f802203e6f1
+ DatagramSocketGetSockOptOrdinal uint64 = 0x6dfaf70f0ed40544
+ DatagramSocketShutdownOrdinal uint64 = 0x3c6058976bced940
+ DatagramSocketRecvMsgOrdinal uint64 = 0x715341bb02f02b7a
+ DatagramSocketSendMsgOrdinal uint64 = 0x359b626d62a7f17b
+)
+
+type DatagramSocketWithCtxInterface _bindings.ChannelProxy
+
+// Create another connection to the same remote object.
+//
+// `flags` may be any of:
+//
+// - `OPEN_RIGHT_*`
+// - `OPEN_FLAG_APPEND`
+// - `OPEN_FLAG_NO_REMOTE`
+// - `OPEN_FLAG_DESCRIBE`
+// - `CLONE_FLAG_SAME_RIGHTS`
+//
+// All other flags are ignored.
+//
+// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+// cloned object.
+// The cloned object must have rights less than or equal to the original object.
+// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+// `CLONE_FLAG_SAME_RIGHTS`.
+func (p *DatagramSocketWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error {
+ req_ := &datagramSocketWithCtxCloneRequest{
+ Flags: flags,
+ Object: object,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(DatagramSocketCloneOrdinal, req_)
+ return err_
+}
+
+// Terminates connection with object.
+//
+// This method does not require any rights.
+func (p *DatagramSocketWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &datagramSocketWithCtxCloseResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketCloseOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Returns extra information about the type of the object.
+// If the `Describe` operation fails, the connection is closed.
+//
+// This method does not require any rights.
+func (p *DatagramSocketWithCtxInterface) Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error) {
+ var req_ _bindings.Message
+ resp_ := &datagramSocketWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+//
+// Indicates the success or failure of the open operation, and optionally describes the
+// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+// (the same as would be returned by `Describe`).
+func (p *DatagramSocketWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *fuchsiaio.NodeInfo, error) {
+ resp_ := &datagramSocketWithCtxOnOpenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(DatagramSocketOnOpenOrdinal, resp_)
+ return resp_.S, resp_.Info, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method does not require any rights.
+func (p *DatagramSocketWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &datagramSocketWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketSyncOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires information about the node.
+//
+// This method does not require any rights.
+func (p *DatagramSocketWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error) {
+ var req_ _bindings.Message
+ resp_ := &datagramSocketWithCtxGetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketGetAttrOrdinal, req_, resp_)
+ return resp_.S, resp_.Attributes, err_
+}
+
+// Updates information about the node.
+// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *DatagramSocketWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error) {
+ req_ := &datagramSocketWithCtxSetAttrRequest{
+ Flags: flags,
+ Attributes: attributes,
+ }
+ resp_ := &datagramSocketWithCtxSetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketSetAttrOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DatagramSocketWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ var req_ _bindings.Message
+ resp_ := &datagramSocketWithCtxNodeGetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketNodeGetFlagsOrdinal, req_, resp_)
+ return resp_.S, resp_.Flags, err_
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *DatagramSocketWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ req_ := &datagramSocketWithCtxNodeSetFlagsRequest{
+ Flags: flags,
+ }
+ resp_ := &datagramSocketWithCtxNodeSetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketNodeSetFlagsOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Sets the local address used for the socket.
+func (p *DatagramSocketWithCtxInterface) Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error) {
+ req_ := &datagramSocketWithCtxBindRequest{
+ Addr: addr,
+ }
+ resp_ := &datagramSocketWithCtxBindResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketBindOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Initiates a connection to a remote address.
+func (p *DatagramSocketWithCtxInterface) Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error) {
+ req_ := &datagramSocketWithCtxConnectRequest{
+ Addr: addr,
+ }
+ resp_ := &datagramSocketWithCtxConnectResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketConnectOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Clears connection information from this socket.
+func (p *DatagramSocketWithCtxInterface) Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error) {
+ var req_ _bindings.Message
+ resp_ := &datagramSocketWithCtxDisconnectResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketDisconnectOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Retrieves the local socket address.
+func (p *DatagramSocketWithCtxInterface) GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error) {
+ var req_ _bindings.Message
+ resp_ := &datagramSocketWithCtxGetSockNameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketGetSockNameOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Retrieves the remote socket address.
+func (p *DatagramSocketWithCtxInterface) GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error) {
+ var req_ _bindings.Message
+ resp_ := &datagramSocketWithCtxGetPeerNameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketGetPeerNameOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Sets the value of a socket option.
+func (p *DatagramSocketWithCtxInterface) SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error) {
+ req_ := &datagramSocketWithCtxSetSockOptRequest{
+ Level: level,
+ Optname: optname,
+ Optval: optval,
+ }
+ resp_ := &datagramSocketWithCtxSetSockOptResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketSetSockOptOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Retrieves the value of a socket option.
+func (p *DatagramSocketWithCtxInterface) GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error) {
+ req_ := &datagramSocketWithCtxGetSockOptRequest{
+ Level: level,
+ Optname: optname,
+ }
+ resp_ := &datagramSocketWithCtxGetSockOptResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketGetSockOptOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Shuts down part of the socket.
+func (p *DatagramSocketWithCtxInterface) Shutdown(ctx_ _bindings.Context, mode ShutdownMode) (DatagramSocketShutdownResult, error) {
+ req_ := &datagramSocketWithCtxShutdownRequest{
+ Mode: mode,
+ }
+ resp_ := &datagramSocketWithCtxShutdownResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketShutdownOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Receives a message from the socket.
+func (p *DatagramSocketWithCtxInterface) RecvMsg(ctx_ _bindings.Context, wantAddr bool, dataLen uint32, wantControl bool, flags RecvMsgFlags) (DatagramSocketRecvMsgResult, error) {
+ req_ := &datagramSocketWithCtxRecvMsgRequest{
+ WantAddr: wantAddr,
+ DataLen: dataLen,
+ WantControl: wantControl,
+ Flags: flags,
+ }
+ resp_ := &datagramSocketWithCtxRecvMsgResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketRecvMsgOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Sends a message on the socket.
+func (p *DatagramSocketWithCtxInterface) SendMsg(ctx_ _bindings.Context, addr *fuchsianet.SocketAddress, data []uint8, control SendControlData, flags SendMsgFlags) (DatagramSocketSendMsgResult, error) {
+ req_ := &datagramSocketWithCtxSendMsgRequest{
+ Addr: addr,
+ Data: data,
+ Control: control,
+ Flags: flags,
+ }
+ resp_ := &datagramSocketWithCtxSendMsgResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketSendMsgOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// A datagram socket.
+//
+// This type's [`fuchsia.io.Node/Describe`] method returns an eventpair which is used to signal
+// additional information about the state of the socket such as readiness or shutdown-ness.
+//
+// All methods on this type are nonblocking; their exact behaviors match their Linux counterparts.
+type DatagramSocketWithCtx interface {
+ // Create another connection to the same remote object.
+ //
+ // `flags` may be any of:
+ //
+ // - `OPEN_RIGHT_*`
+ // - `OPEN_FLAG_APPEND`
+ // - `OPEN_FLAG_NO_REMOTE`
+ // - `OPEN_FLAG_DESCRIBE`
+ // - `CLONE_FLAG_SAME_RIGHTS`
+ //
+ // All other flags are ignored.
+ //
+ // The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+ // cloned object.
+ // The cloned object must have rights less than or equal to the original object.
+ // Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+ // It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+ // `CLONE_FLAG_SAME_RIGHTS`.
+ Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error
+ // Terminates connection with object.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) (int32, error)
+ // Returns extra information about the type of the object.
+ // If the `Describe` operation fails, the connection is closed.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error)
+ // An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+ //
+ // Indicates the success or failure of the open operation, and optionally describes the
+ // object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+ // (the same as would be returned by `Describe`).
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (int32, error)
+ // Acquires information about the node.
+ //
+ // This method does not require any rights.
+ GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error)
+ // Updates information about the node.
+ // `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error)
+ // Acquires the `Directory.Open` rights and flags used to access this file.
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as GetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
+ // Changes the `Directory.Open` flags used to access the file.
+ // Supported flags which can be turned on / off:
+ // - `OPEN_FLAG_APPEND`
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as SetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
+ // Sets the local address used for the socket.
+ Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error)
+ // Initiates a connection to a remote address.
+ Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error)
+ // Clears connection information from this socket.
+ Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error)
+ // Retrieves the local socket address.
+ GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error)
+ // Retrieves the remote socket address.
+ GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error)
+ // Sets the value of a socket option.
+ SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error)
+ // Retrieves the value of a socket option.
+ GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error)
+ // Shuts down part of the socket.
+ Shutdown(ctx_ _bindings.Context, mode ShutdownMode) (DatagramSocketShutdownResult, error)
+ // Receives a message from the socket.
+ RecvMsg(ctx_ _bindings.Context, wantAddr bool, dataLen uint32, wantControl bool, flags RecvMsgFlags) (DatagramSocketRecvMsgResult, error)
+ // Sends a message on the socket.
+ SendMsg(ctx_ _bindings.Context, addr *fuchsianet.SocketAddress, data []uint8, control SendControlData, flags SendMsgFlags) (DatagramSocketSendMsgResult, error)
+}
+
+type DatagramSocketWithCtxTransitionalBase struct{}
+
+func (_ *DatagramSocketWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ panic("Not Implemented")
+}
+func (_ *DatagramSocketWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ panic("Not Implemented")
+}
+
+type DatagramSocketWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewDatagramSocketWithCtxInterfaceRequest() (DatagramSocketWithCtxInterfaceRequest, *DatagramSocketWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return DatagramSocketWithCtxInterfaceRequest(req), (*DatagramSocketWithCtxInterface)(cli), err
+}
+
+type DatagramSocketWithCtxStub struct {
+ Impl DatagramSocketWithCtx
+}
+
+func (s_ *DatagramSocketWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case DatagramSocketCloneOrdinal:
+ in_ := datagramSocketWithCtxCloneRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
+ return nil, false, err_
+ case DatagramSocketCloseOrdinal:
+ s, err_ := s_.Impl.Close(args_.Ctx)
+ out_ := datagramSocketWithCtxCloseResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DatagramSocketDescribeOrdinal:
+ info, err_ := s_.Impl.Describe(args_.Ctx)
+ out_ := datagramSocketWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case DatagramSocketSyncOrdinal:
+ s, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := datagramSocketWithCtxSyncResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DatagramSocketGetAttrOrdinal:
+ s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
+ out_ := datagramSocketWithCtxGetAttrResponse{}
+ out_.S = s
+ out_.Attributes = attributes
+ return &out_, true, err_
+ case DatagramSocketSetAttrOrdinal:
+ in_ := datagramSocketWithCtxSetAttrRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
+ out_ := datagramSocketWithCtxSetAttrResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DatagramSocketNodeGetFlagsOrdinal:
+ s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
+ out_ := datagramSocketWithCtxNodeGetFlagsResponse{}
+ out_.S = s
+ out_.Flags = flags
+ return &out_, true, err_
+ case DatagramSocketNodeSetFlagsOrdinal:
+ in_ := datagramSocketWithCtxNodeSetFlagsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
+ out_ := datagramSocketWithCtxNodeSetFlagsResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case DatagramSocketBindOrdinal:
+ in_ := datagramSocketWithCtxBindRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Bind(args_.Ctx, in_.Addr)
+ out_ := datagramSocketWithCtxBindResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DatagramSocketConnectOrdinal:
+ in_ := datagramSocketWithCtxConnectRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Connect(args_.Ctx, in_.Addr)
+ out_ := datagramSocketWithCtxConnectResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DatagramSocketDisconnectOrdinal:
+ result, err_ := s_.Impl.Disconnect(args_.Ctx)
+ out_ := datagramSocketWithCtxDisconnectResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DatagramSocketGetSockNameOrdinal:
+ result, err_ := s_.Impl.GetSockName(args_.Ctx)
+ out_ := datagramSocketWithCtxGetSockNameResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DatagramSocketGetPeerNameOrdinal:
+ result, err_ := s_.Impl.GetPeerName(args_.Ctx)
+ out_ := datagramSocketWithCtxGetPeerNameResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DatagramSocketSetSockOptOrdinal:
+ in_ := datagramSocketWithCtxSetSockOptRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.SetSockOpt(args_.Ctx, in_.Level, in_.Optname, in_.Optval)
+ out_ := datagramSocketWithCtxSetSockOptResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DatagramSocketGetSockOptOrdinal:
+ in_ := datagramSocketWithCtxGetSockOptRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetSockOpt(args_.Ctx, in_.Level, in_.Optname)
+ out_ := datagramSocketWithCtxGetSockOptResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DatagramSocketShutdownOrdinal:
+ in_ := datagramSocketWithCtxShutdownRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Shutdown(args_.Ctx, in_.Mode)
+ out_ := datagramSocketWithCtxShutdownResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DatagramSocketRecvMsgOrdinal:
+ in_ := datagramSocketWithCtxRecvMsgRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.RecvMsg(args_.Ctx, in_.WantAddr, in_.DataLen, in_.WantControl, in_.Flags)
+ out_ := datagramSocketWithCtxRecvMsgResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case DatagramSocketSendMsgOrdinal:
+ in_ := datagramSocketWithCtxSendMsgRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.SendMsg(args_.Ctx, in_.Addr, in_.Data, in_.Control, in_.Flags)
+ out_ := datagramSocketWithCtxSendMsgResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type DatagramSocketEventProxy _bindings.ChannelProxy
+
+func (p *DatagramSocketEventProxy) OnOpen(s int32, info *fuchsiaio.NodeInfo) error {
+ event_ := &datagramSocketWithCtxOnOpenResponse{
+ S: s,
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(DatagramSocketOnOpenOrdinal, event_)
+}
+
+const (
+ StreamSocketCloneOrdinal uint64 = 0x5a61678f293ce16f
+ StreamSocketCloseOrdinal uint64 = 0x5309c5bd1c33dc44
+ StreamSocketDescribeOrdinal uint64 = 0xffcec215078dea0
+ StreamSocketOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
+ StreamSocketSyncOrdinal uint64 = 0x189d88326c18b519
+ StreamSocketGetAttrOrdinal uint64 = 0x78985e216314dafd
+ StreamSocketSetAttrOrdinal uint64 = 0x4186c0f40d938f46
+ StreamSocketNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
+ StreamSocketNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
+ StreamSocketBindOrdinal uint64 = 0xf8457e6b05e15bc
+ StreamSocketConnectOrdinal uint64 = 0x17abeee0b9843bb1
+ StreamSocketDisconnectOrdinal uint64 = 0x20eaedba2e0f70a4
+ StreamSocketGetSockNameOrdinal uint64 = 0x41a618ef19a91f9d
+ StreamSocketGetPeerNameOrdinal uint64 = 0x4009d08a4beb5e95
+ StreamSocketSetSockOptOrdinal uint64 = 0x93c6f802203e6f1
+ StreamSocketGetSockOptOrdinal uint64 = 0x6dfaf70f0ed40544
+ StreamSocketListenOrdinal uint64 = 0x3d0a65ced3d10108
+ StreamSocketAcceptOrdinal uint64 = 0x5ab7ad620424c163
+)
+
+type StreamSocketWithCtxInterface _bindings.ChannelProxy
+
+// Create another connection to the same remote object.
+//
+// `flags` may be any of:
+//
+// - `OPEN_RIGHT_*`
+// - `OPEN_FLAG_APPEND`
+// - `OPEN_FLAG_NO_REMOTE`
+// - `OPEN_FLAG_DESCRIBE`
+// - `CLONE_FLAG_SAME_RIGHTS`
+//
+// All other flags are ignored.
+//
+// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+// cloned object.
+// The cloned object must have rights less than or equal to the original object.
+// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+// `CLONE_FLAG_SAME_RIGHTS`.
+func (p *StreamSocketWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error {
+ req_ := &streamSocketWithCtxCloneRequest{
+ Flags: flags,
+ Object: object,
+ }
+ err_ := ((*_bindings.ChannelProxy)(p)).Send(StreamSocketCloneOrdinal, req_)
+ return err_
+}
+
+// Terminates connection with object.
+//
+// This method does not require any rights.
+func (p *StreamSocketWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &streamSocketWithCtxCloseResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketCloseOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Returns extra information about the type of the object.
+// If the `Describe` operation fails, the connection is closed.
+//
+// This method does not require any rights.
+func (p *StreamSocketWithCtxInterface) Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error) {
+ var req_ _bindings.Message
+ resp_ := &streamSocketWithCtxDescribeResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketDescribeOrdinal, req_, resp_)
+ return resp_.Info, err_
+}
+
+// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+//
+// Indicates the success or failure of the open operation, and optionally describes the
+// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+// (the same as would be returned by `Describe`).
+func (p *StreamSocketWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *fuchsiaio.NodeInfo, error) {
+ resp_ := &streamSocketWithCtxOnOpenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Recv(StreamSocketOnOpenOrdinal, resp_)
+ return resp_.S, resp_.Info, err_
+}
+
+// Synchronizes updates to the node to the underlying media, if it exists.
+//
+// This method does not require any rights.
+func (p *StreamSocketWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
+ var req_ _bindings.Message
+ resp_ := &streamSocketWithCtxSyncResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketSyncOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires information about the node.
+//
+// This method does not require any rights.
+func (p *StreamSocketWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error) {
+ var req_ _bindings.Message
+ resp_ := &streamSocketWithCtxGetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketGetAttrOrdinal, req_, resp_)
+ return resp_.S, resp_.Attributes, err_
+}
+
+// Updates information about the node.
+// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+//
+// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+func (p *StreamSocketWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error) {
+ req_ := &streamSocketWithCtxSetAttrRequest{
+ Flags: flags,
+ Attributes: attributes,
+ }
+ resp_ := &streamSocketWithCtxSetAttrResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketSetAttrOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Acquires the `Directory.Open` rights and flags used to access this file.
+//
+// This method does not require any rights.
+// This method has the same functionality as GetFlags for File and is
+// meant as an in-progress replacement.
+func (p *StreamSocketWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ var req_ _bindings.Message
+ resp_ := &streamSocketWithCtxNodeGetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketNodeGetFlagsOrdinal, req_, resp_)
+ return resp_.S, resp_.Flags, err_
+}
+
+// Changes the `Directory.Open` flags used to access the file.
+// Supported flags which can be turned on / off:
+// - `OPEN_FLAG_APPEND`
+//
+// This method does not require any rights.
+// This method has the same functionality as SetFlags for File and is
+// meant as an in-progress replacement.
+func (p *StreamSocketWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ req_ := &streamSocketWithCtxNodeSetFlagsRequest{
+ Flags: flags,
+ }
+ resp_ := &streamSocketWithCtxNodeSetFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketNodeSetFlagsOrdinal, req_, resp_)
+ return resp_.S, err_
+}
+
+// Sets the local address used for the socket.
+func (p *StreamSocketWithCtxInterface) Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error) {
+ req_ := &streamSocketWithCtxBindRequest{
+ Addr: addr,
+ }
+ resp_ := &streamSocketWithCtxBindResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketBindOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Initiates a connection to a remote address.
+func (p *StreamSocketWithCtxInterface) Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error) {
+ req_ := &streamSocketWithCtxConnectRequest{
+ Addr: addr,
+ }
+ resp_ := &streamSocketWithCtxConnectResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketConnectOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Clears connection information from this socket.
+func (p *StreamSocketWithCtxInterface) Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error) {
+ var req_ _bindings.Message
+ resp_ := &streamSocketWithCtxDisconnectResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketDisconnectOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Retrieves the local socket address.
+func (p *StreamSocketWithCtxInterface) GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error) {
+ var req_ _bindings.Message
+ resp_ := &streamSocketWithCtxGetSockNameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketGetSockNameOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Retrieves the remote socket address.
+func (p *StreamSocketWithCtxInterface) GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error) {
+ var req_ _bindings.Message
+ resp_ := &streamSocketWithCtxGetPeerNameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketGetPeerNameOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Sets the value of a socket option.
+func (p *StreamSocketWithCtxInterface) SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error) {
+ req_ := &streamSocketWithCtxSetSockOptRequest{
+ Level: level,
+ Optname: optname,
+ Optval: optval,
+ }
+ resp_ := &streamSocketWithCtxSetSockOptResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketSetSockOptOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Retrieves the value of a socket option.
+func (p *StreamSocketWithCtxInterface) GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error) {
+ req_ := &streamSocketWithCtxGetSockOptRequest{
+ Level: level,
+ Optname: optname,
+ }
+ resp_ := &streamSocketWithCtxGetSockOptResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketGetSockOptOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Begins listening for new incoming connections. At most `backlog` connections will be
+// buffered.
+func (p *StreamSocketWithCtxInterface) Listen(ctx_ _bindings.Context, backlog int16) (StreamSocketListenResult, error) {
+ req_ := &streamSocketWithCtxListenRequest{
+ Backlog: backlog,
+ }
+ resp_ := &streamSocketWithCtxListenResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketListenOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Accepts a buffered incoming connection.
+func (p *StreamSocketWithCtxInterface) Accept(ctx_ _bindings.Context, wantAddr bool) (StreamSocketAcceptResult, error) {
+ req_ := &streamSocketWithCtxAcceptRequest{
+ WantAddr: wantAddr,
+ }
+ resp_ := &streamSocketWithCtxAcceptResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketAcceptOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// A stream socket.
+//
+// This type's [`fuchsia.io.Node/Describe`] method returns a socket which is used to transfer data
+// to and from the caller. Signals are used to communicate additional information about the state
+// of the socket such as connectedness and the presence of incoming connections in the case of a
+// listening socket.
+//
+// All methods on this type are nonblocking; their exact behaviors match their Linux counterparts.
+type StreamSocketWithCtx interface {
+ // Create another connection to the same remote object.
+ //
+ // `flags` may be any of:
+ //
+ // - `OPEN_RIGHT_*`
+ // - `OPEN_FLAG_APPEND`
+ // - `OPEN_FLAG_NO_REMOTE`
+ // - `OPEN_FLAG_DESCRIBE`
+ // - `CLONE_FLAG_SAME_RIGHTS`
+ //
+ // All other flags are ignored.
+ //
+ // The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
+ // cloned object.
+ // The cloned object must have rights less than or equal to the original object.
+ // Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
+ // It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
+ // `CLONE_FLAG_SAME_RIGHTS`.
+ Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error
+ // Terminates connection with object.
+ //
+ // This method does not require any rights.
+ Close(ctx_ _bindings.Context) (int32, error)
+ // Returns extra information about the type of the object.
+ // If the `Describe` operation fails, the connection is closed.
+ //
+ // This method does not require any rights.
+ Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error)
+ // An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
+ //
+ // Indicates the success or failure of the open operation, and optionally describes the
+ // object. If the status is `ZX_OK`, `info` contains descriptive information about the object
+ // (the same as would be returned by `Describe`).
+ // Synchronizes updates to the node to the underlying media, if it exists.
+ //
+ // This method does not require any rights.
+ Sync(ctx_ _bindings.Context) (int32, error)
+ // Acquires information about the node.
+ //
+ // This method does not require any rights.
+ GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error)
+ // Updates information about the node.
+ // `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
+ //
+ // This method requires following rights: `OPEN_RIGHT_WRITABLE`.
+ SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error)
+ // Acquires the `Directory.Open` rights and flags used to access this file.
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as GetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
+ // Changes the `Directory.Open` flags used to access the file.
+ // Supported flags which can be turned on / off:
+ // - `OPEN_FLAG_APPEND`
+ //
+ // This method does not require any rights.
+ // This method has the same functionality as SetFlags for File and is
+ // meant as an in-progress replacement.
+ NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
+ // Sets the local address used for the socket.
+ Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error)
+ // Initiates a connection to a remote address.
+ Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error)
+ // Clears connection information from this socket.
+ Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error)
+ // Retrieves the local socket address.
+ GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error)
+ // Retrieves the remote socket address.
+ GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error)
+ // Sets the value of a socket option.
+ SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error)
+ // Retrieves the value of a socket option.
+ GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error)
+ // Begins listening for new incoming connections. At most `backlog` connections will be
+ // buffered.
+ Listen(ctx_ _bindings.Context, backlog int16) (StreamSocketListenResult, error)
+ // Accepts a buffered incoming connection.
+ Accept(ctx_ _bindings.Context, wantAddr bool) (StreamSocketAcceptResult, error)
+}
+
+type StreamSocketWithCtxTransitionalBase struct{}
+
+func (_ *StreamSocketWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
+ panic("Not Implemented")
+}
+func (_ *StreamSocketWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
+ panic("Not Implemented")
+}
+
+type StreamSocketWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewStreamSocketWithCtxInterfaceRequest() (StreamSocketWithCtxInterfaceRequest, *StreamSocketWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return StreamSocketWithCtxInterfaceRequest(req), (*StreamSocketWithCtxInterface)(cli), err
+}
+
+type StreamSocketWithCtxStub struct {
+ Impl StreamSocketWithCtx
+}
+
+func (s_ *StreamSocketWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case StreamSocketCloneOrdinal:
+ in_ := streamSocketWithCtxCloneRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
+ return nil, false, err_
+ case StreamSocketCloseOrdinal:
+ s, err_ := s_.Impl.Close(args_.Ctx)
+ out_ := streamSocketWithCtxCloseResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case StreamSocketDescribeOrdinal:
+ info, err_ := s_.Impl.Describe(args_.Ctx)
+ out_ := streamSocketWithCtxDescribeResponse{}
+ out_.Info = info
+ return &out_, true, err_
+ case StreamSocketSyncOrdinal:
+ s, err_ := s_.Impl.Sync(args_.Ctx)
+ out_ := streamSocketWithCtxSyncResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case StreamSocketGetAttrOrdinal:
+ s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
+ out_ := streamSocketWithCtxGetAttrResponse{}
+ out_.S = s
+ out_.Attributes = attributes
+ return &out_, true, err_
+ case StreamSocketSetAttrOrdinal:
+ in_ := streamSocketWithCtxSetAttrRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
+ out_ := streamSocketWithCtxSetAttrResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case StreamSocketNodeGetFlagsOrdinal:
+ s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
+ out_ := streamSocketWithCtxNodeGetFlagsResponse{}
+ out_.S = s
+ out_.Flags = flags
+ return &out_, true, err_
+ case StreamSocketNodeSetFlagsOrdinal:
+ in_ := streamSocketWithCtxNodeSetFlagsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
+ out_ := streamSocketWithCtxNodeSetFlagsResponse{}
+ out_.S = s
+ return &out_, true, err_
+ case StreamSocketBindOrdinal:
+ in_ := streamSocketWithCtxBindRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Bind(args_.Ctx, in_.Addr)
+ out_ := streamSocketWithCtxBindResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StreamSocketConnectOrdinal:
+ in_ := streamSocketWithCtxConnectRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Connect(args_.Ctx, in_.Addr)
+ out_ := streamSocketWithCtxConnectResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StreamSocketDisconnectOrdinal:
+ result, err_ := s_.Impl.Disconnect(args_.Ctx)
+ out_ := streamSocketWithCtxDisconnectResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StreamSocketGetSockNameOrdinal:
+ result, err_ := s_.Impl.GetSockName(args_.Ctx)
+ out_ := streamSocketWithCtxGetSockNameResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StreamSocketGetPeerNameOrdinal:
+ result, err_ := s_.Impl.GetPeerName(args_.Ctx)
+ out_ := streamSocketWithCtxGetPeerNameResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StreamSocketSetSockOptOrdinal:
+ in_ := streamSocketWithCtxSetSockOptRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.SetSockOpt(args_.Ctx, in_.Level, in_.Optname, in_.Optval)
+ out_ := streamSocketWithCtxSetSockOptResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StreamSocketGetSockOptOrdinal:
+ in_ := streamSocketWithCtxGetSockOptRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.GetSockOpt(args_.Ctx, in_.Level, in_.Optname)
+ out_ := streamSocketWithCtxGetSockOptResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StreamSocketListenOrdinal:
+ in_ := streamSocketWithCtxListenRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Listen(args_.Ctx, in_.Backlog)
+ out_ := streamSocketWithCtxListenResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case StreamSocketAcceptOrdinal:
+ in_ := streamSocketWithCtxAcceptRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.Accept(args_.Ctx, in_.WantAddr)
+ out_ := streamSocketWithCtxAcceptResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type StreamSocketEventProxy _bindings.ChannelProxy
+
+func (p *StreamSocketEventProxy) OnOpen(s int32, info *fuchsiaio.NodeInfo) error {
+ event_ := &streamSocketWithCtxOnOpenResponse{
+ S: s,
+ Info: info,
+ }
+ return ((*_bindings.ChannelProxy)(p)).Send(StreamSocketOnOpenOrdinal, event_)
+}
+
+const (
+ ProviderStreamSocketOrdinal uint64 = 0x27c3581da2155545
+ ProviderDatagramSocketOrdinal uint64 = 0x38876c87cf031cb1
+ ProviderInterfaceIndexToNameOrdinal uint64 = 0x4d59a64fce98272f
+ ProviderInterfaceNameToIndexOrdinal uint64 = 0x690cd8d2f2d650f8
+ ProviderInterfaceNameToFlagsOrdinal uint64 = 0x25d0efcdb6671a0b
+ ProviderGetInterfaceAddressesOrdinal uint64 = 0x2e7b9aaf327c870
+)
+
+type ProviderWithCtxInterface _bindings.ChannelProxy
+
+// Requests a stream socket with the specified parameters.
+func (p *ProviderWithCtxInterface) StreamSocket(ctx_ _bindings.Context, domain Domain, proto StreamSocketProtocol) (ProviderStreamSocketResult, error) {
+ req_ := &providerWithCtxStreamSocketRequest{
+ Domain: domain,
+ Proto: proto,
+ }
+ resp_ := &providerWithCtxStreamSocketResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderStreamSocketOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Requests a datagram socket with the specified parameters.
+func (p *ProviderWithCtxInterface) DatagramSocket(ctx_ _bindings.Context, domain Domain, proto DatagramSocketProtocol) (ProviderDatagramSocketResult, error) {
+ req_ := &providerWithCtxDatagramSocketRequest{
+ Domain: domain,
+ Proto: proto,
+ }
+ resp_ := &providerWithCtxDatagramSocketResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderDatagramSocketOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Looks up an interface by its index and returns its name. Returns `ZX_ERR_NOT_FOUND` if the
+// specified index doesn't exist.
+func (p *ProviderWithCtxInterface) InterfaceIndexToName(ctx_ _bindings.Context, index uint64) (ProviderInterfaceIndexToNameResult, error) {
+ req_ := &providerWithCtxInterfaceIndexToNameRequest{
+ Index: index,
+ }
+ resp_ := &providerWithCtxInterfaceIndexToNameResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderInterfaceIndexToNameOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Looks up an interface by its name and returns its index. Returns `ZX_ERR_NOT_FOUND` if the
+// specified name doesn't exist.
+func (p *ProviderWithCtxInterface) InterfaceNameToIndex(ctx_ _bindings.Context, name string) (ProviderInterfaceNameToIndexResult, error) {
+ req_ := &providerWithCtxInterfaceNameToIndexRequest{
+ Name: name,
+ }
+ resp_ := &providerWithCtxInterfaceNameToIndexResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderInterfaceNameToIndexOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Looks up an interface by its name and returns its flags. Returns `ZX_ERR_NOT_FOUND` if the
+// specified name doesn't exist.
+func (p *ProviderWithCtxInterface) InterfaceNameToFlags(ctx_ _bindings.Context, name string) (ProviderInterfaceNameToFlagsResult, error) {
+ req_ := &providerWithCtxInterfaceNameToFlagsRequest{
+ Name: name,
+ }
+ resp_ := &providerWithCtxInterfaceNameToFlagsResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderInterfaceNameToFlagsOrdinal, req_, resp_)
+ return resp_.Result, err_
+}
+
+// Requests a list of [`fuchsia.posix.socket.InterfaceAddresses`]
+// describing the network interfaces on the system.
+func (p *ProviderWithCtxInterface) GetInterfaceAddresses(ctx_ _bindings.Context) ([]InterfaceAddresses, error) {
+ var req_ _bindings.Message
+ resp_ := &providerWithCtxGetInterfaceAddressesResponse{}
+ err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderGetInterfaceAddressesOrdinal, req_, resp_)
+ return resp_.Interfaces, err_
+}
+
+// Provider implements the POSIX sockets API.
+type ProviderWithCtx interface {
+ // Requests a stream socket with the specified parameters.
+ StreamSocket(ctx_ _bindings.Context, domain Domain, proto StreamSocketProtocol) (ProviderStreamSocketResult, error)
+ // Requests a datagram socket with the specified parameters.
+ DatagramSocket(ctx_ _bindings.Context, domain Domain, proto DatagramSocketProtocol) (ProviderDatagramSocketResult, error)
+ // Looks up an interface by its index and returns its name. Returns `ZX_ERR_NOT_FOUND` if the
+ // specified index doesn't exist.
+ InterfaceIndexToName(ctx_ _bindings.Context, index uint64) (ProviderInterfaceIndexToNameResult, error)
+ // Looks up an interface by its name and returns its index. Returns `ZX_ERR_NOT_FOUND` if the
+ // specified name doesn't exist.
+ InterfaceNameToIndex(ctx_ _bindings.Context, name string) (ProviderInterfaceNameToIndexResult, error)
+ // Looks up an interface by its name and returns its flags. Returns `ZX_ERR_NOT_FOUND` if the
+ // specified name doesn't exist.
+ InterfaceNameToFlags(ctx_ _bindings.Context, name string) (ProviderInterfaceNameToFlagsResult, error)
+ // Requests a list of [`fuchsia.posix.socket.InterfaceAddresses`]
+ // describing the network interfaces on the system.
+ GetInterfaceAddresses(ctx_ _bindings.Context) ([]InterfaceAddresses, error)
+}
+
+type ProviderWithCtxTransitionalBase struct{}
+
+type ProviderWithCtxInterfaceRequest _bindings.InterfaceRequest
+
+func NewProviderWithCtxInterfaceRequest() (ProviderWithCtxInterfaceRequest, *ProviderWithCtxInterface, error) {
+ req, cli, err := _bindings.NewInterfaceRequest()
+ return ProviderWithCtxInterfaceRequest(req), (*ProviderWithCtxInterface)(cli), err
+}
+
+// Implements ServiceRequest.
+func (_ ProviderWithCtxInterfaceRequest) Name() string {
+ return "fuchsia.posix.socket.Provider"
+}
+func (c ProviderWithCtxInterfaceRequest) ToChannel() _zx.Channel {
+ return c.Channel
+}
+
+const ProviderName = "fuchsia.posix.socket.Provider"
+
+type ProviderWithCtxStub struct {
+ Impl ProviderWithCtx
+}
+
+func (s_ *ProviderWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
+ switch args_.Ordinal {
+ case ProviderStreamSocketOrdinal:
+ in_ := providerWithCtxStreamSocketRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.StreamSocket(args_.Ctx, in_.Domain, in_.Proto)
+ out_ := providerWithCtxStreamSocketResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case ProviderDatagramSocketOrdinal:
+ in_ := providerWithCtxDatagramSocketRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.DatagramSocket(args_.Ctx, in_.Domain, in_.Proto)
+ out_ := providerWithCtxDatagramSocketResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case ProviderInterfaceIndexToNameOrdinal:
+ in_ := providerWithCtxInterfaceIndexToNameRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.InterfaceIndexToName(args_.Ctx, in_.Index)
+ out_ := providerWithCtxInterfaceIndexToNameResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case ProviderInterfaceNameToIndexOrdinal:
+ in_ := providerWithCtxInterfaceNameToIndexRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.InterfaceNameToIndex(args_.Ctx, in_.Name)
+ out_ := providerWithCtxInterfaceNameToIndexResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case ProviderInterfaceNameToFlagsOrdinal:
+ in_ := providerWithCtxInterfaceNameToFlagsRequest{}
+ marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
+ if !ok {
+ return nil, false, _bindings.ErrMissingMarshalerContext
+ }
+ if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
+ return nil, false, err_
+ }
+ result, err_ := s_.Impl.InterfaceNameToFlags(args_.Ctx, in_.Name)
+ out_ := providerWithCtxInterfaceNameToFlagsResponse{}
+ out_.Result = result
+ return &out_, true, err_
+ case ProviderGetInterfaceAddressesOrdinal:
+ interfaces, err_ := s_.Impl.GetInterfaceAddresses(args_.Ctx)
+ out_ := providerWithCtxGetInterfaceAddressesResponse{}
+ out_.Interfaces = interfaces
+ return &out_, true, err_
+ }
+ return nil, false, _bindings.ErrUnknownOrdinal
+}
+
+type ProviderEventProxy _bindings.ChannelProxy
diff --git a/src/syscall/zx/syscalls_fuchsia.go b/src/syscall/zx/syscalls_fuchsia.go
new file mode 100644
index 0000000..d84f591
--- /dev/null
+++ b/src/syscall/zx/syscalls_fuchsia.go
@@ -0,0 +1,745 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// WARNING: THIS FILE IS MACHINE GENERATED BY //tools/kazoo. DO NOT EDIT.
+
+package zx
+
+import "unsafe"
+
+//go:noescape
+//go:nosplit
+func Sys_bti_create(iommu Handle, options uint32, bti_id uint64, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_bti_pin(handle Handle, options uint32, vmo Handle, offset uint64, size uint64, addrs *Paddr, num_addrs uint, pmt *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_bti_release_quarantine(handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_cache_flush(addr unsafe.Pointer, size uint, options uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_create(options uint32, out0 *Handle, out1 *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_read(handle Handle, options uint32, bytes unsafe.Pointer, handles *Handle, num_bytes uint32, num_handles uint32, actual_bytes *uint32, actual_handles *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_read_etc(handle Handle, options uint32, bytes unsafe.Pointer, handles *HandleInfo, num_bytes uint32, num_handles uint32, actual_bytes *uint32, actual_handles *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_write(handle Handle, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles *Handle, num_handles uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_write_etc(handle Handle, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles *HandleDisposition, num_handles uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_call_noretry(handle Handle, options uint32, deadline Time, args *ChannelCallArgs, actual_bytes *uint32, actual_handles *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_call_finish(deadline Time, args *ChannelCallArgs, actual_bytes *uint32, actual_handles *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_call(handle Handle, options uint32, deadline Time, args *ChannelCallArgs, actual_bytes *uint32, actual_handles *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_call_etc_noretry(handle Handle, options uint32, deadline Time, args *ChannelCallEtcArgs, actual_bytes *uint32, actual_handles *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_call_etc_finish(deadline Time, args *ChannelCallEtcArgs, actual_bytes *uint32, actual_handles *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_channel_call_etc(handle Handle, options uint32, deadline Time, args *ChannelCallEtcArgs, actual_bytes *uint32, actual_handles *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_clock_get(clock_id uint32, out *Time) Status
+
+//go:noescape
+//go:nosplit
+func Sys_clock_get_monotonic() Time
+
+//go:noescape
+//go:nosplit
+func Sys_clock_adjust(handle Handle, clock_id uint32, offset int64) Status
+
+//go:noescape
+//go:nosplit
+func Sys_clock_get_monotonic_via_kernel() Time
+
+//go:noescape
+//go:nosplit
+func Sys_clock_create(options uint64, args unsafe.Pointer, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_clock_read(handle Handle, now *Time) Status
+
+//go:noescape
+//go:nosplit
+func Sys_clock_get_details(handle Handle, options uint64, details unsafe.Pointer) Status
+
+//go:noescape
+//go:nosplit
+func Sys_clock_update(handle Handle, options uint64, args unsafe.Pointer) Status
+
+//go:noescape
+//go:nosplit
+func Sys_cprng_draw_once(buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_cprng_draw(buffer unsafe.Pointer, buffer_size uint)
+
+//go:noescape
+//go:nosplit
+func Sys_cprng_add_entropy(buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_debug_read(handle Handle, buffer *uint8, buffer_size uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_debug_write(buffer *uint8, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_debug_send_command(resource Handle, buffer *uint8, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_debuglog_create(resource Handle, options uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_debuglog_write(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_debuglog_read(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_event_create(options uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_eventpair_create(options uint32, out0 *Handle, out1 *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_exception_get_thread(handle Handle, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_exception_get_process(handle Handle, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_fifo_create(elem_count uint, elem_size uint, options uint32, out0 *Handle, out1 *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_fifo_read(handle Handle, elem_size uint, data unsafe.Pointer, data_size uint, actual_count *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_fifo_write(handle Handle, elem_size uint, data unsafe.Pointer, count uint, actual_count *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_framebuffer_get_info(resource Handle, format *uint32, width *uint32, height *uint32, stride *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_framebuffer_set_range(resource Handle, vmo Handle, len uint32, format uint32, width uint32, height uint32, stride uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_futex_wait(value_ptr *int32, current_value int32, new_futex_owner Handle, deadline Time) Status
+
+//go:noescape
+//go:nosplit
+func Sys_futex_wake(value_ptr *int32, wake_count uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_futex_requeue(value_ptr *int32, wake_count uint32, current_value int32, requeue_ptr *int32, requeue_count uint32, new_requeue_owner Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_futex_wake_single_owner(value_ptr *int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_futex_requeue_single_owner(value_ptr *int32, current_value int32, requeue_ptr *int32, requeue_count uint32, new_requeue_owner Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_futex_get_owner(value_ptr *int32, koid *uint64) Status
+
+//go:noescape
+//go:nosplit
+func Sys_guest_create(resource Handle, options uint32, guest_handle *Handle, vmar_handle *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_guest_set_trap(handle Handle, kind uint32, addr Vaddr, size uint, port_handle Handle, key uint64) Status
+
+//go:noescape
+//go:nosplit
+func Sys_handle_close(handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_handle_close_many(handles *Handle, num_handles uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_handle_duplicate(handle Handle, rights Rights, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_handle_replace(handle Handle, rights Rights, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_interrupt_create(src_obj Handle, src_num uint32, options uint32, out_handle *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_interrupt_bind(handle Handle, port_handle Handle, key uint64, options uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_interrupt_wait(handle Handle, out_timestamp *Time) Status
+
+//go:noescape
+//go:nosplit
+func Sys_interrupt_destroy(handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_interrupt_ack(handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_interrupt_trigger(handle Handle, options uint32, timestamp Time) Status
+
+//go:noescape
+//go:nosplit
+func Sys_interrupt_bind_vcpu(handle Handle, vcpu Handle, options uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_iommu_create(resource Handle, typ uint32, desc unsafe.Pointer, desc_size uint, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_ioports_request(resource Handle, io_addr uint16, len uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_ioports_release(resource Handle, io_addr uint16, len uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_job_create(parent_job Handle, options uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_job_set_policy(handle Handle, options uint32, topic uint32, policy unsafe.Pointer, policy_size uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_job_set_critical(job Handle, options uint32, process Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_ktrace_read(handle Handle, data unsafe.Pointer, offset uint32, data_size uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_ktrace_control(handle Handle, action uint32, options uint32, ptr unsafe.Pointer) Status
+
+//go:noescape
+//go:nosplit
+func Sys_ktrace_write(handle Handle, id uint32, arg0 uint32, arg1 uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_nanosleep(deadline Time) Status
+
+//go:noescape
+//go:nosplit
+func Sys_ticks_get() int64
+
+//go:noescape
+//go:nosplit
+func Sys_ticks_per_second() int64
+
+//go:noescape
+//go:nosplit
+func Sys_deadline_after(nanoseconds Duration) Time
+
+//go:noescape
+//go:nosplit
+func Sys_vmar_unmap_handle_close_thread_exit(vmar_handle Handle, addr Vaddr, size uint, close_handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_futex_wake_handle_close_thread_exit(value_ptr *int32, wake_count uint32, new_value int32, close_handle Handle)
+
+//go:noescape
+//go:nosplit
+func Sys_ticks_get_via_kernel() int64
+
+//go:noescape
+//go:nosplit
+func Sys_msi_allocate(handle Handle, count uint32, out_allocation *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_msi_create(handle Handle, options uint32, msi_id uint32, vmo Handle, vmo_offset uint, out_interrupt *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_mtrace_control(handle Handle, kind uint32, action uint32, options uint32, ptr unsafe.Pointer, ptr_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_wait_one(handle Handle, signals Signals, deadline Time, observed *Signals) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_wait_many(items *WaitItem, num_items uint, deadline Time) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_wait_async(handle Handle, port Handle, key uint64, signals Signals, options uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_signal(handle Handle, clear_mask uint32, set_mask uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_signal_peer(handle Handle, clear_mask uint32, set_mask uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_get_property(handle Handle, property uint32, value unsafe.Pointer, value_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_set_property(handle Handle, property uint32, value unsafe.Pointer, value_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_get_info(handle Handle, topic uint32, buffer unsafe.Pointer, buffer_size uint, actual *uint, avail *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_get_child(handle Handle, koid uint64, rights Rights, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_object_set_profile(handle Handle, profile Handle, options uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pager_create(options uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pager_create_vmo(pager Handle, options uint32, port Handle, key uint64, size uint64, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pager_detach_vmo(pager Handle, vmo Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pager_supply_pages(pager Handle, pager_vmo Handle, offset uint64, length uint64, aux_vmo Handle, aux_offset uint64) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pager_op_range(pager Handle, op uint32, pager_vmo Handle, offset uint64, length uint64, data uint64) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pc_firmware_tables(handle Handle, acpi_rsdp *Paddr, smbios *Paddr) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_get_nth_device(handle Handle, index uint32, out_info *uintptr, out_handle *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_enable_bus_master(handle Handle, enable uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_reset_device(handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_config_read(handle Handle, offset uint16, width uint, out_val *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_config_write(handle Handle, offset uint16, width uint, val uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_cfg_pio_rw(handle Handle, bus uint8, dev uint8, funk uint8, offset uint8, val *uint32, width uint, write uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_get_bar(handle Handle, bar_num uint32, out_bar *uintptr, out_handle *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_map_interrupt(handle Handle, which_irq int32, out_handle *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_query_irq_mode(handle Handle, mode uint32, out_max_irqs *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_set_irq_mode(handle Handle, mode uint32, requested_irq_count uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_init(handle Handle, init_buf *uintptr, len uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pci_add_subtract_io_range(handle Handle, mmio uint32, base uint64, len uint64, add uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_pmt_unpin(handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_port_create(options uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_port_queue(handle Handle, packet *int) Status
+
+//go:noescape
+//go:nosplit
+func Sys_port_wait(handle Handle, deadline Time, packet *int) Status
+
+//go:noescape
+//go:nosplit
+func Sys_port_cancel(handle Handle, source Handle, key uint64) Status
+
+//go:noescape
+//go:nosplit
+func Sys_process_exit(retcode int64)
+
+//go:noescape
+//go:nosplit
+func Sys_process_create(job Handle, name *uint8, name_size uint, options uint32, proc_handle *Handle, vmar_handle *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_process_start(handle Handle, thread Handle, entry Vaddr, stack Vaddr, arg1 Handle, arg2 uintptr) Status
+
+//go:noescape
+//go:nosplit
+func Sys_process_read_memory(handle Handle, vaddr Vaddr, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_process_write_memory(handle Handle, vaddr Vaddr, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_profile_create(root_job Handle, options uint32, profile *int, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_resource_create(parent_rsrc Handle, options uint32, base uint64, size uint, name *uint8, name_size uint, resource_out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_smc_call(handle Handle, parameters *SMCParameters, out_smc_result *SMCResult) Status
+
+//go:noescape
+//go:nosplit
+func Sys_socket_create(options uint32, out0 *Handle, out1 *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_socket_write(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_socket_read(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_socket_shutdown(handle Handle, options uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_stream_create(options uint32, vmo Handle, seek uint64, out_stream *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_stream_writev(handle Handle, options uint32, vector *uintptr, num_vector uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_stream_writev_at(handle Handle, options uint32, offset uint64, vector *uintptr, num_vector uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_stream_readv(handle Handle, options uint32, vector *uintptr, num_vector uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_stream_readv_at(handle Handle, options uint32, offset uint64, vector *uintptr, num_vector uint, actual *uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_stream_seek(handle Handle, whence uint32, offset int64, out_seek *uint64) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_0() Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_1(a int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_2(a int32, b int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_3(a int32, b int32, c int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_4(a int32, b int32, c int32, d int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_5(a int32, b int32, c int32, d int32, e int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_6(a int32, b int32, c int32, d int32, e int32, f int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_7(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_8(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32, h int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_wrapper(a int32, b int32, c int32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_syscall_test_handle_create(return_value Status, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_system_get_dcache_line_size() uint32
+
+//go:noescape
+//go:nosplit
+func Sys_system_get_num_cpus() uint32
+
+//go:noescape
+//go:nosplit
+func Sys_system_get_version_string() unsafe.Pointer
+
+//go:noescape
+//go:nosplit
+func Sys_system_get_physmem() uint64
+
+//go:noescape
+//go:nosplit
+func Sys_system_get_features(kind uint32, features *uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_system_get_event(root_job Handle, kind uint32, event *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_system_mexec(resource Handle, kernel_vmo Handle, bootimage_vmo Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_system_mexec_payload_get(resource Handle, buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_system_powerctl(resource Handle, cmd uint32, arg *int) Status
+
+//go:noescape
+//go:nosplit
+func Sys_task_suspend(handle Handle, token *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_task_suspend_token(handle Handle, token *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_task_create_exception_channel(handle Handle, options uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_task_kill(handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_thread_exit()
+
+//go:noescape
+//go:nosplit
+func Sys_thread_create(process Handle, name *uint8, name_size uint, options uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_thread_start(handle Handle, thread_entry Vaddr, stack Vaddr, arg1 uintptr, arg2 uintptr) Status
+
+//go:noescape
+//go:nosplit
+func Sys_thread_read_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_thread_write_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_timer_create(options uint32, clock_id uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_timer_set(handle Handle, deadline Time, slack Duration) Status
+
+//go:noescape
+//go:nosplit
+func Sys_timer_cancel(handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vcpu_create(guest Handle, options uint32, entry Vaddr, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vcpu_resume(handle Handle, packet *int) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vcpu_interrupt(handle Handle, vector uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vcpu_read_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vcpu_write_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmar_allocate(parent_vmar Handle, options VMFlag, offset uint, size uint, child_vmar *Handle, child_addr *Vaddr) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmar_destroy(handle Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmar_map(handle Handle, options VMFlag, vmar_offset uint, vmo Handle, vmo_offset uint64, len uint, mapped_addr *Vaddr) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmar_unmap(handle Handle, addr Vaddr, len uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmar_protect(handle Handle, options VMFlag, addr Vaddr, len uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmar_op_range(handle Handle, op uint32, address Vaddr, size uint, buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_create(size uint64, options uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_read(handle Handle, buffer unsafe.Pointer, offset uint64, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_write(handle Handle, buffer unsafe.Pointer, offset uint64, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_get_size(handle Handle, size *uint64) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_set_size(handle Handle, size uint64) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_op_range(handle Handle, op uint32, offset uint64, size uint64, buffer unsafe.Pointer, buffer_size uint) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_create_child(handle Handle, options uint32, offset uint64, size uint64, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_set_cache_policy(handle Handle, cache_policy uint32) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_replace_as_executable(handle Handle, vmex Handle, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_create_contiguous(bti Handle, size uint, alignment_log2 uint32, out *Handle) Status
+
+//go:noescape
+//go:nosplit
+func Sys_vmo_create_physical(resource Handle, paddr Paddr, size uint, out *Handle) Status
diff --git a/src/syscall/zx/syscalls_fuchsia_amd64.s b/src/syscall/zx/syscalls_fuchsia_amd64.s
new file mode 100644
index 0000000..075a372
--- /dev/null
+++ b/src/syscall/zx/syscalls_fuchsia_amd64.s
@@ -0,0 +1,744 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// WARNING: THIS FILE IS MACHINE GENERATED BY //tools/kazoo. DO NOT EDIT.
+
+#include "textflag.h"
+
+// func Sys_bti_create(iommu Handle, options uint32, bti_id uint64, out *Handle) Status
+TEXT ·Sys_bti_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_bti_create(SB)
+
+// func Sys_bti_pin(handle Handle, options uint32, vmo Handle, offset uint64, size uint64, addrs *Paddr, num_addrs uint, pmt *Handle) Status
+TEXT ·Sys_bti_pin(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_bti_pin(SB)
+
+// func Sys_bti_release_quarantine(handle Handle) Status
+TEXT ·Sys_bti_release_quarantine(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_bti_release_quarantine(SB)
+
+// func Sys_cache_flush(addr unsafe.Pointer, size uint, options uint32) Status
+TEXT ·Sys_cache_flush(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_cache_flush(SB)
+
+// func Sys_channel_create(options uint32, out0 *Handle, out1 *Handle) Status
+TEXT ·Sys_channel_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_create(SB)
+
+// func Sys_channel_read(handle Handle, options uint32, bytes unsafe.Pointer, handles *Handle, num_bytes uint32, num_handles uint32, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_read(SB)
+
+// func Sys_channel_read_etc(handle Handle, options uint32, bytes unsafe.Pointer, handles *HandleInfo, num_bytes uint32, num_handles uint32, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_read_etc(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_read_etc(SB)
+
+// func Sys_channel_write(handle Handle, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles *Handle, num_handles uint32) Status
+TEXT ·Sys_channel_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_write(SB)
+
+// func Sys_channel_write_etc(handle Handle, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles *HandleDisposition, num_handles uint32) Status
+TEXT ·Sys_channel_write_etc(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_write_etc(SB)
+
+// func Sys_channel_call_noretry(handle Handle, options uint32, deadline Time, args *ChannelCallArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_noretry(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_noretry(SB)
+
+// func Sys_channel_call_finish(deadline Time, args *ChannelCallArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_finish(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_finish(SB)
+
+// func Sys_channel_call(handle Handle, options uint32, deadline Time, args *ChannelCallArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call(SB)
+
+// func Sys_channel_call_etc_noretry(handle Handle, options uint32, deadline Time, args *ChannelCallEtcArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_etc_noretry(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_etc_noretry(SB)
+
+// func Sys_channel_call_etc_finish(deadline Time, args *ChannelCallEtcArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_etc_finish(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_etc_finish(SB)
+
+// func Sys_channel_call_etc(handle Handle, options uint32, deadline Time, args *ChannelCallEtcArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_etc(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_etc(SB)
+
+// func Sys_clock_get(clock_id uint32, out *Time) Status
+TEXT ·Sys_clock_get(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_get(SB)
+
+// func Sys_clock_get_monotonic() Time
+TEXT ·Sys_clock_get_monotonic(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_get_monotonic(SB)
+
+// func Sys_clock_adjust(handle Handle, clock_id uint32, offset int64) Status
+TEXT ·Sys_clock_adjust(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_adjust(SB)
+
+// func Sys_clock_get_monotonic_via_kernel() Time
+TEXT ·Sys_clock_get_monotonic_via_kernel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_get_monotonic_via_kernel(SB)
+
+// func Sys_clock_create(options uint64, args unsafe.Pointer, out *Handle) Status
+TEXT ·Sys_clock_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_create(SB)
+
+// func Sys_clock_read(handle Handle, now *Time) Status
+TEXT ·Sys_clock_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_read(SB)
+
+// func Sys_clock_get_details(handle Handle, options uint64, details unsafe.Pointer) Status
+TEXT ·Sys_clock_get_details(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_get_details(SB)
+
+// func Sys_clock_update(handle Handle, options uint64, args unsafe.Pointer) Status
+TEXT ·Sys_clock_update(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_update(SB)
+
+// func Sys_cprng_draw_once(buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_cprng_draw_once(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_cprng_draw_once(SB)
+
+// func Sys_cprng_draw(buffer unsafe.Pointer, buffer_size uint)
+TEXT ·Sys_cprng_draw(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_cprng_draw(SB)
+
+// func Sys_cprng_add_entropy(buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_cprng_add_entropy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_cprng_add_entropy(SB)
+
+// func Sys_debug_read(handle Handle, buffer *uint8, buffer_size uint, actual *uint) Status
+TEXT ·Sys_debug_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debug_read(SB)
+
+// func Sys_debug_write(buffer *uint8, buffer_size uint) Status
+TEXT ·Sys_debug_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debug_write(SB)
+
+// func Sys_debug_send_command(resource Handle, buffer *uint8, buffer_size uint) Status
+TEXT ·Sys_debug_send_command(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debug_send_command(SB)
+
+// func Sys_debuglog_create(resource Handle, options uint32, out *Handle) Status
+TEXT ·Sys_debuglog_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debuglog_create(SB)
+
+// func Sys_debuglog_write(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_debuglog_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debuglog_write(SB)
+
+// func Sys_debuglog_read(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_debuglog_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debuglog_read(SB)
+
+// func Sys_event_create(options uint32, out *Handle) Status
+TEXT ·Sys_event_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_event_create(SB)
+
+// func Sys_eventpair_create(options uint32, out0 *Handle, out1 *Handle) Status
+TEXT ·Sys_eventpair_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_eventpair_create(SB)
+
+// func Sys_exception_get_thread(handle Handle, out *Handle) Status
+TEXT ·Sys_exception_get_thread(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_exception_get_thread(SB)
+
+// func Sys_exception_get_process(handle Handle, out *Handle) Status
+TEXT ·Sys_exception_get_process(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_exception_get_process(SB)
+
+// func Sys_fifo_create(elem_count uint, elem_size uint, options uint32, out0 *Handle, out1 *Handle) Status
+TEXT ·Sys_fifo_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_fifo_create(SB)
+
+// func Sys_fifo_read(handle Handle, elem_size uint, data unsafe.Pointer, data_size uint, actual_count *uint) Status
+TEXT ·Sys_fifo_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_fifo_read(SB)
+
+// func Sys_fifo_write(handle Handle, elem_size uint, data unsafe.Pointer, count uint, actual_count *uint) Status
+TEXT ·Sys_fifo_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_fifo_write(SB)
+
+// func Sys_framebuffer_get_info(resource Handle, format *uint32, width *uint32, height *uint32, stride *uint32) Status
+TEXT ·Sys_framebuffer_get_info(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_framebuffer_get_info(SB)
+
+// func Sys_framebuffer_set_range(resource Handle, vmo Handle, len uint32, format uint32, width uint32, height uint32, stride uint32) Status
+TEXT ·Sys_framebuffer_set_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_framebuffer_set_range(SB)
+
+// func Sys_futex_wait(value_ptr *int32, current_value int32, new_futex_owner Handle, deadline Time) Status
+TEXT ·Sys_futex_wait(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_wait(SB)
+
+// func Sys_futex_wake(value_ptr *int32, wake_count uint32) Status
+TEXT ·Sys_futex_wake(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_wake(SB)
+
+// func Sys_futex_requeue(value_ptr *int32, wake_count uint32, current_value int32, requeue_ptr *int32, requeue_count uint32, new_requeue_owner Handle) Status
+TEXT ·Sys_futex_requeue(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_requeue(SB)
+
+// func Sys_futex_wake_single_owner(value_ptr *int32) Status
+TEXT ·Sys_futex_wake_single_owner(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_wake_single_owner(SB)
+
+// func Sys_futex_requeue_single_owner(value_ptr *int32, current_value int32, requeue_ptr *int32, requeue_count uint32, new_requeue_owner Handle) Status
+TEXT ·Sys_futex_requeue_single_owner(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_requeue_single_owner(SB)
+
+// func Sys_futex_get_owner(value_ptr *int32, koid *uint64) Status
+TEXT ·Sys_futex_get_owner(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_get_owner(SB)
+
+// func Sys_guest_create(resource Handle, options uint32, guest_handle *Handle, vmar_handle *Handle) Status
+TEXT ·Sys_guest_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_guest_create(SB)
+
+// func Sys_guest_set_trap(handle Handle, kind uint32, addr Vaddr, size uint, port_handle Handle, key uint64) Status
+TEXT ·Sys_guest_set_trap(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_guest_set_trap(SB)
+
+// func Sys_handle_close(handle Handle) Status
+TEXT ·Sys_handle_close(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_handle_close(SB)
+
+// func Sys_handle_close_many(handles *Handle, num_handles uint) Status
+TEXT ·Sys_handle_close_many(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_handle_close_many(SB)
+
+// func Sys_handle_duplicate(handle Handle, rights Rights, out *Handle) Status
+TEXT ·Sys_handle_duplicate(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_handle_duplicate(SB)
+
+// func Sys_handle_replace(handle Handle, rights Rights, out *Handle) Status
+TEXT ·Sys_handle_replace(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_handle_replace(SB)
+
+// func Sys_interrupt_create(src_obj Handle, src_num uint32, options uint32, out_handle *Handle) Status
+TEXT ·Sys_interrupt_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_create(SB)
+
+// func Sys_interrupt_bind(handle Handle, port_handle Handle, key uint64, options uint32) Status
+TEXT ·Sys_interrupt_bind(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_bind(SB)
+
+// func Sys_interrupt_wait(handle Handle, out_timestamp *Time) Status
+TEXT ·Sys_interrupt_wait(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_wait(SB)
+
+// func Sys_interrupt_destroy(handle Handle) Status
+TEXT ·Sys_interrupt_destroy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_destroy(SB)
+
+// func Sys_interrupt_ack(handle Handle) Status
+TEXT ·Sys_interrupt_ack(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_ack(SB)
+
+// func Sys_interrupt_trigger(handle Handle, options uint32, timestamp Time) Status
+TEXT ·Sys_interrupt_trigger(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_trigger(SB)
+
+// func Sys_interrupt_bind_vcpu(handle Handle, vcpu Handle, options uint32) Status
+TEXT ·Sys_interrupt_bind_vcpu(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_bind_vcpu(SB)
+
+// func Sys_iommu_create(resource Handle, typ uint32, desc unsafe.Pointer, desc_size uint, out *Handle) Status
+TEXT ·Sys_iommu_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_iommu_create(SB)
+
+// func Sys_ioports_request(resource Handle, io_addr uint16, len uint32) Status
+TEXT ·Sys_ioports_request(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ioports_request(SB)
+
+// func Sys_ioports_release(resource Handle, io_addr uint16, len uint32) Status
+TEXT ·Sys_ioports_release(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ioports_release(SB)
+
+// func Sys_job_create(parent_job Handle, options uint32, out *Handle) Status
+TEXT ·Sys_job_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_job_create(SB)
+
+// func Sys_job_set_policy(handle Handle, options uint32, topic uint32, policy unsafe.Pointer, policy_size uint32) Status
+TEXT ·Sys_job_set_policy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_job_set_policy(SB)
+
+// func Sys_job_set_critical(job Handle, options uint32, process Handle) Status
+TEXT ·Sys_job_set_critical(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_job_set_critical(SB)
+
+// func Sys_ktrace_read(handle Handle, data unsafe.Pointer, offset uint32, data_size uint, actual *uint) Status
+TEXT ·Sys_ktrace_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ktrace_read(SB)
+
+// func Sys_ktrace_control(handle Handle, action uint32, options uint32, ptr unsafe.Pointer) Status
+TEXT ·Sys_ktrace_control(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ktrace_control(SB)
+
+// func Sys_ktrace_write(handle Handle, id uint32, arg0 uint32, arg1 uint32) Status
+TEXT ·Sys_ktrace_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ktrace_write(SB)
+
+// func Sys_nanosleep(deadline Time) Status
+TEXT ·Sys_nanosleep(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_nanosleep(SB)
+
+// func Sys_ticks_get() int64
+TEXT ·Sys_ticks_get(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ticks_get(SB)
+
+// func Sys_ticks_per_second() int64
+TEXT ·Sys_ticks_per_second(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ticks_per_second(SB)
+
+// func Sys_deadline_after(nanoseconds Duration) Time
+TEXT ·Sys_deadline_after(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_deadline_after(SB)
+
+// func Sys_vmar_unmap_handle_close_thread_exit(vmar_handle Handle, addr Vaddr, size uint, close_handle Handle) Status
+TEXT ·Sys_vmar_unmap_handle_close_thread_exit(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_unmap_handle_close_thread_exit(SB)
+
+// func Sys_futex_wake_handle_close_thread_exit(value_ptr *int32, wake_count uint32, new_value int32, close_handle Handle)
+TEXT ·Sys_futex_wake_handle_close_thread_exit(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_wake_handle_close_thread_exit(SB)
+
+// func Sys_ticks_get_via_kernel() int64
+TEXT ·Sys_ticks_get_via_kernel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ticks_get_via_kernel(SB)
+
+// func Sys_msi_allocate(handle Handle, count uint32, out_allocation *Handle) Status
+TEXT ·Sys_msi_allocate(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_msi_allocate(SB)
+
+// func Sys_msi_create(handle Handle, options uint32, msi_id uint32, vmo Handle, vmo_offset uint, out_interrupt *Handle) Status
+TEXT ·Sys_msi_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_msi_create(SB)
+
+// func Sys_mtrace_control(handle Handle, kind uint32, action uint32, options uint32, ptr unsafe.Pointer, ptr_size uint) Status
+TEXT ·Sys_mtrace_control(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_mtrace_control(SB)
+
+// func Sys_object_wait_one(handle Handle, signals Signals, deadline Time, observed *Signals) Status
+TEXT ·Sys_object_wait_one(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_wait_one(SB)
+
+// func Sys_object_wait_many(items *WaitItem, num_items uint, deadline Time) Status
+TEXT ·Sys_object_wait_many(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_wait_many(SB)
+
+// func Sys_object_wait_async(handle Handle, port Handle, key uint64, signals Signals, options uint32) Status
+TEXT ·Sys_object_wait_async(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_wait_async(SB)
+
+// func Sys_object_signal(handle Handle, clear_mask uint32, set_mask uint32) Status
+TEXT ·Sys_object_signal(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_signal(SB)
+
+// func Sys_object_signal_peer(handle Handle, clear_mask uint32, set_mask uint32) Status
+TEXT ·Sys_object_signal_peer(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_signal_peer(SB)
+
+// func Sys_object_get_property(handle Handle, property uint32, value unsafe.Pointer, value_size uint) Status
+TEXT ·Sys_object_get_property(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_get_property(SB)
+
+// func Sys_object_set_property(handle Handle, property uint32, value unsafe.Pointer, value_size uint) Status
+TEXT ·Sys_object_set_property(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_set_property(SB)
+
+// func Sys_object_get_info(handle Handle, topic uint32, buffer unsafe.Pointer, buffer_size uint, actual *uint, avail *uint) Status
+TEXT ·Sys_object_get_info(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_get_info(SB)
+
+// func Sys_object_get_child(handle Handle, koid uint64, rights Rights, out *Handle) Status
+TEXT ·Sys_object_get_child(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_get_child(SB)
+
+// func Sys_object_set_profile(handle Handle, profile Handle, options uint32) Status
+TEXT ·Sys_object_set_profile(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_set_profile(SB)
+
+// func Sys_pager_create(options uint32, out *Handle) Status
+TEXT ·Sys_pager_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_create(SB)
+
+// func Sys_pager_create_vmo(pager Handle, options uint32, port Handle, key uint64, size uint64, out *Handle) Status
+TEXT ·Sys_pager_create_vmo(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_create_vmo(SB)
+
+// func Sys_pager_detach_vmo(pager Handle, vmo Handle) Status
+TEXT ·Sys_pager_detach_vmo(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_detach_vmo(SB)
+
+// func Sys_pager_supply_pages(pager Handle, pager_vmo Handle, offset uint64, length uint64, aux_vmo Handle, aux_offset uint64) Status
+TEXT ·Sys_pager_supply_pages(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_supply_pages(SB)
+
+// func Sys_pager_op_range(pager Handle, op uint32, pager_vmo Handle, offset uint64, length uint64, data uint64) Status
+TEXT ·Sys_pager_op_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_op_range(SB)
+
+// func Sys_pc_firmware_tables(handle Handle, acpi_rsdp *Paddr, smbios *Paddr) Status
+TEXT ·Sys_pc_firmware_tables(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pc_firmware_tables(SB)
+
+// func Sys_pci_get_nth_device(handle Handle, index uint32, out_info *uintptr, out_handle *Handle) Status
+TEXT ·Sys_pci_get_nth_device(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_get_nth_device(SB)
+
+// func Sys_pci_enable_bus_master(handle Handle, enable uint32) Status
+TEXT ·Sys_pci_enable_bus_master(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_enable_bus_master(SB)
+
+// func Sys_pci_reset_device(handle Handle) Status
+TEXT ·Sys_pci_reset_device(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_reset_device(SB)
+
+// func Sys_pci_config_read(handle Handle, offset uint16, width uint, out_val *uint32) Status
+TEXT ·Sys_pci_config_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_config_read(SB)
+
+// func Sys_pci_config_write(handle Handle, offset uint16, width uint, val uint32) Status
+TEXT ·Sys_pci_config_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_config_write(SB)
+
+// func Sys_pci_cfg_pio_rw(handle Handle, bus uint8, dev uint8, funk uint8, offset uint8, val *uint32, width uint, write uint32) Status
+TEXT ·Sys_pci_cfg_pio_rw(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_cfg_pio_rw(SB)
+
+// func Sys_pci_get_bar(handle Handle, bar_num uint32, out_bar *uintptr, out_handle *Handle) Status
+TEXT ·Sys_pci_get_bar(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_get_bar(SB)
+
+// func Sys_pci_map_interrupt(handle Handle, which_irq int32, out_handle *Handle) Status
+TEXT ·Sys_pci_map_interrupt(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_map_interrupt(SB)
+
+// func Sys_pci_query_irq_mode(handle Handle, mode uint32, out_max_irqs *uint32) Status
+TEXT ·Sys_pci_query_irq_mode(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_query_irq_mode(SB)
+
+// func Sys_pci_set_irq_mode(handle Handle, mode uint32, requested_irq_count uint32) Status
+TEXT ·Sys_pci_set_irq_mode(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_set_irq_mode(SB)
+
+// func Sys_pci_init(handle Handle, init_buf *uintptr, len uint32) Status
+TEXT ·Sys_pci_init(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_init(SB)
+
+// func Sys_pci_add_subtract_io_range(handle Handle, mmio uint32, base uint64, len uint64, add uint32) Status
+TEXT ·Sys_pci_add_subtract_io_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_add_subtract_io_range(SB)
+
+// func Sys_pmt_unpin(handle Handle) Status
+TEXT ·Sys_pmt_unpin(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pmt_unpin(SB)
+
+// func Sys_port_create(options uint32, out *Handle) Status
+TEXT ·Sys_port_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_port_create(SB)
+
+// func Sys_port_queue(handle Handle, packet *int) Status
+TEXT ·Sys_port_queue(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_port_queue(SB)
+
+// func Sys_port_wait(handle Handle, deadline Time, packet *int) Status
+TEXT ·Sys_port_wait(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_port_wait(SB)
+
+// func Sys_port_cancel(handle Handle, source Handle, key uint64) Status
+TEXT ·Sys_port_cancel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_port_cancel(SB)
+
+// func Sys_process_exit(retcode int64)
+TEXT ·Sys_process_exit(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_exit(SB)
+
+// func Sys_process_create(job Handle, name *uint8, name_size uint, options uint32, proc_handle *Handle, vmar_handle *Handle) Status
+TEXT ·Sys_process_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_create(SB)
+
+// func Sys_process_start(handle Handle, thread Handle, entry Vaddr, stack Vaddr, arg1 Handle, arg2 uintptr) Status
+TEXT ·Sys_process_start(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_start(SB)
+
+// func Sys_process_read_memory(handle Handle, vaddr Vaddr, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+TEXT ·Sys_process_read_memory(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_read_memory(SB)
+
+// func Sys_process_write_memory(handle Handle, vaddr Vaddr, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+TEXT ·Sys_process_write_memory(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_write_memory(SB)
+
+// func Sys_profile_create(root_job Handle, options uint32, profile *int, out *Handle) Status
+TEXT ·Sys_profile_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_profile_create(SB)
+
+// func Sys_resource_create(parent_rsrc Handle, options uint32, base uint64, size uint, name *uint8, name_size uint, resource_out *Handle) Status
+TEXT ·Sys_resource_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_resource_create(SB)
+
+// func Sys_smc_call(handle Handle, parameters *SMCParameters, out_smc_result *SMCResult) Status
+TEXT ·Sys_smc_call(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_smc_call(SB)
+
+// func Sys_socket_create(options uint32, out0 *Handle, out1 *Handle) Status
+TEXT ·Sys_socket_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_socket_create(SB)
+
+// func Sys_socket_write(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+TEXT ·Sys_socket_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_socket_write(SB)
+
+// func Sys_socket_read(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+TEXT ·Sys_socket_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_socket_read(SB)
+
+// func Sys_socket_shutdown(handle Handle, options uint32) Status
+TEXT ·Sys_socket_shutdown(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_socket_shutdown(SB)
+
+// func Sys_stream_create(options uint32, vmo Handle, seek uint64, out_stream *Handle) Status
+TEXT ·Sys_stream_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_create(SB)
+
+// func Sys_stream_writev(handle Handle, options uint32, vector *uintptr, num_vector uint, actual *uint) Status
+TEXT ·Sys_stream_writev(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_writev(SB)
+
+// func Sys_stream_writev_at(handle Handle, options uint32, offset uint64, vector *uintptr, num_vector uint, actual *uint) Status
+TEXT ·Sys_stream_writev_at(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_writev_at(SB)
+
+// func Sys_stream_readv(handle Handle, options uint32, vector *uintptr, num_vector uint, actual *uint) Status
+TEXT ·Sys_stream_readv(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_readv(SB)
+
+// func Sys_stream_readv_at(handle Handle, options uint32, offset uint64, vector *uintptr, num_vector uint, actual *uint) Status
+TEXT ·Sys_stream_readv_at(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_readv_at(SB)
+
+// func Sys_stream_seek(handle Handle, whence uint32, offset int64, out_seek *uint64) Status
+TEXT ·Sys_stream_seek(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_seek(SB)
+
+// func Sys_syscall_test_0() Status
+TEXT ·Sys_syscall_test_0(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_0(SB)
+
+// func Sys_syscall_test_1(a int32) Status
+TEXT ·Sys_syscall_test_1(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_1(SB)
+
+// func Sys_syscall_test_2(a int32, b int32) Status
+TEXT ·Sys_syscall_test_2(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_2(SB)
+
+// func Sys_syscall_test_3(a int32, b int32, c int32) Status
+TEXT ·Sys_syscall_test_3(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_3(SB)
+
+// func Sys_syscall_test_4(a int32, b int32, c int32, d int32) Status
+TEXT ·Sys_syscall_test_4(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_4(SB)
+
+// func Sys_syscall_test_5(a int32, b int32, c int32, d int32, e int32) Status
+TEXT ·Sys_syscall_test_5(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_5(SB)
+
+// func Sys_syscall_test_6(a int32, b int32, c int32, d int32, e int32, f int32) Status
+TEXT ·Sys_syscall_test_6(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_6(SB)
+
+// func Sys_syscall_test_7(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32) Status
+TEXT ·Sys_syscall_test_7(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_7(SB)
+
+// func Sys_syscall_test_8(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32, h int32) Status
+TEXT ·Sys_syscall_test_8(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_8(SB)
+
+// func Sys_syscall_test_wrapper(a int32, b int32, c int32) Status
+TEXT ·Sys_syscall_test_wrapper(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_wrapper(SB)
+
+// func Sys_syscall_test_handle_create(return_value Status, out *Handle) Status
+TEXT ·Sys_syscall_test_handle_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_handle_create(SB)
+
+// func Sys_system_get_dcache_line_size() uint32
+TEXT ·Sys_system_get_dcache_line_size(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_dcache_line_size(SB)
+
+// func Sys_system_get_num_cpus() uint32
+TEXT ·Sys_system_get_num_cpus(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_num_cpus(SB)
+
+// func Sys_system_get_version_string() unsafe.Pointer
+TEXT ·Sys_system_get_version_string(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_version_string(SB)
+
+// func Sys_system_get_physmem() uint64
+TEXT ·Sys_system_get_physmem(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_physmem(SB)
+
+// func Sys_system_get_features(kind uint32, features *uint32) Status
+TEXT ·Sys_system_get_features(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_features(SB)
+
+// func Sys_system_get_event(root_job Handle, kind uint32, event *Handle) Status
+TEXT ·Sys_system_get_event(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_event(SB)
+
+// func Sys_system_mexec(resource Handle, kernel_vmo Handle, bootimage_vmo Handle) Status
+TEXT ·Sys_system_mexec(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_mexec(SB)
+
+// func Sys_system_mexec_payload_get(resource Handle, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_system_mexec_payload_get(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_mexec_payload_get(SB)
+
+// func Sys_system_powerctl(resource Handle, cmd uint32, arg *int) Status
+TEXT ·Sys_system_powerctl(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_powerctl(SB)
+
+// func Sys_task_suspend(handle Handle, token *Handle) Status
+TEXT ·Sys_task_suspend(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_task_suspend(SB)
+
+// func Sys_task_suspend_token(handle Handle, token *Handle) Status
+TEXT ·Sys_task_suspend_token(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_task_suspend_token(SB)
+
+// func Sys_task_create_exception_channel(handle Handle, options uint32, out *Handle) Status
+TEXT ·Sys_task_create_exception_channel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_task_create_exception_channel(SB)
+
+// func Sys_task_kill(handle Handle) Status
+TEXT ·Sys_task_kill(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_task_kill(SB)
+
+// func Sys_thread_exit()
+TEXT ·Sys_thread_exit(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_exit(SB)
+
+// func Sys_thread_create(process Handle, name *uint8, name_size uint, options uint32, out *Handle) Status
+TEXT ·Sys_thread_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_create(SB)
+
+// func Sys_thread_start(handle Handle, thread_entry Vaddr, stack Vaddr, arg1 uintptr, arg2 uintptr) Status
+TEXT ·Sys_thread_start(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_start(SB)
+
+// func Sys_thread_read_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_thread_read_state(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_read_state(SB)
+
+// func Sys_thread_write_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_thread_write_state(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_write_state(SB)
+
+// func Sys_timer_create(options uint32, clock_id uint32, out *Handle) Status
+TEXT ·Sys_timer_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_timer_create(SB)
+
+// func Sys_timer_set(handle Handle, deadline Time, slack Duration) Status
+TEXT ·Sys_timer_set(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_timer_set(SB)
+
+// func Sys_timer_cancel(handle Handle) Status
+TEXT ·Sys_timer_cancel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_timer_cancel(SB)
+
+// func Sys_vcpu_create(guest Handle, options uint32, entry Vaddr, out *Handle) Status
+TEXT ·Sys_vcpu_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_create(SB)
+
+// func Sys_vcpu_resume(handle Handle, packet *int) Status
+TEXT ·Sys_vcpu_resume(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_resume(SB)
+
+// func Sys_vcpu_interrupt(handle Handle, vector uint32) Status
+TEXT ·Sys_vcpu_interrupt(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_interrupt(SB)
+
+// func Sys_vcpu_read_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_vcpu_read_state(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_read_state(SB)
+
+// func Sys_vcpu_write_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_vcpu_write_state(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_write_state(SB)
+
+// func Sys_vmar_allocate(parent_vmar Handle, options VMFlag, offset uint, size uint, child_vmar *Handle, child_addr *Vaddr) Status
+TEXT ·Sys_vmar_allocate(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_allocate(SB)
+
+// func Sys_vmar_destroy(handle Handle) Status
+TEXT ·Sys_vmar_destroy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_destroy(SB)
+
+// func Sys_vmar_map(handle Handle, options VMFlag, vmar_offset uint, vmo Handle, vmo_offset uint64, len uint, mapped_addr *Vaddr) Status
+TEXT ·Sys_vmar_map(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_map(SB)
+
+// func Sys_vmar_unmap(handle Handle, addr Vaddr, len uint) Status
+TEXT ·Sys_vmar_unmap(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_unmap(SB)
+
+// func Sys_vmar_protect(handle Handle, options VMFlag, addr Vaddr, len uint) Status
+TEXT ·Sys_vmar_protect(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_protect(SB)
+
+// func Sys_vmar_op_range(handle Handle, op uint32, address Vaddr, size uint, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_vmar_op_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_op_range(SB)
+
+// func Sys_vmo_create(size uint64, options uint32, out *Handle) Status
+TEXT ·Sys_vmo_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_create(SB)
+
+// func Sys_vmo_read(handle Handle, buffer unsafe.Pointer, offset uint64, buffer_size uint) Status
+TEXT ·Sys_vmo_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_read(SB)
+
+// func Sys_vmo_write(handle Handle, buffer unsafe.Pointer, offset uint64, buffer_size uint) Status
+TEXT ·Sys_vmo_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_write(SB)
+
+// func Sys_vmo_get_size(handle Handle, size *uint64) Status
+TEXT ·Sys_vmo_get_size(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_get_size(SB)
+
+// func Sys_vmo_set_size(handle Handle, size uint64) Status
+TEXT ·Sys_vmo_set_size(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_set_size(SB)
+
+// func Sys_vmo_op_range(handle Handle, op uint32, offset uint64, size uint64, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_vmo_op_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_op_range(SB)
+
+// func Sys_vmo_create_child(handle Handle, options uint32, offset uint64, size uint64, out *Handle) Status
+TEXT ·Sys_vmo_create_child(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_create_child(SB)
+
+// func Sys_vmo_set_cache_policy(handle Handle, cache_policy uint32) Status
+TEXT ·Sys_vmo_set_cache_policy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_set_cache_policy(SB)
+
+// func Sys_vmo_replace_as_executable(handle Handle, vmex Handle, out *Handle) Status
+TEXT ·Sys_vmo_replace_as_executable(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_replace_as_executable(SB)
+
+// func Sys_vmo_create_contiguous(bti Handle, size uint, alignment_log2 uint32, out *Handle) Status
+TEXT ·Sys_vmo_create_contiguous(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_create_contiguous(SB)
+
+// func Sys_vmo_create_physical(resource Handle, paddr Paddr, size uint, out *Handle) Status
+TEXT ·Sys_vmo_create_physical(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_create_physical(SB)
+
diff --git a/src/syscall/zx/syscalls_fuchsia_arm64.s b/src/syscall/zx/syscalls_fuchsia_arm64.s
new file mode 100644
index 0000000..075a372
--- /dev/null
+++ b/src/syscall/zx/syscalls_fuchsia_arm64.s
@@ -0,0 +1,744 @@
+// Copyright 2019 The Fuchsia Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// WARNING: THIS FILE IS MACHINE GENERATED BY //tools/kazoo. DO NOT EDIT.
+
+#include "textflag.h"
+
+// func Sys_bti_create(iommu Handle, options uint32, bti_id uint64, out *Handle) Status
+TEXT ·Sys_bti_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_bti_create(SB)
+
+// func Sys_bti_pin(handle Handle, options uint32, vmo Handle, offset uint64, size uint64, addrs *Paddr, num_addrs uint, pmt *Handle) Status
+TEXT ·Sys_bti_pin(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_bti_pin(SB)
+
+// func Sys_bti_release_quarantine(handle Handle) Status
+TEXT ·Sys_bti_release_quarantine(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_bti_release_quarantine(SB)
+
+// func Sys_cache_flush(addr unsafe.Pointer, size uint, options uint32) Status
+TEXT ·Sys_cache_flush(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_cache_flush(SB)
+
+// func Sys_channel_create(options uint32, out0 *Handle, out1 *Handle) Status
+TEXT ·Sys_channel_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_create(SB)
+
+// func Sys_channel_read(handle Handle, options uint32, bytes unsafe.Pointer, handles *Handle, num_bytes uint32, num_handles uint32, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_read(SB)
+
+// func Sys_channel_read_etc(handle Handle, options uint32, bytes unsafe.Pointer, handles *HandleInfo, num_bytes uint32, num_handles uint32, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_read_etc(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_read_etc(SB)
+
+// func Sys_channel_write(handle Handle, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles *Handle, num_handles uint32) Status
+TEXT ·Sys_channel_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_write(SB)
+
+// func Sys_channel_write_etc(handle Handle, options uint32, bytes unsafe.Pointer, num_bytes uint32, handles *HandleDisposition, num_handles uint32) Status
+TEXT ·Sys_channel_write_etc(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_write_etc(SB)
+
+// func Sys_channel_call_noretry(handle Handle, options uint32, deadline Time, args *ChannelCallArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_noretry(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_noretry(SB)
+
+// func Sys_channel_call_finish(deadline Time, args *ChannelCallArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_finish(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_finish(SB)
+
+// func Sys_channel_call(handle Handle, options uint32, deadline Time, args *ChannelCallArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call(SB)
+
+// func Sys_channel_call_etc_noretry(handle Handle, options uint32, deadline Time, args *ChannelCallEtcArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_etc_noretry(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_etc_noretry(SB)
+
+// func Sys_channel_call_etc_finish(deadline Time, args *ChannelCallEtcArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_etc_finish(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_etc_finish(SB)
+
+// func Sys_channel_call_etc(handle Handle, options uint32, deadline Time, args *ChannelCallEtcArgs, actual_bytes *uint32, actual_handles *uint32) Status
+TEXT ·Sys_channel_call_etc(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_channel_call_etc(SB)
+
+// func Sys_clock_get(clock_id uint32, out *Time) Status
+TEXT ·Sys_clock_get(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_get(SB)
+
+// func Sys_clock_get_monotonic() Time
+TEXT ·Sys_clock_get_monotonic(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_get_monotonic(SB)
+
+// func Sys_clock_adjust(handle Handle, clock_id uint32, offset int64) Status
+TEXT ·Sys_clock_adjust(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_adjust(SB)
+
+// func Sys_clock_get_monotonic_via_kernel() Time
+TEXT ·Sys_clock_get_monotonic_via_kernel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_get_monotonic_via_kernel(SB)
+
+// func Sys_clock_create(options uint64, args unsafe.Pointer, out *Handle) Status
+TEXT ·Sys_clock_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_create(SB)
+
+// func Sys_clock_read(handle Handle, now *Time) Status
+TEXT ·Sys_clock_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_read(SB)
+
+// func Sys_clock_get_details(handle Handle, options uint64, details unsafe.Pointer) Status
+TEXT ·Sys_clock_get_details(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_get_details(SB)
+
+// func Sys_clock_update(handle Handle, options uint64, args unsafe.Pointer) Status
+TEXT ·Sys_clock_update(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_clock_update(SB)
+
+// func Sys_cprng_draw_once(buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_cprng_draw_once(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_cprng_draw_once(SB)
+
+// func Sys_cprng_draw(buffer unsafe.Pointer, buffer_size uint)
+TEXT ·Sys_cprng_draw(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_cprng_draw(SB)
+
+// func Sys_cprng_add_entropy(buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_cprng_add_entropy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_cprng_add_entropy(SB)
+
+// func Sys_debug_read(handle Handle, buffer *uint8, buffer_size uint, actual *uint) Status
+TEXT ·Sys_debug_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debug_read(SB)
+
+// func Sys_debug_write(buffer *uint8, buffer_size uint) Status
+TEXT ·Sys_debug_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debug_write(SB)
+
+// func Sys_debug_send_command(resource Handle, buffer *uint8, buffer_size uint) Status
+TEXT ·Sys_debug_send_command(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debug_send_command(SB)
+
+// func Sys_debuglog_create(resource Handle, options uint32, out *Handle) Status
+TEXT ·Sys_debuglog_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debuglog_create(SB)
+
+// func Sys_debuglog_write(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_debuglog_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debuglog_write(SB)
+
+// func Sys_debuglog_read(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_debuglog_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_debuglog_read(SB)
+
+// func Sys_event_create(options uint32, out *Handle) Status
+TEXT ·Sys_event_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_event_create(SB)
+
+// func Sys_eventpair_create(options uint32, out0 *Handle, out1 *Handle) Status
+TEXT ·Sys_eventpair_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_eventpair_create(SB)
+
+// func Sys_exception_get_thread(handle Handle, out *Handle) Status
+TEXT ·Sys_exception_get_thread(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_exception_get_thread(SB)
+
+// func Sys_exception_get_process(handle Handle, out *Handle) Status
+TEXT ·Sys_exception_get_process(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_exception_get_process(SB)
+
+// func Sys_fifo_create(elem_count uint, elem_size uint, options uint32, out0 *Handle, out1 *Handle) Status
+TEXT ·Sys_fifo_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_fifo_create(SB)
+
+// func Sys_fifo_read(handle Handle, elem_size uint, data unsafe.Pointer, data_size uint, actual_count *uint) Status
+TEXT ·Sys_fifo_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_fifo_read(SB)
+
+// func Sys_fifo_write(handle Handle, elem_size uint, data unsafe.Pointer, count uint, actual_count *uint) Status
+TEXT ·Sys_fifo_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_fifo_write(SB)
+
+// func Sys_framebuffer_get_info(resource Handle, format *uint32, width *uint32, height *uint32, stride *uint32) Status
+TEXT ·Sys_framebuffer_get_info(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_framebuffer_get_info(SB)
+
+// func Sys_framebuffer_set_range(resource Handle, vmo Handle, len uint32, format uint32, width uint32, height uint32, stride uint32) Status
+TEXT ·Sys_framebuffer_set_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_framebuffer_set_range(SB)
+
+// func Sys_futex_wait(value_ptr *int32, current_value int32, new_futex_owner Handle, deadline Time) Status
+TEXT ·Sys_futex_wait(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_wait(SB)
+
+// func Sys_futex_wake(value_ptr *int32, wake_count uint32) Status
+TEXT ·Sys_futex_wake(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_wake(SB)
+
+// func Sys_futex_requeue(value_ptr *int32, wake_count uint32, current_value int32, requeue_ptr *int32, requeue_count uint32, new_requeue_owner Handle) Status
+TEXT ·Sys_futex_requeue(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_requeue(SB)
+
+// func Sys_futex_wake_single_owner(value_ptr *int32) Status
+TEXT ·Sys_futex_wake_single_owner(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_wake_single_owner(SB)
+
+// func Sys_futex_requeue_single_owner(value_ptr *int32, current_value int32, requeue_ptr *int32, requeue_count uint32, new_requeue_owner Handle) Status
+TEXT ·Sys_futex_requeue_single_owner(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_requeue_single_owner(SB)
+
+// func Sys_futex_get_owner(value_ptr *int32, koid *uint64) Status
+TEXT ·Sys_futex_get_owner(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_get_owner(SB)
+
+// func Sys_guest_create(resource Handle, options uint32, guest_handle *Handle, vmar_handle *Handle) Status
+TEXT ·Sys_guest_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_guest_create(SB)
+
+// func Sys_guest_set_trap(handle Handle, kind uint32, addr Vaddr, size uint, port_handle Handle, key uint64) Status
+TEXT ·Sys_guest_set_trap(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_guest_set_trap(SB)
+
+// func Sys_handle_close(handle Handle) Status
+TEXT ·Sys_handle_close(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_handle_close(SB)
+
+// func Sys_handle_close_many(handles *Handle, num_handles uint) Status
+TEXT ·Sys_handle_close_many(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_handle_close_many(SB)
+
+// func Sys_handle_duplicate(handle Handle, rights Rights, out *Handle) Status
+TEXT ·Sys_handle_duplicate(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_handle_duplicate(SB)
+
+// func Sys_handle_replace(handle Handle, rights Rights, out *Handle) Status
+TEXT ·Sys_handle_replace(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_handle_replace(SB)
+
+// func Sys_interrupt_create(src_obj Handle, src_num uint32, options uint32, out_handle *Handle) Status
+TEXT ·Sys_interrupt_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_create(SB)
+
+// func Sys_interrupt_bind(handle Handle, port_handle Handle, key uint64, options uint32) Status
+TEXT ·Sys_interrupt_bind(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_bind(SB)
+
+// func Sys_interrupt_wait(handle Handle, out_timestamp *Time) Status
+TEXT ·Sys_interrupt_wait(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_wait(SB)
+
+// func Sys_interrupt_destroy(handle Handle) Status
+TEXT ·Sys_interrupt_destroy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_destroy(SB)
+
+// func Sys_interrupt_ack(handle Handle) Status
+TEXT ·Sys_interrupt_ack(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_ack(SB)
+
+// func Sys_interrupt_trigger(handle Handle, options uint32, timestamp Time) Status
+TEXT ·Sys_interrupt_trigger(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_trigger(SB)
+
+// func Sys_interrupt_bind_vcpu(handle Handle, vcpu Handle, options uint32) Status
+TEXT ·Sys_interrupt_bind_vcpu(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_interrupt_bind_vcpu(SB)
+
+// func Sys_iommu_create(resource Handle, typ uint32, desc unsafe.Pointer, desc_size uint, out *Handle) Status
+TEXT ·Sys_iommu_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_iommu_create(SB)
+
+// func Sys_ioports_request(resource Handle, io_addr uint16, len uint32) Status
+TEXT ·Sys_ioports_request(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ioports_request(SB)
+
+// func Sys_ioports_release(resource Handle, io_addr uint16, len uint32) Status
+TEXT ·Sys_ioports_release(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ioports_release(SB)
+
+// func Sys_job_create(parent_job Handle, options uint32, out *Handle) Status
+TEXT ·Sys_job_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_job_create(SB)
+
+// func Sys_job_set_policy(handle Handle, options uint32, topic uint32, policy unsafe.Pointer, policy_size uint32) Status
+TEXT ·Sys_job_set_policy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_job_set_policy(SB)
+
+// func Sys_job_set_critical(job Handle, options uint32, process Handle) Status
+TEXT ·Sys_job_set_critical(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_job_set_critical(SB)
+
+// func Sys_ktrace_read(handle Handle, data unsafe.Pointer, offset uint32, data_size uint, actual *uint) Status
+TEXT ·Sys_ktrace_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ktrace_read(SB)
+
+// func Sys_ktrace_control(handle Handle, action uint32, options uint32, ptr unsafe.Pointer) Status
+TEXT ·Sys_ktrace_control(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ktrace_control(SB)
+
+// func Sys_ktrace_write(handle Handle, id uint32, arg0 uint32, arg1 uint32) Status
+TEXT ·Sys_ktrace_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ktrace_write(SB)
+
+// func Sys_nanosleep(deadline Time) Status
+TEXT ·Sys_nanosleep(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_nanosleep(SB)
+
+// func Sys_ticks_get() int64
+TEXT ·Sys_ticks_get(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ticks_get(SB)
+
+// func Sys_ticks_per_second() int64
+TEXT ·Sys_ticks_per_second(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ticks_per_second(SB)
+
+// func Sys_deadline_after(nanoseconds Duration) Time
+TEXT ·Sys_deadline_after(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_deadline_after(SB)
+
+// func Sys_vmar_unmap_handle_close_thread_exit(vmar_handle Handle, addr Vaddr, size uint, close_handle Handle) Status
+TEXT ·Sys_vmar_unmap_handle_close_thread_exit(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_unmap_handle_close_thread_exit(SB)
+
+// func Sys_futex_wake_handle_close_thread_exit(value_ptr *int32, wake_count uint32, new_value int32, close_handle Handle)
+TEXT ·Sys_futex_wake_handle_close_thread_exit(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_futex_wake_handle_close_thread_exit(SB)
+
+// func Sys_ticks_get_via_kernel() int64
+TEXT ·Sys_ticks_get_via_kernel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_ticks_get_via_kernel(SB)
+
+// func Sys_msi_allocate(handle Handle, count uint32, out_allocation *Handle) Status
+TEXT ·Sys_msi_allocate(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_msi_allocate(SB)
+
+// func Sys_msi_create(handle Handle, options uint32, msi_id uint32, vmo Handle, vmo_offset uint, out_interrupt *Handle) Status
+TEXT ·Sys_msi_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_msi_create(SB)
+
+// func Sys_mtrace_control(handle Handle, kind uint32, action uint32, options uint32, ptr unsafe.Pointer, ptr_size uint) Status
+TEXT ·Sys_mtrace_control(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_mtrace_control(SB)
+
+// func Sys_object_wait_one(handle Handle, signals Signals, deadline Time, observed *Signals) Status
+TEXT ·Sys_object_wait_one(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_wait_one(SB)
+
+// func Sys_object_wait_many(items *WaitItem, num_items uint, deadline Time) Status
+TEXT ·Sys_object_wait_many(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_wait_many(SB)
+
+// func Sys_object_wait_async(handle Handle, port Handle, key uint64, signals Signals, options uint32) Status
+TEXT ·Sys_object_wait_async(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_wait_async(SB)
+
+// func Sys_object_signal(handle Handle, clear_mask uint32, set_mask uint32) Status
+TEXT ·Sys_object_signal(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_signal(SB)
+
+// func Sys_object_signal_peer(handle Handle, clear_mask uint32, set_mask uint32) Status
+TEXT ·Sys_object_signal_peer(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_signal_peer(SB)
+
+// func Sys_object_get_property(handle Handle, property uint32, value unsafe.Pointer, value_size uint) Status
+TEXT ·Sys_object_get_property(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_get_property(SB)
+
+// func Sys_object_set_property(handle Handle, property uint32, value unsafe.Pointer, value_size uint) Status
+TEXT ·Sys_object_set_property(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_set_property(SB)
+
+// func Sys_object_get_info(handle Handle, topic uint32, buffer unsafe.Pointer, buffer_size uint, actual *uint, avail *uint) Status
+TEXT ·Sys_object_get_info(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_get_info(SB)
+
+// func Sys_object_get_child(handle Handle, koid uint64, rights Rights, out *Handle) Status
+TEXT ·Sys_object_get_child(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_get_child(SB)
+
+// func Sys_object_set_profile(handle Handle, profile Handle, options uint32) Status
+TEXT ·Sys_object_set_profile(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_object_set_profile(SB)
+
+// func Sys_pager_create(options uint32, out *Handle) Status
+TEXT ·Sys_pager_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_create(SB)
+
+// func Sys_pager_create_vmo(pager Handle, options uint32, port Handle, key uint64, size uint64, out *Handle) Status
+TEXT ·Sys_pager_create_vmo(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_create_vmo(SB)
+
+// func Sys_pager_detach_vmo(pager Handle, vmo Handle) Status
+TEXT ·Sys_pager_detach_vmo(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_detach_vmo(SB)
+
+// func Sys_pager_supply_pages(pager Handle, pager_vmo Handle, offset uint64, length uint64, aux_vmo Handle, aux_offset uint64) Status
+TEXT ·Sys_pager_supply_pages(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_supply_pages(SB)
+
+// func Sys_pager_op_range(pager Handle, op uint32, pager_vmo Handle, offset uint64, length uint64, data uint64) Status
+TEXT ·Sys_pager_op_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pager_op_range(SB)
+
+// func Sys_pc_firmware_tables(handle Handle, acpi_rsdp *Paddr, smbios *Paddr) Status
+TEXT ·Sys_pc_firmware_tables(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pc_firmware_tables(SB)
+
+// func Sys_pci_get_nth_device(handle Handle, index uint32, out_info *uintptr, out_handle *Handle) Status
+TEXT ·Sys_pci_get_nth_device(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_get_nth_device(SB)
+
+// func Sys_pci_enable_bus_master(handle Handle, enable uint32) Status
+TEXT ·Sys_pci_enable_bus_master(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_enable_bus_master(SB)
+
+// func Sys_pci_reset_device(handle Handle) Status
+TEXT ·Sys_pci_reset_device(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_reset_device(SB)
+
+// func Sys_pci_config_read(handle Handle, offset uint16, width uint, out_val *uint32) Status
+TEXT ·Sys_pci_config_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_config_read(SB)
+
+// func Sys_pci_config_write(handle Handle, offset uint16, width uint, val uint32) Status
+TEXT ·Sys_pci_config_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_config_write(SB)
+
+// func Sys_pci_cfg_pio_rw(handle Handle, bus uint8, dev uint8, funk uint8, offset uint8, val *uint32, width uint, write uint32) Status
+TEXT ·Sys_pci_cfg_pio_rw(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_cfg_pio_rw(SB)
+
+// func Sys_pci_get_bar(handle Handle, bar_num uint32, out_bar *uintptr, out_handle *Handle) Status
+TEXT ·Sys_pci_get_bar(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_get_bar(SB)
+
+// func Sys_pci_map_interrupt(handle Handle, which_irq int32, out_handle *Handle) Status
+TEXT ·Sys_pci_map_interrupt(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_map_interrupt(SB)
+
+// func Sys_pci_query_irq_mode(handle Handle, mode uint32, out_max_irqs *uint32) Status
+TEXT ·Sys_pci_query_irq_mode(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_query_irq_mode(SB)
+
+// func Sys_pci_set_irq_mode(handle Handle, mode uint32, requested_irq_count uint32) Status
+TEXT ·Sys_pci_set_irq_mode(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_set_irq_mode(SB)
+
+// func Sys_pci_init(handle Handle, init_buf *uintptr, len uint32) Status
+TEXT ·Sys_pci_init(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_init(SB)
+
+// func Sys_pci_add_subtract_io_range(handle Handle, mmio uint32, base uint64, len uint64, add uint32) Status
+TEXT ·Sys_pci_add_subtract_io_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pci_add_subtract_io_range(SB)
+
+// func Sys_pmt_unpin(handle Handle) Status
+TEXT ·Sys_pmt_unpin(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_pmt_unpin(SB)
+
+// func Sys_port_create(options uint32, out *Handle) Status
+TEXT ·Sys_port_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_port_create(SB)
+
+// func Sys_port_queue(handle Handle, packet *int) Status
+TEXT ·Sys_port_queue(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_port_queue(SB)
+
+// func Sys_port_wait(handle Handle, deadline Time, packet *int) Status
+TEXT ·Sys_port_wait(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_port_wait(SB)
+
+// func Sys_port_cancel(handle Handle, source Handle, key uint64) Status
+TEXT ·Sys_port_cancel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_port_cancel(SB)
+
+// func Sys_process_exit(retcode int64)
+TEXT ·Sys_process_exit(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_exit(SB)
+
+// func Sys_process_create(job Handle, name *uint8, name_size uint, options uint32, proc_handle *Handle, vmar_handle *Handle) Status
+TEXT ·Sys_process_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_create(SB)
+
+// func Sys_process_start(handle Handle, thread Handle, entry Vaddr, stack Vaddr, arg1 Handle, arg2 uintptr) Status
+TEXT ·Sys_process_start(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_start(SB)
+
+// func Sys_process_read_memory(handle Handle, vaddr Vaddr, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+TEXT ·Sys_process_read_memory(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_read_memory(SB)
+
+// func Sys_process_write_memory(handle Handle, vaddr Vaddr, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+TEXT ·Sys_process_write_memory(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_process_write_memory(SB)
+
+// func Sys_profile_create(root_job Handle, options uint32, profile *int, out *Handle) Status
+TEXT ·Sys_profile_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_profile_create(SB)
+
+// func Sys_resource_create(parent_rsrc Handle, options uint32, base uint64, size uint, name *uint8, name_size uint, resource_out *Handle) Status
+TEXT ·Sys_resource_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_resource_create(SB)
+
+// func Sys_smc_call(handle Handle, parameters *SMCParameters, out_smc_result *SMCResult) Status
+TEXT ·Sys_smc_call(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_smc_call(SB)
+
+// func Sys_socket_create(options uint32, out0 *Handle, out1 *Handle) Status
+TEXT ·Sys_socket_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_socket_create(SB)
+
+// func Sys_socket_write(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+TEXT ·Sys_socket_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_socket_write(SB)
+
+// func Sys_socket_read(handle Handle, options uint32, buffer unsafe.Pointer, buffer_size uint, actual *uint) Status
+TEXT ·Sys_socket_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_socket_read(SB)
+
+// func Sys_socket_shutdown(handle Handle, options uint32) Status
+TEXT ·Sys_socket_shutdown(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_socket_shutdown(SB)
+
+// func Sys_stream_create(options uint32, vmo Handle, seek uint64, out_stream *Handle) Status
+TEXT ·Sys_stream_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_create(SB)
+
+// func Sys_stream_writev(handle Handle, options uint32, vector *uintptr, num_vector uint, actual *uint) Status
+TEXT ·Sys_stream_writev(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_writev(SB)
+
+// func Sys_stream_writev_at(handle Handle, options uint32, offset uint64, vector *uintptr, num_vector uint, actual *uint) Status
+TEXT ·Sys_stream_writev_at(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_writev_at(SB)
+
+// func Sys_stream_readv(handle Handle, options uint32, vector *uintptr, num_vector uint, actual *uint) Status
+TEXT ·Sys_stream_readv(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_readv(SB)
+
+// func Sys_stream_readv_at(handle Handle, options uint32, offset uint64, vector *uintptr, num_vector uint, actual *uint) Status
+TEXT ·Sys_stream_readv_at(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_readv_at(SB)
+
+// func Sys_stream_seek(handle Handle, whence uint32, offset int64, out_seek *uint64) Status
+TEXT ·Sys_stream_seek(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_stream_seek(SB)
+
+// func Sys_syscall_test_0() Status
+TEXT ·Sys_syscall_test_0(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_0(SB)
+
+// func Sys_syscall_test_1(a int32) Status
+TEXT ·Sys_syscall_test_1(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_1(SB)
+
+// func Sys_syscall_test_2(a int32, b int32) Status
+TEXT ·Sys_syscall_test_2(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_2(SB)
+
+// func Sys_syscall_test_3(a int32, b int32, c int32) Status
+TEXT ·Sys_syscall_test_3(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_3(SB)
+
+// func Sys_syscall_test_4(a int32, b int32, c int32, d int32) Status
+TEXT ·Sys_syscall_test_4(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_4(SB)
+
+// func Sys_syscall_test_5(a int32, b int32, c int32, d int32, e int32) Status
+TEXT ·Sys_syscall_test_5(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_5(SB)
+
+// func Sys_syscall_test_6(a int32, b int32, c int32, d int32, e int32, f int32) Status
+TEXT ·Sys_syscall_test_6(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_6(SB)
+
+// func Sys_syscall_test_7(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32) Status
+TEXT ·Sys_syscall_test_7(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_7(SB)
+
+// func Sys_syscall_test_8(a int32, b int32, c int32, d int32, e int32, f int32, g_ int32, h int32) Status
+TEXT ·Sys_syscall_test_8(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_8(SB)
+
+// func Sys_syscall_test_wrapper(a int32, b int32, c int32) Status
+TEXT ·Sys_syscall_test_wrapper(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_wrapper(SB)
+
+// func Sys_syscall_test_handle_create(return_value Status, out *Handle) Status
+TEXT ·Sys_syscall_test_handle_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_syscall_test_handle_create(SB)
+
+// func Sys_system_get_dcache_line_size() uint32
+TEXT ·Sys_system_get_dcache_line_size(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_dcache_line_size(SB)
+
+// func Sys_system_get_num_cpus() uint32
+TEXT ·Sys_system_get_num_cpus(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_num_cpus(SB)
+
+// func Sys_system_get_version_string() unsafe.Pointer
+TEXT ·Sys_system_get_version_string(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_version_string(SB)
+
+// func Sys_system_get_physmem() uint64
+TEXT ·Sys_system_get_physmem(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_physmem(SB)
+
+// func Sys_system_get_features(kind uint32, features *uint32) Status
+TEXT ·Sys_system_get_features(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_features(SB)
+
+// func Sys_system_get_event(root_job Handle, kind uint32, event *Handle) Status
+TEXT ·Sys_system_get_event(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_get_event(SB)
+
+// func Sys_system_mexec(resource Handle, kernel_vmo Handle, bootimage_vmo Handle) Status
+TEXT ·Sys_system_mexec(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_mexec(SB)
+
+// func Sys_system_mexec_payload_get(resource Handle, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_system_mexec_payload_get(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_mexec_payload_get(SB)
+
+// func Sys_system_powerctl(resource Handle, cmd uint32, arg *int) Status
+TEXT ·Sys_system_powerctl(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_system_powerctl(SB)
+
+// func Sys_task_suspend(handle Handle, token *Handle) Status
+TEXT ·Sys_task_suspend(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_task_suspend(SB)
+
+// func Sys_task_suspend_token(handle Handle, token *Handle) Status
+TEXT ·Sys_task_suspend_token(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_task_suspend_token(SB)
+
+// func Sys_task_create_exception_channel(handle Handle, options uint32, out *Handle) Status
+TEXT ·Sys_task_create_exception_channel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_task_create_exception_channel(SB)
+
+// func Sys_task_kill(handle Handle) Status
+TEXT ·Sys_task_kill(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_task_kill(SB)
+
+// func Sys_thread_exit()
+TEXT ·Sys_thread_exit(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_exit(SB)
+
+// func Sys_thread_create(process Handle, name *uint8, name_size uint, options uint32, out *Handle) Status
+TEXT ·Sys_thread_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_create(SB)
+
+// func Sys_thread_start(handle Handle, thread_entry Vaddr, stack Vaddr, arg1 uintptr, arg2 uintptr) Status
+TEXT ·Sys_thread_start(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_start(SB)
+
+// func Sys_thread_read_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_thread_read_state(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_read_state(SB)
+
+// func Sys_thread_write_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_thread_write_state(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_thread_write_state(SB)
+
+// func Sys_timer_create(options uint32, clock_id uint32, out *Handle) Status
+TEXT ·Sys_timer_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_timer_create(SB)
+
+// func Sys_timer_set(handle Handle, deadline Time, slack Duration) Status
+TEXT ·Sys_timer_set(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_timer_set(SB)
+
+// func Sys_timer_cancel(handle Handle) Status
+TEXT ·Sys_timer_cancel(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_timer_cancel(SB)
+
+// func Sys_vcpu_create(guest Handle, options uint32, entry Vaddr, out *Handle) Status
+TEXT ·Sys_vcpu_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_create(SB)
+
+// func Sys_vcpu_resume(handle Handle, packet *int) Status
+TEXT ·Sys_vcpu_resume(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_resume(SB)
+
+// func Sys_vcpu_interrupt(handle Handle, vector uint32) Status
+TEXT ·Sys_vcpu_interrupt(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_interrupt(SB)
+
+// func Sys_vcpu_read_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_vcpu_read_state(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_read_state(SB)
+
+// func Sys_vcpu_write_state(handle Handle, kind uint32, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_vcpu_write_state(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vcpu_write_state(SB)
+
+// func Sys_vmar_allocate(parent_vmar Handle, options VMFlag, offset uint, size uint, child_vmar *Handle, child_addr *Vaddr) Status
+TEXT ·Sys_vmar_allocate(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_allocate(SB)
+
+// func Sys_vmar_destroy(handle Handle) Status
+TEXT ·Sys_vmar_destroy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_destroy(SB)
+
+// func Sys_vmar_map(handle Handle, options VMFlag, vmar_offset uint, vmo Handle, vmo_offset uint64, len uint, mapped_addr *Vaddr) Status
+TEXT ·Sys_vmar_map(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_map(SB)
+
+// func Sys_vmar_unmap(handle Handle, addr Vaddr, len uint) Status
+TEXT ·Sys_vmar_unmap(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_unmap(SB)
+
+// func Sys_vmar_protect(handle Handle, options VMFlag, addr Vaddr, len uint) Status
+TEXT ·Sys_vmar_protect(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_protect(SB)
+
+// func Sys_vmar_op_range(handle Handle, op uint32, address Vaddr, size uint, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_vmar_op_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmar_op_range(SB)
+
+// func Sys_vmo_create(size uint64, options uint32, out *Handle) Status
+TEXT ·Sys_vmo_create(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_create(SB)
+
+// func Sys_vmo_read(handle Handle, buffer unsafe.Pointer, offset uint64, buffer_size uint) Status
+TEXT ·Sys_vmo_read(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_read(SB)
+
+// func Sys_vmo_write(handle Handle, buffer unsafe.Pointer, offset uint64, buffer_size uint) Status
+TEXT ·Sys_vmo_write(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_write(SB)
+
+// func Sys_vmo_get_size(handle Handle, size *uint64) Status
+TEXT ·Sys_vmo_get_size(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_get_size(SB)
+
+// func Sys_vmo_set_size(handle Handle, size uint64) Status
+TEXT ·Sys_vmo_set_size(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_set_size(SB)
+
+// func Sys_vmo_op_range(handle Handle, op uint32, offset uint64, size uint64, buffer unsafe.Pointer, buffer_size uint) Status
+TEXT ·Sys_vmo_op_range(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_op_range(SB)
+
+// func Sys_vmo_create_child(handle Handle, options uint32, offset uint64, size uint64, out *Handle) Status
+TEXT ·Sys_vmo_create_child(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_create_child(SB)
+
+// func Sys_vmo_set_cache_policy(handle Handle, cache_policy uint32) Status
+TEXT ·Sys_vmo_set_cache_policy(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_set_cache_policy(SB)
+
+// func Sys_vmo_replace_as_executable(handle Handle, vmex Handle, out *Handle) Status
+TEXT ·Sys_vmo_replace_as_executable(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_replace_as_executable(SB)
+
+// func Sys_vmo_create_contiguous(bti Handle, size uint, alignment_log2 uint32, out *Handle) Status
+TEXT ·Sys_vmo_create_contiguous(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_create_contiguous(SB)
+
+// func Sys_vmo_create_physical(resource Handle, paddr Paddr, size uint, out *Handle) Status
+TEXT ·Sys_vmo_create_physical(SB),NOSPLIT,$0
+ JMP runtime·vdsoCall_zx_vmo_create_physical(SB)
+
diff --git a/src/syscall/zx/types.go b/src/syscall/zx/types.go
new file mode 100644
index 0000000..ddec68a
--- /dev/null
+++ b/src/syscall/zx/types.go
@@ -0,0 +1,587 @@
+// 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 zx
+
+import "unsafe"
+
+type Status int32 // zx_status_t
+type Handle uint32 // zx_handle_t
+type Clock uint32 // zx_clock_t,
+type Time int64 // zx_time_t, nanoseconds
+type Duration int64 // zx_duration_t, nanoseconds
+type Signals uint32 // zx_signals_t
+type Rights uint32 // zx_rights_t
+type Paddr uintptr // zx_paddr_t
+type Vaddr uintptr // zx_vaddr_t
+type ObjectType uint32 // zx_obj_type_t
+type HandleOp uint32 // zx_handle_op_t;
+
+func (r Rights) Subtract(targetRights Rights) Rights {
+ if r == RightSameRights || targetRights == RightSameRights {
+ panic("subtraction doesn't make sense for zx.RightSameRights")
+ }
+ return r &^ targetRights
+}
+
+func (r Rights) StrictSupersetOf(targetRights Rights) bool {
+ return r.Subtract(targetRights) != 0 && targetRights.Subtract(r) == 0
+}
+
+func (r Rights) SupersetOf(targetRights Rights) bool {
+ return r.StrictSupersetOf(targetRights) || r == targetRights
+}
+
+func (r Rights) SubsetOf(targetRights Rights) bool {
+ return targetRights.SupersetOf(r)
+}
+
+func (r Rights) StrictSubsetOf(targetRights Rights) bool {
+ return targetRights.StrictSupersetOf(r)
+}
+
+type WaitItem struct {
+ Handle Handle
+ WaitFor Signals
+ Pending Signals
+} // zx_wait_item_t
+
+const HandleInvalid = Handle(0)
+
+// deprecated name
+const HANDLE_INVALID = Handle(0)
+
+const HandleSize = uint64(unsafe.Sizeof(Handle(0)))
+
+const ZX_MAX_NAME_LEN = 32
+
+const (
+ ZX_RREC_DELETED = 0
+ ZX_RREC_SELF = 1
+ ZX_RREC_DATA = 2
+ ZX_RREC_IRQ = 3
+ ZX_RREC_MMIO = 4
+ ZX_RREC_IOPORT = 5
+)
+
+const (
+ ZX_RACT_ENABLE = 1
+ ZX_RACT_DISABLE = 2
+)
+
+const (
+ ZX_RREC_SELF_GENERIC = 0
+ ZX_RREC_SELF_ROOT = 1
+)
+
+type InfoHandleBasic struct {
+ Koid uint64
+ Rights Rights
+ Type ObjectType
+ RelatedKoid uint64
+ Props uint32
+} // zx_info_handle_basic_t
+
+type InfoSocket struct {
+ Options uint32
+ RXBufMax int
+ RXBufSize int
+ RXBufAvailable int
+ TXBufMax int
+ TXBufSize int
+} // zx_info_socket_t
+
+type RrecSelf struct {
+ Type uint16 // ZX_RREC_SELF
+ Subtype uint16
+ Options uint32
+ Koid uint64
+ RecordCount uint32
+ ChildCount uint32
+ _ [2]uint32
+ Name [ZX_MAX_NAME_LEN]uint8
+} // zx_rrec_self_t
+
+type RrecMMIO struct {
+ Type uint16 // ZX_RREC_MMIO
+ Subtype uint16
+ Options uint32
+ PhysBase uint64
+ PhysSize uint64
+ _ [10]uint32
+} // zx_rrec_mmio_t
+
+type RrecIRQ struct {
+ Type uint16 // ZX_RREC_IRQ
+ Subtype uint16
+ Options uint32
+ IRQBase uint32
+ IRQCount uint32
+ _ [12]uint32
+} // zx_rrec_irq_t
+
+type RrecIOPort struct {
+ Type uint16 // ZX_RREC_IOPORT
+ Subtype uint16
+ Options uint32
+ PortBase uint32
+ PortCount uint32
+ _ [12]uint32
+} // zx_rrec_ioport_t
+
+type RrecData struct {
+ Type uint16
+ Subtype uint16
+ Options uint32 // low 4 bits are count
+ Data [56]uint8
+} // zx_rrec_data_t
+
+type Rrec struct {
+ typ uint16
+ _ [62]uint8
+} // zx_rrec_t
+
+func (r *Rrec) Box() RrecValue {
+ switch r.typ {
+ case ZX_RREC_DELETED:
+ return nil
+ case ZX_RREC_SELF:
+ return (*RrecSelf)(unsafe.Pointer(r))
+ case ZX_RREC_DATA:
+ return (*RrecData)(unsafe.Pointer(r))
+ case ZX_RREC_IRQ:
+ return (*RrecIRQ)(unsafe.Pointer(r))
+ case ZX_RREC_MMIO:
+ return (*RrecMMIO)(unsafe.Pointer(r))
+ case ZX_RREC_IOPORT:
+ return (*RrecIOPort)(unsafe.Pointer(r))
+ default:
+ return nil
+ }
+}
+
+type RrecValue interface {
+ rrec()
+}
+
+func (*RrecSelf) rrec() {}
+func (*RrecData) rrec() {}
+func (*RrecIRQ) rrec() {}
+func (*RrecMMIO) rrec() {}
+func (*RrecIOPort) rrec() {}
+
+type ChannelCallArgs struct {
+ WriteBytes unsafe.Pointer
+ WriteHandles *Handle
+ ReadBytes unsafe.Pointer
+ ReadHandles *Handle
+ WriteNumBytes uint32
+ WriteNumHandles uint32
+ ReadNumBytes uint32
+ ReadNumHandles uint32
+}
+
+type ChannelCallEtcArgs struct {
+ WriteBytes unsafe.Pointer
+ WriteHandles *HandleDisposition
+ ReadBytes unsafe.Pointer
+ ReadHandles *HandleInfo
+ WriteNumBytes uint32
+ WriteNumHandles uint32
+ ReadNumBytes uint32
+ ReadNumHandles uint32
+}
+
+type FIFOState struct {
+ head, tail uint64
+}
+
+type SMCParameters struct {
+ funcID uint32
+ arg1, arg2, arg3, arg4, arg5, arg6 uint64
+ clientId, secureOSID uint16
+}
+
+type SMCResult struct {
+ arg0, arg1, arg2, arg3 uint64
+}
+
+type HandleDisposition struct {
+ Operation HandleOp
+ Handle Handle
+ Type ObjectType
+ Rights Rights
+ Result Status
+}
+
+type HandleInfo struct {
+ Handle Handle
+ Type ObjectType
+ Rights Rights
+ Unused uint32
+}
+
+// Status codes. See zircon/system/public/zircon/errors.h
+const (
+ ErrOk Status = -iota
+ ErrInternal
+ ErrNotSupported
+ ErrNoResources
+ ErrNoMemory
+ ErrCallFailed
+ ErrInterruptedRetry
+ _ // -7
+ _ // -8
+ _ // -9
+ ErrInvalidArgs
+ ErrBadHandle
+ ErrWrongType
+ ErrBadSyscall
+ ErrOutOfRange
+ ErrBufferTooSmall
+ _ // -16
+ _ // -17
+ _ // -18
+ _ // -19
+ ErrBadState
+ ErrTimedOut
+ ErrShouldWait
+ ErrCanceled
+ ErrPeerClosed
+ ErrNotFound
+ ErrAlreadyExists
+ ErrAlreadyBound
+ ErrUnavailable
+ _ // -29
+ ErrAccessDenied
+ _ // -31
+ _ // -32
+ _ // -33
+ _ // -34
+ _ // -35
+ _ // -36
+ _ // -37
+ _ // -38
+ _ // -39
+ ErrIO
+ ErrIORefused
+ ErrIODataIntegrity
+ ErrIODataLoss
+ _ // -44
+ _ // -45
+ _ // -46
+ _ // -47
+ _ // -48
+ _ // -49
+ ErrBadPath
+ ErrNotDir
+ ErrNotFile
+ ErrFileBig
+ ErrNoSpace
+ ErrNotEmpty
+ _ // -56
+ _ // -57
+ _ // -58
+ _ // -59
+ ErrStop
+ ErrNext
+ _ // -62
+ _ // -63
+ _ // -64
+ _ // -65
+ _ // -66
+ _ // -67
+ _ // -68
+ _ // -69
+ ErrProtocolNotSupported
+ ErrAddressUnreachable
+ ErrAddressInUse
+ ErrNotConnected
+ ErrConnectionRefused
+ ErrConnectionReset
+ ErrConnectionAborted
+
+ // deprecated
+ ErrHandleClosed = ErrCanceled
+ ErrRemoteClosed = ErrPeerClosed
+)
+
+const (
+ SignalObject0 = (1 << iota)
+ SignalObject1
+ SignalObject2
+ SignalObject3
+ SignalObject4
+ SignalObject5
+ SignalObject6
+ SignalObject7
+ SignalObject8
+ SignalObject9
+ SignalObject10
+ SignalObject11
+ SignalObject12
+ SignalObject13
+ SignalObject14
+ SignalObject15
+ SignalObject16
+ SignalObject17
+ SignalObject18
+ SignalObject19
+ SignalObject20
+ SignalObject21
+ SignalObject22
+ SignalObject23
+
+ SignalUser0
+ SignalUser1
+ SignalUser2
+ SignalUser3
+ SignalUser4
+ SignalUser5
+ SignalUser6
+ SignalUser7
+
+ // Aliases
+ SignalHandleClosed = SignalObject23
+
+ // Event
+ SignalEventSignaled = SignalObject3
+ SignalEventMask = SignalUserAll | SignalEventSignaled
+
+ // EventPair
+ SignalEpairSignaled = SignalObject3
+ SignalEpairPeerClosed = SignalObject2
+
+ // Channel
+ SignalChannelReadable = SignalObject0
+ SignalChannelWritable = SignalObject1
+ SignalChannelPeerClosed = SignalObject2
+
+ // Socket
+ SignalSocketReadable = SignalObject0
+ SignalSocketWritable = SignalObject1
+ SignalSocketPeerClosed = SignalObject2
+ SignalSocketPeerWriteDisabled = SignalObject4
+ SignalSocketWriteDisabled = SignalObject5
+
+ // Port
+ SignalPortReadable = SignalObject0
+ SignalPortPeerClosed = SignalObject2
+ SignalPortSignaled = SignalObject3
+
+ // Resource
+ SignalResourceReadable = SignalObject0
+ SignalResourceWritable = SignalObject1
+ SignalResourceChildAdded = SignalObject2
+
+ // Fifo
+ SignalFIFOReadable = SignalObject0
+ SignalFIFOWritable = SignalObject1
+ SignalFIFOPeerClosed = SignalObject2
+ SignalFIFOSignalMask = SignalFIFOReadable | SignalFIFOWritable | SignalFIFOPeerClosed
+
+ // Task signals (process, thread, job)
+ SignalTaskTerminated = SignalObject3
+ SignalTaskSignalMask = SignalObject3
+
+ // Job
+ SignalJobSignaled = SignalObject3
+
+ // Process
+ SignalProccessSignaled = SignalObject3
+
+ // Thread
+ SignalThreadSignaled = SignalObject3
+
+ SignalObjectAll = (0xfffff)
+ SignalUserAll = Signals(15 << 4)
+ SignalNone = Signals(0)
+)
+
+const (
+ RightDuplicate = Rights(1 << iota)
+ RightTransfer
+ RightRead
+ RightWrite
+ RightExecute
+ RightMap
+ RightGetProperty
+ RightSetProperty
+ RightEnumerate
+ RightDestroy
+ RightGetPolicy
+ RightSetPolicy
+ RightSignal
+ RightSignalPeer
+ RightWait
+ RightInspect
+ RightManageJob
+ RightManageProcess
+ RightManageThread
+ RightApplyPolicy
+ RightSameRights = Rights(1 << 31)
+ RightNone = Rights(0)
+)
+
+const (
+ RightsBasic = RightTransfer | RightDuplicate | RightWait | RightInspect
+ RightsIO = RightRead | RightWrite
+ RightsProperty = RightGetProperty | RightSetProperty
+ RightsPolicy = RightGetPolicy | RightSetPolicy
+)
+
+// Topics for object_get_info
+const (
+ ObjectInfoHandleNone = 0
+ ObjectInfoHandleValid = 1
+ ObjectInfoHandleBasic = 2
+ ObjectInfoProcess = 3
+ ObjectInfoProcessThreads = 4
+ ObjectInfoResourceChildren = 5
+ ObjectInfoResourceRecords = 6
+ ObjectInfoVMAR = 7
+ ObjectInfoJobChildren = 8
+ ObjectInfoJobProcesses = 9
+ ObjectInfoThread = 10
+ ObjectInfoThreadExceptionReport = 11
+ ObjectInfoTaskStats = 12
+ ObjectInfoProcessMaps = 13
+ ObjectInfoProcessVMOs_V1 = 14 | (0 << 28)
+ ObjectInfoProcessVMOs = 14 | (1 << 28)
+ ObjectInfoThreadStats = 15
+ ObjectInfoCpUStats = 16
+ ObjectInfoKMemStats = 17
+ ObjectInfoResource = 18
+ ObjectInfoHandleCount = 19
+ ObjectInfoBTI = 20
+ ObjectInfoProcessHandleStats = 21
+ ObjectInfoSocket = 22
+ ObjectInfoVMO_V1 = 23 | (0 << 28)
+ ObjectInfoVMO = 23 | (1 << 28)
+)
+
+const (
+ ObjectTypeNone = ObjectType(iota)
+ ObjectTypeProcess
+ ObjectTypeThread
+ ObjectTypeVmo
+ ObjectTypeChannel
+ ObjectTypeEvent
+ ObjectTypePort
+ _ // 7
+ _ // 8
+ ObjectTypeInterrupt
+ _ // 10
+ ObjectTypePciDevice
+ ObjectTypeLog
+ _ // 13
+ ObjectTypeSocket
+ ObjectTypeResource
+ ObjectTypeEventPair
+ ObjectTypeJob
+ ObjectTypeVmar
+ ObjectTypeFifo
+ ObjectTypeGuest
+ ObjectTypeVcpu
+ ObjectTypeTimer
+ ObjectTypeIommu
+ ObjectTypeBti
+ ObjectTypeProfile
+ ObjectTypePmt
+ ObjectTypeSuspendToken
+ ObjectTypePager
+)
+
+const (
+ HandleOpMove = HandleOp(iota) // 0
+ HandleOpDuplicate // 1
+)
+
+// Options for socket_create
+const (
+ SocketStream = iota // 0
+ SocketDatagram = 1 << (iota - 1) // 1
+)
+
+// Options for socket_write
+const (
+ _ = iota // 0
+ SocketShutdownWrite // 1
+ SocketShutdownRead // 2
+)
+
+const (
+ _ = iota // 0
+ _ // 1
+ PropNumStateKinds // ZX_PROP_NUM_STATE_KINDS
+ PropName // ZX_PROP_NAME
+ PropRegisterFS // ZX_PROP_REGISTER_FS
+ PropProcessDebugAddr // ZX_PROP_PROCESS_DEBUG_ADDR
+ PropProcessVDSOBaseAddress // ZX_PROP_PROCESS_VDSO_BASE_ADDRESS
+ PropJobMaxHeight // ZX_PROP_JOB_MAX_HEIGHT
+)
+
+const (
+ TimensecInfinite = Time(0x7FFFFFFFFFFFFFFF)
+)
+
+// EOF is used like io.EOF.
+//
+// When package io is linked in, at initialization this value is
+// rewritten to be equivalent to io.EOF, so that the io.Readers
+// and io.Writers in this package meet their specs.
+var EOF error = eof{}
+
+type eof struct{}
+
+func (eof) Error() string { return "zx.EOF" }
+
+// EPIPE is used like syscall.EPIPE
+
+// When package syscall is linked in, at initialization this value is
+// rewritten to be equivalent to syscall.EPIPE.
+
+var EPIPE error = epipe{}
+
+type epipe struct{}
+
+func (epipe) Error() string { return "errno(32)" }
+
+type VMOOption int
+
+const (
+ VMOOptionResizable VMOOption = 1 << 1 // ZX_VMO_RESIZABLE
+)
+
+type VMOChildOption uint32
+
+const (
+ // zx_vmo_create_child requires exactly 1 of the following 3 flags:
+ VMOChildOptionSnapshot VMOChildOption = 1 << 0 // ZX_VMO_CHILD_SNAPSHOT
+ VMOChildOptionSlice = 1 << 3 // ZX_VMO_CHILD_SLICE
+ VMOChildOptionSnapshotAtLeastOnWrite = 1 << 4 // ZX_VMO_CHILD_SNAPSHOT_AT_LEAST_ON_WRITE
+
+ // old clone flags on the path to deprecation
+ VMOChildOptionCopyOnWrite = 1 << 4 // ZX_VMO_CHILD_COPY_ON_WRITE
+ VMOChildOptionPrivatePagerCopy = 1 << 4 // ZX_VMO_CHILD_PRIVATE_PAGER_COPY
+
+ // optional flags
+ VMOChildOptionResizable = 1 << 2 // ZX_VMO_CHILD_RESIZABLE
+ VMOChildOptionNoWrite = 1 << 5 // ZX_VMO_CHILD_NO_WRITE
+)
+
+type VMFlag uint32
+
+const (
+ VMFlagPermRead VMFlag = 1 << 0 // ZX_VM_PERM_READ
+ VMFlagPermWrite VMFlag = 1 << 1 // ZX_VM_PERM_WRITE
+ VMFlagPermExecute VMFlag = 1 << 2 // ZX_VM_PERM_EXECUTE
+ VMFlagCompact VMFlag = 1 << 3 // ZX_VM_COMPACT
+ VMFlagSpecific VMFlag = 1 << 4 // ZX_VM_SPECIFIC
+ VMFlagSpecificOverwrite VMFlag = 1 << 5 // ZX_VM_SPECIFIC_OVERWRITE
+ VMFlagCanMapSpecific VMFlag = 1 << 6 // ZX_VM_CAN_MAP_SPECIFIC
+ VMFlagCanMapRead VMFlag = 1 << 7 // ZX_VM_CAN_MAP_READ
+ VMFlagCanMapWrite VMFlag = 1 << 8 // ZX_VM_CAN_MAP_WRITE
+ VMFlagCanMapExecute VMFlag = 1 << 9 // ZX_VM_CAN_MAP_EXECUTE
+)
diff --git a/src/syscall/zx/types_string.go b/src/syscall/zx/types_string.go
new file mode 100644
index 0000000..901d24f
--- /dev/null
+++ b/src/syscall/zx/types_string.go
@@ -0,0 +1,66 @@
+// generated by stringer -type=Status; DO NOT EDIT
+
+package zx
+
+const (
+ _Status_name_0 = "ErrNoSpaceErrFileBigErrNotFileErrNotDirErrBadPath"
+ _Status_name_1 = "ErrIODataLossErrIODataIntegrityErrIORefusedErrIO"
+ _Status_name_2 = "ErrAccessDenied"
+ _Status_name_3 = "ErrUnavailableErrAlreadyBoundErrAlreadyExistsErrNotFoundErrPeerClosedErrCanceledErrShouldWaitErrTimedOutErrBadState"
+ _Status_name_4 = "ErrBufferTooSmallErrOutOfRangeErrBadSyscallErrWrongTypeErrBadHandleErrInvalidArgs"
+ _Status_name_5 = "ErrInterruptedRetryErrCallFailedErrNoMemoryErrNoResourcesErrNotSupportedErrInternalErrOk"
+)
+
+var (
+ _Status_index_0 = [...]uint8{0, 10, 20, 30, 39, 49}
+ _Status_index_1 = [...]uint8{0, 13, 31, 43, 48}
+ _Status_index_2 = [...]uint8{0, 15}
+ _Status_index_3 = [...]uint8{0, 14, 29, 45, 56, 69, 80, 93, 104, 115}
+ _Status_index_4 = [...]uint8{0, 17, 30, 43, 55, 67, 81}
+ _Status_index_5 = [...]uint8{0, 19, 32, 43, 57, 72, 83, 88}
+)
+
+func (i Status) String() string {
+ switch {
+ case -54 <= i && i <= -50:
+ i -= -54
+ return _Status_name_0[_Status_index_0[i]:_Status_index_0[i+1]]
+ case -43 <= i && i <= -40:
+ i -= -43
+ return _Status_name_1[_Status_index_1[i]:_Status_index_1[i+1]]
+ case i == -30:
+ return _Status_name_2
+ case -28 <= i && i <= -20:
+ i -= -28
+ return _Status_name_3[_Status_index_3[i]:_Status_index_3[i+1]]
+ case -15 <= i && i <= -10:
+ i -= -15
+ return _Status_name_4[_Status_index_4[i]:_Status_index_4[i+1]]
+ case -6 <= i && i <= 0:
+ i -= -6
+ return _Status_name_5[_Status_index_5[i]:_Status_index_5[i+1]]
+ default:
+ var buf [20]byte
+ return "zx.Status(" + string(itoa(buf[:], int(i))) + ")"
+ }
+}
+
+func itoa(buf []byte, val int) []byte {
+ i := len(buf) - 1
+ neg := false
+ if val < 0 {
+ neg = true
+ val = 0 - val
+ }
+ for val >= 10 {
+ buf[i] = byte(val%10 + '0')
+ i--
+ val /= 10
+ }
+ buf[i] = byte(val + '0')
+ if neg {
+ i--
+ buf[i] = '-'
+ }
+ return buf[i:]
+}
diff --git a/src/syscall/zx/types_test.go b/src/syscall/zx/types_test.go
new file mode 100644
index 0000000..58b32de
--- /dev/null
+++ b/src/syscall/zx/types_test.go
@@ -0,0 +1,87 @@
+// 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.
+
+package zx_test
+
+import (
+ "syscall/zx"
+ "testing"
+)
+
+func TestRightsSubtract(t *testing.T) {
+ var minuend zx.Rights = 0b0011
+ var subrahend zx.Rights = 0b0101
+ var expectedDifference zx.Rights = 0b0010
+ if res := minuend.Subtract(subrahend); res != expectedDifference {
+ t.Fatalf("unexpected rights subtraction result %d - %d = %d not %d",
+ minuend, subrahend, res, expectedDifference)
+ }
+}
+
+func TestSupersetSubset(t *testing.T) {
+ type testCase struct {
+ leftOperand zx.Rights
+ rightOperand zx.Rights
+ isStrictSubset bool
+ isSubset bool
+ isStrictSuperset bool
+ isSuperset bool
+ }
+ testCases := []testCase{
+ {
+ leftOperand: 0b0,
+ rightOperand: 0b0,
+ isStrictSubset: false,
+ isSubset: true,
+ isStrictSuperset: false,
+ isSuperset: true,
+ },
+ {
+ leftOperand: 0b1,
+ rightOperand: 0b1,
+ isStrictSubset: false,
+ isSubset: true,
+ isStrictSuperset: false,
+ isSuperset: true,
+ },
+ {
+ leftOperand: 0b11,
+ rightOperand: 0b01,
+ isStrictSubset: false,
+ isSubset: false,
+ isStrictSuperset: true,
+ isSuperset: true,
+ },
+ {
+ leftOperand: 0b01,
+ rightOperand: 0b11,
+ isStrictSubset: true,
+ isSubset: true,
+ isStrictSuperset: false,
+ isSuperset: false,
+ },
+ {
+ leftOperand: 0b10,
+ rightOperand: 0b01,
+ isStrictSubset: false,
+ isSubset: false,
+ isStrictSuperset: false,
+ isSuperset: false,
+ },
+ }
+ for _, testCase := range testCases {
+ if res := testCase.leftOperand.StrictSubsetOf(testCase.rightOperand); res != testCase.isStrictSubset {
+ t.Errorf("(%d).StrictSubsetOf(%d) was %v, wanted %v", testCase.leftOperand, testCase.rightOperand, res, testCase.isStrictSubset)
+ }
+ if res := testCase.leftOperand.SubsetOf(testCase.rightOperand); res != testCase.isSubset {
+ t.Errorf("(%d).SubsetOf(%d) was %v, wanted %v", testCase.leftOperand, testCase.rightOperand, res, testCase.isSubset)
+ }
+ if res := testCase.leftOperand.StrictSupersetOf(testCase.rightOperand); res != testCase.isStrictSuperset {
+ t.Errorf("(%d).StrictSupersetOf(%d) was %v, wanted %v", testCase.leftOperand, testCase.rightOperand, res, testCase.isStrictSuperset)
+ }
+ if res := testCase.leftOperand.SupersetOf(testCase.rightOperand); res != testCase.isSuperset {
+ t.Errorf("(%d).SupersetOf(%d) was %v, wanted %v", testCase.leftOperand, testCase.rightOperand, res, testCase.isSuperset)
+ }
+ }
+}
diff --git a/src/syscall/zx/zxsocket/socket.go b/src/syscall/zx/zxsocket/socket.go
new file mode 100644
index 0000000..41d2b53
--- /dev/null
+++ b/src/syscall/zx/zxsocket/socket.go
@@ -0,0 +1,556 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on zxwait, which doesn't compile in not-Fuchsia.
+// +build fuchsia
+
+package zxsocket
+
+import (
+ "io"
+ "strconv"
+ "strings"
+ "syscall"
+ "syscall/zx"
+ "syscall/zx/fdio"
+ "syscall/zx/internal/context"
+ fidlIo "syscall/zx/io"
+ "syscall/zx/net"
+ "syscall/zx/posix/socket"
+ "syscall/zx/zxwait"
+)
+
+// These constants mirror those defined in fdio/private-socket.h.
+const (
+ SignalIncoming = zx.SignalUser0
+ SignalOutgoing = zx.SignalUser1
+ SignalConnected = zx.SignalUser3
+ SignalShutdownRead = zx.SignalUser4
+ SignalShutdownWrite = zx.SignalUser5
+ SignalConnectionRefused = zx.SignalUser6
+ SignalConnectionReset = zx.SignalUser7
+)
+
+var _ Socket = (*DatagramSocket)(nil)
+var _ Socket = (*StreamSocket)(nil)
+
+// Socket is the common subset of datagram and stream sockets.
+type Socket interface {
+ fdio.FDIO
+ Bind(net.SocketAddress) error
+ Connect(net.SocketAddress) error
+ GetPeerName() (net.SocketAddress, error)
+ GetSockName() (net.SocketAddress, error)
+ SetSockOpt(level int16, optname int16, optval []uint8) error
+}
+
+// NewSocket creates a new Socket.
+func NewSocket(base *socket.BaseSocketWithCtxInterface) (Socket, error) {
+ info, err := base.Describe(context.Background())
+ if err != nil {
+ return nil, err
+ }
+ switch w := info.Which(); w {
+ case fidlIo.NodeInfoService, fidlIo.NodeInfoFile, fidlIo.NodeInfoDirectory, fidlIo.NodeInfoPipe, fidlIo.NodeInfoVmofile, fidlIo.NodeInfoDevice, fidlIo.NodeInfoTty:
+ return nil, &zx.Error{Status: zx.ErrInternal, Text: "zxsocket.NewSocket"}
+ case fidlIo.NodeInfoDatagramSocket:
+ return &DatagramSocket{
+ client: socket.DatagramSocketWithCtxInterface{Channel: base.Channel},
+ event: info.DatagramSocket.Event,
+ }, nil
+ case fidlIo.NodeInfoStreamSocket:
+ return &StreamSocket{
+ client: socket.StreamSocketWithCtxInterface{Channel: base.Channel},
+ socket: info.StreamSocket.Socket,
+ }, nil
+ default:
+ panic("unknown node info tag " + strconv.FormatInt(int64(w), 10))
+ }
+}
+
+type stub struct{}
+
+func (*stub) Sync() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.Sync"}
+}
+
+func (*stub) GetAttr() (fidlIo.NodeAttributes, error) {
+ return fidlIo.NodeAttributes{}, &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.GetAttr"}
+}
+
+func (*stub) SetAttr(uint32, fidlIo.NodeAttributes) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.SetAttr"}
+}
+
+func (*stub) ReadAt([]byte, int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.ReadAt"}
+}
+
+func (*stub) WriteAt([]byte, int64) (int, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.WriteAt"}
+}
+
+func (*stub) Seek(int64, int) (int64, error) {
+ return 0, &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.Seek"}
+}
+
+func (*stub) Truncate(uint64) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.Truncate"}
+}
+
+func (*stub) Open(string, uint32, uint32) (fdio.FDIO, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.Open"}
+}
+
+func (*stub) Link(string, string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.Link"}
+}
+
+func (*stub) Rename(string, string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.Rename"}
+}
+
+func (*stub) Unlink(string) error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.Unlink"}
+}
+
+func (*stub) ReadDirents(uint64) ([]byte, error) {
+ return nil, &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.ReadDirents"}
+}
+
+func (*stub) Rewind() error {
+ return &zx.Error{Status: zx.ErrNotSupported, Text: "zxsocket.Socket.Rewind"}
+}
+
+func clone(client socket.BaseSocketWithCtx) (Socket, error) {
+ req, obj, err := fidlIo.NewNodeWithCtxInterfaceRequest()
+ if err != nil {
+ return nil, err
+ }
+ if err := client.Clone(context.Background(), 0, req); err != nil {
+ return nil, err
+ }
+ return NewSocket((*socket.BaseSocketWithCtxInterface)(obj))
+}
+
+func bind(client socket.BaseSocketWithCtx, addr net.SocketAddress) error {
+ result, err := client.Bind(context.Background(), addr)
+ if err != nil {
+ return err
+ }
+ switch result.Which() {
+ case socket.BaseSocketBindResultErr:
+ return syscall.Errno(result.Err)
+ case socket.BaseSocketBindResultResponse:
+ return nil
+ default:
+ panic("unreachable")
+ }
+}
+
+func connect(client socket.BaseSocketWithCtx, addr net.SocketAddress) error {
+ result, err := client.Connect(context.Background(), addr)
+ if err != nil {
+ return err
+ }
+ switch result.Which() {
+ case socket.BaseSocketConnectResultErr:
+ return syscall.Errno(result.Err)
+ case socket.BaseSocketConnectResultResponse:
+ return nil
+ default:
+ panic("unreachable")
+ }
+}
+
+func getPeerName(client socket.BaseSocketWithCtx) (net.SocketAddress, error) {
+ result, err := client.GetPeerName(context.Background())
+ if err != nil {
+ return net.SocketAddress{}, err
+ }
+ switch result.Which() {
+ case socket.BaseSocketGetPeerNameResultErr:
+ return net.SocketAddress{}, syscall.Errno(result.Err)
+ case socket.BaseSocketGetPeerNameResultResponse:
+ return result.Response.Addr, nil
+ default:
+ panic("unreachable")
+ }
+}
+
+func getSockName(client socket.BaseSocketWithCtx) (net.SocketAddress, error) {
+ result, err := client.GetSockName(context.Background())
+ if err != nil {
+ return net.SocketAddress{}, err
+ }
+ switch result.Which() {
+ case socket.BaseSocketGetSockNameResultErr:
+ return net.SocketAddress{}, syscall.Errno(result.Err)
+ case socket.BaseSocketGetSockNameResultResponse:
+ return result.Response.Addr, nil
+ default:
+ panic("unreachable")
+ }
+}
+
+func setSockOpt(client socket.BaseSocketWithCtx, level int16, optname int16, optval []uint8) error {
+ result, err := client.SetSockOpt(context.Background(), level, optname, optval)
+ if err != nil {
+ return err
+ }
+ switch result.Which() {
+ case socket.BaseSocketSetSockOptResultErr:
+ return syscall.Errno(result.Err)
+ case socket.BaseSocketSetSockOptResultResponse:
+ return nil
+ default:
+ panic("unreachable")
+ }
+}
+
+type closeError struct {
+ fidl error
+ channel struct {
+ wait error
+ close error
+ }
+ handleClose error
+}
+
+func (err *closeError) Error() string {
+ var b strings.Builder
+ if err.fidl != nil {
+ if b.Len() != 0 {
+ b.WriteByte(' ')
+ }
+ b.WriteString("fidl=")
+ b.WriteString(err.fidl.Error())
+ }
+ if err.channel.wait != nil {
+ if b.Len() != 0 {
+ b.WriteByte(' ')
+ }
+ b.WriteString("channel.wait=")
+ b.WriteString(err.channel.wait.Error())
+ }
+ if err.channel.close != nil {
+ if b.Len() != 0 {
+ b.WriteByte(' ')
+ }
+ b.WriteString("channel.close=")
+ b.WriteString(err.channel.close.Error())
+ }
+ if err.handleClose != nil {
+ if b.Len() != 0 {
+ b.WriteByte(' ')
+ }
+ b.WriteString("handleClose=")
+ b.WriteString(err.handleClose.Error())
+ }
+ return b.String()
+}
+
+func closeSocket(client socket.BaseSocketWithCtx, channel *zx.Channel, handle *zx.Handle) error {
+ var err closeError
+ err.fidl = func() error {
+ status, err := client.Close(context.Background())
+ if err != nil {
+ return err
+ }
+ if status := zx.Status(status); status != zx.ErrOk {
+ return &zx.Error{Status: status, Text: "zxsocket.Socket.Close"}
+ }
+ return nil
+ }()
+ _, err.channel.wait = zxwait.Wait(*channel.Handle(), zx.SignalChannelPeerClosed, zx.TimensecInfinite)
+ err.channel.close = channel.Close()
+ err.handleClose = handle.Close()
+ if err.fidl == nil && err.channel.wait == nil && err.channel.close == nil && err.handleClose == nil {
+ return nil
+ }
+ return &err
+}
+
+// DatagramSocket is a datagram socket.
+type DatagramSocket struct {
+ stub
+
+ client socket.DatagramSocketWithCtxInterface
+ event zx.Handle
+}
+
+// Clone implements Socket.
+func (s *DatagramSocket) Clone() (fdio.FDIO, error) {
+ return clone(&s.client)
+}
+
+// Bind implements Socket.
+func (s *DatagramSocket) Bind(addr net.SocketAddress) error {
+ return bind(&s.client, addr)
+}
+
+// Connect implements Socket.
+func (s *DatagramSocket) Connect(addr net.SocketAddress) error {
+ return connect(&s.client, addr)
+}
+
+// GetPeerName implements Socket.
+func (s *DatagramSocket) GetPeerName() (net.SocketAddress, error) {
+ return getPeerName(&s.client)
+}
+
+// GetSockName implements Socket.
+func (s *DatagramSocket) GetSockName() (net.SocketAddress, error) {
+ return getSockName(&s.client)
+}
+
+// SetSockOpt implements Socket.
+func (s *DatagramSocket) SetSockOpt(level int16, optname int16, optval []uint8) error {
+ return setSockOpt(&s.client, level, optname, optval)
+}
+
+func (s *DatagramSocket) recvMsg(dataLen uint32) (net.SocketAddress, []byte, error) {
+ for {
+ result, err := s.client.RecvMsg(context.Background() /* wantAddr */, true, dataLen /* wantControl */, false, 0)
+ if err != nil {
+ return net.SocketAddress{}, nil, err
+ }
+ switch result.Which() {
+ case socket.DatagramSocketRecvMsgResultErr:
+ if err := syscall.Errno(result.Err); err != syscall.EAGAIN {
+ return net.SocketAddress{}, nil, err
+ }
+
+ obs, err := zxwait.Wait(s.event, SignalIncoming|SignalShutdownRead|zx.SignalEpairPeerClosed, zx.TimensecInfinite)
+ if err != nil {
+ return net.SocketAddress{}, nil, err
+ }
+ if obs&SignalIncoming != 0 {
+ continue
+ }
+ if obs&(SignalShutdownRead|zx.SignalEpairPeerClosed) != 0 {
+ return net.SocketAddress{}, nil, &zx.Error{Status: zx.ErrPeerClosed, Text: "zxsocket.DatagramSocket.RendMsg"}
+ }
+ panic("unreachable")
+
+ case socket.DatagramSocketRecvMsgResultResponse:
+ return *result.Response.Addr, result.Response.Data, nil
+ default:
+ panic("unreachable")
+ }
+ }
+}
+
+// RecvMsg implements roughly the recvmsg "system call". Its signature resembles
+// that of syscall.Revcvmsg on other platforms.
+func (s *DatagramSocket) RecvMsg(maxLen int) ([]byte, net.SocketAddress, error) {
+ addr, data, err := s.recvMsg(uint32(maxLen))
+ if err != nil {
+ return nil, net.SocketAddress{}, err
+ }
+ return data, addr, nil
+}
+
+func (s *DatagramSocket) sendMsg(addr *net.SocketAddress, data []byte) (int, error) {
+ result, err := s.client.SendMsg(context.Background(), addr, data, socket.SendControlData{}, 0)
+ if err != nil {
+ return 0, err
+ }
+ switch result.Which() {
+ case socket.DatagramSocketSendMsgResultErr:
+ return 0, syscall.Errno(result.Err)
+ case socket.DatagramSocketShutdownResultResponse:
+ return int(result.Response.Len), nil
+ default:
+ panic("unreachable")
+ }
+}
+
+// SendMsg implements roughly the sendmsg "system call". Its signature resembles
+// that of syscall.Sendmsg on other platforms.
+func (s *DatagramSocket) SendMsg(b []byte, addr net.SocketAddress) (int, error) {
+ switch addr.Which() {
+ case net.SocketAddressIpv4, net.SocketAddressIpv6:
+ return s.sendMsg(&addr, b)
+ default:
+ return s.sendMsg(nil, b)
+ }
+}
+
+// Close implements fdio.FDIO.
+func (s *DatagramSocket) Close() error {
+ return closeSocket(&s.client, &s.client.Channel, &s.event)
+}
+
+// Handles implements fdio.FDIO.
+func (s *DatagramSocket) Handles() []zx.Handle {
+ return []zx.Handle{*s.client.Handle(), s.event}
+}
+
+// Read implements fdio.FDIO.
+func (s *DatagramSocket) Read(data []byte) (int, error) {
+ _, b, err := s.recvMsg(uint32(len(data)))
+ return copy(data, b), err
+}
+
+// Write implements fdio.FDIO.
+func (s *DatagramSocket) Write(data []byte) (int, error) {
+ return s.sendMsg(nil, data)
+}
+
+// StreamSocket is a stream socket.
+type StreamSocket struct {
+ stub
+
+ client socket.StreamSocketWithCtxInterface
+ socket zx.Socket
+}
+
+// Clone implements Socket.
+func (s *StreamSocket) Clone() (fdio.FDIO, error) {
+ return clone(&s.client)
+}
+
+// Bind implements Socket.
+func (s *StreamSocket) Bind(addr net.SocketAddress) error {
+ return bind(&s.client, addr)
+}
+
+// Connect implements Socket.
+func (s *StreamSocket) Connect(addr net.SocketAddress) error {
+ return connect(&s.client, addr)
+}
+
+// GetPeerName implements Socket.
+func (s *StreamSocket) GetPeerName() (net.SocketAddress, error) {
+ return getPeerName(&s.client)
+}
+
+// GetSockName implements Socket.
+func (s *StreamSocket) GetSockName() (net.SocketAddress, error) {
+ return getSockName(&s.client)
+}
+
+// SetSockOpt implements Socket.
+func (s *StreamSocket) SetSockOpt(level int16, optname int16, optval []uint8) error {
+ return setSockOpt(&s.client, level, optname, optval)
+}
+
+// Accept accepts an incoming connection.
+func (s *StreamSocket) Accept(wantAddr bool) (*StreamSocket, *net.SocketAddress, error) {
+ result, err := s.client.Accept(context.Background(), wantAddr)
+ if err != nil {
+ return nil, nil, err
+ }
+ switch result.Which() {
+ case socket.StreamSocketAcceptResultErr:
+ return nil, nil, syscall.Errno(result.Err)
+ case socket.StreamSocketAcceptResultResponse:
+ newS, err := NewSocket(&socket.BaseSocketWithCtxInterface{Channel: result.Response.S.Channel})
+ if err != nil {
+ return nil, nil, err
+ }
+ return newS.(*StreamSocket), result.Response.Addr, nil
+ default:
+ panic("unreachable")
+ }
+}
+
+// Listen begins listening for incoming connections.
+func (s *StreamSocket) Listen(backlog int16) error {
+ result, err := s.client.Listen(context.Background(), backlog)
+ if err != nil {
+ return err
+ }
+ switch result.Which() {
+ case socket.StreamSocketListenResultErr:
+ return syscall.Errno(result.Err)
+ case socket.StreamSocketListenResultResponse:
+ return nil
+ default:
+ panic("unreachable")
+ }
+}
+
+// Wait waits on the receiver's socket handle until any of the provided signals
+// are asserted, or until the timeout elapses.
+func (s *StreamSocket) Wait(signals zx.Signals, timeout zx.Time) (zx.Signals, error) {
+ return zxwait.Wait(*s.socket.Handle(), signals, timeout)
+}
+
+// Close implements fdio.FDIO.
+func (s *StreamSocket) Close() error {
+ return closeSocket(&s.client, &s.client.Channel, s.socket.Handle())
+}
+
+// Handles implements fdio.FDIO.
+func (s *StreamSocket) Handles() []zx.Handle {
+ return []zx.Handle{*s.client.Handle(), *s.socket.Handle()}
+}
+
+// Read implements fdio.FDIO.
+func (s *StreamSocket) Read(data []byte) (int, error) {
+ for {
+ n, err := s.socket.Read(data, 0)
+ if err != nil {
+ if err, ok := err.(*zx.Error); ok {
+ switch err.Status {
+ case zx.ErrPeerClosed:
+ return 0, io.EOF
+ case zx.ErrShouldWait:
+ obs, err := s.Wait(zx.SignalSocketReadable|zx.SignalSocketPeerClosed, zx.TimensecInfinite)
+ if err != nil {
+ if err, ok := err.(*zx.Error); ok {
+ switch err.Status {
+ case zx.ErrBadHandle, zx.ErrCanceled:
+ return 0, io.EOF
+ }
+ }
+ return 0, err
+ }
+ switch {
+ case obs&zx.SignalSocketReadable != 0:
+ continue
+ case obs&zx.SignalSocketPeerClosed != 0:
+ return 0, io.EOF
+ }
+ }
+ }
+ return 0, err
+ }
+ return n, nil
+ }
+}
+
+// Write implements fdio.FDIO.
+func (s *StreamSocket) Write(data []byte) (int, error) {
+ var total int
+ for {
+ n, err := s.socket.Write(data, 0)
+ total += n
+ if err != nil {
+ if err, ok := err.(*zx.Error); ok {
+ switch err.Status {
+ case zx.ErrShouldWait:
+ obs, err := s.Wait(zx.SignalSocketWritable|zx.SignalSocketPeerClosed|zx.SignalSocketWriteDisabled, zx.TimensecInfinite)
+ if err != nil {
+ return total, err
+ }
+ if obs&zx.SignalSocketPeerClosed != 0 || obs&zx.SignalSocketWriteDisabled != 0 {
+ return total, &zx.Error{Status: zx.ErrPeerClosed, Text: "zxsocket.Socket.Write"}
+ }
+ if obs&zx.SignalSocketWritable != 0 {
+ data = data[n:]
+ continue
+ }
+ // This case should be impossible:
+ return total, &zx.Error{Status: zx.ErrInternal, Text: "zxsocket.Socket.Write(impossible state)"}
+ }
+ }
+ return total, err
+ }
+ return total, nil
+ }
+}
diff --git a/src/syscall/zx/zxwait/zxwait.go b/src/syscall/zx/zxwait/zxwait.go
new file mode 100644
index 0000000..537bf5f
--- /dev/null
+++ b/src/syscall/zx/zxwait/zxwait.go
@@ -0,0 +1,246 @@
+// 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's distribution tools attempt to compile everything; this file
+// depends on types that don't compile in not-Fuchsia.
+// +build fuchsia
+
+// Package zxwait implements a Zircon port waiter compatible with goroutines.
+//
+// The function Wait can be used to wait on a handle without consuming
+// an OS thread or resorting to event-driven programming.
+package zxwait
+
+import (
+ "strconv"
+ "sync"
+ "sync/atomic"
+ "syscall/zx"
+ _ "unsafe" // for go:linkname
+)
+
+// Wait waits for signals on handle.
+//
+// The goroutine that calls Wait is parked until a signal is observed or the
+// handle is closed. No OS thread is tied up while Wait is blocked.
+//
+// Semantically it is equivalent to calling the WaitOne method on a zx.Handle.
+// However it is not implemented with zx_object_wait_one, instead it uses
+// zx_object_wait_async and a port to wait for signals.
+func Wait(handle zx.Handle, signals zx.Signals, timeout zx.Time) (zx.Signals, error) {
+ // TODO: support finite timeouts.
+ if timeout != zx.TimensecInfinite {
+ var observed zx.Signals
+ if status := zx.Sys_object_wait_one(handle, signals, timeout, &observed); status != zx.ErrOk {
+ return observed, &zx.Error{Status: status, Text: "zxwait.Wait"}
+ }
+ return observed, nil
+ }
+ sysWaiterOnce.Do(sysWaiterInit)
+ return sysWaiter.Wait(handle, signals)
+}
+
+func WithRetry(fn func() error, handle zx.Handle, ready, closed zx.Signals) error {
+ signals := ready | closed
+ for {
+ err := fn()
+ if err, ok := err.(*zx.Error); ok && err.Status == zx.ErrShouldWait {
+ obs, err := Wait(
+ handle,
+ signals,
+ zx.TimensecInfinite,
+ )
+ if err != nil {
+ return err
+ }
+ if obs&ready != 0 {
+ continue
+ }
+ if obs&closed != 0 {
+ return &zx.Error{Status: zx.ErrPeerClosed}
+ }
+ panic("unexpected signal mask " + strconv.FormatUint(uint64(obs), 2) + " (expected " + strconv.FormatUint(uint64(signals), 2) + ")")
+ }
+ return err
+ }
+}
+
+//go:linkname gopark runtime.gopark
+func gopark(unlockf func(g uintptr, waiting *waitingG) bool, waitng *waitingG, reason uint8, traceEv byte, traceskip int)
+
+//go:linkname goready runtime.goready
+func goready(g uintptr, traceskip int)
+
+const preparingG = 1
+
+// waitingG is used to track a parked g waiting for a signal.
+//
+// A waitingG is represented by a unique key, which is also its positional
+// index in the waiter's all slice. This key is not a GCed pointer, so it can
+// be safely passed to the kernel and returned at a later time.
+type waitingG struct {
+ // key is an index into the waiter's all slice. It is never modified.
+ key uint64
+
+ g uintptr
+
+ obs zx.Signals
+}
+
+// A waiter is a zircon port that parks goroutines waiting on signals.
+//
+// Currently there is only one instance of waiter per process, stored
+// in sysWaiter. It is however a self-contained object and multiple
+// of them can safely exist concurrently.
+type waiter struct {
+ port zx.Port
+
+ mu struct {
+ sync.Mutex
+ free []*waitingG
+ all []*waitingG
+
+ allByHandle map[zx.Handle]map[*waitingG]struct{}
+ }
+}
+
+func init() {
+ port, err := zx.NewPort(0)
+ if err != nil {
+ panic(err) // misuse of system call, no useful recovery
+ }
+ sysWaiter.port = port
+ sysWaiter.mu.allByHandle = make(map[zx.Handle]map[*waitingG]struct{})
+ zx.SetZXWaitCloseFn(sysWaiter.close)
+}
+
+var sysWaiterOnce sync.Once
+var sysWaiter waiter
+
+func sysWaiterInit() {
+ go sysWaiter.dequeue()
+}
+
+// dequeue is a dedicated goroutine to waiting on the waiter's port.
+func (w *waiter) dequeue() {
+ var pkt zx.Packet
+ for {
+ if err := w.port.Wait(&pkt, zx.TimensecInfinite); err != nil {
+ panic(err)
+ }
+
+ w.mu.Lock()
+ waiting := w.mu.all[pkt.Hdr.Key]
+ w.mu.Unlock()
+
+ switch pkt.Hdr.Type {
+ case zx.PortPacketTypeUser:
+ waiting.obs = zx.SignalHandleClosed
+ default:
+ waiting.obs = pkt.Signal().Observed
+ }
+
+ switch g := atomic.SwapUintptr(&waiting.g, 0); g {
+ case 0, preparingG:
+ default:
+ goready(g, 0)
+ }
+ }
+}
+
+func (w *waiter) close(handle zx.Handle, cb func(zx.Handle) error) error {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+ for waiting := range w.mu.allByHandle[handle] {
+ switch status := zx.Sys_port_cancel(zx.Handle(w.port), handle, waiting.key); status {
+ case zx.ErrOk:
+ if err := w.port.Queue(&zx.Packet{Hdr: zx.PacketHeader{
+ Key: waiting.key,
+ Type: zx.PortPacketTypeUser,
+ }}); err != nil {
+ return err
+ }
+ case zx.ErrNotFound:
+ // Nobody is waiting, no need to notify.
+ default:
+ return &zx.Error{Status: status, Text: "zx.Port.Cancel"}
+ }
+ }
+ return cb(handle)
+}
+
+// Wait waits for signals on handle.
+//
+// See the package function Wait for more commentary.
+func (w *waiter) Wait(handle zx.Handle, signals zx.Signals) (zx.Signals, error) {
+ var waiting *waitingG
+
+ w.mu.Lock()
+ if len(w.mu.free) == 0 {
+ waiting = &waitingG{
+ key: uint64(len(w.mu.all)),
+ }
+ w.mu.all = append(w.mu.all, waiting)
+ } else {
+ waiting = w.mu.free[len(w.mu.free)-1]
+ w.mu.free = w.mu.free[:len(w.mu.free)-1]
+ }
+ waiting.g = preparingG
+ m, ok := w.mu.allByHandle[handle]
+ if !ok {
+ m = make(map[*waitingG]struct{})
+ w.mu.allByHandle[handle] = m
+ }
+ m[waiting] = struct{}{}
+ // waiting must be fully initialized before a wakeup in dequeue is possible -
+ // after the call to wait_async and when the mutex is not held.
+ err := w.port.WaitAsync(handle, waiting.key, signals, zx.PortWaitAsyncOnce)
+ w.mu.Unlock()
+
+ defer func() {
+ w.mu.Lock()
+ delete(m, waiting)
+ if len(m) == 0 {
+ delete(w.mu.allByHandle, handle)
+ }
+ w.mu.free = append(w.mu.free, waiting)
+ w.mu.Unlock()
+ }()
+
+ if err != nil {
+ return 0, err
+ }
+
+ const waitReasonIOWait = 2
+ const traceEvGoBlockSelect = 24
+ gopark(w.unlockf, waiting, waitReasonIOWait, traceEvGoBlockSelect, 0)
+
+ obs := waiting.obs
+
+ return obs, func() error {
+ if obs == zx.SignalHandleClosed {
+ return &zx.Error{Status: zx.ErrCanceled, Text: "zxwait.Wait"}
+ }
+ return nil
+ }()
+}
+
+// unlockf is passed as a callback to gopark.
+//
+// Reporting true will park the goroutine until goready is called.
+//
+// Reporting false will immediately start running the goroutine
+// again, and nothing else should call goready.
+//
+// This method is called without a 'g', so it can do very little.
+// Avoid the stack. Don't use anything with 'g'-based runtime
+// support (like sync.Mutex). Do as little as possible.
+func (w *waiter) unlockf(g uintptr, waiting *waitingG) bool {
+ // If we can set ready, then this executed before dequeue
+ // and the goroutine will be parked.
+ //
+ // If we cannot set it, then dequeue has already run and
+ // waiting.obs is set, so do not park the goroutine.
+ return atomic.CompareAndSwapUintptr(&waiting.g, preparingG, g)
+}
diff --git a/src/syscall/zx/zxwait/zxwait.s b/src/syscall/zx/zxwait/zxwait.s
new file mode 100644
index 0000000..a35105e
--- /dev/null
+++ b/src/syscall/zx/zxwait/zxwait.s
@@ -0,0 +1,5 @@
+// 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.
+
+// Empty assembly file so empty func definitions work.
diff --git a/src/syscall/zx/zxwait/zxwait_test.go b/src/syscall/zx/zxwait/zxwait_test.go
new file mode 100644
index 0000000..a0bbd33
--- /dev/null
+++ b/src/syscall/zx/zxwait/zxwait_test.go
@@ -0,0 +1,254 @@
+// 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 mod` ignores file names for the purpose of resolving
+// dependencies, and zxwait doesn't build on not-Fuchsia.
+// +build fuchsia
+
+package zxwait_test
+
+import (
+ "fmt"
+ "runtime"
+ "sync"
+ "syscall/zx"
+ "syscall/zx/zxwait"
+ "testing"
+)
+
+func TestWaitPreexisting(t *testing.T) {
+ c0, c1, err := zx.NewChannel(0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer func() {
+ _ = c0.Close()
+ _ = c1.Close()
+ }()
+
+ for _, ch := range [...]zx.Channel{c0, c1} {
+ obs, err := zxwait.Wait(*ch.Handle(), zx.SignalChannelWritable, zx.TimensecInfinite)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if want := zx.Signals(zx.SignalChannelWritable); obs != want {
+ t.Errorf("got obs = %x, want = %x", obs, want)
+ }
+ }
+}
+
+type waitResult struct {
+ obs zx.Signals
+ err error
+}
+
+func TestWait(t *testing.T) {
+ var pairs [][2]zx.Channel
+ defer func() {
+ for _, pair := range pairs {
+ for _, ch := range pair {
+ _ = ch.Close()
+ }
+ }
+ }()
+
+ ch := make(chan waitResult, 100)
+ for i := 0; i < cap(ch); i++ {
+ ch1, ch2, err := zx.NewChannel(0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ pair := [...]zx.Channel{ch1, ch2}
+ pairs = append(pairs, pair)
+ go func() {
+ obs, err := zxwait.Wait(*pair[0].Handle(), zx.SignalChannelReadable, zx.TimensecInfinite)
+ ch <- waitResult{obs: obs, err: err}
+ }()
+ }
+
+ b := []byte("hello")
+ for i, pair := range pairs {
+ if err := pair[1].Write(b, nil, 0); err != nil {
+ t.Fatalf("%d: %s", i, err)
+ }
+ }
+
+ for i := 0; i < cap(ch); i++ {
+ waitResult := <-ch
+ if err := waitResult.err; err != nil {
+ t.Fatal(err)
+ }
+ if obs, want := waitResult.obs, zx.Signals(zx.SignalChannelReadable|zx.SignalChannelWritable); obs != want {
+ t.Errorf("%d: got obs = %b, want = %b", i, obs, want)
+ }
+ }
+}
+
+func TestWait_LocalClose(t *testing.T) {
+ event, err := zx.NewEvent(0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer func() {
+ _ = event.Close()
+ }()
+ ch := make(chan waitResult, 100)
+ var wg sync.WaitGroup
+ for i := 0; i < cap(ch)-1; i++ {
+ wg.Add(1)
+ go func() {
+ wg.Done()
+ obs, err := zxwait.Wait(*event.Handle(), 0, zx.TimensecInfinite)
+ ch <- waitResult{obs: obs, err: err}
+ }()
+ }
+ // Wait for all goroutines to be scheduled.
+ wg.Wait()
+ if err := event.Close(); err != nil {
+ t.Fatal(err)
+ }
+ // Guarantee at least one result happens after local close.
+ {
+ obs, err := zxwait.Wait(*event.Handle(), 0, zx.TimensecInfinite)
+ ch <- waitResult{obs: obs, err: err}
+ }
+ var badHandle, cancelled int
+ for i := 0; i < cap(ch); i++ {
+ waitResult := <-ch
+ err := waitResult.err
+ switch err := err.(type) {
+ case *zx.Error:
+ obs := waitResult.obs
+ switch err.Status {
+ case zx.ErrBadHandle:
+ // This goroutine didn't get scheduled in time.
+ if want := zx.Signals(0); obs != want {
+ t.Errorf("%d: got obs = %b, want = %b", i, obs, want)
+ }
+ badHandle++
+ continue
+ case zx.ErrCanceled:
+ if want := zx.Signals(zx.SignalHandleClosed); obs != want {
+ t.Errorf("%d: got obs = %b, want = %b", i, obs, want)
+ }
+ cancelled++
+ continue
+ }
+ }
+ t.Errorf("%d: got zxwait.Wait(<closed handle>) = (_, %s), want = (_, %s or %s)", i, err, zx.ErrBadHandle, zx.ErrCanceled)
+ }
+ if badHandle == 0 {
+ t.Errorf("failed to observe post-close condition")
+ }
+ if cancelled == 0 {
+ t.Error("failed to observe pre-close condition")
+ }
+}
+
+func TestWait_LocalCloseRace(t *testing.T) {
+ var wg sync.WaitGroup
+
+ for i := 0; i < 100; i++ {
+ // Start a wait, assert the signal, and close the handle. This is a
+ // regression test for an issue where internal state was reused without
+ // cancelling pending waits, causing future waits to catch stale wakeups.
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+
+ if err := func() error {
+ var event zx.Handle
+ if status := zx.Sys_event_create(0, &event); status != zx.ErrOk {
+ return &zx.Error{Status: status, Text: "failed to create event"}
+ }
+ defer func() {
+ _ = event.Close()
+ }()
+
+ // Buffer the channel to avoid leaking a goroutine in case of error
+ // below.
+ ch := make(chan error, 1)
+ // Capture the event by value to avoid racing against the Close call,
+ // which resets its receiver.
+ go func(event zx.Handle) {
+ ch <- func() error {
+ obs, err := zxwait.Wait(event, zx.SignalUser0, zx.TimensecInfinite)
+ if err != nil {
+ if err, ok := err.(*zx.Error); ok {
+ switch err.Status {
+ case zx.ErrCanceled:
+ if obs != zx.SignalHandleClosed {
+ return fmt.Errorf("got zxwait.Wait(..., %b, ...) = %b", zx.SignalUser0, obs)
+ }
+ fallthrough
+ case zx.ErrBadHandle:
+ // We lost the race against the Close call; it's fine.
+ return nil
+ }
+ }
+ return fmt.Errorf("failed to zxwait: %w", err)
+ }
+ if obs != zx.SignalUser0 {
+ return fmt.Errorf("got zxwait.Wait(..., %b, ...) = %b", zx.SignalUser0, obs)
+ }
+ return nil
+ }()
+ }(event)
+
+ // Yield to allow the goroutine to be scheduled, beginning the wait.
+ runtime.Gosched()
+
+ if err := event.Signal(0, zx.SignalUser0); err != nil {
+ return fmt.Errorf("failed to signal event: %w", err)
+ }
+ if err := event.Close(); err != nil {
+ return fmt.Errorf("failed to close event: %w", err)
+ }
+
+ return <-ch
+ }(); err != nil {
+ t.Error(err)
+ }
+ }()
+
+ // Create a new event, assert a (different) signal, and wait for that
+ // signal; if internal state was incorrectly reused, the wait will return
+ // the previous wait's signal.
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+
+ if err := func() error {
+ var event zx.Handle
+ if status := zx.Sys_event_create(0, &event); status != zx.ErrOk {
+ return &zx.Error{Status: status, Text: "failed to create event"}
+ }
+ defer func() {
+ _ = event.Close()
+ }()
+
+ if err := event.Signal(0, zx.SignalUser1); err != nil {
+ return fmt.Errorf("failed to signal event: %w", err)
+ }
+
+ obs, err := zxwait.Wait(event, zx.SignalUser1, zx.TimensecInfinite)
+ if err != nil {
+ return fmt.Errorf("failed to zxwait: %w", err)
+ }
+ if obs != zx.SignalUser1 {
+ return fmt.Errorf("got zxwait.Wait(..., %b, ...) = %b", zx.SignalUser1, obs)
+ }
+
+ if err := event.Close(); err != nil {
+ return fmt.Errorf("failed to close event: %w", err)
+ }
+ return nil
+ }(); err != nil {
+ t.Error(err)
+ }
+ }()
+ }
+
+ wg.Wait()
+}
diff --git a/src/time/sys_fuchsia.go b/src/time/sys_fuchsia.go
new file mode 100644
index 0000000..2a28362
--- /dev/null
+++ b/src/time/sys_fuchsia.go
@@ -0,0 +1,33 @@
+// 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 time
+
+// for testing: whatever interrupts a sleep
+func interrupt() {
+}
+
+func initLocal() {
+ localLoc.name = "UTC"
+}
+
+func read(fd uintptr, buf []byte) (int, error) {
+ panic("TODO")
+}
+
+func open(name string) (uintptr, error) {
+ panic("TODO")
+}
+
+func closefd(fd uintptr) {
+ panic("TODO")
+}
+
+func preadn(fd uintptr, buf []byte, off int) error {
+ panic("TODO")
+}
+
+func isNotExist(err error) bool {
+ panic("TODO")
+}
diff --git a/src/time/zoneinfo_fuchsia.go b/src/time/zoneinfo_fuchsia.go
new file mode 100644
index 0000000..09a6696
--- /dev/null
+++ b/src/time/zoneinfo_fuchsia.go
@@ -0,0 +1,7 @@
+// 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 time
+
+var zoneSources = []string{}