Skip to main content

Nat64

Trait Nat64 

Source
pub trait Nat64 {
Show 14 methods // Required methods fn nat64_set_enabled(&self, enabled: bool); fn nat64_set_ip4_cidr(&self, ip4_cidr: Ip4Cidr) -> Result; fn nat64_get_cidr(&self) -> Result<Ip4Cidr>; fn nat64_set_receive_fn<'a, F>(&'a self, f: Option<F>) where F: FnMut(OtMessageBox<'_>) + 'a; fn nat64_send(&self, message: OtMessageBox<'_>) -> Result; fn nat64_send_data_slice(&self, data_slice: &[u8]) -> Result; fn nat64_infra_if_prefix_discover_done( &self, infra_if_idx: NetifIndex, ip6_prefix: otIp6Prefix, ); fn nat64_init_address_mapping_iterator( &self, iter: &mut otNat64AddressMappingIterator, ); fn nat64_get_next_address_mapping( &self, iter: &mut otNat64AddressMappingIterator, mapping: &mut Nat64AddressMapping, ) -> Result; fn nat64_get_translator_state(&self) -> Nat64State; fn nat64_get_prefix_manager_state(&self) -> Nat64State; fn nat64_get_error_counters(&self) -> Nat64ErrorCounters; fn nat64_get_counters(&self) -> Nat64ProtocolCounters; // Provided method fn nat64_get_address_mapping_iterator( &self, ) -> Nat64AddressMappingIterator<'_, Self> { ... }
}
Expand description

Required Methods§

Source

fn nat64_set_enabled(&self, enabled: bool)

Enable or disable NAT64 functions.

Source

fn nat64_set_ip4_cidr(&self, ip4_cidr: Ip4Cidr) -> Result

Sets the CIDR used when setting the source address of the outgoing translated IPv4 packets.

Source

fn nat64_get_cidr(&self) -> Result<Ip4Cidr>

Get CIDR from OpenThread

Source

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

Registers a callback to provide received IPv4 datagrams.

Source

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

Send a message to NAT64 handler in OpenThread

Source

fn nat64_send_data_slice(&self, data_slice: &[u8]) -> Result

Send data to NAT64 handler in OpenThread

Source

fn nat64_infra_if_prefix_discover_done( &self, infra_if_idx: NetifIndex, ip6_prefix: otIp6Prefix, )

Return AIL prefix to OpenThread

Source

fn nat64_init_address_mapping_iterator( &self, iter: &mut otNat64AddressMappingIterator, )

Init the NAT64 address mapping iterator

Source

fn nat64_get_next_address_mapping( &self, iter: &mut otNat64AddressMappingIterator, mapping: &mut Nat64AddressMapping, ) -> Result

Get next NAT64 address mapping

Source

fn nat64_get_translator_state(&self) -> Nat64State

Get NAT64 translator state

Source

fn nat64_get_prefix_manager_state(&self) -> Nat64State

Get NAT64 prefix manager state

Source

fn nat64_get_error_counters(&self) -> Nat64ErrorCounters

Get NAT64 error counters

Source

fn nat64_get_counters(&self) -> Nat64ProtocolCounters

Get NAT64 protocol counters

Provided Methods§

Source

fn nat64_get_address_mapping_iterator( &self, ) -> Nat64AddressMappingIterator<'_, Self>

Get the NAT64 address mapping iterator instance

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§