@@ -1580,6 +1580,50 @@ s_no_extra_traits! {
1580
1580
pub ifr_name: [ :: c_char; :: IFNAMSIZ ] ,
1581
1581
pub ifr_ifru: __c_anonymous_ifr_ifru6,
1582
1582
}
1583
+
1584
+ pub struct ifmibdata {
1585
+ /// Name of interface
1586
+ pub ifmd_name: [ :: c_char; :: IFNAMSIZ ] ,
1587
+ /// Number of promiscuous listeners
1588
+ pub ifmd_pcount: :: c_uint,
1589
+ /// Interface flags
1590
+ pub ifmd_flags: :: c_uint,
1591
+ /// Instantaneous length of send queue
1592
+ pub ifmd_snd_len: :: c_uint,
1593
+ /// Maximum length of send queue
1594
+ pub ifmd_snd_maxlen: :: c_uint,
1595
+ /// Number of drops in send queue
1596
+ pub ifmd_snd_drops: :: c_uint,
1597
+ /// For future expansion
1598
+ pub ifmd_filler: [ :: c_uint; 4 ] ,
1599
+ /// Generic information and statistics
1600
+ pub ifmd_data: if_data64,
1601
+ }
1602
+
1603
+ pub struct ifs_iso_8802_3 {
1604
+ pub dot3StatsAlignmentErrors: u32 ,
1605
+ pub dot3StatsFCSErrors: u32 ,
1606
+ pub dot3StatsSingleCollisionFrames: u32 ,
1607
+ pub dot3StatsMultipleCollisionFrames: u32 ,
1608
+ pub dot3StatsSQETestErrors: u32 ,
1609
+ pub dot3StatsDeferredTransmissions: u32 ,
1610
+ pub dot3StatsLateCollisions: u32 ,
1611
+ pub dot3StatsExcessiveCollisions: u32 ,
1612
+ pub dot3StatsInternalMacTransmitErrors: u32 ,
1613
+ pub dot3StatsCarrierSenseErrors: u32 ,
1614
+ pub dot3StatsFrameTooLongs: u32 ,
1615
+ pub dot3StatsInternalMacReceiveErrors: u32 ,
1616
+ pub dot3StatsEtherChipSet: u32 ,
1617
+ pub dot3StatsMissedFrames: u32 ,
1618
+ pub dot3StatsCollFrequencies: [ u32 ; 16 ] ,
1619
+ pub dot3Compliance: u32 ,
1620
+ }
1621
+
1622
+ pub struct if_family_id {
1623
+ pub iffmid_len: u32 ,
1624
+ pub iffmid_id: u32 ,
1625
+ pub iffmid_str: [ :: c_char; 1 ] ,
1626
+ }
1583
1627
}
1584
1628
1585
1629
impl siginfo_t {
@@ -3102,7 +3146,7 @@ cfg_if! {
3102
3146
}
3103
3147
}
3104
3148
3105
- impl :: fmt:: Debug for ifconf{
3149
+ impl :: fmt:: Debug for ifconf {
3106
3150
fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
3107
3151
f. debug_struct( "ifconf" ) . finish_non_exhaustive( )
3108
3152
}
@@ -3181,6 +3225,206 @@ cfg_if! {
3181
3225
. finish( )
3182
3226
}
3183
3227
}
3228
+
3229
+ impl PartialEq for ifmibdata {
3230
+ fn eq( & self , other: & ifmibdata) -> bool {
3231
+ self . ifmd_name == other. ifmd_name
3232
+ && self . ifmd_pcount == other. ifmd_pcount
3233
+ && self . ifmd_flags == other. ifmd_flags
3234
+ && self . ifmd_snd_len == other. ifmd_snd_len
3235
+ && self . ifmd_snd_maxlen == other. ifmd_snd_maxlen
3236
+ && self . ifmd_snd_drops == other. ifmd_snd_drops
3237
+ && self . ifmd_filler == other. ifmd_filler
3238
+ && self . ifmd_data == other. ifmd_data
3239
+ }
3240
+ }
3241
+
3242
+ impl Eq for ifmibdata { }
3243
+
3244
+ impl :: fmt:: Debug for ifmibdata {
3245
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
3246
+ let ifmd_name = self . ifmd_name;
3247
+ let ifmd_pcount = self . ifmd_pcount;
3248
+ let ifmd_flags = self . ifmd_flags;
3249
+ let ifmd_snd_len = self . ifmd_snd_len;
3250
+ let ifmd_snd_maxlen = self . ifmd_snd_maxlen;
3251
+ let ifmd_snd_drops = self . ifmd_snd_drops;
3252
+ let ifmd_filler = self . ifmd_filler;
3253
+ let ifmd_data = self . ifmd_data;
3254
+
3255
+ f. debug_struct( "ifmibdata" )
3256
+ . field( "ifmd_name" , & ifmd_name)
3257
+ . field( "ifmd_pcount" , & ifmd_pcount)
3258
+ . field( "ifmd_flags" , & ifmd_flags)
3259
+ . field( "ifmd_snd_len" , & ifmd_snd_len)
3260
+ . field( "ifmd_snd_maxlen" , & ifmd_snd_maxlen)
3261
+ . field( "ifmd_snd_drops" , & ifmd_snd_drops)
3262
+ . field( "ifmd_filler" , & ifmd_filler)
3263
+ . field( "ifmd_data" , & ifmd_data)
3264
+ . finish( )
3265
+ }
3266
+ }
3267
+
3268
+ impl :: hash:: Hash for ifmibdata {
3269
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
3270
+ let ifmd_name = self . ifmd_name;
3271
+ let ifmd_pcount = self . ifmd_pcount;
3272
+ let ifmd_flags = self . ifmd_flags;
3273
+ let ifmd_snd_len = self . ifmd_snd_len;
3274
+ let ifmd_snd_maxlen = self . ifmd_snd_maxlen;
3275
+ let ifmd_snd_drops = self . ifmd_snd_drops;
3276
+ let ifmd_filler = self . ifmd_filler;
3277
+ let ifmd_data = self . ifmd_data;
3278
+
3279
+ ifmd_name. hash( state) ;
3280
+ ifmd_pcount. hash( state) ;
3281
+ ifmd_flags. hash( state) ;
3282
+ ifmd_snd_len. hash( state) ;
3283
+ ifmd_snd_maxlen. hash( state) ;
3284
+ ifmd_snd_drops. hash( state) ;
3285
+ ifmd_filler. hash( state) ;
3286
+ ifmd_data. hash( state) ;
3287
+ }
3288
+ }
3289
+
3290
+ impl PartialEq for ifs_iso_8802_3 {
3291
+ fn eq( & self , other: & ifs_iso_8802_3) -> bool {
3292
+ self . dot3StatsAlignmentErrors == other. dot3StatsAlignmentErrors
3293
+ && self . dot3StatsFCSErrors == other. dot3StatsFCSErrors
3294
+ && self . dot3StatsSingleCollisionFrames == other. dot3StatsSingleCollisionFrames
3295
+ && self . dot3StatsMultipleCollisionFrames == other. dot3StatsMultipleCollisionFrames
3296
+ && self . dot3StatsSQETestErrors == other. dot3StatsSQETestErrors
3297
+ && self . dot3StatsDeferredTransmissions == other. dot3StatsDeferredTransmissions
3298
+ && self . dot3StatsLateCollisions == other. dot3StatsLateCollisions
3299
+ && self . dot3StatsExcessiveCollisions == other. dot3StatsExcessiveCollisions
3300
+ && self . dot3StatsInternalMacTransmitErrors ==
3301
+ other. dot3StatsInternalMacTransmitErrors
3302
+ && self . dot3StatsCarrierSenseErrors == other. dot3StatsCarrierSenseErrors
3303
+ && self . dot3StatsFrameTooLongs == other. dot3StatsFrameTooLongs
3304
+ && self . dot3StatsInternalMacReceiveErrors == other. dot3StatsInternalMacReceiveErrors
3305
+ && self . dot3StatsEtherChipSet == other. dot3StatsEtherChipSet
3306
+ && self . dot3StatsMissedFrames == other. dot3StatsMissedFrames
3307
+ && self . dot3StatsCollFrequencies == other. dot3StatsCollFrequencies
3308
+ && self . dot3Compliance == other. dot3Compliance
3309
+ }
3310
+ }
3311
+
3312
+ impl Eq for ifs_iso_8802_3 { }
3313
+
3314
+ impl :: fmt:: Debug for ifs_iso_8802_3 {
3315
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
3316
+ let dot3StatsAlignmentErrors = self . dot3StatsAlignmentErrors;
3317
+ let dot3StatsFCSErrors = self . dot3StatsFCSErrors;
3318
+ let dot3StatsSingleCollisionFrames = self . dot3StatsSingleCollisionFrames;
3319
+ let dot3StatsMultipleCollisionFrames = self . dot3StatsMultipleCollisionFrames;
3320
+ let dot3StatsSQETestErrors = self . dot3StatsSQETestErrors;
3321
+ let dot3StatsDeferredTransmissions = self . dot3StatsDeferredTransmissions;
3322
+ let dot3StatsLateCollisions = self . dot3StatsLateCollisions;
3323
+ let dot3StatsExcessiveCollisions = self . dot3StatsExcessiveCollisions;
3324
+ let dot3StatsInternalMacTransmitErrors = self . dot3StatsInternalMacTransmitErrors;
3325
+ let dot3StatsCarrierSenseErrors = self . dot3StatsCarrierSenseErrors;
3326
+ let dot3StatsFrameTooLongs = self . dot3StatsFrameTooLongs;
3327
+ let dot3StatsInternalMacReceiveErrors = self . dot3StatsInternalMacReceiveErrors;
3328
+ let dot3StatsEtherChipSet = self . dot3StatsEtherChipSet;
3329
+ let dot3StatsMissedFrames = self . dot3StatsMissedFrames;
3330
+ let dot3StatsCollFrequencies = self . dot3StatsCollFrequencies;
3331
+ let dot3Compliance = self . dot3Compliance;
3332
+
3333
+ f. debug_struct( "ifs_iso_8802_3" )
3334
+ . field( "dot3StatsAlignmentErrors" , & dot3StatsAlignmentErrors)
3335
+ . field( "dot3StatsFCSErrors" , & dot3StatsFCSErrors)
3336
+ . field( "dot3StatsSingleCollisionFrames" , & dot3StatsSingleCollisionFrames)
3337
+ . field( "dot3StatsMultipleCollisionFrames" , & dot3StatsMultipleCollisionFrames)
3338
+ . field( "dot3StatsSQETestErrors" , & dot3StatsSQETestErrors)
3339
+ . field( "dot3StatsDeferredTransmissions" , & dot3StatsDeferredTransmissions)
3340
+ . field( "dot3StatsLateCollisions" , & dot3StatsLateCollisions)
3341
+ . field( "dot3StatsExcessiveCollisions" , & dot3StatsExcessiveCollisions)
3342
+ . field(
3343
+ "dot3StatsInternalMacTransmitErrors" , & dot3StatsInternalMacTransmitErrors)
3344
+ . field( "dot3StatsCarrierSenseErrors" , & dot3StatsCarrierSenseErrors)
3345
+ . field( "dot3StatsFrameTooLongs" , & dot3StatsFrameTooLongs)
3346
+ . field( "dot3StatsInternalMacReceiveErrors" , & dot3StatsInternalMacReceiveErrors)
3347
+ . field( "dot3StatsEtherChipSet" , & dot3StatsEtherChipSet)
3348
+ . field( "dot3StatsMissedFrames" , & dot3StatsMissedFrames)
3349
+ . field( "dot3StatsCollFrequencies" , & dot3StatsCollFrequencies)
3350
+ . field( "dot3Compliance" , & dot3Compliance)
3351
+ . finish( )
3352
+ }
3353
+ }
3354
+
3355
+ impl :: hash:: Hash for ifs_iso_8802_3 {
3356
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
3357
+ let dot3StatsAlignmentErrors = self . dot3StatsAlignmentErrors;
3358
+ let dot3StatsFCSErrors = self . dot3StatsFCSErrors;
3359
+ let dot3StatsSingleCollisionFrames = self . dot3StatsSingleCollisionFrames;
3360
+ let dot3StatsMultipleCollisionFrames = self . dot3StatsMultipleCollisionFrames;
3361
+ let dot3StatsSQETestErrors = self . dot3StatsSQETestErrors;
3362
+ let dot3StatsDeferredTransmissions = self . dot3StatsDeferredTransmissions;
3363
+ let dot3StatsLateCollisions = self . dot3StatsLateCollisions;
3364
+ let dot3StatsExcessiveCollisions = self . dot3StatsExcessiveCollisions;
3365
+ let dot3StatsInternalMacTransmitErrors = self . dot3StatsInternalMacTransmitErrors;
3366
+ let dot3StatsCarrierSenseErrors = self . dot3StatsCarrierSenseErrors;
3367
+ let dot3StatsFrameTooLongs = self . dot3StatsFrameTooLongs;
3368
+ let dot3StatsInternalMacReceiveErrors = self . dot3StatsInternalMacReceiveErrors;
3369
+ let dot3StatsEtherChipSet = self . dot3StatsEtherChipSet;
3370
+ let dot3StatsMissedFrames = self . dot3StatsMissedFrames;
3371
+ let dot3StatsCollFrequencies = self . dot3StatsCollFrequencies;
3372
+ let dot3Compliance = self . dot3Compliance;
3373
+
3374
+ dot3StatsAlignmentErrors. hash( state) ;
3375
+ dot3StatsFCSErrors. hash( state) ;
3376
+ dot3StatsSingleCollisionFrames. hash( state) ;
3377
+ dot3StatsMultipleCollisionFrames. hash( state) ;
3378
+ dot3StatsSQETestErrors. hash( state) ;
3379
+ dot3StatsDeferredTransmissions. hash( state) ;
3380
+ dot3StatsLateCollisions. hash( state) ;
3381
+ dot3StatsExcessiveCollisions. hash( state) ;
3382
+ dot3StatsInternalMacTransmitErrors. hash( state) ;
3383
+ dot3StatsCarrierSenseErrors. hash( state) ;
3384
+ dot3StatsFrameTooLongs. hash( state) ;
3385
+ dot3StatsInternalMacReceiveErrors. hash( state) ;
3386
+ dot3StatsEtherChipSet. hash( state) ;
3387
+ dot3StatsMissedFrames. hash( state) ;
3388
+ dot3StatsCollFrequencies. hash( state) ;
3389
+ dot3Compliance. hash( state) ;
3390
+ }
3391
+ }
3392
+
3393
+ impl PartialEq for ifs_iso_8802_3 {
3394
+ fn eq( & self , other: & ifs_iso_8802_3) -> bool {
3395
+ self . iffmid_len = other. iffmid_len
3396
+ && self . iffmid_id = other. iffmid_id
3397
+ && self . iffmid_str = other. iffmid_str
3398
+ }
3399
+ }
3400
+
3401
+ impl Eq for ifs_iso_8802_3 { }
3402
+
3403
+ impl :: fmt:: Debug for ifs_iso_8802_3 {
3404
+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
3405
+ let iffmid_len = self . iffmid_len;
3406
+ let iffmid_id = self . iffmid_id;
3407
+ let iffmid_str = self . iffmid_str;
3408
+
3409
+ f. debug_struct( "ifs_iso_8802_3" )
3410
+ . field( "iffmid_len" , & iffmid_len)
3411
+ . field( "iffmid_id" , & iffmid_id)
3412
+ . field( "iffmid_str" , & iffmid_str)
3413
+ . finish( )
3414
+ }
3415
+ }
3416
+
3417
+ impl :: hash:: Hash for ifs_iso_8802_3 {
3418
+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
3419
+ let iffmid_len = self . iffmid_len;
3420
+ let iffmid_id = self . iffmid_id;
3421
+ let iffmid_str = self . iffmid_str;
3422
+
3423
+ iffmid_len. hash( state) ;
3424
+ iffmid_id. hash( state) ;
3425
+ iffmid_str. hash( state) ;
3426
+ }
3427
+ }
3184
3428
}
3185
3429
}
3186
3430
@@ -5496,6 +5740,32 @@ pub const HOST_VM_INFO64_COUNT: mach_msg_type_number_t =
5496
5740
( :: mem:: size_of :: < vm_statistics64_data_t > ( ) / :: mem:: size_of :: < integer_t > ( ) )
5497
5741
as mach_msg_type_number_t ;
5498
5742
5743
+ // bsd/net/if_mib.h
5744
+ /// Non-interface-specific
5745
+ pub const IFMIB_SYSTEM : :: c_int = 1 ;
5746
+ /// Per-interface data table
5747
+ pub const IFMIB_IFDATA : :: c_int = 2 ;
5748
+ /// All interfaces data at once
5749
+ pub const IFMIB_IFALLDATA : :: c_int = 3 ;
5750
+
5751
+ /// Generic stats for all kinds of ifaces
5752
+ pub const IFDATA_GENERAL : :: c_int = 1 ;
5753
+ /// Specific to the type of interface
5754
+ pub const IFDATA_LINKSPECIFIC : :: c_int = 2 ;
5755
+ /// Addresses assigned to interface
5756
+ pub const IFDATA_ADDRS : :: c_int = 3 ;
5757
+ /// Multicast addresses assigned to interface
5758
+ pub const IFDATA_MULTIADDRS : :: c_int = 4 ;
5759
+
5760
+ /// Number of interfaces configured
5761
+ pub const IFMIB_IFCOUNT : :: c_int = 1 ;
5762
+
5763
+ /// Functions not specific to a type of iface
5764
+ pub const NETLINK_GENERIC : :: c_int = 0 ;
5765
+
5766
+ pub const DOT3COMPLIANCE_STATS : :: c_int = 1 ;
5767
+ pub const DOT3COMPLIANCE_COLLS : :: c_int = 2 ;
5768
+
5499
5769
f ! {
5500
5770
pub fn CMSG_NXTHDR ( mhdr: * const :: msghdr,
5501
5771
cmsg: * const :: cmsghdr) -> * mut :: cmsghdr {
0 commit comments