@@ -1195,6 +1195,19 @@ s! {
11951195 pub rsv: [ :: c_uint; 5 ] ,
11961196 }
11971197
1198+ pub struct ptp_clock_caps {
1199+ pub max_adj: :: c_int,
1200+ pub n_alarm: :: c_int,
1201+ pub n_ext_ts: :: c_int,
1202+ pub n_per_out: :: c_int,
1203+ pub pps: :: c_int,
1204+ pub n_pins: :: c_int,
1205+ pub cross_timestamping: :: c_int,
1206+ pub adjust_phase: :: c_int,
1207+ pub max_phase_adj: :: c_int,
1208+ pub rsv: [ :: c_int; 11 ] ,
1209+ }
1210+
11981211 // linux/if_xdp.h
11991212 pub struct xsk_tx_metadata_completion {
12001213 pub tx_timestamp: :: __u64,
@@ -4606,8 +4619,7 @@ pub const PTP_MAX_SAMPLES: ::c_uint = 25; // Maximum allowed offset measurement
46064619
46074620const PTP_CLK_MAGIC : u32 = b'=' as u32 ;
46084621
4609- // FIXME: needs the ptp_clock_caps struct
4610- // pub const PTP_CLOCK_GETCAPS: ::c_uint = _IOR::<ptp_clock_caps>(PTP_CLK_MAGIC, 1);
4622+ pub const PTP_CLOCK_GETCAPS : :: c_uint = _IOR :: < ptp_clock_caps > ( PTP_CLK_MAGIC , 1 ) ;
46114623pub const PTP_EXTTS_REQUEST : :: c_uint = _IOW :: < ptp_extts_request > ( PTP_CLK_MAGIC , 2 ) ;
46124624pub const PTP_PEROUT_REQUEST : :: c_uint = _IOW :: < ptp_perout_request > ( PTP_CLK_MAGIC , 3 ) ;
46134625pub const PTP_ENABLE_PPS : :: c_uint = _IOW :: < :: c_int > ( PTP_CLK_MAGIC , 4 ) ;
@@ -4617,8 +4629,7 @@ pub const PTP_PIN_SETFUNC: ::c_uint = _IOW::<ptp_pin_desc>(PTP_CLK_MAGIC, 7);
46174629pub const PTP_SYS_OFFSET_PRECISE : :: c_uint = _IOWR :: < ptp_sys_offset_precise > ( PTP_CLK_MAGIC , 8 ) ;
46184630pub const PTP_SYS_OFFSET_EXTENDED : :: c_uint = _IOWR :: < ptp_sys_offset_extended > ( PTP_CLK_MAGIC , 9 ) ;
46194631
4620- // FIXME: needs the ptp_clock_caps struct
4621- // pub const PTP_CLOCK_GETCAPS2: ::c_uint = _IOR::<ptp_clock_caps>(PTP_CLK_MAGIC, 10);
4632+ pub const PTP_CLOCK_GETCAPS2 : :: c_uint = _IOR :: < ptp_clock_caps > ( PTP_CLK_MAGIC , 10 ) ;
46224633pub const PTP_EXTTS_REQUEST2 : :: c_uint = _IOW :: < ptp_extts_request > ( PTP_CLK_MAGIC , 11 ) ;
46234634pub const PTP_PEROUT_REQUEST2 : :: c_uint = _IOW :: < ptp_perout_request > ( PTP_CLK_MAGIC , 12 ) ;
46244635pub const PTP_ENABLE_PPS2 : :: c_uint = _IOW :: < :: c_int > ( PTP_CLK_MAGIC , 13 ) ;
0 commit comments