Converts a text string into some other value.
SNMP Library (libsnmp.a)
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.
Item | Description |
---|---|
text | Contains a text string used to specify the object identifier or object to be returned. |
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.