@@ -798,6 +798,12 @@ s_no_extra_traits! {
798798 #[ cfg( not( libc_union) ) ]
799799 pub ifr_ifru: :: sockaddr,
800800 }
801+
802+ pub struct hwtstamp_config {
803+ pub flags: :: c_int,
804+ pub tx_type: :: c_int,
805+ pub rx_filter: :: c_int,
806+ }
801807}
802808
803809s_no_extra_traits ! {
@@ -1221,6 +1227,31 @@ cfg_if! {
12211227 . finish( )
12221228 }
12231229 }
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+ }
12241255 }
12251256}
12261257
@@ -2771,6 +2802,8 @@ pub const SIOCGRARP: ::c_ulong = 0x00008961;
27712802pub const SIOCSRARP : :: c_ulong = 0x00008962 ;
27722803pub const SIOCGIFMAP : :: c_ulong = 0x00008970 ;
27732804pub const SIOCSIFMAP : :: c_ulong = 0x00008971 ;
2805+ pub const SIOCSHWTSTAMP : :: c_ulong = 0x000089b0 ;
2806+ pub const SIOCGHWTSTAMP : :: c_ulong = 0x000089b1 ;
27742807
27752808pub const IPTOS_TOS_MASK : u8 = 0x1E ;
27762809pub const IPTOS_PREC_MASK : u8 = 0xE0 ;
@@ -3121,6 +3154,28 @@ pub const SOF_TIMESTAMPING_OPT_TX_SWHW: ::c_uint = 1 << 14;
31213154pub const SOF_TXTIME_DEADLINE_MODE : u32 = 1 << 0 ;
31223155pub const SOF_TXTIME_REPORT_ERRORS : u32 = 1 << 1 ;
31233156
3157+ pub const HWTSTAMP_TX_OFF : :: c_uint = 0 ;
3158+ pub const HWTSTAMP_TX_ON : :: c_uint = 1 ;
3159+ pub const HWTSTAMP_TX_ONESTEP_SYNC : :: c_uint = 2 ;
3160+ pub const HWTSTAMP_TX_ONESTEP_P2P : :: c_uint = 3 ;
3161+
3162+ pub const HWTSTAMP_FILTER_NONE : :: c_uint = 0 ;
3163+ pub const HWTSTAMP_FILTER_ALL : :: c_uint = 1 ;
3164+ pub const HWTSTAMP_FILTER_SOME : :: c_uint = 2 ;
3165+ pub const HWTSTAMP_FILTER_PTP_V1_L4_EVENT : :: c_uint = 3 ;
3166+ pub const HWTSTAMP_FILTER_PTP_V1_L4_SYNC : :: c_uint = 4 ;
3167+ pub const HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ : :: c_uint = 5 ;
3168+ pub const HWTSTAMP_FILTER_PTP_V2_L4_EVENT : :: c_uint = 6 ;
3169+ pub const HWTSTAMP_FILTER_PTP_V2_L4_SYNC : :: c_uint = 7 ;
3170+ pub const HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ : :: c_uint = 8 ;
3171+ pub const HWTSTAMP_FILTER_PTP_V2_L2_EVENT : :: c_uint = 9 ;
3172+ pub const HWTSTAMP_FILTER_PTP_V2_L2_SYNC : :: c_uint = 10 ;
3173+ pub const HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ : :: c_uint = 11 ;
3174+ pub const HWTSTAMP_FILTER_PTP_V2_EVENT : :: c_uint = 12 ;
3175+ pub const HWTSTAMP_FILTER_PTP_V2_SYNC : :: c_uint = 13 ;
3176+ pub const HWTSTAMP_FILTER_PTP_V2_DELAY_REQ : :: c_uint = 14 ;
3177+ pub const HWTSTAMP_FILTER_NTP_ALL : :: c_uint = 15 ;
3178+
31243179// linux/if_alg.h
31253180pub const ALG_SET_KEY : :: c_int = 1 ;
31263181pub const ALG_SET_IV : :: c_int = 2 ;
0 commit comments