Trap Multiplexer Subagent/Manager
SNMP Configuration and Management Manual — 424777-006
12 -52
Application Source Code
•
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.
Application Source Code
The source code for the sample application, shown
Example 12-3
at the end of this
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.
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)
send_spi_cmd()
(Send SPI command to
distributor and process
response)
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
insert_null()
(Format a string)
print_octetstring()
(Format an OCTET STRING value)
Close distributor process
VST1104.vsd
Summary of Contents for T9576G06
Page 24: ...Contents SNMP Configuration and Management Manual 424777 006 xxii Tables continued ...
Page 38: ...Part I Installing and Configuring SNMP SNMP Configuration and Management Manual 424777 006 ...
Page 140: ...Part II SCF for the SNMP Agent SNMP Configuration and Management Manual 424777 006 ...
Page 208: ...Part III Troubleshooting SNMP Configuration and Management Manual 424777 006 ...
Page 230: ...Part IV SNMP Subagents SNMP Configuration and Management Manual 424777 006 ...
Page 704: ...Part V Appendices SNMP Configuration and Management Manual 424777 006 ...
Page 778: ...Index SNMP Configuration and Management Manual 424777 006 Index 32 Special Characters ...