wpacli

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package wpacli contains methods running wpa_cli command. Usage:

runner := wpacli.NewRunner(cmdRunner)
runner.Ping(ctx, ...)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SerializeNonPrefChans

func SerializeNonPrefChans(chans ...NonPrefChan) string

SerializeNonPrefChans serializes a list of NonPrefChan objects into a wpa_supplicant-recognizable string

Types

type NonPrefChan

type NonPrefChan struct {
	OpClass uint8
	Channel uint8
	Pref    uint8
	Reason  uint8
}

NonPrefChan is a single non-preferred channel

type Property

type Property string

Property is a global property for wpa_supplicant

const (
	// PropertyNonPrefChan indicates to the AP which channels are not preferred
	PropertyNonPrefChan Property = "non_pref_chan"
)

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner contains methods involving wpa_cli command.

func NewRunner

func NewRunner(c cmd.Runner) *Runner

NewRunner creates a new wpa_cli command utility runner.

func (*Runner) ClearBSSIDIgnore

func (r *Runner) ClearBSSIDIgnore(ctx context.Context) error

ClearBSSIDIgnore clears the BSSID_IGNORE list on DUT.

func (*Runner) Ping

func (r *Runner) Ping(ctx context.Context, iface string) ([]byte, error)

Ping runs "wpa_cli -i iface ping" command and expects to see PONG.

func (*Runner) Set

func (r *Runner) Set(ctx context.Context, prop Property, val string) error

Set sets a specified global wpa_supplicant property to a specified value

Jump to

Keyboard shortcuts

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