hostapd

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2026 License: CC0-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
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
)
View Source
const (
	MethodIHostapdAddAccessPoint        = "addAccessPoint"
	MethodIHostapdForceClientDisconnect = "forceClientDisconnect"
	MethodIHostapdRegisterCallback      = "registerCallback"
	MethodIHostapdRemoveAccessPoint     = "removeAccessPoint"
	MethodIHostapdSetDebugParams        = "setDebugParams"
	MethodIHostapdTerminate             = "terminate"
)
View Source
const (
	TransactionIHostapdCallbackOnApInstanceInfoChanged   = binder.FirstCallTransaction + 0
	TransactionIHostapdCallbackOnConnectedClientsChanged = binder.FirstCallTransaction + 1
	TransactionIHostapdCallbackOnFailure                 = binder.FirstCallTransaction + 2
)
View Source
const (
	MethodIHostapdCallbackOnApInstanceInfoChanged   = "onApInstanceInfoChanged"
	MethodIHostapdCallbackOnConnectedClientsChanged = "onConnectedClientsChanged"
	MethodIHostapdCallbackOnFailure                 = "onFailure"
)
View Source
const DescriptorIHostapd = "android.hardware.wifi.hostapd.IHostapd"
View Source
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
}

func (*ApInfo) MarshalParcel

func (s *ApInfo) MarshalParcel(
	p *parcel.Parcel,
) error

func (*ApInfo) UnmarshalParcel

func (s *ApInfo) UnmarshalParcel(
	p *parcel.Parcel,
) error

type BandMask

type BandMask int32
const (
	BandMaskBand2Ghz  BandMask = (1 << 0)
	BandMaskBand5Ghz  BandMask = (1 << 1)
	BandMaskBand6Ghz  BandMask = (1 << 2)
	BandMaskBand60Ghz BandMask = (1 << 3)
)

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

type FrequencyRange struct {
	StartMhz int32
	EndMhz   int32
}

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

type HostapdCallbackProxy struct {
	Remote binder.IBinder
}

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

func (*HostapdCallbackProxy) OnFailure

func (p *HostapdCallbackProxy) OnFailure(
	ctx context.Context,
	ifaceName string,
	instanceName string,
) 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

type HostapdProxy struct {
	Remote binder.IBinder
}

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

func (*HostapdProxy) Terminate

func (p *HostapdProxy) Terminate(
	ctx context.Context,
) 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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL