Struct wpa::WpaSupplicant
source · pub struct WpaSupplicant<'a> { /* private fields */ }
Expand description
Interface implemented by the main wpa_supplicant D-Bus object registered in the bus with fi.w1.wpa_supplicant1 name.
Implementations§
source§impl WpaSupplicant<'_>
impl WpaSupplicant<'_>
sourcepub fn CreateInterface(&self, args: CreateInterface) -> Result<Interface<'_>>
pub fn CreateInterface(&self, args: CreateInterface) -> Result<Interface<'_>>
Registers a wireless interface in wpa_supplicant
.
§Errors
fi.w1.wpa_supplicant1.InterfaceExists
wpa_supplicant
already controls this interface.fi.w1.wpa_supplicant1.UnknownError
Creating interface failed for an unknown reason.fi.w1.wpa_supplicant1.InvalidArgs
Invalid entries were found in the passed argument.
sourcepub fn RemoveInterface(&self, o: Interface<'_>) -> Result<()>
pub fn RemoveInterface(&self, o: Interface<'_>) -> Result<()>
Deregisters a wireless interface from wpa_supplicant
.
§Arguments
o
A D-Bus path to an object representing an interface to remove returned byCreateInterface
.
§Errors
fi.w1.wpa_supplicant1.InterfaceUnknown
Object pointed by the path doesn’t exist or doesn’t represent an interface.fi.w1.wpa_supplicant1.UnknownError
Removing interface failed for an unknown reason.
sourcepub fn GetInterface(&self, ifname: String) -> Result<Interface<'_>>
pub fn GetInterface(&self, ifname: String) -> Result<Interface<'_>>
Returns a D-Bus path to an object related to an interface which wpa_supplicant
already controls.
§Arguments
ifname
Name of the network interface, e.g.,wlan0
§Errors
fi.w1.wpa_supplicant1.InterfaceUnknown
An interface with the passed name in not controlled bywpa_supplicant
.fi.w1.wpa_supplicant1.UnknownError
Getting an interface object path failed for an unknown reason.
sourcepub fn set_DebugLevel(&self, value: DebugLevel) -> Result<()>
pub fn set_DebugLevel(&self, value: DebugLevel) -> Result<()>
Global wpa_supplicant
debugging level.
sourcepub fn get_DebugLevel(&self) -> Result<DebugLevel>
pub fn get_DebugLevel(&self) -> Result<DebugLevel>
Global wpa_supplicant
debugging level.
sourcepub fn set_DebugTimestamp(&self, value: bool) -> Result<()>
pub fn set_DebugTimestamp(&self, value: bool) -> Result<()>
Global wpa_supplicant
debugging parameter. Determines if timestamps are shown in debug logs.
sourcepub fn get_DebugTimestamp(&self) -> Result<bool>
pub fn get_DebugTimestamp(&self) -> Result<bool>
Global wpa_supplicant
debugging parameter. Determines if timestamps are shown in debug logs.
sourcepub fn set_DebugShowKeys(&self, value: bool) -> Result<()>
pub fn set_DebugShowKeys(&self, value: bool) -> Result<()>
Global wpa_supplicant
debugging parameter. Determines if secrets are shown in debug logs.
sourcepub fn get_DebugShowKeys(&self) -> Result<bool>
pub fn get_DebugShowKeys(&self) -> Result<bool>
Global wpa_supplicant
debugging parameter. Determines if secrets are shown in debug logs.
sourcepub fn get_Interfaces(&self) -> Result<Vec<Interface<'_>>>
pub fn get_Interfaces(&self) -> Result<Vec<Interface<'_>>>
An array with paths to D-Bus objects representing controlled interfaces each.
sourcepub fn get_EapMethods(&self) -> Result<Vec<String>>
pub fn get_EapMethods(&self) -> Result<Vec<String>>
An array with supported EAP methods names.
sourcepub fn get_Capabilities(&self) -> Result<Vec<String>>
pub fn get_Capabilities(&self) -> Result<Vec<String>>
An array with supported capabilities (e.g., “ap”, “ibss-rsn”, “p2p”, “interworking”).
sourcepub fn set_WFDIEs(&self, value: Vec<u8>) -> Result<()>
pub fn set_WFDIEs(&self, value: Vec<u8>) -> Result<()>
Wi-Fi Display subelements.
sourcepub fn get_WFDIEs(&self) -> Result<Vec<u8>>
pub fn get_WFDIEs(&self) -> Result<Vec<u8>>
Wi-Fi Display subelements.