Trait openthread::ot::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.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Ip6 for Instance

source§

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