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
Methods from the OpenThread “NAT64” Module.
Required Methods§
Sourcefn nat64_set_enabled(&self, enabled: bool)
fn nat64_set_enabled(&self, enabled: bool)
Enable or disable NAT64 functions.
Sourcefn nat64_set_ip4_cidr(&self, ip4_cidr: Ip4Cidr) -> Result
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.
Sourcefn nat64_get_cidr(&self) -> Result<Ip4Cidr>
fn nat64_get_cidr(&self) -> Result<Ip4Cidr>
Get CIDR from OpenThread
Sourcefn nat64_set_receive_fn<'a, F>(&'a self, f: Option<F>)where
F: FnMut(OtMessageBox<'_>) + 'a,
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.
Sourcefn nat64_send(&self, message: OtMessageBox<'_>) -> Result
fn nat64_send(&self, message: OtMessageBox<'_>) -> Result
Send a message to NAT64 handler in OpenThread
Sourcefn nat64_send_data_slice(&self, data_slice: &[u8]) -> Result
fn nat64_send_data_slice(&self, data_slice: &[u8]) -> Result
Send data to NAT64 handler in OpenThread
Sourcefn nat64_infra_if_prefix_discover_done(
&self,
infra_if_idx: NetifIndex,
ip6_prefix: otIp6Prefix,
)
fn nat64_infra_if_prefix_discover_done( &self, infra_if_idx: NetifIndex, ip6_prefix: otIp6Prefix, )
Return AIL prefix to OpenThread
Sourcefn nat64_init_address_mapping_iterator(
&self,
iter: &mut otNat64AddressMappingIterator,
)
fn nat64_init_address_mapping_iterator( &self, iter: &mut otNat64AddressMappingIterator, )
Init the NAT64 address mapping iterator
Sourcefn nat64_get_next_address_mapping(
&self,
iter: &mut otNat64AddressMappingIterator,
mapping: &mut Nat64AddressMapping,
) -> Result
fn nat64_get_next_address_mapping( &self, iter: &mut otNat64AddressMappingIterator, mapping: &mut Nat64AddressMapping, ) -> Result
Get next NAT64 address mapping
Sourcefn nat64_get_translator_state(&self) -> Nat64State
fn nat64_get_translator_state(&self) -> Nat64State
Get NAT64 translator state
Sourcefn nat64_get_prefix_manager_state(&self) -> Nat64State
fn nat64_get_prefix_manager_state(&self) -> Nat64State
Get NAT64 prefix manager state
Sourcefn nat64_get_error_counters(&self) -> Nat64ErrorCounters
fn nat64_get_error_counters(&self) -> Nat64ErrorCounters
Get NAT64 error counters
Sourcefn nat64_get_counters(&self) -> Nat64ProtocolCounters
fn nat64_get_counters(&self) -> Nat64ProtocolCounters
Get NAT64 protocol counters
Provided Methods§
Sourcefn nat64_get_address_mapping_iterator(
&self,
) -> Nat64AddressMappingIterator<'_, Self> ⓘ
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", so this trait is not object safe.