Application Source Code; Figure 12-4. Sample Application Control Flow - HP T9576G06 Management Manual

Snmp configuration and management manual
Table of Contents

Advertisement

Trap Multiplexer Subagent/Manager
The getevent_loop() function retrieves trap events and then extracts and displays
their token values, calling insert_null() or print_octetstring() functions to format
strings and OCTET STRING values for display.

Figure 12-4. Sample Application Control Flow

main()
Identify EMS collector and filter names
Convert names to EMS format
Create EMS consumer distributor process
Open distributor process for SPI interactions
spi_cmd_set_source()
(Build SPI command to identify collector)
spi_cmd_load_filter()
(Build SPI command to identify filter)
getevent_loop()
Initialize structures and buffer for trap event
Build SPI command to retrieve event
Extract and display token values from trap
events
Close distributor process

Application Source Code

The source code for the sample application, shown
section, contains numbers that correspond to the following observations:
1. Several C compiler pragmas are specified.
2. Files needed to support the C library calls, Guardian procedure calls, and SPI
procedure calls used by the application are included.
3. Functions defined by the application are declared.
4. The C language versions of the DDL files defining trap event tokens are included.
insert_null()
(Format a string)
print_octetstring()
(Format an OCTET STRING value)
SNMP Configuration and Management Manual—424777-006
send_spi_cmd()
(Send SPI command to
distributor and process
response)
Example 12-3
12-52
Application Source Code
VST1104.vsd
at the end of this

Advertisement

Table of Contents
loading

This manual is also suitable for:

T9576h01

Table of Contents