[][src]Struct pcarp::block::InterfaceDescription

pub struct InterfaceDescription<'a> {
    pub link_type: LinkType,
    pub snap_len: u32,
    pub options: &'a [u8],
}

Defines the most important characteristics of the interface(s) used for capturing traffic. This block is required in certain cases, as described later.

An Interface Description Block (IDB) is the container for information describing an interface on which packet data is captured.

Tools that write / read the capture file associate an incrementing 32-bit number (starting from '0') to each Interface Definition Block, called the Interface ID for the interface in question. This number is unique within each Section and identifies the interface to which the IDB refers; it is only unique inside the current section, so, two Sections can have different interfaces identified by the same Interface ID values. This unique identifier is referenced by other blocks, such as Enhanced Packet Blocks and Interface Statistic Blocks, to indicate the interface to which the block refers (such the interface that was used to capture the packet that an Enhanced Packet Block contains or to which the statistics in an Interface Statistic Block refer).

There must be an Interface Description Block for each interface to which another block refers. Blocks such as an Enhanced Packet Block or an Interface Statistics Block contain an Interface ID value referring to a particular interface, and a Simple Packet Block implicitly refers to an interface with an Interface ID of 0. If the file does not contain any blocks that use an Interface ID, then the file does not need to have any IDBs.

An Interface Description Block is valid only inside the section to which it belongs.

This documentation is copyright (c) 2018 IETF Trust and the persons identified as the authors of this document. All rights reserved. Please see the linked document for the full copyright notice.

Fields

link_type: LinkType

A value that defines the link layer type of this interface. The list of Standardized Link Layer Type codes is available in the tcpdump.org link-layer header types registry.

snap_len: u32

Maximum number of octets captured from each packet. The portion of each packet that exceeds this value will not be stored in the file. A value of zero indicates no limit.

options: &'a [u8]

Optionally, a list of options (formatted according to the rules defined in Section 3.5) can be present.

Trait Implementations

impl<'a> Clone for InterfaceDescription<'a>[src]

impl<'a> Debug for InterfaceDescription<'a>[src]

impl<'a> From<InterfaceDescription<'a>> for Block<'a>[src]

impl<'a> PartialEq<InterfaceDescription<'a>> for InterfaceDescription<'a>[src]

impl<'a> StructuralPartialEq for InterfaceDescription<'a>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.