pub struct Linktype(pub i32);
Expand description
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);
Tuple Fields§
§0: i32
Implementations§
source§impl Linktype
impl Linktype
sourcepub fn get_description(&self) -> Result<String, Error>
pub fn get_description(&self) -> Result<String, Error>
Gets the description of a link type.
pub const NULL: Self = _
pub const ETHERNET: Self = _
pub const AX25: Self = _
pub const IEEE802_5: Self = _
pub const ARCNET_BSD: Self = _
pub const SLIP: Self = _
pub const PPP: Self = _
pub const FDDI: Self = _
pub const PPP_HDLC: Self = _
pub const PPP_ETHER: Self = _
pub const ATM_RFC1483: Self = _
pub const RAW: Self = _
pub const C_HDLC: Self = _
pub const IEEE802_11: Self = _
pub const FRELAY: Self = _
pub const LOOP: Self = _
pub const LINUX_SLL: Self = _
pub const LTALK: Self = _
pub const PFLOG: Self = _
pub const IEEE802_11_PRISM: Self = _
pub const IP_OVER_FC: Self = _
pub const SUNATM: Self = _
pub const IEEE802_11_RADIOTAP: Self = _
pub const ARCNET_LINUX: Self = _
pub const APPLE_IP_OVER_IEEE1394: Self = _
pub const MTP2_WITH_PHDR: Self = _
pub const MTP2: Self = _
pub const MTP3: Self = _
pub const SCCP: Self = _
pub const DOCSIS: Self = _
pub const LINUX_IRDA: Self = _
pub const USER0: Self = _
pub const USER1: Self = _
pub const USER2: Self = _
pub const USER3: Self = _
pub const USER4: Self = _
pub const USER5: Self = _
pub const USER6: Self = _
pub const USER7: Self = _
pub const USER8: Self = _
pub const USER9: Self = _
pub const USER10: Self = _
pub const USER11: Self = _
pub const USER12: Self = _
pub const USER13: Self = _
pub const USER14: Self = _
pub const USER15: Self = _
pub const IEEE802_11_AVS: Self = _
pub const BACNET_MS_TP: Self = _
pub const PPP_PPPD: Self = _
pub const GPRS_LLC: Self = _
pub const GPF_T: Self = _
pub const GPF_F: Self = _
pub const LINUX_LAPD: Self = _
pub const MFR: Self = _
pub const BLUETOOTH_HCI_H4: Self = _
pub const USB_LINUX: Self = _
pub const PPI: Self = _
pub const IEEE802_15_4_WITHFCS: Self = _
pub const SITA: Self = _
pub const ERF: Self = _
pub const BLUETOOTH_HCI_H4_WITH_PHDR: Self = _
pub const AX25_KISS: Self = _
pub const LAPD: Self = _
pub const PPP_WITH_DIR: Self = _
pub const C_HDLC_WITH_DIR: Self = _
pub const FRELAY_WITH_DIR: Self = _
pub const LAPB_WITH_DIR: Self = _
pub const IPMB_LINUX: Self = _
pub const IEEE802_15_4_NONASK_PHY: Self = _
pub const USB_LINUX_MMAPPED: Self = _
pub const FC_2: Self = _
pub const FC_2_WITH_FRAME_DELIMS: Self = _
pub const IPNET: Self = _
pub const CAN_SOCKETCAN: Self = _
pub const IPV4: Self = _
pub const IPV6: Self = _
pub const IEEE802_15_4_NOFCS: Self = _
pub const DBUS: Self = _
pub const DVB_CI: Self = _
pub const MUX27010: Self = _
pub const STANAG_5066_D_PDU: Self = _
pub const NFLOG: Self = _
pub const NETANALYZER: Self = _
pub const NETANALYZER_TRANSPARENT: Self = _
pub const IPOIB: Self = _
pub const MPEG_2_TS: Self = _
pub const NG40: Self = _
pub const NFC_LLCP: Self = _
pub const INFINIBAND: Self = _
pub const SCTP: Self = _
pub const USBPCAP: Self = _
pub const RTAC_SERIAL: Self = _
pub const BLUETOOTH_LE_LL: Self = _
pub const NETLINK: Self = _
pub const BLUETOOTH_LINUX_MONITOR: Self = _
pub const BLUETOOTH_BREDR_BB: Self = _
pub const BLUETOOTH_LE_LL_WITH_PHDR: Self = _
pub const PROFIBUS_DL: Self = _
pub const PKTAP: Self = _
pub const EPON: Self = _
pub const IPMI_HPM_2: Self = _
pub const ZWAVE_R1_R2: Self = _
pub const ZWAVE_R3: Self = _
pub const WATTSTOPPER_DLM: Self = _
pub const ISO_14443: Self = _
pub const RDS: Self = _
pub const USB_DARWIN: Self = _
pub const SDLC: Self = _
pub const LORATAP: Self = _
pub const VSOCK: Self = _
pub const NORDIC_BLE: Self = _
pub const DOCSIS31_XRA31: Self = _
pub const ETHERNET_MPACKET: Self = _
pub const DISPLAYPORT_AUX: Self = _
pub const LINUX_SLL2: Self = _
pub const OPENVIZSLA: Self = _
pub const EBHSCR: Self = _
pub const VPP_DISPATCH: Self = _
pub const DSA_TAG_BRCM: Self = _
pub const DSA_TAG_BRCM_PREPEND: Self = _
pub const IEEE802_15_4_TAP: Self = _
pub const DSA_TAG_DSA: Self = _
pub const DSA_TAG_EDSA: Self = _
pub const ELEE: Self = _
pub const Z_WAVE_SERIAL: Self = _
pub const USB_2_0: Self = _
pub const ATSC_ALP: Self = _
Trait Implementations§
source§impl PartialEq for Linktype
impl PartialEq for Linktype
impl Copy for Linktype
impl Eq for Linktype
impl StructuralEq for Linktype
impl StructuralPartialEq for Linktype
Auto Trait Implementations§
impl RefUnwindSafe for Linktype
impl Send for Linktype
impl Sync for Linktype
impl Unpin for Linktype
impl UnwindSafe for Linktype
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