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

Technical Reference: Communications, Volume 2

text2oid or text2obj Subroutine

Purpose

Converts a text string into some other value.

Library

SNMP Library (libsnmp.a)

Syntax

#include <isode/snmp/objects.h>


OID text2oid ( text)
char *text;

OT text2obj (text)
char *text;

Description

The text2oid subroutine takes a character string and returns an object identifier. The string can be a name, a name.numbers, or dot notation. The returned object identifier is in memory-allocation storage and should be freed when the operation is completed with the oid_free subroutine.

The text2obj subroutine takes a character string and returns an object. The string needs to be the name of a specific object. The subroutine returns a pointer to the object.

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

Parameters

text Contains a text string used to specify the object identifier or object to be returned.

Return Values

On a successful execution, these subroutines return completed data structures. If a failure occurs, the text2oid subroutine returns a NULLOID value and the text2obj returns a NULLOT value.

Related Information

The malloc subroutine, oid_free subroutine, text2inst 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 ]