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

Technical Reference: Communications, Volume 2

text2inst, name2inst, next2inst, or nextot2inst Subroutine

Purpose

Retrieves instances of variables from various forms of data.

Library

SNMP Library (libsnmp.a)

Syntax

#include <isode/snmp/objects.h>


OI text2inst ( text)
char *text;


OI name2inst ( oid)
OID oid;

OI next2inst (oid)
OID oid;


OI nextot2inst (oid, ot)
OID oid;
OT ot;

Description

These subroutines return pointers to the actual objects in the database. When supplied with a way to identify the object, the subroutines return the corresponding object.

The text2inst subroutine takes a character string object identifier from the text parameter. The object's database is then examined for the specified object. If the specific object is not found, the NULLOI value is returned.

The name2inst subroutine uses an object identifier structure specified in the oid parameter to specify which object is desired. If the object cannot be found, a NULLOI value is returned.

The next2inst and nextot2inst subroutines find the next object in the database given an object identifier. The next2inst subroutine starts at the root of the tree, while the nextot2inst subroutine starts at the object given in the ot parameter. If another object cannot be found, the NULLOI value will be returned.

These subroutines are part of the SNMP Application Programming Interface in the TCP/IP facility.

Parameters

text Specifies the character string used to identify the object wanted in the text2inst subroutine.
oid Specifies the object identifier structure used to identify the object wanted in the name2inst, next2inst, and nextot2inst subroutines.
ot Specifies an object in the database used as a starting point for the nextot2inst subroutine.

Return Values

If the subroutine is successful, an OI value is returned. OI is a pointer to an object in the database. On a failure, a NULLOI value is returned.

Related Information

The text2oid subroutine, text2obj subroutine.

List of Network Manager Programming References.

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

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