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