dbs_utils/net/net_gen/
if_tun.rs

1// Copyright 2017 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the THIRD-PARTY file.
4
5/* automatically generated by rust-bindgen */
6
7#[repr(C)]
8#[derive(Default)]
9pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>);
10impl<T> __IncompleteArrayField<T> {
11    #[inline]
12    pub fn new() -> Self {
13        __IncompleteArrayField(::std::marker::PhantomData)
14    }
15    #[inline]
16    pub unsafe fn as_ptr(&self) -> *const T {
17        ::std::mem::transmute(self)
18    }
19    #[inline]
20    pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
21        ::std::mem::transmute(self)
22    }
23    #[inline]
24    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
25        ::std::slice::from_raw_parts(self.as_ptr(), len)
26    }
27    #[inline]
28    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
29        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
30    }
31}
32impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
33    fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
34        fmt.write_str("__IncompleteArrayField")
35    }
36}
37impl<T> ::std::clone::Clone for __IncompleteArrayField<T> {
38    #[inline]
39    fn clone(&self) -> Self {
40        Self::new()
41    }
42}
43impl<T> ::std::marker::Copy for __IncompleteArrayField<T> {}
44pub const __BITS_PER_LONG: ::std::os::raw::c_uint = 64;
45pub const __FD_SETSIZE: ::std::os::raw::c_uint = 1024;
46pub const ETH_ALEN: ::std::os::raw::c_uint = 6;
47pub const ETH_HLEN: ::std::os::raw::c_uint = 14;
48pub const ETH_ZLEN: ::std::os::raw::c_uint = 60;
49pub const ETH_DATA_LEN: ::std::os::raw::c_uint = 1500;
50pub const ETH_FRAME_LEN: ::std::os::raw::c_uint = 1514;
51pub const ETH_FCS_LEN: ::std::os::raw::c_uint = 4;
52pub const ETH_P_LOOP: ::std::os::raw::c_uint = 96;
53pub const ETH_P_PUP: ::std::os::raw::c_uint = 512;
54pub const ETH_P_PUPAT: ::std::os::raw::c_uint = 513;
55pub const ETH_P_TSN: ::std::os::raw::c_uint = 8944;
56pub const ETH_P_IP: ::std::os::raw::c_uint = 2048;
57pub const ETH_P_X25: ::std::os::raw::c_uint = 2053;
58pub const ETH_P_ARP: ::std::os::raw::c_uint = 2054;
59pub const ETH_P_BPQ: ::std::os::raw::c_uint = 2303;
60pub const ETH_P_IEEEPUP: ::std::os::raw::c_uint = 2560;
61pub const ETH_P_IEEEPUPAT: ::std::os::raw::c_uint = 2561;
62pub const ETH_P_BATMAN: ::std::os::raw::c_uint = 17157;
63pub const ETH_P_DEC: ::std::os::raw::c_uint = 24576;
64pub const ETH_P_DNA_DL: ::std::os::raw::c_uint = 24577;
65pub const ETH_P_DNA_RC: ::std::os::raw::c_uint = 24578;
66pub const ETH_P_DNA_RT: ::std::os::raw::c_uint = 24579;
67pub const ETH_P_LAT: ::std::os::raw::c_uint = 24580;
68pub const ETH_P_DIAG: ::std::os::raw::c_uint = 24581;
69pub const ETH_P_CUST: ::std::os::raw::c_uint = 24582;
70pub const ETH_P_SCA: ::std::os::raw::c_uint = 24583;
71pub const ETH_P_TEB: ::std::os::raw::c_uint = 25944;
72pub const ETH_P_RARP: ::std::os::raw::c_uint = 32821;
73pub const ETH_P_ATALK: ::std::os::raw::c_uint = 32923;
74pub const ETH_P_AARP: ::std::os::raw::c_uint = 33011;
75pub const ETH_P_8021Q: ::std::os::raw::c_uint = 33024;
76pub const ETH_P_IPX: ::std::os::raw::c_uint = 33079;
77pub const ETH_P_IPV6: ::std::os::raw::c_uint = 34525;
78pub const ETH_P_PAUSE: ::std::os::raw::c_uint = 34824;
79pub const ETH_P_SLOW: ::std::os::raw::c_uint = 34825;
80pub const ETH_P_WCCP: ::std::os::raw::c_uint = 34878;
81pub const ETH_P_MPLS_UC: ::std::os::raw::c_uint = 34887;
82pub const ETH_P_MPLS_MC: ::std::os::raw::c_uint = 34888;
83pub const ETH_P_ATMMPOA: ::std::os::raw::c_uint = 34892;
84pub const ETH_P_PPP_DISC: ::std::os::raw::c_uint = 34915;
85pub const ETH_P_PPP_SES: ::std::os::raw::c_uint = 34916;
86pub const ETH_P_LINK_CTL: ::std::os::raw::c_uint = 34924;
87pub const ETH_P_ATMFATE: ::std::os::raw::c_uint = 34948;
88pub const ETH_P_PAE: ::std::os::raw::c_uint = 34958;
89pub const ETH_P_AOE: ::std::os::raw::c_uint = 34978;
90pub const ETH_P_8021AD: ::std::os::raw::c_uint = 34984;
91pub const ETH_P_802_EX1: ::std::os::raw::c_uint = 34997;
92pub const ETH_P_TIPC: ::std::os::raw::c_uint = 35018;
93pub const ETH_P_8021AH: ::std::os::raw::c_uint = 35047;
94pub const ETH_P_MVRP: ::std::os::raw::c_uint = 35061;
95pub const ETH_P_1588: ::std::os::raw::c_uint = 35063;
96pub const ETH_P_PRP: ::std::os::raw::c_uint = 35067;
97pub const ETH_P_FCOE: ::std::os::raw::c_uint = 35078;
98pub const ETH_P_TDLS: ::std::os::raw::c_uint = 35085;
99pub const ETH_P_FIP: ::std::os::raw::c_uint = 35092;
100pub const ETH_P_80221: ::std::os::raw::c_uint = 35095;
101pub const ETH_P_LOOPBACK: ::std::os::raw::c_uint = 36864;
102pub const ETH_P_QINQ1: ::std::os::raw::c_uint = 37120;
103pub const ETH_P_QINQ2: ::std::os::raw::c_uint = 37376;
104pub const ETH_P_QINQ3: ::std::os::raw::c_uint = 37632;
105pub const ETH_P_EDSA: ::std::os::raw::c_uint = 56026;
106pub const ETH_P_AF_IUCV: ::std::os::raw::c_uint = 64507;
107pub const ETH_P_802_3_MIN: ::std::os::raw::c_uint = 1536;
108pub const ETH_P_802_3: ::std::os::raw::c_uint = 1;
109pub const ETH_P_AX25: ::std::os::raw::c_uint = 2;
110pub const ETH_P_ALL: ::std::os::raw::c_uint = 3;
111pub const ETH_P_802_2: ::std::os::raw::c_uint = 4;
112pub const ETH_P_SNAP: ::std::os::raw::c_uint = 5;
113pub const ETH_P_DDCMP: ::std::os::raw::c_uint = 6;
114pub const ETH_P_WAN_PPP: ::std::os::raw::c_uint = 7;
115pub const ETH_P_PPP_MP: ::std::os::raw::c_uint = 8;
116pub const ETH_P_LOCALTALK: ::std::os::raw::c_uint = 9;
117pub const ETH_P_CAN: ::std::os::raw::c_uint = 12;
118pub const ETH_P_CANFD: ::std::os::raw::c_uint = 13;
119pub const ETH_P_PPPTALK: ::std::os::raw::c_uint = 16;
120pub const ETH_P_TR_802_2: ::std::os::raw::c_uint = 17;
121pub const ETH_P_MOBITEX: ::std::os::raw::c_uint = 21;
122pub const ETH_P_CONTROL: ::std::os::raw::c_uint = 22;
123pub const ETH_P_IRDA: ::std::os::raw::c_uint = 23;
124pub const ETH_P_ECONET: ::std::os::raw::c_uint = 24;
125pub const ETH_P_HDLC: ::std::os::raw::c_uint = 25;
126pub const ETH_P_ARCNET: ::std::os::raw::c_uint = 26;
127pub const ETH_P_DSA: ::std::os::raw::c_uint = 27;
128pub const ETH_P_TRAILER: ::std::os::raw::c_uint = 28;
129pub const ETH_P_PHONET: ::std::os::raw::c_uint = 245;
130pub const ETH_P_IEEE802154: ::std::os::raw::c_uint = 246;
131pub const ETH_P_CAIF: ::std::os::raw::c_uint = 247;
132pub const ETH_P_XDSA: ::std::os::raw::c_uint = 248;
133pub const BPF_LD: ::std::os::raw::c_uint = 0;
134pub const BPF_LDX: ::std::os::raw::c_uint = 1;
135pub const BPF_ST: ::std::os::raw::c_uint = 2;
136pub const BPF_STX: ::std::os::raw::c_uint = 3;
137pub const BPF_ALU: ::std::os::raw::c_uint = 4;
138pub const BPF_JMP: ::std::os::raw::c_uint = 5;
139pub const BPF_RET: ::std::os::raw::c_uint = 6;
140pub const BPF_MISC: ::std::os::raw::c_uint = 7;
141pub const BPF_W: ::std::os::raw::c_uint = 0;
142pub const BPF_H: ::std::os::raw::c_uint = 8;
143pub const BPF_B: ::std::os::raw::c_uint = 16;
144pub const BPF_IMM: ::std::os::raw::c_uint = 0;
145pub const BPF_ABS: ::std::os::raw::c_uint = 32;
146pub const BPF_IND: ::std::os::raw::c_uint = 64;
147pub const BPF_MEM: ::std::os::raw::c_uint = 96;
148pub const BPF_LEN: ::std::os::raw::c_uint = 128;
149pub const BPF_MSH: ::std::os::raw::c_uint = 160;
150pub const BPF_ADD: ::std::os::raw::c_uint = 0;
151pub const BPF_SUB: ::std::os::raw::c_uint = 16;
152pub const BPF_MUL: ::std::os::raw::c_uint = 32;
153pub const BPF_DIV: ::std::os::raw::c_uint = 48;
154pub const BPF_OR: ::std::os::raw::c_uint = 64;
155pub const BPF_AND: ::std::os::raw::c_uint = 80;
156pub const BPF_LSH: ::std::os::raw::c_uint = 96;
157pub const BPF_RSH: ::std::os::raw::c_uint = 112;
158pub const BPF_NEG: ::std::os::raw::c_uint = 128;
159pub const BPF_MOD: ::std::os::raw::c_uint = 144;
160pub const BPF_XOR: ::std::os::raw::c_uint = 160;
161pub const BPF_JA: ::std::os::raw::c_uint = 0;
162pub const BPF_JEQ: ::std::os::raw::c_uint = 16;
163pub const BPF_JGT: ::std::os::raw::c_uint = 32;
164pub const BPF_JGE: ::std::os::raw::c_uint = 48;
165pub const BPF_JSET: ::std::os::raw::c_uint = 64;
166pub const BPF_K: ::std::os::raw::c_uint = 0;
167pub const BPF_X: ::std::os::raw::c_uint = 8;
168pub const BPF_MAXINSNS: ::std::os::raw::c_uint = 4096;
169pub const BPF_MAJOR_VERSION: ::std::os::raw::c_uint = 1;
170pub const BPF_MINOR_VERSION: ::std::os::raw::c_uint = 1;
171pub const BPF_A: ::std::os::raw::c_uint = 16;
172pub const BPF_TAX: ::std::os::raw::c_uint = 0;
173pub const BPF_TXA: ::std::os::raw::c_uint = 128;
174pub const BPF_MEMWORDS: ::std::os::raw::c_uint = 16;
175pub const SKF_AD_OFF: ::std::os::raw::c_int = -4096;
176pub const SKF_AD_PROTOCOL: ::std::os::raw::c_uint = 0;
177pub const SKF_AD_PKTTYPE: ::std::os::raw::c_uint = 4;
178pub const SKF_AD_IFINDEX: ::std::os::raw::c_uint = 8;
179pub const SKF_AD_NLATTR: ::std::os::raw::c_uint = 12;
180pub const SKF_AD_NLATTR_NEST: ::std::os::raw::c_uint = 16;
181pub const SKF_AD_MARK: ::std::os::raw::c_uint = 20;
182pub const SKF_AD_QUEUE: ::std::os::raw::c_uint = 24;
183pub const SKF_AD_HATYPE: ::std::os::raw::c_uint = 28;
184pub const SKF_AD_RXHASH: ::std::os::raw::c_uint = 32;
185pub const SKF_AD_CPU: ::std::os::raw::c_uint = 36;
186pub const SKF_AD_ALU_XOR_X: ::std::os::raw::c_uint = 40;
187pub const SKF_AD_VLAN_TAG: ::std::os::raw::c_uint = 44;
188pub const SKF_AD_VLAN_TAG_PRESENT: ::std::os::raw::c_uint = 48;
189pub const SKF_AD_PAY_OFFSET: ::std::os::raw::c_uint = 52;
190pub const SKF_AD_RANDOM: ::std::os::raw::c_uint = 56;
191pub const SKF_AD_VLAN_TPID: ::std::os::raw::c_uint = 60;
192pub const SKF_AD_MAX: ::std::os::raw::c_uint = 64;
193pub const SKF_NET_OFF: ::std::os::raw::c_int = -1048576;
194pub const SKF_LL_OFF: ::std::os::raw::c_int = -2097152;
195pub const BPF_NET_OFF: ::std::os::raw::c_int = -1048576;
196pub const BPF_LL_OFF: ::std::os::raw::c_int = -2097152;
197pub const TUN_READQ_SIZE: ::std::os::raw::c_uint = 500;
198pub const TUN_TYPE_MASK: ::std::os::raw::c_uint = 15;
199pub const IFF_TUN: ::std::os::raw::c_uint = 1;
200pub const IFF_TAP: ::std::os::raw::c_uint = 2;
201pub const IFF_NO_PI: ::std::os::raw::c_uint = 4096;
202pub const IFF_ONE_QUEUE: ::std::os::raw::c_uint = 8192;
203pub const IFF_VNET_HDR: ::std::os::raw::c_uint = 16384;
204pub const IFF_TUN_EXCL: ::std::os::raw::c_uint = 32768;
205pub const IFF_MULTI_QUEUE: ::std::os::raw::c_uint = 256;
206pub const IFF_ATTACH_QUEUE: ::std::os::raw::c_uint = 512;
207pub const IFF_DETACH_QUEUE: ::std::os::raw::c_uint = 1024;
208pub const IFF_PERSIST: ::std::os::raw::c_uint = 2048;
209pub const IFF_NOFILTER: ::std::os::raw::c_uint = 4096;
210pub const TUN_TX_TIMESTAMP: ::std::os::raw::c_uint = 1;
211pub const TUN_F_CSUM: ::std::os::raw::c_uint = 1;
212pub const TUN_F_TSO4: ::std::os::raw::c_uint = 2;
213pub const TUN_F_TSO6: ::std::os::raw::c_uint = 4;
214pub const TUN_F_TSO_ECN: ::std::os::raw::c_uint = 8;
215pub const TUN_F_UFO: ::std::os::raw::c_uint = 16;
216pub const TUN_PKT_STRIP: ::std::os::raw::c_uint = 1;
217pub const TUN_FLT_ALLMULTI: ::std::os::raw::c_uint = 1;
218pub type __s8 = ::std::os::raw::c_schar;
219pub type __u8 = ::std::os::raw::c_uchar;
220pub type __s16 = ::std::os::raw::c_short;
221pub type __u16 = ::std::os::raw::c_ushort;
222pub type __s32 = ::std::os::raw::c_int;
223pub type __u32 = ::std::os::raw::c_uint;
224pub type __s64 = ::std::os::raw::c_longlong;
225pub type __u64 = ::std::os::raw::c_ulonglong;
226#[repr(C)]
227#[derive(Debug, Default, Copy)]
228pub struct __kernel_fd_set {
229    pub fds_bits: [::std::os::raw::c_ulong; 16usize],
230}
231#[test]
232fn bindgen_test_layout___kernel_fd_set() {
233    assert_eq!(
234        ::std::mem::size_of::<__kernel_fd_set>(),
235        128usize,
236        concat!("Size of: ", stringify!(__kernel_fd_set))
237    );
238    assert_eq!(
239        ::std::mem::align_of::<__kernel_fd_set>(),
240        8usize,
241        concat!("Alignment of ", stringify!(__kernel_fd_set))
242    );
243    assert_eq!(
244        unsafe { &(*(0 as *const __kernel_fd_set)).fds_bits as *const _ as usize },
245        0usize,
246        concat!(
247            "Alignment of field: ",
248            stringify!(__kernel_fd_set),
249            "::",
250            stringify!(fds_bits)
251        )
252    );
253}
254impl Clone for __kernel_fd_set {
255    fn clone(&self) -> Self {
256        *self
257    }
258}
259pub type __kernel_sighandler_t =
260    ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
261pub type __kernel_key_t = ::std::os::raw::c_int;
262pub type __kernel_mqd_t = ::std::os::raw::c_int;
263pub type __kernel_old_uid_t = ::std::os::raw::c_ushort;
264pub type __kernel_old_gid_t = ::std::os::raw::c_ushort;
265pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
266pub type __kernel_long_t = ::std::os::raw::c_long;
267pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
268pub type __kernel_ino_t = __kernel_ulong_t;
269pub type __kernel_mode_t = ::std::os::raw::c_uint;
270pub type __kernel_pid_t = ::std::os::raw::c_int;
271pub type __kernel_ipc_pid_t = ::std::os::raw::c_int;
272pub type __kernel_uid_t = ::std::os::raw::c_uint;
273pub type __kernel_gid_t = ::std::os::raw::c_uint;
274pub type __kernel_suseconds_t = __kernel_long_t;
275pub type __kernel_daddr_t = ::std::os::raw::c_int;
276pub type __kernel_uid32_t = ::std::os::raw::c_uint;
277pub type __kernel_gid32_t = ::std::os::raw::c_uint;
278pub type __kernel_size_t = __kernel_ulong_t;
279pub type __kernel_ssize_t = __kernel_long_t;
280pub type __kernel_ptrdiff_t = __kernel_long_t;
281#[repr(C)]
282#[derive(Debug, Default, Copy)]
283pub struct __kernel_fsid_t {
284    pub val: [::std::os::raw::c_int; 2usize],
285}
286#[test]
287fn bindgen_test_layout___kernel_fsid_t() {
288    assert_eq!(
289        ::std::mem::size_of::<__kernel_fsid_t>(),
290        8usize,
291        concat!("Size of: ", stringify!(__kernel_fsid_t))
292    );
293    assert_eq!(
294        ::std::mem::align_of::<__kernel_fsid_t>(),
295        4usize,
296        concat!("Alignment of ", stringify!(__kernel_fsid_t))
297    );
298    assert_eq!(
299        unsafe { &(*(0 as *const __kernel_fsid_t)).val as *const _ as usize },
300        0usize,
301        concat!(
302            "Alignment of field: ",
303            stringify!(__kernel_fsid_t),
304            "::",
305            stringify!(val)
306        )
307    );
308}
309impl Clone for __kernel_fsid_t {
310    fn clone(&self) -> Self {
311        *self
312    }
313}
314pub type __kernel_off_t = __kernel_long_t;
315pub type __kernel_loff_t = ::std::os::raw::c_longlong;
316pub type __kernel_time_t = __kernel_long_t;
317pub type __kernel_clock_t = __kernel_long_t;
318pub type __kernel_timer_t = ::std::os::raw::c_int;
319pub type __kernel_clockid_t = ::std::os::raw::c_int;
320pub type __kernel_caddr_t = *mut ::std::os::raw::c_char;
321pub type __kernel_uid16_t = ::std::os::raw::c_ushort;
322pub type __kernel_gid16_t = ::std::os::raw::c_ushort;
323pub type __le16 = __u16;
324pub type __be16 = __u16;
325pub type __le32 = __u32;
326pub type __be32 = __u32;
327pub type __le64 = __u64;
328pub type __be64 = __u64;
329pub type __sum16 = __u16;
330pub type __wsum = __u32;
331#[repr(C, packed)]
332#[derive(Debug, Default, Copy)]
333pub struct ethhdr {
334    pub h_dest: [::std::os::raw::c_uchar; 6usize],
335    pub h_source: [::std::os::raw::c_uchar; 6usize],
336    pub h_proto: __be16,
337}
338#[test]
339fn bindgen_test_layout_ethhdr() {
340    assert_eq!(
341        ::std::mem::size_of::<ethhdr>(),
342        14usize,
343        concat!("Size of: ", stringify!(ethhdr))
344    );
345    assert_eq!(
346        ::std::mem::align_of::<ethhdr>(),
347        1usize,
348        concat!("Alignment of ", stringify!(ethhdr))
349    );
350    assert_eq!(
351        unsafe { &(*(0 as *const ethhdr)).h_dest as *const _ as usize },
352        0usize,
353        concat!(
354            "Alignment of field: ",
355            stringify!(ethhdr),
356            "::",
357            stringify!(h_dest)
358        )
359    );
360    assert_eq!(
361        unsafe { &(*(0 as *const ethhdr)).h_source as *const _ as usize },
362        6usize,
363        concat!(
364            "Alignment of field: ",
365            stringify!(ethhdr),
366            "::",
367            stringify!(h_source)
368        )
369    );
370    assert_eq!(
371        unsafe { &(*(0 as *const ethhdr)).h_proto as *const _ as usize },
372        12usize,
373        concat!(
374            "Alignment of field: ",
375            stringify!(ethhdr),
376            "::",
377            stringify!(h_proto)
378        )
379    );
380}
381impl Clone for ethhdr {
382    fn clone(&self) -> Self {
383        *self
384    }
385}
386#[repr(C)]
387#[derive(Debug, Default, Copy)]
388pub struct sock_filter {
389    pub code: __u16,
390    pub jt: __u8,
391    pub jf: __u8,
392    pub k: __u32,
393}
394#[test]
395fn bindgen_test_layout_sock_filter() {
396    assert_eq!(
397        ::std::mem::size_of::<sock_filter>(),
398        8usize,
399        concat!("Size of: ", stringify!(sock_filter))
400    );
401    assert_eq!(
402        ::std::mem::align_of::<sock_filter>(),
403        4usize,
404        concat!("Alignment of ", stringify!(sock_filter))
405    );
406    assert_eq!(
407        unsafe { &(*(0 as *const sock_filter)).code as *const _ as usize },
408        0usize,
409        concat!(
410            "Alignment of field: ",
411            stringify!(sock_filter),
412            "::",
413            stringify!(code)
414        )
415    );
416    assert_eq!(
417        unsafe { &(*(0 as *const sock_filter)).jt as *const _ as usize },
418        2usize,
419        concat!(
420            "Alignment of field: ",
421            stringify!(sock_filter),
422            "::",
423            stringify!(jt)
424        )
425    );
426    assert_eq!(
427        unsafe { &(*(0 as *const sock_filter)).jf as *const _ as usize },
428        3usize,
429        concat!(
430            "Alignment of field: ",
431            stringify!(sock_filter),
432            "::",
433            stringify!(jf)
434        )
435    );
436    assert_eq!(
437        unsafe { &(*(0 as *const sock_filter)).k as *const _ as usize },
438        4usize,
439        concat!(
440            "Alignment of field: ",
441            stringify!(sock_filter),
442            "::",
443            stringify!(k)
444        )
445    );
446}
447impl Clone for sock_filter {
448    fn clone(&self) -> Self {
449        *self
450    }
451}
452#[repr(C)]
453#[derive(Debug, Copy)]
454pub struct sock_fprog {
455    pub len: ::std::os::raw::c_ushort,
456    pub filter: *mut sock_filter,
457}
458#[test]
459fn bindgen_test_layout_sock_fprog() {
460    assert_eq!(
461        ::std::mem::size_of::<sock_fprog>(),
462        16usize,
463        concat!("Size of: ", stringify!(sock_fprog))
464    );
465    assert_eq!(
466        ::std::mem::align_of::<sock_fprog>(),
467        8usize,
468        concat!("Alignment of ", stringify!(sock_fprog))
469    );
470    assert_eq!(
471        unsafe { &(*(0 as *const sock_fprog)).len as *const _ as usize },
472        0usize,
473        concat!(
474            "Alignment of field: ",
475            stringify!(sock_fprog),
476            "::",
477            stringify!(len)
478        )
479    );
480    assert_eq!(
481        unsafe { &(*(0 as *const sock_fprog)).filter as *const _ as usize },
482        8usize,
483        concat!(
484            "Alignment of field: ",
485            stringify!(sock_fprog),
486            "::",
487            stringify!(filter)
488        )
489    );
490}
491impl Clone for sock_fprog {
492    fn clone(&self) -> Self {
493        *self
494    }
495}
496impl Default for sock_fprog {
497    fn default() -> Self {
498        unsafe { ::std::mem::zeroed() }
499    }
500}
501#[repr(C)]
502#[derive(Debug, Default, Copy)]
503pub struct tun_pi {
504    pub flags: __u16,
505    pub proto: __be16,
506}
507#[test]
508fn bindgen_test_layout_tun_pi() {
509    assert_eq!(
510        ::std::mem::size_of::<tun_pi>(),
511        4usize,
512        concat!("Size of: ", stringify!(tun_pi))
513    );
514    assert_eq!(
515        ::std::mem::align_of::<tun_pi>(),
516        2usize,
517        concat!("Alignment of ", stringify!(tun_pi))
518    );
519    assert_eq!(
520        unsafe { &(*(0 as *const tun_pi)).flags as *const _ as usize },
521        0usize,
522        concat!(
523            "Alignment of field: ",
524            stringify!(tun_pi),
525            "::",
526            stringify!(flags)
527        )
528    );
529    assert_eq!(
530        unsafe { &(*(0 as *const tun_pi)).proto as *const _ as usize },
531        2usize,
532        concat!(
533            "Alignment of field: ",
534            stringify!(tun_pi),
535            "::",
536            stringify!(proto)
537        )
538    );
539}
540impl Clone for tun_pi {
541    fn clone(&self) -> Self {
542        *self
543    }
544}
545#[repr(C)]
546#[derive(Debug, Default, Copy)]
547pub struct tun_filter {
548    pub flags: __u16,
549    pub count: __u16,
550    pub addr: __IncompleteArrayField<[__u8; 6usize]>,
551}
552#[test]
553fn bindgen_test_layout_tun_filter() {
554    assert_eq!(
555        ::std::mem::size_of::<tun_filter>(),
556        4usize,
557        concat!("Size of: ", stringify!(tun_filter))
558    );
559    assert_eq!(
560        ::std::mem::align_of::<tun_filter>(),
561        2usize,
562        concat!("Alignment of ", stringify!(tun_filter))
563    );
564    assert_eq!(
565        unsafe { &(*(0 as *const tun_filter)).flags as *const _ as usize },
566        0usize,
567        concat!(
568            "Alignment of field: ",
569            stringify!(tun_filter),
570            "::",
571            stringify!(flags)
572        )
573    );
574    assert_eq!(
575        unsafe { &(*(0 as *const tun_filter)).count as *const _ as usize },
576        2usize,
577        concat!(
578            "Alignment of field: ",
579            stringify!(tun_filter),
580            "::",
581            stringify!(count)
582        )
583    );
584    assert_eq!(
585        unsafe { &(*(0 as *const tun_filter)).addr as *const _ as usize },
586        4usize,
587        concat!(
588            "Alignment of field: ",
589            stringify!(tun_filter),
590            "::",
591            stringify!(addr)
592        )
593    );
594}
595impl Clone for tun_filter {
596    fn clone(&self) -> Self {
597        *self
598    }
599}