pub struct Header {
pub major: u16,
pub minor: u16,
pub this_zone: i32,
pub sigfigs: u32,
pub snaplen: u32,
pub network: LinkType,
pub nano_sec: bool,
pub endianness: Endianness,
}
Expand description
Header of the pcap file.
The type of frame contained in the records is described by the field network
.
Fields§
§major: u16
Major version of this file format.
minor: u16
Minor version of this file format.
this_zone: i32
The correction time in seconds between GMT (UTC) and the local timezone of the following packet header timestamps.
Examples: If the timestamps are in GMT (UTC), this_zone
is simply 0. If the timestamps are
in Central European time (Amsterdam, Berlin, …) which is GMT + 1:00, this_zone
must be
-3600. In practice, time stamps are always in GMT, so this_zone
is always 0.
sigfigs: u32
In theory, the accuracy of time stamps in the capture; in practice, all tools set it to 0.
snaplen: u32
Maximum length of a captured packet. If the initial packet is bigger than this value it will be truncated.
network: LinkType
§nano_sec: bool
§endianness: Endianness
Trait Implementations§
impl StructuralPartialEq for Header
Auto Trait Implementations§
impl Freeze for Header
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
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