pub struct AsyncRouter<'a> { /* private fields */ }Expand description
Handle for a router net.
Implementations§
Source§impl<'a> AsyncRouter<'a>
impl<'a> AsyncRouter<'a>
Sourcepub async fn connect(&self) -> Result<Value>
pub async fn connect(&self) -> Result<Value>
Verify connectivity; returns identity/version/board/uptime.
Sourcepub async fn system_info(&self) -> Result<RouterSystemInfo>
pub async fn system_info(&self) -> Result<RouterSystemInfo>
System resource information.
Sourcepub async fn interfaces(&self) -> Result<Value>
pub async fn interfaces(&self) -> Result<Value>
All network interfaces (raw RouterOS records).
Sourcepub async fn wireless_interfaces(&self) -> Result<Value>
pub async fn wireless_interfaces(&self) -> Result<Value>
Wireless interfaces (raw RouterOS records).
Sourcepub async fn wireless_clients(&self) -> Result<Value>
pub async fn wireless_clients(&self) -> Result<Value>
Currently associated wireless clients.
Sourcepub async fn dhcp_leases(&self) -> Result<Value>
pub async fn dhcp_leases(&self) -> Result<Value>
Active DHCP leases.
Sourcepub async fn enable_interface(&self, interface: &str) -> Result<()>
pub async fn enable_interface(&self, interface: &str) -> Result<()>
Enable a network interface by name.
Sourcepub async fn disable_interface(&self, interface: &str) -> Result<()>
pub async fn disable_interface(&self, interface: &str) -> Result<()>
Disable a network interface by name.
Sourcepub async fn set_wireless_ssid(
&self,
interface: &str,
ssid: &str,
) -> Result<Value>
pub async fn set_wireless_ssid( &self, interface: &str, ssid: &str, ) -> Result<Value>
Change the SSID broadcast by a wireless interface.
Sourcepub async fn block_internet(&self) -> Result<()>
pub async fn block_internet(&self) -> Result<()>
Drop all forwarded traffic (simulate internet outage).
Sourcepub async fn remove_firewall_rules(&self) -> Result<()>
pub async fn remove_firewall_rules(&self) -> Result<()>
Remove every Lager-added firewall rule (undo block_*).
Trait Implementations§
Source§impl<'a> Clone for AsyncRouter<'a>
impl<'a> Clone for AsyncRouter<'a>
Source§fn clone(&self) -> AsyncRouter<'a>
fn clone(&self) -> AsyncRouter<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> !RefUnwindSafe for AsyncRouter<'a>
impl<'a> !UnwindSafe for AsyncRouter<'a>
impl<'a> Freeze for AsyncRouter<'a>
impl<'a> Send for AsyncRouter<'a>
impl<'a> Sync for AsyncRouter<'a>
impl<'a> Unpin for AsyncRouter<'a>
impl<'a> UnsafeUnpin for AsyncRouter<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more