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

Technical Reference: Communications, Volume 2

smux_init Subroutine


Initiates the transmission control protocol (TCP) socket that the SNMP multiplexing (SMUX) agent uses and clears the basic SMUX data structures.


SNMP Library (libsnmp.a)


#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.

Return Values

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.

Error Codes

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.

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_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 5L Version 5.1 Communications Programming Concepts.

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