Struct capsules_extra::net::ipv6::ipv6_send::IP6SendStruct
source · pub struct IP6SendStruct<'a, A: Alarm<'a>> { /* private fields */ }
Expand description
This struct is a specific implementation of the IP6Sender
trait. This
struct sends the packet using 6LoWPAN over a generic MacDevice
object.
Implementations§
source§impl<'a, A: Alarm<'a>> IP6SendStruct<'a, A>
impl<'a, A: Alarm<'a>> IP6SendStruct<'a, A>
pub fn new( ip6_packet: &'static mut IP6Packet<'static>, alarm: &'a A, tx_buf: &'static mut [u8], sixlowpan: TxState<'a>, radio: &'a dyn MacDevice<'a>, dst_mac_addr: MacAddress, src_mac_addr: MacAddress, ip_vis: &'static IpVisibilityCapability, ) -> IP6SendStruct<'a, A>
Trait Implementations§
source§impl<'a, A: Alarm<'a>> AlarmClient for IP6SendStruct<'a, A>
impl<'a, A: Alarm<'a>> AlarmClient for IP6SendStruct<'a, A>
source§impl<'a, A: Alarm<'a>> IP6Sender<'a> for IP6SendStruct<'a, A>
impl<'a, A: Alarm<'a>> IP6Sender<'a> for IP6SendStruct<'a, A>
source§fn set_client(&self, client: &'a dyn IP6SendClient)
fn set_client(&self, client: &'a dyn IP6SendClient)
This method sets the
IP6SendClient
for the IP6Sender
instance, which
receives the send_done
callback when transmission has finished. Read moresource§fn set_addr(&self, src_addr: IPAddr)
fn set_addr(&self, src_addr: IPAddr)
This method sets the source address for packets sent from the
IP6Sender
instance. Read moresource§fn set_gateway(&self, gateway: MacAddress)
fn set_gateway(&self, gateway: MacAddress)
This method sets the gateway/next hop MAC address for this
IP6Sender
instance. Read moresource§fn set_header(&mut self, ip6_header: IP6Header)
fn set_header(&mut self, ip6_header: IP6Header)
source§fn send_to(
&self,
dst: IPAddr,
transport_header: TransportHeader,
payload: &SubSliceMut<'static, u8>,
net_cap: &'static NetworkCapability,
) -> Result<(), ErrorCode>
fn send_to( &self, dst: IPAddr, transport_header: TransportHeader, payload: &SubSliceMut<'static, u8>, net_cap: &'static NetworkCapability, ) -> Result<(), ErrorCode>
This method sends the provided transport header and payload to the
given destination IP address Read more
source§impl<'a, A: Alarm<'a>> TxClient for IP6SendStruct<'a, A>
impl<'a, A: Alarm<'a>> TxClient for IP6SendStruct<'a, A>
Auto Trait Implementations§
impl<'a, A> !Freeze for IP6SendStruct<'a, A>
impl<'a, A> !RefUnwindSafe for IP6SendStruct<'a, A>
impl<'a, A> !Send for IP6SendStruct<'a, A>
impl<'a, A> !Sync for IP6SendStruct<'a, A>
impl<'a, A> Unpin for IP6SendStruct<'a, A>
impl<'a, A> !UnwindSafe for IP6SendStruct<'a, 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