blob: 254ff065b555a5c508aec198e911cdb73fcc2f62 [file] [log] [blame]
// Copyright 2018 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Code generated by third_party/go/regen-fidl; DO NOT EDIT.
package socket
import (
_zx "syscall/zx"
_bindings "syscall/zx/fidl"
fuchsiaio "syscall/zx/io"
fuchsianet "syscall/zx/net"
fuchsiaposix "syscall/zx/posix"
)
const (
// The maximum length of an interface name.
InterfaceNameLength uint8 = 15
)
var _ _bindings.Enum = Domain(0)
// A socket's domain.
//
// Determines the addressing domain for a socket.
type Domain int16
const (
// An IPv4 socket. Equivalent to `AF_INET`.
DomainIpv4 Domain = 0
// An IPv6 socket. Equivalent to `AF_INET6`.
DomainIpv6 Domain = 1
)
func (_ Domain) I_EnumValues() []Domain {
return []Domain{
DomainIpv4,
DomainIpv6,
}
}
func (_ Domain) I_EnumIsStrict() bool {
return true
}
func (x Domain) IsUnknown() bool {
switch x {
case 0:
return true
case 1:
return true
default:
return false
}
}
func (x Domain) String() string {
switch x {
case 0:
return "Ipv4"
case 1:
return "Ipv6"
}
return "Unknown"
}
var _ _bindings.Enum = DatagramSocketProtocol(0)
// Protocols supported by [`fuchsia.posix.socket/DatagramSocket`].
//
// `DatagramSocketProtocol` enumerates the protocols supported by the network stack over datagram
// sockets.
type DatagramSocketProtocol uint32
const (
// UDP (User Datagram Protocol).
//
// A UDP socket is equivalent to the POSIX API of `SOCK_DGRAM` with a protocol of 0 or
// `IPPROTO_UDP`.
DatagramSocketProtocolUdp DatagramSocketProtocol = 1
// ICMP (Internet Control Message Protocol) echo.
//
// An ICMP echo socket is equivalent to the POSIX API of `SOCK_DGRAM` with a protocol of
// `IPPROTO_ICMP` `IPPROTO_ICMPV6` (depending on provided domain).
//
// Datagrams sent over an ICMP echo socket *must* have a valid ICMP or ICMPv6 echo header.
DatagramSocketProtocolIcmpEcho DatagramSocketProtocol = 2
)
func (_ DatagramSocketProtocol) I_EnumValues() []DatagramSocketProtocol {
return []DatagramSocketProtocol{
DatagramSocketProtocolUdp,
DatagramSocketProtocolIcmpEcho,
}
}
func (_ DatagramSocketProtocol) I_EnumIsStrict() bool {
return true
}
func (x DatagramSocketProtocol) IsUnknown() bool {
switch x {
case 1:
return true
case 2:
return true
default:
return false
}
}
func (x DatagramSocketProtocol) String() string {
switch x {
case 1:
return "Udp"
case 2:
return "IcmpEcho"
}
return "Unknown"
}
var _ _bindings.Enum = StreamSocketProtocol(0)
// Protocols supported by [`fuchsia.posix.socket/StreamSocket`].
//
// `StreamSocketProtocol` enumerates the protocols supported by the network stack over stream
// sockets.
type StreamSocketProtocol uint32
const (
// TCP (Transmission Control Protocol).
//
// A TCP socket is equivalent to the POSIX API of `SOCK_STREAM` with a protocol of 0 or
// `IPPROTO_TCP`.
StreamSocketProtocolTcp StreamSocketProtocol = 0
)
func (_ StreamSocketProtocol) I_EnumValues() []StreamSocketProtocol {
return []StreamSocketProtocol{
StreamSocketProtocolTcp,
}
}
func (_ StreamSocketProtocol) I_EnumIsStrict() bool {
return true
}
func (x StreamSocketProtocol) IsUnknown() bool {
switch x {
case 0:
return true
default:
return false
}
}
func (x StreamSocketProtocol) String() string {
switch x {
case 0:
return "Tcp"
}
return "Unknown"
}
var _ _bindings.Bits = RecvMsgFlags(0)
// Flags controlling RecvMsg behavior.
type RecvMsgFlags uint16
const (
RecvMsgFlagsPeek RecvMsgFlags = 2
RecvMsgFlags_Mask RecvMsgFlags = 2
)
func (_ RecvMsgFlags) I_BitsMask() RecvMsgFlags {
return RecvMsgFlags_Mask
}
func (_ RecvMsgFlags) I_BitsIsStrict() bool {
return true
}
func (x RecvMsgFlags) HasUnknownBits() bool {
return x.GetUnknownBits() != 0
}
func (x RecvMsgFlags) GetUnknownBits() uint64 {
return uint64(^RecvMsgFlags_Mask & x)
}
func (x RecvMsgFlags) String() string {
switch x {
case 2:
return "Peek"
}
return "Unknown"
}
var _ _bindings.Bits = SendMsgFlags(0)
type SendMsgFlags uint16
const (
SendMsgFlagsReserved SendMsgFlags = 32768
SendMsgFlags_Mask SendMsgFlags = 32768
)
func (_ SendMsgFlags) I_BitsMask() SendMsgFlags {
return SendMsgFlags_Mask
}
func (_ SendMsgFlags) I_BitsIsStrict() bool {
return true
}
func (x SendMsgFlags) HasUnknownBits() bool {
return x.GetUnknownBits() != 0
}
func (x SendMsgFlags) GetUnknownBits() uint64 {
return uint64(^SendMsgFlags_Mask & x)
}
func (x SendMsgFlags) String() string {
switch x {
case 32768:
return "Reserved"
}
return "Unknown"
}
var _ _bindings.Bits = ShutdownMode(0)
// Socket shutdown mode.
type ShutdownMode uint16
const (
ShutdownModeRead ShutdownMode = 1
ShutdownModeWrite ShutdownMode = 2
ShutdownMode_Mask ShutdownMode = 3
)
func (_ ShutdownMode) I_BitsMask() ShutdownMode {
return ShutdownMode_Mask
}
func (_ ShutdownMode) I_BitsIsStrict() bool {
return true
}
func (x ShutdownMode) HasUnknownBits() bool {
return x.GetUnknownBits() != 0
}
func (x ShutdownMode) GetUnknownBits() uint64 {
return uint64(^ShutdownMode_Mask & x)
}
func (x ShutdownMode) String() string {
switch x {
case 1:
return "Read"
case 2:
return "Write"
}
return "Unknown"
}
type BaseSocketBindResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
}
var _mBaseSocketBindResponse = _bindings.CreateLazyMarshaler(BaseSocketBindResponse{})
func (msg *BaseSocketBindResponse) Marshaler() _bindings.Marshaler {
return _mBaseSocketBindResponse
}
type BaseSocketConnectResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
}
var _mBaseSocketConnectResponse = _bindings.CreateLazyMarshaler(BaseSocketConnectResponse{})
func (msg *BaseSocketConnectResponse) Marshaler() _bindings.Marshaler {
return _mBaseSocketConnectResponse
}
type BaseSocketDisconnectResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
}
var _mBaseSocketDisconnectResponse = _bindings.CreateLazyMarshaler(BaseSocketDisconnectResponse{})
func (msg *BaseSocketDisconnectResponse) Marshaler() _bindings.Marshaler {
return _mBaseSocketDisconnectResponse
}
type BaseSocketGetSockNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
}
var _mBaseSocketGetSockNameResponse = _bindings.CreateLazyMarshaler(BaseSocketGetSockNameResponse{})
func (msg *BaseSocketGetSockNameResponse) Marshaler() _bindings.Marshaler {
return _mBaseSocketGetSockNameResponse
}
type BaseSocketGetPeerNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
}
var _mBaseSocketGetPeerNameResponse = _bindings.CreateLazyMarshaler(BaseSocketGetPeerNameResponse{})
func (msg *BaseSocketGetPeerNameResponse) Marshaler() _bindings.Marshaler {
return _mBaseSocketGetPeerNameResponse
}
type BaseSocketSetSockOptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
}
var _mBaseSocketSetSockOptResponse = _bindings.CreateLazyMarshaler(BaseSocketSetSockOptResponse{})
func (msg *BaseSocketSetSockOptResponse) Marshaler() _bindings.Marshaler {
return _mBaseSocketSetSockOptResponse
}
type BaseSocketGetSockOptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
Optval []uint8 `fidl_offset_v1:"0" fidl_bounds:"900"`
}
var _mBaseSocketGetSockOptResponse = _bindings.CreateLazyMarshaler(BaseSocketGetSockOptResponse{})
func (msg *BaseSocketGetSockOptResponse) Marshaler() _bindings.Marshaler {
return _mBaseSocketGetSockOptResponse
}
type DatagramSocketShutdownResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
}
var _mDatagramSocketShutdownResponse = _bindings.CreateLazyMarshaler(DatagramSocketShutdownResponse{})
func (msg *DatagramSocketShutdownResponse) Marshaler() _bindings.Marshaler {
return _mDatagramSocketShutdownResponse
}
type DatagramSocketRecvMsgResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
Addr *fuchsianet.SocketAddress `fidl_offset_v1:"0"`
Data []uint8 `fidl_offset_v1:"24" fidl_bounds:""`
Control RecvControlData `fidl_offset_v1:"40"`
Truncated uint32 `fidl_offset_v1:"56"`
}
var _mDatagramSocketRecvMsgResponse = _bindings.CreateLazyMarshaler(DatagramSocketRecvMsgResponse{})
func (msg *DatagramSocketRecvMsgResponse) Marshaler() _bindings.Marshaler {
return _mDatagramSocketRecvMsgResponse
}
type DatagramSocketSendMsgResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Len int64 `fidl_offset_v1:"0"`
}
var _mDatagramSocketSendMsgResponse = _bindings.CreateLazyMarshaler(DatagramSocketSendMsgResponse{})
func (msg *DatagramSocketSendMsgResponse) Marshaler() _bindings.Marshaler {
return _mDatagramSocketSendMsgResponse
}
type StreamSocketListenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
}
var _mStreamSocketListenResponse = _bindings.CreateLazyMarshaler(StreamSocketListenResponse{})
func (msg *StreamSocketListenResponse) Marshaler() _bindings.Marshaler {
return _mStreamSocketListenResponse
}
type StreamSocketAcceptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
Addr *fuchsianet.SocketAddress `fidl_offset_v1:"0"`
S StreamSocketWithCtxInterface `fidl_offset_v1:"24" fidl_handle_subtype:"4"`
}
var _mStreamSocketAcceptResponse = _bindings.CreateLazyMarshaler(StreamSocketAcceptResponse{})
func (msg *StreamSocketAcceptResponse) Marshaler() _bindings.Marshaler {
return _mStreamSocketAcceptResponse
}
type ProviderStreamSocketResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
S StreamSocketWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
}
var _mProviderStreamSocketResponse = _bindings.CreateLazyMarshaler(ProviderStreamSocketResponse{})
func (msg *ProviderStreamSocketResponse) Marshaler() _bindings.Marshaler {
return _mProviderStreamSocketResponse
}
type ProviderDatagramSocketResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"4" fidl_alignment_v1:"4"`
S DatagramSocketWithCtxInterface `fidl_offset_v1:"0" fidl_handle_subtype:"4"`
}
var _mProviderDatagramSocketResponse = _bindings.CreateLazyMarshaler(ProviderDatagramSocketResponse{})
func (msg *ProviderDatagramSocketResponse) Marshaler() _bindings.Marshaler {
return _mProviderDatagramSocketResponse
}
type ProviderInterfaceIndexToNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
Name string `fidl_offset_v1:"0" fidl_bounds:"15"`
}
var _mProviderInterfaceIndexToNameResponse = _bindings.CreateLazyMarshaler(ProviderInterfaceIndexToNameResponse{})
func (msg *ProviderInterfaceIndexToNameResponse) Marshaler() _bindings.Marshaler {
return _mProviderInterfaceIndexToNameResponse
}
type ProviderInterfaceNameToIndexResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Index uint64 `fidl_offset_v1:"0"`
}
var _mProviderInterfaceNameToIndexResponse = _bindings.CreateLazyMarshaler(ProviderInterfaceNameToIndexResponse{})
func (msg *ProviderInterfaceNameToIndexResponse) Marshaler() _bindings.Marshaler {
return _mProviderInterfaceNameToIndexResponse
}
type Empty struct {
_ struct{} `fidl:"s" fidl_size_v1:"1" fidl_alignment_v1:"1"`
}
var _mEmpty = _bindings.CreateLazyMarshaler(Empty{})
func (msg *Empty) Marshaler() _bindings.Marshaler {
return _mEmpty
}
type baseSocketWithCtxCloneRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Flags uint32 `fidl_offset_v1:"0"`
Object fuchsiaio.NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
}
var _mbaseSocketWithCtxCloneRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxCloneRequest{})
func (msg *baseSocketWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxCloneRequest
}
type baseSocketWithCtxCloseResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxCloseResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxCloseResponse{})
func (msg *baseSocketWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxCloseResponse
}
type baseSocketWithCtxDescribeResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Info fuchsiaio.NodeInfo `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxDescribeResponse{})
func (msg *baseSocketWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxDescribeResponse
}
type baseSocketWithCtxOnOpenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
Info *fuchsiaio.NodeInfo `fidl_offset_v1:"8"`
}
var _mbaseSocketWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxOnOpenResponse{})
func (msg *baseSocketWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxOnOpenResponse
}
type baseSocketWithCtxSyncResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxSyncResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxSyncResponse{})
func (msg *baseSocketWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxSyncResponse
}
type baseSocketWithCtxGetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
}
var _mbaseSocketWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetAttrResponse{})
func (msg *baseSocketWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxGetAttrResponse
}
type baseSocketWithCtxSetAttrRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
Flags uint32 `fidl_offset_v1:"0"`
Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
}
var _mbaseSocketWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxSetAttrRequest{})
func (msg *baseSocketWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxSetAttrRequest
}
type baseSocketWithCtxSetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxSetAttrResponse{})
func (msg *baseSocketWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxSetAttrResponse
}
type baseSocketWithCtxNodeGetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
Flags uint32 `fidl_offset_v1:"4"`
}
var _mbaseSocketWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxNodeGetFlagsResponse{})
func (msg *baseSocketWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxNodeGetFlagsResponse
}
type baseSocketWithCtxNodeSetFlagsRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Flags uint32 `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxNodeSetFlagsRequest{})
func (msg *baseSocketWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxNodeSetFlagsRequest
}
type baseSocketWithCtxNodeSetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxNodeSetFlagsResponse{})
func (msg *baseSocketWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxNodeSetFlagsResponse
}
type baseSocketWithCtxBindRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxBindRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxBindRequest{})
func (msg *baseSocketWithCtxBindRequest) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxBindRequest
}
type baseSocketWithCtxBindResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketBindResult `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxBindResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxBindResponse{})
func (msg *baseSocketWithCtxBindResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxBindResponse
}
type baseSocketWithCtxConnectRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxConnectRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxConnectRequest{})
func (msg *baseSocketWithCtxConnectRequest) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxConnectRequest
}
type baseSocketWithCtxConnectResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketConnectResult `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxConnectResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxConnectResponse{})
func (msg *baseSocketWithCtxConnectResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxConnectResponse
}
type baseSocketWithCtxDisconnectResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketDisconnectResult `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxDisconnectResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxDisconnectResponse{})
func (msg *baseSocketWithCtxDisconnectResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxDisconnectResponse
}
type baseSocketWithCtxGetSockNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketGetSockNameResult `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxGetSockNameResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetSockNameResponse{})
func (msg *baseSocketWithCtxGetSockNameResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxGetSockNameResponse
}
type baseSocketWithCtxGetPeerNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketGetPeerNameResult `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxGetPeerNameResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetPeerNameResponse{})
func (msg *baseSocketWithCtxGetPeerNameResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxGetPeerNameResponse
}
type baseSocketWithCtxSetSockOptRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Level int16 `fidl_offset_v1:"0"`
Optname int16 `fidl_offset_v1:"2"`
Optval []uint8 `fidl_offset_v1:"8" fidl_bounds:"900"`
}
var _mbaseSocketWithCtxSetSockOptRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxSetSockOptRequest{})
func (msg *baseSocketWithCtxSetSockOptRequest) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxSetSockOptRequest
}
type baseSocketWithCtxSetSockOptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketSetSockOptResult `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxSetSockOptResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxSetSockOptResponse{})
func (msg *baseSocketWithCtxSetSockOptResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxSetSockOptResponse
}
type baseSocketWithCtxGetSockOptRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Level int16 `fidl_offset_v1:"0"`
Optname int16 `fidl_offset_v1:"2"`
}
var _mbaseSocketWithCtxGetSockOptRequest = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetSockOptRequest{})
func (msg *baseSocketWithCtxGetSockOptRequest) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxGetSockOptRequest
}
type baseSocketWithCtxGetSockOptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketGetSockOptResult `fidl_offset_v1:"0"`
}
var _mbaseSocketWithCtxGetSockOptResponse = _bindings.CreateLazyMarshaler(baseSocketWithCtxGetSockOptResponse{})
func (msg *baseSocketWithCtxGetSockOptResponse) Marshaler() _bindings.Marshaler {
return _mbaseSocketWithCtxGetSockOptResponse
}
type datagramSocketWithCtxCloneRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Flags uint32 `fidl_offset_v1:"0"`
Object fuchsiaio.NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
}
var _mdatagramSocketWithCtxCloneRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxCloneRequest{})
func (msg *datagramSocketWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxCloneRequest
}
type datagramSocketWithCtxCloseResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxCloseResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxCloseResponse{})
func (msg *datagramSocketWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxCloseResponse
}
type datagramSocketWithCtxDescribeResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Info fuchsiaio.NodeInfo `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxDescribeResponse{})
func (msg *datagramSocketWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxDescribeResponse
}
type datagramSocketWithCtxOnOpenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
Info *fuchsiaio.NodeInfo `fidl_offset_v1:"8"`
}
var _mdatagramSocketWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxOnOpenResponse{})
func (msg *datagramSocketWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxOnOpenResponse
}
type datagramSocketWithCtxSyncResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxSyncResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSyncResponse{})
func (msg *datagramSocketWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxSyncResponse
}
type datagramSocketWithCtxGetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
}
var _mdatagramSocketWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetAttrResponse{})
func (msg *datagramSocketWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxGetAttrResponse
}
type datagramSocketWithCtxSetAttrRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
Flags uint32 `fidl_offset_v1:"0"`
Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
}
var _mdatagramSocketWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSetAttrRequest{})
func (msg *datagramSocketWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxSetAttrRequest
}
type datagramSocketWithCtxSetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSetAttrResponse{})
func (msg *datagramSocketWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxSetAttrResponse
}
type datagramSocketWithCtxNodeGetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
Flags uint32 `fidl_offset_v1:"4"`
}
var _mdatagramSocketWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxNodeGetFlagsResponse{})
func (msg *datagramSocketWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxNodeGetFlagsResponse
}
type datagramSocketWithCtxNodeSetFlagsRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Flags uint32 `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxNodeSetFlagsRequest{})
func (msg *datagramSocketWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxNodeSetFlagsRequest
}
type datagramSocketWithCtxNodeSetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxNodeSetFlagsResponse{})
func (msg *datagramSocketWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxNodeSetFlagsResponse
}
type datagramSocketWithCtxBindRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxBindRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxBindRequest{})
func (msg *datagramSocketWithCtxBindRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxBindRequest
}
type datagramSocketWithCtxBindResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketBindResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxBindResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxBindResponse{})
func (msg *datagramSocketWithCtxBindResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxBindResponse
}
type datagramSocketWithCtxConnectRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxConnectRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxConnectRequest{})
func (msg *datagramSocketWithCtxConnectRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxConnectRequest
}
type datagramSocketWithCtxConnectResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketConnectResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxConnectResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxConnectResponse{})
func (msg *datagramSocketWithCtxConnectResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxConnectResponse
}
type datagramSocketWithCtxDisconnectResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketDisconnectResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxDisconnectResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxDisconnectResponse{})
func (msg *datagramSocketWithCtxDisconnectResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxDisconnectResponse
}
type datagramSocketWithCtxGetSockNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketGetSockNameResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxGetSockNameResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetSockNameResponse{})
func (msg *datagramSocketWithCtxGetSockNameResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxGetSockNameResponse
}
type datagramSocketWithCtxGetPeerNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketGetPeerNameResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxGetPeerNameResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetPeerNameResponse{})
func (msg *datagramSocketWithCtxGetPeerNameResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxGetPeerNameResponse
}
type datagramSocketWithCtxSetSockOptRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Level int16 `fidl_offset_v1:"0"`
Optname int16 `fidl_offset_v1:"2"`
Optval []uint8 `fidl_offset_v1:"8" fidl_bounds:"900"`
}
var _mdatagramSocketWithCtxSetSockOptRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSetSockOptRequest{})
func (msg *datagramSocketWithCtxSetSockOptRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxSetSockOptRequest
}
type datagramSocketWithCtxSetSockOptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketSetSockOptResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxSetSockOptResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSetSockOptResponse{})
func (msg *datagramSocketWithCtxSetSockOptResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxSetSockOptResponse
}
type datagramSocketWithCtxGetSockOptRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Level int16 `fidl_offset_v1:"0"`
Optname int16 `fidl_offset_v1:"2"`
}
var _mdatagramSocketWithCtxGetSockOptRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetSockOptRequest{})
func (msg *datagramSocketWithCtxGetSockOptRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxGetSockOptRequest
}
type datagramSocketWithCtxGetSockOptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketGetSockOptResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxGetSockOptResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxGetSockOptResponse{})
func (msg *datagramSocketWithCtxGetSockOptResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxGetSockOptResponse
}
type datagramSocketWithCtxShutdownRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Mode ShutdownMode `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxShutdownRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxShutdownRequest{})
func (msg *datagramSocketWithCtxShutdownRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxShutdownRequest
}
type datagramSocketWithCtxShutdownResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result DatagramSocketShutdownResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxShutdownResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxShutdownResponse{})
func (msg *datagramSocketWithCtxShutdownResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxShutdownResponse
}
type datagramSocketWithCtxRecvMsgRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
WantAddr bool `fidl_offset_v1:"0"`
DataLen uint32 `fidl_offset_v1:"4"`
WantControl bool `fidl_offset_v1:"8"`
Flags RecvMsgFlags `fidl_offset_v1:"10"`
}
var _mdatagramSocketWithCtxRecvMsgRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxRecvMsgRequest{})
func (msg *datagramSocketWithCtxRecvMsgRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxRecvMsgRequest
}
type datagramSocketWithCtxRecvMsgResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result DatagramSocketRecvMsgResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxRecvMsgResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxRecvMsgResponse{})
func (msg *datagramSocketWithCtxRecvMsgResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxRecvMsgResponse
}
type datagramSocketWithCtxSendMsgRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
Addr *fuchsianet.SocketAddress `fidl_offset_v1:"0"`
Data []uint8 `fidl_offset_v1:"24" fidl_bounds:""`
Control SendControlData `fidl_offset_v1:"40"`
Flags SendMsgFlags `fidl_offset_v1:"56"`
}
var _mdatagramSocketWithCtxSendMsgRequest = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSendMsgRequest{})
func (msg *datagramSocketWithCtxSendMsgRequest) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxSendMsgRequest
}
type datagramSocketWithCtxSendMsgResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result DatagramSocketSendMsgResult `fidl_offset_v1:"0"`
}
var _mdatagramSocketWithCtxSendMsgResponse = _bindings.CreateLazyMarshaler(datagramSocketWithCtxSendMsgResponse{})
func (msg *datagramSocketWithCtxSendMsgResponse) Marshaler() _bindings.Marshaler {
return _mdatagramSocketWithCtxSendMsgResponse
}
type streamSocketWithCtxCloneRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Flags uint32 `fidl_offset_v1:"0"`
Object fuchsiaio.NodeWithCtxInterfaceRequest `fidl_offset_v1:"4" fidl_handle_subtype:"4" fidl_bounds:"0"`
}
var _mstreamSocketWithCtxCloneRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxCloneRequest{})
func (msg *streamSocketWithCtxCloneRequest) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxCloneRequest
}
type streamSocketWithCtxCloseResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxCloseResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxCloseResponse{})
func (msg *streamSocketWithCtxCloseResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxCloseResponse
}
type streamSocketWithCtxDescribeResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Info fuchsiaio.NodeInfo `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxDescribeResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxDescribeResponse{})
func (msg *streamSocketWithCtxDescribeResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxDescribeResponse
}
type streamSocketWithCtxOnOpenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"32" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
Info *fuchsiaio.NodeInfo `fidl_offset_v1:"8"`
}
var _mstreamSocketWithCtxOnOpenResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxOnOpenResponse{})
func (msg *streamSocketWithCtxOnOpenResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxOnOpenResponse
}
type streamSocketWithCtxSyncResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxSyncResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxSyncResponse{})
func (msg *streamSocketWithCtxSyncResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxSyncResponse
}
type streamSocketWithCtxGetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
}
var _mstreamSocketWithCtxGetAttrResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetAttrResponse{})
func (msg *streamSocketWithCtxGetAttrResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxGetAttrResponse
}
type streamSocketWithCtxSetAttrRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"64" fidl_alignment_v1:"8"`
Flags uint32 `fidl_offset_v1:"0"`
Attributes fuchsiaio.NodeAttributes `fidl_offset_v1:"8"`
}
var _mstreamSocketWithCtxSetAttrRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxSetAttrRequest{})
func (msg *streamSocketWithCtxSetAttrRequest) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxSetAttrRequest
}
type streamSocketWithCtxSetAttrResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxSetAttrResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxSetAttrResponse{})
func (msg *streamSocketWithCtxSetAttrResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxSetAttrResponse
}
type streamSocketWithCtxNodeGetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
Flags uint32 `fidl_offset_v1:"4"`
}
var _mstreamSocketWithCtxNodeGetFlagsResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxNodeGetFlagsResponse{})
func (msg *streamSocketWithCtxNodeGetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxNodeGetFlagsResponse
}
type streamSocketWithCtxNodeSetFlagsRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Flags uint32 `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxNodeSetFlagsRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxNodeSetFlagsRequest{})
func (msg *streamSocketWithCtxNodeSetFlagsRequest) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxNodeSetFlagsRequest
}
type streamSocketWithCtxNodeSetFlagsResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
S int32 `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxNodeSetFlagsResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxNodeSetFlagsResponse{})
func (msg *streamSocketWithCtxNodeSetFlagsResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxNodeSetFlagsResponse
}
type streamSocketWithCtxBindRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxBindRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxBindRequest{})
func (msg *streamSocketWithCtxBindRequest) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxBindRequest
}
type streamSocketWithCtxBindResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketBindResult `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxBindResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxBindResponse{})
func (msg *streamSocketWithCtxBindResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxBindResponse
}
type streamSocketWithCtxConnectRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Addr fuchsianet.SocketAddress `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxConnectRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxConnectRequest{})
func (msg *streamSocketWithCtxConnectRequest) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxConnectRequest
}
type streamSocketWithCtxConnectResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketConnectResult `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxConnectResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxConnectResponse{})
func (msg *streamSocketWithCtxConnectResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxConnectResponse
}
type streamSocketWithCtxDisconnectResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketDisconnectResult `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxDisconnectResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxDisconnectResponse{})
func (msg *streamSocketWithCtxDisconnectResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxDisconnectResponse
}
type streamSocketWithCtxGetSockNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketGetSockNameResult `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxGetSockNameResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetSockNameResponse{})
func (msg *streamSocketWithCtxGetSockNameResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxGetSockNameResponse
}
type streamSocketWithCtxGetPeerNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketGetPeerNameResult `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxGetPeerNameResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetPeerNameResponse{})
func (msg *streamSocketWithCtxGetPeerNameResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxGetPeerNameResponse
}
type streamSocketWithCtxSetSockOptRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Level int16 `fidl_offset_v1:"0"`
Optname int16 `fidl_offset_v1:"2"`
Optval []uint8 `fidl_offset_v1:"8" fidl_bounds:"900"`
}
var _mstreamSocketWithCtxSetSockOptRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxSetSockOptRequest{})
func (msg *streamSocketWithCtxSetSockOptRequest) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxSetSockOptRequest
}
type streamSocketWithCtxSetSockOptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketSetSockOptResult `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxSetSockOptResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxSetSockOptResponse{})
func (msg *streamSocketWithCtxSetSockOptResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxSetSockOptResponse
}
type streamSocketWithCtxGetSockOptRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Level int16 `fidl_offset_v1:"0"`
Optname int16 `fidl_offset_v1:"2"`
}
var _mstreamSocketWithCtxGetSockOptRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetSockOptRequest{})
func (msg *streamSocketWithCtxGetSockOptRequest) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxGetSockOptRequest
}
type streamSocketWithCtxGetSockOptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result BaseSocketGetSockOptResult `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxGetSockOptResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxGetSockOptResponse{})
func (msg *streamSocketWithCtxGetSockOptResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxGetSockOptResponse
}
type streamSocketWithCtxListenRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Backlog int16 `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxListenRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxListenRequest{})
func (msg *streamSocketWithCtxListenRequest) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxListenRequest
}
type streamSocketWithCtxListenResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result StreamSocketListenResult `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxListenResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxListenResponse{})
func (msg *streamSocketWithCtxListenResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxListenResponse
}
type streamSocketWithCtxAcceptRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
WantAddr bool `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxAcceptRequest = _bindings.CreateLazyMarshaler(streamSocketWithCtxAcceptRequest{})
func (msg *streamSocketWithCtxAcceptRequest) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxAcceptRequest
}
type streamSocketWithCtxAcceptResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result StreamSocketAcceptResult `fidl_offset_v1:"0"`
}
var _mstreamSocketWithCtxAcceptResponse = _bindings.CreateLazyMarshaler(streamSocketWithCtxAcceptResponse{})
func (msg *streamSocketWithCtxAcceptResponse) Marshaler() _bindings.Marshaler {
return _mstreamSocketWithCtxAcceptResponse
}
type providerWithCtxStreamSocketRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Domain Domain `fidl_offset_v1:"0"`
Proto StreamSocketProtocol `fidl_offset_v1:"4"`
}
var _mproviderWithCtxStreamSocketRequest = _bindings.CreateLazyMarshaler(providerWithCtxStreamSocketRequest{})
func (msg *providerWithCtxStreamSocketRequest) Marshaler() _bindings.Marshaler {
return _mproviderWithCtxStreamSocketRequest
}
type providerWithCtxStreamSocketResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result ProviderStreamSocketResult `fidl_offset_v1:"0"`
}
var _mproviderWithCtxStreamSocketResponse = _bindings.CreateLazyMarshaler(providerWithCtxStreamSocketResponse{})
func (msg *providerWithCtxStreamSocketResponse) Marshaler() _bindings.Marshaler {
return _mproviderWithCtxStreamSocketResponse
}
type providerWithCtxDatagramSocketRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Domain Domain `fidl_offset_v1:"0"`
Proto DatagramSocketProtocol `fidl_offset_v1:"4"`
}
var _mproviderWithCtxDatagramSocketRequest = _bindings.CreateLazyMarshaler(providerWithCtxDatagramSocketRequest{})
func (msg *providerWithCtxDatagramSocketRequest) Marshaler() _bindings.Marshaler {
return _mproviderWithCtxDatagramSocketRequest
}
type providerWithCtxDatagramSocketResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result ProviderDatagramSocketResult `fidl_offset_v1:"0"`
}
var _mproviderWithCtxDatagramSocketResponse = _bindings.CreateLazyMarshaler(providerWithCtxDatagramSocketResponse{})
func (msg *providerWithCtxDatagramSocketResponse) Marshaler() _bindings.Marshaler {
return _mproviderWithCtxDatagramSocketResponse
}
type providerWithCtxInterfaceIndexToNameRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"8" fidl_alignment_v1:"8"`
Index uint64 `fidl_offset_v1:"0"`
}
var _mproviderWithCtxInterfaceIndexToNameRequest = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceIndexToNameRequest{})
func (msg *providerWithCtxInterfaceIndexToNameRequest) Marshaler() _bindings.Marshaler {
return _mproviderWithCtxInterfaceIndexToNameRequest
}
type providerWithCtxInterfaceIndexToNameResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result ProviderInterfaceIndexToNameResult `fidl_offset_v1:"0"`
}
var _mproviderWithCtxInterfaceIndexToNameResponse = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceIndexToNameResponse{})
func (msg *providerWithCtxInterfaceIndexToNameResponse) Marshaler() _bindings.Marshaler {
return _mproviderWithCtxInterfaceIndexToNameResponse
}
type providerWithCtxInterfaceNameToIndexRequest struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
Name string `fidl_offset_v1:"0" fidl_bounds:"15"`
}
var _mproviderWithCtxInterfaceNameToIndexRequest = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceNameToIndexRequest{})
func (msg *providerWithCtxInterfaceNameToIndexRequest) Marshaler() _bindings.Marshaler {
return _mproviderWithCtxInterfaceNameToIndexRequest
}
type providerWithCtxInterfaceNameToIndexResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Result ProviderInterfaceNameToIndexResult `fidl_offset_v1:"0"`
}
var _mproviderWithCtxInterfaceNameToIndexResponse = _bindings.CreateLazyMarshaler(providerWithCtxInterfaceNameToIndexResponse{})
func (msg *providerWithCtxInterfaceNameToIndexResponse) Marshaler() _bindings.Marshaler {
return _mproviderWithCtxInterfaceNameToIndexResponse
}
type providerWithCtxGetInterfaceAddressesResponse struct {
_ struct{} `fidl:"s" fidl_size_v1:"16" fidl_alignment_v1:"8"`
Interfaces []InterfaceAddresses `fidl_offset_v1:"0" fidl_bounds:""`
}
var _mproviderWithCtxGetInterfaceAddressesResponse = _bindings.CreateLazyMarshaler(providerWithCtxGetInterfaceAddressesResponse{})
func (msg *providerWithCtxGetInterfaceAddressesResponse) Marshaler() _bindings.Marshaler {
return _mproviderWithCtxGetInterfaceAddressesResponse
}
type I_baseSocketBindResultTag uint64
const (
BaseSocketBindResultResponse = 1 // 0x00000001
BaseSocketBindResultErr = 2 // 0x00000002
)
type BaseSocketBindResult struct {
I_baseSocketBindResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response BaseSocketBindResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *BaseSocketBindResult) Which() I_baseSocketBindResultTag {
return _m.I_baseSocketBindResultTag
}
func (_m *BaseSocketBindResult) Ordinal() uint64 {
return uint64(_m.I_baseSocketBindResultTag)
}
func (_m *BaseSocketBindResult) SetResponse(response BaseSocketBindResponse) {
_m.I_baseSocketBindResultTag = BaseSocketBindResultResponse
_m.Response = response
}
func BaseSocketBindResultWithResponse(response BaseSocketBindResponse) BaseSocketBindResult {
var _u BaseSocketBindResult
_u.SetResponse(response)
return _u
}
func (_m *BaseSocketBindResult) SetErr(err fuchsiaposix.Errno) {
_m.I_baseSocketBindResultTag = BaseSocketBindResultErr
_m.Err = err
}
func BaseSocketBindResultWithErr(err fuchsiaposix.Errno) BaseSocketBindResult {
var _u BaseSocketBindResult
_u.SetErr(err)
return _u
}
type I_baseSocketConnectResultTag uint64
const (
BaseSocketConnectResultResponse = 1 // 0x00000001
BaseSocketConnectResultErr = 2 // 0x00000002
)
type BaseSocketConnectResult struct {
I_baseSocketConnectResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response BaseSocketConnectResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *BaseSocketConnectResult) Which() I_baseSocketConnectResultTag {
return _m.I_baseSocketConnectResultTag
}
func (_m *BaseSocketConnectResult) Ordinal() uint64 {
return uint64(_m.I_baseSocketConnectResultTag)
}
func (_m *BaseSocketConnectResult) SetResponse(response BaseSocketConnectResponse) {
_m.I_baseSocketConnectResultTag = BaseSocketConnectResultResponse
_m.Response = response
}
func BaseSocketConnectResultWithResponse(response BaseSocketConnectResponse) BaseSocketConnectResult {
var _u BaseSocketConnectResult
_u.SetResponse(response)
return _u
}
func (_m *BaseSocketConnectResult) SetErr(err fuchsiaposix.Errno) {
_m.I_baseSocketConnectResultTag = BaseSocketConnectResultErr
_m.Err = err
}
func BaseSocketConnectResultWithErr(err fuchsiaposix.Errno) BaseSocketConnectResult {
var _u BaseSocketConnectResult
_u.SetErr(err)
return _u
}
type I_baseSocketDisconnectResultTag uint64
const (
BaseSocketDisconnectResultResponse = 1 // 0x00000001
BaseSocketDisconnectResultErr = 2 // 0x00000002
)
type BaseSocketDisconnectResult struct {
I_baseSocketDisconnectResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response BaseSocketDisconnectResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *BaseSocketDisconnectResult) Which() I_baseSocketDisconnectResultTag {
return _m.I_baseSocketDisconnectResultTag
}
func (_m *BaseSocketDisconnectResult) Ordinal() uint64 {
return uint64(_m.I_baseSocketDisconnectResultTag)
}
func (_m *BaseSocketDisconnectResult) SetResponse(response BaseSocketDisconnectResponse) {
_m.I_baseSocketDisconnectResultTag = BaseSocketDisconnectResultResponse
_m.Response = response
}
func BaseSocketDisconnectResultWithResponse(response BaseSocketDisconnectResponse) BaseSocketDisconnectResult {
var _u BaseSocketDisconnectResult
_u.SetResponse(response)
return _u
}
func (_m *BaseSocketDisconnectResult) SetErr(err fuchsiaposix.Errno) {
_m.I_baseSocketDisconnectResultTag = BaseSocketDisconnectResultErr
_m.Err = err
}
func BaseSocketDisconnectResultWithErr(err fuchsiaposix.Errno) BaseSocketDisconnectResult {
var _u BaseSocketDisconnectResult
_u.SetErr(err)
return _u
}
type I_baseSocketGetSockNameResultTag uint64
const (
BaseSocketGetSockNameResultResponse = 1 // 0x00000001
BaseSocketGetSockNameResultErr = 2 // 0x00000002
)
type BaseSocketGetSockNameResult struct {
I_baseSocketGetSockNameResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response BaseSocketGetSockNameResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *BaseSocketGetSockNameResult) Which() I_baseSocketGetSockNameResultTag {
return _m.I_baseSocketGetSockNameResultTag
}
func (_m *BaseSocketGetSockNameResult) Ordinal() uint64 {
return uint64(_m.I_baseSocketGetSockNameResultTag)
}
func (_m *BaseSocketGetSockNameResult) SetResponse(response BaseSocketGetSockNameResponse) {
_m.I_baseSocketGetSockNameResultTag = BaseSocketGetSockNameResultResponse
_m.Response = response
}
func BaseSocketGetSockNameResultWithResponse(response BaseSocketGetSockNameResponse) BaseSocketGetSockNameResult {
var _u BaseSocketGetSockNameResult
_u.SetResponse(response)
return _u
}
func (_m *BaseSocketGetSockNameResult) SetErr(err fuchsiaposix.Errno) {
_m.I_baseSocketGetSockNameResultTag = BaseSocketGetSockNameResultErr
_m.Err = err
}
func BaseSocketGetSockNameResultWithErr(err fuchsiaposix.Errno) BaseSocketGetSockNameResult {
var _u BaseSocketGetSockNameResult
_u.SetErr(err)
return _u
}
type I_baseSocketGetPeerNameResultTag uint64
const (
BaseSocketGetPeerNameResultResponse = 1 // 0x00000001
BaseSocketGetPeerNameResultErr = 2 // 0x00000002
)
type BaseSocketGetPeerNameResult struct {
I_baseSocketGetPeerNameResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response BaseSocketGetPeerNameResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *BaseSocketGetPeerNameResult) Which() I_baseSocketGetPeerNameResultTag {
return _m.I_baseSocketGetPeerNameResultTag
}
func (_m *BaseSocketGetPeerNameResult) Ordinal() uint64 {
return uint64(_m.I_baseSocketGetPeerNameResultTag)
}
func (_m *BaseSocketGetPeerNameResult) SetResponse(response BaseSocketGetPeerNameResponse) {
_m.I_baseSocketGetPeerNameResultTag = BaseSocketGetPeerNameResultResponse
_m.Response = response
}
func BaseSocketGetPeerNameResultWithResponse(response BaseSocketGetPeerNameResponse) BaseSocketGetPeerNameResult {
var _u BaseSocketGetPeerNameResult
_u.SetResponse(response)
return _u
}
func (_m *BaseSocketGetPeerNameResult) SetErr(err fuchsiaposix.Errno) {
_m.I_baseSocketGetPeerNameResultTag = BaseSocketGetPeerNameResultErr
_m.Err = err
}
func BaseSocketGetPeerNameResultWithErr(err fuchsiaposix.Errno) BaseSocketGetPeerNameResult {
var _u BaseSocketGetPeerNameResult
_u.SetErr(err)
return _u
}
type I_baseSocketSetSockOptResultTag uint64
const (
BaseSocketSetSockOptResultResponse = 1 // 0x00000001
BaseSocketSetSockOptResultErr = 2 // 0x00000002
)
type BaseSocketSetSockOptResult struct {
I_baseSocketSetSockOptResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response BaseSocketSetSockOptResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *BaseSocketSetSockOptResult) Which() I_baseSocketSetSockOptResultTag {
return _m.I_baseSocketSetSockOptResultTag
}
func (_m *BaseSocketSetSockOptResult) Ordinal() uint64 {
return uint64(_m.I_baseSocketSetSockOptResultTag)
}
func (_m *BaseSocketSetSockOptResult) SetResponse(response BaseSocketSetSockOptResponse) {
_m.I_baseSocketSetSockOptResultTag = BaseSocketSetSockOptResultResponse
_m.Response = response
}
func BaseSocketSetSockOptResultWithResponse(response BaseSocketSetSockOptResponse) BaseSocketSetSockOptResult {
var _u BaseSocketSetSockOptResult
_u.SetResponse(response)
return _u
}
func (_m *BaseSocketSetSockOptResult) SetErr(err fuchsiaposix.Errno) {
_m.I_baseSocketSetSockOptResultTag = BaseSocketSetSockOptResultErr
_m.Err = err
}
func BaseSocketSetSockOptResultWithErr(err fuchsiaposix.Errno) BaseSocketSetSockOptResult {
var _u BaseSocketSetSockOptResult
_u.SetErr(err)
return _u
}
type I_baseSocketGetSockOptResultTag uint64
const (
BaseSocketGetSockOptResultResponse = 1 // 0x00000001
BaseSocketGetSockOptResultErr = 2 // 0x00000002
)
type BaseSocketGetSockOptResult struct {
I_baseSocketGetSockOptResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response BaseSocketGetSockOptResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *BaseSocketGetSockOptResult) Which() I_baseSocketGetSockOptResultTag {
return _m.I_baseSocketGetSockOptResultTag
}
func (_m *BaseSocketGetSockOptResult) Ordinal() uint64 {
return uint64(_m.I_baseSocketGetSockOptResultTag)
}
func (_m *BaseSocketGetSockOptResult) SetResponse(response BaseSocketGetSockOptResponse) {
_m.I_baseSocketGetSockOptResultTag = BaseSocketGetSockOptResultResponse
_m.Response = response
}
func BaseSocketGetSockOptResultWithResponse(response BaseSocketGetSockOptResponse) BaseSocketGetSockOptResult {
var _u BaseSocketGetSockOptResult
_u.SetResponse(response)
return _u
}
func (_m *BaseSocketGetSockOptResult) SetErr(err fuchsiaposix.Errno) {
_m.I_baseSocketGetSockOptResultTag = BaseSocketGetSockOptResultErr
_m.Err = err
}
func BaseSocketGetSockOptResultWithErr(err fuchsiaposix.Errno) BaseSocketGetSockOptResult {
var _u BaseSocketGetSockOptResult
_u.SetErr(err)
return _u
}
type I_datagramSocketShutdownResultTag uint64
const (
DatagramSocketShutdownResultResponse = 1 // 0x00000001
DatagramSocketShutdownResultErr = 2 // 0x00000002
)
type DatagramSocketShutdownResult struct {
I_datagramSocketShutdownResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response DatagramSocketShutdownResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *DatagramSocketShutdownResult) Which() I_datagramSocketShutdownResultTag {
return _m.I_datagramSocketShutdownResultTag
}
func (_m *DatagramSocketShutdownResult) Ordinal() uint64 {
return uint64(_m.I_datagramSocketShutdownResultTag)
}
func (_m *DatagramSocketShutdownResult) SetResponse(response DatagramSocketShutdownResponse) {
_m.I_datagramSocketShutdownResultTag = DatagramSocketShutdownResultResponse
_m.Response = response
}
func DatagramSocketShutdownResultWithResponse(response DatagramSocketShutdownResponse) DatagramSocketShutdownResult {
var _u DatagramSocketShutdownResult
_u.SetResponse(response)
return _u
}
func (_m *DatagramSocketShutdownResult) SetErr(err fuchsiaposix.Errno) {
_m.I_datagramSocketShutdownResultTag = DatagramSocketShutdownResultErr
_m.Err = err
}
func DatagramSocketShutdownResultWithErr(err fuchsiaposix.Errno) DatagramSocketShutdownResult {
var _u DatagramSocketShutdownResult
_u.SetErr(err)
return _u
}
type I_datagramSocketRecvMsgResultTag uint64
const (
DatagramSocketRecvMsgResultResponse = 1 // 0x00000001
DatagramSocketRecvMsgResultErr = 2 // 0x00000002
)
type DatagramSocketRecvMsgResult struct {
I_datagramSocketRecvMsgResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response DatagramSocketRecvMsgResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *DatagramSocketRecvMsgResult) Which() I_datagramSocketRecvMsgResultTag {
return _m.I_datagramSocketRecvMsgResultTag
}
func (_m *DatagramSocketRecvMsgResult) Ordinal() uint64 {
return uint64(_m.I_datagramSocketRecvMsgResultTag)
}
func (_m *DatagramSocketRecvMsgResult) SetResponse(response DatagramSocketRecvMsgResponse) {
_m.I_datagramSocketRecvMsgResultTag = DatagramSocketRecvMsgResultResponse
_m.Response = response
}
func DatagramSocketRecvMsgResultWithResponse(response DatagramSocketRecvMsgResponse) DatagramSocketRecvMsgResult {
var _u DatagramSocketRecvMsgResult
_u.SetResponse(response)
return _u
}
func (_m *DatagramSocketRecvMsgResult) SetErr(err fuchsiaposix.Errno) {
_m.I_datagramSocketRecvMsgResultTag = DatagramSocketRecvMsgResultErr
_m.Err = err
}
func DatagramSocketRecvMsgResultWithErr(err fuchsiaposix.Errno) DatagramSocketRecvMsgResult {
var _u DatagramSocketRecvMsgResult
_u.SetErr(err)
return _u
}
type I_datagramSocketSendMsgResultTag uint64
const (
DatagramSocketSendMsgResultResponse = 1 // 0x00000001
DatagramSocketSendMsgResultErr = 2 // 0x00000002
)
type DatagramSocketSendMsgResult struct {
I_datagramSocketSendMsgResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response DatagramSocketSendMsgResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *DatagramSocketSendMsgResult) Which() I_datagramSocketSendMsgResultTag {
return _m.I_datagramSocketSendMsgResultTag
}
func (_m *DatagramSocketSendMsgResult) Ordinal() uint64 {
return uint64(_m.I_datagramSocketSendMsgResultTag)
}
func (_m *DatagramSocketSendMsgResult) SetResponse(response DatagramSocketSendMsgResponse) {
_m.I_datagramSocketSendMsgResultTag = DatagramSocketSendMsgResultResponse
_m.Response = response
}
func DatagramSocketSendMsgResultWithResponse(response DatagramSocketSendMsgResponse) DatagramSocketSendMsgResult {
var _u DatagramSocketSendMsgResult
_u.SetResponse(response)
return _u
}
func (_m *DatagramSocketSendMsgResult) SetErr(err fuchsiaposix.Errno) {
_m.I_datagramSocketSendMsgResultTag = DatagramSocketSendMsgResultErr
_m.Err = err
}
func DatagramSocketSendMsgResultWithErr(err fuchsiaposix.Errno) DatagramSocketSendMsgResult {
var _u DatagramSocketSendMsgResult
_u.SetErr(err)
return _u
}
type I_streamSocketListenResultTag uint64
const (
StreamSocketListenResultResponse = 1 // 0x00000001
StreamSocketListenResultErr = 2 // 0x00000002
)
type StreamSocketListenResult struct {
I_streamSocketListenResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response StreamSocketListenResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *StreamSocketListenResult) Which() I_streamSocketListenResultTag {
return _m.I_streamSocketListenResultTag
}
func (_m *StreamSocketListenResult) Ordinal() uint64 {
return uint64(_m.I_streamSocketListenResultTag)
}
func (_m *StreamSocketListenResult) SetResponse(response StreamSocketListenResponse) {
_m.I_streamSocketListenResultTag = StreamSocketListenResultResponse
_m.Response = response
}
func StreamSocketListenResultWithResponse(response StreamSocketListenResponse) StreamSocketListenResult {
var _u StreamSocketListenResult
_u.SetResponse(response)
return _u
}
func (_m *StreamSocketListenResult) SetErr(err fuchsiaposix.Errno) {
_m.I_streamSocketListenResultTag = StreamSocketListenResultErr
_m.Err = err
}
func StreamSocketListenResultWithErr(err fuchsiaposix.Errno) StreamSocketListenResult {
var _u StreamSocketListenResult
_u.SetErr(err)
return _u
}
type I_streamSocketAcceptResultTag uint64
const (
StreamSocketAcceptResultResponse = 1 // 0x00000001
StreamSocketAcceptResultErr = 2 // 0x00000002
)
type StreamSocketAcceptResult struct {
I_streamSocketAcceptResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response StreamSocketAcceptResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *StreamSocketAcceptResult) Which() I_streamSocketAcceptResultTag {
return _m.I_streamSocketAcceptResultTag
}
func (_m *StreamSocketAcceptResult) Ordinal() uint64 {
return uint64(_m.I_streamSocketAcceptResultTag)
}
func (_m *StreamSocketAcceptResult) SetResponse(response StreamSocketAcceptResponse) {
_m.I_streamSocketAcceptResultTag = StreamSocketAcceptResultResponse
_m.Response = response
}
func StreamSocketAcceptResultWithResponse(response StreamSocketAcceptResponse) StreamSocketAcceptResult {
var _u StreamSocketAcceptResult
_u.SetResponse(response)
return _u
}
func (_m *StreamSocketAcceptResult) SetErr(err fuchsiaposix.Errno) {
_m.I_streamSocketAcceptResultTag = StreamSocketAcceptResultErr
_m.Err = err
}
func StreamSocketAcceptResultWithErr(err fuchsiaposix.Errno) StreamSocketAcceptResult {
var _u StreamSocketAcceptResult
_u.SetErr(err)
return _u
}
type I_providerStreamSocketResultTag uint64
const (
ProviderStreamSocketResultResponse = 1 // 0x00000001
ProviderStreamSocketResultErr = 2 // 0x00000002
)
type ProviderStreamSocketResult struct {
I_providerStreamSocketResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response ProviderStreamSocketResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *ProviderStreamSocketResult) Which() I_providerStreamSocketResultTag {
return _m.I_providerStreamSocketResultTag
}
func (_m *ProviderStreamSocketResult) Ordinal() uint64 {
return uint64(_m.I_providerStreamSocketResultTag)
}
func (_m *ProviderStreamSocketResult) SetResponse(response ProviderStreamSocketResponse) {
_m.I_providerStreamSocketResultTag = ProviderStreamSocketResultResponse
_m.Response = response
}
func ProviderStreamSocketResultWithResponse(response ProviderStreamSocketResponse) ProviderStreamSocketResult {
var _u ProviderStreamSocketResult
_u.SetResponse(response)
return _u
}
func (_m *ProviderStreamSocketResult) SetErr(err fuchsiaposix.Errno) {
_m.I_providerStreamSocketResultTag = ProviderStreamSocketResultErr
_m.Err = err
}
func ProviderStreamSocketResultWithErr(err fuchsiaposix.Errno) ProviderStreamSocketResult {
var _u ProviderStreamSocketResult
_u.SetErr(err)
return _u
}
type I_providerDatagramSocketResultTag uint64
const (
ProviderDatagramSocketResultResponse = 1 // 0x00000001
ProviderDatagramSocketResultErr = 2 // 0x00000002
)
type ProviderDatagramSocketResult struct {
I_providerDatagramSocketResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response ProviderDatagramSocketResponse `fidl_ordinal:"1"`
Err fuchsiaposix.Errno `fidl_ordinal:"2"`
}
func (_m *ProviderDatagramSocketResult) Which() I_providerDatagramSocketResultTag {
return _m.I_providerDatagramSocketResultTag
}
func (_m *ProviderDatagramSocketResult) Ordinal() uint64 {
return uint64(_m.I_providerDatagramSocketResultTag)
}
func (_m *ProviderDatagramSocketResult) SetResponse(response ProviderDatagramSocketResponse) {
_m.I_providerDatagramSocketResultTag = ProviderDatagramSocketResultResponse
_m.Response = response
}
func ProviderDatagramSocketResultWithResponse(response ProviderDatagramSocketResponse) ProviderDatagramSocketResult {
var _u ProviderDatagramSocketResult
_u.SetResponse(response)
return _u
}
func (_m *ProviderDatagramSocketResult) SetErr(err fuchsiaposix.Errno) {
_m.I_providerDatagramSocketResultTag = ProviderDatagramSocketResultErr
_m.Err = err
}
func ProviderDatagramSocketResultWithErr(err fuchsiaposix.Errno) ProviderDatagramSocketResult {
var _u ProviderDatagramSocketResult
_u.SetErr(err)
return _u
}
type I_providerInterfaceIndexToNameResultTag uint64
const (
ProviderInterfaceIndexToNameResultResponse = 1 // 0x00000001
ProviderInterfaceIndexToNameResultErr = 2 // 0x00000002
)
type ProviderInterfaceIndexToNameResult struct {
I_providerInterfaceIndexToNameResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response ProviderInterfaceIndexToNameResponse `fidl_ordinal:"1"`
Err int32 `fidl_ordinal:"2"`
}
func (_m *ProviderInterfaceIndexToNameResult) Which() I_providerInterfaceIndexToNameResultTag {
return _m.I_providerInterfaceIndexToNameResultTag
}
func (_m *ProviderInterfaceIndexToNameResult) Ordinal() uint64 {
return uint64(_m.I_providerInterfaceIndexToNameResultTag)
}
func (_m *ProviderInterfaceIndexToNameResult) SetResponse(response ProviderInterfaceIndexToNameResponse) {
_m.I_providerInterfaceIndexToNameResultTag = ProviderInterfaceIndexToNameResultResponse
_m.Response = response
}
func ProviderInterfaceIndexToNameResultWithResponse(response ProviderInterfaceIndexToNameResponse) ProviderInterfaceIndexToNameResult {
var _u ProviderInterfaceIndexToNameResult
_u.SetResponse(response)
return _u
}
func (_m *ProviderInterfaceIndexToNameResult) SetErr(err int32) {
_m.I_providerInterfaceIndexToNameResultTag = ProviderInterfaceIndexToNameResultErr
_m.Err = err
}
func ProviderInterfaceIndexToNameResultWithErr(err int32) ProviderInterfaceIndexToNameResult {
var _u ProviderInterfaceIndexToNameResult
_u.SetErr(err)
return _u
}
type I_providerInterfaceNameToIndexResultTag uint64
const (
ProviderInterfaceNameToIndexResultResponse = 1 // 0x00000001
ProviderInterfaceNameToIndexResultErr = 2 // 0x00000002
)
type ProviderInterfaceNameToIndexResult struct {
I_providerInterfaceNameToIndexResultTag `fidl:"x!" fidl_size_v1:"24" fidl_alignment_v1:"8"`
Response ProviderInterfaceNameToIndexResponse `fidl_ordinal:"1"`
Err int32 `fidl_ordinal:"2"`
}
func (_m *ProviderInterfaceNameToIndexResult) Which() I_providerInterfaceNameToIndexResultTag {
return _m.I_providerInterfaceNameToIndexResultTag
}
func (_m *ProviderInterfaceNameToIndexResult) Ordinal() uint64 {
return uint64(_m.I_providerInterfaceNameToIndexResultTag)
}
func (_m *ProviderInterfaceNameToIndexResult) SetResponse(response ProviderInterfaceNameToIndexResponse) {
_m.I_providerInterfaceNameToIndexResultTag = ProviderInterfaceNameToIndexResultResponse
_m.Response = response
}
func ProviderInterfaceNameToIndexResultWithResponse(response ProviderInterfaceNameToIndexResponse) ProviderInterfaceNameToIndexResult {
var _u ProviderInterfaceNameToIndexResult
_u.SetResponse(response)
return _u
}
func (_m *ProviderInterfaceNameToIndexResult) SetErr(err int32) {
_m.I_providerInterfaceNameToIndexResultTag = ProviderInterfaceNameToIndexResultErr
_m.Err = err
}
func ProviderInterfaceNameToIndexResultWithErr(err int32) ProviderInterfaceNameToIndexResult {
var _u ProviderInterfaceNameToIndexResult
_u.SetErr(err)
return _u
}
// Ancillary data for sending datagram sockets.
type SendControlData struct {
_ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8"`
I_unknownData interface{}
}
func (u *SendControlData) HasUnknownData() bool {
return u.I_unknownData != nil
}
func (u *SendControlData) GetUnknownData() map[uint64]_bindings.UnknownData {
return u.I_unknownData.(map[uint64]_bindings.UnknownData)
}
// Ancillary data for received datagram sockets.
type RecvControlData struct {
_ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8"`
I_unknownData interface{}
}
func (u *RecvControlData) HasUnknownData() bool {
return u.I_unknownData != nil
}
func (u *RecvControlData) GetUnknownData() map[uint64]_bindings.UnknownData {
return u.I_unknownData.(map[uint64]_bindings.UnknownData)
}
// Holds information about an interface and its addresses.
type InterfaceAddresses struct {
_ struct{} `fidl:"t" fidl_size_v1:"16" fidl_alignment_v1:"8"`
I_unknownData interface{}
// ID of the interface.
Id uint64 `fidl_ordinal:"1"`
IdPresent bool
// Name of the interface.
Name string `fidl_bounds:"15" fidl_ordinal:"2"`
NamePresent bool
// Contains the interface flags, as returned by the SIOCGIFFLAGS ioctl
// operation.
Flags uint32 `fidl_ordinal:"3"`
FlagsPresent bool
// All addresses currently assigned to the interface.
Addresses []fuchsianet.Subnet `fidl_bounds:"" fidl_ordinal:"4"`
AddressesPresent bool
}
func (u *InterfaceAddresses) SetId(id uint64) {
u.Id = id
u.IdPresent = true
}
func (u *InterfaceAddresses) GetId() uint64 {
return u.Id
}
func (u *InterfaceAddresses) GetIdWithDefault(_default uint64) uint64 {
if !u.HasId() {
return _default
}
return u.Id
}
func (u *InterfaceAddresses) HasId() bool {
return u.IdPresent
}
func (u *InterfaceAddresses) ClearId() {
u.IdPresent = false
}
func (u *InterfaceAddresses) SetName(name string) {
u.Name = name
u.NamePresent = true
}
func (u *InterfaceAddresses) GetName() string {
return u.Name
}
func (u *InterfaceAddresses) GetNameWithDefault(_default string) string {
if !u.HasName() {
return _default
}
return u.Name
}
func (u *InterfaceAddresses) HasName() bool {
return u.NamePresent
}
func (u *InterfaceAddresses) ClearName() {
u.NamePresent = false
}
func (u *InterfaceAddresses) SetFlags(flags uint32) {
u.Flags = flags
u.FlagsPresent = true
}
func (u *InterfaceAddresses) GetFlags() uint32 {
return u.Flags
}
func (u *InterfaceAddresses) GetFlagsWithDefault(_default uint32) uint32 {
if !u.HasFlags() {
return _default
}
return u.Flags
}
func (u *InterfaceAddresses) HasFlags() bool {
return u.FlagsPresent
}
func (u *InterfaceAddresses) ClearFlags() {
u.FlagsPresent = false
}
func (u *InterfaceAddresses) SetAddresses(addresses []fuchsianet.Subnet) {
u.Addresses = addresses
u.AddressesPresent = true
}
func (u *InterfaceAddresses) GetAddresses() []fuchsianet.Subnet {
return u.Addresses
}
func (u *InterfaceAddresses) GetAddressesWithDefault(_default []fuchsianet.Subnet) []fuchsianet.Subnet {
if !u.HasAddresses() {
return _default
}
return u.Addresses
}
func (u *InterfaceAddresses) HasAddresses() bool {
return u.AddressesPresent
}
func (u *InterfaceAddresses) ClearAddresses() {
u.AddressesPresent = false
}
func (u *InterfaceAddresses) HasUnknownData() bool {
return u.I_unknownData != nil
}
func (u *InterfaceAddresses) GetUnknownData() map[uint64]_bindings.UnknownData {
return u.I_unknownData.(map[uint64]_bindings.UnknownData)
}
const (
BaseSocketCloneOrdinal uint64 = 0x5a61678f293ce16f
BaseSocketCloseOrdinal uint64 = 0x5309c5bd1c33dc44
BaseSocketDescribeOrdinal uint64 = 0xffcec215078dea0
BaseSocketOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
BaseSocketSyncOrdinal uint64 = 0x189d88326c18b519
BaseSocketGetAttrOrdinal uint64 = 0x78985e216314dafd
BaseSocketSetAttrOrdinal uint64 = 0x4186c0f40d938f46
BaseSocketNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
BaseSocketNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
BaseSocketBindOrdinal uint64 = 0xf8457e6b05e15bc
BaseSocketConnectOrdinal uint64 = 0x17abeee0b9843bb1
BaseSocketDisconnectOrdinal uint64 = 0x20eaedba2e0f70a4
BaseSocketGetSockNameOrdinal uint64 = 0x41a618ef19a91f9d
BaseSocketGetPeerNameOrdinal uint64 = 0x4009d08a4beb5e95
BaseSocketSetSockOptOrdinal uint64 = 0x93c6f802203e6f1
BaseSocketGetSockOptOrdinal uint64 = 0x6dfaf70f0ed40544
)
type BaseSocketWithCtxInterface _bindings.ChannelProxy
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
// cloned object.
// The cloned object must have rights less than or equal to the original object.
// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
func (p *BaseSocketWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error {
req_ := &baseSocketWithCtxCloneRequest{
Flags: flags,
Object: object,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(BaseSocketCloneOrdinal, req_)
return err_
}
// Terminates connection with object.
//
// This method does not require any rights.
func (p *BaseSocketWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &baseSocketWithCtxCloseResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketCloseOrdinal, req_, resp_)
return resp_.S, err_
}
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
func (p *BaseSocketWithCtxInterface) Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error) {
var req_ _bindings.Message
resp_ := &baseSocketWithCtxDescribeResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketDescribeOrdinal, req_, resp_)
return resp_.Info, err_
}
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
//
// Indicates the success or failure of the open operation, and optionally describes the
// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
// (the same as would be returned by `Describe`).
func (p *BaseSocketWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *fuchsiaio.NodeInfo, error) {
resp_ := &baseSocketWithCtxOnOpenResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Recv(BaseSocketOnOpenOrdinal, resp_)
return resp_.S, resp_.Info, err_
}
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
func (p *BaseSocketWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &baseSocketWithCtxSyncResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketSyncOrdinal, req_, resp_)
return resp_.S, err_
}
// Acquires information about the node.
//
// This method does not require any rights.
func (p *BaseSocketWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error) {
var req_ _bindings.Message
resp_ := &baseSocketWithCtxGetAttrResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketGetAttrOrdinal, req_, resp_)
return resp_.S, resp_.Attributes, err_
}
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
func (p *BaseSocketWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error) {
req_ := &baseSocketWithCtxSetAttrRequest{
Flags: flags,
Attributes: attributes,
}
resp_ := &baseSocketWithCtxSetAttrResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketSetAttrOrdinal, req_, resp_)
return resp_.S, err_
}
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
func (p *BaseSocketWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
var req_ _bindings.Message
resp_ := &baseSocketWithCtxNodeGetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketNodeGetFlagsOrdinal, req_, resp_)
return resp_.S, resp_.Flags, err_
}
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
func (p *BaseSocketWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
req_ := &baseSocketWithCtxNodeSetFlagsRequest{
Flags: flags,
}
resp_ := &baseSocketWithCtxNodeSetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketNodeSetFlagsOrdinal, req_, resp_)
return resp_.S, err_
}
// Sets the local address used for the socket.
func (p *BaseSocketWithCtxInterface) Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error) {
req_ := &baseSocketWithCtxBindRequest{
Addr: addr,
}
resp_ := &baseSocketWithCtxBindResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketBindOrdinal, req_, resp_)
return resp_.Result, err_
}
// Initiates a connection to a remote address.
func (p *BaseSocketWithCtxInterface) Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error) {
req_ := &baseSocketWithCtxConnectRequest{
Addr: addr,
}
resp_ := &baseSocketWithCtxConnectResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketConnectOrdinal, req_, resp_)
return resp_.Result, err_
}
// Clears connection information from this socket.
func (p *BaseSocketWithCtxInterface) Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error) {
var req_ _bindings.Message
resp_ := &baseSocketWithCtxDisconnectResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketDisconnectOrdinal, req_, resp_)
return resp_.Result, err_
}
// Retrieves the local socket address.
func (p *BaseSocketWithCtxInterface) GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error) {
var req_ _bindings.Message
resp_ := &baseSocketWithCtxGetSockNameResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketGetSockNameOrdinal, req_, resp_)
return resp_.Result, err_
}
// Retrieves the remote socket address.
func (p *BaseSocketWithCtxInterface) GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error) {
var req_ _bindings.Message
resp_ := &baseSocketWithCtxGetPeerNameResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketGetPeerNameOrdinal, req_, resp_)
return resp_.Result, err_
}
// Sets the value of a socket option.
func (p *BaseSocketWithCtxInterface) SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error) {
req_ := &baseSocketWithCtxSetSockOptRequest{
Level: level,
Optname: optname,
Optval: optval,
}
resp_ := &baseSocketWithCtxSetSockOptResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketSetSockOptOrdinal, req_, resp_)
return resp_.Result, err_
}
// Retrieves the value of a socket option.
func (p *BaseSocketWithCtxInterface) GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error) {
req_ := &baseSocketWithCtxGetSockOptRequest{
Level: level,
Optname: optname,
}
resp_ := &baseSocketWithCtxGetSockOptResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(BaseSocketGetSockOptOrdinal, req_, resp_)
return resp_.Result, err_
}
// A network socket.
//
// Once a socket has been retrieved from a `Provider`, this interface is then used to further
// configure and use the socket. This interface is essentially POSIX. Its implementation must
// support Linux-specific arguments to {Get,Set}SockOpt.
//
// All methods on this type are nonblocking; their exact behaviors match their Linux counterparts.
//
// *Warning:* This protocol is not yet ready for direct use by clients. Instead, clients should
// use the BSD sockets API to interact with sockets. We plan to change this protocol substantially
// and clients that couple directly to this protocol will make those changes more difficult.
type BaseSocketWithCtx interface {
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
// cloned object.
// The cloned object must have rights less than or equal to the original object.
// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error
// Terminates connection with object.
//
// This method does not require any rights.
Close(ctx_ _bindings.Context) (int32, error)
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error)
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
//
// Indicates the success or failure of the open operation, and optionally describes the
// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
// (the same as would be returned by `Describe`).
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
Sync(ctx_ _bindings.Context) (int32, error)
// Acquires information about the node.
//
// This method does not require any rights.
GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error)
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error)
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
// Sets the local address used for the socket.
Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error)
// Initiates a connection to a remote address.
Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error)
// Clears connection information from this socket.
Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error)
// Retrieves the local socket address.
GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error)
// Retrieves the remote socket address.
GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error)
// Sets the value of a socket option.
SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error)
// Retrieves the value of a socket option.
GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error)
}
type BaseSocketWithCtxTransitionalBase struct{}
func (_ *BaseSocketWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
panic("Not Implemented")
}
func (_ *BaseSocketWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
panic("Not Implemented")
}
type BaseSocketWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewBaseSocketWithCtxInterfaceRequest() (BaseSocketWithCtxInterfaceRequest, *BaseSocketWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return BaseSocketWithCtxInterfaceRequest(req), (*BaseSocketWithCtxInterface)(cli), err
}
type BaseSocketWithCtxStub struct {
Impl BaseSocketWithCtx
}
func (s_ *BaseSocketWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case BaseSocketCloneOrdinal:
in_ := baseSocketWithCtxCloneRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
return nil, false, err_
case BaseSocketCloseOrdinal:
s, err_ := s_.Impl.Close(args_.Ctx)
out_ := baseSocketWithCtxCloseResponse{}
out_.S = s
return &out_, true, err_
case BaseSocketDescribeOrdinal:
info, err_ := s_.Impl.Describe(args_.Ctx)
out_ := baseSocketWithCtxDescribeResponse{}
out_.Info = info
return &out_, true, err_
case BaseSocketSyncOrdinal:
s, err_ := s_.Impl.Sync(args_.Ctx)
out_ := baseSocketWithCtxSyncResponse{}
out_.S = s
return &out_, true, err_
case BaseSocketGetAttrOrdinal:
s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
out_ := baseSocketWithCtxGetAttrResponse{}
out_.S = s
out_.Attributes = attributes
return &out_, true, err_
case BaseSocketSetAttrOrdinal:
in_ := baseSocketWithCtxSetAttrRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
out_ := baseSocketWithCtxSetAttrResponse{}
out_.S = s
return &out_, true, err_
case BaseSocketNodeGetFlagsOrdinal:
s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
out_ := baseSocketWithCtxNodeGetFlagsResponse{}
out_.S = s
out_.Flags = flags
return &out_, true, err_
case BaseSocketNodeSetFlagsOrdinal:
in_ := baseSocketWithCtxNodeSetFlagsRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
out_ := baseSocketWithCtxNodeSetFlagsResponse{}
out_.S = s
return &out_, true, err_
case BaseSocketBindOrdinal:
in_ := baseSocketWithCtxBindRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Bind(args_.Ctx, in_.Addr)
out_ := baseSocketWithCtxBindResponse{}
out_.Result = result
return &out_, true, err_
case BaseSocketConnectOrdinal:
in_ := baseSocketWithCtxConnectRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Connect(args_.Ctx, in_.Addr)
out_ := baseSocketWithCtxConnectResponse{}
out_.Result = result
return &out_, true, err_
case BaseSocketDisconnectOrdinal:
result, err_ := s_.Impl.Disconnect(args_.Ctx)
out_ := baseSocketWithCtxDisconnectResponse{}
out_.Result = result
return &out_, true, err_
case BaseSocketGetSockNameOrdinal:
result, err_ := s_.Impl.GetSockName(args_.Ctx)
out_ := baseSocketWithCtxGetSockNameResponse{}
out_.Result = result
return &out_, true, err_
case BaseSocketGetPeerNameOrdinal:
result, err_ := s_.Impl.GetPeerName(args_.Ctx)
out_ := baseSocketWithCtxGetPeerNameResponse{}
out_.Result = result
return &out_, true, err_
case BaseSocketSetSockOptOrdinal:
in_ := baseSocketWithCtxSetSockOptRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.SetSockOpt(args_.Ctx, in_.Level, in_.Optname, in_.Optval)
out_ := baseSocketWithCtxSetSockOptResponse{}
out_.Result = result
return &out_, true, err_
case BaseSocketGetSockOptOrdinal:
in_ := baseSocketWithCtxGetSockOptRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.GetSockOpt(args_.Ctx, in_.Level, in_.Optname)
out_ := baseSocketWithCtxGetSockOptResponse{}
out_.Result = result
return &out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type BaseSocketEventProxy _bindings.ChannelProxy
func (p *BaseSocketEventProxy) OnOpen(s int32, info *fuchsiaio.NodeInfo) error {
event_ := &baseSocketWithCtxOnOpenResponse{
S: s,
Info: info,
}
return ((*_bindings.ChannelProxy)(p)).Send(BaseSocketOnOpenOrdinal, event_)
}
const (
DatagramSocketCloneOrdinal uint64 = 0x5a61678f293ce16f
DatagramSocketCloseOrdinal uint64 = 0x5309c5bd1c33dc44
DatagramSocketDescribeOrdinal uint64 = 0xffcec215078dea0
DatagramSocketOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
DatagramSocketSyncOrdinal uint64 = 0x189d88326c18b519
DatagramSocketGetAttrOrdinal uint64 = 0x78985e216314dafd
DatagramSocketSetAttrOrdinal uint64 = 0x4186c0f40d938f46
DatagramSocketNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
DatagramSocketNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
DatagramSocketBindOrdinal uint64 = 0xf8457e6b05e15bc
DatagramSocketConnectOrdinal uint64 = 0x17abeee0b9843bb1
DatagramSocketDisconnectOrdinal uint64 = 0x20eaedba2e0f70a4
DatagramSocketGetSockNameOrdinal uint64 = 0x41a618ef19a91f9d
DatagramSocketGetPeerNameOrdinal uint64 = 0x4009d08a4beb5e95
DatagramSocketSetSockOptOrdinal uint64 = 0x93c6f802203e6f1
DatagramSocketGetSockOptOrdinal uint64 = 0x6dfaf70f0ed40544
DatagramSocketShutdownOrdinal uint64 = 0x3c6058976bced940
DatagramSocketRecvMsgOrdinal uint64 = 0x715341bb02f02b7a
DatagramSocketSendMsgOrdinal uint64 = 0x359b626d62a7f17b
)
type DatagramSocketWithCtxInterface _bindings.ChannelProxy
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
// cloned object.
// The cloned object must have rights less than or equal to the original object.
// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
func (p *DatagramSocketWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error {
req_ := &datagramSocketWithCtxCloneRequest{
Flags: flags,
Object: object,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(DatagramSocketCloneOrdinal, req_)
return err_
}
// Terminates connection with object.
//
// This method does not require any rights.
func (p *DatagramSocketWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &datagramSocketWithCtxCloseResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketCloseOrdinal, req_, resp_)
return resp_.S, err_
}
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
func (p *DatagramSocketWithCtxInterface) Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error) {
var req_ _bindings.Message
resp_ := &datagramSocketWithCtxDescribeResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketDescribeOrdinal, req_, resp_)
return resp_.Info, err_
}
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
//
// Indicates the success or failure of the open operation, and optionally describes the
// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
// (the same as would be returned by `Describe`).
func (p *DatagramSocketWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *fuchsiaio.NodeInfo, error) {
resp_ := &datagramSocketWithCtxOnOpenResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Recv(DatagramSocketOnOpenOrdinal, resp_)
return resp_.S, resp_.Info, err_
}
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
func (p *DatagramSocketWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &datagramSocketWithCtxSyncResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketSyncOrdinal, req_, resp_)
return resp_.S, err_
}
// Acquires information about the node.
//
// This method does not require any rights.
func (p *DatagramSocketWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error) {
var req_ _bindings.Message
resp_ := &datagramSocketWithCtxGetAttrResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketGetAttrOrdinal, req_, resp_)
return resp_.S, resp_.Attributes, err_
}
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
func (p *DatagramSocketWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error) {
req_ := &datagramSocketWithCtxSetAttrRequest{
Flags: flags,
Attributes: attributes,
}
resp_ := &datagramSocketWithCtxSetAttrResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketSetAttrOrdinal, req_, resp_)
return resp_.S, err_
}
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
func (p *DatagramSocketWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
var req_ _bindings.Message
resp_ := &datagramSocketWithCtxNodeGetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketNodeGetFlagsOrdinal, req_, resp_)
return resp_.S, resp_.Flags, err_
}
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
func (p *DatagramSocketWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
req_ := &datagramSocketWithCtxNodeSetFlagsRequest{
Flags: flags,
}
resp_ := &datagramSocketWithCtxNodeSetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketNodeSetFlagsOrdinal, req_, resp_)
return resp_.S, err_
}
// Sets the local address used for the socket.
func (p *DatagramSocketWithCtxInterface) Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error) {
req_ := &datagramSocketWithCtxBindRequest{
Addr: addr,
}
resp_ := &datagramSocketWithCtxBindResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketBindOrdinal, req_, resp_)
return resp_.Result, err_
}
// Initiates a connection to a remote address.
func (p *DatagramSocketWithCtxInterface) Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error) {
req_ := &datagramSocketWithCtxConnectRequest{
Addr: addr,
}
resp_ := &datagramSocketWithCtxConnectResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketConnectOrdinal, req_, resp_)
return resp_.Result, err_
}
// Clears connection information from this socket.
func (p *DatagramSocketWithCtxInterface) Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error) {
var req_ _bindings.Message
resp_ := &datagramSocketWithCtxDisconnectResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketDisconnectOrdinal, req_, resp_)
return resp_.Result, err_
}
// Retrieves the local socket address.
func (p *DatagramSocketWithCtxInterface) GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error) {
var req_ _bindings.Message
resp_ := &datagramSocketWithCtxGetSockNameResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketGetSockNameOrdinal, req_, resp_)
return resp_.Result, err_
}
// Retrieves the remote socket address.
func (p *DatagramSocketWithCtxInterface) GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error) {
var req_ _bindings.Message
resp_ := &datagramSocketWithCtxGetPeerNameResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketGetPeerNameOrdinal, req_, resp_)
return resp_.Result, err_
}
// Sets the value of a socket option.
func (p *DatagramSocketWithCtxInterface) SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error) {
req_ := &datagramSocketWithCtxSetSockOptRequest{
Level: level,
Optname: optname,
Optval: optval,
}
resp_ := &datagramSocketWithCtxSetSockOptResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketSetSockOptOrdinal, req_, resp_)
return resp_.Result, err_
}
// Retrieves the value of a socket option.
func (p *DatagramSocketWithCtxInterface) GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error) {
req_ := &datagramSocketWithCtxGetSockOptRequest{
Level: level,
Optname: optname,
}
resp_ := &datagramSocketWithCtxGetSockOptResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketGetSockOptOrdinal, req_, resp_)
return resp_.Result, err_
}
// Shuts down part of the socket.
func (p *DatagramSocketWithCtxInterface) Shutdown(ctx_ _bindings.Context, mode ShutdownMode) (DatagramSocketShutdownResult, error) {
req_ := &datagramSocketWithCtxShutdownRequest{
Mode: mode,
}
resp_ := &datagramSocketWithCtxShutdownResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketShutdownOrdinal, req_, resp_)
return resp_.Result, err_
}
// Receives a message from the socket.
func (p *DatagramSocketWithCtxInterface) RecvMsg(ctx_ _bindings.Context, wantAddr bool, dataLen uint32, wantControl bool, flags RecvMsgFlags) (DatagramSocketRecvMsgResult, error) {
req_ := &datagramSocketWithCtxRecvMsgRequest{
WantAddr: wantAddr,
DataLen: dataLen,
WantControl: wantControl,
Flags: flags,
}
resp_ := &datagramSocketWithCtxRecvMsgResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketRecvMsgOrdinal, req_, resp_)
return resp_.Result, err_
}
// Sends a message on the socket.
func (p *DatagramSocketWithCtxInterface) SendMsg(ctx_ _bindings.Context, addr *fuchsianet.SocketAddress, data []uint8, control SendControlData, flags SendMsgFlags) (DatagramSocketSendMsgResult, error) {
req_ := &datagramSocketWithCtxSendMsgRequest{
Addr: addr,
Data: data,
Control: control,
Flags: flags,
}
resp_ := &datagramSocketWithCtxSendMsgResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(DatagramSocketSendMsgOrdinal, req_, resp_)
return resp_.Result, err_
}
// A datagram socket.
//
// This type's [`fuchsia.io.Node/Describe`] method returns an eventpair which is used to signal
// additional information about the state of the socket such as readiness or shutdown-ness.
//
// All methods on this type are nonblocking; their exact behaviors match their Linux counterparts.
type DatagramSocketWithCtx interface {
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
// cloned object.
// The cloned object must have rights less than or equal to the original object.
// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error
// Terminates connection with object.
//
// This method does not require any rights.
Close(ctx_ _bindings.Context) (int32, error)
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error)
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
//
// Indicates the success or failure of the open operation, and optionally describes the
// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
// (the same as would be returned by `Describe`).
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
Sync(ctx_ _bindings.Context) (int32, error)
// Acquires information about the node.
//
// This method does not require any rights.
GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error)
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error)
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
// Sets the local address used for the socket.
Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error)
// Initiates a connection to a remote address.
Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error)
// Clears connection information from this socket.
Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error)
// Retrieves the local socket address.
GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error)
// Retrieves the remote socket address.
GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error)
// Sets the value of a socket option.
SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error)
// Retrieves the value of a socket option.
GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error)
// Shuts down part of the socket.
Shutdown(ctx_ _bindings.Context, mode ShutdownMode) (DatagramSocketShutdownResult, error)
// Receives a message from the socket.
RecvMsg(ctx_ _bindings.Context, wantAddr bool, dataLen uint32, wantControl bool, flags RecvMsgFlags) (DatagramSocketRecvMsgResult, error)
// Sends a message on the socket.
SendMsg(ctx_ _bindings.Context, addr *fuchsianet.SocketAddress, data []uint8, control SendControlData, flags SendMsgFlags) (DatagramSocketSendMsgResult, error)
}
type DatagramSocketWithCtxTransitionalBase struct{}
func (_ *DatagramSocketWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
panic("Not Implemented")
}
func (_ *DatagramSocketWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
panic("Not Implemented")
}
type DatagramSocketWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewDatagramSocketWithCtxInterfaceRequest() (DatagramSocketWithCtxInterfaceRequest, *DatagramSocketWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return DatagramSocketWithCtxInterfaceRequest(req), (*DatagramSocketWithCtxInterface)(cli), err
}
type DatagramSocketWithCtxStub struct {
Impl DatagramSocketWithCtx
}
func (s_ *DatagramSocketWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case DatagramSocketCloneOrdinal:
in_ := datagramSocketWithCtxCloneRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
return nil, false, err_
case DatagramSocketCloseOrdinal:
s, err_ := s_.Impl.Close(args_.Ctx)
out_ := datagramSocketWithCtxCloseResponse{}
out_.S = s
return &out_, true, err_
case DatagramSocketDescribeOrdinal:
info, err_ := s_.Impl.Describe(args_.Ctx)
out_ := datagramSocketWithCtxDescribeResponse{}
out_.Info = info
return &out_, true, err_
case DatagramSocketSyncOrdinal:
s, err_ := s_.Impl.Sync(args_.Ctx)
out_ := datagramSocketWithCtxSyncResponse{}
out_.S = s
return &out_, true, err_
case DatagramSocketGetAttrOrdinal:
s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
out_ := datagramSocketWithCtxGetAttrResponse{}
out_.S = s
out_.Attributes = attributes
return &out_, true, err_
case DatagramSocketSetAttrOrdinal:
in_ := datagramSocketWithCtxSetAttrRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
out_ := datagramSocketWithCtxSetAttrResponse{}
out_.S = s
return &out_, true, err_
case DatagramSocketNodeGetFlagsOrdinal:
s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
out_ := datagramSocketWithCtxNodeGetFlagsResponse{}
out_.S = s
out_.Flags = flags
return &out_, true, err_
case DatagramSocketNodeSetFlagsOrdinal:
in_ := datagramSocketWithCtxNodeSetFlagsRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
out_ := datagramSocketWithCtxNodeSetFlagsResponse{}
out_.S = s
return &out_, true, err_
case DatagramSocketBindOrdinal:
in_ := datagramSocketWithCtxBindRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Bind(args_.Ctx, in_.Addr)
out_ := datagramSocketWithCtxBindResponse{}
out_.Result = result
return &out_, true, err_
case DatagramSocketConnectOrdinal:
in_ := datagramSocketWithCtxConnectRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Connect(args_.Ctx, in_.Addr)
out_ := datagramSocketWithCtxConnectResponse{}
out_.Result = result
return &out_, true, err_
case DatagramSocketDisconnectOrdinal:
result, err_ := s_.Impl.Disconnect(args_.Ctx)
out_ := datagramSocketWithCtxDisconnectResponse{}
out_.Result = result
return &out_, true, err_
case DatagramSocketGetSockNameOrdinal:
result, err_ := s_.Impl.GetSockName(args_.Ctx)
out_ := datagramSocketWithCtxGetSockNameResponse{}
out_.Result = result
return &out_, true, err_
case DatagramSocketGetPeerNameOrdinal:
result, err_ := s_.Impl.GetPeerName(args_.Ctx)
out_ := datagramSocketWithCtxGetPeerNameResponse{}
out_.Result = result
return &out_, true, err_
case DatagramSocketSetSockOptOrdinal:
in_ := datagramSocketWithCtxSetSockOptRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.SetSockOpt(args_.Ctx, in_.Level, in_.Optname, in_.Optval)
out_ := datagramSocketWithCtxSetSockOptResponse{}
out_.Result = result
return &out_, true, err_
case DatagramSocketGetSockOptOrdinal:
in_ := datagramSocketWithCtxGetSockOptRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.GetSockOpt(args_.Ctx, in_.Level, in_.Optname)
out_ := datagramSocketWithCtxGetSockOptResponse{}
out_.Result = result
return &out_, true, err_
case DatagramSocketShutdownOrdinal:
in_ := datagramSocketWithCtxShutdownRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Shutdown(args_.Ctx, in_.Mode)
out_ := datagramSocketWithCtxShutdownResponse{}
out_.Result = result
return &out_, true, err_
case DatagramSocketRecvMsgOrdinal:
in_ := datagramSocketWithCtxRecvMsgRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.RecvMsg(args_.Ctx, in_.WantAddr, in_.DataLen, in_.WantControl, in_.Flags)
out_ := datagramSocketWithCtxRecvMsgResponse{}
out_.Result = result
return &out_, true, err_
case DatagramSocketSendMsgOrdinal:
in_ := datagramSocketWithCtxSendMsgRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.SendMsg(args_.Ctx, in_.Addr, in_.Data, in_.Control, in_.Flags)
out_ := datagramSocketWithCtxSendMsgResponse{}
out_.Result = result
return &out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type DatagramSocketEventProxy _bindings.ChannelProxy
func (p *DatagramSocketEventProxy) OnOpen(s int32, info *fuchsiaio.NodeInfo) error {
event_ := &datagramSocketWithCtxOnOpenResponse{
S: s,
Info: info,
}
return ((*_bindings.ChannelProxy)(p)).Send(DatagramSocketOnOpenOrdinal, event_)
}
const (
StreamSocketCloneOrdinal uint64 = 0x5a61678f293ce16f
StreamSocketCloseOrdinal uint64 = 0x5309c5bd1c33dc44
StreamSocketDescribeOrdinal uint64 = 0xffcec215078dea0
StreamSocketOnOpenOrdinal uint64 = 0x7fc7bbb1dbfd1972
StreamSocketSyncOrdinal uint64 = 0x189d88326c18b519
StreamSocketGetAttrOrdinal uint64 = 0x78985e216314dafd
StreamSocketSetAttrOrdinal uint64 = 0x4186c0f40d938f46
StreamSocketNodeGetFlagsOrdinal uint64 = 0x5b88fffb8eda3aa1
StreamSocketNodeSetFlagsOrdinal uint64 = 0x5295b76c71fde733
StreamSocketBindOrdinal uint64 = 0xf8457e6b05e15bc
StreamSocketConnectOrdinal uint64 = 0x17abeee0b9843bb1
StreamSocketDisconnectOrdinal uint64 = 0x20eaedba2e0f70a4
StreamSocketGetSockNameOrdinal uint64 = 0x41a618ef19a91f9d
StreamSocketGetPeerNameOrdinal uint64 = 0x4009d08a4beb5e95
StreamSocketSetSockOptOrdinal uint64 = 0x93c6f802203e6f1
StreamSocketGetSockOptOrdinal uint64 = 0x6dfaf70f0ed40544
StreamSocketListenOrdinal uint64 = 0x3d0a65ced3d10108
StreamSocketAcceptOrdinal uint64 = 0x5ab7ad620424c163
)
type StreamSocketWithCtxInterface _bindings.ChannelProxy
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
// cloned object.
// The cloned object must have rights less than or equal to the original object.
// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
func (p *StreamSocketWithCtxInterface) Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error {
req_ := &streamSocketWithCtxCloneRequest{
Flags: flags,
Object: object,
}
err_ := ((*_bindings.ChannelProxy)(p)).Send(StreamSocketCloneOrdinal, req_)
return err_
}
// Terminates connection with object.
//
// This method does not require any rights.
func (p *StreamSocketWithCtxInterface) Close(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &streamSocketWithCtxCloseResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketCloseOrdinal, req_, resp_)
return resp_.S, err_
}
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
func (p *StreamSocketWithCtxInterface) Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error) {
var req_ _bindings.Message
resp_ := &streamSocketWithCtxDescribeResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketDescribeOrdinal, req_, resp_)
return resp_.Info, err_
}
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
//
// Indicates the success or failure of the open operation, and optionally describes the
// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
// (the same as would be returned by `Describe`).
func (p *StreamSocketWithCtxInterface) ExpectOnOpen(ctx_ _bindings.Context) (int32, *fuchsiaio.NodeInfo, error) {
resp_ := &streamSocketWithCtxOnOpenResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Recv(StreamSocketOnOpenOrdinal, resp_)
return resp_.S, resp_.Info, err_
}
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
func (p *StreamSocketWithCtxInterface) Sync(ctx_ _bindings.Context) (int32, error) {
var req_ _bindings.Message
resp_ := &streamSocketWithCtxSyncResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketSyncOrdinal, req_, resp_)
return resp_.S, err_
}
// Acquires information about the node.
//
// This method does not require any rights.
func (p *StreamSocketWithCtxInterface) GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error) {
var req_ _bindings.Message
resp_ := &streamSocketWithCtxGetAttrResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketGetAttrOrdinal, req_, resp_)
return resp_.S, resp_.Attributes, err_
}
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
func (p *StreamSocketWithCtxInterface) SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error) {
req_ := &streamSocketWithCtxSetAttrRequest{
Flags: flags,
Attributes: attributes,
}
resp_ := &streamSocketWithCtxSetAttrResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketSetAttrOrdinal, req_, resp_)
return resp_.S, err_
}
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
func (p *StreamSocketWithCtxInterface) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
var req_ _bindings.Message
resp_ := &streamSocketWithCtxNodeGetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketNodeGetFlagsOrdinal, req_, resp_)
return resp_.S, resp_.Flags, err_
}
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
func (p *StreamSocketWithCtxInterface) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
req_ := &streamSocketWithCtxNodeSetFlagsRequest{
Flags: flags,
}
resp_ := &streamSocketWithCtxNodeSetFlagsResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketNodeSetFlagsOrdinal, req_, resp_)
return resp_.S, err_
}
// Sets the local address used for the socket.
func (p *StreamSocketWithCtxInterface) Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error) {
req_ := &streamSocketWithCtxBindRequest{
Addr: addr,
}
resp_ := &streamSocketWithCtxBindResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketBindOrdinal, req_, resp_)
return resp_.Result, err_
}
// Initiates a connection to a remote address.
func (p *StreamSocketWithCtxInterface) Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error) {
req_ := &streamSocketWithCtxConnectRequest{
Addr: addr,
}
resp_ := &streamSocketWithCtxConnectResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketConnectOrdinal, req_, resp_)
return resp_.Result, err_
}
// Clears connection information from this socket.
func (p *StreamSocketWithCtxInterface) Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error) {
var req_ _bindings.Message
resp_ := &streamSocketWithCtxDisconnectResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketDisconnectOrdinal, req_, resp_)
return resp_.Result, err_
}
// Retrieves the local socket address.
func (p *StreamSocketWithCtxInterface) GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error) {
var req_ _bindings.Message
resp_ := &streamSocketWithCtxGetSockNameResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketGetSockNameOrdinal, req_, resp_)
return resp_.Result, err_
}
// Retrieves the remote socket address.
func (p *StreamSocketWithCtxInterface) GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error) {
var req_ _bindings.Message
resp_ := &streamSocketWithCtxGetPeerNameResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketGetPeerNameOrdinal, req_, resp_)
return resp_.Result, err_
}
// Sets the value of a socket option.
func (p *StreamSocketWithCtxInterface) SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error) {
req_ := &streamSocketWithCtxSetSockOptRequest{
Level: level,
Optname: optname,
Optval: optval,
}
resp_ := &streamSocketWithCtxSetSockOptResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketSetSockOptOrdinal, req_, resp_)
return resp_.Result, err_
}
// Retrieves the value of a socket option.
func (p *StreamSocketWithCtxInterface) GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error) {
req_ := &streamSocketWithCtxGetSockOptRequest{
Level: level,
Optname: optname,
}
resp_ := &streamSocketWithCtxGetSockOptResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketGetSockOptOrdinal, req_, resp_)
return resp_.Result, err_
}
// Begins listening for new incoming connections. At most `backlog` connections will be
// buffered.
func (p *StreamSocketWithCtxInterface) Listen(ctx_ _bindings.Context, backlog int16) (StreamSocketListenResult, error) {
req_ := &streamSocketWithCtxListenRequest{
Backlog: backlog,
}
resp_ := &streamSocketWithCtxListenResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketListenOrdinal, req_, resp_)
return resp_.Result, err_
}
// Accepts a buffered incoming connection.
func (p *StreamSocketWithCtxInterface) Accept(ctx_ _bindings.Context, wantAddr bool) (StreamSocketAcceptResult, error) {
req_ := &streamSocketWithCtxAcceptRequest{
WantAddr: wantAddr,
}
resp_ := &streamSocketWithCtxAcceptResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(StreamSocketAcceptOrdinal, req_, resp_)
return resp_.Result, err_
}
// A stream socket.
//
// This type's [`fuchsia.io.Node/Describe`] method returns a socket which is used to transfer data
// to and from the caller. Signals are used to communicate additional information about the state
// of the socket such as connectedness and the presence of incoming connections in the case of a
// listening socket.
//
// All methods on this type are nonblocking; their exact behaviors match their Linux counterparts.
type StreamSocketWithCtx interface {
// Create another connection to the same remote object.
//
// `flags` may be any of:
//
// - `OPEN_RIGHT_*`
// - `OPEN_FLAG_APPEND`
// - `OPEN_FLAG_NO_REMOTE`
// - `OPEN_FLAG_DESCRIBE`
// - `CLONE_FLAG_SAME_RIGHTS`
//
// All other flags are ignored.
//
// The `OPEN_RIGHT_*` bits in `flags` request corresponding rights over the resulting
// cloned object.
// The cloned object must have rights less than or equal to the original object.
// Alternatively, pass `CLONE_FLAG_SAME_RIGHTS` to inherit the rights on the source connection.
// It is invalid to pass any of the `OPEN_RIGHT_*` flags together with
// `CLONE_FLAG_SAME_RIGHTS`.
Clone(ctx_ _bindings.Context, flags uint32, object fuchsiaio.NodeWithCtxInterfaceRequest) error
// Terminates connection with object.
//
// This method does not require any rights.
Close(ctx_ _bindings.Context) (int32, error)
// Returns extra information about the type of the object.
// If the `Describe` operation fails, the connection is closed.
//
// This method does not require any rights.
Describe(ctx_ _bindings.Context) (fuchsiaio.NodeInfo, error)
// An event produced eagerly by a FIDL server if requested by `OPEN_FLAG_DESCRIBE`.
//
// Indicates the success or failure of the open operation, and optionally describes the
// object. If the status is `ZX_OK`, `info` contains descriptive information about the object
// (the same as would be returned by `Describe`).
// Synchronizes updates to the node to the underlying media, if it exists.
//
// This method does not require any rights.
Sync(ctx_ _bindings.Context) (int32, error)
// Acquires information about the node.
//
// This method does not require any rights.
GetAttr(ctx_ _bindings.Context) (int32, fuchsiaio.NodeAttributes, error)
// Updates information about the node.
// `flags` may be any of `NODE_ATTRIBUTE_FLAG_*`.
//
// This method requires following rights: `OPEN_RIGHT_WRITABLE`.
SetAttr(ctx_ _bindings.Context, flags uint32, attributes fuchsiaio.NodeAttributes) (int32, error)
// Acquires the `Directory.Open` rights and flags used to access this file.
//
// This method does not require any rights.
// This method has the same functionality as GetFlags for File and is
// meant as an in-progress replacement.
NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error)
// Changes the `Directory.Open` flags used to access the file.
// Supported flags which can be turned on / off:
// - `OPEN_FLAG_APPEND`
//
// This method does not require any rights.
// This method has the same functionality as SetFlags for File and is
// meant as an in-progress replacement.
NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error)
// Sets the local address used for the socket.
Bind(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketBindResult, error)
// Initiates a connection to a remote address.
Connect(ctx_ _bindings.Context, addr fuchsianet.SocketAddress) (BaseSocketConnectResult, error)
// Clears connection information from this socket.
Disconnect(ctx_ _bindings.Context) (BaseSocketDisconnectResult, error)
// Retrieves the local socket address.
GetSockName(ctx_ _bindings.Context) (BaseSocketGetSockNameResult, error)
// Retrieves the remote socket address.
GetPeerName(ctx_ _bindings.Context) (BaseSocketGetPeerNameResult, error)
// Sets the value of a socket option.
SetSockOpt(ctx_ _bindings.Context, level int16, optname int16, optval []uint8) (BaseSocketSetSockOptResult, error)
// Retrieves the value of a socket option.
GetSockOpt(ctx_ _bindings.Context, level int16, optname int16) (BaseSocketGetSockOptResult, error)
// Begins listening for new incoming connections. At most `backlog` connections will be
// buffered.
Listen(ctx_ _bindings.Context, backlog int16) (StreamSocketListenResult, error)
// Accepts a buffered incoming connection.
Accept(ctx_ _bindings.Context, wantAddr bool) (StreamSocketAcceptResult, error)
}
type StreamSocketWithCtxTransitionalBase struct{}
func (_ *StreamSocketWithCtxTransitionalBase) NodeGetFlags(ctx_ _bindings.Context) (int32, uint32, error) {
panic("Not Implemented")
}
func (_ *StreamSocketWithCtxTransitionalBase) NodeSetFlags(ctx_ _bindings.Context, flags uint32) (int32, error) {
panic("Not Implemented")
}
type StreamSocketWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewStreamSocketWithCtxInterfaceRequest() (StreamSocketWithCtxInterfaceRequest, *StreamSocketWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return StreamSocketWithCtxInterfaceRequest(req), (*StreamSocketWithCtxInterface)(cli), err
}
type StreamSocketWithCtxStub struct {
Impl StreamSocketWithCtx
}
func (s_ *StreamSocketWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case StreamSocketCloneOrdinal:
in_ := streamSocketWithCtxCloneRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
err_ := s_.Impl.Clone(args_.Ctx, in_.Flags, in_.Object)
return nil, false, err_
case StreamSocketCloseOrdinal:
s, err_ := s_.Impl.Close(args_.Ctx)
out_ := streamSocketWithCtxCloseResponse{}
out_.S = s
return &out_, true, err_
case StreamSocketDescribeOrdinal:
info, err_ := s_.Impl.Describe(args_.Ctx)
out_ := streamSocketWithCtxDescribeResponse{}
out_.Info = info
return &out_, true, err_
case StreamSocketSyncOrdinal:
s, err_ := s_.Impl.Sync(args_.Ctx)
out_ := streamSocketWithCtxSyncResponse{}
out_.S = s
return &out_, true, err_
case StreamSocketGetAttrOrdinal:
s, attributes, err_ := s_.Impl.GetAttr(args_.Ctx)
out_ := streamSocketWithCtxGetAttrResponse{}
out_.S = s
out_.Attributes = attributes
return &out_, true, err_
case StreamSocketSetAttrOrdinal:
in_ := streamSocketWithCtxSetAttrRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.SetAttr(args_.Ctx, in_.Flags, in_.Attributes)
out_ := streamSocketWithCtxSetAttrResponse{}
out_.S = s
return &out_, true, err_
case StreamSocketNodeGetFlagsOrdinal:
s, flags, err_ := s_.Impl.NodeGetFlags(args_.Ctx)
out_ := streamSocketWithCtxNodeGetFlagsResponse{}
out_.S = s
out_.Flags = flags
return &out_, true, err_
case StreamSocketNodeSetFlagsOrdinal:
in_ := streamSocketWithCtxNodeSetFlagsRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
s, err_ := s_.Impl.NodeSetFlags(args_.Ctx, in_.Flags)
out_ := streamSocketWithCtxNodeSetFlagsResponse{}
out_.S = s
return &out_, true, err_
case StreamSocketBindOrdinal:
in_ := streamSocketWithCtxBindRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Bind(args_.Ctx, in_.Addr)
out_ := streamSocketWithCtxBindResponse{}
out_.Result = result
return &out_, true, err_
case StreamSocketConnectOrdinal:
in_ := streamSocketWithCtxConnectRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Connect(args_.Ctx, in_.Addr)
out_ := streamSocketWithCtxConnectResponse{}
out_.Result = result
return &out_, true, err_
case StreamSocketDisconnectOrdinal:
result, err_ := s_.Impl.Disconnect(args_.Ctx)
out_ := streamSocketWithCtxDisconnectResponse{}
out_.Result = result
return &out_, true, err_
case StreamSocketGetSockNameOrdinal:
result, err_ := s_.Impl.GetSockName(args_.Ctx)
out_ := streamSocketWithCtxGetSockNameResponse{}
out_.Result = result
return &out_, true, err_
case StreamSocketGetPeerNameOrdinal:
result, err_ := s_.Impl.GetPeerName(args_.Ctx)
out_ := streamSocketWithCtxGetPeerNameResponse{}
out_.Result = result
return &out_, true, err_
case StreamSocketSetSockOptOrdinal:
in_ := streamSocketWithCtxSetSockOptRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.SetSockOpt(args_.Ctx, in_.Level, in_.Optname, in_.Optval)
out_ := streamSocketWithCtxSetSockOptResponse{}
out_.Result = result
return &out_, true, err_
case StreamSocketGetSockOptOrdinal:
in_ := streamSocketWithCtxGetSockOptRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.GetSockOpt(args_.Ctx, in_.Level, in_.Optname)
out_ := streamSocketWithCtxGetSockOptResponse{}
out_.Result = result
return &out_, true, err_
case StreamSocketListenOrdinal:
in_ := streamSocketWithCtxListenRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Listen(args_.Ctx, in_.Backlog)
out_ := streamSocketWithCtxListenResponse{}
out_.Result = result
return &out_, true, err_
case StreamSocketAcceptOrdinal:
in_ := streamSocketWithCtxAcceptRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.Accept(args_.Ctx, in_.WantAddr)
out_ := streamSocketWithCtxAcceptResponse{}
out_.Result = result
return &out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type StreamSocketEventProxy _bindings.ChannelProxy
func (p *StreamSocketEventProxy) OnOpen(s int32, info *fuchsiaio.NodeInfo) error {
event_ := &streamSocketWithCtxOnOpenResponse{
S: s,
Info: info,
}
return ((*_bindings.ChannelProxy)(p)).Send(StreamSocketOnOpenOrdinal, event_)
}
const (
ProviderStreamSocketOrdinal uint64 = 0x27c3581da2155545
ProviderDatagramSocketOrdinal uint64 = 0x38876c87cf031cb1
ProviderInterfaceIndexToNameOrdinal uint64 = 0x4d59a64fce98272f
ProviderInterfaceNameToIndexOrdinal uint64 = 0x690cd8d2f2d650f8
ProviderGetInterfaceAddressesOrdinal uint64 = 0x2e7b9aaf327c870
)
type ProviderWithCtxInterface _bindings.ChannelProxy
// Requests a stream socket with the specified parameters.
func (p *ProviderWithCtxInterface) StreamSocket(ctx_ _bindings.Context, domain Domain, proto StreamSocketProtocol) (ProviderStreamSocketResult, error) {
req_ := &providerWithCtxStreamSocketRequest{
Domain: domain,
Proto: proto,
}
resp_ := &providerWithCtxStreamSocketResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderStreamSocketOrdinal, req_, resp_)
return resp_.Result, err_
}
// Requests a datagram socket with the specified parameters.
func (p *ProviderWithCtxInterface) DatagramSocket(ctx_ _bindings.Context, domain Domain, proto DatagramSocketProtocol) (ProviderDatagramSocketResult, error) {
req_ := &providerWithCtxDatagramSocketRequest{
Domain: domain,
Proto: proto,
}
resp_ := &providerWithCtxDatagramSocketResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderDatagramSocketOrdinal, req_, resp_)
return resp_.Result, err_
}
// Looks up an interface by its index and returns its name. Returns `ZX_ERR_NOT_FOUND` if the
// specified index doesn't exist.
func (p *ProviderWithCtxInterface) InterfaceIndexToName(ctx_ _bindings.Context, index uint64) (ProviderInterfaceIndexToNameResult, error) {
req_ := &providerWithCtxInterfaceIndexToNameRequest{
Index: index,
}
resp_ := &providerWithCtxInterfaceIndexToNameResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderInterfaceIndexToNameOrdinal, req_, resp_)
return resp_.Result, err_
}
// Looks up an interface by its name and returns its index. Returns `ZX_ERR_NOT_FOUND` if the
// specified name doesn't exist.
func (p *ProviderWithCtxInterface) InterfaceNameToIndex(ctx_ _bindings.Context, name string) (ProviderInterfaceNameToIndexResult, error) {
req_ := &providerWithCtxInterfaceNameToIndexRequest{
Name: name,
}
resp_ := &providerWithCtxInterfaceNameToIndexResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderInterfaceNameToIndexOrdinal, req_, resp_)
return resp_.Result, err_
}
// Requests a list of [`fuchsia.posix.socket.InterfaceAddresses`]
// describing the network interfaces on the system.
func (p *ProviderWithCtxInterface) GetInterfaceAddresses(ctx_ _bindings.Context) ([]InterfaceAddresses, error) {
var req_ _bindings.Message
resp_ := &providerWithCtxGetInterfaceAddressesResponse{}
err_ := ((*_bindings.ChannelProxy)(p)).Call(ProviderGetInterfaceAddressesOrdinal, req_, resp_)
return resp_.Interfaces, err_
}
// Provider implements the POSIX sockets API.
type ProviderWithCtx interface {
// Requests a stream socket with the specified parameters.
StreamSocket(ctx_ _bindings.Context, domain Domain, proto StreamSocketProtocol) (ProviderStreamSocketResult, error)
// Requests a datagram socket with the specified parameters.
DatagramSocket(ctx_ _bindings.Context, domain Domain, proto DatagramSocketProtocol) (ProviderDatagramSocketResult, error)
// Looks up an interface by its index and returns its name. Returns `ZX_ERR_NOT_FOUND` if the
// specified index doesn't exist.
InterfaceIndexToName(ctx_ _bindings.Context, index uint64) (ProviderInterfaceIndexToNameResult, error)
// Looks up an interface by its name and returns its index. Returns `ZX_ERR_NOT_FOUND` if the
// specified name doesn't exist.
InterfaceNameToIndex(ctx_ _bindings.Context, name string) (ProviderInterfaceNameToIndexResult, error)
// Requests a list of [`fuchsia.posix.socket.InterfaceAddresses`]
// describing the network interfaces on the system.
GetInterfaceAddresses(ctx_ _bindings.Context) ([]InterfaceAddresses, error)
}
type ProviderWithCtxTransitionalBase struct{}
type ProviderWithCtxInterfaceRequest _bindings.InterfaceRequest
func NewProviderWithCtxInterfaceRequest() (ProviderWithCtxInterfaceRequest, *ProviderWithCtxInterface, error) {
req, cli, err := _bindings.NewInterfaceRequest()
return ProviderWithCtxInterfaceRequest(req), (*ProviderWithCtxInterface)(cli), err
}
// Implements ServiceRequest.
func (_ ProviderWithCtxInterfaceRequest) Name() string {
return "fuchsia.posix.socket.Provider"
}
func (c ProviderWithCtxInterfaceRequest) ToChannel() _zx.Channel {
return c.Channel
}
const ProviderName = "fuchsia.posix.socket.Provider"
type ProviderWithCtxStub struct {
Impl ProviderWithCtx
}
func (s_ *ProviderWithCtxStub) Dispatch(args_ _bindings.DispatchArgs) (_bindings.Message, bool, error) {
switch args_.Ordinal {
case ProviderStreamSocketOrdinal:
in_ := providerWithCtxStreamSocketRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.StreamSocket(args_.Ctx, in_.Domain, in_.Proto)
out_ := providerWithCtxStreamSocketResponse{}
out_.Result = result
return &out_, true, err_
case ProviderDatagramSocketOrdinal:
in_ := providerWithCtxDatagramSocketRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.DatagramSocket(args_.Ctx, in_.Domain, in_.Proto)
out_ := providerWithCtxDatagramSocketResponse{}
out_.Result = result
return &out_, true, err_
case ProviderInterfaceIndexToNameOrdinal:
in_ := providerWithCtxInterfaceIndexToNameRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.InterfaceIndexToName(args_.Ctx, in_.Index)
out_ := providerWithCtxInterfaceIndexToNameResponse{}
out_.Result = result
return &out_, true, err_
case ProviderInterfaceNameToIndexOrdinal:
in_ := providerWithCtxInterfaceNameToIndexRequest{}
marshalerCtx, ok := _bindings.GetMarshalerContext(args_.Ctx)
if !ok {
return nil, false, _bindings.ErrMissingMarshalerContext
}
if _, _, err_ := _bindings.UnmarshalWithContext2(marshalerCtx, args_.Bytes, args_.HandleInfos, &in_); err_ != nil {
return nil, false, err_
}
result, err_ := s_.Impl.InterfaceNameToIndex(args_.Ctx, in_.Name)
out_ := providerWithCtxInterfaceNameToIndexResponse{}
out_.Result = result
return &out_, true, err_
case ProviderGetInterfaceAddressesOrdinal:
interfaces, err_ := s_.Impl.GetInterfaceAddresses(args_.Ctx)
out_ := providerWithCtxGetInterfaceAddressesResponse{}
out_.Interfaces = interfaces
return &out_, true, err_
}
return nil, false, _bindings.ErrUnknownOrdinal
}
type ProviderEventProxy _bindings.ChannelProxy