@@ -1195,6 +1195,19 @@ s! {
1195
1195
pub rsv: [ :: c_uint; 5 ] ,
1196
1196
}
1197
1197
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
+
1198
1211
// linux/if_xdp.h
1199
1212
pub struct xsk_tx_metadata_completion {
1200
1213
pub tx_timestamp: :: __u64,
@@ -4566,8 +4579,7 @@ pub const PTP_MAX_SAMPLES: ::c_uint = 25; // Maximum allowed offset measurement
4566
4579
4567
4580
const PTP_CLK_MAGIC : u32 = b'=' as u32 ;
4568
4581
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 ) ;
4571
4583
pub const PTP_EXTTS_REQUEST : :: c_uint = _IOW :: < ptp_extts_request > ( PTP_CLK_MAGIC , 2 ) ;
4572
4584
pub const PTP_PEROUT_REQUEST : :: c_uint = _IOW :: < ptp_perout_request > ( PTP_CLK_MAGIC , 3 ) ;
4573
4585
pub 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);
4577
4589
pub const PTP_SYS_OFFSET_PRECISE : :: c_uint = _IOWR :: < ptp_sys_offset_precise > ( PTP_CLK_MAGIC , 8 ) ;
4578
4590
pub const PTP_SYS_OFFSET_EXTENDED : :: c_uint = _IOWR :: < ptp_sys_offset_extended > ( PTP_CLK_MAGIC , 9 ) ;
4579
4591
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 ) ;
4582
4593
pub const PTP_EXTTS_REQUEST2 : :: c_uint = _IOW :: < ptp_extts_request > ( PTP_CLK_MAGIC , 11 ) ;
4583
4594
pub const PTP_PEROUT_REQUEST2 : :: c_uint = _IOW :: < ptp_perout_request > ( PTP_CLK_MAGIC , 12 ) ;
4584
4595
pub const PTP_ENABLE_PPS2 : :: c_uint = _IOW :: < :: c_int > ( PTP_CLK_MAGIC , 13 ) ;
0 commit comments