mirror of
https://github.com/taigrr/golang-wpasupplicant
synced 2025-01-18 04:43:18 -08:00
Add SelectNetwork command
This commit is contained in:
parent
becc4580a5
commit
ba0f86f6a1
@ -273,6 +273,10 @@ func (uc *unixgramConn) EnableNetwork(networkID int) error {
|
||||
return uc.runCommand(fmt.Sprintf("ENABLE_NETWORK %d", networkID))
|
||||
}
|
||||
|
||||
func (uc *unixgramConn) SelectNetwork(networkID int) error {
|
||||
return uc.runCommand(fmt.Sprintf("SELECT_NETWORK %d", networkID))
|
||||
}
|
||||
|
||||
func (uc *unixgramConn) DisableNetwork(networkID int) error {
|
||||
return uc.runCommand(fmt.Sprintf("DISABLE_NETWORK %d", networkID))
|
||||
}
|
||||
|
@ -166,6 +166,9 @@ type Conn interface {
|
||||
// EnableNetwork enables a network. Returns error if the command fails.
|
||||
EnableNetwork(int) error
|
||||
|
||||
// SelectNetwork selects a network (and disables the others).
|
||||
SelectNetwork(int) error
|
||||
|
||||
// DisableNetwork disables a network.
|
||||
DisableNetwork(int) error
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user