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

Technical Reference: Communications, Volume 2


readobjects Subroutine

Purpose

Allows the SNMP multiplexing (SMUX) peer to read the Management Information Base (MIB) variable structure.

Library

SNMP Library (libsnmp.a)

Syntax

#include <isode/snmp/objects.h>


int
readobjects (
file)
char *file;

Description

The readobjects subroutine reads the file given in the file parameter. This file must contain the MIB variable descriptions that the SMUX peer supports. The SNMP library functions require basic information about the MIB tree supported by the SMUX peer. These structures are supplied from information in the readobjects file. The text2oid subroutine receives a string description and uses the object identifier information retrieved with the readobjects subroutine to return a MIB object identifier. The file designated in the file parameter must be in the following form:

<MIB directory> <MIB position>
   
<MIB name> <MIB position> <MIB type> <MIB access> <MIB required?>
<MIB name> <MIB position> <MIB type> <MIB access> <MIB required?>
...

An example of a file that uses this format is /etc/mib.defs. The /etc/mib.defs file defines the MIBII tree used in the SNMP agent.

Parameters


file Contains the name of the file to be read. If the value is NULL, the /etc/mib.defs file is read.

Return Values

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

Implementation Specifics

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

Related Information

The text2oid subroutine.

List of Network Manager Programming References.

RFC 1155 describes the basic MIB structure.

SNMP Overview for Programmers in AIX 5L Version 5.1 Communications Programming Concepts.


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