SNMP Configuration and Management Manual

Trap Multiplexer Subagent/Manager
SNMP Configuration and Management Manual424777-006
12-51
Application Control Flow
Application Control Flow
Figure 12-4 summarizes the control flow of the sample application:
The main control block establishes communication with an EMS consumer
distributor process, then calls spi_cmd_set_source().
The spi_cmd_set_source() function builds a SPI command that identifies the EMS
collector from which to obtain trap events and then calls send_spi_cmd() to
process the command.
The send_spi_cmd() function sends the SPI command to the EMS consumer
distributor and processes the response. This general-purpose function is called
from various functions whenever a SPI command is ready for processing.
The spi_cmd_load_filter() function builds a SPI command that identifies the filter
object file and then calls send_spi_cmd() to process the command.
Example 12-2. Sample Application Output
Waiting for the next Event.....
VersionNumber : 0
Community : public
Enterprise : 1.3.6.1.4.1.169.3
Network Address : 130.252.12.3
Generic trap No : 6
Specific Trap No : 5
Timeticks : 54321
Varbind Count : 4
Varbind #1
OID : 1.2.3
Type : OPAQUE
Value : 1@234&5*67
Varbind #2
OID : 1.3.2.85.6
Type : OCTETSTRING
Value : Tandem Computers
Varbind #3
OID : 1.3.2.208.9
Type : NULL
Value : 0
Varbind #4
OID : 1.2.3.56.4
Type : IPADDR
Value : 130.252.109.237