tunic 0.1.0

An interface for TUN/TAP devices
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use nix::libc::{self, IFF_TUN};

#[repr(C)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Ifreq {
    pub name: [libc::c_char; libc::IFNAMSIZ],
    pub flags: libc::c_short,
}

impl Default for Ifreq {
    fn default() -> Self {
        Self {
            name: Default::default(),
            flags: IFF_TUN as libc::c_short,
        }
    }
}