pub fn new_monitored(
        tx: Sender,
        mtu: usize,
        local_hardware_addr: HardwareAddr,
        local_ip_addr: Ipv4Addr,
        traffic: Option<Traffic>,
    ) -> Forwarder {
        let size = match &traffic {
            Some(traffic) => Some(traffic.size()),
            None => None,
        };
        let count = match &traffic {
            Some(traffic) => Some(traffic.count()),
            None => None,
        };
        Forwarder {
            tx,
            src_mtu_map: HashMap::new(),
            local_mtu: mtu,
            src_hardware_addr_map: HashMap::new(),
            local_hardware_addr,
            local_ip_addr,
            ipv4_identification_map: HashMap::new(),
            states: HashMap::new(),
            traffic_size: size,
            traffic_count: count,
        }
    }
/// Creates a new `Forwarder` which is monitored.
Creates a new `Forwarder` which is monitored.
Creates a new ` Forwarder ` which is monitored .
pub fn new_monitored(
        tx: Sender,
        mtu: usize,
        local_hardware_addr: HardwareAddr,
        local_ip_addr: Ipv4Addr,
        traffic: Option<Traffic>,
    ) -> Forwarder {
        let size = match &traffic {
            Some(traffic) => Some(traffic.size()),
            None => None,
        };
        let count = match &traffic {
            Some(traffic) => Some(traffic.count()),
            None => None,
        };
        Forwarder {
            tx,
            src_mtu_map: HashMap::new(),
            local_mtu: mtu,
            src_hardware_addr_map: HashMap::new(),
            local_hardware_addr,
            local_ip_addr,
            ipv4_identification_map: HashMap::new(),
            states: HashMap::new(),
            traffic_size: size,
            traffic_count: count,
        }
    }
pub fn new_monitored ( tx : Sender , mtu : usize , local_hardware_addr : HardwareAddr , local_ip_addr : Ipv4Addr , traffic : Option < Traffic > , ) -> Forwarder { let size = match & traffic { Some ( traffic ) => Some ( traffic . size ( ) ) , None => None , } ; let count = match & traffic { Some ( traffic ) => Some ( traffic . count ( ) ) , None => None , } ; Forwarder { tx , src_mtu_map : HashMap :: new ( ) , local_mtu : mtu , src_hardware_addr_map : HashMap :: new ( ) , local_hardware_addr , local_ip_addr , ipv4_identification_map : HashMap :: new ( ) , states : HashMap :: new ( ) , traffic_size : size , traffic_count : count , } }
Creates a new `Forwarder` which is monitored.
Creates a new ` Forwarder ` which is monitored .
tx
Sender
mtu
usize
local_hardware_addr
HardwareAddr
local_ip_addr
Ipv4Addr
traffic
Option<Traffic>
tx
Sender
mtu
usize
local_hardware_addr
HardwareAddr
local_ip_addr
Ipv4Addr
traffic
Option<Traffic>