rawsock 0.3.0

Library for receiving and sending raw packets. While most crate wrap just one library, rawsock allows you to use pcap, wpcap, npcap and pf_ring (pfring) using a consistent API for all of them.
Documentation
use std::fmt::{Display, Formatter, Error as FmtError};

///Kind of data link - protocol used below the surface.
#[derive(Debug, Copy, Clone)]
pub enum DataLink{
    Ethernet,
    RawIp,
    Other
}

impl Display for DataLink{
    fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> {
        match self {
            DataLink::Ethernet => write!(f, "ethernet"),
            DataLink::RawIp => write!(f, "raw IP"),
            DataLink::Other => write!(f, "other")
        }
    }
}