pub struct SendIpPacketMeta<I: IpExt, D, Src> {
pub device: D,
pub src_ip: Src,
pub dst_ip: SpecifiedAddr<I::Addr>,
pub destination: IpPacketDestination<I, D>,
pub proto: I::Proto,
pub ttl: Option<NonZeroU8>,
pub mtu: Mtu,
pub dscp_and_ecn: DscpAndEcn,
}
Expand description
The metadata associated with an outgoing IP packet.
Fields§
§device: D
The outgoing device.
src_ip: Src
The source address of the packet.
dst_ip: SpecifiedAddr<I::Addr>
The destination address of the packet.
destination: IpPacketDestination<I, D>
The destination for the send operation.
proto: I::Proto
The upper-layer protocol held in the packet’s payload.
ttl: Option<NonZeroU8>
The time-to-live (IPv4) or hop limit (IPv6) for the packet.
If not set, a default TTL may be used.
mtu: Mtu
An MTU to artificially impose on the whole IP packet.
Note that the device’s and discovered path MTU may still be imposed on the packet.
dscp_and_ecn: DscpAndEcn
Traffic Class (IPv6) or Type of Service (IPv4) field for the packet.
Trait Implementations§
Source§impl<I: Clone + IpExt, D: Clone, Src: Clone> Clone for SendIpPacketMeta<I, D, Src>
impl<I: Clone + IpExt, D: Clone, Src: Clone> Clone for SendIpPacketMeta<I, D, Src>
Source§fn clone(&self) -> SendIpPacketMeta<I, D, Src>
fn clone(&self) -> SendIpPacketMeta<I, D, Src>
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: IpExt, D> From<SendIpPacketMeta<I, D, SpecifiedAddr<<I as Ip>::Addr>>> for SendIpPacketMeta<I, D, Option<SpecifiedAddr<I::Addr>>>
impl<I: IpExt, D> From<SendIpPacketMeta<I, D, SpecifiedAddr<<I as Ip>::Addr>>> for SendIpPacketMeta<I, D, Option<SpecifiedAddr<I::Addr>>>
Source§fn from(
_: SendIpPacketMeta<I, D, SpecifiedAddr<I::Addr>>,
) -> SendIpPacketMeta<I, D, Option<SpecifiedAddr<I::Addr>>>
fn from( _: SendIpPacketMeta<I, D, SpecifiedAddr<I::Addr>>, ) -> SendIpPacketMeta<I, D, Option<SpecifiedAddr<I::Addr>>>
Converts to this type from the input type.
Auto Trait Implementations§
impl<I, D, Src> Freeze for SendIpPacketMeta<I, D, Src>where
D: Freeze,
Src: Freeze,
<I as IpProtoExt>::Proto: Freeze,
<I as Ip>::Addr: Freeze,
<I as BroadcastIpExt>::BroadcastMarker: Freeze,
impl<I, D, Src> RefUnwindSafe for SendIpPacketMeta<I, D, Src>where
D: RefUnwindSafe,
Src: RefUnwindSafe,
<I as IpProtoExt>::Proto: RefUnwindSafe,
<I as Ip>::Addr: RefUnwindSafe,
<I as BroadcastIpExt>::BroadcastMarker: RefUnwindSafe,
impl<I, D, Src> Send for SendIpPacketMeta<I, D, Src>
impl<I, D, Src> Sync for SendIpPacketMeta<I, D, Src>
impl<I, D, Src> Unpin for SendIpPacketMeta<I, D, Src>where
D: Unpin,
Src: Unpin,
<I as IpProtoExt>::Proto: Unpin,
<I as Ip>::Addr: Unpin,
<I as BroadcastIpExt>::BroadcastMarker: Unpin,
impl<I, D, Src> UnwindSafe for SendIpPacketMeta<I, D, Src>where
D: UnwindSafe,
Src: UnwindSafe,
<I as IpProtoExt>::Proto: UnwindSafe,
<I as Ip>::Addr: UnwindSafe,
<I as BroadcastIpExt>::BroadcastMarker: 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