Sends SNMP multiplexing (SMUX) peer traps to the Simple Network Management Protocol (SNMP) agent.
SNMP Library (libsnmp.a)
The smux_trap subroutine allows the SMUX peer to generate traps and send them to the SNMP agent. The subroutine sets the generic and specific fields in the trap packet to values specified by the parameters. The subroutine also allows the SMUX peer to send a list of variable bindings to the SNMP agent. The variable bindings are values associated with specific variables. If the trap is to return a set of variables, the variables are sent in the variable binding list.
This subroutine is part of the SNMP Application Programming Interface in the TCP/IP facility.
Item | Description |
---|---|
generic | Contains an integer specifying the generic trap type. The
value must be one of the following:
|
specific | Contains an integer that uniquely identifies the trap. The unique identity is typically assigned by the registration authority for the enterprise owning the SMUX peer. |
bindings | Indicates the variable bindings to assign to the trap protocol data unit (PDU). |
The subroutine returns NOTOK on failure and OK on success.
If the subroutine is unsuccessful, the smux_errno global variable is set to one of the following values:
Value | Description |
---|---|
invalidOperation | Indicates the Transmission Control Protocol (TCP) connection was not completed. |
congestion | Indicates memory is not available. The TCP connection was closed. |
youLoseBig | Indicates an error occurred in the SNMP code. The TCP connection was closed. |