This general macro sends a Simple Network Management Protocol (SNMP)
enterprise-specific trap to the remote SNMP destination managers specified in
the /etc/snmp.cfg SNMP configuration file.
Format
- label
- is a symbolic name that can be assigned to the macro statement.
- VARLIST
- specifies a pointer to the variable binding list associated with the SNMP
enterprise-specific trap being generated. See TPF
Transmission Control Protocol/Internet Protocol for information about
the variable binding lists and enterprise-specific traps used with SNMP agent
support.
- Rx
- is the register in the range R1-R7 that contains the pointer to the
variable binding list.
- VARLEN
- specifies the length, in bytes, of the list specified with the VARLIST
parameter.
- Ry
- is the register in the range R1-R7 that contains the length of the
variable binding list.
- SPECTRAP
- specifies an implementation-specific value for the SNMP
enterprise-specific trap that describes the trap being generated. See
TPF Transmission Control Protocol/Internet Protocol
for information about the enterprise-specific traps used with SNMP agent
support.
- Rz
- is the register in the range R1-R7 that contains the value of the
SNMP enterprise-specific trap.
Entry Requirements
None.
Return Conditions
If an attempt to build an SNMP enterprise-specific trap is successful, R0
will contain a return code of 0. If an attempt to build an SNMP
enterprise-specific trap is unsuccessful, R0 will contain one of the following
error returns:
Table 7. ITRPC Error Return
Value Name
| Return Code
| Description
|
ISNMP_ITRPC_STATE_ERROR
| -1
| The TPF system is not in CRAS state or above.
|
ISNMP_ITRPC_CONFIG_ERROR
| -2
| The /etc/snmp.cfg SNMP configuration file was not
refreshed successfully.
Do the following:
- Create or fix the /etc/snmp.cfg SNMP configuration
file.
- Enter the ZSNMP command with the REFRESH parameter specified.
- Issue the ITRPC macro again.
|
ISNMP_ITRPC_NO_TRAPS
| -3
| The /etc/snmp.cfg SNMP configuration file specifies
that the TRAPIP keyword is coded as NONE, disabling SNMP trap support.
If you want to send traps, code the TRAPIP keyword on the
/etc/snmp.cfg SNMP configuration file with a valid SNMP
destination manager IP address or host name.
|
ISNMP_ITRPC_ENCODE_ERROR
| -4
| An error occurred when encoding one of the trap values.
|
ISNMP_ITRPC_SIZE_ERROR
| -5
| The size of the trap exceeded the maximum message size of 548
bytes.
|
- Note:
- These equates are defined in the ISNMP DSECT.
Programming Considerations
- The TPF system must be in CRAS state or above to use this macro.
- The variable binding list must be in the correct SNMP basic encoding rules
(BER) format. For information about BER encoding, see ISO 8825
Part 1: Basic Encoding Rules. Go to http://www.iso.ch/ to view ISO
8825.
- Ensure that the /etc/snmp.cfg SNMP configuration file
has been refreshed successfully by entering the ZSNMP command with the REFRESH
parameter specified.
- Ensure that TCP/IP native stack support is defined to the TPF
system. See TPF Transmission Control
Protocol/Internet Protocol for information about defining TCP/IP native
stack support.
Examples
The following example sends enterprise-specific trap 5 as defined by the
SPECTRAP parameter to all the SNMP destination managers specified in the
/etc/snmp.cfg SNMP configuration file. This trap
contains no variable binding list.
LA R1,5
ITRPC SPECTRAP=R1