#include <net/if_mib.h>

net/if_mib.h

includes: net/if_var.h, sys/appleapiopts.h, sys/types.h
14 macros · 7 enums · 2 structs

structifmibdata

size 180, align 4
char[16]ifmd_namename of interface
unsigned intifmd_pcountnumber of promiscuous listeners
unsigned intifmd_flagsinterface flags
unsigned intifmd_snd_leninstantaneous length of send queue
unsigned intifmd_snd_maxlenmaximum length of send queue
unsigned intifmd_snd_dropsnumber of drops in send queue
unsigned int[4]ifmd_fillerfor future expansion
struct if_data64ifmd_datageneric information and statistics

macroIFMIB_SYSTEM

sysctl MIB tags at the net.link.generic level
#define IFMIB_SYSTEM 1
non-interface-specific

macroIFMIB_IFDATA

#define IFMIB_IFDATA 2
per-interface data table

macroIFMIB_IFALLDATA

#define IFMIB_IFALLDATA 3
all interfaces data at once

macroIFDATA_GENERAL

MIB tags for the various net.link.generic.ifdata tables
#define IFDATA_GENERAL 1
generic stats for all kinds of ifaces

macroIFDATA_LINKSPECIFIC

#define IFDATA_LINKSPECIFIC 2
specific to the type of interface

macroIFDATA_ADDRS

#define IFDATA_ADDRS 3
addresses assigned to interface

macroIFDATA_MULTIADDRS

#define IFDATA_MULTIADDRS 4
multicast addresses assigned to interface

macroIFMIB_IFCOUNT

MIB tags at the net.link.generic.system level
#define IFMIB_IFCOUNT 1
number of interfaces configured

structifs_iso_8802_3

For IFT_ETHER, IFT_ISO88023, and IFT_STARLAN, as used by RFC 1650
size 124, align 4
u_int32_tdot3StatsAlignmentErrors
u_int32_tdot3StatsFCSErrors
u_int32_tdot3StatsSingleCollisionFrames
u_int32_tdot3StatsMultipleCollisionFrames
u_int32_tdot3StatsSQETestErrors
u_int32_tdot3StatsDeferredTransmissions
u_int32_tdot3StatsLateCollisions
u_int32_tdot3StatsExcessiveCollisions
u_int32_tdot3StatsInternalMacTransmitErrors
u_int32_tdot3StatsCarrierSenseErrors
u_int32_tdot3StatsFrameTooLongs
u_int32_tdot3StatsInternalMacReceiveErrors
u_int32_tdot3StatsEtherChipSet
u_int32_tdot3StatsMissedFramesMatt Thomas wants this one, not included in RFC 1650:
u_int32_t[16]dot3StatsCollFrequenciesNB: index origin
u_int32_tdot3Compliance

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!
underlying type unsigned int
dot3VendorAMD1
dot3VendorIntel2
dot3VendorNational4
dot3VendorFujitsu5
dot3VendorDigital6
dot3VendorWesternDigital7

enum(anonymous)

Driver writers! Add your chipsets here!
underlying type unsigned int
dot3ChipSetAMD79901
dot3ChipSetAMD799002
dot3ChipSetAMD79C9403

enum(anonymous)

underlying type unsigned int
dot3ChipSetIntel825861
dot3ChipSetIntel825962
dot3ChipSetIntel825573

enum(anonymous)

underlying type unsigned int
dot3ChipSetNational83901
dot3ChipSetNationalSonic2

enum(anonymous)

underlying type unsigned int
dot3ChipSetFujitsu869501

enum(anonymous)

underlying type unsigned int
dot3ChipSetDigitalDC210401
dot3ChipSetDigitalDC211402
dot3ChipSetDigitalDC210413
dot3ChipSetDigitalDC21140A4
dot3ChipSetDigitalDC211425

enum(anonymous)

underlying type unsigned int
dot3ChipSetWesternDigital83C6901
dot3ChipSetWesternDigital83C7902