1#![allow(clippy::missing_safety_doc)]
4#![allow(clippy::undocumented_unsafe_blocks)]
5#![allow(clippy::upper_case_acronyms)]
6#![allow(non_upper_case_globals)]
7#![allow(non_camel_case_types)]
8#![allow(non_snake_case)]
9#![allow(dead_code)]
10
11pub const TUN_READQ_SIZE: u32 = 500;
12pub const TUN_TYPE_MASK: u32 = 15;
13pub const IFF_TAP: u32 = 2;
14pub const IFF_NO_PI: u32 = 4096;
15pub const IFF_VNET_HDR: u32 = 16384;
16pub const IFF_MULTI_QUEUE: u32 = 256;
17pub const TUN_TX_TIMESTAMP: u32 = 1;
18pub const TUN_F_CSUM: u32 = 1;
19pub const TUN_F_TSO4: u32 = 2;
20pub const TUN_F_TSO6: u32 = 4;
21pub const TUN_F_TSO_ECN: u32 = 8;
22pub const TUN_F_UFO: u32 = 16;
23pub const TUN_F_USO4: u32 = 32;
24pub const TUN_F_USO6: u32 = 64;
25pub const TUN_PKT_STRIP: u32 = 1;
26pub const TUN_FLT_ALLMULTI: u32 = 1;
27#[repr(C)]
28#[derive(Debug, Default, Copy, Clone)]
29pub struct sock_filter {
30 pub code: u16,
31 pub jt: u8,
32 pub jf: u8,
33 pub k: u32,
34}
35#[repr(C)]
36#[derive(Debug, Copy, Clone)]
37pub struct sock_fprog {
38 pub len: ::std::os::raw::c_ushort,
39 pub filter: *mut sock_filter,
40}
41impl Default for sock_fprog {
42 fn default() -> Self {
43 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
44 unsafe {
45 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
46 s.assume_init()
47 }
48 }
49}