O_Oid - Compaq TCP/IP Services for OpenVMS Programming And Reference Manual

Tcp/ip services for openvms
Table of Contents

Advertisement

eSNMP API Routines

o_oid

o_oid
Loads an
function does not allocate the VARBIND structure.
Format
int o_oid ( VARBIND *vb,
Arguments
vb
A pointer to the VARBIND structure that is supposed to receive the data.
If the original value in the VARBIND structure is not null, this routine attempts
to free it. So if you dynamically allocate memory or issue the
allocate your own VARBIND structure, fill the structure with zeros before using
it.
obj
A pointer to the OBJECT structure for the MIB variable associated with the
in the VARBIND structure.
oid
The value to be inserted into the VARBIND structure as data. For more
information about OID length and values, see Chapter 3.
The real type as defined in the object structure must be ESNMP_TYPE_OBJECT_
IDENTIFIER.
Return Values
ESNMP_MTHD_noError
ESNMP_MTHD_genErr
Example
#include <esnmp.h>
#include "ip_tbl.h" <-- for ipNetToMediaEntry_type definition
VARBIND
OBJECT
ipNetToMediaEntry_type *data;
:
: assume buffer and structure member assignments occur here
:
switch(arg) {
case I_atObjectID:
return o_oid(vb, object, &data->ipNetToMediaObjectID);
5–34 eSNMP API Routines
value into the VARBIND structure with the appropriate type. This
OID
OBJECT *obj,
OID *oid );
*vb
= method->varbind;
*object
= method->object;
The routine completed successfully.
An error occurred.
command to
malloc
OID

Advertisement

Table of Contents
loading

Table of Contents