1#![allow(dead_code, non_camel_case_types, non_snake_case, non_upper_case_globals)]
4
5pub const _IOC_NRBITS: u32 = 8;
6pub const _IOC_TYPEBITS: u32 = 8;
7pub const _IOC_SIZEBITS: u32 = 14;
8pub const _IOC_DIRBITS: u32 = 2;
9pub const _IOC_NRMASK: u32 = 255;
10pub const _IOC_TYPEMASK: u32 = 255;
11pub const _IOC_SIZEMASK: u32 = 16383;
12pub const _IOC_DIRMASK: u32 = 3;
13pub const _IOC_NRSHIFT: u32 = 0;
14pub const _IOC_TYPESHIFT: u32 = 8;
15pub const _IOC_SIZESHIFT: u32 = 16;
16pub const _IOC_DIRSHIFT: u32 = 30;
17pub const _IOC_NONE: u32 = 0;
18pub const _IOC_WRITE: u32 = 1;
19pub const _IOC_READ: u32 = 2;
20pub const IOC_IN: u32 = 1073741824;
21pub const IOC_OUT: u32 = 2147483648;
22pub const IOC_INOUT: u32 = 3221225472;
23pub const IOCSIZE_MASK: u32 = 1073676288;
24pub const IOCSIZE_SHIFT: u32 = 16;
25pub const __BITS_PER_LONG: u32 = 64;
26pub const __FD_SETSIZE: u32 = 1024;
27pub const PTP_ENABLE_FEATURE: u32 = 1;
28pub const PTP_RISING_EDGE: u32 = 2;
29pub const PTP_FALLING_EDGE: u32 = 4;
30pub const PTP_STRICT_FLAGS: u32 = 8;
31pub const PTP_EXTTS_EDGES: u32 = 6;
32pub const PTP_EXTTS_VALID_FLAGS: u32 = 15;
33pub const PTP_EXTTS_V1_VALID_FLAGS: u32 = 7;
34pub const PTP_PEROUT_ONE_SHOT: u32 = 1;
35pub const PTP_PEROUT_DUTY_CYCLE: u32 = 2;
36pub const PTP_PEROUT_PHASE: u32 = 4;
37pub const PTP_PEROUT_VALID_FLAGS: u32 = 7;
38pub const PTP_PEROUT_V1_VALID_FLAGS: u32 = 0;
39pub const PTP_MAX_SAMPLES: u32 = 25;
40pub const PTP_CLK_MAGIC: u8 = 61u8;
41pub type __s8 = ::std::os::raw::c_schar;
42pub type __u8 = ::std::os::raw::c_uchar;
43pub type __s16 = ::std::os::raw::c_short;
44pub type __u16 = ::std::os::raw::c_ushort;
45pub type __s32 = ::std::os::raw::c_int;
46pub type __u32 = ::std::os::raw::c_uint;
47pub type __s64 = ::std::os::raw::c_longlong;
48pub type __u64 = ::std::os::raw::c_ulonglong;
49#[repr(C)]
50#[derive(Debug, Default, Copy, Clone)]
51pub struct __kernel_fd_set {
52 pub fds_bits: [::std::os::raw::c_ulong; 16usize],
53}
54#[test]
55fn bindgen_test_layout___kernel_fd_set() {
56 const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit();
57 let ptr = UNINIT.as_ptr();
58 assert_eq!(
59 ::std::mem::size_of::<__kernel_fd_set>(),
60 128usize,
61 concat!("Size of: ", stringify!(__kernel_fd_set))
62 );
63 assert_eq!(
64 ::std::mem::align_of::<__kernel_fd_set>(),
65 8usize,
66 concat!("Alignment of ", stringify!(__kernel_fd_set))
67 );
68 assert_eq!(
69 unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize },
70 0usize,
71 concat!(
72 "Offset of field: ",
73 stringify!(__kernel_fd_set),
74 "::",
75 stringify!(fds_bits)
76 )
77 );
78}
79pub type __kernel_sighandler_t =
80 ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
81pub type __kernel_key_t = ::std::os::raw::c_int;
82pub type __kernel_mqd_t = ::std::os::raw::c_int;
83pub type __kernel_old_uid_t = ::std::os::raw::c_ushort;
84pub type __kernel_old_gid_t = ::std::os::raw::c_ushort;
85pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
86pub type __kernel_long_t = ::std::os::raw::c_long;
87pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
88pub type __kernel_ino_t = __kernel_ulong_t;
89pub type __kernel_mode_t = ::std::os::raw::c_uint;
90pub type __kernel_pid_t = ::std::os::raw::c_int;
91pub type __kernel_ipc_pid_t = ::std::os::raw::c_int;
92pub type __kernel_uid_t = ::std::os::raw::c_uint;
93pub type __kernel_gid_t = ::std::os::raw::c_uint;
94pub type __kernel_suseconds_t = __kernel_long_t;
95pub type __kernel_daddr_t = ::std::os::raw::c_int;
96pub type __kernel_uid32_t = ::std::os::raw::c_uint;
97pub type __kernel_gid32_t = ::std::os::raw::c_uint;
98pub type __kernel_size_t = __kernel_ulong_t;
99pub type __kernel_ssize_t = __kernel_long_t;
100pub type __kernel_ptrdiff_t = __kernel_long_t;
101#[repr(C)]
102#[derive(Debug, Default, Copy, Clone)]
103pub struct __kernel_fsid_t {
104 pub val: [::std::os::raw::c_int; 2usize],
105}
106#[test]
107fn bindgen_test_layout___kernel_fsid_t() {
108 const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit();
109 let ptr = UNINIT.as_ptr();
110 assert_eq!(
111 ::std::mem::size_of::<__kernel_fsid_t>(),
112 8usize,
113 concat!("Size of: ", stringify!(__kernel_fsid_t))
114 );
115 assert_eq!(
116 ::std::mem::align_of::<__kernel_fsid_t>(),
117 4usize,
118 concat!("Alignment of ", stringify!(__kernel_fsid_t))
119 );
120 assert_eq!(
121 unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize },
122 0usize,
123 concat!(
124 "Offset of field: ",
125 stringify!(__kernel_fsid_t),
126 "::",
127 stringify!(val)
128 )
129 );
130}
131pub type __kernel_off_t = __kernel_long_t;
132pub type __kernel_loff_t = ::std::os::raw::c_longlong;
133pub type __kernel_old_time_t = __kernel_long_t;
134pub type __kernel_time_t = __kernel_long_t;
135pub type __kernel_time64_t = ::std::os::raw::c_longlong;
136pub type __kernel_clock_t = __kernel_long_t;
137pub type __kernel_timer_t = ::std::os::raw::c_int;
138pub type __kernel_clockid_t = ::std::os::raw::c_int;
139pub type __kernel_caddr_t = *mut ::std::os::raw::c_char;
140pub type __kernel_uid16_t = ::std::os::raw::c_ushort;
141pub type __kernel_gid16_t = ::std::os::raw::c_ushort;
142pub type __s128 = i128;
143pub type __u128 = u128;
144pub type __le16 = __u16;
145pub type __be16 = __u16;
146pub type __le32 = __u32;
147pub type __be32 = __u32;
148pub type __le64 = __u64;
149pub type __be64 = __u64;
150pub type __sum16 = __u16;
151pub type __wsum = __u32;
152pub type __poll_t = ::std::os::raw::c_uint;
153#[repr(C)]
154#[derive(Debug, Default, Copy, Clone)]
155pub struct ptp_clock_time {
156 pub sec: __s64,
157 pub nsec: __u32,
158 pub reserved: __u32,
159}
160#[test]
161fn bindgen_test_layout_ptp_clock_time() {
162 const UNINIT: ::std::mem::MaybeUninit<ptp_clock_time> = ::std::mem::MaybeUninit::uninit();
163 let ptr = UNINIT.as_ptr();
164 assert_eq!(
165 ::std::mem::size_of::<ptp_clock_time>(),
166 16usize,
167 concat!("Size of: ", stringify!(ptp_clock_time))
168 );
169 assert_eq!(
170 ::std::mem::align_of::<ptp_clock_time>(),
171 8usize,
172 concat!("Alignment of ", stringify!(ptp_clock_time))
173 );
174 assert_eq!(
175 unsafe { ::std::ptr::addr_of!((*ptr).sec) as usize - ptr as usize },
176 0usize,
177 concat!(
178 "Offset of field: ",
179 stringify!(ptp_clock_time),
180 "::",
181 stringify!(sec)
182 )
183 );
184 assert_eq!(
185 unsafe { ::std::ptr::addr_of!((*ptr).nsec) as usize - ptr as usize },
186 8usize,
187 concat!(
188 "Offset of field: ",
189 stringify!(ptp_clock_time),
190 "::",
191 stringify!(nsec)
192 )
193 );
194 assert_eq!(
195 unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
196 12usize,
197 concat!(
198 "Offset of field: ",
199 stringify!(ptp_clock_time),
200 "::",
201 stringify!(reserved)
202 )
203 );
204}
205#[repr(C)]
206#[derive(Debug, Default, Copy, Clone)]
207pub struct ptp_clock_caps {
208 pub max_adj: ::std::os::raw::c_int,
209 pub n_alarm: ::std::os::raw::c_int,
210 pub n_ext_ts: ::std::os::raw::c_int,
211 pub n_per_out: ::std::os::raw::c_int,
212 pub pps: ::std::os::raw::c_int,
213 pub n_pins: ::std::os::raw::c_int,
214 pub cross_timestamping: ::std::os::raw::c_int,
215 pub adjust_phase: ::std::os::raw::c_int,
216 pub max_phase_adj: ::std::os::raw::c_int,
217 pub rsv: [::std::os::raw::c_int; 11usize],
218}
219#[test]
220fn bindgen_test_layout_ptp_clock_caps() {
221 const UNINIT: ::std::mem::MaybeUninit<ptp_clock_caps> = ::std::mem::MaybeUninit::uninit();
222 let ptr = UNINIT.as_ptr();
223 assert_eq!(
224 ::std::mem::size_of::<ptp_clock_caps>(),
225 80usize,
226 concat!("Size of: ", stringify!(ptp_clock_caps))
227 );
228 assert_eq!(
229 ::std::mem::align_of::<ptp_clock_caps>(),
230 4usize,
231 concat!("Alignment of ", stringify!(ptp_clock_caps))
232 );
233 assert_eq!(
234 unsafe { ::std::ptr::addr_of!((*ptr).max_adj) as usize - ptr as usize },
235 0usize,
236 concat!(
237 "Offset of field: ",
238 stringify!(ptp_clock_caps),
239 "::",
240 stringify!(max_adj)
241 )
242 );
243 assert_eq!(
244 unsafe { ::std::ptr::addr_of!((*ptr).n_alarm) as usize - ptr as usize },
245 4usize,
246 concat!(
247 "Offset of field: ",
248 stringify!(ptp_clock_caps),
249 "::",
250 stringify!(n_alarm)
251 )
252 );
253 assert_eq!(
254 unsafe { ::std::ptr::addr_of!((*ptr).n_ext_ts) as usize - ptr as usize },
255 8usize,
256 concat!(
257 "Offset of field: ",
258 stringify!(ptp_clock_caps),
259 "::",
260 stringify!(n_ext_ts)
261 )
262 );
263 assert_eq!(
264 unsafe { ::std::ptr::addr_of!((*ptr).n_per_out) as usize - ptr as usize },
265 12usize,
266 concat!(
267 "Offset of field: ",
268 stringify!(ptp_clock_caps),
269 "::",
270 stringify!(n_per_out)
271 )
272 );
273 assert_eq!(
274 unsafe { ::std::ptr::addr_of!((*ptr).pps) as usize - ptr as usize },
275 16usize,
276 concat!(
277 "Offset of field: ",
278 stringify!(ptp_clock_caps),
279 "::",
280 stringify!(pps)
281 )
282 );
283 assert_eq!(
284 unsafe { ::std::ptr::addr_of!((*ptr).n_pins) as usize - ptr as usize },
285 20usize,
286 concat!(
287 "Offset of field: ",
288 stringify!(ptp_clock_caps),
289 "::",
290 stringify!(n_pins)
291 )
292 );
293 assert_eq!(
294 unsafe { ::std::ptr::addr_of!((*ptr).cross_timestamping) as usize - ptr as usize },
295 24usize,
296 concat!(
297 "Offset of field: ",
298 stringify!(ptp_clock_caps),
299 "::",
300 stringify!(cross_timestamping)
301 )
302 );
303 assert_eq!(
304 unsafe { ::std::ptr::addr_of!((*ptr).adjust_phase) as usize - ptr as usize },
305 28usize,
306 concat!(
307 "Offset of field: ",
308 stringify!(ptp_clock_caps),
309 "::",
310 stringify!(adjust_phase)
311 )
312 );
313 assert_eq!(
314 unsafe { ::std::ptr::addr_of!((*ptr).max_phase_adj) as usize - ptr as usize },
315 32usize,
316 concat!(
317 "Offset of field: ",
318 stringify!(ptp_clock_caps),
319 "::",
320 stringify!(max_phase_adj)
321 )
322 );
323 assert_eq!(
324 unsafe { ::std::ptr::addr_of!((*ptr).rsv) as usize - ptr as usize },
325 36usize,
326 concat!(
327 "Offset of field: ",
328 stringify!(ptp_clock_caps),
329 "::",
330 stringify!(rsv)
331 )
332 );
333}
334#[repr(C)]
335#[derive(Debug, Default, Copy, Clone)]
336pub struct ptp_extts_request {
337 pub index: ::std::os::raw::c_uint,
338 pub flags: ::std::os::raw::c_uint,
339 pub rsv: [::std::os::raw::c_uint; 2usize],
340}
341#[test]
342fn bindgen_test_layout_ptp_extts_request() {
343 const UNINIT: ::std::mem::MaybeUninit<ptp_extts_request> = ::std::mem::MaybeUninit::uninit();
344 let ptr = UNINIT.as_ptr();
345 assert_eq!(
346 ::std::mem::size_of::<ptp_extts_request>(),
347 16usize,
348 concat!("Size of: ", stringify!(ptp_extts_request))
349 );
350 assert_eq!(
351 ::std::mem::align_of::<ptp_extts_request>(),
352 4usize,
353 concat!("Alignment of ", stringify!(ptp_extts_request))
354 );
355 assert_eq!(
356 unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize },
357 0usize,
358 concat!(
359 "Offset of field: ",
360 stringify!(ptp_extts_request),
361 "::",
362 stringify!(index)
363 )
364 );
365 assert_eq!(
366 unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
367 4usize,
368 concat!(
369 "Offset of field: ",
370 stringify!(ptp_extts_request),
371 "::",
372 stringify!(flags)
373 )
374 );
375 assert_eq!(
376 unsafe { ::std::ptr::addr_of!((*ptr).rsv) as usize - ptr as usize },
377 8usize,
378 concat!(
379 "Offset of field: ",
380 stringify!(ptp_extts_request),
381 "::",
382 stringify!(rsv)
383 )
384 );
385}
386#[repr(C)]
387#[derive(Copy, Clone)]
388pub struct ptp_perout_request {
389 pub __bindgen_anon_1: ptp_perout_request__bindgen_ty_1,
390 pub period: ptp_clock_time,
391 pub index: ::std::os::raw::c_uint,
392 pub flags: ::std::os::raw::c_uint,
393 pub __bindgen_anon_2: ptp_perout_request__bindgen_ty_2,
394}
395#[repr(C)]
396#[derive(Copy, Clone)]
397pub union ptp_perout_request__bindgen_ty_1 {
398 pub start: ptp_clock_time,
399 pub phase: ptp_clock_time,
400}
401#[test]
402fn bindgen_test_layout_ptp_perout_request__bindgen_ty_1() {
403 const UNINIT: ::std::mem::MaybeUninit<ptp_perout_request__bindgen_ty_1> =
404 ::std::mem::MaybeUninit::uninit();
405 let ptr = UNINIT.as_ptr();
406 assert_eq!(
407 ::std::mem::size_of::<ptp_perout_request__bindgen_ty_1>(),
408 16usize,
409 concat!("Size of: ", stringify!(ptp_perout_request__bindgen_ty_1))
410 );
411 assert_eq!(
412 ::std::mem::align_of::<ptp_perout_request__bindgen_ty_1>(),
413 8usize,
414 concat!(
415 "Alignment of ",
416 stringify!(ptp_perout_request__bindgen_ty_1)
417 )
418 );
419 assert_eq!(
420 unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize },
421 0usize,
422 concat!(
423 "Offset of field: ",
424 stringify!(ptp_perout_request__bindgen_ty_1),
425 "::",
426 stringify!(start)
427 )
428 );
429 assert_eq!(
430 unsafe { ::std::ptr::addr_of!((*ptr).phase) as usize - ptr as usize },
431 0usize,
432 concat!(
433 "Offset of field: ",
434 stringify!(ptp_perout_request__bindgen_ty_1),
435 "::",
436 stringify!(phase)
437 )
438 );
439}
440impl Default for ptp_perout_request__bindgen_ty_1 {
441 fn default() -> Self {
442 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
443 unsafe {
444 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
445 s.assume_init()
446 }
447 }
448}
449#[repr(C)]
450#[derive(Copy, Clone)]
451pub union ptp_perout_request__bindgen_ty_2 {
452 pub on: ptp_clock_time,
453 pub rsv: [::std::os::raw::c_uint; 4usize],
454}
455#[test]
456fn bindgen_test_layout_ptp_perout_request__bindgen_ty_2() {
457 const UNINIT: ::std::mem::MaybeUninit<ptp_perout_request__bindgen_ty_2> =
458 ::std::mem::MaybeUninit::uninit();
459 let ptr = UNINIT.as_ptr();
460 assert_eq!(
461 ::std::mem::size_of::<ptp_perout_request__bindgen_ty_2>(),
462 16usize,
463 concat!("Size of: ", stringify!(ptp_perout_request__bindgen_ty_2))
464 );
465 assert_eq!(
466 ::std::mem::align_of::<ptp_perout_request__bindgen_ty_2>(),
467 8usize,
468 concat!(
469 "Alignment of ",
470 stringify!(ptp_perout_request__bindgen_ty_2)
471 )
472 );
473 assert_eq!(
474 unsafe { ::std::ptr::addr_of!((*ptr).on) as usize - ptr as usize },
475 0usize,
476 concat!(
477 "Offset of field: ",
478 stringify!(ptp_perout_request__bindgen_ty_2),
479 "::",
480 stringify!(on)
481 )
482 );
483 assert_eq!(
484 unsafe { ::std::ptr::addr_of!((*ptr).rsv) as usize - ptr as usize },
485 0usize,
486 concat!(
487 "Offset of field: ",
488 stringify!(ptp_perout_request__bindgen_ty_2),
489 "::",
490 stringify!(rsv)
491 )
492 );
493}
494impl Default for ptp_perout_request__bindgen_ty_2 {
495 fn default() -> Self {
496 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
497 unsafe {
498 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
499 s.assume_init()
500 }
501 }
502}
503#[test]
504fn bindgen_test_layout_ptp_perout_request() {
505 const UNINIT: ::std::mem::MaybeUninit<ptp_perout_request> = ::std::mem::MaybeUninit::uninit();
506 let ptr = UNINIT.as_ptr();
507 assert_eq!(
508 ::std::mem::size_of::<ptp_perout_request>(),
509 56usize,
510 concat!("Size of: ", stringify!(ptp_perout_request))
511 );
512 assert_eq!(
513 ::std::mem::align_of::<ptp_perout_request>(),
514 8usize,
515 concat!("Alignment of ", stringify!(ptp_perout_request))
516 );
517 assert_eq!(
518 unsafe { ::std::ptr::addr_of!((*ptr).period) as usize - ptr as usize },
519 16usize,
520 concat!(
521 "Offset of field: ",
522 stringify!(ptp_perout_request),
523 "::",
524 stringify!(period)
525 )
526 );
527 assert_eq!(
528 unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize },
529 32usize,
530 concat!(
531 "Offset of field: ",
532 stringify!(ptp_perout_request),
533 "::",
534 stringify!(index)
535 )
536 );
537 assert_eq!(
538 unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
539 36usize,
540 concat!(
541 "Offset of field: ",
542 stringify!(ptp_perout_request),
543 "::",
544 stringify!(flags)
545 )
546 );
547}
548impl Default for ptp_perout_request {
549 fn default() -> Self {
550 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
551 unsafe {
552 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
553 s.assume_init()
554 }
555 }
556}
557#[repr(C)]
558#[derive(Debug, Copy, Clone)]
559pub struct ptp_sys_offset {
560 pub n_samples: ::std::os::raw::c_uint,
561 pub rsv: [::std::os::raw::c_uint; 3usize],
562 pub ts: [ptp_clock_time; 51usize],
563}
564#[test]
565fn bindgen_test_layout_ptp_sys_offset() {
566 const UNINIT: ::std::mem::MaybeUninit<ptp_sys_offset> = ::std::mem::MaybeUninit::uninit();
567 let ptr = UNINIT.as_ptr();
568 assert_eq!(
569 ::std::mem::size_of::<ptp_sys_offset>(),
570 832usize,
571 concat!("Size of: ", stringify!(ptp_sys_offset))
572 );
573 assert_eq!(
574 ::std::mem::align_of::<ptp_sys_offset>(),
575 8usize,
576 concat!("Alignment of ", stringify!(ptp_sys_offset))
577 );
578 assert_eq!(
579 unsafe { ::std::ptr::addr_of!((*ptr).n_samples) as usize - ptr as usize },
580 0usize,
581 concat!(
582 "Offset of field: ",
583 stringify!(ptp_sys_offset),
584 "::",
585 stringify!(n_samples)
586 )
587 );
588 assert_eq!(
589 unsafe { ::std::ptr::addr_of!((*ptr).rsv) as usize - ptr as usize },
590 4usize,
591 concat!(
592 "Offset of field: ",
593 stringify!(ptp_sys_offset),
594 "::",
595 stringify!(rsv)
596 )
597 );
598 assert_eq!(
599 unsafe { ::std::ptr::addr_of!((*ptr).ts) as usize - ptr as usize },
600 16usize,
601 concat!(
602 "Offset of field: ",
603 stringify!(ptp_sys_offset),
604 "::",
605 stringify!(ts)
606 )
607 );
608}
609impl Default for ptp_sys_offset {
610 fn default() -> Self {
611 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
612 unsafe {
613 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
614 s.assume_init()
615 }
616 }
617}
618#[repr(C)]
619#[derive(Debug, Default, Copy, Clone)]
620pub struct ptp_sys_offset_extended {
621 pub n_samples: ::std::os::raw::c_uint,
622 pub rsv: [::std::os::raw::c_uint; 3usize],
623 pub ts: [[ptp_clock_time; 3usize]; 25usize],
624}
625#[test]
626fn bindgen_test_layout_ptp_sys_offset_extended() {
627 const UNINIT: ::std::mem::MaybeUninit<ptp_sys_offset_extended> =
628 ::std::mem::MaybeUninit::uninit();
629 let ptr = UNINIT.as_ptr();
630 assert_eq!(
631 ::std::mem::size_of::<ptp_sys_offset_extended>(),
632 1216usize,
633 concat!("Size of: ", stringify!(ptp_sys_offset_extended))
634 );
635 assert_eq!(
636 ::std::mem::align_of::<ptp_sys_offset_extended>(),
637 8usize,
638 concat!("Alignment of ", stringify!(ptp_sys_offset_extended))
639 );
640 assert_eq!(
641 unsafe { ::std::ptr::addr_of!((*ptr).n_samples) as usize - ptr as usize },
642 0usize,
643 concat!(
644 "Offset of field: ",
645 stringify!(ptp_sys_offset_extended),
646 "::",
647 stringify!(n_samples)
648 )
649 );
650 assert_eq!(
651 unsafe { ::std::ptr::addr_of!((*ptr).rsv) as usize - ptr as usize },
652 4usize,
653 concat!(
654 "Offset of field: ",
655 stringify!(ptp_sys_offset_extended),
656 "::",
657 stringify!(rsv)
658 )
659 );
660 assert_eq!(
661 unsafe { ::std::ptr::addr_of!((*ptr).ts) as usize - ptr as usize },
662 16usize,
663 concat!(
664 "Offset of field: ",
665 stringify!(ptp_sys_offset_extended),
666 "::",
667 stringify!(ts)
668 )
669 );
670}
671#[repr(C)]
672#[derive(Debug, Default, Copy, Clone)]
673pub struct ptp_sys_offset_precise {
674 pub device: ptp_clock_time,
675 pub sys_realtime: ptp_clock_time,
676 pub sys_monoraw: ptp_clock_time,
677 pub rsv: [::std::os::raw::c_uint; 4usize],
678}
679#[test]
680fn bindgen_test_layout_ptp_sys_offset_precise() {
681 const UNINIT: ::std::mem::MaybeUninit<ptp_sys_offset_precise> =
682 ::std::mem::MaybeUninit::uninit();
683 let ptr = UNINIT.as_ptr();
684 assert_eq!(
685 ::std::mem::size_of::<ptp_sys_offset_precise>(),
686 64usize,
687 concat!("Size of: ", stringify!(ptp_sys_offset_precise))
688 );
689 assert_eq!(
690 ::std::mem::align_of::<ptp_sys_offset_precise>(),
691 8usize,
692 concat!("Alignment of ", stringify!(ptp_sys_offset_precise))
693 );
694 assert_eq!(
695 unsafe { ::std::ptr::addr_of!((*ptr).device) as usize - ptr as usize },
696 0usize,
697 concat!(
698 "Offset of field: ",
699 stringify!(ptp_sys_offset_precise),
700 "::",
701 stringify!(device)
702 )
703 );
704 assert_eq!(
705 unsafe { ::std::ptr::addr_of!((*ptr).sys_realtime) as usize - ptr as usize },
706 16usize,
707 concat!(
708 "Offset of field: ",
709 stringify!(ptp_sys_offset_precise),
710 "::",
711 stringify!(sys_realtime)
712 )
713 );
714 assert_eq!(
715 unsafe { ::std::ptr::addr_of!((*ptr).sys_monoraw) as usize - ptr as usize },
716 32usize,
717 concat!(
718 "Offset of field: ",
719 stringify!(ptp_sys_offset_precise),
720 "::",
721 stringify!(sys_monoraw)
722 )
723 );
724 assert_eq!(
725 unsafe { ::std::ptr::addr_of!((*ptr).rsv) as usize - ptr as usize },
726 48usize,
727 concat!(
728 "Offset of field: ",
729 stringify!(ptp_sys_offset_precise),
730 "::",
731 stringify!(rsv)
732 )
733 );
734}
735pub const ptp_pin_function_PTP_PF_NONE: ptp_pin_function = 0;
736pub const ptp_pin_function_PTP_PF_EXTTS: ptp_pin_function = 1;
737pub const ptp_pin_function_PTP_PF_PEROUT: ptp_pin_function = 2;
738pub const ptp_pin_function_PTP_PF_PHYSYNC: ptp_pin_function = 3;
739pub type ptp_pin_function = ::std::os::raw::c_uint;
740#[repr(C)]
741#[derive(Debug, Copy, Clone)]
742pub struct ptp_pin_desc {
743 pub name: [::std::os::raw::c_char; 64usize],
744 pub index: ::std::os::raw::c_uint,
745 pub func: ::std::os::raw::c_uint,
746 pub chan: ::std::os::raw::c_uint,
747 pub rsv: [::std::os::raw::c_uint; 5usize],
748}
749#[test]
750fn bindgen_test_layout_ptp_pin_desc() {
751 const UNINIT: ::std::mem::MaybeUninit<ptp_pin_desc> = ::std::mem::MaybeUninit::uninit();
752 let ptr = UNINIT.as_ptr();
753 assert_eq!(
754 ::std::mem::size_of::<ptp_pin_desc>(),
755 96usize,
756 concat!("Size of: ", stringify!(ptp_pin_desc))
757 );
758 assert_eq!(
759 ::std::mem::align_of::<ptp_pin_desc>(),
760 4usize,
761 concat!("Alignment of ", stringify!(ptp_pin_desc))
762 );
763 assert_eq!(
764 unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
765 0usize,
766 concat!(
767 "Offset of field: ",
768 stringify!(ptp_pin_desc),
769 "::",
770 stringify!(name)
771 )
772 );
773 assert_eq!(
774 unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize },
775 64usize,
776 concat!(
777 "Offset of field: ",
778 stringify!(ptp_pin_desc),
779 "::",
780 stringify!(index)
781 )
782 );
783 assert_eq!(
784 unsafe { ::std::ptr::addr_of!((*ptr).func) as usize - ptr as usize },
785 68usize,
786 concat!(
787 "Offset of field: ",
788 stringify!(ptp_pin_desc),
789 "::",
790 stringify!(func)
791 )
792 );
793 assert_eq!(
794 unsafe { ::std::ptr::addr_of!((*ptr).chan) as usize - ptr as usize },
795 72usize,
796 concat!(
797 "Offset of field: ",
798 stringify!(ptp_pin_desc),
799 "::",
800 stringify!(chan)
801 )
802 );
803 assert_eq!(
804 unsafe { ::std::ptr::addr_of!((*ptr).rsv) as usize - ptr as usize },
805 76usize,
806 concat!(
807 "Offset of field: ",
808 stringify!(ptp_pin_desc),
809 "::",
810 stringify!(rsv)
811 )
812 );
813}
814impl Default for ptp_pin_desc {
815 fn default() -> Self {
816 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
817 unsafe {
818 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
819 s.assume_init()
820 }
821 }
822}
823#[repr(C)]
824#[derive(Debug, Default, Copy, Clone)]
825pub struct ptp_extts_event {
826 pub t: ptp_clock_time,
827 pub index: ::std::os::raw::c_uint,
828 pub flags: ::std::os::raw::c_uint,
829 pub rsv: [::std::os::raw::c_uint; 2usize],
830}
831#[test]
832fn bindgen_test_layout_ptp_extts_event() {
833 const UNINIT: ::std::mem::MaybeUninit<ptp_extts_event> = ::std::mem::MaybeUninit::uninit();
834 let ptr = UNINIT.as_ptr();
835 assert_eq!(
836 ::std::mem::size_of::<ptp_extts_event>(),
837 32usize,
838 concat!("Size of: ", stringify!(ptp_extts_event))
839 );
840 assert_eq!(
841 ::std::mem::align_of::<ptp_extts_event>(),
842 8usize,
843 concat!("Alignment of ", stringify!(ptp_extts_event))
844 );
845 assert_eq!(
846 unsafe { ::std::ptr::addr_of!((*ptr).t) as usize - ptr as usize },
847 0usize,
848 concat!(
849 "Offset of field: ",
850 stringify!(ptp_extts_event),
851 "::",
852 stringify!(t)
853 )
854 );
855 assert_eq!(
856 unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize },
857 16usize,
858 concat!(
859 "Offset of field: ",
860 stringify!(ptp_extts_event),
861 "::",
862 stringify!(index)
863 )
864 );
865 assert_eq!(
866 unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
867 20usize,
868 concat!(
869 "Offset of field: ",
870 stringify!(ptp_extts_event),
871 "::",
872 stringify!(flags)
873 )
874 );
875 assert_eq!(
876 unsafe { ::std::ptr::addr_of!((*ptr).rsv) as usize - ptr as usize },
877 24usize,
878 concat!(
879 "Offset of field: ",
880 stringify!(ptp_extts_event),
881 "::",
882 stringify!(rsv)
883 )
884 );
885}