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

Technical Reference: Communications, Volume 2

oid_extend or oid_normalize Subroutine


Extends the base ISODE library subroutines.


SNMP Library (libsnmp.a)


#include <isode/snmp/objects.h>

OID oid_extend (q, howmuch)
OID q;
integer howmuch;

OID oid_normalize (q, howmuch, initial)
OID q;
integer howmuch, initial;


The oid_extend subroutine is used to extend the current object identifier data (OID) structure. The OID structure contains an integer number of entries and an array of integers. The oid_extend subroutine creates a new, extended OID structure with an array of the size specified in the howmuch parameter plus the original array size specified in the q parameter. The original values are copied into the first entries of the new structure. The new values are uninitialized. The entries of the OID structure are used to represent the values of an Management Information Base (MIB) tree in dot notation. Each entry represents a level in the MIB tree.

The oid_normalize subroutine extends and adjusts the values of the OID structure entries. The oid_normalize subroutine extends the OID structure and then decrements all nonzero values by 1. The new values are initialized to the value of the initial parameter. This subroutine stores network address and netmask information in the OID structure.

These subroutines do not free the q parameter.


q Specifies the size of the original array.
howmuch Specifies the size of the array for the new OID structure.
initial Indicates the initialized value of the OID structure extensions.

Return Values

Both subroutines, when successful, return the pointer to the new object identifier structure. If the subroutines fail, the NULLOID value is returned.

Implementation Specifics

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

Related Information

The oid_cmp, oid_cpy, oid_free, sprintoid, str2oid, ode2oid, oid2ode, oid2ode_aux, prim2oid, or oid2prim subroutine.

List of Network Manager Programming References.

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

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