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

Tcp/ip services for openvms
Table of Contents

Advertisement

o_string

Loads a string value into the VARBIND structure with the appropriate type. This
function does not allocate the VARBIND structure.
Format
int o_string ( 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.
ptr
The pointer to the buffer containing data to be inserted into the VARBIND
structure as data.
len
The length of the data in buffer pointed to by ptr.
The real type as defined in the object structure must be one of the following;
otherwise, an error is returned.
ESNMP_TYPE_OCTET_
STRING
ESNMP_TYPE_IpAddress
ESNMP_TYPE_DisplayString
ESNMP_TYPE_NsapAddress
ESNMP_TYPE_Opaque
ESNMP_TYPE_OBJECT_
IDENTIFIER
Return Values
ESNMP_MTHD_noError
ESNMP_MTHD_genErr
OBJECT *obj,
unsigned character *ptr,
int len );
The routine completed successfully.
An error occurred.
eSNMP API Routines
Octet string (ASN.1)
Implicit octet string (4) (in octet form, network
byte order)
DisplayString (textual convention)
Implicit octet string
Implicit octet string
Object identifier (ASN.1) (in dot notation, for
example: 1.3.4.6.3)
eSNMP API Routines 5–35
o_string
malloc
command to
OID

Advertisement

Table of Contents
loading

Table of Contents