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

Technical Reference: Communications, Volume 2


smux_simple_open Subroutine

Purpose

Sends the open protocol data unit (PDU) to the Simple Network Management Protocol (SNMP) daemon.

Library

SNMP Library (libsnmp.a)

Syntax

#include <isode/snmp/smux.h>


int smux_simple_open (identity, description, commname, commlen)
OID identity;
char * description;
char * commname;
int commlen;

Description

Following the smux_init command, the smux_simple_open subroutine alerts the SNMP daemon that incoming messages are expected. Communication with the SNMP daemon is accomplished by sending an open PDU to the SNMP daemon. The smux_simple_open subroutine uses the identity object-identifier parameter to identify the SNMP multiplexing (SMUX) peer that is starting to communicate. The description parameter describes the SMUX peer. The commname and the commlen parameters supply the password portion of the open PDU. The commname parameter is the password used to authenticate the SMUX peer. The SNMP daemon finds the password in the /etc/snmpd.conf file. The SMUX peer can store the password in the /etc/snmpd.peers file. The commlen parameter specifies the length of the commname parameter value.

Parameters


identity Specifies an object identifier that describes the SMUX peer.
description Contains a string of characters that describes the SMUX peer. The description parameter value cannot be longer than 254 characters.
commname Contains the password to be sent to the SNMP agent. Can be a null value.
commlen Indicates the length of the community name (commname parameter) to be sent to the SNMP agent. The value for this parameter must be at least 0.

Return Values

The subroutine returns an integer value of OK on success or NOTOK on failure.

Error Codes

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

parameterMissing Indicates that a parameter was null. The commname parameter can be null, but the commlen parameter value should be at least 0.
invalidOperation Indicates that the smux_init subroutine did not complete successfully before the smux_simple_open subroutine was attempted. Correct the parameters and reissue the smux_simple_open subroutine.
inProgress Indicates that the smux_init call has not completed the TCP connection. The smux_simple_open can be reissued.
systemError Indicates the TCP connection was not completed. Do not reissue this subroutine without restarting the process with a smux_init subroutine call.
congestion Indicates a lack of available memory space. Do not reissue this subroutine without restarting the process with a smux_init subroutine call.
youLoseBig The SNMP code is having problems. Do not reissue this subroutine without restarting the process with a smux_init subroutine call.

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_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 ]