[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Communications, Volume 2

smux_trap Subroutine


Sends SNMP multiplexing (SMUX) peer traps to the Simple Network Management Protocol (SNMP) agent.


SNMP Library (libsnmp.a)


#include <isode/snmp/smux.h>

int smux_trap ( generic, specific, bindings)

int generic;
int specific;
struct type_SNMP_VarBindList *bindings;


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.


generic Contains an integer specifying the generic trap type. The value must be one of the following:

Specifies a cold start.

Specifies a warm start.

Specifies a link down.

Specifies a link up.

Specifies an authentication failure.

Specifies an EGP neighbor loss.

Specifies an enterprise-specific trap type.
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).

Return Values

The subroutine returns NOTOK on failure and OK on success.

Error Codes

If the subroutine is unsuccessful, the smux_errno global variable is set to one of the following values:

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.

Implementation Specifics

This subroutine is part of the SNMP Application Programming Interface in the TCP/IP facility.

Related Information

The smux_close subroutine, smux_error subroutine, smux_init subroutine, smux_register subroutine, smux_response subroutine, smux_simple_open subroutine, smux_wait subroutine.

List of Network Manager Programming References.

RFC 1227, SNMP MUX Protocol and MIB.

SNMP Overview for Programmers in AIX 5L Version 5.1 Communications Programming Concepts.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]