Trap Multiplexer Subagent/Manager
SNMP Configuration and Management Manual — 424777-006
12 -58
Application Source Code
/************************************************************************/
#pragma PAGE "spi_cmd_set_source()"
/* builds a spi command that directs the distributor to use a collector
as a source of event messages
Input : Spi buffer, Collector name, and Distributor file number
Return : None
*/
void spi_cmd_set_source (char* spi_buf, char* coll_name, short distr) <-- 6
{
/* initialize the spi_buf for distributor control command */
spi_err = SSINIT((short*)spi_buf, /* buffer */
ZEMS_VAL_BUFLEN, /* buffer-length */
(short*)&emsssid, /* ssid */
ZSPI_VAL_CMDHDR, /* header-type */
ZEMS_CMD_CONTROL); /* command */
if (spi_err != ZSPI_ERR_OK)
DEBUG();
/* place the connect-source-token in buffer */
spi_err = SSPUTTKN((short*)spi_buf, /* buffer */
ZEMS_TKN_CONNECT_SRC_COLL, /* token-id */
coll_name); /* token-value */
if (spi_err != ZSPI_ERR_OK)
DEBUG();
/* send the command to the distributor */
send_spi_cmd (spi_buf, distr);
} /* spi_cmd_set_source */
/************************************************************************/
#pragma PAGE "spi_cmd_load_filter()"
/* builds a SPI command that loads a filter into the distributor and
passes one filter parameter
Input : SPI buffer, filter name, and distributor file number
Return : None
*/
void spi_cmd_load_filter(char* spi_buf, char* filt_name, short distr) <-- 7
{
/* initialize the spi_buf for distributor control commmand */
spi_err = SSINIT((short*)spi_buf, /* buffer */
ZEMS_VAL_BUFLEN, /* buffer-length */
(short*)&emsssid, /* ssid */
ZSPI_VAL_CMDHDR, /* header-type */
ZEMS_CMD_CONTROL); /* command */
if (spi_err != ZSPI_ERR_OK)
DEBUG();
/* place the load filter token in the buffer */
spi_err = SSPUTTKN((short*)spi_buf, /* buffer */
ZEMS_TKN_FILTERFILE, /* token-id */
filt_name); /* token-value */
if (spi_err != ZSPI_ERR_OK)
DEBUG();
Example 12-3. Sample Application Source Code
(page 3 of 14)
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 ...