@@ -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,
@@ -4566,8 +4579,7 @@ pub const PTP_MAX_SAMPLES: ::c_uint = 25; // Maximum allowed offset measurement
45664579
45674580const PTP_CLK_MAGIC : u32 = b'=' as u32 ;
45684581
4569- // FIXME: needs the ptp_clock_caps struct
4570- // pub const PTP_CLOCK_GETCAPS: ::c_uint = _IOR::<ptp_clock_caps>(PTP_CLK_MAGIC, 1);
4582+ pub const PTP_CLOCK_GETCAPS : :: c_uint = _IOR :: < ptp_clock_caps > ( PTP_CLK_MAGIC , 1 ) ;
45714583pub const PTP_EXTTS_REQUEST : :: c_uint = _IOW :: < ptp_extts_request > ( PTP_CLK_MAGIC , 2 ) ;
45724584pub const PTP_PEROUT_REQUEST : :: c_uint = _IOW :: < ptp_perout_request > ( PTP_CLK_MAGIC , 3 ) ;
45734585pub const PTP_ENABLE_PPS : :: c_uint = _IOW :: < :: c_int > ( PTP_CLK_MAGIC , 4 ) ;
@@ -4577,8 +4589,7 @@ pub const PTP_PIN_SETFUNC: ::c_uint = _IOW::<ptp_pin_desc>(PTP_CLK_MAGIC, 7);
45774589pub const PTP_SYS_OFFSET_PRECISE : :: c_uint = _IOWR :: < ptp_sys_offset_precise > ( PTP_CLK_MAGIC , 8 ) ;
45784590pub const PTP_SYS_OFFSET_EXTENDED : :: c_uint = _IOWR :: < ptp_sys_offset_extended > ( PTP_CLK_MAGIC , 9 ) ;
45794591
4580- // FIXME: needs the ptp_clock_caps struct
4581- // pub const PTP_CLOCK_GETCAPS2: ::c_uint = _IOR::<ptp_clock_caps>(PTP_CLK_MAGIC, 10);
4592+ pub const PTP_CLOCK_GETCAPS2 : :: c_uint = _IOR :: < ptp_clock_caps > ( PTP_CLK_MAGIC , 10 ) ;
45824593pub const PTP_EXTTS_REQUEST2 : :: c_uint = _IOW :: < ptp_extts_request > ( PTP_CLK_MAGIC , 11 ) ;
45834594pub const PTP_PEROUT_REQUEST2 : :: c_uint = _IOW :: < ptp_perout_request > ( PTP_CLK_MAGIC , 12 ) ;
45844595pub const PTP_ENABLE_PPS2 : :: c_uint = _IOW :: < :: c_int > ( PTP_CLK_MAGIC , 13 ) ;
0 commit comments