[fidl] Read and write correct flag bits in txn headers
Use the header to obtain the unmarshaling context for reading requests
and use the marshaler context to update the header for writing responses
in the Go bindings. Previously this was done on the client side but
not on the server side.
Test: fx run-test go_fidl_tests
Change-Id: Iad057d22fd9d7f6b2ac9c7aa6a5a8f52e73d2386
diff --git a/src/syscall/zx/fidl/bindings.go b/src/syscall/zx/fidl/bindings.go
index 4ddc392..74cbfed 100644
--- a/src/syscall/zx/fidl/bindings.go
+++ b/src/syscall/zx/fidl/bindings.go
@@ -161,23 +161,27 @@
}
}()
- var header MessageHeader
- hnb, _, err := Unmarshal(msg, nil, &header)
+ var reqHeader MessageHeader
+ hnb, _, err := Unmarshal(msg, nil, &reqHeader)
if err != nil {
return false, err
}
- if !header.IsSupportedVersion() {
+ if !reqHeader.IsSupportedVersion() {
return false, ErrUnknownMagic
}
- p, shouldRespond, err := b.Stub.DispatchImpl(header.Ordinal, msg[hnb:], handles)
+ ctx := reqHeader.NewCtx()
+ p, shouldRespond, err := b.Stub.DispatchImplWithCtx(reqHeader.Ordinal, ctx, msg[hnb:], handles)
if err != nil {
return false, err
}
if shouldRespond {
- cnb, cnh, err := MarshalHeaderThenMessage(&header, p, respb, resph)
+ respHeader := ctx.NewHeader()
+ respHeader.Ordinal = reqHeader.Ordinal
+ respHeader.Txid = reqHeader.Txid
+ cnb, cnh, err := MarshalHeaderThenMessage(&respHeader, p, respb, resph)
if err != nil {
return false, err
}
diff --git a/src/syscall/zx/fidl/bindingstest/impl.go b/src/syscall/zx/fidl/bindingstest/impl.go
index 9d30822..2ab7053 100644
--- a/src/syscall/zx/fidl/bindingstest/impl.go
+++ b/src/syscall/zx/fidl/bindingstest/impl.go
@@ -1182,7 +1182,7 @@
type test1EchoRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- In *string `fidl:"0," fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ In *string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mtest1EchoRequest = _bindings.CreateLazyMarshaler(test1EchoRequest{})
@@ -1193,7 +1193,7 @@
type test1EchoResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Out *string `fidl:"0," fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Out *string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mtest1EchoResponse = _bindings.CreateLazyMarshaler(test1EchoResponse{})
@@ -1204,7 +1204,7 @@
type test1SurpriseResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Foo string `fidl:"0," fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Foo string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mtest1SurpriseResponse = _bindings.CreateLazyMarshaler(test1SurpriseResponse{})
@@ -1263,12 +1263,17 @@
}
func (s_ *Test1Stub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *Test1Stub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
case Test1EchoOrdinal:
fallthrough
case Test1EchoGenOrdinal:
in_ := test1EchoRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
out, err_ := s_.Impl.Echo(in_.In)
@@ -1330,6 +1335,11 @@
}
func (s_ *EthernetDeviceStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *EthernetDeviceStub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
}
return nil, false, _bindings.ErrUnknownOrdinal
diff --git a/src/syscall/zx/fidl/conformance/impl.go b/src/syscall/zx/fidl/conformance/impl.go
index 527e6bd..f272586 100644
--- a/src/syscall/zx/fidl/conformance/impl.go
+++ b/src/syscall/zx/fidl/conformance/impl.go
@@ -2,13 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
-// Code generated by tools/fidl/gidl-conformance-suite/regen.sh; DO NOT EDIT.
+// GENERATED FILE: Do not edit!
+//
+// To rebuild this file, invoke third_party/go/regen-fidl.
// +build fuchsia
-//
-// Code generated by fidlgen; DO NOT EDIT.
-
package conformance
import (
@@ -16,276 +15,6 @@
_bindings "syscall/zx/fidl"
)
-type UnionWithBoundStringStruct struct {
- _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- V UnionWithBoundString `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mUnionWithBoundStringStruct = _bindings.CreateLazyMarshaler(UnionWithBoundStringStruct{})
-
-func (msg *UnionWithBoundStringStruct) Marshaler() _bindings.Marshaler {
- return _mUnionWithBoundStringStruct
-}
-
-type SingleVariantUnionStruct struct {
- _ struct{} `fidl:"s,8,4" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- U SingleVariantUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mSingleVariantUnionStruct = _bindings.CreateLazyMarshaler(SingleVariantUnionStruct{})
-
-func (msg *SingleVariantUnionStruct) Marshaler() _bindings.Marshaler {
- return _mSingleVariantUnionStruct
-}
-
-type Length2StringWrapper struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- Length2String string `fidl:"0,2" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mLength2StringWrapper = _bindings.CreateLazyMarshaler(Length2StringWrapper{})
-
-func (msg *Length2StringWrapper) Marshaler() _bindings.Marshaler {
- return _mLength2StringWrapper
-}
-
-type StringWrapper struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- Str string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mStringWrapper = _bindings.CreateLazyMarshaler(StringWrapper{})
-
-func (msg *StringWrapper) Marshaler() _bindings.Marshaler {
- return _mStringWrapper
-}
-
-type TestXUnionInTable struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- Value XUnionInTable `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mTestXUnionInTable = _bindings.CreateLazyMarshaler(TestXUnionInTable{})
-
-func (msg *TestXUnionInTable) Marshaler() _bindings.Marshaler {
- return _mTestXUnionInTable
-}
-
-type InterfaceConfig struct {
- _ struct{} `fidl:"s,48,8" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
- Name string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- IpAddressConfig IpAddressConfig `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
-}
-
-var _mInterfaceConfig = _bindings.CreateLazyMarshaler(InterfaceConfig{})
-
-func (msg *InterfaceConfig) Marshaler() _bindings.Marshaler {
- return _mInterfaceConfig
-}
-
-type TestAddEthernetDeviceRequest struct {
- _ struct{} `fidl:"s,72,8" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
- TopologicalPath string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Config InterfaceConfig `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- ThisShouldBeAHandle uint32 `fidl:"64" fidl_offset_v1:"56" fidl_offset_v1_no_ee:"56"`
-}
-
-var _mTestAddEthernetDeviceRequest = _bindings.CreateLazyMarshaler(TestAddEthernetDeviceRequest{})
-
-func (msg *TestAddEthernetDeviceRequest) Marshaler() _bindings.Marshaler {
- return _mTestAddEthernetDeviceRequest
-}
-
-type NodeAttributes struct {
- _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
- Mode uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Id uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- ContentSize uint64 `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- StorageSize uint64 `fidl:"24" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
- LinkCount uint64 `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
- CreationTime uint64 `fidl:"40" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
- ModificationTime uint64 `fidl:"48" fidl_offset_v1:"48" fidl_offset_v1_no_ee:"48"`
-}
-
-var _mNodeAttributes = _bindings.CreateLazyMarshaler(NodeAttributes{})
-
-func (msg *NodeAttributes) Marshaler() _bindings.Marshaler {
- return _mNodeAttributes
-}
-
-type FileGetAttrResponse struct {
- _ struct{} `fidl:"s,64,8" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
- S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
-}
-
-var _mFileGetAttrResponse = _bindings.CreateLazyMarshaler(FileGetAttrResponse{})
-
-func (msg *FileGetAttrResponse) Marshaler() _bindings.Marshaler {
- return _mFileGetAttrResponse
-}
-
-type StructOfSimpleTable struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- Table SimpleTable `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mStructOfSimpleTable = _bindings.CreateLazyMarshaler(StructOfSimpleTable{})
-
-func (msg *StructOfSimpleTable) Marshaler() _bindings.Marshaler {
- return _mStructOfSimpleTable
-}
-
-type SimpleTableThenUint64 struct {
- _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- Table SimpleTable `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Number uint64 `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
-}
-
-var _mSimpleTableThenUint64 = _bindings.CreateLazyMarshaler(SimpleTableThenUint64{})
-
-func (msg *SimpleTableThenUint64) Marshaler() _bindings.Marshaler {
- return _mSimpleTableThenUint64
-}
-
-type StructOfTableWithStringAndVector struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- Table TableWithStringAndVector `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mStructOfTableWithStringAndVector = _bindings.CreateLazyMarshaler(StructOfTableWithStringAndVector{})
-
-func (msg *StructOfTableWithStringAndVector) Marshaler() _bindings.Marshaler {
- return _mStructOfTableWithStringAndVector
-}
-
-type Int64Struct struct {
- _ struct{} `fidl:"s,8,8" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
- X int64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{})
-
-func (msg *Int64Struct) Marshaler() _bindings.Marshaler {
- return _mInt64Struct
-}
-
-type TestInlineXUnionInStruct struct {
- _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
- Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Xu SampleXUnion `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- After string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
-}
-
-var _mTestInlineXUnionInStruct = _bindings.CreateLazyMarshaler(TestInlineXUnionInStruct{})
-
-func (msg *TestInlineXUnionInStruct) Marshaler() _bindings.Marshaler {
- return _mTestInlineXUnionInStruct
-}
-
-type TestOptionalXUnionInStruct struct {
- _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
- Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Xu *SampleXUnion `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- After string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
-}
-
-var _mTestOptionalXUnionInStruct = _bindings.CreateLazyMarshaler(TestOptionalXUnionInStruct{})
-
-func (msg *TestOptionalXUnionInStruct) Marshaler() _bindings.Marshaler {
- return _mTestOptionalXUnionInStruct
-}
-
-type TestStrictXUnionInStruct struct {
- _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- Xu SampleStrictXUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mTestStrictXUnionInStruct = _bindings.CreateLazyMarshaler(TestStrictXUnionInStruct{})
-
-func (msg *TestStrictXUnionInStruct) Marshaler() _bindings.Marshaler {
- return _mTestStrictXUnionInStruct
-}
-
-type TestFlexibleXUnionInStruct struct {
- _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- Xu SampleXUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
-}
-
-var _mTestFlexibleXUnionInStruct = _bindings.CreateLazyMarshaler(TestFlexibleXUnionInStruct{})
-
-func (msg *TestFlexibleXUnionInStruct) Marshaler() _bindings.Marshaler {
- return _mTestFlexibleXUnionInStruct
-}
-
-type StructWithOptionals struct {
- _ struct{} `fidl:"s,104,8" fidl_size_v1:"128" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"128" fidl_alignment_v1_no_ee:"8"`
- S EmptyStruct `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- S2 *EmptyStruct `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- T TableWithEmptyStruct `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Xu XUnionWithEmptyStruct `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
- Xu2 *XUnionWithEmptyStruct `fidl:"56" fidl_offset_v1:"56" fidl_offset_v1_no_ee:"56"`
- U UnionWithEmptyStruct `fidl:"80" fidl_offset_v1:"80" fidl_offset_v1_no_ee:"80"`
- U2 *UnionWithEmptyStruct `fidl:"96" fidl_offset_v1:"104" fidl_offset_v1_no_ee:"104"`
-}
-
-var _mStructWithOptionals = _bindings.CreateLazyMarshaler(StructWithOptionals{})
-
-func (msg *StructWithOptionals) Marshaler() _bindings.Marshaler {
- return _mStructWithOptionals
-}
-
-type EmptyStruct struct {
- _ struct{} `fidl:"s,1,1" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
-}
-
-var _mEmptyStruct = _bindings.CreateLazyMarshaler(EmptyStruct{})
-
-func (msg *EmptyStruct) Marshaler() _bindings.Marshaler {
- return _mEmptyStruct
-}
-
-type EmptyStructSandwich struct {
- _ struct{} `fidl:"s,40,8" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
- Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- Es EmptyStruct `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- After string `fidl:"24," fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
-}
-
-var _mEmptyStructSandwich = _bindings.CreateLazyMarshaler(EmptyStructSandwich{})
-
-func (msg *EmptyStructSandwich) Marshaler() _bindings.Marshaler {
- return _mEmptyStructSandwich
-}
-
-type Uint8Uint16Uint32Uint64 struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- F1 uint8 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- F2 uint16 `fidl:"2" fidl_offset_v1:"2" fidl_offset_v1_no_ee:"2"`
- F3 uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
- F4 uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
-}
-
-var _mUint8Uint16Uint32Uint64 = _bindings.CreateLazyMarshaler(Uint8Uint16Uint32Uint64{})
-
-func (msg *Uint8Uint16Uint32Uint64) Marshaler() _bindings.Marshaler {
- return _mUint8Uint16Uint32Uint64
-}
-
-type Uint64Uint32Uint16Uint8 struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- F1 uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
- F2 uint32 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
- F3 uint16 `fidl:"12" fidl_offset_v1:"12" fidl_offset_v1_no_ee:"12"`
- F4 uint8 `fidl:"14" fidl_offset_v1:"14" fidl_offset_v1_no_ee:"14"`
-}
-
-var _mUint64Uint32Uint16Uint8 = _bindings.CreateLazyMarshaler(Uint64Uint32Uint16Uint8{})
-
-func (msg *Uint64Uint32Uint16Uint8) Marshaler() _bindings.Marshaler {
- return _mUint64Uint32Uint16Uint8
-}
-
type ThreeByte struct {
_ struct{} `fidl:"s,3,1" fidl_size_v1:"3" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"3" fidl_alignment_v1_no_ee:"1"`
Elem1 uint8 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
@@ -425,6 +154,88 @@
return _mStructWithVectors
}
+type TestXUnionInTable struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ Value XUnionInTable `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mTestXUnionInTable = _bindings.CreateLazyMarshaler(TestXUnionInTable{})
+
+func (msg *TestXUnionInTable) Marshaler() _bindings.Marshaler {
+ return _mTestXUnionInTable
+}
+
+type InterfaceConfig struct {
+ _ struct{} `fidl:"s,48,8" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
+ Name string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ IpAddressConfig IpAddressConfig `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+}
+
+var _mInterfaceConfig = _bindings.CreateLazyMarshaler(InterfaceConfig{})
+
+func (msg *InterfaceConfig) Marshaler() _bindings.Marshaler {
+ return _mInterfaceConfig
+}
+
+type TestAddEthernetDeviceRequest struct {
+ _ struct{} `fidl:"s,72,8" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
+ TopologicalPath string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Config InterfaceConfig `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ ThisShouldBeAHandle uint32 `fidl:"64" fidl_offset_v1:"56" fidl_offset_v1_no_ee:"56"`
+}
+
+var _mTestAddEthernetDeviceRequest = _bindings.CreateLazyMarshaler(TestAddEthernetDeviceRequest{})
+
+func (msg *TestAddEthernetDeviceRequest) Marshaler() _bindings.Marshaler {
+ return _mTestAddEthernetDeviceRequest
+}
+
+type NodeAttributes struct {
+ _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
+ Mode uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Id uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ ContentSize uint64 `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ StorageSize uint64 `fidl:"24" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ LinkCount uint64 `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+ CreationTime uint64 `fidl:"40" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ ModificationTime uint64 `fidl:"48" fidl_offset_v1:"48" fidl_offset_v1_no_ee:"48"`
+}
+
+var _mNodeAttributes = _bindings.CreateLazyMarshaler(NodeAttributes{})
+
+func (msg *NodeAttributes) Marshaler() _bindings.Marshaler {
+ return _mNodeAttributes
+}
+
+type FileGetAttrResponse struct {
+ _ struct{} `fidl:"s,64,8" fidl_size_v1:"64" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"8"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+}
+
+var _mFileGetAttrResponse = _bindings.CreateLazyMarshaler(FileGetAttrResponse{})
+
+func (msg *FileGetAttrResponse) Marshaler() _bindings.Marshaler {
+ return _mFileGetAttrResponse
+}
+
+type StructWithOptionals struct {
+ _ struct{} `fidl:"s,104,8" fidl_size_v1:"128" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"128" fidl_alignment_v1_no_ee:"8"`
+ S EmptyStruct `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ S2 *EmptyStruct `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ T TableWithEmptyStruct `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Xu XUnionWithEmptyStruct `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+ Xu2 *XUnionWithEmptyStruct `fidl:"56" fidl_offset_v1:"56" fidl_offset_v1_no_ee:"56"`
+ U UnionWithEmptyStruct `fidl:"80" fidl_offset_v1:"80" fidl_offset_v1_no_ee:"80"`
+ U2 *UnionWithEmptyStruct `fidl:"96" fidl_offset_v1:"104" fidl_offset_v1_no_ee:"104"`
+}
+
+var _mStructWithOptionals = _bindings.CreateLazyMarshaler(StructWithOptionals{})
+
+func (msg *StructWithOptionals) Marshaler() _bindings.Marshaler {
+ return _mStructWithOptionals
+}
+
type MyBool struct {
_ struct{} `fidl:"s,1,1" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
Value bool `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
@@ -557,6 +368,113 @@
return _mMyFloat64
}
+type Length2StringWrapper struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ Length2String string `fidl:"0,2" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mLength2StringWrapper = _bindings.CreateLazyMarshaler(Length2StringWrapper{})
+
+func (msg *Length2StringWrapper) Marshaler() _bindings.Marshaler {
+ return _mLength2StringWrapper
+}
+
+type StringWrapper struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ Str string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mStringWrapper = _bindings.CreateLazyMarshaler(StringWrapper{})
+
+func (msg *StringWrapper) Marshaler() _bindings.Marshaler {
+ return _mStringWrapper
+}
+
+type EmptyStruct struct {
+ _ struct{} `fidl:"s,1,1" fidl_size_v1:"1" fidl_alignment_v1:"1" fidl_size_v1_no_ee:"1" fidl_alignment_v1_no_ee:"1"`
+}
+
+var _mEmptyStruct = _bindings.CreateLazyMarshaler(EmptyStruct{})
+
+func (msg *EmptyStruct) Marshaler() _bindings.Marshaler {
+ return _mEmptyStruct
+}
+
+type EmptyStructSandwich struct {
+ _ struct{} `fidl:"s,40,8" fidl_size_v1:"40" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"8"`
+ Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Es EmptyStruct `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ After string `fidl:"24," fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+}
+
+var _mEmptyStructSandwich = _bindings.CreateLazyMarshaler(EmptyStructSandwich{})
+
+func (msg *EmptyStructSandwich) Marshaler() _bindings.Marshaler {
+ return _mEmptyStructSandwich
+}
+
+type Uint8Uint16Uint32Uint64 struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ F1 uint8 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ F2 uint16 `fidl:"2" fidl_offset_v1:"2" fidl_offset_v1_no_ee:"2"`
+ F3 uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
+ F4 uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+}
+
+var _mUint8Uint16Uint32Uint64 = _bindings.CreateLazyMarshaler(Uint8Uint16Uint32Uint64{})
+
+func (msg *Uint8Uint16Uint32Uint64) Marshaler() _bindings.Marshaler {
+ return _mUint8Uint16Uint32Uint64
+}
+
+type Uint64Uint32Uint16Uint8 struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ F1 uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ F2 uint32 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ F3 uint16 `fidl:"12" fidl_offset_v1:"12" fidl_offset_v1_no_ee:"12"`
+ F4 uint8 `fidl:"14" fidl_offset_v1:"14" fidl_offset_v1_no_ee:"14"`
+}
+
+var _mUint64Uint32Uint16Uint8 = _bindings.CreateLazyMarshaler(Uint64Uint32Uint16Uint8{})
+
+func (msg *Uint64Uint32Uint16Uint8) Marshaler() _bindings.Marshaler {
+ return _mUint64Uint32Uint16Uint8
+}
+
+type StructOfSimpleTable struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ Table SimpleTable `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mStructOfSimpleTable = _bindings.CreateLazyMarshaler(StructOfSimpleTable{})
+
+func (msg *StructOfSimpleTable) Marshaler() _bindings.Marshaler {
+ return _mStructOfSimpleTable
+}
+
+type SimpleTableThenUint64 struct {
+ _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ Table SimpleTable `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Number uint64 `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+}
+
+var _mSimpleTableThenUint64 = _bindings.CreateLazyMarshaler(SimpleTableThenUint64{})
+
+func (msg *SimpleTableThenUint64) Marshaler() _bindings.Marshaler {
+ return _mSimpleTableThenUint64
+}
+
+type StructOfTableWithStringAndVector struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ Table TableWithStringAndVector `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mStructOfTableWithStringAndVector = _bindings.CreateLazyMarshaler(StructOfTableWithStringAndVector{})
+
+func (msg *StructOfTableWithStringAndVector) Marshaler() _bindings.Marshaler {
+ return _mStructOfTableWithStringAndVector
+}
+
type StructSize16Align8 struct {
_ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
F1 uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
@@ -1051,58 +969,114 @@
return _mStringUnionVector
}
-type I_unionWithBoundStringTag uint32
-
-const (
- _ I_unionWithBoundStringTag = iota
- UnionWithBoundStringBoundFiveStr
-)
-
-type UnionWithBoundString struct {
- I_unionWithBoundStringTag `fidl:"u,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- BoundFiveStr string `fidl:"1,5"`
+type LaunchInfo struct {
+ _ struct{} `fidl:"s,72,8" fidl_size_v1:"72" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"72" fidl_alignment_v1_no_ee:"8"`
+ Url string `fidl:"0,200" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Arguments *[]string `fidl:"16,," fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Out *TransformerEmptyStruct `fidl:"32" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+ Err *TransformerEmptyStruct `fidl:"40" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ DirectoryRequest uint32 `fidl:"48" fidl_offset_v1:"48" fidl_offset_v1_no_ee:"48"`
+ FlatNamespace *TransformerEmptyStruct `fidl:"56" fidl_offset_v1:"56" fidl_offset_v1_no_ee:"56"`
+ AdditionalServices *TransformerEmptyStruct `fidl:"64" fidl_offset_v1:"64" fidl_offset_v1_no_ee:"64"`
}
-func (u *UnionWithBoundString) Which() I_unionWithBoundStringTag {
- return u.I_unionWithBoundStringTag
+var _mLaunchInfo = _bindings.CreateLazyMarshaler(LaunchInfo{})
+
+func (msg *LaunchInfo) Marshaler() _bindings.Marshaler {
+ return _mLaunchInfo
}
-func (u *UnionWithBoundString) SetBoundFiveStr(boundFiveStr string) {
- u.I_unionWithBoundStringTag = UnionWithBoundStringBoundFiveStr
- u.BoundFiveStr = boundFiveStr
+type CreateComponentRequest struct {
+ _ struct{} `fidl:"s,80,8" fidl_size_v1:"80" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"80" fidl_alignment_v1_no_ee:"8"`
+ LaunchInfo LaunchInfo `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Controller uint32 `fidl:"72" fidl_offset_v1:"72" fidl_offset_v1_no_ee:"72"`
}
-func UnionWithBoundStringWithBoundFiveStr(boundFiveStr string) UnionWithBoundString {
- var _u UnionWithBoundString
- _u.SetBoundFiveStr(boundFiveStr)
- return _u
+var _mCreateComponentRequest = _bindings.CreateLazyMarshaler(CreateComponentRequest{})
+
+func (msg *CreateComponentRequest) Marshaler() _bindings.Marshaler {
+ return _mCreateComponentRequest
}
-type I_singleVariantUnionTag uint32
-
-const (
- _ I_singleVariantUnionTag = iota
- SingleVariantUnionX
-)
-
-type SingleVariantUnion struct {
- I_singleVariantUnionTag `fidl:"u,8,4" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- X uint32 `fidl:"1"`
+type UnionWithBoundStringStruct struct {
+ _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ V UnionWithBoundString `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
-func (u *SingleVariantUnion) Which() I_singleVariantUnionTag {
- return u.I_singleVariantUnionTag
+var _mUnionWithBoundStringStruct = _bindings.CreateLazyMarshaler(UnionWithBoundStringStruct{})
+
+func (msg *UnionWithBoundStringStruct) Marshaler() _bindings.Marshaler {
+ return _mUnionWithBoundStringStruct
}
-func (u *SingleVariantUnion) SetX(x uint32) {
- u.I_singleVariantUnionTag = SingleVariantUnionX
- u.X = x
+type SingleVariantUnionStruct struct {
+ _ struct{} `fidl:"s,8,4" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ U SingleVariantUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
-func SingleVariantUnionWithX(x uint32) SingleVariantUnion {
- var _u SingleVariantUnion
- _u.SetX(x)
- return _u
+var _mSingleVariantUnionStruct = _bindings.CreateLazyMarshaler(SingleVariantUnionStruct{})
+
+func (msg *SingleVariantUnionStruct) Marshaler() _bindings.Marshaler {
+ return _mSingleVariantUnionStruct
+}
+
+type Int64Struct struct {
+ _ struct{} `fidl:"s,8,8" fidl_size_v1:"8" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"8"`
+ X int64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mInt64Struct = _bindings.CreateLazyMarshaler(Int64Struct{})
+
+func (msg *Int64Struct) Marshaler() _bindings.Marshaler {
+ return _mInt64Struct
+}
+
+type TestInlineXUnionInStruct struct {
+ _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
+ Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Xu SampleXUnion `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ After string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+}
+
+var _mTestInlineXUnionInStruct = _bindings.CreateLazyMarshaler(TestInlineXUnionInStruct{})
+
+func (msg *TestInlineXUnionInStruct) Marshaler() _bindings.Marshaler {
+ return _mTestInlineXUnionInStruct
+}
+
+type TestOptionalXUnionInStruct struct {
+ _ struct{} `fidl:"s,56,8" fidl_size_v1:"56" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"56" fidl_alignment_v1_no_ee:"8"`
+ Before string `fidl:"0," fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Xu *SampleXUnion `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ After string `fidl:"40," fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+}
+
+var _mTestOptionalXUnionInStruct = _bindings.CreateLazyMarshaler(TestOptionalXUnionInStruct{})
+
+func (msg *TestOptionalXUnionInStruct) Marshaler() _bindings.Marshaler {
+ return _mTestOptionalXUnionInStruct
+}
+
+type TestStrictXUnionInStruct struct {
+ _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ Xu SampleStrictXUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mTestStrictXUnionInStruct = _bindings.CreateLazyMarshaler(TestStrictXUnionInStruct{})
+
+func (msg *TestStrictXUnionInStruct) Marshaler() _bindings.Marshaler {
+ return _mTestStrictXUnionInStruct
+}
+
+type TestFlexibleXUnionInStruct struct {
+ _ struct{} `fidl:"s,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ Xu SampleXUnion `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+}
+
+var _mTestFlexibleXUnionInStruct = _bindings.CreateLazyMarshaler(TestFlexibleXUnionInStruct{})
+
+func (msg *TestFlexibleXUnionInStruct) Marshaler() _bindings.Marshaler {
+ return _mTestFlexibleXUnionInStruct
}
type I_ipAddressConfigTag uint32
@@ -1145,72 +1119,6 @@
return _u
}
-type I_simpleUnionTag uint32
-
-const (
- _ I_simpleUnionTag = iota
- SimpleUnionI32
- SimpleUnionI64
- SimpleUnionS
- SimpleUnionStr
-)
-
-type SimpleUnion struct {
- I_simpleUnionTag `fidl:"u,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- I32 int32 `fidl:"1"`
- I64 int64 `fidl:"2"`
- S Int64Struct `fidl:"3"`
- Str string `fidl:"4,"`
-}
-
-func (u *SimpleUnion) Which() I_simpleUnionTag {
- return u.I_simpleUnionTag
-}
-
-func (u *SimpleUnion) SetI32(i32 int32) {
- u.I_simpleUnionTag = SimpleUnionI32
- u.I32 = i32
-}
-
-func SimpleUnionWithI32(i32 int32) SimpleUnion {
- var _u SimpleUnion
- _u.SetI32(i32)
- return _u
-}
-
-func (u *SimpleUnion) SetI64(i64 int64) {
- u.I_simpleUnionTag = SimpleUnionI64
- u.I64 = i64
-}
-
-func SimpleUnionWithI64(i64 int64) SimpleUnion {
- var _u SimpleUnion
- _u.SetI64(i64)
- return _u
-}
-
-func (u *SimpleUnion) SetS(s Int64Struct) {
- u.I_simpleUnionTag = SimpleUnionS
- u.S = s
-}
-
-func SimpleUnionWithS(s Int64Struct) SimpleUnion {
- var _u SimpleUnion
- _u.SetS(s)
- return _u
-}
-
-func (u *SimpleUnion) SetStr(str string) {
- u.I_simpleUnionTag = SimpleUnionStr
- u.Str = str
-}
-
-func SimpleUnionWithStr(str string) SimpleUnion {
- var _u SimpleUnion
- _u.SetStr(str)
- return _u
-}
-
type I_unionWithEmptyStructTag uint32
const (
@@ -1832,126 +1740,123 @@
return _u
}
-type I_sampleXUnionTag uint32
+type I_unionWithBoundStringTag uint32
const (
- SampleXUnion_unknownData = 0 // 0x00000000
- SampleXUnionU = 949769906 // 0x389c56b2
- SampleXUnionSu = 2033143581 // 0x792f4f1d
- SampleXUnionSt = 35514581 // 0x021de8d5
+ _ I_unionWithBoundStringTag = iota
+ UnionWithBoundStringBoundFiveStr
)
-type SampleXUnion struct {
- I_sampleXUnionTag `fidl:"x,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- I_unknownData []byte
- U uint32 `fidl:"949769906"`
- Su SimpleUnion `fidl:"2033143581"`
- St SimpleTable `fidl:"35514581"`
+type UnionWithBoundString struct {
+ I_unionWithBoundStringTag `fidl:"u,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ BoundFiveStr string `fidl:"1,5"`
}
-func (_m *SampleXUnion) Which() I_sampleXUnionTag {
- switch _m.I_sampleXUnionTag {
- case 949769906:
- return SampleXUnionU
- case 2033143581:
- return SampleXUnionSu
- case 35514581:
- return SampleXUnionSt
- default:
- return SampleXUnion_unknownData
- }
+func (u *UnionWithBoundString) Which() I_unionWithBoundStringTag {
+ return u.I_unionWithBoundStringTag
}
-func (_m *SampleXUnion) Ordinal() uint32 {
- return uint32(_m.I_sampleXUnionTag)
+func (u *UnionWithBoundString) SetBoundFiveStr(boundFiveStr string) {
+ u.I_unionWithBoundStringTag = UnionWithBoundStringBoundFiveStr
+ u.BoundFiveStr = boundFiveStr
}
-func (_m *SampleXUnion) SetU(u uint32) {
- _m.I_sampleXUnionTag = SampleXUnionU
- _m.U = u
-}
-
-func SampleXUnionWithU(u uint32) SampleXUnion {
- var _u SampleXUnion
- _u.SetU(u)
+func UnionWithBoundStringWithBoundFiveStr(boundFiveStr string) UnionWithBoundString {
+ var _u UnionWithBoundString
+ _u.SetBoundFiveStr(boundFiveStr)
return _u
}
-func (_m *SampleXUnion) SetSu(su SimpleUnion) {
- _m.I_sampleXUnionTag = SampleXUnionSu
- _m.Su = su
-}
-
-func SampleXUnionWithSu(su SimpleUnion) SampleXUnion {
- var _u SampleXUnion
- _u.SetSu(su)
- return _u
-}
-
-func (_m *SampleXUnion) SetSt(st SimpleTable) {
- _m.I_sampleXUnionTag = SampleXUnionSt
- _m.St = st
-}
-
-func SampleXUnionWithSt(st SimpleTable) SampleXUnion {
- var _u SampleXUnion
- _u.SetSt(st)
- return _u
-}
-
-type I_sampleStrictXUnionTag uint32
+type I_singleVariantUnionTag uint32
const (
- SampleStrictXUnionU = 149088882 // 0x08e2ea72
- SampleStrictXUnionSu = 670279483 // 0x27f3a73b
- SampleStrictXUnionSt = 925062383 // 0x372354ef
+ _ I_singleVariantUnionTag = iota
+ SingleVariantUnionX
)
-type SampleStrictXUnion struct {
- I_sampleStrictXUnionTag `fidl:"x!,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
- U uint32 `fidl:"149088882"`
- Su SimpleUnion `fidl:"670279483"`
- St SimpleTable `fidl:"925062383"`
+type SingleVariantUnion struct {
+ I_singleVariantUnionTag `fidl:"u,8,4" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ X uint32 `fidl:"1"`
}
-func (_m *SampleStrictXUnion) Which() I_sampleStrictXUnionTag {
- return _m.I_sampleStrictXUnionTag
+func (u *SingleVariantUnion) Which() I_singleVariantUnionTag {
+ return u.I_singleVariantUnionTag
}
-func (_m *SampleStrictXUnion) Ordinal() uint32 {
- return uint32(_m.I_sampleStrictXUnionTag)
+func (u *SingleVariantUnion) SetX(x uint32) {
+ u.I_singleVariantUnionTag = SingleVariantUnionX
+ u.X = x
}
-func (_m *SampleStrictXUnion) SetU(u uint32) {
- _m.I_sampleStrictXUnionTag = SampleStrictXUnionU
- _m.U = u
-}
-
-func SampleStrictXUnionWithU(u uint32) SampleStrictXUnion {
- var _u SampleStrictXUnion
- _u.SetU(u)
+func SingleVariantUnionWithX(x uint32) SingleVariantUnion {
+ var _u SingleVariantUnion
+ _u.SetX(x)
return _u
}
-func (_m *SampleStrictXUnion) SetSu(su SimpleUnion) {
- _m.I_sampleStrictXUnionTag = SampleStrictXUnionSu
- _m.Su = su
+type I_simpleUnionTag uint32
+
+const (
+ _ I_simpleUnionTag = iota
+ SimpleUnionI32
+ SimpleUnionI64
+ SimpleUnionS
+ SimpleUnionStr
+)
+
+type SimpleUnion struct {
+ I_simpleUnionTag `fidl:"u,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ I32 int32 `fidl:"1"`
+ I64 int64 `fidl:"2"`
+ S Int64Struct `fidl:"3"`
+ Str string `fidl:"4,"`
}
-func SampleStrictXUnionWithSu(su SimpleUnion) SampleStrictXUnion {
- var _u SampleStrictXUnion
- _u.SetSu(su)
+func (u *SimpleUnion) Which() I_simpleUnionTag {
+ return u.I_simpleUnionTag
+}
+
+func (u *SimpleUnion) SetI32(i32 int32) {
+ u.I_simpleUnionTag = SimpleUnionI32
+ u.I32 = i32
+}
+
+func SimpleUnionWithI32(i32 int32) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetI32(i32)
return _u
}
-func (_m *SampleStrictXUnion) SetSt(st SimpleTable) {
- _m.I_sampleStrictXUnionTag = SampleStrictXUnionSt
- _m.St = st
+func (u *SimpleUnion) SetI64(i64 int64) {
+ u.I_simpleUnionTag = SimpleUnionI64
+ u.I64 = i64
}
-func SampleStrictXUnionWithSt(st SimpleTable) SampleStrictXUnion {
- var _u SampleStrictXUnion
- _u.SetSt(st)
+func SimpleUnionWithI64(i64 int64) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetI64(i64)
+ return _u
+}
+
+func (u *SimpleUnion) SetS(s Int64Struct) {
+ u.I_simpleUnionTag = SimpleUnionS
+ u.S = s
+}
+
+func SimpleUnionWithS(s Int64Struct) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetS(s)
+ return _u
+}
+
+func (u *SimpleUnion) SetStr(str string) {
+ u.I_simpleUnionTag = SimpleUnionStr
+ u.Str = str
+}
+
+func SimpleUnionWithStr(str string) SimpleUnion {
+ var _u SimpleUnion
+ _u.SetStr(str)
return _u
}
@@ -2118,6 +2023,129 @@
return _u
}
+type I_sampleXUnionTag uint32
+
+const (
+ SampleXUnion_unknownData = 0 // 0x00000000
+ SampleXUnionU = 949769906 // 0x389c56b2
+ SampleXUnionSu = 2033143581 // 0x792f4f1d
+ SampleXUnionSt = 35514581 // 0x021de8d5
+)
+
+type SampleXUnion struct {
+ I_sampleXUnionTag `fidl:"x,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ I_unknownData []byte
+ U uint32 `fidl:"949769906"`
+ Su SimpleUnion `fidl:"2033143581"`
+ St SimpleTable `fidl:"35514581"`
+}
+
+func (_m *SampleXUnion) Which() I_sampleXUnionTag {
+ switch _m.I_sampleXUnionTag {
+ case 949769906:
+ return SampleXUnionU
+ case 2033143581:
+ return SampleXUnionSu
+ case 35514581:
+ return SampleXUnionSt
+ default:
+ return SampleXUnion_unknownData
+ }
+}
+
+func (_m *SampleXUnion) Ordinal() uint32 {
+ return uint32(_m.I_sampleXUnionTag)
+}
+
+func (_m *SampleXUnion) SetU(u uint32) {
+ _m.I_sampleXUnionTag = SampleXUnionU
+ _m.U = u
+}
+
+func SampleXUnionWithU(u uint32) SampleXUnion {
+ var _u SampleXUnion
+ _u.SetU(u)
+ return _u
+}
+
+func (_m *SampleXUnion) SetSu(su SimpleUnion) {
+ _m.I_sampleXUnionTag = SampleXUnionSu
+ _m.Su = su
+}
+
+func SampleXUnionWithSu(su SimpleUnion) SampleXUnion {
+ var _u SampleXUnion
+ _u.SetSu(su)
+ return _u
+}
+
+func (_m *SampleXUnion) SetSt(st SimpleTable) {
+ _m.I_sampleXUnionTag = SampleXUnionSt
+ _m.St = st
+}
+
+func SampleXUnionWithSt(st SimpleTable) SampleXUnion {
+ var _u SampleXUnion
+ _u.SetSt(st)
+ return _u
+}
+
+type I_sampleStrictXUnionTag uint32
+
+const (
+ SampleStrictXUnionU = 149088882 // 0x08e2ea72
+ SampleStrictXUnionSu = 670279483 // 0x27f3a73b
+ SampleStrictXUnionSt = 925062383 // 0x372354ef
+)
+
+type SampleStrictXUnion struct {
+ I_sampleStrictXUnionTag `fidl:"x!,24,8" fidl_size_v1:"24" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"8"`
+ U uint32 `fidl:"149088882"`
+ Su SimpleUnion `fidl:"670279483"`
+ St SimpleTable `fidl:"925062383"`
+}
+
+func (_m *SampleStrictXUnion) Which() I_sampleStrictXUnionTag {
+ return _m.I_sampleStrictXUnionTag
+}
+
+func (_m *SampleStrictXUnion) Ordinal() uint32 {
+ return uint32(_m.I_sampleStrictXUnionTag)
+}
+
+func (_m *SampleStrictXUnion) SetU(u uint32) {
+ _m.I_sampleStrictXUnionTag = SampleStrictXUnionU
+ _m.U = u
+}
+
+func SampleStrictXUnionWithU(u uint32) SampleStrictXUnion {
+ var _u SampleStrictXUnion
+ _u.SetU(u)
+ return _u
+}
+
+func (_m *SampleStrictXUnion) SetSu(su SimpleUnion) {
+ _m.I_sampleStrictXUnionTag = SampleStrictXUnionSu
+ _m.Su = su
+}
+
+func SampleStrictXUnionWithSu(su SimpleUnion) SampleStrictXUnion {
+ var _u SampleStrictXUnion
+ _u.SetSu(su)
+ return _u
+}
+
+func (_m *SampleStrictXUnion) SetSt(st SimpleTable) {
+ _m.I_sampleStrictXUnionTag = SampleStrictXUnionSt
+ _m.St = st
+}
+
+func SampleStrictXUnionWithSt(st SimpleTable) SampleStrictXUnion {
+ var _u SampleStrictXUnion
+ _u.SetSt(st)
+ return _u
+}
+
type XUnionInTable struct {
_ struct{} `fidl:"t,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
Before string `fidl:"1,"`
@@ -2200,6 +2228,36 @@
u.AfterPresent = false
}
+type TableWithEmptyStruct struct {
+ _ struct{} `fidl:"t,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
+ S EmptyStruct `fidl:"1"`
+ SPresent bool
+}
+
+func (u *TableWithEmptyStruct) SetS(s EmptyStruct) {
+ u.S = s
+ u.SPresent = true
+}
+
+func (u *TableWithEmptyStruct) GetS() EmptyStruct {
+ return u.S
+}
+
+func (u *TableWithEmptyStruct) GetSWithDefault(_default EmptyStruct) EmptyStruct {
+ if !u.HasS() {
+ return _default
+ }
+ return u.S
+}
+
+func (u *TableWithEmptyStruct) HasS() bool {
+ return u.SPresent
+}
+
+func (u *TableWithEmptyStruct) ClearS() {
+ u.SPresent = false
+}
+
type SimpleTable struct {
_ struct{} `fidl:"t,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
X int64 `fidl:"1"`
@@ -2338,36 +2396,6 @@
u.BazPresent = false
}
-type TableWithEmptyStruct struct {
- _ struct{} `fidl:"t,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
- S EmptyStruct `fidl:"1"`
- SPresent bool
-}
-
-func (u *TableWithEmptyStruct) SetS(s EmptyStruct) {
- u.S = s
- u.SPresent = true
-}
-
-func (u *TableWithEmptyStruct) GetS() EmptyStruct {
- return u.S
-}
-
-func (u *TableWithEmptyStruct) GetSWithDefault(_default EmptyStruct) EmptyStruct {
- if !u.HasS() {
- return _default
- }
- return u.S
-}
-
-func (u *TableWithEmptyStruct) HasS() bool {
- return u.SPresent
-}
-
-func (u *TableWithEmptyStruct) ClearS() {
- u.SPresent = false
-}
-
type TableStructWithReservedSandwich struct {
_ struct{} `fidl:"t,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"8"`
S1 StructSize3Align1 `fidl:"2"`
@@ -2693,6 +2721,11 @@
}
func (s_ *EthernetDeviceStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *EthernetDeviceStub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
}
return nil, false, _bindings.ErrUnknownOrdinal
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..6654391
--- /dev/null
+++ b/src/syscall/zx/fidl/ctx_and_header.go
@@ -0,0 +1,71 @@
+// 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.
+
+// +build fuchsia
+
+package fidl
+
+const FidlWireFormatMagicNumberInitial = 1
+
+type MarshalerContext struct {
+ DecodeUnionsFromXUnionBytes bool
+ EncodeUnionsAsXUnionBytes bool
+}
+
+// MessageHeader represents a transactional message header.
+type MessageHeader struct {
+ _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8"`
+ Txid uint32 `fidl:"0" fidl_offset_v1:"0"`
+ Flags [3]uint8 `fidl:"4" fidl_offset_v1:"4"`
+ Magic uint8 `fidl:"7" fidl_offset_v1:"7"`
+ Ordinal uint64 `fidl:"8" fidl_offset_v1:"8"`
+}
+
+func (msg *MessageHeader) IsSupportedVersion() bool {
+ return msg.Magic == FidlWireFormatMagicNumberInitial
+}
+
+func (msg *MessageHeader) HasUnionFromXunionBytes() bool {
+ return msg.Flags[0]&0x01 != 0
+}
+
+func (msg *MessageHeader) SetUnionFromXunionBytes() {
+ msg.Flags[0] |= 0x01
+}
+
+func (msg *MessageHeader) UnsetUnionFromXunionBytes() {
+ msg.Flags[0] &= ^(uint8(0x01))
+}
+
+// NewCtx creates a new MarshalerContext for unmarshaling based on the flags in
+// the MessageHeader
+func (msg *MessageHeader) NewCtx() MarshalerContext {
+ ctx := newCtx()
+ ctx.DecodeUnionsFromXUnionBytes = msg.HasUnionFromXunionBytes()
+ return ctx
+}
+
+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,
+ }
+ if ctx.EncodeUnionsAsXUnionBytes {
+ header.SetUnionFromXunionBytes()
+ } else {
+ header.UnsetUnionFromXunionBytes()
+ }
+ return header
+}
diff --git a/src/syscall/zx/fidl/encoding_new.go b/src/syscall/zx/fidl/encoding_new.go
index 650243d..2359884 100644
--- a/src/syscall/zx/fidl/encoding_new.go
+++ b/src/syscall/zx/fidl/encoding_new.go
@@ -506,11 +506,6 @@
Marshaler() Marshaler
}
-type MarshalerContext struct {
- DecodeUnionsFromXUnionBytes bool
- EncodeUnionsAsXUnionBytes bool
-}
-
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
diff --git a/src/syscall/zx/fidl/interface.go b/src/syscall/zx/fidl/interface.go
index 364767a..3aab6e4 100644
--- a/src/syscall/zx/fidl/interface.go
+++ b/src/syscall/zx/fidl/interface.go
@@ -55,13 +55,13 @@
// It contains logic which is able to dispatch into the correct implementation given
// the incoming message ordinal and its data.
type Stub interface {
- // DispatchImpl dispatches into the appropriate method implementation for a FIDL
+ // DispatchImplWithCtx 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.
- DispatchImpl(ordinal uint64, bytes []byte, handles []zx.Handle) (Message, bool, error)
+ DispatchImplWithCtx(ordinal uint64, ctx MarshalerContext, bytes []byte, handles []zx.Handle) (Message, bool, error)
}
// ChannelProxy a Proxy that is backed by a channel.
@@ -134,15 +134,10 @@
defer messageHandlesPool.Put(resph)
// Marshal the message into the buffer.
- header := MessageHeader{
- Txid: 0, // Txid == 0 for messages without a response.
- Ordinal: ordinal,
- Magic: FidlWireFormatMagicNumberInitial,
- }
- if newCtx().EncodeUnionsAsXUnionBytes {
- header.SetUnionFromXunionBytes()
- }
- nb, nh, err := MarshalHeaderThenMessage(&header, req, respb[:], resph[:])
+ reqHeader := newCtx().NewHeader()
+ reqHeader.Txid = 0
+ reqHeader.Ordinal = ordinal
+ nb, nh, err := MarshalHeaderThenMessage(&reqHeader, req, respb[:], resph[:])
if err != nil {
return err
}
@@ -205,15 +200,10 @@
}
}()
- // Marshal the message into the buffer
- header := MessageHeader{
- Ordinal: ordinal,
- Magic: FidlWireFormatMagicNumberInitial,
- }
- if newCtx().EncodeUnionsAsXUnionBytes {
- header.SetUnionFromXunionBytes()
- }
- nb, nh, err := MarshalHeaderThenMessage(&header, req, respb[:], resph[:])
+ reqHeader := newCtx().NewHeader()
+ reqHeader.Txid = 0
+ reqHeader.Ordinal = ordinal
+ nb, nh, err := MarshalHeaderThenMessage(&reqHeader, req, respb[:], resph[:])
if err != nil {
return err
}
diff --git a/src/syscall/zx/fidl/message.go b/src/syscall/zx/fidl/message.go
index f8bffda..5a1213c 100644
--- a/src/syscall/zx/fidl/message.go
+++ b/src/syscall/zx/fidl/message.go
@@ -12,8 +12,6 @@
"syscall/zx"
)
-const FidlWireFormatMagicNumberInitial = 1
-
// messageBytesPool is a pool of buffers that can fit the data part of any
// FIDL message.
var messageBytesPool = sync.Pool{
@@ -30,35 +28,6 @@
},
}
-// MessageHeader represents a transactional message header.
-type MessageHeader struct {
- _ struct{} `fidl:"s,16,8" fidl_size_v1:"16" fidl_alignment_v1:"8"`
- Txid uint32 `fidl:"0" fidl_offset_v1:"0"`
- Flags [3]uint8 `fidl:"4" fidl_offset_v1:"4"`
- Magic uint8 `fidl:"7" fidl_offset_v1:"7"`
- Ordinal uint64 `fidl:"8" fidl_offset_v1:"8"`
-}
-
-func (msg *MessageHeader) IsSupportedVersion() bool {
- return msg.Magic == FidlWireFormatMagicNumberInitial
-}
-
-func (msg *MessageHeader) HasUnionFromXunionBytes() bool {
- return msg.Flags[0] & 0x01 != 0
-}
-
-func (msg *MessageHeader) SetUnionFromXunionBytes() {
- msg.Flags[0] |= 0x01
-}
-
-var mMessageHeader = MustCreateMarshaler(MessageHeader{})
-
-var MessageHeaderSize = 16
-
-func (msg *MessageHeader) Marshaler() Marshaler {
- return mMessageHeader
-}
-
// 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).
@@ -88,9 +57,7 @@
if body == nil {
return nil
}
- ctx := newCtx()
- ctx.DecodeUnionsFromXUnionBytes = header.HasUnionFromXunionBytes()
- if _, _, err := UnmarshalWithContext(ctx, data[hnb:], handles, body); err != nil {
+ if _, _, err := UnmarshalWithContext(header.NewCtx(), data[hnb:], handles, body); err != nil {
return err
}
return nil
diff --git a/src/syscall/zx/io/impl.go b/src/syscall/zx/io/impl.go
index f6472d4..4b11783 100644
--- a/src/syscall/zx/io/impl.go
+++ b/src/syscall/zx/io/impl.go
@@ -523,8 +523,8 @@
type nodeCloneRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Object NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Object NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mnodeCloneRequest = _bindings.CreateLazyMarshaler(nodeCloneRequest{})
@@ -535,7 +535,7 @@
type nodeCloseResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mnodeCloseResponse = _bindings.CreateLazyMarshaler(nodeCloseResponse{})
@@ -546,7 +546,7 @@
type nodeDescribeResponse struct {
_ struct{} `fidl:"s,32,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Info NodeInfo `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Info NodeInfo `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mnodeDescribeResponse = _bindings.CreateLazyMarshaler(nodeDescribeResponse{})
@@ -557,8 +557,8 @@
type nodeOnOpenResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Info *NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Info *NodeInfo `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mnodeOnOpenResponse = _bindings.CreateLazyMarshaler(nodeOnOpenResponse{})
@@ -569,7 +569,7 @@
type nodeSyncResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mnodeSyncResponse = _bindings.CreateLazyMarshaler(nodeSyncResponse{})
@@ -580,8 +580,8 @@
type nodeGetAttrResponse struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mnodeGetAttrResponse = _bindings.CreateLazyMarshaler(nodeGetAttrResponse{})
@@ -592,8 +592,8 @@
type nodeSetAttrRequest struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mnodeSetAttrRequest = _bindings.CreateLazyMarshaler(nodeSetAttrRequest{})
@@ -604,7 +604,7 @@
type nodeSetAttrResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mnodeSetAttrResponse = _bindings.CreateLazyMarshaler(nodeSetAttrResponse{})
@@ -615,8 +615,8 @@
type nodeNodeGetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Flags uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Flags uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mnodeNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(nodeNodeGetFlagsResponse{})
@@ -627,7 +627,7 @@
type nodeNodeSetFlagsRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mnodeNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(nodeNodeSetFlagsRequest{})
@@ -638,7 +638,7 @@
type nodeNodeSetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mnodeNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(nodeNodeSetFlagsResponse{})
@@ -855,12 +855,17 @@
}
func (s_ *NodeStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *NodeStub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
case NodeCloneOrdinal:
fallthrough
case NodeCloneGenOrdinal:
in_ := nodeCloneRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Clone(in_.Flags, in_.Object)
@@ -898,7 +903,7 @@
fallthrough
case NodeSetAttrGenOrdinal:
in_ := nodeSetAttrRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetAttr(in_.Flags, in_.Attributes)
@@ -917,7 +922,7 @@
fallthrough
case NodeNodeSetFlagsGenOrdinal:
in_ := nodeNodeSetFlagsRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
@@ -992,8 +997,8 @@
type fileCloneRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Object NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Object NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mfileCloneRequest = _bindings.CreateLazyMarshaler(fileCloneRequest{})
@@ -1004,7 +1009,7 @@
type fileCloseResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileCloseResponse = _bindings.CreateLazyMarshaler(fileCloseResponse{})
@@ -1015,7 +1020,7 @@
type fileDescribeResponse struct {
_ struct{} `fidl:"s,32,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Info NodeInfo `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Info NodeInfo `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileDescribeResponse = _bindings.CreateLazyMarshaler(fileDescribeResponse{})
@@ -1026,8 +1031,8 @@
type fileOnOpenResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Info *NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Info *NodeInfo `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileOnOpenResponse = _bindings.CreateLazyMarshaler(fileOnOpenResponse{})
@@ -1038,7 +1043,7 @@
type fileSyncResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileSyncResponse = _bindings.CreateLazyMarshaler(fileSyncResponse{})
@@ -1049,8 +1054,8 @@
type fileGetAttrResponse struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileGetAttrResponse = _bindings.CreateLazyMarshaler(fileGetAttrResponse{})
@@ -1061,8 +1066,8 @@
type fileSetAttrRequest struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileSetAttrRequest = _bindings.CreateLazyMarshaler(fileSetAttrRequest{})
@@ -1073,7 +1078,7 @@
type fileSetAttrResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileSetAttrResponse = _bindings.CreateLazyMarshaler(fileSetAttrResponse{})
@@ -1084,8 +1089,8 @@
type fileNodeGetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Flags uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Flags uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mfileNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(fileNodeGetFlagsResponse{})
@@ -1096,7 +1101,7 @@
type fileNodeSetFlagsRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(fileNodeSetFlagsRequest{})
@@ -1107,7 +1112,7 @@
type fileNodeSetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(fileNodeSetFlagsResponse{})
@@ -1118,7 +1123,7 @@
type fileReadRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Count uint64 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Count uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileReadRequest = _bindings.CreateLazyMarshaler(fileReadRequest{})
@@ -1129,8 +1134,8 @@
type fileReadResponse struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Data []uint8 `fidl:"8,8192" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Data []uint8 `fidl:"8,8192" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileReadResponse = _bindings.CreateLazyMarshaler(fileReadResponse{})
@@ -1141,8 +1146,8 @@
type fileReadAtRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Count uint64 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Offset uint64 `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Count uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Offset uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileReadAtRequest = _bindings.CreateLazyMarshaler(fileReadAtRequest{})
@@ -1153,8 +1158,8 @@
type fileReadAtResponse struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Data []uint8 `fidl:"8,8192" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Data []uint8 `fidl:"8,8192" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileReadAtResponse = _bindings.CreateLazyMarshaler(fileReadAtResponse{})
@@ -1165,7 +1170,7 @@
type fileWriteRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Data []uint8 `fidl:"0,8192" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Data []uint8 `fidl:"0,8192" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileWriteRequest = _bindings.CreateLazyMarshaler(fileWriteRequest{})
@@ -1176,8 +1181,8 @@
type fileWriteResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Actual uint64 `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Actual uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileWriteResponse = _bindings.CreateLazyMarshaler(fileWriteResponse{})
@@ -1188,8 +1193,8 @@
type fileWriteAtRequest struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Data []uint8 `fidl:"0,8192" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Offset uint64 `fidl:"16" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
+ Data []uint8 `fidl:"0,8192" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Offset uint64 `fidl:"16" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
}
var _mfileWriteAtRequest = _bindings.CreateLazyMarshaler(fileWriteAtRequest{})
@@ -1200,8 +1205,8 @@
type fileWriteAtResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Actual uint64 `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Actual uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileWriteAtResponse = _bindings.CreateLazyMarshaler(fileWriteAtResponse{})
@@ -1212,8 +1217,8 @@
type fileSeekRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Offset int64 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Start SeekOrigin `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Offset int64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Start SeekOrigin `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileSeekRequest = _bindings.CreateLazyMarshaler(fileSeekRequest{})
@@ -1224,8 +1229,8 @@
type fileSeekResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Offset uint64 `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Offset uint64 `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileSeekResponse = _bindings.CreateLazyMarshaler(fileSeekResponse{})
@@ -1236,7 +1241,7 @@
type fileTruncateRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Length uint64 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Length uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileTruncateRequest = _bindings.CreateLazyMarshaler(fileTruncateRequest{})
@@ -1247,7 +1252,7 @@
type fileTruncateResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileTruncateResponse = _bindings.CreateLazyMarshaler(fileTruncateResponse{})
@@ -1258,8 +1263,8 @@
type fileGetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Flags uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Flags uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mfileGetFlagsResponse = _bindings.CreateLazyMarshaler(fileGetFlagsResponse{})
@@ -1270,7 +1275,7 @@
type fileSetFlagsRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileSetFlagsRequest = _bindings.CreateLazyMarshaler(fileSetFlagsRequest{})
@@ -1281,7 +1286,7 @@
type fileSetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileSetFlagsResponse = _bindings.CreateLazyMarshaler(fileSetFlagsResponse{})
@@ -1292,7 +1297,7 @@
type fileGetBufferRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mfileGetBufferRequest = _bindings.CreateLazyMarshaler(fileGetBufferRequest{})
@@ -1303,8 +1308,8 @@
type fileGetBufferResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Buffer *fuchsiamem.Buffer `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Buffer *fuchsiamem.Buffer `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mfileGetBufferResponse = _bindings.CreateLazyMarshaler(fileGetBufferResponse{})
@@ -1692,12 +1697,17 @@
}
func (s_ *FileStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *FileStub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
case FileCloneOrdinal:
fallthrough
case FileCloneGenOrdinal:
in_ := fileCloneRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Clone(in_.Flags, in_.Object)
@@ -1735,7 +1745,7 @@
fallthrough
case FileSetAttrGenOrdinal:
in_ := fileSetAttrRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetAttr(in_.Flags, in_.Attributes)
@@ -1754,7 +1764,7 @@
fallthrough
case FileNodeSetFlagsGenOrdinal:
in_ := fileNodeSetFlagsRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
@@ -1765,7 +1775,7 @@
fallthrough
case FileReadGenOrdinal:
in_ := fileReadRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, data, err_ := s_.Impl.Read(in_.Count)
@@ -1777,7 +1787,7 @@
fallthrough
case FileReadAtGenOrdinal:
in_ := fileReadAtRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, data, err_ := s_.Impl.ReadAt(in_.Count, in_.Offset)
@@ -1789,7 +1799,7 @@
fallthrough
case FileWriteGenOrdinal:
in_ := fileWriteRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, actual, err_ := s_.Impl.Write(in_.Data)
@@ -1801,7 +1811,7 @@
fallthrough
case FileWriteAtGenOrdinal:
in_ := fileWriteAtRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, actual, err_ := s_.Impl.WriteAt(in_.Data, in_.Offset)
@@ -1813,7 +1823,7 @@
fallthrough
case FileSeekGenOrdinal:
in_ := fileSeekRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, offset, err_ := s_.Impl.Seek(in_.Offset, in_.Start)
@@ -1825,7 +1835,7 @@
fallthrough
case FileTruncateGenOrdinal:
in_ := fileTruncateRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Truncate(in_.Length)
@@ -1844,7 +1854,7 @@
fallthrough
case FileSetFlagsGenOrdinal:
in_ := fileSetFlagsRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetFlags(in_.Flags)
@@ -1855,7 +1865,7 @@
fallthrough
case FileGetBufferGenOrdinal:
in_ := fileGetBufferRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, buffer, err_ := s_.Impl.GetBuffer(in_.Flags)
@@ -1897,7 +1907,7 @@
type directoryWatcherOnEventRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Events []uint8 `fidl:"0,8192" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Events []uint8 `fidl:"0,8192" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryWatcherOnEventRequest = _bindings.CreateLazyMarshaler(directoryWatcherOnEventRequest{})
@@ -1938,12 +1948,17 @@
}
func (s_ *DirectoryWatcherStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *DirectoryWatcherStub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
case DirectoryWatcherOnEventOrdinal:
fallthrough
case DirectoryWatcherOnEventGenOrdinal:
in_ := directoryWatcherOnEventRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.OnEvent(in_.Events)
@@ -2006,8 +2021,8 @@
type directoryCloneRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Object NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Object NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mdirectoryCloneRequest = _bindings.CreateLazyMarshaler(directoryCloneRequest{})
@@ -2018,7 +2033,7 @@
type directoryCloseResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryCloseResponse = _bindings.CreateLazyMarshaler(directoryCloseResponse{})
@@ -2029,7 +2044,7 @@
type directoryDescribeResponse struct {
_ struct{} `fidl:"s,32,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Info NodeInfo `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Info NodeInfo `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryDescribeResponse = _bindings.CreateLazyMarshaler(directoryDescribeResponse{})
@@ -2040,8 +2055,8 @@
type directoryOnOpenResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Info *NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Info *NodeInfo `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryOnOpenResponse = _bindings.CreateLazyMarshaler(directoryOnOpenResponse{})
@@ -2052,7 +2067,7 @@
type directorySyncResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectorySyncResponse = _bindings.CreateLazyMarshaler(directorySyncResponse{})
@@ -2063,8 +2078,8 @@
type directoryGetAttrResponse struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryGetAttrResponse = _bindings.CreateLazyMarshaler(directoryGetAttrResponse{})
@@ -2075,8 +2090,8 @@
type directorySetAttrRequest struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectorySetAttrRequest = _bindings.CreateLazyMarshaler(directorySetAttrRequest{})
@@ -2087,7 +2102,7 @@
type directorySetAttrResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectorySetAttrResponse = _bindings.CreateLazyMarshaler(directorySetAttrResponse{})
@@ -2098,8 +2113,8 @@
type directoryNodeGetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Flags uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Flags uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mdirectoryNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(directoryNodeGetFlagsResponse{})
@@ -2110,7 +2125,7 @@
type directoryNodeSetFlagsRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(directoryNodeSetFlagsRequest{})
@@ -2121,7 +2136,7 @@
type directoryNodeSetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(directoryNodeSetFlagsResponse{})
@@ -2132,10 +2147,10 @@
type directoryOpenRequest struct {
_ struct{} `fidl:"s,32,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Mode uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
- Path string `fidl:"8,4096" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
- Object NodeInterfaceRequest `fidl:"24,0" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Mode uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
+ Path string `fidl:"8,4096" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ Object NodeInterfaceRequest `fidl:"24,0" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
var _mdirectoryOpenRequest = _bindings.CreateLazyMarshaler(directoryOpenRequest{})
@@ -2146,7 +2161,7 @@
type directoryUnlinkRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Path string `fidl:"0,4096" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Path string `fidl:"0,4096" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryUnlinkRequest = _bindings.CreateLazyMarshaler(directoryUnlinkRequest{})
@@ -2157,7 +2172,7 @@
type directoryUnlinkResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryUnlinkResponse = _bindings.CreateLazyMarshaler(directoryUnlinkResponse{})
@@ -2168,7 +2183,7 @@
type directoryReadDirentsRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- MaxBytes uint64 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ MaxBytes uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryReadDirentsRequest = _bindings.CreateLazyMarshaler(directoryReadDirentsRequest{})
@@ -2179,8 +2194,8 @@
type directoryReadDirentsResponse struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Dirents []uint8 `fidl:"8,8192" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Dirents []uint8 `fidl:"8,8192" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryReadDirentsResponse = _bindings.CreateLazyMarshaler(directoryReadDirentsResponse{})
@@ -2191,7 +2206,7 @@
type directoryRewindResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryRewindResponse = _bindings.CreateLazyMarshaler(directoryRewindResponse{})
@@ -2202,8 +2217,8 @@
type directoryGetTokenResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Token _zx.Handle `fidl:"4,1" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Token _zx.Handle `fidl:"4,1" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mdirectoryGetTokenResponse = _bindings.CreateLazyMarshaler(directoryGetTokenResponse{})
@@ -2214,9 +2229,9 @@
type directoryRenameRequest struct {
_ struct{} `fidl:"s,40,0" fidl_size_v1:"40" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"0"`
- Src string `fidl:"0,4096" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- DstParentToken _zx.Handle `fidl:"16,0" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
- Dst string `fidl:"24,4096" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ Src string `fidl:"0,4096" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ DstParentToken _zx.Handle `fidl:"16,0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Dst string `fidl:"24,4096" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
var _mdirectoryRenameRequest = _bindings.CreateLazyMarshaler(directoryRenameRequest{})
@@ -2227,7 +2242,7 @@
type directoryRenameResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryRenameResponse = _bindings.CreateLazyMarshaler(directoryRenameResponse{})
@@ -2238,9 +2253,9 @@
type directoryLinkRequest struct {
_ struct{} `fidl:"s,40,0" fidl_size_v1:"40" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"0"`
- Src string `fidl:"0,4096" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- DstParentToken _zx.Handle `fidl:"16,0" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
- Dst string `fidl:"24,4096" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ Src string `fidl:"0,4096" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ DstParentToken _zx.Handle `fidl:"16,0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Dst string `fidl:"24,4096" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
var _mdirectoryLinkRequest = _bindings.CreateLazyMarshaler(directoryLinkRequest{})
@@ -2251,7 +2266,7 @@
type directoryLinkResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryLinkResponse = _bindings.CreateLazyMarshaler(directoryLinkResponse{})
@@ -2262,9 +2277,9 @@
type directoryWatchRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Mask uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Options uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
- Watcher _zx.Channel `fidl:"8,0" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Mask uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Options uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
+ Watcher _zx.Channel `fidl:"8,0" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryWatchRequest = _bindings.CreateLazyMarshaler(directoryWatchRequest{})
@@ -2275,7 +2290,7 @@
type directoryWatchResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryWatchResponse = _bindings.CreateLazyMarshaler(directoryWatchResponse{})
@@ -2806,12 +2821,17 @@
}
func (s_ *DirectoryStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *DirectoryStub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
case DirectoryCloneOrdinal:
fallthrough
case DirectoryCloneGenOrdinal:
in_ := directoryCloneRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Clone(in_.Flags, in_.Object)
@@ -2849,7 +2869,7 @@
fallthrough
case DirectorySetAttrGenOrdinal:
in_ := directorySetAttrRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetAttr(in_.Flags, in_.Attributes)
@@ -2868,7 +2888,7 @@
fallthrough
case DirectoryNodeSetFlagsGenOrdinal:
in_ := directoryNodeSetFlagsRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
@@ -2879,7 +2899,7 @@
fallthrough
case DirectoryOpenGenOrdinal:
in_ := directoryOpenRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Open(in_.Flags, in_.Mode, in_.Path, in_.Object)
@@ -2888,7 +2908,7 @@
fallthrough
case DirectoryUnlinkGenOrdinal:
in_ := directoryUnlinkRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Unlink(in_.Path)
@@ -2899,7 +2919,7 @@
fallthrough
case DirectoryReadDirentsGenOrdinal:
in_ := directoryReadDirentsRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, dirents, err_ := s_.Impl.ReadDirents(in_.MaxBytes)
@@ -2926,7 +2946,7 @@
fallthrough
case DirectoryRenameGenOrdinal:
in_ := directoryRenameRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Rename(in_.Src, in_.DstParentToken, in_.Dst)
@@ -2937,7 +2957,7 @@
fallthrough
case DirectoryLinkGenOrdinal:
in_ := directoryLinkRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Link(in_.Src, in_.DstParentToken, in_.Dst)
@@ -2948,7 +2968,7 @@
fallthrough
case DirectoryWatchGenOrdinal:
in_ := directoryWatchRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Watch(in_.Mask, in_.Options, in_.Watcher)
@@ -3033,8 +3053,8 @@
type directoryAdminCloneRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Object NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Object NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mdirectoryAdminCloneRequest = _bindings.CreateLazyMarshaler(directoryAdminCloneRequest{})
@@ -3045,7 +3065,7 @@
type directoryAdminCloseResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminCloseResponse = _bindings.CreateLazyMarshaler(directoryAdminCloseResponse{})
@@ -3056,7 +3076,7 @@
type directoryAdminDescribeResponse struct {
_ struct{} `fidl:"s,32,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Info NodeInfo `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Info NodeInfo `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminDescribeResponse = _bindings.CreateLazyMarshaler(directoryAdminDescribeResponse{})
@@ -3067,8 +3087,8 @@
type directoryAdminOnOpenResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Info *NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Info *NodeInfo `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryAdminOnOpenResponse = _bindings.CreateLazyMarshaler(directoryAdminOnOpenResponse{})
@@ -3079,7 +3099,7 @@
type directoryAdminSyncResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminSyncResponse = _bindings.CreateLazyMarshaler(directoryAdminSyncResponse{})
@@ -3090,8 +3110,8 @@
type directoryAdminGetAttrResponse struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryAdminGetAttrResponse = _bindings.CreateLazyMarshaler(directoryAdminGetAttrResponse{})
@@ -3102,8 +3122,8 @@
type directoryAdminSetAttrRequest struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryAdminSetAttrRequest = _bindings.CreateLazyMarshaler(directoryAdminSetAttrRequest{})
@@ -3114,7 +3134,7 @@
type directoryAdminSetAttrResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminSetAttrResponse = _bindings.CreateLazyMarshaler(directoryAdminSetAttrResponse{})
@@ -3125,8 +3145,8 @@
type directoryAdminNodeGetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Flags uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Flags uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mdirectoryAdminNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(directoryAdminNodeGetFlagsResponse{})
@@ -3137,7 +3157,7 @@
type directoryAdminNodeSetFlagsRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(directoryAdminNodeSetFlagsRequest{})
@@ -3148,7 +3168,7 @@
type directoryAdminNodeSetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(directoryAdminNodeSetFlagsResponse{})
@@ -3159,10 +3179,10 @@
type directoryAdminOpenRequest struct {
_ struct{} `fidl:"s,32,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Mode uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
- Path string `fidl:"8,4096" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
- Object NodeInterfaceRequest `fidl:"24,0" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Mode uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
+ Path string `fidl:"8,4096" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ Object NodeInterfaceRequest `fidl:"24,0" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
var _mdirectoryAdminOpenRequest = _bindings.CreateLazyMarshaler(directoryAdminOpenRequest{})
@@ -3173,7 +3193,7 @@
type directoryAdminUnlinkRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Path string `fidl:"0,4096" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Path string `fidl:"0,4096" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminUnlinkRequest = _bindings.CreateLazyMarshaler(directoryAdminUnlinkRequest{})
@@ -3184,7 +3204,7 @@
type directoryAdminUnlinkResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminUnlinkResponse = _bindings.CreateLazyMarshaler(directoryAdminUnlinkResponse{})
@@ -3195,7 +3215,7 @@
type directoryAdminReadDirentsRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- MaxBytes uint64 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ MaxBytes uint64 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminReadDirentsRequest = _bindings.CreateLazyMarshaler(directoryAdminReadDirentsRequest{})
@@ -3206,8 +3226,8 @@
type directoryAdminReadDirentsResponse struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Dirents []uint8 `fidl:"8,8192" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Dirents []uint8 `fidl:"8,8192" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryAdminReadDirentsResponse = _bindings.CreateLazyMarshaler(directoryAdminReadDirentsResponse{})
@@ -3218,7 +3238,7 @@
type directoryAdminRewindResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminRewindResponse = _bindings.CreateLazyMarshaler(directoryAdminRewindResponse{})
@@ -3229,8 +3249,8 @@
type directoryAdminGetTokenResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Token _zx.Handle `fidl:"4,1" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Token _zx.Handle `fidl:"4,1" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mdirectoryAdminGetTokenResponse = _bindings.CreateLazyMarshaler(directoryAdminGetTokenResponse{})
@@ -3241,9 +3261,9 @@
type directoryAdminRenameRequest struct {
_ struct{} `fidl:"s,40,0" fidl_size_v1:"40" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"0"`
- Src string `fidl:"0,4096" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- DstParentToken _zx.Handle `fidl:"16,0" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
- Dst string `fidl:"24,4096" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ Src string `fidl:"0,4096" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ DstParentToken _zx.Handle `fidl:"16,0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Dst string `fidl:"24,4096" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
var _mdirectoryAdminRenameRequest = _bindings.CreateLazyMarshaler(directoryAdminRenameRequest{})
@@ -3254,7 +3274,7 @@
type directoryAdminRenameResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminRenameResponse = _bindings.CreateLazyMarshaler(directoryAdminRenameResponse{})
@@ -3265,9 +3285,9 @@
type directoryAdminLinkRequest struct {
_ struct{} `fidl:"s,40,0" fidl_size_v1:"40" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"40" fidl_alignment_v1_no_ee:"0"`
- Src string `fidl:"0,4096" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- DstParentToken _zx.Handle `fidl:"16,0" fidl_offset_v1:"32" fidl_offset_v1_no_ee:"32"`
- Dst string `fidl:"24,4096" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ Src string `fidl:"0,4096" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ DstParentToken _zx.Handle `fidl:"16,0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Dst string `fidl:"24,4096" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
var _mdirectoryAdminLinkRequest = _bindings.CreateLazyMarshaler(directoryAdminLinkRequest{})
@@ -3278,7 +3298,7 @@
type directoryAdminLinkResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminLinkResponse = _bindings.CreateLazyMarshaler(directoryAdminLinkResponse{})
@@ -3289,9 +3309,9 @@
type directoryAdminWatchRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Mask uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Options uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
- Watcher _zx.Channel `fidl:"8,0" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Mask uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Options uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
+ Watcher _zx.Channel `fidl:"8,0" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryAdminWatchRequest = _bindings.CreateLazyMarshaler(directoryAdminWatchRequest{})
@@ -3302,7 +3322,7 @@
type directoryAdminWatchResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminWatchResponse = _bindings.CreateLazyMarshaler(directoryAdminWatchResponse{})
@@ -3313,7 +3333,7 @@
type directoryAdminMountRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Remote DirectoryInterface `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Remote DirectoryInterface `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminMountRequest = _bindings.CreateLazyMarshaler(directoryAdminMountRequest{})
@@ -3324,7 +3344,7 @@
type directoryAdminMountResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminMountResponse = _bindings.CreateLazyMarshaler(directoryAdminMountResponse{})
@@ -3335,9 +3355,9 @@
type directoryAdminMountAndCreateRequest struct {
_ struct{} `fidl:"s,32,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
- Remote DirectoryInterface `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Name string `fidl:"8,255" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
- Flags uint32 `fidl:"24" fidl_offset_v1:"40" fidl_offset_v1_no_ee:"40"`
+ Remote DirectoryInterface `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Name string `fidl:"8,255" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
+ Flags uint32 `fidl:"24" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
}
var _mdirectoryAdminMountAndCreateRequest = _bindings.CreateLazyMarshaler(directoryAdminMountAndCreateRequest{})
@@ -3348,7 +3368,7 @@
type directoryAdminMountAndCreateResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminMountAndCreateResponse = _bindings.CreateLazyMarshaler(directoryAdminMountAndCreateResponse{})
@@ -3359,7 +3379,7 @@
type directoryAdminUnmountResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mdirectoryAdminUnmountResponse = _bindings.CreateLazyMarshaler(directoryAdminUnmountResponse{})
@@ -3370,8 +3390,8 @@
type directoryAdminUnmountNodeResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Remote DirectoryInterface `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Remote DirectoryInterface `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mdirectoryAdminUnmountNodeResponse = _bindings.CreateLazyMarshaler(directoryAdminUnmountNodeResponse{})
@@ -3382,8 +3402,8 @@
type directoryAdminQueryFilesystemResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Info *FilesystemInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Info *FilesystemInfo `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryAdminQueryFilesystemResponse = _bindings.CreateLazyMarshaler(directoryAdminQueryFilesystemResponse{})
@@ -3394,8 +3414,8 @@
type directoryAdminGetDevicePathResponse struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Path *string `fidl:"8,4096" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Path *string `fidl:"8,4096" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mdirectoryAdminGetDevicePathResponse = _bindings.CreateLazyMarshaler(directoryAdminGetDevicePathResponse{})
@@ -4005,12 +4025,17 @@
}
func (s_ *DirectoryAdminStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *DirectoryAdminStub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
case DirectoryAdminCloneOrdinal:
fallthrough
case DirectoryAdminCloneGenOrdinal:
in_ := directoryAdminCloneRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Clone(in_.Flags, in_.Object)
@@ -4048,7 +4073,7 @@
fallthrough
case DirectoryAdminSetAttrGenOrdinal:
in_ := directoryAdminSetAttrRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetAttr(in_.Flags, in_.Attributes)
@@ -4067,7 +4092,7 @@
fallthrough
case DirectoryAdminNodeSetFlagsGenOrdinal:
in_ := directoryAdminNodeSetFlagsRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
@@ -4078,7 +4103,7 @@
fallthrough
case DirectoryAdminOpenGenOrdinal:
in_ := directoryAdminOpenRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Open(in_.Flags, in_.Mode, in_.Path, in_.Object)
@@ -4087,7 +4112,7 @@
fallthrough
case DirectoryAdminUnlinkGenOrdinal:
in_ := directoryAdminUnlinkRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Unlink(in_.Path)
@@ -4098,7 +4123,7 @@
fallthrough
case DirectoryAdminReadDirentsGenOrdinal:
in_ := directoryAdminReadDirentsRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, dirents, err_ := s_.Impl.ReadDirents(in_.MaxBytes)
@@ -4125,7 +4150,7 @@
fallthrough
case DirectoryAdminRenameGenOrdinal:
in_ := directoryAdminRenameRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Rename(in_.Src, in_.DstParentToken, in_.Dst)
@@ -4136,7 +4161,7 @@
fallthrough
case DirectoryAdminLinkGenOrdinal:
in_ := directoryAdminLinkRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Link(in_.Src, in_.DstParentToken, in_.Dst)
@@ -4147,7 +4172,7 @@
fallthrough
case DirectoryAdminWatchGenOrdinal:
in_ := directoryAdminWatchRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Watch(in_.Mask, in_.Options, in_.Watcher)
@@ -4158,7 +4183,7 @@
fallthrough
case DirectoryAdminMountGenOrdinal:
in_ := directoryAdminMountRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.Mount(in_.Remote)
@@ -4169,7 +4194,7 @@
fallthrough
case DirectoryAdminMountAndCreateGenOrdinal:
in_ := directoryAdminMountAndCreateRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.MountAndCreate(in_.Remote, in_.Name, in_.Flags)
diff --git a/src/syscall/zx/net/impl.go b/src/syscall/zx/net/impl.go
index 42b3885..06a378d 100644
--- a/src/syscall/zx/net/impl.go
+++ b/src/syscall/zx/net/impl.go
@@ -55,8 +55,8 @@
type controlCloneRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Object fuchsiaio.NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Object fuchsiaio.NodeInterfaceRequest `fidl:"4,0" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mcontrolCloneRequest = _bindings.CreateLazyMarshaler(controlCloneRequest{})
@@ -67,7 +67,7 @@
type controlCloseResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolCloseResponse = _bindings.CreateLazyMarshaler(controlCloseResponse{})
@@ -78,7 +78,7 @@
type controlDescribeResponse struct {
_ struct{} `fidl:"s,32,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Info fuchsiaio.NodeInfo `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Info fuchsiaio.NodeInfo `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolDescribeResponse = _bindings.CreateLazyMarshaler(controlDescribeResponse{})
@@ -89,8 +89,8 @@
type controlOnOpenResponse struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"32" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"32" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Info *fuchsiaio.NodeInfo `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Info *fuchsiaio.NodeInfo `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mcontrolOnOpenResponse = _bindings.CreateLazyMarshaler(controlOnOpenResponse{})
@@ -101,7 +101,7 @@
type controlSyncResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolSyncResponse = _bindings.CreateLazyMarshaler(controlSyncResponse{})
@@ -112,8 +112,8 @@
type controlGetAttrResponse struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes fuchsiaio.NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes fuchsiaio.NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mcontrolGetAttrResponse = _bindings.CreateLazyMarshaler(controlGetAttrResponse{})
@@ -124,8 +124,8 @@
type controlSetAttrRequest struct {
_ struct{} `fidl:"s,64,0" fidl_size_v1:"64" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"64" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Attributes fuchsiaio.NodeAttributes `fidl:"8" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Attributes fuchsiaio.NodeAttributes `fidl:"8" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mcontrolSetAttrRequest = _bindings.CreateLazyMarshaler(controlSetAttrRequest{})
@@ -136,7 +136,7 @@
type controlSetAttrResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolSetAttrResponse = _bindings.CreateLazyMarshaler(controlSetAttrResponse{})
@@ -147,8 +147,8 @@
type controlNodeGetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Flags uint32 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Flags uint32 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mcontrolNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(controlNodeGetFlagsResponse{})
@@ -159,7 +159,7 @@
type controlNodeSetFlagsRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags uint32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Flags uint32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(controlNodeSetFlagsRequest{})
@@ -170,7 +170,7 @@
type controlNodeSetFlagsResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- S int32 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ S int32 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(controlNodeSetFlagsResponse{})
@@ -181,7 +181,7 @@
type controlBindRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Addr []uint8 `fidl:"0,128" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Addr []uint8 `fidl:"0,128" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolBindRequest = _bindings.CreateLazyMarshaler(controlBindRequest{})
@@ -192,7 +192,7 @@
type controlBindResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Code int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Code int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolBindResponse = _bindings.CreateLazyMarshaler(controlBindResponse{})
@@ -203,7 +203,7 @@
type controlConnectRequest struct {
_ struct{} `fidl:"s,16,0" fidl_size_v1:"16" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"16" fidl_alignment_v1_no_ee:"0"`
- Addr []uint8 `fidl:"0,128" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Addr []uint8 `fidl:"0,128" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolConnectRequest = _bindings.CreateLazyMarshaler(controlConnectRequest{})
@@ -214,7 +214,7 @@
type controlConnectResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Code int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Code int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolConnectResponse = _bindings.CreateLazyMarshaler(controlConnectResponse{})
@@ -225,7 +225,7 @@
type controlListenRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Backlog int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Backlog int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolListenRequest = _bindings.CreateLazyMarshaler(controlListenRequest{})
@@ -236,7 +236,7 @@
type controlListenResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Code int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Code int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolListenResponse = _bindings.CreateLazyMarshaler(controlListenResponse{})
@@ -247,7 +247,7 @@
type controlAcceptRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Flags int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Flags int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolAcceptRequest = _bindings.CreateLazyMarshaler(controlAcceptRequest{})
@@ -258,8 +258,8 @@
type controlAcceptResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Code int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- S ControlInterface `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ Code int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ S ControlInterface `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mcontrolAcceptResponse = _bindings.CreateLazyMarshaler(controlAcceptResponse{})
@@ -270,8 +270,8 @@
type controlGetSockNameResponse struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Code int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Addr []uint8 `fidl:"8,128" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Code int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Addr []uint8 `fidl:"8,128" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mcontrolGetSockNameResponse = _bindings.CreateLazyMarshaler(controlGetSockNameResponse{})
@@ -282,8 +282,8 @@
type controlGetPeerNameResponse struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Code int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Addr []uint8 `fidl:"8,128" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Code int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Addr []uint8 `fidl:"8,128" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mcontrolGetPeerNameResponse = _bindings.CreateLazyMarshaler(controlGetPeerNameResponse{})
@@ -294,9 +294,9 @@
type controlSetSockOptRequest struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Level int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Optname int16 `fidl:"2" fidl_offset_v1:"18" fidl_offset_v1_no_ee:"18"`
- Optval []uint8 `fidl:"8,900" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Level int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Optname int16 `fidl:"2" fidl_offset_v1:"2" fidl_offset_v1_no_ee:"2"`
+ Optval []uint8 `fidl:"8,900" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mcontrolSetSockOptRequest = _bindings.CreateLazyMarshaler(controlSetSockOptRequest{})
@@ -307,7 +307,7 @@
type controlSetSockOptResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Code int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
+ Code int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
}
var _mcontrolSetSockOptResponse = _bindings.CreateLazyMarshaler(controlSetSockOptResponse{})
@@ -318,8 +318,8 @@
type controlGetSockOptRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Level int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Optname int16 `fidl:"2" fidl_offset_v1:"18" fidl_offset_v1_no_ee:"18"`
+ Level int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Optname int16 `fidl:"2" fidl_offset_v1:"2" fidl_offset_v1_no_ee:"2"`
}
var _mcontrolGetSockOptRequest = _bindings.CreateLazyMarshaler(controlGetSockOptRequest{})
@@ -330,8 +330,8 @@
type controlGetSockOptResponse struct {
_ struct{} `fidl:"s,24,0" fidl_size_v1:"24" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"24" fidl_alignment_v1_no_ee:"0"`
- Code int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Optval []uint8 `fidl:"8,900" fidl_offset_v1:"24" fidl_offset_v1_no_ee:"24"`
+ Code int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Optval []uint8 `fidl:"8,900" fidl_offset_v1:"8" fidl_offset_v1_no_ee:"8"`
}
var _mcontrolGetSockOptResponse = _bindings.CreateLazyMarshaler(controlGetSockOptResponse{})
@@ -653,12 +653,17 @@
}
func (s_ *ControlStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *ControlStub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
case ControlCloneOrdinal:
fallthrough
case ControlCloneGenOrdinal:
in_ := controlCloneRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Clone(in_.Flags, in_.Object)
@@ -696,7 +701,7 @@
fallthrough
case ControlSetAttrGenOrdinal:
in_ := controlSetAttrRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetAttr(in_.Flags, in_.Attributes)
@@ -715,7 +720,7 @@
fallthrough
case ControlNodeSetFlagsGenOrdinal:
in_ := controlNodeSetFlagsRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(in_.Flags)
@@ -726,7 +731,7 @@
fallthrough
case ControlBindGenOrdinal:
in_ := controlBindRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
code, err_ := s_.Impl.Bind(in_.Addr)
@@ -737,7 +742,7 @@
fallthrough
case ControlConnectGenOrdinal:
in_ := controlConnectRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
code, err_ := s_.Impl.Connect(in_.Addr)
@@ -748,7 +753,7 @@
fallthrough
case ControlListenGenOrdinal:
in_ := controlListenRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
code, err_ := s_.Impl.Listen(in_.Backlog)
@@ -759,7 +764,7 @@
fallthrough
case ControlAcceptGenOrdinal:
in_ := controlAcceptRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
code, s, err_ := s_.Impl.Accept(in_.Flags)
@@ -787,7 +792,7 @@
fallthrough
case ControlSetSockOptGenOrdinal:
in_ := controlSetSockOptRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
code, err_ := s_.Impl.SetSockOpt(in_.Level, in_.Optname, in_.Optval)
@@ -798,7 +803,7 @@
fallthrough
case ControlGetSockOptGenOrdinal:
in_ := controlGetSockOptRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
code, optval, err_ := s_.Impl.GetSockOpt(in_.Level, in_.Optname)
@@ -840,9 +845,9 @@
type providerSocketRequest struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Domain int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- Type int16 `fidl:"2" fidl_offset_v1:"18" fidl_offset_v1_no_ee:"18"`
- Protocol int16 `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ Domain int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ Type int16 `fidl:"2" fidl_offset_v1:"2" fidl_offset_v1_no_ee:"2"`
+ Protocol int16 `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mproviderSocketRequest = _bindings.CreateLazyMarshaler(providerSocketRequest{})
@@ -853,8 +858,8 @@
type providerSocketResponse struct {
_ struct{} `fidl:"s,8,0" fidl_size_v1:"8" fidl_alignment_v1:"0" fidl_size_v1_no_ee:"8" fidl_alignment_v1_no_ee:"0"`
- Code int16 `fidl:"0" fidl_offset_v1:"16" fidl_offset_v1_no_ee:"16"`
- S ControlInterface `fidl:"4" fidl_offset_v1:"20" fidl_offset_v1_no_ee:"20"`
+ Code int16 `fidl:"0" fidl_offset_v1:"0" fidl_offset_v1_no_ee:"0"`
+ S ControlInterface `fidl:"4" fidl_offset_v1:"4" fidl_offset_v1_no_ee:"4"`
}
var _mproviderSocketResponse = _bindings.CreateLazyMarshaler(providerSocketResponse{})
@@ -907,12 +912,17 @@
}
func (s_ *ProviderStub) DispatchImpl(ordinal_ uint64, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
+ var ctx_ _bindings.MarshalerContext
+ return s_.DispatchImplWithCtx(ordinal_, ctx_, data_, handles_)
+}
+
+func (s_ *ProviderStub) DispatchImplWithCtx(ordinal_ uint64, ctx_ _bindings.MarshalerContext, data_ []byte, handles_ []_zx.Handle) (_bindings.Message, bool, error) {
switch ordinal_ {
case ProviderSocketOrdinal:
fallthrough
case ProviderSocketGenOrdinal:
in_ := providerSocketRequest{}
- if _, _, err_ := _bindings.Unmarshal(data_, handles_, &in_); err_ != nil {
+ if _, _, err_ := _bindings.UnmarshalWithContext(ctx_, data_, handles_, &in_); err_ != nil {
return nil, false, err_
}
code, s, err_ := s_.Impl.Socket(in_.Domain, in_.Type, in_.Protocol)