SNMP Subagent Programmer's Guide
Writing and Compiling MIBs
SNMP Subagent Programmer’s Guide—119728 3-15
Encoding MIBs
and the C_LOCATOR_FUNC clause in the entry object definitions identifies the locator
function (locate_entry). Values for the entry objects are maintained in three fields of a
structure named “mytable”:
tblTrapTable OBJECT-TYPE
SYNTAX SEQUENCE OF TableEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"The tblTrapTable table consists of entries, one for
each port of each card."
::= { tblTrap 3 }
tblTrapTableEntry OBJECT-TYPE
SYNTAX TableEntry
ACCESS not-accessible
STATUS mandatory
DESCRIPTION
"Each tblTrapEntry holds the statistics for one port
on some card. These entries are indexed by card and
port number."
INDEX { cardNumber, portNumber }
C_NEXT_FUNC next_entry
::= { tblTrapTable 1 }
TableEntry ::=
SEQUENCE {
cardNumber INTEGER,
portNumber INTEGER,
ratio DisplayString
}
cardNumber OBJECT-TYPE
SYNTAX INTEGER (1..1000)
ACCESS read-only
C_STRUCT mytable, FIELD card
C_LOCATOR_FUNC locate_entry
STATUS mandatory
DESCRIPTION
"The card number index of the table"
::= { tblTrapTableEntry 1 }
portNumber OBJECT-TYPE
SYNTAX INTEGER (1..1000)
ACCESS read-only
C_STRUCT mytable, FIELD port
C_LOCATOR_FUNC locate_entry
STATUS mandatory
DESCRIPTION
"The port number index of the table."
::= { tblTrapTableEntry 2 }
ratio OBJECT-TYPE
SYNTAX DisplayString
ACCESS read-only
C_STRUCT mytable, FIELD ratio
C_LOCATOR_FUNC locate_entry
STATUS mandatory
DESCRIPTION
"Other manageable information. This string is the ascii
representation of the ratio of the card number to the
port number."
::= { tblTrapTableEntry 3 }