[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Communications Technical Reference, Volume 2

smux_close Subroutine

Purpose

Ends communications with the SNMP agent.

Library

SNMP Library (libsnmp.a)

Syntax

#include <isode/snmp/smux.h>
int smux_close (reason)
int reason;

Description

The smux_close subroutine closes the transmission control protocol (TCP) connection from the SNMP multiplexing (SMUX) peer. The smux_close subroutine sends the close protocol data unit (PDU) with the error code set to the reason value. The subroutine closes the TCP connection and frees the socket. This subroutine also frees information it was maintaining for the connection.

Parameters

reason Indicates an integer value denoting the reason the close PDU message is being sent.

Return Values

If the subroutine is successful, OK is returned. Otherwise, NOTOK is returned.

Error Codes

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

invalidOperation Indicates that the smux_init subroutine has not been executed successfully.
congestion Indicates that memory could not be allocated for the close PDU. The TCP connection is closed.
youLoseBig Indicates that the SNMP code has a problem. The TCP connection is closed.

Implementation Specifics

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

Related Information

The smux_error subroutine, smux_init 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.


[ Previous | Next | Contents | Glossary | Home | Search ]