#include <net/if_mib.h>
net/if_mib.h
structifmibdata
| char[16] | ifmd_name | name of interface |
| unsigned int | ifmd_pcount | number of promiscuous listeners |
| unsigned int | ifmd_flags | interface flags |
| unsigned int | ifmd_snd_len | instantaneous length of send queue |
| unsigned int | ifmd_snd_maxlen | maximum length of send queue |
| unsigned int | ifmd_snd_drops | number of drops in send queue |
| unsigned int[4] | ifmd_filler | for future expansion |
| struct if_data64 | ifmd_data | generic information and statistics |
macroIFMIB_SYSTEM
sysctl MIB tags at the net.link.generic level
#define IFMIB_SYSTEM 1
non-interface-specific
macroIFDATA_GENERAL
MIB tags for the various net.link.generic.ifdata tables
#define IFDATA_GENERAL 1
generic stats for all kinds of ifaces
macroIFMIB_IFCOUNT
MIB tags at the net.link.generic.system level
#define IFMIB_IFCOUNT 1
number of interfaces configured
macroNETLINK_GENERIC
MIB tags as the net.link level
All of the other values are IFT_* names defined in if_types.h.
#define NETLINK_GENERIC 0
functions not specific to a type of iface
structifs_iso_8802_3
| u_int32_t | dot3StatsAlignmentErrors | |
| u_int32_t | dot3StatsFCSErrors | |
| u_int32_t | dot3StatsSingleCollisionFrames | |
| u_int32_t | dot3StatsMultipleCollisionFrames | |
| u_int32_t | dot3StatsSQETestErrors | |
| u_int32_t | dot3StatsDeferredTransmissions | |
| u_int32_t | dot3StatsLateCollisions | |
| u_int32_t | dot3StatsExcessiveCollisions | |
| u_int32_t | dot3StatsInternalMacTransmitErrors | |
| u_int32_t | dot3StatsCarrierSenseErrors | |
| u_int32_t | dot3StatsFrameTooLongs | |
| u_int32_t | dot3StatsInternalMacReceiveErrors | |
| u_int32_t | dot3StatsEtherChipSet | |
| u_int32_t | dot3StatsMissedFrames | Matt Thomas wants this one, not included in RFC 1650: |
| u_int32_t[16] | dot3StatsCollFrequencies | NB: index origin |
| u_int32_t | dot3Compliance |
macroDOT3COMPLIANCE_STATS
#define DOT3COMPLIANCE_STATS 1
macroDOT3COMPLIANCE_COLLS
#define DOT3COMPLIANCE_COLLS 2
macroDOT3CHIPSET_VENDOR
Chipset identifiers are normally part of the vendor's enterprise MIB.
However, we don't want to be trying to represent arbitrary-length
OBJECT IDENTIFIERs here (ick!), and the right value is not necessarily
obvious to the driver implementor. So, we define our own identification
mechanism here, and let the agent writer deal with the translation.
#define DOT3CHIPSET_VENDOR(x) ((x) >> 16)
macroDOT3CHIPSET_PART
#define DOT3CHIPSET_PART(x) ((x) & 0xffff)
macroDOT3CHIPSET
#define DOT3CHIPSET(v, p) (((v) << 16) + ((p) & 0xffff))
enumdot3Vendors
Driver writers! Add your vendors here!
| dot3VendorAMD | 1 | |
| dot3VendorIntel | 2 | |
| dot3VendorNational | 4 | |
| dot3VendorFujitsu | 5 | |
| dot3VendorDigital | 6 | |
| dot3VendorWesternDigital | 7 |
enum(anonymous)
Driver writers! Add your chipsets here!
| dot3ChipSetAMD7990 | 1 | |
| dot3ChipSetAMD79900 | 2 | |
| dot3ChipSetAMD79C940 | 3 |
enum(anonymous)
| dot3ChipSetIntel82586 | 1 | |
| dot3ChipSetIntel82596 | 2 | |
| dot3ChipSetIntel82557 | 3 |
enum(anonymous)
| dot3ChipSetNational8390 | 1 | |
| dot3ChipSetNationalSonic | 2 |
enum(anonymous)
| dot3ChipSetFujitsu86950 | 1 |
enum(anonymous)
| dot3ChipSetDigitalDC21040 | 1 | |
| dot3ChipSetDigitalDC21140 | 2 | |
| dot3ChipSetDigitalDC21041 | 3 | |
| dot3ChipSetDigitalDC21140A | 4 | |
| dot3ChipSetDigitalDC21142 | 5 |
enum(anonymous)
| dot3ChipSetWesternDigital83C690 | 1 | |
| dot3ChipSetWesternDigital83C790 | 2 |