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

Technical Reference: Communications, Volume 2


smux_register Subroutine

Purpose

Registers a section of the Management Information Base (MIB) tree with the Simple Network Management Protocol (SNMP) agent.

Library

SNMP Library (libsnmp.a)

Syntax

#include <isode/snmp/smux.h>


int smux_register ( subtree, priority, operation)

OID subtree;
int priority;
int operation;

Description

The smux_register subroutine registers the section of the MIB tree for which the SMUX peer is responsible with the SNMP agent. Using the smux_register subroutine, the SMUX peer informs the SNMP agent of both the level of responsibility the SMUX peer has and the sections of the MIB tree for which it is responsible. The level of responsibility (priority) the SMUX peer sends determines which requests it can answer. Lower priority numbers correspond to higher priority.

If a tree is registered more than once, the SNMP agent sends requests to the registered SMUX peer with the highest priority. If the priority is set to -1, the SNMP agent attempts to give the SMUX peer the highest available priority. The operation parameter defines whether the MIB tree is added with readOnly or readWrite permissions, or if it should be deleted from the list of register trees. The SNMP agent returns an acknowledgment of the registration. The acknowledgment indicates the success of the registration and the actual priority received.

Parameters


subtree Indicates an object identifier that contains the root of the MIB tree to be registered.
priority Indicates the level of responsibility that the SMUX peer has on the MIB tree. The priority levels range from 0 to (2^31 - 2). The lower the priority number, the higher the priority. A priority of -1 tells the SNMP daemon to assign the highest priority currently available.
operation Specifies the operation for the SNMP agent to apply to the MIB tree. Possible values are delete, readOnly, or readWrite. The delete operation removes the MIB tree from the SMUX peers in the eyes of the SNMP agent. The other two values specify the operations allowed by the SMUX peer on the MIB tree that is being registered with the SNMP agent.

Return Values

The values returned by this subroutine are OK on success and NOTOK on failure.

Error Codes

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

parameterMissing Indicates a parameter was null. When the parameter is fixed, the smux_register subroutine can be reissued.
invalidOperation Indicates that the smux_register subroutine is trying to perform this operation before a smux_init operation has successfully completed. Start over with a new smux_init subroutine call.
congestion Indicates a memory problem occurred. The TCP connection is closed. Start over with a new smux_init subroutine call.
youLoseBig Indicates an SNMP code problem has occurred. The TCP connection is closed. Start over with a new 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_response subroutine, smux_simple_open subroutine, smux_trap subroutine, smux_wait subroutine.

List of Network Manager Programming References.

RFC1227, 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 ]