Struct pcap_file::packet::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 seconds

Timestamp microseconds

Number of octets of the packet saved in file

Actual length of the packet

Methods

impl PacketHeader
[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.

Create a new PacketHeader from a given slice.

Create a new PacketHeader from a given reader.

Convert the PacketHeader to a slice of bytes.

Trait Implementations

impl Copy for PacketHeader
[src]

impl Clone for PacketHeader
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for PacketHeader
[src]

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

impl Debug for PacketHeader
[src]

Formats the value using the given formatter.