@@ -650,6 +650,72 @@ 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
+ #[ cfg( target_env = "gnu" ) ]
669
+ pub adjust_phase: :: c_int,
670
+ #[ cfg( target_env = "gnu" ) ]
671
+ pub max_phase_adj: :: c_int,
672
+ #[ cfg( target_env = "gnu" ) ]
673
+ pub rsv: [ :: c_int; 11 ] ,
674
+ #[ cfg( any( target_env = "musl" , target_env = "ohos" ) ) ]
675
+ pub rsv: [ :: c_int; 13 ] ,
676
+ }
677
+
678
+ pub struct ptp_extts_request {
679
+ pub index: :: c_uint,
680
+ pub flags: :: c_uint,
681
+ pub rsv: [ :: c_uint; 2 ] ,
682
+ }
683
+
684
+
685
+ pub struct ptp_sys_offset {
686
+ pub n_samples: :: c_uint,
687
+ pub rsv: [ :: c_uint; 3 ] ,
688
+ pub ts: [ ptp_clock_time; 51 ] ,
689
+ }
690
+
691
+ pub struct ptp_sys_offset_extended {
692
+ pub n_samples: :: c_uint,
693
+ pub rsv: [ :: c_uint; 3 ] ,
694
+ pub ts: [ [ ptp_clock_time; 3 ] ; 25 ] ,
695
+ }
696
+
697
+ pub struct ptp_sys_offset_precise {
698
+ pub device: ptp_clock_time,
699
+ pub sys_realtime: ptp_clock_time,
700
+ pub sys_monoraw: ptp_clock_time,
701
+ pub rsv: [ :: c_uint; 4 ] ,
702
+ }
703
+
704
+ pub struct ptp_pin_desc {
705
+ pub name: [ :: c_char; 64 ] ,
706
+ pub index: :: c_uint,
707
+ pub func: :: c_uint,
708
+ pub chan: :: c_uint,
709
+ pub rsv: [ :: c_uint; 5 ] ,
710
+ }
711
+
712
+ pub struct ptp_extts_event {
713
+ pub t: ptp_clock_time,
714
+ index: :: c_uint,
715
+ flags: :: c_uint,
716
+ rsv: [ :: c_uint; 2 ] ,
717
+ }
718
+
653
719
// linux/sctp.h
654
720
655
721
pub struct sctp_initmsg {
@@ -889,6 +955,7 @@ s_no_extra_traits! {
889
955
pub sched_deadline: :: __u64,
890
956
pub sched_period: :: __u64,
891
957
}
958
+
892
959
}
893
960
894
961
s_no_extra_traits ! {
@@ -920,6 +987,34 @@ cfg_if! {
920
987
}
921
988
}
922
989
990
+ cfg_if ! {
991
+ if #[ cfg( libc_union) ] {
992
+ s_no_extra_traits! {
993
+ // linux/ptp_clock.h
994
+ #[ allow( missing_debug_implementations) ]
995
+ pub union __c_anonymous_ptp_perout_request_1 {
996
+ pub start: ptp_clock_time,
997
+ pub phase: ptp_clock_time,
998
+ }
999
+
1000
+ #[ allow( missing_debug_implementations) ]
1001
+ pub union __c_anonymous_ptp_perout_request_2 {
1002
+ pub on: ptp_clock_time,
1003
+ pub rsv: [ :: c_uint; 4 ] ,
1004
+ }
1005
+
1006
+ #[ allow( missing_debug_implementations) ]
1007
+ pub struct ptp_perout_request {
1008
+ pub anonymous_1: __c_anonymous_ptp_perout_request_1,
1009
+ pub period: ptp_clock_time,
1010
+ pub index: :: c_uint,
1011
+ pub flags: :: c_uint,
1012
+ pub anonymous_2: __c_anonymous_ptp_perout_request_2,
1013
+ }
1014
+ }
1015
+ }
1016
+ }
1017
+
923
1018
cfg_if ! {
924
1019
if #[ cfg( feature = "extra_traits" ) ] {
925
1020
impl PartialEq for sockaddr_nl {
@@ -3638,6 +3733,58 @@ pub const HWTSTAMP_FILTER_PTP_V2_SYNC: ::c_uint = 13;
3638
3733
pub const HWTSTAMP_FILTER_PTP_V2_DELAY_REQ : :: c_uint = 14 ;
3639
3734
pub const HWTSTAMP_FILTER_NTP_ALL : :: c_uint = 15 ;
3640
3735
3736
+ // linux/ptp_clock.h
3737
+ pub const PTP_MAX_SAMPLES : :: c_uint = 25 ;
3738
+
3739
+ cfg_if ! {
3740
+ if #[ cfg( any( target_arch = "powerpc" , target_arch = "powerpc64" ) ) ] {
3741
+ pub const PTP_CLOCK_GETCAPS : :: c_uint = 0x40503d01 ;
3742
+ pub const PTP_EXTTS_REQUEST : :: c_uint = 0x80103d02 ;
3743
+ pub const PTP_PEROUT_REQUEST : :: c_uint = 0x80383d03 ;
3744
+ pub const PTP_ENABLE_PPS : :: c_uint = 0x80043d04 ;
3745
+ pub const PTP_SYS_OFFSET : :: c_uint = 0x83403d05 ;
3746
+ pub const PTP_PIN_GETFUNC : :: c_uint = 0xc0603d06 ;
3747
+ pub const PTP_PIN_SETFUNC : :: c_uint = 0x80603d07 ;
3748
+ pub const PTP_SYS_OFFSET_PRECISE : :: c_uint = 0xc0403d08 ;
3749
+ pub const PTP_SYS_OFFSET_EXTENDED : :: c_uint = 0xc4c03d09 ;
3750
+
3751
+ pub const PTP_CLOCK_GETCAPS2 : :: c_uint = 0x40503d0a ;
3752
+ pub const PTP_EXTTS_REQUEST2 : :: c_uint = 0x80103d0b ;
3753
+ pub const PTP_PEROUT_REQUEST2 : :: c_uint = 0x80383d0c ;
3754
+ pub const PTP_ENABLE_PPS2 : :: c_uint = 0x80043d0d ;
3755
+ pub const PTP_SYS_OFFSET2 : :: c_uint = 0x83403d0e ;
3756
+ pub const PTP_PIN_GETFUNC2 : :: c_uint = 0xc0603d0f ;
3757
+ pub const PTP_PIN_SETFUNC2 : :: c_uint = 0x80603d10 ;
3758
+ pub const PTP_SYS_OFFSET_PRECISE2 : :: c_uint = 0xc0403d11 ;
3759
+ pub const PTP_SYS_OFFSET_EXTENDED2 : :: c_uint = 0xc4c03d12 ;
3760
+ } else {
3761
+ pub const PTP_CLOCK_GETCAPS : :: c_uint = 0x80503d01 ;
3762
+ pub const PTP_EXTTS_REQUEST : :: c_uint = 0x40103d02 ;
3763
+ pub const PTP_PEROUT_REQUEST : :: c_uint = 0x40383d03 ;
3764
+ pub const PTP_ENABLE_PPS : :: c_uint = 0x40043d04 ;
3765
+ pub const PTP_SYS_OFFSET : :: c_uint = 0x43403d05 ;
3766
+ pub const PTP_PIN_GETFUNC : :: c_uint = 0xc0603d06 ;
3767
+ pub const PTP_PIN_SETFUNC : :: c_uint = 0x40603d07 ;
3768
+ pub const PTP_SYS_OFFSET_PRECISE : :: c_uint = 0xc0403d08 ;
3769
+ pub const PTP_SYS_OFFSET_EXTENDED : :: c_uint = 0xc4c03d09 ;
3770
+
3771
+ pub const PTP_CLOCK_GETCAPS2 : :: c_uint = 0x80503d0a ;
3772
+ pub const PTP_EXTTS_REQUEST2 : :: c_uint = 0x40103d0b ;
3773
+ pub const PTP_PEROUT_REQUEST2 : :: c_uint = 0x40383d0c ;
3774
+ pub const PTP_ENABLE_PPS2 : :: c_uint = 0x40043d0d ;
3775
+ pub const PTP_SYS_OFFSET2 : :: c_uint = 0x43403d0e ;
3776
+ pub const PTP_PIN_GETFUNC2 : :: c_uint = 0xc0603d0f ;
3777
+ pub const PTP_PIN_SETFUNC2 : :: c_uint = 0x40603d10 ;
3778
+ pub const PTP_SYS_OFFSET_PRECISE2 : :: c_uint = 0xc0403d11 ;
3779
+ pub const PTP_SYS_OFFSET_EXTENDED2 : :: c_uint = 0xc4c03d12 ;
3780
+ }
3781
+ }
3782
+
3783
+ pub const PTP_PF_NONE : :: c_uint = 0 ;
3784
+ pub const PTP_PF_EXTTS : :: c_uint = 1 ;
3785
+ pub const PTP_PF_PEROUT : :: c_uint = 2 ;
3786
+ pub const PTP_PF_PHYSYNC : :: c_uint = 3 ;
3787
+
3641
3788
// linux/tls.h
3642
3789
pub const TLS_TX : :: c_int = 1 ;
3643
3790
pub const TLS_RX : :: c_int = 2 ;
0 commit comments