openthread::ot

Trait Ip6

Source
pub trait Ip6 {
Show 19 methods // Required methods fn ip6_send(&self, message: OtMessageBox<'_>) -> Result; fn ip6_send_data(&self, data: &[u8]) -> Result; fn ip6_send_data_direct(&self, data: &[u8]) -> Result; fn ip6_is_enabled(&self) -> bool; fn ip6_set_enabled(&self, enabled: bool) -> Result; fn ip6_add_unicast_address(&self, addr: &NetifAddress) -> Result; fn ip6_remove_unicast_address(&self, addr: &Ip6Address) -> Result; fn ip6_join_multicast_group(&self, addr: &Ip6Address) -> Result; fn ip6_leave_multicast_group(&self, addr: &Ip6Address) -> Result; fn ip6_set_receive_fn<'a, F>(&'a self, f: Option<F>) where F: FnMut(OtMessageBox<'_>) + 'a; fn ip6_set_address_fn<'a, F>(&'a self, f: Option<F>) where F: for<'r> FnMut(Ip6AddressInfo<'r>, bool) + 'a; fn ip6_is_slaac_enabled(&self) -> bool; fn ip6_set_slaac_enabled(&self, enabled: bool); fn icmp6_get_echo_mode(&self) -> Icmp6EchoMode; fn icmp6_set_echo_mode(&self, mode: Icmp6EchoMode); fn ip6_set_receive_filter_enabled(&self, enabled: bool); fn ip6_is_receive_filter_enabled(&self) -> bool; fn ip6_get_border_routing_counters(&self) -> &BorderRoutingCounters; fn ip6_get_unicast_addresses(&self) -> NetifAddressIterator<'_> ;
}
Expand description

Methods from the OpenThread “IPv6” Module.

Required Methods§

Source

fn ip6_send(&self, message: OtMessageBox<'_>) -> Result

Functional equivalent of otsys::otIp6Send.

Source

fn ip6_send_data(&self, data: &[u8]) -> Result

Similar to [ip6_send()], but takes a byte slice instead of an OtMessageBox.

Source

fn ip6_send_data_direct(&self, data: &[u8]) -> Result

Similar to [ip6_send_data()], but sends the packet without layer-2 security.

Source

fn ip6_is_enabled(&self) -> bool

Functional equivalent of otsys::otIp6IsEnabled.

Source

fn ip6_set_enabled(&self, enabled: bool) -> Result

Functional equivalent of otsys::otIp6SetEnabled.

Source

fn ip6_add_unicast_address(&self, addr: &NetifAddress) -> Result

Functional equivalent of otsys::otIp6AddUnicastAddress.

Source

fn ip6_remove_unicast_address(&self, addr: &Ip6Address) -> Result

Functional equivalent of otsys::otIp6RemoveUnicastAddress.

Source

fn ip6_join_multicast_group(&self, addr: &Ip6Address) -> Result

Functional equivalent of otsys::otIp6SubscribeMulticastAddress.

Source

fn ip6_leave_multicast_group(&self, addr: &Ip6Address) -> Result

Functional equivalent of otsys::otIp6UnsubscribeMulticastAddress.

Source

fn ip6_set_receive_fn<'a, F>(&'a self, f: Option<F>)
where F: FnMut(OtMessageBox<'_>) + 'a,

Sets the IPv6 receive callback closure. Functional equivalent of otsys::otIp6SetReceiveCallback.

The closure will ultimately be executed via ot::Tasklets::process.

Source

fn ip6_set_address_fn<'a, F>(&'a self, f: Option<F>)
where F: for<'r> FnMut(Ip6AddressInfo<'r>, bool) + 'a,

Sets the IPv6 address callback closure. Functional equivalent of otsys::otIp6SetAddressCallback.

The closure takes two arguments:

  • An instance of ot::Ip6AddressInfo.
  • A bool indicating if the address is being added (true) or removed (false).

The closure will ultimately be executed via ot::Tasklets::process.

Source

fn ip6_is_slaac_enabled(&self) -> bool

Functional equivalent of otsys::otIp6IsSlaacEnabled.

Source

fn ip6_set_slaac_enabled(&self, enabled: bool)

Functional equivalent of otsys::otIp6SetSlaacEnabled.

Source

fn icmp6_get_echo_mode(&self) -> Icmp6EchoMode

Functional equivalent of otsys::otIcmp6GetEchoMode.

Source

fn icmp6_set_echo_mode(&self, mode: Icmp6EchoMode)

Functional equivalent of otsys::otIcmp6SetEchoMode.

Source

fn ip6_set_receive_filter_enabled(&self, enabled: bool)

Functional equivalent of otsys::otIp6SetReceiveFilterEnabled.

Source

fn ip6_is_receive_filter_enabled(&self) -> bool

Functional equivalent of otsys::otIp6IsReceiveFilterEnabled.

Source

fn ip6_get_border_routing_counters(&self) -> &BorderRoutingCounters

Functional equivalent of otsys::otIp6GetBorderRoutingCounters.

Source

fn ip6_get_unicast_addresses(&self) -> NetifAddressIterator<'_>

Functional equivalent of otsys::otIp6GetUnicastAddresses.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Ip6 for Instance

Source§

impl<T: Ip6 + Boxable> Ip6 for Box<T>