pub struct IPv4Packet {
pub length: u16,
pub ttl: u8,
pub src: u32,
pub dst: u32,
pub payload: PacketPayload,
}
Expand description
A struct detailing an IPv4Packet https://en.wikipedia.org/wiki/Internet_Protocol_version_4
Fields§
§length: u16
§ttl: u8
§src: u32
§dst: u32
§payload: PacketPayload
Trait Implementations§
Source§impl Debug for IPv4Packet
impl Debug for IPv4Packet
Source§impl From<&[u8]> for IPv4Packet
Convert list of u8 (i.e. received bytes) into an IPv4Packet
impl From<&[u8]> for IPv4Packet
Convert list of u8 (i.e. received bytes) into an IPv4Packet
Source§impl From<&IPv4Packet> for Vec<u8>
Convert IPv4Packet into a vector of bytes
impl From<&IPv4Packet> for Vec<u8>
Convert IPv4Packet into a vector of bytes
Source§fn from(packet: &IPv4Packet) -> Self
fn from(packet: &IPv4Packet) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for IPv4Packet
impl RefUnwindSafe for IPv4Packet
impl Send for IPv4Packet
impl Sync for IPv4Packet
impl Unpin for IPv4Packet
impl UnwindSafe for IPv4Packet
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Applies the layer to a service and wraps it in [
Layered
].