HP T9576G06 Management Manual page 545

Snmp configuration and management manual
Table of Contents

Advertisement

Trap Multiplexer Subagent/Manager
5. The function named send_spi_cmd() sends SPI commands built by other functions
to the distributor and processes the response.
6. The function named spi_cmd_set_source() builds SPI commands to identify the
EMS collector from which events are to be retrieved and then calls
send_spi_cmd().
7. The function named spi_cmd_load_filter() builds SPI commands to identify the
EMS filter to use and then calls send_spi_cmd().
8. The function named insert_null() terminates string values with a NULL character so
that printf can be used to display these values.
9. The function named print_octetstring() formats an OCTET STRING value by
replacing nonprintable characters with a period.
10. The function named getevent_loop() is an infinite loop that uses SPI commands to
retrieve events and parse their tokens and then displays token values.
11. Storage for SNMP data is declared. Most values are allocated storage by using
compatible ZSPI data types. Values that the application treats as strings (OCTET
STRING, OBJECT IDENTIFIER, IpAddress, and Opaque values) are stored in a
1024-byte buffer named t_buffer. The following table summarizes the SPI and C
types you can use when declaring storage for trap data:
Trap Data
SNMP version number
Community value
Enterprise value
IP address
Generic trap type
Specific trap type
Timestamp value
Varbind count
Varbind data type
Varbind object identifier
INTEGER value
Counter value
Gauge value
OBJECT IDENTIFIER value
OctetString value
Opaque value
IpAddress value
NULL value
TimeTicks value
SPI Data Type
zspi_ddl_int2_def
zspi_ddl_char_def
zspi_ddl_char_def
zspi_ddl_char_def
zspi_ddl_int2_def
zspi_ddl_int2_def
zspi_ddl_int2_def
zspi_ddl_int_def
zspi_ddl_enum_def
zspi_ddl_char_def
zspi_ddl_int2_def
zspi_ddl_int2_def
zspi_ddl_int2_def
zspi_ddl_char_def
zspi_ddl_char_def
zspi_ddl_char_def
zspi_ddl_char_def
zspi_tdt_undef
zspi_ddl_int2_def
SNMP Configuration and Management Manual—424777-006
C (Wide Model) Data Type
int
char*
char*
char*
int
int
int
short
short
char*
int
int
int
char
char*
char*
char*
int
12-53
Application Source Code

Advertisement

Table of Contents
loading

This manual is also suitable for:

T9576h01

Table of Contents