Nut/OS  4.10.3
API Reference
mib2if.c File Reference
#include <sys/confnet.h>
#include <pro/snmp.h>
#include <pro/snmp_api.h>
#include <stdlib.h>
#include <string.h>
#include "mib2if.h"
Include dependency graph for mib2if.c:

Go to the source code of this file.

Defines

#define MIB_IF_ENTRIES   4
#define PHY_NAME   "Ethernet"
#define MAG_IF_NUMBER   0
#define MAG_IF_INDEX   1
#define MAG_IF_DESCR   2
#define MAG_IF_TYPE   3
#define MAG_IF_MTU   4
#define MAG_IF_SPEED   5
#define MAG_IF_PHYSADDRESS   6
#define MAG_IF_ADMINSTATUS   7
#define MAG_IF_OPERSTATUS   8
#define MAG_IF_LASTCHANGE   9
#define MAG_IF_INOCTETS   10
#define MAG_IF_INUCASTPKTS   11
#define MAG_IF_INNUCASTPKTS   12
#define MAG_IF_INDISCARDS   13
#define MAG_IF_INERRORS   14
#define MAG_IF_INUNKNOWNPROTOS   15
#define MAG_IF_OUTOCTETS   16
#define MAG_IF_OUTUCASTPKTS   17
#define MAG_IF_OUTNUCASTPKTS   18
#define MAG_IF_OUTDISCARDS   19
#define MAG_IF_OUTERRORS   20
#define MAG_IF_OUTQLEN   21
#define MAG_IF_SPECIFIC   22

Functions

int MibRegisterIfVars (void)
 Register MIB II variables of the interfaces.

Define Documentation

#define MIB_IF_ENTRIES   4

Definition at line 43 of file mib2if.c.

#define PHY_NAME   "Ethernet"

Definition at line 56 of file mib2if.c.

Referenced by MibRegisterIfVars().

#define MAG_IF_NUMBER   0

Definition at line 61 of file mib2if.c.

#define MAG_IF_INDEX   1

Definition at line 63 of file mib2if.c.

#define MAG_IF_DESCR   2

Definition at line 64 of file mib2if.c.

#define MAG_IF_TYPE   3

Definition at line 65 of file mib2if.c.

#define MAG_IF_MTU   4

Definition at line 66 of file mib2if.c.

#define MAG_IF_SPEED   5

Definition at line 67 of file mib2if.c.

#define MAG_IF_PHYSADDRESS   6

Definition at line 68 of file mib2if.c.

#define MAG_IF_ADMINSTATUS   7

Definition at line 69 of file mib2if.c.

#define MAG_IF_OPERSTATUS   8

Definition at line 70 of file mib2if.c.

#define MAG_IF_LASTCHANGE   9

Definition at line 71 of file mib2if.c.

#define MAG_IF_INOCTETS   10

Definition at line 72 of file mib2if.c.

#define MAG_IF_INUCASTPKTS   11

Definition at line 73 of file mib2if.c.

#define MAG_IF_INNUCASTPKTS   12

Definition at line 74 of file mib2if.c.

#define MAG_IF_INDISCARDS   13

Definition at line 75 of file mib2if.c.

#define MAG_IF_INERRORS   14

Definition at line 76 of file mib2if.c.

#define MAG_IF_INUNKNOWNPROTOS   15

Definition at line 77 of file mib2if.c.

#define MAG_IF_OUTOCTETS   16

Definition at line 78 of file mib2if.c.

#define MAG_IF_OUTUCASTPKTS   17

Definition at line 79 of file mib2if.c.

#define MAG_IF_OUTNUCASTPKTS   18

Definition at line 80 of file mib2if.c.

#define MAG_IF_OUTDISCARDS   19

Definition at line 81 of file mib2if.c.

#define MAG_IF_OUTERRORS   20

Definition at line 82 of file mib2if.c.

#define MAG_IF_OUTQLEN   21

Definition at line 83 of file mib2if.c.

#define MAG_IF_SPECIFIC   22

Definition at line 84 of file mib2if.c.


Function Documentation

int MibRegisterIfVars ( void  )

Register MIB II variables of the interfaces.

Note:
Preliminary code with hard coded values.
Examples:
snmpd/snmpd.c.

Definition at line 130 of file mib2if.c.

References malloc(), PHY_NAME, SnmpMibRegister(), strcpy(), and strlen().

Referenced by main().

Here is the call graph for this function: