• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 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 LICENSE file.
4 
5 /* automatically generated by rust-bindgen */
6 
7 #[repr(C)]
8 #[derive(Default)]
9 pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>);
10 impl<T> __IncompleteArrayField<T> {
11     #[inline]
new() -> Self12     pub fn new() -> Self {
13         __IncompleteArrayField(::std::marker::PhantomData)
14     }
15     #[inline]
as_ptr(&self) -> *const T16     pub unsafe fn as_ptr(&self) -> *const T {
17         ::std::mem::transmute(self)
18     }
19     #[inline]
as_mut_ptr(&mut self) -> *mut T20     pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
21         ::std::mem::transmute(self)
22     }
23     #[inline]
as_slice(&self, len: usize) -> &[T]24     pub unsafe fn as_slice(&self, len: usize) -> &[T] {
25         ::std::slice::from_raw_parts(self.as_ptr(), len)
26     }
27     #[inline]
as_mut_slice(&mut self, len: usize) -> &mut [T]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 }
32 impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result33     fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
34         fmt.write_str("__IncompleteArrayField")
35     }
36 }
37 impl<T> ::std::clone::Clone for __IncompleteArrayField<T> {
38     #[inline]
clone(&self) -> Self39     fn clone(&self) -> Self {
40         Self::new()
41     }
42 }
43 impl<T> ::std::marker::Copy for __IncompleteArrayField<T> {}
44 pub const __BITS_PER_LONG: ::std::os::raw::c_uint = 64;
45 pub const __FD_SETSIZE: ::std::os::raw::c_uint = 1024;
46 pub const VIRTIO_ID_NET: ::std::os::raw::c_uint = 1;
47 pub const VIRTIO_ID_BLOCK: ::std::os::raw::c_uint = 2;
48 pub const VIRTIO_ID_CONSOLE: ::std::os::raw::c_uint = 3;
49 pub const VIRTIO_ID_RNG: ::std::os::raw::c_uint = 4;
50 pub const VIRTIO_ID_BALLOON: ::std::os::raw::c_uint = 5;
51 pub const VIRTIO_ID_RPMSG: ::std::os::raw::c_uint = 7;
52 pub const VIRTIO_ID_SCSI: ::std::os::raw::c_uint = 8;
53 pub const VIRTIO_ID_9P: ::std::os::raw::c_uint = 9;
54 pub const VIRTIO_ID_RPROC_SERIAL: ::std::os::raw::c_uint = 11;
55 pub const VIRTIO_ID_CAIF: ::std::os::raw::c_uint = 12;
56 pub const VIRTIO_ID_GPU: ::std::os::raw::c_uint = 16;
57 pub const VIRTIO_ID_INPUT: ::std::os::raw::c_uint = 18;
58 pub const VIRTIO_CONFIG_S_ACKNOWLEDGE: ::std::os::raw::c_uint = 1;
59 pub const VIRTIO_CONFIG_S_DRIVER: ::std::os::raw::c_uint = 2;
60 pub const VIRTIO_CONFIG_S_DRIVER_OK: ::std::os::raw::c_uint = 4;
61 pub const VIRTIO_CONFIG_S_FEATURES_OK: ::std::os::raw::c_uint = 8;
62 pub const VIRTIO_CONFIG_S_FAILED: ::std::os::raw::c_uint = 128;
63 pub const VIRTIO_TRANSPORT_F_START: ::std::os::raw::c_uint = 28;
64 pub const VIRTIO_TRANSPORT_F_END: ::std::os::raw::c_uint = 33;
65 pub const VIRTIO_F_NOTIFY_ON_EMPTY: ::std::os::raw::c_uint = 24;
66 pub const VIRTIO_F_ANY_LAYOUT: ::std::os::raw::c_uint = 27;
67 pub const VIRTIO_F_VERSION_1: ::std::os::raw::c_uint = 32;
68 pub const ETH_ALEN: ::std::os::raw::c_uint = 6;
69 pub const ETH_HLEN: ::std::os::raw::c_uint = 14;
70 pub const ETH_ZLEN: ::std::os::raw::c_uint = 60;
71 pub const ETH_DATA_LEN: ::std::os::raw::c_uint = 1500;
72 pub const ETH_FRAME_LEN: ::std::os::raw::c_uint = 1514;
73 pub const ETH_FCS_LEN: ::std::os::raw::c_uint = 4;
74 pub const ETH_P_LOOP: ::std::os::raw::c_uint = 96;
75 pub const ETH_P_PUP: ::std::os::raw::c_uint = 512;
76 pub const ETH_P_PUPAT: ::std::os::raw::c_uint = 513;
77 pub const ETH_P_TSN: ::std::os::raw::c_uint = 8944;
78 pub const ETH_P_IP: ::std::os::raw::c_uint = 2048;
79 pub const ETH_P_X25: ::std::os::raw::c_uint = 2053;
80 pub const ETH_P_ARP: ::std::os::raw::c_uint = 2054;
81 pub const ETH_P_BPQ: ::std::os::raw::c_uint = 2303;
82 pub const ETH_P_IEEEPUP: ::std::os::raw::c_uint = 2560;
83 pub const ETH_P_IEEEPUPAT: ::std::os::raw::c_uint = 2561;
84 pub const ETH_P_BATMAN: ::std::os::raw::c_uint = 17157;
85 pub const ETH_P_DEC: ::std::os::raw::c_uint = 24576;
86 pub const ETH_P_DNA_DL: ::std::os::raw::c_uint = 24577;
87 pub const ETH_P_DNA_RC: ::std::os::raw::c_uint = 24578;
88 pub const ETH_P_DNA_RT: ::std::os::raw::c_uint = 24579;
89 pub const ETH_P_LAT: ::std::os::raw::c_uint = 24580;
90 pub const ETH_P_DIAG: ::std::os::raw::c_uint = 24581;
91 pub const ETH_P_CUST: ::std::os::raw::c_uint = 24582;
92 pub const ETH_P_SCA: ::std::os::raw::c_uint = 24583;
93 pub const ETH_P_TEB: ::std::os::raw::c_uint = 25944;
94 pub const ETH_P_RARP: ::std::os::raw::c_uint = 32821;
95 pub const ETH_P_ATALK: ::std::os::raw::c_uint = 32923;
96 pub const ETH_P_AARP: ::std::os::raw::c_uint = 33011;
97 pub const ETH_P_8021Q: ::std::os::raw::c_uint = 33024;
98 pub const ETH_P_IPX: ::std::os::raw::c_uint = 33079;
99 pub const ETH_P_IPV6: ::std::os::raw::c_uint = 34525;
100 pub const ETH_P_PAUSE: ::std::os::raw::c_uint = 34824;
101 pub const ETH_P_SLOW: ::std::os::raw::c_uint = 34825;
102 pub const ETH_P_WCCP: ::std::os::raw::c_uint = 34878;
103 pub const ETH_P_MPLS_UC: ::std::os::raw::c_uint = 34887;
104 pub const ETH_P_MPLS_MC: ::std::os::raw::c_uint = 34888;
105 pub const ETH_P_ATMMPOA: ::std::os::raw::c_uint = 34892;
106 pub const ETH_P_PPP_DISC: ::std::os::raw::c_uint = 34915;
107 pub const ETH_P_PPP_SES: ::std::os::raw::c_uint = 34916;
108 pub const ETH_P_LINK_CTL: ::std::os::raw::c_uint = 34924;
109 pub const ETH_P_ATMFATE: ::std::os::raw::c_uint = 34948;
110 pub const ETH_P_PAE: ::std::os::raw::c_uint = 34958;
111 pub const ETH_P_AOE: ::std::os::raw::c_uint = 34978;
112 pub const ETH_P_8021AD: ::std::os::raw::c_uint = 34984;
113 pub const ETH_P_802_EX1: ::std::os::raw::c_uint = 34997;
114 pub const ETH_P_TIPC: ::std::os::raw::c_uint = 35018;
115 pub const ETH_P_8021AH: ::std::os::raw::c_uint = 35047;
116 pub const ETH_P_MVRP: ::std::os::raw::c_uint = 35061;
117 pub const ETH_P_1588: ::std::os::raw::c_uint = 35063;
118 pub const ETH_P_PRP: ::std::os::raw::c_uint = 35067;
119 pub const ETH_P_FCOE: ::std::os::raw::c_uint = 35078;
120 pub const ETH_P_TDLS: ::std::os::raw::c_uint = 35085;
121 pub const ETH_P_FIP: ::std::os::raw::c_uint = 35092;
122 pub const ETH_P_80221: ::std::os::raw::c_uint = 35095;
123 pub const ETH_P_LOOPBACK: ::std::os::raw::c_uint = 36864;
124 pub const ETH_P_QINQ1: ::std::os::raw::c_uint = 37120;
125 pub const ETH_P_QINQ2: ::std::os::raw::c_uint = 37376;
126 pub const ETH_P_QINQ3: ::std::os::raw::c_uint = 37632;
127 pub const ETH_P_EDSA: ::std::os::raw::c_uint = 56026;
128 pub const ETH_P_AF_IUCV: ::std::os::raw::c_uint = 64507;
129 pub const ETH_P_802_3_MIN: ::std::os::raw::c_uint = 1536;
130 pub const ETH_P_802_3: ::std::os::raw::c_uint = 1;
131 pub const ETH_P_AX25: ::std::os::raw::c_uint = 2;
132 pub const ETH_P_ALL: ::std::os::raw::c_uint = 3;
133 pub const ETH_P_802_2: ::std::os::raw::c_uint = 4;
134 pub const ETH_P_SNAP: ::std::os::raw::c_uint = 5;
135 pub const ETH_P_DDCMP: ::std::os::raw::c_uint = 6;
136 pub const ETH_P_WAN_PPP: ::std::os::raw::c_uint = 7;
137 pub const ETH_P_PPP_MP: ::std::os::raw::c_uint = 8;
138 pub const ETH_P_LOCALTALK: ::std::os::raw::c_uint = 9;
139 pub const ETH_P_CAN: ::std::os::raw::c_uint = 12;
140 pub const ETH_P_CANFD: ::std::os::raw::c_uint = 13;
141 pub const ETH_P_PPPTALK: ::std::os::raw::c_uint = 16;
142 pub const ETH_P_TR_802_2: ::std::os::raw::c_uint = 17;
143 pub const ETH_P_MOBITEX: ::std::os::raw::c_uint = 21;
144 pub const ETH_P_CONTROL: ::std::os::raw::c_uint = 22;
145 pub const ETH_P_IRDA: ::std::os::raw::c_uint = 23;
146 pub const ETH_P_ECONET: ::std::os::raw::c_uint = 24;
147 pub const ETH_P_HDLC: ::std::os::raw::c_uint = 25;
148 pub const ETH_P_ARCNET: ::std::os::raw::c_uint = 26;
149 pub const ETH_P_DSA: ::std::os::raw::c_uint = 27;
150 pub const ETH_P_TRAILER: ::std::os::raw::c_uint = 28;
151 pub const ETH_P_PHONET: ::std::os::raw::c_uint = 245;
152 pub const ETH_P_IEEE802154: ::std::os::raw::c_uint = 246;
153 pub const ETH_P_CAIF: ::std::os::raw::c_uint = 247;
154 pub const ETH_P_XDSA: ::std::os::raw::c_uint = 248;
155 pub const VIRTIO_NET_F_CSUM: ::std::os::raw::c_uint = 0;
156 pub const VIRTIO_NET_F_GUEST_CSUM: ::std::os::raw::c_uint = 1;
157 pub const VIRTIO_NET_F_CTRL_GUEST_OFFLOADS: ::std::os::raw::c_uint = 2;
158 pub const VIRTIO_NET_F_MTU: ::std::os::raw::c_uint = 3;
159 pub const VIRTIO_NET_F_MAC: ::std::os::raw::c_uint = 5;
160 pub const VIRTIO_NET_F_GUEST_TSO4: ::std::os::raw::c_uint = 7;
161 pub const VIRTIO_NET_F_GUEST_TSO6: ::std::os::raw::c_uint = 8;
162 pub const VIRTIO_NET_F_GUEST_ECN: ::std::os::raw::c_uint = 9;
163 pub const VIRTIO_NET_F_GUEST_UFO: ::std::os::raw::c_uint = 10;
164 pub const VIRTIO_NET_F_HOST_TSO4: ::std::os::raw::c_uint = 11;
165 pub const VIRTIO_NET_F_HOST_TSO6: ::std::os::raw::c_uint = 12;
166 pub const VIRTIO_NET_F_HOST_ECN: ::std::os::raw::c_uint = 13;
167 pub const VIRTIO_NET_F_HOST_UFO: ::std::os::raw::c_uint = 14;
168 pub const VIRTIO_NET_F_MRG_RXBUF: ::std::os::raw::c_uint = 15;
169 pub const VIRTIO_NET_F_STATUS: ::std::os::raw::c_uint = 16;
170 pub const VIRTIO_NET_F_CTRL_VQ: ::std::os::raw::c_uint = 17;
171 pub const VIRTIO_NET_F_CTRL_RX: ::std::os::raw::c_uint = 18;
172 pub const VIRTIO_NET_F_CTRL_VLAN: ::std::os::raw::c_uint = 19;
173 pub const VIRTIO_NET_F_CTRL_RX_EXTRA: ::std::os::raw::c_uint = 20;
174 pub const VIRTIO_NET_F_GUEST_ANNOUNCE: ::std::os::raw::c_uint = 21;
175 pub const VIRTIO_NET_F_MQ: ::std::os::raw::c_uint = 22;
176 pub const VIRTIO_NET_F_CTRL_MAC_ADDR: ::std::os::raw::c_uint = 23;
177 pub const VIRTIO_NET_F_GSO: ::std::os::raw::c_uint = 6;
178 pub const VIRTIO_NET_S_LINK_UP: ::std::os::raw::c_uint = 1;
179 pub const VIRTIO_NET_S_ANNOUNCE: ::std::os::raw::c_uint = 2;
180 pub const VIRTIO_NET_HDR_F_NEEDS_CSUM: ::std::os::raw::c_uint = 1;
181 pub const VIRTIO_NET_HDR_F_DATA_VALID: ::std::os::raw::c_uint = 2;
182 pub const VIRTIO_NET_HDR_GSO_NONE: ::std::os::raw::c_uint = 0;
183 pub const VIRTIO_NET_HDR_GSO_TCPV4: ::std::os::raw::c_uint = 1;
184 pub const VIRTIO_NET_HDR_GSO_UDP: ::std::os::raw::c_uint = 3;
185 pub const VIRTIO_NET_HDR_GSO_TCPV6: ::std::os::raw::c_uint = 4;
186 pub const VIRTIO_NET_HDR_GSO_ECN: ::std::os::raw::c_uint = 128;
187 pub const VIRTIO_NET_OK: ::std::os::raw::c_uint = 0;
188 pub const VIRTIO_NET_ERR: ::std::os::raw::c_uint = 1;
189 pub const VIRTIO_NET_CTRL_RX: ::std::os::raw::c_uint = 0;
190 pub const VIRTIO_NET_CTRL_RX_PROMISC: ::std::os::raw::c_uint = 0;
191 pub const VIRTIO_NET_CTRL_RX_ALLMULTI: ::std::os::raw::c_uint = 1;
192 pub const VIRTIO_NET_CTRL_RX_ALLUNI: ::std::os::raw::c_uint = 2;
193 pub const VIRTIO_NET_CTRL_RX_NOMULTI: ::std::os::raw::c_uint = 3;
194 pub const VIRTIO_NET_CTRL_RX_NOUNI: ::std::os::raw::c_uint = 4;
195 pub const VIRTIO_NET_CTRL_RX_NOBCAST: ::std::os::raw::c_uint = 5;
196 pub const VIRTIO_NET_CTRL_MAC: ::std::os::raw::c_uint = 1;
197 pub const VIRTIO_NET_CTRL_MAC_TABLE_SET: ::std::os::raw::c_uint = 0;
198 pub const VIRTIO_NET_CTRL_MAC_ADDR_SET: ::std::os::raw::c_uint = 1;
199 pub const VIRTIO_NET_CTRL_VLAN: ::std::os::raw::c_uint = 2;
200 pub const VIRTIO_NET_CTRL_VLAN_ADD: ::std::os::raw::c_uint = 0;
201 pub const VIRTIO_NET_CTRL_VLAN_DEL: ::std::os::raw::c_uint = 1;
202 pub const VIRTIO_NET_CTRL_ANNOUNCE: ::std::os::raw::c_uint = 3;
203 pub const VIRTIO_NET_CTRL_ANNOUNCE_ACK: ::std::os::raw::c_uint = 0;
204 pub const VIRTIO_NET_CTRL_MQ: ::std::os::raw::c_uint = 4;
205 pub const VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET: ::std::os::raw::c_uint = 0;
206 pub const VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MIN: ::std::os::raw::c_uint = 1;
207 pub const VIRTIO_NET_CTRL_MQ_VQ_PAIRS_MAX: ::std::os::raw::c_uint = 32768;
208 pub const VIRTIO_NET_CTRL_GUEST_OFFLOADS: ::std::os::raw::c_uint = 5;
209 pub const VIRTIO_NET_CTRL_GUEST_OFFLOADS_SET: ::std::os::raw::c_uint = 0;
210 pub type __s8 = ::std::os::raw::c_schar;
211 pub type __u8 = ::std::os::raw::c_uchar;
212 pub type __s16 = ::std::os::raw::c_short;
213 pub type __u16 = ::std::os::raw::c_ushort;
214 pub type __s32 = ::std::os::raw::c_int;
215 pub type __u32 = ::std::os::raw::c_uint;
216 pub type __s64 = ::std::os::raw::c_longlong;
217 pub type __u64 = ::std::os::raw::c_ulonglong;
218 #[repr(C)]
219 #[derive(Debug, Copy)]
220 pub struct __kernel_fd_set {
221     pub fds_bits: [::std::os::raw::c_ulong; 16usize],
222 }
223 #[test]
bindgen_test_layout___kernel_fd_set()224 fn bindgen_test_layout___kernel_fd_set() {
225     assert_eq!(
226         ::std::mem::size_of::<__kernel_fd_set>(),
227         128usize,
228         concat!("Size of: ", stringify!(__kernel_fd_set))
229     );
230     assert_eq!(
231         ::std::mem::align_of::<__kernel_fd_set>(),
232         8usize,
233         concat!("Alignment of ", stringify!(__kernel_fd_set))
234     );
235     assert_eq!(
236         unsafe { &(*(0 as *const __kernel_fd_set)).fds_bits as *const _ as usize },
237         0usize,
238         concat!(
239             "Alignment of field: ",
240             stringify!(__kernel_fd_set),
241             "::",
242             stringify!(fds_bits)
243         )
244     );
245 }
246 impl Clone for __kernel_fd_set {
clone(&self) -> Self247     fn clone(&self) -> Self {
248         *self
249     }
250 }
251 pub type __kernel_sighandler_t =
252     ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
253 pub type __kernel_key_t = ::std::os::raw::c_int;
254 pub type __kernel_mqd_t = ::std::os::raw::c_int;
255 pub type __kernel_old_uid_t = ::std::os::raw::c_ushort;
256 pub type __kernel_old_gid_t = ::std::os::raw::c_ushort;
257 pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
258 pub type __kernel_long_t = ::std::os::raw::c_long;
259 pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
260 pub type __kernel_ino_t = __kernel_ulong_t;
261 pub type __kernel_mode_t = ::std::os::raw::c_uint;
262 pub type __kernel_pid_t = ::std::os::raw::c_int;
263 pub type __kernel_ipc_pid_t = ::std::os::raw::c_int;
264 pub type __kernel_uid_t = ::std::os::raw::c_uint;
265 pub type __kernel_gid_t = ::std::os::raw::c_uint;
266 pub type __kernel_suseconds_t = __kernel_long_t;
267 pub type __kernel_daddr_t = ::std::os::raw::c_int;
268 pub type __kernel_uid32_t = ::std::os::raw::c_uint;
269 pub type __kernel_gid32_t = ::std::os::raw::c_uint;
270 pub type __kernel_size_t = __kernel_ulong_t;
271 pub type __kernel_ssize_t = __kernel_long_t;
272 pub type __kernel_ptrdiff_t = __kernel_long_t;
273 #[repr(C)]
274 #[derive(Debug, Copy)]
275 pub struct __kernel_fsid_t {
276     pub val: [::std::os::raw::c_int; 2usize],
277 }
278 #[test]
bindgen_test_layout___kernel_fsid_t()279 fn bindgen_test_layout___kernel_fsid_t() {
280     assert_eq!(
281         ::std::mem::size_of::<__kernel_fsid_t>(),
282         8usize,
283         concat!("Size of: ", stringify!(__kernel_fsid_t))
284     );
285     assert_eq!(
286         ::std::mem::align_of::<__kernel_fsid_t>(),
287         4usize,
288         concat!("Alignment of ", stringify!(__kernel_fsid_t))
289     );
290     assert_eq!(
291         unsafe { &(*(0 as *const __kernel_fsid_t)).val as *const _ as usize },
292         0usize,
293         concat!(
294             "Alignment of field: ",
295             stringify!(__kernel_fsid_t),
296             "::",
297             stringify!(val)
298         )
299     );
300 }
301 impl Clone for __kernel_fsid_t {
clone(&self) -> Self302     fn clone(&self) -> Self {
303         *self
304     }
305 }
306 pub type __kernel_off_t = __kernel_long_t;
307 pub type __kernel_loff_t = ::std::os::raw::c_longlong;
308 pub type __kernel_time_t = __kernel_long_t;
309 pub type __kernel_clock_t = __kernel_long_t;
310 pub type __kernel_timer_t = ::std::os::raw::c_int;
311 pub type __kernel_clockid_t = ::std::os::raw::c_int;
312 pub type __kernel_caddr_t = *mut ::std::os::raw::c_char;
313 pub type __kernel_uid16_t = ::std::os::raw::c_ushort;
314 pub type __kernel_gid16_t = ::std::os::raw::c_ushort;
315 pub type __le16 = __u16;
316 pub type __be16 = __u16;
317 pub type __le32 = __u32;
318 pub type __be32 = __u32;
319 pub type __le64 = __u64;
320 pub type __be64 = __u64;
321 pub type __sum16 = __u16;
322 pub type __wsum = __u32;
323 pub type __virtio16 = __u16;
324 pub type __virtio32 = __u32;
325 pub type __virtio64 = __u64;
326 #[repr(C, packed)]
327 #[derive(Debug, Copy)]
328 pub struct ethhdr {
329     pub h_dest: [::std::os::raw::c_uchar; 6usize],
330     pub h_source: [::std::os::raw::c_uchar; 6usize],
331     pub h_proto: __be16,
332 }
333 #[test]
bindgen_test_layout_ethhdr()334 fn bindgen_test_layout_ethhdr() {
335     assert_eq!(
336         ::std::mem::size_of::<ethhdr>(),
337         14usize,
338         concat!("Size of: ", stringify!(ethhdr))
339     );
340     assert_eq!(
341         ::std::mem::align_of::<ethhdr>(),
342         1usize,
343         concat!("Alignment of ", stringify!(ethhdr))
344     );
345     assert_eq!(
346         unsafe { &(*(0 as *const ethhdr)).h_dest as *const _ as usize },
347         0usize,
348         concat!(
349             "Alignment of field: ",
350             stringify!(ethhdr),
351             "::",
352             stringify!(h_dest)
353         )
354     );
355     assert_eq!(
356         unsafe { &(*(0 as *const ethhdr)).h_source as *const _ as usize },
357         6usize,
358         concat!(
359             "Alignment of field: ",
360             stringify!(ethhdr),
361             "::",
362             stringify!(h_source)
363         )
364     );
365     assert_eq!(
366         unsafe { &(*(0 as *const ethhdr)).h_proto as *const _ as usize },
367         12usize,
368         concat!(
369             "Alignment of field: ",
370             stringify!(ethhdr),
371             "::",
372             stringify!(h_proto)
373         )
374     );
375 }
376 impl Clone for ethhdr {
clone(&self) -> Self377     fn clone(&self) -> Self {
378         *self
379     }
380 }
381 #[repr(C, packed)]
382 #[derive(Debug, Copy)]
383 pub struct virtio_net_config {
384     pub mac: [__u8; 6usize],
385     pub status: __u16,
386     pub max_virtqueue_pairs: __u16,
387     pub mtu: __u16,
388 }
389 #[test]
bindgen_test_layout_virtio_net_config()390 fn bindgen_test_layout_virtio_net_config() {
391     assert_eq!(
392         ::std::mem::size_of::<virtio_net_config>(),
393         12usize,
394         concat!("Size of: ", stringify!(virtio_net_config))
395     );
396     assert_eq!(
397         ::std::mem::align_of::<virtio_net_config>(),
398         1usize,
399         concat!("Alignment of ", stringify!(virtio_net_config))
400     );
401     assert_eq!(
402         unsafe { &(*(0 as *const virtio_net_config)).mac as *const _ as usize },
403         0usize,
404         concat!(
405             "Alignment of field: ",
406             stringify!(virtio_net_config),
407             "::",
408             stringify!(mac)
409         )
410     );
411     assert_eq!(
412         unsafe { &(*(0 as *const virtio_net_config)).status as *const _ as usize },
413         6usize,
414         concat!(
415             "Alignment of field: ",
416             stringify!(virtio_net_config),
417             "::",
418             stringify!(status)
419         )
420     );
421     assert_eq!(
422         unsafe { &(*(0 as *const virtio_net_config)).max_virtqueue_pairs as *const _ as usize },
423         8usize,
424         concat!(
425             "Alignment of field: ",
426             stringify!(virtio_net_config),
427             "::",
428             stringify!(max_virtqueue_pairs)
429         )
430     );
431     assert_eq!(
432         unsafe { &(*(0 as *const virtio_net_config)).mtu as *const _ as usize },
433         10usize,
434         concat!(
435             "Alignment of field: ",
436             stringify!(virtio_net_config),
437             "::",
438             stringify!(mtu)
439         )
440     );
441 }
442 impl Clone for virtio_net_config {
clone(&self) -> Self443     fn clone(&self) -> Self {
444         *self
445     }
446 }
447 #[repr(C)]
448 #[derive(Debug, Copy)]
449 pub struct virtio_net_hdr_v1 {
450     pub flags: __u8,
451     pub gso_type: __u8,
452     pub hdr_len: __virtio16,
453     pub gso_size: __virtio16,
454     pub csum_start: __virtio16,
455     pub csum_offset: __virtio16,
456     pub num_buffers: __virtio16,
457 }
458 #[test]
bindgen_test_layout_virtio_net_hdr_v1()459 fn bindgen_test_layout_virtio_net_hdr_v1() {
460     assert_eq!(
461         ::std::mem::size_of::<virtio_net_hdr_v1>(),
462         12usize,
463         concat!("Size of: ", stringify!(virtio_net_hdr_v1))
464     );
465     assert_eq!(
466         ::std::mem::align_of::<virtio_net_hdr_v1>(),
467         2usize,
468         concat!("Alignment of ", stringify!(virtio_net_hdr_v1))
469     );
470     assert_eq!(
471         unsafe { &(*(0 as *const virtio_net_hdr_v1)).flags as *const _ as usize },
472         0usize,
473         concat!(
474             "Alignment of field: ",
475             stringify!(virtio_net_hdr_v1),
476             "::",
477             stringify!(flags)
478         )
479     );
480     assert_eq!(
481         unsafe { &(*(0 as *const virtio_net_hdr_v1)).gso_type as *const _ as usize },
482         1usize,
483         concat!(
484             "Alignment of field: ",
485             stringify!(virtio_net_hdr_v1),
486             "::",
487             stringify!(gso_type)
488         )
489     );
490     assert_eq!(
491         unsafe { &(*(0 as *const virtio_net_hdr_v1)).hdr_len as *const _ as usize },
492         2usize,
493         concat!(
494             "Alignment of field: ",
495             stringify!(virtio_net_hdr_v1),
496             "::",
497             stringify!(hdr_len)
498         )
499     );
500     assert_eq!(
501         unsafe { &(*(0 as *const virtio_net_hdr_v1)).gso_size as *const _ as usize },
502         4usize,
503         concat!(
504             "Alignment of field: ",
505             stringify!(virtio_net_hdr_v1),
506             "::",
507             stringify!(gso_size)
508         )
509     );
510     assert_eq!(
511         unsafe { &(*(0 as *const virtio_net_hdr_v1)).csum_start as *const _ as usize },
512         6usize,
513         concat!(
514             "Alignment of field: ",
515             stringify!(virtio_net_hdr_v1),
516             "::",
517             stringify!(csum_start)
518         )
519     );
520     assert_eq!(
521         unsafe { &(*(0 as *const virtio_net_hdr_v1)).csum_offset as *const _ as usize },
522         8usize,
523         concat!(
524             "Alignment of field: ",
525             stringify!(virtio_net_hdr_v1),
526             "::",
527             stringify!(csum_offset)
528         )
529     );
530     assert_eq!(
531         unsafe { &(*(0 as *const virtio_net_hdr_v1)).num_buffers as *const _ as usize },
532         10usize,
533         concat!(
534             "Alignment of field: ",
535             stringify!(virtio_net_hdr_v1),
536             "::",
537             stringify!(num_buffers)
538         )
539     );
540 }
541 impl Clone for virtio_net_hdr_v1 {
clone(&self) -> Self542     fn clone(&self) -> Self {
543         *self
544     }
545 }
546 #[repr(C)]
547 #[derive(Debug, Copy)]
548 pub struct virtio_net_hdr {
549     pub flags: __u8,
550     pub gso_type: __u8,
551     pub hdr_len: __virtio16,
552     pub gso_size: __virtio16,
553     pub csum_start: __virtio16,
554     pub csum_offset: __virtio16,
555 }
556 #[test]
bindgen_test_layout_virtio_net_hdr()557 fn bindgen_test_layout_virtio_net_hdr() {
558     assert_eq!(
559         ::std::mem::size_of::<virtio_net_hdr>(),
560         10usize,
561         concat!("Size of: ", stringify!(virtio_net_hdr))
562     );
563     assert_eq!(
564         ::std::mem::align_of::<virtio_net_hdr>(),
565         2usize,
566         concat!("Alignment of ", stringify!(virtio_net_hdr))
567     );
568     assert_eq!(
569         unsafe { &(*(0 as *const virtio_net_hdr)).flags as *const _ as usize },
570         0usize,
571         concat!(
572             "Alignment of field: ",
573             stringify!(virtio_net_hdr),
574             "::",
575             stringify!(flags)
576         )
577     );
578     assert_eq!(
579         unsafe { &(*(0 as *const virtio_net_hdr)).gso_type as *const _ as usize },
580         1usize,
581         concat!(
582             "Alignment of field: ",
583             stringify!(virtio_net_hdr),
584             "::",
585             stringify!(gso_type)
586         )
587     );
588     assert_eq!(
589         unsafe { &(*(0 as *const virtio_net_hdr)).hdr_len as *const _ as usize },
590         2usize,
591         concat!(
592             "Alignment of field: ",
593             stringify!(virtio_net_hdr),
594             "::",
595             stringify!(hdr_len)
596         )
597     );
598     assert_eq!(
599         unsafe { &(*(0 as *const virtio_net_hdr)).gso_size as *const _ as usize },
600         4usize,
601         concat!(
602             "Alignment of field: ",
603             stringify!(virtio_net_hdr),
604             "::",
605             stringify!(gso_size)
606         )
607     );
608     assert_eq!(
609         unsafe { &(*(0 as *const virtio_net_hdr)).csum_start as *const _ as usize },
610         6usize,
611         concat!(
612             "Alignment of field: ",
613             stringify!(virtio_net_hdr),
614             "::",
615             stringify!(csum_start)
616         )
617     );
618     assert_eq!(
619         unsafe { &(*(0 as *const virtio_net_hdr)).csum_offset as *const _ as usize },
620         8usize,
621         concat!(
622             "Alignment of field: ",
623             stringify!(virtio_net_hdr),
624             "::",
625             stringify!(csum_offset)
626         )
627     );
628 }
629 impl Clone for virtio_net_hdr {
clone(&self) -> Self630     fn clone(&self) -> Self {
631         *self
632     }
633 }
634 #[repr(C)]
635 #[derive(Debug, Copy)]
636 pub struct virtio_net_hdr_mrg_rxbuf {
637     pub hdr: virtio_net_hdr,
638     pub num_buffers: __virtio16,
639 }
640 #[test]
bindgen_test_layout_virtio_net_hdr_mrg_rxbuf()641 fn bindgen_test_layout_virtio_net_hdr_mrg_rxbuf() {
642     assert_eq!(
643         ::std::mem::size_of::<virtio_net_hdr_mrg_rxbuf>(),
644         12usize,
645         concat!("Size of: ", stringify!(virtio_net_hdr_mrg_rxbuf))
646     );
647     assert_eq!(
648         ::std::mem::align_of::<virtio_net_hdr_mrg_rxbuf>(),
649         2usize,
650         concat!("Alignment of ", stringify!(virtio_net_hdr_mrg_rxbuf))
651     );
652     assert_eq!(
653         unsafe { &(*(0 as *const virtio_net_hdr_mrg_rxbuf)).hdr as *const _ as usize },
654         0usize,
655         concat!(
656             "Alignment of field: ",
657             stringify!(virtio_net_hdr_mrg_rxbuf),
658             "::",
659             stringify!(hdr)
660         )
661     );
662     assert_eq!(
663         unsafe { &(*(0 as *const virtio_net_hdr_mrg_rxbuf)).num_buffers as *const _ as usize },
664         10usize,
665         concat!(
666             "Alignment of field: ",
667             stringify!(virtio_net_hdr_mrg_rxbuf),
668             "::",
669             stringify!(num_buffers)
670         )
671     );
672 }
673 impl Clone for virtio_net_hdr_mrg_rxbuf {
clone(&self) -> Self674     fn clone(&self) -> Self {
675         *self
676     }
677 }
678 #[repr(C, packed)]
679 #[derive(Debug, Copy)]
680 pub struct virtio_net_ctrl_hdr {
681     pub class: __u8,
682     pub cmd: __u8,
683 }
684 #[test]
bindgen_test_layout_virtio_net_ctrl_hdr()685 fn bindgen_test_layout_virtio_net_ctrl_hdr() {
686     assert_eq!(
687         ::std::mem::size_of::<virtio_net_ctrl_hdr>(),
688         2usize,
689         concat!("Size of: ", stringify!(virtio_net_ctrl_hdr))
690     );
691     assert_eq!(
692         ::std::mem::align_of::<virtio_net_ctrl_hdr>(),
693         1usize,
694         concat!("Alignment of ", stringify!(virtio_net_ctrl_hdr))
695     );
696     assert_eq!(
697         unsafe { &(*(0 as *const virtio_net_ctrl_hdr)).class as *const _ as usize },
698         0usize,
699         concat!(
700             "Alignment of field: ",
701             stringify!(virtio_net_ctrl_hdr),
702             "::",
703             stringify!(class)
704         )
705     );
706     assert_eq!(
707         unsafe { &(*(0 as *const virtio_net_ctrl_hdr)).cmd as *const _ as usize },
708         1usize,
709         concat!(
710             "Alignment of field: ",
711             stringify!(virtio_net_ctrl_hdr),
712             "::",
713             stringify!(cmd)
714         )
715     );
716 }
717 impl Clone for virtio_net_ctrl_hdr {
clone(&self) -> Self718     fn clone(&self) -> Self {
719         *self
720     }
721 }
722 pub type virtio_net_ctrl_ack = __u8;
723 #[repr(C, packed)]
724 #[derive(Debug, Copy)]
725 pub struct virtio_net_ctrl_mac {
726     pub entries: __virtio32,
727     pub macs: __IncompleteArrayField<[__u8; 6usize]>,
728 }
729 #[test]
bindgen_test_layout_virtio_net_ctrl_mac()730 fn bindgen_test_layout_virtio_net_ctrl_mac() {
731     assert_eq!(
732         ::std::mem::size_of::<virtio_net_ctrl_mac>(),
733         4usize,
734         concat!("Size of: ", stringify!(virtio_net_ctrl_mac))
735     );
736     assert_eq!(
737         ::std::mem::align_of::<virtio_net_ctrl_mac>(),
738         1usize,
739         concat!("Alignment of ", stringify!(virtio_net_ctrl_mac))
740     );
741 }
742 impl Clone for virtio_net_ctrl_mac {
clone(&self) -> Self743     fn clone(&self) -> Self {
744         *self
745     }
746 }
747 #[repr(C)]
748 #[derive(Debug, Copy)]
749 pub struct virtio_net_ctrl_mq {
750     pub virtqueue_pairs: __virtio16,
751 }
752 #[test]
bindgen_test_layout_virtio_net_ctrl_mq()753 fn bindgen_test_layout_virtio_net_ctrl_mq() {
754     assert_eq!(
755         ::std::mem::size_of::<virtio_net_ctrl_mq>(),
756         2usize,
757         concat!("Size of: ", stringify!(virtio_net_ctrl_mq))
758     );
759     assert_eq!(
760         ::std::mem::align_of::<virtio_net_ctrl_mq>(),
761         2usize,
762         concat!("Alignment of ", stringify!(virtio_net_ctrl_mq))
763     );
764     assert_eq!(
765         unsafe { &(*(0 as *const virtio_net_ctrl_mq)).virtqueue_pairs as *const _ as usize },
766         0usize,
767         concat!(
768             "Alignment of field: ",
769             stringify!(virtio_net_ctrl_mq),
770             "::",
771             stringify!(virtqueue_pairs)
772         )
773     );
774 }
775 impl Clone for virtio_net_ctrl_mq {
clone(&self) -> Self776     fn clone(&self) -> Self {
777         *self
778     }
779 }
780