Documentation
¶
Index ¶
- Constants
- type ApInfo
- type BandMask
- type ChannelBandwidth
- type ChannelParams
- type ClientInfo
- type DebugLevel
- type EncryptionType
- type FrequencyRange
- type Generation
- type HostapdCallbackProxy
- func (p *HostapdCallbackProxy) AsBinder() binder.IBinder
- func (p *HostapdCallbackProxy) OnApInstanceInfoChanged(ctx context.Context, apInfo ApInfo) error
- func (p *HostapdCallbackProxy) OnConnectedClientsChanged(ctx context.Context, clientInfo ClientInfo) error
- func (p *HostapdCallbackProxy) OnFailure(ctx context.Context, ifaceName string, instanceName string) error
- type HostapdCallbackStub
- type HostapdProxy
- func (p *HostapdProxy) AddAccessPoint(ctx context.Context, ifaceParams IfaceParams, nwParams NetworkParams) error
- func (p *HostapdProxy) AsBinder() binder.IBinder
- func (p *HostapdProxy) ForceClientDisconnect(ctx context.Context, ifaceName string, clientAddress []byte, ...) error
- func (p *HostapdProxy) RegisterCallback(ctx context.Context, callback IHostapdCallback) error
- func (p *HostapdProxy) RemoveAccessPoint(ctx context.Context, ifaceName string) error
- func (p *HostapdProxy) SetDebugParams(ctx context.Context, level DebugLevel) error
- func (p *HostapdProxy) Terminate(ctx context.Context) error
- type HostapdStatusCode
- type HostapdStub
- type HwModeParams
- type IHostapd
- type IHostapdCallback
- type IHostapdCallbackServer
- type IHostapdServer
- type Ieee80211ReasonCode
- type IfaceParams
- type NetworkParams
- type ParamSizeLimits
Constants ¶
const ( TransactionIHostapdAddAccessPoint = binder.FirstCallTransaction + 0 TransactionIHostapdForceClientDisconnect = binder.FirstCallTransaction + 1 TransactionIHostapdRegisterCallback = binder.FirstCallTransaction + 2 TransactionIHostapdRemoveAccessPoint = binder.FirstCallTransaction + 3 TransactionIHostapdSetDebugParams = binder.FirstCallTransaction + 4 TransactionIHostapdTerminate = binder.FirstCallTransaction + 5 )
const ( MethodIHostapdAddAccessPoint = "addAccessPoint" MethodIHostapdForceClientDisconnect = "forceClientDisconnect" MethodIHostapdRegisterCallback = "registerCallback" MethodIHostapdRemoveAccessPoint = "removeAccessPoint" MethodIHostapdSetDebugParams = "setDebugParams" MethodIHostapdTerminate = "terminate" )
const ( TransactionIHostapdCallbackOnApInstanceInfoChanged = binder.FirstCallTransaction + 0 TransactionIHostapdCallbackOnConnectedClientsChanged = binder.FirstCallTransaction + 1 TransactionIHostapdCallbackOnFailure = binder.FirstCallTransaction + 2 )
const ( MethodIHostapdCallbackOnApInstanceInfoChanged = "onApInstanceInfoChanged" MethodIHostapdCallbackOnConnectedClientsChanged = "onConnectedClientsChanged" MethodIHostapdCallbackOnFailure = "onFailure" )
const DescriptorIHostapd = "android.hardware.wifi.hostapd.IHostapd"
const DescriptorIHostapdCallback = "android.hardware.wifi.hostapd.IHostapdCallback"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApInfo ¶
type ApInfo struct {
IfaceName string
ApIfaceInstance string
FreqMhz int32
ChannelBandwidth ChannelBandwidth
Generation Generation
ApIfaceInstanceMacAddress []byte
VendorData []common.OuiKeyedData
}
type ChannelBandwidth ¶
type ChannelBandwidth int32
const ( ChannelBandwidthBandwidthInvalid ChannelBandwidth = 0 ChannelBandwidthBandwidthAuto ChannelBandwidth = 1 ChannelBandwidthBandwidth20Noht ChannelBandwidth = 2 ChannelBandwidthBandwidth20 ChannelBandwidth = 3 ChannelBandwidthBandwidth40 ChannelBandwidth = 4 ChannelBandwidthBandwidth80 ChannelBandwidth = 5 ChannelBandwidthBandwidth80p80 ChannelBandwidth = 6 ChannelBandwidthBandwidth160 ChannelBandwidth = 7 ChannelBandwidthBandwidth320 ChannelBandwidth = 8 ChannelBandwidthBandwidth2160 ChannelBandwidth = 9 ChannelBandwidthBandwidth4320 ChannelBandwidth = 10 ChannelBandwidthBandwidth6480 ChannelBandwidth = 11 ChannelBandwidthBandwidth8640 ChannelBandwidth = 12 )
type ChannelParams ¶
type ChannelParams struct {
BandMask BandMask
AcsChannelFreqRangesMhz []FrequencyRange
EnableAcs bool
AcsShouldExcludeDfs bool
Channel int32
}
func (*ChannelParams) MarshalParcel ¶
func (s *ChannelParams) MarshalParcel( p *parcel.Parcel, ) error
func (*ChannelParams) UnmarshalParcel ¶
func (s *ChannelParams) UnmarshalParcel( p *parcel.Parcel, ) error
type ClientInfo ¶
type ClientInfo struct {
IfaceName string
ApIfaceInstance string
ClientAddress []byte
IsConnected bool
}
func (*ClientInfo) MarshalParcel ¶
func (s *ClientInfo) MarshalParcel( p *parcel.Parcel, ) error
func (*ClientInfo) UnmarshalParcel ¶
func (s *ClientInfo) UnmarshalParcel( p *parcel.Parcel, ) error
type DebugLevel ¶
type DebugLevel int32
const ( DebugLevelEXCESSIVE DebugLevel = 0 DebugLevelMSGDUMP DebugLevel = 1 DebugLevelDEBUG DebugLevel = 2 DebugLevelINFO DebugLevel = 3 DebugLevelWARNING DebugLevel = 4 DebugLevelERROR DebugLevel = 5 )
type EncryptionType ¶
type EncryptionType int32
const ( EncryptionTypeNONE EncryptionType = 0 EncryptionTypeWPA EncryptionType = 1 EncryptionTypeWPA2 EncryptionType = 2 EncryptionTypeWpa3SaeTransition EncryptionType = 3 EncryptionTypeWpa3Sae EncryptionType = 4 EncryptionTypeWpa3OweTransition EncryptionType = 5 EncryptionTypeWpa3Owe EncryptionType = 6 )
type FrequencyRange ¶
func (*FrequencyRange) MarshalParcel ¶
func (s *FrequencyRange) MarshalParcel( p *parcel.Parcel, ) error
func (*FrequencyRange) UnmarshalParcel ¶
func (s *FrequencyRange) UnmarshalParcel( p *parcel.Parcel, ) error
type Generation ¶
type Generation int32
const ( GenerationWifiStandardUnknown Generation = -1 GenerationWifiStandardLegacy Generation = 0 GenerationWifiStandard11n Generation = 1 GenerationWifiStandard11ac Generation = 2 GenerationWifiStandard11ad Generation = 3 GenerationWifiStandard11ax Generation = 4 GenerationWifiStandard11be Generation = 5 )
type HostapdCallbackProxy ¶
func NewHostapdCallbackProxy ¶
func NewHostapdCallbackProxy( remote binder.IBinder, ) *HostapdCallbackProxy
func (*HostapdCallbackProxy) AsBinder ¶
func (p *HostapdCallbackProxy) AsBinder() binder.IBinder
func (*HostapdCallbackProxy) OnApInstanceInfoChanged ¶
func (p *HostapdCallbackProxy) OnApInstanceInfoChanged( ctx context.Context, apInfo ApInfo, ) error
func (*HostapdCallbackProxy) OnConnectedClientsChanged ¶
func (p *HostapdCallbackProxy) OnConnectedClientsChanged( ctx context.Context, clientInfo ClientInfo, ) error
type HostapdCallbackStub ¶
type HostapdCallbackStub struct {
Impl IHostapdCallback
Transport binder.VersionAwareTransport
}
HostapdCallbackStub dispatches incoming binder transactions to a typed IHostapdCallback implementation.
func (*HostapdCallbackStub) Descriptor ¶
func (s *HostapdCallbackStub) Descriptor() string
func (*HostapdCallbackStub) OnTransaction ¶
func (s *HostapdCallbackStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type HostapdProxy ¶
func NewHostapdProxy ¶
func NewHostapdProxy( remote binder.IBinder, ) *HostapdProxy
func (*HostapdProxy) AddAccessPoint ¶
func (p *HostapdProxy) AddAccessPoint( ctx context.Context, ifaceParams IfaceParams, nwParams NetworkParams, ) error
func (*HostapdProxy) AsBinder ¶
func (p *HostapdProxy) AsBinder() binder.IBinder
func (*HostapdProxy) ForceClientDisconnect ¶
func (p *HostapdProxy) ForceClientDisconnect( ctx context.Context, ifaceName string, clientAddress []byte, reasonCode Ieee80211ReasonCode, ) error
func (*HostapdProxy) RegisterCallback ¶
func (p *HostapdProxy) RegisterCallback( ctx context.Context, callback IHostapdCallback, ) error
func (*HostapdProxy) RemoveAccessPoint ¶
func (p *HostapdProxy) RemoveAccessPoint( ctx context.Context, ifaceName string, ) error
func (*HostapdProxy) SetDebugParams ¶
func (p *HostapdProxy) SetDebugParams( ctx context.Context, level DebugLevel, ) error
type HostapdStatusCode ¶
type HostapdStatusCode int32
const ( HostapdStatusCodeSUCCESS HostapdStatusCode = 0 HostapdStatusCodeFailureUnknown HostapdStatusCode = 1 HostapdStatusCodeFailureArgsInvalid HostapdStatusCode = 2 HostapdStatusCodeFailureIfaceUnknown HostapdStatusCode = 3 HostapdStatusCodeFailureIfaceExists HostapdStatusCode = 4 HostapdStatusCodeFailureClientUnknown HostapdStatusCode = 5 )
type HostapdStub ¶
type HostapdStub struct {
Impl IHostapd
Transport binder.VersionAwareTransport
}
HostapdStub dispatches incoming binder transactions to a typed IHostapd implementation.
func (*HostapdStub) Descriptor ¶
func (s *HostapdStub) Descriptor() string
func (*HostapdStub) OnTransaction ¶
func (s *HostapdStub) OnTransaction( ctx context.Context, code binder.TransactionCode, _data *parcel.Parcel, ) (*parcel.Parcel, error)
type HwModeParams ¶
type HwModeParams struct {
Enable80211N bool
Enable80211AC bool
Enable80211AX bool
Enable6GhzBand bool
EnableHeSingleUserBeamformer bool
EnableHeSingleUserBeamformee bool
EnableHeMultiUserBeamformer bool
EnableHeTargetWakeTime bool
EnableEdmg bool
Enable80211BE bool
MaximumChannelBandwidth ChannelBandwidth
}
func (*HwModeParams) MarshalParcel ¶
func (s *HwModeParams) MarshalParcel( p *parcel.Parcel, ) error
func (*HwModeParams) UnmarshalParcel ¶
func (s *HwModeParams) UnmarshalParcel( p *parcel.Parcel, ) error
type IHostapd ¶
type IHostapd interface {
AsBinder() binder.IBinder
AddAccessPoint(ctx context.Context, ifaceParams IfaceParams, nwParams NetworkParams) error
ForceClientDisconnect(ctx context.Context, ifaceName string, clientAddress []byte, reasonCode Ieee80211ReasonCode) error
RegisterCallback(ctx context.Context, callback IHostapdCallback) error
RemoveAccessPoint(ctx context.Context, ifaceName string) error
SetDebugParams(ctx context.Context, level DebugLevel) error
Terminate(ctx context.Context) error
}
func NewHostapdStub ¶
func NewHostapdStub( impl IHostapdServer, ) IHostapd
NewHostapdStub creates a server-side IHostapd wrapping the given server implementation. The returned value satisfies IHostapd and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.
type IHostapdCallback ¶
type IHostapdCallback interface {
AsBinder() binder.IBinder
OnApInstanceInfoChanged(ctx context.Context, apInfo ApInfo) error
OnConnectedClientsChanged(ctx context.Context, clientInfo ClientInfo) error
OnFailure(ctx context.Context, ifaceName string, instanceName string) error
}
func NewHostapdCallbackStub ¶
func NewHostapdCallbackStub( impl IHostapdCallbackServer, ) IHostapdCallback
NewHostapdCallbackStub creates a server-side IHostapdCallback wrapping the given server implementation. The returned value satisfies IHostapdCallback and can be passed to proxy methods; its AsBinder() returns a *binder.StubBinder that is auto-registered with the binder driver on first use.
type IHostapdCallbackServer ¶
type IHostapdCallbackServer interface {
OnApInstanceInfoChanged(ctx context.Context, apInfo ApInfo) error
OnConnectedClientsChanged(ctx context.Context, clientInfo ClientInfo) error
OnFailure(ctx context.Context, ifaceName string, instanceName string) error
}
IHostapdCallbackServer is the server-side interface that user implementations provide to NewHostapdCallbackStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type IHostapdServer ¶
type IHostapdServer interface {
AddAccessPoint(ctx context.Context, ifaceParams IfaceParams, nwParams NetworkParams) error
ForceClientDisconnect(ctx context.Context, ifaceName string, clientAddress []byte, reasonCode Ieee80211ReasonCode) error
RegisterCallback(ctx context.Context, callback IHostapdCallback) error
RemoveAccessPoint(ctx context.Context, ifaceName string) error
SetDebugParams(ctx context.Context, level DebugLevel) error
Terminate(ctx context.Context) error
}
IHostapdServer is the server-side interface that user implementations provide to NewHostapdStub. It contains only the business methods, without AsBinder (which is provided by the stub itself).
type Ieee80211ReasonCode ¶
type Ieee80211ReasonCode int32
const ( Ieee80211ReasonCodeWlanReasonUnspecified Ieee80211ReasonCode = 1 Ieee80211ReasonCodeWlanReasonPrevAuthNotValid Ieee80211ReasonCode = 2 Ieee80211ReasonCodeWlanReasonDisassocApBusy Ieee80211ReasonCode = 5 )
type IfaceParams ¶
type IfaceParams struct {
Name string
HwModeParams HwModeParams
ChannelParams []ChannelParams
VendorData []common.OuiKeyedData
}
func (*IfaceParams) MarshalParcel ¶
func (s *IfaceParams) MarshalParcel( p *parcel.Parcel, ) error
func (*IfaceParams) UnmarshalParcel ¶
func (s *IfaceParams) UnmarshalParcel( p *parcel.Parcel, ) error
type NetworkParams ¶
type NetworkParams struct {
Ssid []byte
IsHidden bool
EncryptionType EncryptionType
Passphrase string
IsMetered bool
VendorElements []byte
}
func (*NetworkParams) MarshalParcel ¶
func (s *NetworkParams) MarshalParcel( p *parcel.Parcel, ) error
func (*NetworkParams) UnmarshalParcel ¶
func (s *NetworkParams) UnmarshalParcel( p *parcel.Parcel, ) error
type ParamSizeLimits ¶
type ParamSizeLimits int32
const ( ParamSizeLimitsSsidMaxLenInBytes ParamSizeLimits = 32 ParamSizeLimitsWpa2PskPassphraseMinLenInBytes ParamSizeLimits = 8 ParamSizeLimitsWpa2PskPassphraseMaxLenInBytes ParamSizeLimits = 63 )