@@ -798,6 +798,12 @@ s_no_extra_traits! {
798
798
#[ cfg( not( libc_union) ) ]
799
799
pub ifr_ifru: :: sockaddr,
800
800
}
801
+
802
+ pub struct hwtstamp_config {
803
+ pub flags: :: c_int,
804
+ pub tx_type: :: c_int,
805
+ pub rx_filter: :: c_int,
806
+ }
801
807
}
802
808
803
809
s_no_extra_traits ! {
@@ -1221,6 +1227,31 @@ cfg_if! {
1221
1227
. finish( )
1222
1228
}
1223
1229
}
1230
+
1231
+ impl :: fmt:: Debug for hwtstamp_config {
1232
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
1233
+ f. debug_struct( "hwtstamp_config" )
1234
+ . field( "flags" , & self . flags)
1235
+ . field( "tx_type" , & self . tx_type)
1236
+ . field( "rx_filter" , & self . rx_filter)
1237
+ . finish( )
1238
+ }
1239
+ }
1240
+ impl PartialEq for hwtstamp_config {
1241
+ fn eq( & self , other: & hwtstamp_config) -> bool {
1242
+ self . flags == other. flags &&
1243
+ self . tx_type == other. tx_type &&
1244
+ self . rx_filter == other. rx_filter
1245
+ }
1246
+ }
1247
+ impl Eq for hwtstamp_config { }
1248
+ impl :: hash:: Hash for hwtstamp_config {
1249
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
1250
+ self . flags. hash( state) ;
1251
+ self . tx_type. hash( state) ;
1252
+ self . rx_filter. hash( state) ;
1253
+ }
1254
+ }
1224
1255
}
1225
1256
}
1226
1257
@@ -2771,6 +2802,8 @@ pub const SIOCGRARP: ::c_ulong = 0x00008961;
2771
2802
pub const SIOCSRARP : :: c_ulong = 0x00008962 ;
2772
2803
pub const SIOCGIFMAP : :: c_ulong = 0x00008970 ;
2773
2804
pub const SIOCSIFMAP : :: c_ulong = 0x00008971 ;
2805
+ pub const SIOCSHWTSTAMP : :: c_ulong = 0x000089b0 ;
2806
+ pub const SIOCGHWTSTAMP : :: c_ulong = 0x000089b1 ;
2774
2807
2775
2808
pub const IPTOS_TOS_MASK : u8 = 0x1E ;
2776
2809
pub const IPTOS_PREC_MASK : u8 = 0xE0 ;
@@ -3129,6 +3162,28 @@ pub const SOF_TIMESTAMPING_OPT_TX_SWHW: ::c_uint = 1 << 14;
3129
3162
pub const SOF_TXTIME_DEADLINE_MODE : u32 = 1 << 0 ;
3130
3163
pub const SOF_TXTIME_REPORT_ERRORS : u32 = 1 << 1 ;
3131
3164
3165
+ pub const HWTSTAMP_TX_OFF : :: c_uint = 0 ;
3166
+ pub const HWTSTAMP_TX_ON : :: c_uint = 1 ;
3167
+ pub const HWTSTAMP_TX_ONESTEP_SYNC : :: c_uint = 2 ;
3168
+ pub const HWTSTAMP_TX_ONESTEP_P2P : :: c_uint = 3 ;
3169
+
3170
+ pub const HWTSTAMP_FILTER_NONE : :: c_uint = 0 ;
3171
+ pub const HWTSTAMP_FILTER_ALL : :: c_uint = 1 ;
3172
+ pub const HWTSTAMP_FILTER_SOME : :: c_uint = 2 ;
3173
+ pub const HWTSTAMP_FILTER_PTP_V1_L4_EVENT : :: c_uint = 3 ;
3174
+ pub const HWTSTAMP_FILTER_PTP_V1_L4_SYNC : :: c_uint = 4 ;
3175
+ pub const HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ : :: c_uint = 5 ;
3176
+ pub const HWTSTAMP_FILTER_PTP_V2_L4_EVENT : :: c_uint = 6 ;
3177
+ pub const HWTSTAMP_FILTER_PTP_V2_L4_SYNC : :: c_uint = 7 ;
3178
+ pub const HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ : :: c_uint = 8 ;
3179
+ pub const HWTSTAMP_FILTER_PTP_V2_L2_EVENT : :: c_uint = 9 ;
3180
+ pub const HWTSTAMP_FILTER_PTP_V2_L2_SYNC : :: c_uint = 10 ;
3181
+ pub const HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ : :: c_uint = 11 ;
3182
+ pub const HWTSTAMP_FILTER_PTP_V2_EVENT : :: c_uint = 12 ;
3183
+ pub const HWTSTAMP_FILTER_PTP_V2_SYNC : :: c_uint = 13 ;
3184
+ pub const HWTSTAMP_FILTER_PTP_V2_DELAY_REQ : :: c_uint = 14 ;
3185
+ pub const HWTSTAMP_FILTER_NTP_ALL : :: c_uint = 15 ;
3186
+
3132
3187
// linux/if_alg.h
3133
3188
pub const ALG_SET_KEY : :: c_int = 1 ;
3134
3189
pub const ALG_SET_IV : :: c_int = 2 ;
0 commit comments