[][src]Struct pcap::Linktype

pub struct Linktype(pub i32);

This is a datalink link type.

As an example, Linktype(1) is ethernet. A full list of linktypes is available here. The const bellow are not exhaustive.

use pcap::Linktype;

let lt = Linktype(1);
assert_eq!(Linktype::ETHERNET, lt);

Implementations

impl Linktype[src]

pub fn get_name(&self) -> Result<String, Error>[src]

Gets the name of the link type, such as EN10MB

pub fn get_description(&self) -> Result<String, Error>[src]

Gets the description of a link type.

pub fn from_name(name: &str) -> Result<Linktype, Error>[src]

Gets the linktype from a name string

pub const NULL: Self[src]

pub const ETHERNET: Self[src]

pub const AX25: Self[src]

pub const IEEE802_5: Self[src]

pub const ARCNET_BSD: Self[src]

pub const SLIP: Self[src]

pub const PPP: Self[src]

pub const FDDI: Self[src]

pub const PPP_HDLC: Self[src]

pub const PPP_ETHER: Self[src]

pub const ATM_RFC1483: Self[src]

pub const RAW: Self[src]

pub const C_HDLC: Self[src]

pub const IEEE802_11: Self[src]

pub const FRELAY: Self[src]

pub const LOOP: Self[src]

pub const LINUX_SLL: Self[src]

pub const LTALK: Self[src]

pub const PFLOG: Self[src]

pub const IEEE802_11_PRISM: Self[src]

pub const IP_OVER_FC: Self[src]

pub const SUNATM: Self[src]

pub const IEEE802_11_RADIOTAP: Self[src]

pub const ARCNET_LINUX: Self[src]

pub const APPLE_IP_OVER_IEEE1394: Self[src]

pub const MTP2_WITH_PHDR: Self[src]

pub const MTP2: Self[src]

pub const MTP3: Self[src]

pub const SCCP: Self[src]

pub const DOCSIS: Self[src]

pub const LINUX_IRDA: Self[src]

pub const USER0: Self[src]

pub const USER1: Self[src]

pub const USER2: Self[src]

pub const USER3: Self[src]

pub const USER4: Self[src]

pub const USER5: Self[src]

pub const USER6: Self[src]

pub const USER7: Self[src]

pub const USER8: Self[src]

pub const USER9: Self[src]

pub const USER10: Self[src]

pub const USER11: Self[src]

pub const USER12: Self[src]

pub const USER13: Self[src]

pub const USER14: Self[src]

pub const USER15: Self[src]

pub const IEEE802_11_AVS: Self[src]

pub const BACNET_MS_TP: Self[src]

pub const PPP_PPPD: Self[src]

pub const GPRS_LLC: Self[src]

pub const GPF_T: Self[src]

pub const GPF_F: Self[src]

pub const LINUX_LAPD: Self[src]

pub const MFR: Self[src]

pub const BLUETOOTH_HCI_H4: Self[src]

pub const USB_LINUX: Self[src]

pub const PPI: Self[src]

pub const IEEE802_15_4_WITHFCS: Self[src]

pub const SITA: Self[src]

pub const ERF: Self[src]

pub const BLUETOOTH_HCI_H4_WITH_PHDR: Self[src]

pub const AX25_KISS: Self[src]

pub const LAPD: Self[src]

pub const PPP_WITH_DIR: Self[src]

pub const C_HDLC_WITH_DIR: Self[src]

pub const FRELAY_WITH_DIR: Self[src]

pub const LAPB_WITH_DIR: Self[src]

pub const IPMB_LINUX: Self[src]

pub const IEEE802_15_4_NONASK_PHY: Self[src]

pub const USB_LINUX_MMAPPED: Self[src]

pub const FC_2: Self[src]

pub const FC_2_WITH_FRAME_DELIMS: Self[src]

pub const IPNET: Self[src]

pub const CAN_SOCKETCAN: Self[src]

pub const IPV4: Self[src]

pub const IPV6: Self[src]

pub const IEEE802_15_4_NOFCS: Self[src]

pub const DBUS: Self[src]

pub const DVB_CI: Self[src]

pub const MUX27010: Self[src]

pub const STANAG_5066_D_PDU: Self[src]

pub const NFLOG: Self[src]

pub const NETANALYZER: Self[src]

pub const NETANALYZER_TRANSPARENT: Self[src]

pub const IPOIB: Self[src]

pub const MPEG_2_TS: Self[src]

pub const NG40: Self[src]

pub const NFC_LLCP: Self[src]

pub const INFINIBAND: Self[src]

pub const SCTP: Self[src]

pub const USBPCAP: Self[src]

pub const RTAC_SERIAL: Self[src]

pub const BLUETOOTH_LE_LL: Self[src]

pub const BLUETOOTH_LINUX_MONITOR: Self[src]

pub const BLUETOOTH_BREDR_BB: Self[src]

pub const BLUETOOTH_LE_LL_WITH_PHDR: Self[src]

pub const PROFIBUS_DL: Self[src]

pub const PKTAP: Self[src]

pub const EPON: Self[src]

pub const IPMI_HPM_2: Self[src]

pub const ZWAVE_R1_R2: Self[src]

pub const ZWAVE_R3: Self[src]

pub const WATTSTOPPER_DLM: Self[src]

pub const ISO_14443: Self[src]

pub const RDS: Self[src]

pub const USB_DARWIN: Self[src]

pub const SDLC: Self[src]

pub const LORATAP: Self[src]

pub const VSOCK: Self[src]

pub const NORDIC_BLE: Self[src]

pub const DOCSIS31_XRA31: Self[src]

pub const ETHERNET_MPACKET: Self[src]

pub const DISPLAYPORT_AUX: Self[src]

pub const LINUX_SLL2: Self[src]

pub const OPENVIZSLA: Self[src]

pub const EBHSCR: Self[src]

pub const VPP_DISPATCH: Self[src]

pub const DSA_TAG_BRCM: Self[src]

pub const DSA_TAG_BRCM_PREPEND: Self[src]

pub const IEEE802_15_4_TAP: Self[src]

pub const DSA_TAG_DSA: Self[src]

pub const DSA_TAG_EDSA: Self[src]

pub const ELEE: Self[src]

pub const Z_WAVE_SERIAL: Self[src]

pub const USB_2_0: Self[src]

pub const ATSC_ALP: Self[src]

Trait Implementations

impl Clone for Linktype[src]

impl Copy for Linktype[src]

impl Debug for Linktype[src]

impl Eq for Linktype[src]

impl PartialEq<Linktype> for Linktype[src]

impl StructuralEq for Linktype[src]

impl StructuralPartialEq for Linktype[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.