libdvb 0.4.0

Interface for DVB-API v5 devices in Linux
Documentation
use libdvb::NetDevice;

fn main() {
    let mut args = std::env::args().skip(1);

    let adapter = match args.next() {
        Some(v) => v.parse().unwrap(),
        None => 0,
    };

    let device = match args.next() {
        Some(v) => v.parse().unwrap(),
        None => 0,
    };

    let dev = NetDevice::open(adapter, device).unwrap();

    let interface = dev
        .add_if(0, libdvb::net::sys::DVB_NET_FEEDTYPE_MPE)
        .unwrap();
    println!("Interface: {}", &interface);
    let mac = interface.mac();
    println!("MAC: {}", &mac);
}