Struct pcap_file::PacketHeader [] [src]

pub struct PacketHeader {
    pub ts_sec: u32,
    pub ts_usec: u32,
    pub incl_len: u32,
    pub orig_len: u32,
}

Describes a pcap packet header.

Fields

Timestamp in seconds

Microseconds/nanosecond part of the timestamp

Number of octets of the packet saved in file

Original length of the packet on the wire

Methods

impl PacketHeader
[src]

[src]

Create a new PacketHeader with the given parameters.

Only one length field is provided because incl_len and orig_len are almost always the same.

[src]

Create a new PacketHeader from a given reader.

[src]

Convert the PacketHeader to a Vec<u8>.

Trait Implementations

impl Copy for PacketHeader
[src]

impl Clone for PacketHeader
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for PacketHeader
[src]

[src]

Returns the "default value" for a type. Read more

impl Debug for PacketHeader
[src]

[src]

Formats the value using the given formatter.

impl Eq for PacketHeader
[src]

impl PartialEq for PacketHeader
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.