@@ -650,6 +650,67 @@ s! {
650
650
pub val: :: c_int,
651
651
}
652
652
653
+ // linux/ptp_clock.h
654
+ pub struct ptp_clock_time {
655
+ pub sec: :: __s64,
656
+ pub nsec: :: __u32,
657
+ pub reserved: :: __u32,
658
+ }
659
+
660
+ pub struct ptp_clock_caps {
661
+ pub max_adj: :: c_int,
662
+ pub n_alarm: :: c_int,
663
+ pub n_ext_ts: :: c_int,
664
+ pub n_per_out: :: c_int,
665
+ pub pps: :: c_int,
666
+ pub n_pins: :: c_int,
667
+ pub cross_timestamping: :: c_int,
668
+ pub adjust_phase: :: c_int,
669
+ pub max_phase_adj: :: c_int,
670
+ pub rsv: [ :: c_int; 11 ] ,
671
+ }
672
+
673
+ pub struct ptp_extts_request {
674
+ pub index: :: c_uint,
675
+ pub flags: :: c_uint,
676
+ pub rsv: [ :: c_uint; 2 ] ,
677
+ }
678
+
679
+
680
+ pub struct ptp_sys_offset {
681
+ pub n_samples: :: c_uint,
682
+ pub rsv: [ :: c_uint; 3 ] ,
683
+ pub ts: [ ptp_clock_time; 51 ] ,
684
+ }
685
+
686
+ pub struct ptp_sys_offset_extended {
687
+ pub n_samples: :: c_uint,
688
+ pub rsv: [ :: c_uint; 3 ] ,
689
+ pub ts: [ [ ptp_clock_time; 3 ] ; 25 ] ,
690
+ }
691
+
692
+ pub struct ptp_sys_offset_precise {
693
+ pub device: ptp_clock_time,
694
+ pub sys_realtime: ptp_clock_time,
695
+ pub sys_monoraw: ptp_clock_time,
696
+ pub rsv: [ :: c_uint; 4 ] ,
697
+ }
698
+
699
+ pub struct ptp_pin_desc {
700
+ pub name: [ :: c_char; 64 ] ,
701
+ pub index: :: c_uint,
702
+ pub func: :: c_uint,
703
+ pub chan: :: c_uint,
704
+ pub rsv: [ :: c_uint; 5 ] ,
705
+ }
706
+
707
+ pub struct ptp_extts_event {
708
+ pub t: ptp_clock_time,
709
+ index: :: c_uint,
710
+ flags: :: c_uint,
711
+ rsv: [ :: c_uint; 2 ] ,
712
+ }
713
+
653
714
// linux/sctp.h
654
715
655
716
pub struct sctp_initmsg {
@@ -889,6 +950,7 @@ s_no_extra_traits! {
889
950
pub sched_deadline: :: __u64,
890
951
pub sched_period: :: __u64,
891
952
}
953
+
892
954
}
893
955
894
956
s_no_extra_traits ! {
@@ -920,6 +982,34 @@ cfg_if! {
920
982
}
921
983
}
922
984
985
+ cfg_if ! {
986
+ if #[ cfg( libc_union) ] {
987
+ s_no_extra_traits! {
988
+ // linux/ptp_clock.h
989
+ #[ allow( missing_debug_implementations) ]
990
+ pub union __c_anonymous_ptp_perout_request_1 {
991
+ pub start: ptp_clock_time,
992
+ pub phase: ptp_clock_time,
993
+ }
994
+
995
+ #[ allow( missing_debug_implementations) ]
996
+ pub union __c_anonymous_ptp_perout_request_2 {
997
+ pub on: ptp_clock_time,
998
+ pub rsv: [ :: c_uint; 4 ] ,
999
+ }
1000
+
1001
+ #[ allow( missing_debug_implementations) ]
1002
+ pub struct ptp_perout_request {
1003
+ pub anonymous_1: __c_anonymous_ptp_perout_request_1,
1004
+ pub period: ptp_clock_time,
1005
+ pub index: :: c_uint,
1006
+ pub flags: :: c_uint,
1007
+ pub anonymous_2: __c_anonymous_ptp_perout_request_2,
1008
+ }
1009
+ }
1010
+ }
1011
+ }
1012
+
923
1013
cfg_if ! {
924
1014
if #[ cfg( feature = "extra_traits" ) ] {
925
1015
impl PartialEq for sockaddr_nl {
@@ -3638,6 +3728,34 @@ pub const HWTSTAMP_FILTER_PTP_V2_SYNC: ::c_uint = 13;
3638
3728
pub const HWTSTAMP_FILTER_PTP_V2_DELAY_REQ : :: c_uint = 14 ;
3639
3729
pub const HWTSTAMP_FILTER_NTP_ALL : :: c_uint = 15 ;
3640
3730
3731
+ // linux/ptp_clock.h
3732
+ pub const PTP_MAX_SAMPLES : :: c_uint = 25 ;
3733
+
3734
+ pub const PTP_CLOCK_GETCAPS : :: c_uint = 0x80503d01 ;
3735
+ pub const PTP_EXTTS_REQUEST : :: c_uint = 0x40103d02 ;
3736
+ pub const PTP_PEROUT_REQUEST : :: c_uint = 0x40383d03 ;
3737
+ pub const PTP_ENABLE_PPS : :: c_uint = 0x40043d04 ;
3738
+ pub const PTP_SYS_OFFSET : :: c_uint = 0x43403d05 ;
3739
+ pub const PTP_PIN_GETFUNC : :: c_uint = 0xc0603d06 ;
3740
+ pub const PTP_PIN_SETFUNC : :: c_uint = 0x40603d07 ;
3741
+ pub const PTP_SYS_OFFSET_PRECISE : :: c_uint = 0xc0403d08 ;
3742
+ pub const PTP_SYS_OFFSET_EXTENDED : :: c_uint = 0xc4c03d09 ;
3743
+
3744
+ pub const PTP_CLOCK_GETCAPS2 : :: c_uint = 0x80503d0a ;
3745
+ pub const PTP_EXTTS_REQUEST2 : :: c_uint = 0x40103d0b ;
3746
+ pub const PTP_PEROUT_REQUEST2 : :: c_uint = 0x40383d0c ;
3747
+ pub const PTP_ENABLE_PPS2 : :: c_uint = 0x40043d0d ;
3748
+ pub const PTP_SYS_OFFSET2 : :: c_uint = 0x43403d0e ;
3749
+ pub const PTP_PIN_GETFUNC2 : :: c_uint = 0xc0603d0f ;
3750
+ pub const PTP_PIN_SETFUNC2 : :: c_uint = 0x40603d10 ;
3751
+ pub const PTP_SYS_OFFSET_PRECISE2 : :: c_uint = 0xc0403d11 ;
3752
+ pub const PTP_SYS_OFFSET_EXTENDED2 : :: c_uint = 0xc4c03d12 ;
3753
+
3754
+ pub const PTP_PF_NONE : :: c_uint = 0 ;
3755
+ pub const PTP_PF_EXTTS : :: c_uint = 1 ;
3756
+ pub const PTP_PF_PEROUT : :: c_uint = 2 ;
3757
+ pub const PTP_PF_PHYSYNC : :: c_uint = 3 ;
3758
+
3641
3759
// linux/tls.h
3642
3760
pub const TLS_TX : :: c_int = 1 ;
3643
3761
pub const TLS_RX : :: c_int = 2 ;
0 commit comments