pub enum RawIpSocketProtocol<I>where
I: IpExt,{
Raw,
Proto(Protocol<I>),
}
Expand description
The supported protocols of raw IP sockets.
Variants§
Raw
Analogous to IPPROTO_RAW
on Linux.
This configures the socket as send only (no packets will be received).
When sending the provided message must include the IP header, as when
the IP_HDRINCL
socket option is set.
Proto(Protocol<I>)
An IANA Internet Protocol.
Implementations§
Source§impl<I> RawIpSocketProtocol<I>where
I: IpExt,
impl<I> RawIpSocketProtocol<I>where
I: IpExt,
Sourcepub fn new(proto: <I as IpProtoExt>::Proto) -> RawIpSocketProtocol<I>
pub fn new(proto: <I as IpProtoExt>::Proto) -> RawIpSocketProtocol<I>
Construct a new RawIpSocketProtocol
from the given IP protocol.
Sourcepub fn proto(&self) -> <I as IpProtoExt>::Proto
pub fn proto(&self) -> <I as IpProtoExt>::Proto
Extract the plain IP protocol from this RawIpSocketProtocol
.
Sourcepub fn requires_system_checksums(&self) -> bool
pub fn requires_system_checksums(&self) -> bool
True if the protocol requires system checksum support.
Trait Implementations§
Source§impl<I> Clone for RawIpSocketProtocol<I>
impl<I> Clone for RawIpSocketProtocol<I>
Source§fn clone(&self) -> RawIpSocketProtocol<I>
fn clone(&self) -> RawIpSocketProtocol<I>
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 for RawIpSocketProtocol<I>
impl<I> Debug for RawIpSocketProtocol<I>
Source§impl<I> Ord for RawIpSocketProtocol<I>
impl<I> Ord for RawIpSocketProtocol<I>
Source§fn cmp(&self, other: &RawIpSocketProtocol<I>) -> Ordering
fn cmp(&self, other: &RawIpSocketProtocol<I>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<I> PartialEq for RawIpSocketProtocol<I>
impl<I> PartialEq for RawIpSocketProtocol<I>
Source§impl<I> PartialOrd for RawIpSocketProtocol<I>where
I: PartialOrd + IpExt,
impl<I> PartialOrd for RawIpSocketProtocol<I>where
I: PartialOrd + IpExt,
impl<I> Copy for RawIpSocketProtocol<I>
impl<I> Eq for RawIpSocketProtocol<I>
impl<I> StructuralPartialEq for RawIpSocketProtocol<I>where
I: IpExt,
Auto Trait Implementations§
impl<I> Freeze for RawIpSocketProtocol<I>
impl<I> RefUnwindSafe for RawIpSocketProtocol<I>
impl<I> Send for RawIpSocketProtocol<I>
impl<I> Sync for RawIpSocketProtocol<I>
impl<I> Unpin for RawIpSocketProtocol<I>
impl<I> UnwindSafe for RawIpSocketProtocol<I>
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
Source§impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
Source§type Data = <L as UnlockedAccessMarkerFor<T>>::Data
type Data = <L as UnlockedAccessMarkerFor<T>>::Data
The type of state being accessed.
Source§type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data
where
T: 'l
type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l
A guard providing read access to the data.
Source§fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
How to access the state.