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 pub const __BITS_PER_LONG: ::std::os::raw::c_uint = 64;
8 pub const __FD_SETSIZE: ::std::os::raw::c_uint = 1024;
9 pub const __UAPI_DEF_IN_ADDR: ::std::os::raw::c_uint = 1;
10 pub const __UAPI_DEF_IN_IPPROTO: ::std::os::raw::c_uint = 1;
11 pub const __UAPI_DEF_IN_PKTINFO: ::std::os::raw::c_uint = 1;
12 pub const __UAPI_DEF_IP_MREQ: ::std::os::raw::c_uint = 1;
13 pub const __UAPI_DEF_SOCKADDR_IN: ::std::os::raw::c_uint = 1;
14 pub const __UAPI_DEF_IN_CLASS: ::std::os::raw::c_uint = 1;
15 pub const __UAPI_DEF_IN6_ADDR: ::std::os::raw::c_uint = 1;
16 pub const __UAPI_DEF_IN6_ADDR_ALT: ::std::os::raw::c_uint = 1;
17 pub const __UAPI_DEF_SOCKADDR_IN6: ::std::os::raw::c_uint = 1;
18 pub const __UAPI_DEF_IPV6_MREQ: ::std::os::raw::c_uint = 1;
19 pub const __UAPI_DEF_IPPROTO_V6: ::std::os::raw::c_uint = 1;
20 pub const __UAPI_DEF_IPV6_OPTIONS: ::std::os::raw::c_uint = 1;
21 pub const __UAPI_DEF_IN6_PKTINFO: ::std::os::raw::c_uint = 1;
22 pub const __UAPI_DEF_IP6_MTUINFO: ::std::os::raw::c_uint = 1;
23 pub const __UAPI_DEF_XATTR: ::std::os::raw::c_uint = 1;
24 pub const _K_SS_MAXSIZE: ::std::os::raw::c_uint = 128;
25 pub const IP_TOS: ::std::os::raw::c_uint = 1;
26 pub const IP_TTL: ::std::os::raw::c_uint = 2;
27 pub const IP_HDRINCL: ::std::os::raw::c_uint = 3;
28 pub const IP_OPTIONS: ::std::os::raw::c_uint = 4;
29 pub const IP_ROUTER_ALERT: ::std::os::raw::c_uint = 5;
30 pub const IP_RECVOPTS: ::std::os::raw::c_uint = 6;
31 pub const IP_RETOPTS: ::std::os::raw::c_uint = 7;
32 pub const IP_PKTINFO: ::std::os::raw::c_uint = 8;
33 pub const IP_PKTOPTIONS: ::std::os::raw::c_uint = 9;
34 pub const IP_MTU_DISCOVER: ::std::os::raw::c_uint = 10;
35 pub const IP_RECVERR: ::std::os::raw::c_uint = 11;
36 pub const IP_RECVTTL: ::std::os::raw::c_uint = 12;
37 pub const IP_RECVTOS: ::std::os::raw::c_uint = 13;
38 pub const IP_MTU: ::std::os::raw::c_uint = 14;
39 pub const IP_FREEBIND: ::std::os::raw::c_uint = 15;
40 pub const IP_IPSEC_POLICY: ::std::os::raw::c_uint = 16;
41 pub const IP_XFRM_POLICY: ::std::os::raw::c_uint = 17;
42 pub const IP_PASSSEC: ::std::os::raw::c_uint = 18;
43 pub const IP_TRANSPARENT: ::std::os::raw::c_uint = 19;
44 pub const IP_RECVRETOPTS: ::std::os::raw::c_uint = 7;
45 pub const IP_ORIGDSTADDR: ::std::os::raw::c_uint = 20;
46 pub const IP_RECVORIGDSTADDR: ::std::os::raw::c_uint = 20;
47 pub const IP_MINTTL: ::std::os::raw::c_uint = 21;
48 pub const IP_NODEFRAG: ::std::os::raw::c_uint = 22;
49 pub const IP_CHECKSUM: ::std::os::raw::c_uint = 23;
50 pub const IP_BIND_ADDRESS_NO_PORT: ::std::os::raw::c_uint = 24;
51 pub const IP_RECVFRAGSIZE: ::std::os::raw::c_uint = 25;
52 pub const IP_PMTUDISC_DONT: ::std::os::raw::c_uint = 0;
53 pub const IP_PMTUDISC_WANT: ::std::os::raw::c_uint = 1;
54 pub const IP_PMTUDISC_DO: ::std::os::raw::c_uint = 2;
55 pub const IP_PMTUDISC_PROBE: ::std::os::raw::c_uint = 3;
56 pub const IP_PMTUDISC_INTERFACE: ::std::os::raw::c_uint = 4;
57 pub const IP_PMTUDISC_OMIT: ::std::os::raw::c_uint = 5;
58 pub const IP_MULTICAST_IF: ::std::os::raw::c_uint = 32;
59 pub const IP_MULTICAST_TTL: ::std::os::raw::c_uint = 33;
60 pub const IP_MULTICAST_LOOP: ::std::os::raw::c_uint = 34;
61 pub const IP_ADD_MEMBERSHIP: ::std::os::raw::c_uint = 35;
62 pub const IP_DROP_MEMBERSHIP: ::std::os::raw::c_uint = 36;
63 pub const IP_UNBLOCK_SOURCE: ::std::os::raw::c_uint = 37;
64 pub const IP_BLOCK_SOURCE: ::std::os::raw::c_uint = 38;
65 pub const IP_ADD_SOURCE_MEMBERSHIP: ::std::os::raw::c_uint = 39;
66 pub const IP_DROP_SOURCE_MEMBERSHIP: ::std::os::raw::c_uint = 40;
67 pub const IP_MSFILTER: ::std::os::raw::c_uint = 41;
68 pub const MCAST_JOIN_GROUP: ::std::os::raw::c_uint = 42;
69 pub const MCAST_BLOCK_SOURCE: ::std::os::raw::c_uint = 43;
70 pub const MCAST_UNBLOCK_SOURCE: ::std::os::raw::c_uint = 44;
71 pub const MCAST_LEAVE_GROUP: ::std::os::raw::c_uint = 45;
72 pub const MCAST_JOIN_SOURCE_GROUP: ::std::os::raw::c_uint = 46;
73 pub const MCAST_LEAVE_SOURCE_GROUP: ::std::os::raw::c_uint = 47;
74 pub const MCAST_MSFILTER: ::std::os::raw::c_uint = 48;
75 pub const IP_MULTICAST_ALL: ::std::os::raw::c_uint = 49;
76 pub const IP_UNICAST_IF: ::std::os::raw::c_uint = 50;
77 pub const MCAST_EXCLUDE: ::std::os::raw::c_uint = 0;
78 pub const MCAST_INCLUDE: ::std::os::raw::c_uint = 1;
79 pub const IP_DEFAULT_MULTICAST_TTL: ::std::os::raw::c_uint = 1;
80 pub const IP_DEFAULT_MULTICAST_LOOP: ::std::os::raw::c_uint = 1;
81 pub const __SOCK_SIZE__: ::std::os::raw::c_uint = 16;
82 pub const IN_CLASSA_NET: ::std::os::raw::c_uint = 4278190080;
83 pub const IN_CLASSA_NSHIFT: ::std::os::raw::c_uint = 24;
84 pub const IN_CLASSA_HOST: ::std::os::raw::c_uint = 16777215;
85 pub const IN_CLASSA_MAX: ::std::os::raw::c_uint = 128;
86 pub const IN_CLASSB_NET: ::std::os::raw::c_uint = 4294901760;
87 pub const IN_CLASSB_NSHIFT: ::std::os::raw::c_uint = 16;
88 pub const IN_CLASSB_HOST: ::std::os::raw::c_uint = 65535;
89 pub const IN_CLASSB_MAX: ::std::os::raw::c_uint = 65536;
90 pub const IN_CLASSC_NET: ::std::os::raw::c_uint = 4294967040;
91 pub const IN_CLASSC_NSHIFT: ::std::os::raw::c_uint = 8;
92 pub const IN_CLASSC_HOST: ::std::os::raw::c_uint = 255;
93 pub const IN_MULTICAST_NET: ::std::os::raw::c_uint = 4026531840;
94 pub const IN_LOOPBACKNET: ::std::os::raw::c_uint = 127;
95 pub const INADDR_LOOPBACK: ::std::os::raw::c_uint = 2130706433;
96 pub const INADDR_UNSPEC_GROUP: ::std::os::raw::c_uint = 3758096384;
97 pub const INADDR_ALLHOSTS_GROUP: ::std::os::raw::c_uint = 3758096385;
98 pub const INADDR_ALLRTRS_GROUP: ::std::os::raw::c_uint = 3758096386;
99 pub const INADDR_MAX_LOCAL_GROUP: ::std::os::raw::c_uint = 3758096639;
100 pub const __LITTLE_ENDIAN: ::std::os::raw::c_uint = 1234;
101 pub type __s8 = ::std::os::raw::c_schar;
102 pub type __u8 = ::std::os::raw::c_uchar;
103 pub type __s16 = ::std::os::raw::c_short;
104 pub type __u16 = ::std::os::raw::c_ushort;
105 pub type __s32 = ::std::os::raw::c_int;
106 pub type __u32 = ::std::os::raw::c_uint;
107 pub type __s64 = ::std::os::raw::c_longlong;
108 pub type __u64 = ::std::os::raw::c_ulonglong;
109 #[repr(C)]
110 #[derive(Debug, Default, Copy)]
111 pub struct __kernel_fd_set {
112 pub fds_bits: [::std::os::raw::c_ulong; 16usize],
113 }
114 #[test]
bindgen_test_layout___kernel_fd_set()115 fn bindgen_test_layout___kernel_fd_set() {
116 assert_eq!(
117 ::std::mem::size_of::<__kernel_fd_set>(),
118 128usize,
119 concat!("Size of: ", stringify!(__kernel_fd_set))
120 );
121 assert_eq!(
122 ::std::mem::align_of::<__kernel_fd_set>(),
123 8usize,
124 concat!("Alignment of ", stringify!(__kernel_fd_set))
125 );
126 assert_eq!(
127 unsafe { &(*(0 as *const __kernel_fd_set)).fds_bits as *const _ as usize },
128 0usize,
129 concat!(
130 "Alignment of field: ",
131 stringify!(__kernel_fd_set),
132 "::",
133 stringify!(fds_bits)
134 )
135 );
136 }
137 impl Clone for __kernel_fd_set {
clone(&self) -> Self138 fn clone(&self) -> Self {
139 *self
140 }
141 }
142 pub type __kernel_sighandler_t =
143 ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
144 pub type __kernel_key_t = ::std::os::raw::c_int;
145 pub type __kernel_mqd_t = ::std::os::raw::c_int;
146 pub type __kernel_old_uid_t = ::std::os::raw::c_ushort;
147 pub type __kernel_old_gid_t = ::std::os::raw::c_ushort;
148 pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
149 pub type __kernel_long_t = ::std::os::raw::c_long;
150 pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
151 pub type __kernel_ino_t = __kernel_ulong_t;
152 pub type __kernel_mode_t = ::std::os::raw::c_uint;
153 pub type __kernel_pid_t = ::std::os::raw::c_int;
154 pub type __kernel_ipc_pid_t = ::std::os::raw::c_int;
155 pub type __kernel_uid_t = ::std::os::raw::c_uint;
156 pub type __kernel_gid_t = ::std::os::raw::c_uint;
157 pub type __kernel_suseconds_t = __kernel_long_t;
158 pub type __kernel_daddr_t = ::std::os::raw::c_int;
159 pub type __kernel_uid32_t = ::std::os::raw::c_uint;
160 pub type __kernel_gid32_t = ::std::os::raw::c_uint;
161 pub type __kernel_size_t = __kernel_ulong_t;
162 pub type __kernel_ssize_t = __kernel_long_t;
163 pub type __kernel_ptrdiff_t = __kernel_long_t;
164 #[repr(C)]
165 #[derive(Debug, Default, Copy)]
166 pub struct __kernel_fsid_t {
167 pub val: [::std::os::raw::c_int; 2usize],
168 }
169 #[test]
bindgen_test_layout___kernel_fsid_t()170 fn bindgen_test_layout___kernel_fsid_t() {
171 assert_eq!(
172 ::std::mem::size_of::<__kernel_fsid_t>(),
173 8usize,
174 concat!("Size of: ", stringify!(__kernel_fsid_t))
175 );
176 assert_eq!(
177 ::std::mem::align_of::<__kernel_fsid_t>(),
178 4usize,
179 concat!("Alignment of ", stringify!(__kernel_fsid_t))
180 );
181 assert_eq!(
182 unsafe { &(*(0 as *const __kernel_fsid_t)).val as *const _ as usize },
183 0usize,
184 concat!(
185 "Alignment of field: ",
186 stringify!(__kernel_fsid_t),
187 "::",
188 stringify!(val)
189 )
190 );
191 }
192 impl Clone for __kernel_fsid_t {
clone(&self) -> Self193 fn clone(&self) -> Self {
194 *self
195 }
196 }
197 pub type __kernel_off_t = __kernel_long_t;
198 pub type __kernel_loff_t = ::std::os::raw::c_longlong;
199 pub type __kernel_time_t = __kernel_long_t;
200 pub type __kernel_clock_t = __kernel_long_t;
201 pub type __kernel_timer_t = ::std::os::raw::c_int;
202 pub type __kernel_clockid_t = ::std::os::raw::c_int;
203 pub type __kernel_caddr_t = *mut ::std::os::raw::c_char;
204 pub type __kernel_uid16_t = ::std::os::raw::c_ushort;
205 pub type __kernel_gid16_t = ::std::os::raw::c_ushort;
206 pub type __le16 = __u16;
207 pub type __be16 = __u16;
208 pub type __le32 = __u32;
209 pub type __be32 = __u32;
210 pub type __le64 = __u64;
211 pub type __be64 = __u64;
212 pub type __sum16 = __u16;
213 pub type __wsum = __u32;
214 pub type __kernel_sa_family_t = ::std::os::raw::c_ushort;
215 #[repr(C)]
216 pub struct __kernel_sockaddr_storage {
217 pub ss_family: __kernel_sa_family_t,
218 pub __data: [::std::os::raw::c_char; 126usize],
219 pub __bindgen_align: [u64; 0usize],
220 }
221 #[test]
bindgen_test_layout___kernel_sockaddr_storage()222 fn bindgen_test_layout___kernel_sockaddr_storage() {
223 assert_eq!(
224 ::std::mem::size_of::<__kernel_sockaddr_storage>(),
225 128usize,
226 concat!("Size of: ", stringify!(__kernel_sockaddr_storage))
227 );
228 assert_eq!(
229 ::std::mem::align_of::<__kernel_sockaddr_storage>(),
230 8usize,
231 concat!("Alignment of ", stringify!(__kernel_sockaddr_storage))
232 );
233 assert_eq!(
234 unsafe { &(*(0 as *const __kernel_sockaddr_storage)).ss_family as *const _ as usize },
235 0usize,
236 concat!(
237 "Alignment of field: ",
238 stringify!(__kernel_sockaddr_storage),
239 "::",
240 stringify!(ss_family)
241 )
242 );
243 assert_eq!(
244 unsafe { &(*(0 as *const __kernel_sockaddr_storage)).__data as *const _ as usize },
245 2usize,
246 concat!(
247 "Alignment of field: ",
248 stringify!(__kernel_sockaddr_storage),
249 "::",
250 stringify!(__data)
251 )
252 );
253 }
254 impl Default for __kernel_sockaddr_storage {
default() -> Self255 fn default() -> Self {
256 unsafe { ::std::mem::zeroed() }
257 }
258 }
259 pub const IPPROTO_IP: _bindgen_ty_1 = 0;
260 pub const IPPROTO_ICMP: _bindgen_ty_1 = 1;
261 pub const IPPROTO_IGMP: _bindgen_ty_1 = 2;
262 pub const IPPROTO_IPIP: _bindgen_ty_1 = 4;
263 pub const IPPROTO_TCP: _bindgen_ty_1 = 6;
264 pub const IPPROTO_EGP: _bindgen_ty_1 = 8;
265 pub const IPPROTO_PUP: _bindgen_ty_1 = 12;
266 pub const IPPROTO_UDP: _bindgen_ty_1 = 17;
267 pub const IPPROTO_IDP: _bindgen_ty_1 = 22;
268 pub const IPPROTO_TP: _bindgen_ty_1 = 29;
269 pub const IPPROTO_DCCP: _bindgen_ty_1 = 33;
270 pub const IPPROTO_IPV6: _bindgen_ty_1 = 41;
271 pub const IPPROTO_RSVP: _bindgen_ty_1 = 46;
272 pub const IPPROTO_GRE: _bindgen_ty_1 = 47;
273 pub const IPPROTO_ESP: _bindgen_ty_1 = 50;
274 pub const IPPROTO_AH: _bindgen_ty_1 = 51;
275 pub const IPPROTO_MTP: _bindgen_ty_1 = 92;
276 pub const IPPROTO_BEETPH: _bindgen_ty_1 = 94;
277 pub const IPPROTO_ENCAP: _bindgen_ty_1 = 98;
278 pub const IPPROTO_PIM: _bindgen_ty_1 = 103;
279 pub const IPPROTO_COMP: _bindgen_ty_1 = 108;
280 pub const IPPROTO_SCTP: _bindgen_ty_1 = 132;
281 pub const IPPROTO_UDPLITE: _bindgen_ty_1 = 136;
282 pub const IPPROTO_MPLS: _bindgen_ty_1 = 137;
283 pub const IPPROTO_RAW: _bindgen_ty_1 = 255;
284 pub const IPPROTO_MAX: _bindgen_ty_1 = 256;
285 pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
286 #[repr(C)]
287 #[derive(Debug, Default, Copy)]
288 pub struct in_addr {
289 pub s_addr: __be32,
290 }
291 #[test]
bindgen_test_layout_in_addr()292 fn bindgen_test_layout_in_addr() {
293 assert_eq!(
294 ::std::mem::size_of::<in_addr>(),
295 4usize,
296 concat!("Size of: ", stringify!(in_addr))
297 );
298 assert_eq!(
299 ::std::mem::align_of::<in_addr>(),
300 4usize,
301 concat!("Alignment of ", stringify!(in_addr))
302 );
303 assert_eq!(
304 unsafe { &(*(0 as *const in_addr)).s_addr as *const _ as usize },
305 0usize,
306 concat!(
307 "Alignment of field: ",
308 stringify!(in_addr),
309 "::",
310 stringify!(s_addr)
311 )
312 );
313 }
314 impl Clone for in_addr {
clone(&self) -> Self315 fn clone(&self) -> Self {
316 *self
317 }
318 }
319 #[repr(C)]
320 #[derive(Debug, Default, Copy)]
321 pub struct ip_mreq {
322 pub imr_multiaddr: in_addr,
323 pub imr_interface: in_addr,
324 }
325 #[test]
bindgen_test_layout_ip_mreq()326 fn bindgen_test_layout_ip_mreq() {
327 assert_eq!(
328 ::std::mem::size_of::<ip_mreq>(),
329 8usize,
330 concat!("Size of: ", stringify!(ip_mreq))
331 );
332 assert_eq!(
333 ::std::mem::align_of::<ip_mreq>(),
334 4usize,
335 concat!("Alignment of ", stringify!(ip_mreq))
336 );
337 assert_eq!(
338 unsafe { &(*(0 as *const ip_mreq)).imr_multiaddr as *const _ as usize },
339 0usize,
340 concat!(
341 "Alignment of field: ",
342 stringify!(ip_mreq),
343 "::",
344 stringify!(imr_multiaddr)
345 )
346 );
347 assert_eq!(
348 unsafe { &(*(0 as *const ip_mreq)).imr_interface as *const _ as usize },
349 4usize,
350 concat!(
351 "Alignment of field: ",
352 stringify!(ip_mreq),
353 "::",
354 stringify!(imr_interface)
355 )
356 );
357 }
358 impl Clone for ip_mreq {
clone(&self) -> Self359 fn clone(&self) -> Self {
360 *self
361 }
362 }
363 #[repr(C)]
364 #[derive(Debug, Default, Copy)]
365 pub struct ip_mreqn {
366 pub imr_multiaddr: in_addr,
367 pub imr_address: in_addr,
368 pub imr_ifindex: ::std::os::raw::c_int,
369 }
370 #[test]
bindgen_test_layout_ip_mreqn()371 fn bindgen_test_layout_ip_mreqn() {
372 assert_eq!(
373 ::std::mem::size_of::<ip_mreqn>(),
374 12usize,
375 concat!("Size of: ", stringify!(ip_mreqn))
376 );
377 assert_eq!(
378 ::std::mem::align_of::<ip_mreqn>(),
379 4usize,
380 concat!("Alignment of ", stringify!(ip_mreqn))
381 );
382 assert_eq!(
383 unsafe { &(*(0 as *const ip_mreqn)).imr_multiaddr as *const _ as usize },
384 0usize,
385 concat!(
386 "Alignment of field: ",
387 stringify!(ip_mreqn),
388 "::",
389 stringify!(imr_multiaddr)
390 )
391 );
392 assert_eq!(
393 unsafe { &(*(0 as *const ip_mreqn)).imr_address as *const _ as usize },
394 4usize,
395 concat!(
396 "Alignment of field: ",
397 stringify!(ip_mreqn),
398 "::",
399 stringify!(imr_address)
400 )
401 );
402 assert_eq!(
403 unsafe { &(*(0 as *const ip_mreqn)).imr_ifindex as *const _ as usize },
404 8usize,
405 concat!(
406 "Alignment of field: ",
407 stringify!(ip_mreqn),
408 "::",
409 stringify!(imr_ifindex)
410 )
411 );
412 }
413 impl Clone for ip_mreqn {
clone(&self) -> Self414 fn clone(&self) -> Self {
415 *self
416 }
417 }
418 #[repr(C)]
419 #[derive(Debug, Default, Copy)]
420 pub struct ip_mreq_source {
421 pub imr_multiaddr: __be32,
422 pub imr_interface: __be32,
423 pub imr_sourceaddr: __be32,
424 }
425 #[test]
bindgen_test_layout_ip_mreq_source()426 fn bindgen_test_layout_ip_mreq_source() {
427 assert_eq!(
428 ::std::mem::size_of::<ip_mreq_source>(),
429 12usize,
430 concat!("Size of: ", stringify!(ip_mreq_source))
431 );
432 assert_eq!(
433 ::std::mem::align_of::<ip_mreq_source>(),
434 4usize,
435 concat!("Alignment of ", stringify!(ip_mreq_source))
436 );
437 assert_eq!(
438 unsafe { &(*(0 as *const ip_mreq_source)).imr_multiaddr as *const _ as usize },
439 0usize,
440 concat!(
441 "Alignment of field: ",
442 stringify!(ip_mreq_source),
443 "::",
444 stringify!(imr_multiaddr)
445 )
446 );
447 assert_eq!(
448 unsafe { &(*(0 as *const ip_mreq_source)).imr_interface as *const _ as usize },
449 4usize,
450 concat!(
451 "Alignment of field: ",
452 stringify!(ip_mreq_source),
453 "::",
454 stringify!(imr_interface)
455 )
456 );
457 assert_eq!(
458 unsafe { &(*(0 as *const ip_mreq_source)).imr_sourceaddr as *const _ as usize },
459 8usize,
460 concat!(
461 "Alignment of field: ",
462 stringify!(ip_mreq_source),
463 "::",
464 stringify!(imr_sourceaddr)
465 )
466 );
467 }
468 impl Clone for ip_mreq_source {
clone(&self) -> Self469 fn clone(&self) -> Self {
470 *self
471 }
472 }
473 #[repr(C)]
474 #[derive(Debug, Default, Copy)]
475 pub struct ip_msfilter {
476 pub imsf_multiaddr: __be32,
477 pub imsf_interface: __be32,
478 pub imsf_fmode: __u32,
479 pub imsf_numsrc: __u32,
480 pub imsf_slist: [__be32; 1usize],
481 }
482 #[test]
bindgen_test_layout_ip_msfilter()483 fn bindgen_test_layout_ip_msfilter() {
484 assert_eq!(
485 ::std::mem::size_of::<ip_msfilter>(),
486 20usize,
487 concat!("Size of: ", stringify!(ip_msfilter))
488 );
489 assert_eq!(
490 ::std::mem::align_of::<ip_msfilter>(),
491 4usize,
492 concat!("Alignment of ", stringify!(ip_msfilter))
493 );
494 assert_eq!(
495 unsafe { &(*(0 as *const ip_msfilter)).imsf_multiaddr as *const _ as usize },
496 0usize,
497 concat!(
498 "Alignment of field: ",
499 stringify!(ip_msfilter),
500 "::",
501 stringify!(imsf_multiaddr)
502 )
503 );
504 assert_eq!(
505 unsafe { &(*(0 as *const ip_msfilter)).imsf_interface as *const _ as usize },
506 4usize,
507 concat!(
508 "Alignment of field: ",
509 stringify!(ip_msfilter),
510 "::",
511 stringify!(imsf_interface)
512 )
513 );
514 assert_eq!(
515 unsafe { &(*(0 as *const ip_msfilter)).imsf_fmode as *const _ as usize },
516 8usize,
517 concat!(
518 "Alignment of field: ",
519 stringify!(ip_msfilter),
520 "::",
521 stringify!(imsf_fmode)
522 )
523 );
524 assert_eq!(
525 unsafe { &(*(0 as *const ip_msfilter)).imsf_numsrc as *const _ as usize },
526 12usize,
527 concat!(
528 "Alignment of field: ",
529 stringify!(ip_msfilter),
530 "::",
531 stringify!(imsf_numsrc)
532 )
533 );
534 assert_eq!(
535 unsafe { &(*(0 as *const ip_msfilter)).imsf_slist as *const _ as usize },
536 16usize,
537 concat!(
538 "Alignment of field: ",
539 stringify!(ip_msfilter),
540 "::",
541 stringify!(imsf_slist)
542 )
543 );
544 }
545 impl Clone for ip_msfilter {
clone(&self) -> Self546 fn clone(&self) -> Self {
547 *self
548 }
549 }
550 #[repr(C)]
551 pub struct group_req {
552 pub gr_interface: __u32,
553 pub gr_group: __kernel_sockaddr_storage,
554 }
555 #[test]
bindgen_test_layout_group_req()556 fn bindgen_test_layout_group_req() {
557 assert_eq!(
558 ::std::mem::size_of::<group_req>(),
559 136usize,
560 concat!("Size of: ", stringify!(group_req))
561 );
562 assert_eq!(
563 ::std::mem::align_of::<group_req>(),
564 8usize,
565 concat!("Alignment of ", stringify!(group_req))
566 );
567 assert_eq!(
568 unsafe { &(*(0 as *const group_req)).gr_interface as *const _ as usize },
569 0usize,
570 concat!(
571 "Alignment of field: ",
572 stringify!(group_req),
573 "::",
574 stringify!(gr_interface)
575 )
576 );
577 assert_eq!(
578 unsafe { &(*(0 as *const group_req)).gr_group as *const _ as usize },
579 8usize,
580 concat!(
581 "Alignment of field: ",
582 stringify!(group_req),
583 "::",
584 stringify!(gr_group)
585 )
586 );
587 }
588 impl Default for group_req {
default() -> Self589 fn default() -> Self {
590 unsafe { ::std::mem::zeroed() }
591 }
592 }
593 #[repr(C)]
594 pub struct group_source_req {
595 pub gsr_interface: __u32,
596 pub gsr_group: __kernel_sockaddr_storage,
597 pub gsr_source: __kernel_sockaddr_storage,
598 }
599 #[test]
bindgen_test_layout_group_source_req()600 fn bindgen_test_layout_group_source_req() {
601 assert_eq!(
602 ::std::mem::size_of::<group_source_req>(),
603 264usize,
604 concat!("Size of: ", stringify!(group_source_req))
605 );
606 assert_eq!(
607 ::std::mem::align_of::<group_source_req>(),
608 8usize,
609 concat!("Alignment of ", stringify!(group_source_req))
610 );
611 assert_eq!(
612 unsafe { &(*(0 as *const group_source_req)).gsr_interface as *const _ as usize },
613 0usize,
614 concat!(
615 "Alignment of field: ",
616 stringify!(group_source_req),
617 "::",
618 stringify!(gsr_interface)
619 )
620 );
621 assert_eq!(
622 unsafe { &(*(0 as *const group_source_req)).gsr_group as *const _ as usize },
623 8usize,
624 concat!(
625 "Alignment of field: ",
626 stringify!(group_source_req),
627 "::",
628 stringify!(gsr_group)
629 )
630 );
631 assert_eq!(
632 unsafe { &(*(0 as *const group_source_req)).gsr_source as *const _ as usize },
633 136usize,
634 concat!(
635 "Alignment of field: ",
636 stringify!(group_source_req),
637 "::",
638 stringify!(gsr_source)
639 )
640 );
641 }
642 impl Default for group_source_req {
default() -> Self643 fn default() -> Self {
644 unsafe { ::std::mem::zeroed() }
645 }
646 }
647 #[repr(C)]
648 pub struct group_filter {
649 pub gf_interface: __u32,
650 pub gf_group: __kernel_sockaddr_storage,
651 pub gf_fmode: __u32,
652 pub gf_numsrc: __u32,
653 pub gf_slist: [__kernel_sockaddr_storage; 1usize],
654 }
655 #[test]
bindgen_test_layout_group_filter()656 fn bindgen_test_layout_group_filter() {
657 assert_eq!(
658 ::std::mem::size_of::<group_filter>(),
659 272usize,
660 concat!("Size of: ", stringify!(group_filter))
661 );
662 assert_eq!(
663 ::std::mem::align_of::<group_filter>(),
664 8usize,
665 concat!("Alignment of ", stringify!(group_filter))
666 );
667 assert_eq!(
668 unsafe { &(*(0 as *const group_filter)).gf_interface as *const _ as usize },
669 0usize,
670 concat!(
671 "Alignment of field: ",
672 stringify!(group_filter),
673 "::",
674 stringify!(gf_interface)
675 )
676 );
677 assert_eq!(
678 unsafe { &(*(0 as *const group_filter)).gf_group as *const _ as usize },
679 8usize,
680 concat!(
681 "Alignment of field: ",
682 stringify!(group_filter),
683 "::",
684 stringify!(gf_group)
685 )
686 );
687 assert_eq!(
688 unsafe { &(*(0 as *const group_filter)).gf_fmode as *const _ as usize },
689 136usize,
690 concat!(
691 "Alignment of field: ",
692 stringify!(group_filter),
693 "::",
694 stringify!(gf_fmode)
695 )
696 );
697 assert_eq!(
698 unsafe { &(*(0 as *const group_filter)).gf_numsrc as *const _ as usize },
699 140usize,
700 concat!(
701 "Alignment of field: ",
702 stringify!(group_filter),
703 "::",
704 stringify!(gf_numsrc)
705 )
706 );
707 assert_eq!(
708 unsafe { &(*(0 as *const group_filter)).gf_slist as *const _ as usize },
709 144usize,
710 concat!(
711 "Alignment of field: ",
712 stringify!(group_filter),
713 "::",
714 stringify!(gf_slist)
715 )
716 );
717 }
718 impl Default for group_filter {
default() -> Self719 fn default() -> Self {
720 unsafe { ::std::mem::zeroed() }
721 }
722 }
723 #[repr(C)]
724 #[derive(Debug, Default, Copy)]
725 pub struct in_pktinfo {
726 pub ipi_ifindex: ::std::os::raw::c_int,
727 pub ipi_spec_dst: in_addr,
728 pub ipi_addr: in_addr,
729 }
730 #[test]
bindgen_test_layout_in_pktinfo()731 fn bindgen_test_layout_in_pktinfo() {
732 assert_eq!(
733 ::std::mem::size_of::<in_pktinfo>(),
734 12usize,
735 concat!("Size of: ", stringify!(in_pktinfo))
736 );
737 assert_eq!(
738 ::std::mem::align_of::<in_pktinfo>(),
739 4usize,
740 concat!("Alignment of ", stringify!(in_pktinfo))
741 );
742 assert_eq!(
743 unsafe { &(*(0 as *const in_pktinfo)).ipi_ifindex as *const _ as usize },
744 0usize,
745 concat!(
746 "Alignment of field: ",
747 stringify!(in_pktinfo),
748 "::",
749 stringify!(ipi_ifindex)
750 )
751 );
752 assert_eq!(
753 unsafe { &(*(0 as *const in_pktinfo)).ipi_spec_dst as *const _ as usize },
754 4usize,
755 concat!(
756 "Alignment of field: ",
757 stringify!(in_pktinfo),
758 "::",
759 stringify!(ipi_spec_dst)
760 )
761 );
762 assert_eq!(
763 unsafe { &(*(0 as *const in_pktinfo)).ipi_addr as *const _ as usize },
764 8usize,
765 concat!(
766 "Alignment of field: ",
767 stringify!(in_pktinfo),
768 "::",
769 stringify!(ipi_addr)
770 )
771 );
772 }
773 impl Clone for in_pktinfo {
clone(&self) -> Self774 fn clone(&self) -> Self {
775 *self
776 }
777 }
778 #[repr(C)]
779 #[derive(Debug, Default, Copy)]
780 pub struct sockaddr_in {
781 pub sin_family: __kernel_sa_family_t,
782 pub sin_port: __be16,
783 pub sin_addr: in_addr,
784 pub __pad: [::std::os::raw::c_uchar; 8usize],
785 }
786 #[test]
bindgen_test_layout_sockaddr_in()787 fn bindgen_test_layout_sockaddr_in() {
788 assert_eq!(
789 ::std::mem::size_of::<sockaddr_in>(),
790 16usize,
791 concat!("Size of: ", stringify!(sockaddr_in))
792 );
793 assert_eq!(
794 ::std::mem::align_of::<sockaddr_in>(),
795 4usize,
796 concat!("Alignment of ", stringify!(sockaddr_in))
797 );
798 assert_eq!(
799 unsafe { &(*(0 as *const sockaddr_in)).sin_family as *const _ as usize },
800 0usize,
801 concat!(
802 "Alignment of field: ",
803 stringify!(sockaddr_in),
804 "::",
805 stringify!(sin_family)
806 )
807 );
808 assert_eq!(
809 unsafe { &(*(0 as *const sockaddr_in)).sin_port as *const _ as usize },
810 2usize,
811 concat!(
812 "Alignment of field: ",
813 stringify!(sockaddr_in),
814 "::",
815 stringify!(sin_port)
816 )
817 );
818 assert_eq!(
819 unsafe { &(*(0 as *const sockaddr_in)).sin_addr as *const _ as usize },
820 4usize,
821 concat!(
822 "Alignment of field: ",
823 stringify!(sockaddr_in),
824 "::",
825 stringify!(sin_addr)
826 )
827 );
828 assert_eq!(
829 unsafe { &(*(0 as *const sockaddr_in)).__pad as *const _ as usize },
830 8usize,
831 concat!(
832 "Alignment of field: ",
833 stringify!(sockaddr_in),
834 "::",
835 stringify!(__pad)
836 )
837 );
838 }
839 impl Clone for sockaddr_in {
clone(&self) -> Self840 fn clone(&self) -> Self {
841 *self
842 }
843 }
844