Struct retina_core::protocols::stream::quic::QuicPacket
source · pub struct QuicPacket {
pub short_header: Option<QuicShortHeader>,
pub long_header: Option<QuicLongHeader>,
pub payload_bytes_count: Option<u64>,
pub frames: Option<Vec<QuicFrame>>,
}
Expand description
Parsed Quic Packet contents
Fields§
§short_header: Option<QuicShortHeader>
Quic Short header
long_header: Option<QuicLongHeader>
Quic Long header
payload_bytes_count: Option<u64>
The number of bytes contained in the estimated payload
frames: Option<Vec<QuicFrame>>
Implementations§
source§impl QuicPacket
impl QuicPacket
sourcepub fn vec_u8_to_hex_string(vec: &[u8]) -> String
pub fn vec_u8_to_hex_string(vec: &[u8]) -> String
Processes the connection ID bytes array to a hex string
pub fn get_var_len(a: u8) -> Result<usize, QuicError>
pub fn slice_to_u64(data: &[u8]) -> Result<u64, QuicError>
pub fn access_data( data: &[u8], start: usize, end: usize, ) -> Result<&[u8], QuicError>
sourcepub fn parse_from(
conn: &mut QuicConn,
data: &[u8],
offset: usize,
dir: bool,
) -> Result<(QuicPacket, usize), QuicError>
pub fn parse_from( conn: &mut QuicConn, data: &[u8], offset: usize, dir: bool, ) -> Result<(QuicPacket, usize), QuicError>
Parses Quic packet from bytes
source§impl QuicPacket
impl QuicPacket
sourcepub fn header_type(&self) -> &str
pub fn header_type(&self) -> &str
Returns the header type of the Quic packet (ie. “long” or “short”)
sourcepub fn packet_type(&self) -> Result<LongHeaderPacketType, QuicError>
pub fn packet_type(&self) -> Result<LongHeaderPacketType, QuicError>
Returns the packet type of the Quic packet
sourcepub fn dcid(&self) -> &str
pub fn dcid(&self) -> &str
Returns the destination connection ID of the Quic packet or an empty string if it does not exist
sourcepub fn scid(&self) -> &str
pub fn scid(&self) -> &str
Returns the source connection ID of the Quic packet or an empty string if it does not exist
sourcepub fn payload_bytes_count(&self) -> u64
pub fn payload_bytes_count(&self) -> u64
Returns the number of bytes in the payload of the Quic packet
Trait Implementations§
source§impl Debug for QuicPacket
impl Debug for QuicPacket
Auto Trait Implementations§
impl Freeze for QuicPacket
impl RefUnwindSafe for QuicPacket
impl Send for QuicPacket
impl Sync for QuicPacket
impl Unpin for QuicPacket
impl UnwindSafe for QuicPacket
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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more