pub enum PacketOrigin<I: Ip, D> {
Local {
bound_address: Option<SpecifiedAddr<I::Addr>>,
bound_device: Option<D>,
},
NonLocal {
source_address: SpecifiedAddr<I::Addr>,
incoming_device: D,
},
}
Expand description
Tells whether the packet being routed is generated by us or someone else.
Variants§
Local
This packet is generated by us.
Fields
§
bound_address: Option<SpecifiedAddr<I::Addr>>
The generating socket’s bound address, if any.
NonLocal
This packet is received/forwarded to us.
Fields
§
source_address: SpecifiedAddr<I::Addr>
The packet’s source address. Note that this must be specified because we don’t allow forwarding a packet with an unspecified source IP address.
§
incoming_device: D
The device the packet was received on.
Trait Implementations§
Source§impl<I: Clone + Ip, D: Clone> Clone for PacketOrigin<I, D>
impl<I: Clone + Ip, D: Clone> Clone for PacketOrigin<I, D>
Source§fn clone(&self) -> PacketOrigin<I, D>
fn clone(&self) -> PacketOrigin<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<'a, I: Ip, D: DeviceWithName> Matcher<PacketOrigin<I, &'a D>> for SubnetMatcher<I::Addr>
impl<'a, I: Ip, D: DeviceWithName> Matcher<PacketOrigin<I, &'a D>> for SubnetMatcher<I::Addr>
Source§impl<'a, I: Ip, D: DeviceWithName> Matcher<PacketOrigin<I, &'a D>> for TrafficOriginMatcher
impl<'a, I: Ip, D: DeviceWithName> Matcher<PacketOrigin<I, &'a D>> for TrafficOriginMatcher
impl<I: Eq + Ip, D: Eq> Eq for PacketOrigin<I, D>
impl<I: Ip, D> StructuralPartialEq for PacketOrigin<I, D>
Auto Trait Implementations§
impl<I, D> Freeze for PacketOrigin<I, D>
impl<I, D> RefUnwindSafe for PacketOrigin<I, D>
impl<I, D> Send for PacketOrigin<I, D>where
D: Send,
impl<I, D> Sync for PacketOrigin<I, D>where
D: Sync,
impl<I, D> Unpin for PacketOrigin<I, D>
impl<I, D> UnwindSafe for PacketOrigin<I, D>
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