pub enum IpPacketDestination<I: BroadcastIpExt, D> {
Broadcast(I::BroadcastMarker),
Multicast(MulticastAddr<I::Addr>),
Neighbor(SpecifiedAddr<I::Addr>),
Loopback(D),
}
Expand description
Packed destination passed to IpDeviceSendContext::send_ip_frame
.
Variants§
Broadcast(I::BroadcastMarker)
Broadcast packet.
Multicast(MulticastAddr<I::Addr>)
Multicast packet to the specified IP.
Neighbor(SpecifiedAddr<I::Addr>)
Send packet to the neighbor with the specified IP (the receiving node is either a router or the final recipient of the packet).
Loopback(D)
Loopback the packet to the specified device. Can be used only when sending to the loopback device.
Implementations§
Source§impl<I: BroadcastIpExt, D> IpPacketDestination<I, D>
impl<I: BroadcastIpExt, D> IpPacketDestination<I, D>
Sourcepub fn from_addr(addr: SpecifiedAddr<I::Addr>) -> Self
pub fn from_addr(addr: SpecifiedAddr<I::Addr>) -> Self
Creates IpPacketDestination
for IP address.
Sourcepub fn from_next_hop(
next_hop: NextHop<I::Addr>,
dst_ip: SpecifiedAddr<I::Addr>,
) -> Self
pub fn from_next_hop( next_hop: NextHop<I::Addr>, dst_ip: SpecifiedAddr<I::Addr>, ) -> Self
Create IpPacketDestination
from NextHop
.
Trait Implementations§
Source§impl<I: Clone + BroadcastIpExt, D: Clone> Clone for IpPacketDestination<I, D>
impl<I: Clone + BroadcastIpExt, D: Clone> Clone for IpPacketDestination<I, D>
Source§fn clone(&self) -> IpPacketDestination<I, D>
fn clone(&self) -> IpPacketDestination<I, D>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<I: Debug + BroadcastIpExt, D: Debug> Debug for IpPacketDestination<I, D>
impl<I: Debug + BroadcastIpExt, D: Debug> Debug for IpPacketDestination<I, D>
Source§impl<I: BroadcastIpExt, D> PartialEq for IpPacketDestination<I, D>where
D: PartialEq,
impl<I: BroadcastIpExt, D> PartialEq for IpPacketDestination<I, D>where
D: PartialEq,
impl<I: BroadcastIpExt, D> Eq for IpPacketDestination<I, D>where
D: Eq,
Auto Trait Implementations§
impl<I, D> Freeze for IpPacketDestination<I, D>
impl<I, D> RefUnwindSafe for IpPacketDestination<I, D>where
<I as BroadcastIpExt>::BroadcastMarker: RefUnwindSafe,
D: RefUnwindSafe,
<I as Ip>::Addr: RefUnwindSafe,
impl<I, D> Send for IpPacketDestination<I, D>where
D: Send,
impl<I, D> Sync for IpPacketDestination<I, D>where
D: Sync,
impl<I, D> Unpin for IpPacketDestination<I, D>
impl<I, D> UnwindSafe for IpPacketDestination<I, D>where
<I as BroadcastIpExt>::BroadcastMarker: UnwindSafe,
D: UnwindSafe,
<I as Ip>::Addr: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
impl<CC, BC, Meta> RecvFrameContext<Meta, BC> for CCwhere
Meta: ReceivableFrameMeta<CC, BC>,
Source§impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
impl<CC, BC, Meta> SendFrameContext<BC, Meta> for CCwhere
Meta: SendableFrameMeta<CC, BC>,
Source§fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
fn send_frame<S>(
&mut self,
bindings_ctx: &mut BC,
metadata: Meta,
frame: S,
) -> Result<(), ErrorAndSerializer<SendFrameErrorReason, S>>where
S: Serializer,
<S as Serializer>::Buffer: BufferMut,
Send a frame. Read more
Source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
BC: TimerBindingsTypes,
Id: HandleableTimer<CC, BC>,
Source§fn handle_timer(
&mut self,
bindings_ctx: &mut BC,
dispatch: Id,
timer: <BC as TimerBindingsTypes>::UniqueTimerId,
)
fn handle_timer( &mut self, bindings_ctx: &mut BC, dispatch: Id, timer: <BC as TimerBindingsTypes>::UniqueTimerId, )
Handle a timer firing. Read more