Changeset View
Changeset View
Standalone View
Standalone View
head/contrib/bsnmp/snmp_mibII/mibII.h
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
#include <arpa/inet.h> | #include <arpa/inet.h> | ||||
#include "asn1.h" | #include "asn1.h" | ||||
#include "snmp.h" | #include "snmp.h" | ||||
#include "snmpmod.h" | #include "snmpmod.h" | ||||
#include "snmp_mibII.h" | #include "snmp_mibII.h" | ||||
#include "mibII_tree.h" | #include "mibII_tree.h" | ||||
/* maximum size of the interface alias */ | /* maximum size of the interface alias unless overridden with net.ifdescr_maxlen */ | ||||
#define MIBIF_ALIAS_SIZE (64 + 1) | #define MIBIF_ALIAS_SIZE (64 + 1) | ||||
#define MIBIF_ALIAS_SIZE_MAX 1024 | |||||
/* | /* | ||||
* Interface list and flags. | * Interface list and flags. | ||||
*/ | */ | ||||
TAILQ_HEAD(mibif_list, mibif); | TAILQ_HEAD(mibif_list, mibif); | ||||
enum { | enum { | ||||
MIBIF_FOUND = 0x0001, | MIBIF_FOUND = 0x0001, | ||||
MIBIF_HIGHSPEED = 0x0002, | MIBIF_HIGHSPEED = 0x0002, | ||||
MIBIF_VERYHIGHSPEED = 0x0004, | MIBIF_VERYHIGHSPEED = 0x0004, | ||||
}; | }; | ||||
/* | /* | ||||
* Private mibif data - hang off from the mibif. | * Private mibif data - hang off from the mibif. | ||||
*/ | */ | ||||
struct mibif_private { | struct mibif_private { | ||||
uint64_t hc_inoctets; | uint64_t hc_inoctets; | ||||
uint64_t hc_outoctets; | uint64_t hc_outoctets; | ||||
uint64_t hc_omcasts; | uint64_t hc_omcasts; | ||||
uint64_t hc_opackets; | uint64_t hc_opackets; | ||||
uint64_t hc_imcasts; | uint64_t hc_imcasts; | ||||
uint64_t hc_ipackets; | uint64_t hc_ipackets; | ||||
/* this should be made public */ | |||||
char alias[MIBIF_ALIAS_SIZE]; | |||||
}; | }; | ||||
#define MIBIF_PRIV(IFP) ((struct mibif_private *)((IFP)->private)) | #define MIBIF_PRIV(IFP) ((struct mibif_private *)((IFP)->private)) | ||||
/* | /* | ||||
* Interface addresses. | * Interface addresses. | ||||
*/ | */ | ||||
TAILQ_HEAD(mibifa_list, mibifa); | TAILQ_HEAD(mibifa_list, mibifa); | ||||
enum { | enum { | ||||
▲ Show 20 Lines • Show All 185 Lines • Show Last 20 Lines |