Initiates the transmission control protocol (TCP) socket that the SNMP multiplexing (SMUX) agent uses and clears the basic SMUX data structures.
#include <isode/snmp/smux.h>
int smux_init (debug) int debug;
The smux_init subroutine initializes the TCP socket used by the SMUX agent to talk to the SNMP daemon. The subroutine assumes that loopback will be used to define the path to the SNMP daemon. The subroutine also clears the base structures the SMUX code uses. This subroutine also sets the debug level that is used when running the SMUX subroutines.
debug | Indicates the level of debug to be printed during SMUX subroutines. |
If the subroutine is successful, the socket descriptor is returned. Otherwise, the value of NOTOK is returned and the smux_errno global variable is set.
Possible values for the smux_errno global variable are:
congestion | Indicates memory allocation problems |
youLoseBig | Signifies problem with SNMP library code |
systemError | Indicates TCP connection failure. |
These are defined in the /usr/include/isode/snmp/smux.h file.
This subroutine is part of the SNMP Application Programming Interface in the TCP/IP facility.
The smux_close subroutine, smux_error subroutine, smux_register subroutine, smux_response subroutine, smux_simple_open subroutine, smux_trap subroutine, smux_wait subroutine.
List of Network Manager Programming References.
RFC 1227, SNMP MUX Protocol and MIB.
SNMP Overview for Programmers in AIX Version 4.3 Communications Programming Concepts.