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

Item Description
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.