SNMP Subagent Programmer's Guide
Indexed Trap Generator
2-60 119728—SNMP Subagent Programmer’s Guide
Programming Tutorials
 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 }
 tableTrap TRAP-TYPE
 ENTERPRISE tblTrap
 VARIABLES { cardNumber, portNumber, ratio }
 DESCRIPTION
 "This trap is generated whenever a legal card
 and port combination is provided to the program."
 ::= 0
END
Example 2-12. Indexed Trap Generator MIB Definition (page 3 of 3)










