beautypg.com

O_integer – Compaq AAR04BCTE User Manual

Page 89

background image

eSNMP API Routines

o_integer

o_integer

Loads an integer value into the VARBIND structure with the appropriate type.
This function does not allocate the VARBIND structure.

Format

int o_integer

( VARBIND *vb,
OBJECT *obj,
unsigned long value );

Arguments

vb

A pointer to the VARBIND structure that is supposed to receive the data.

obj

A pointer to the

OBJECT

structure for the MIB variable associated with the

OID

in

the VARBIND structure.

value

The value to be inserted into the VARBIND structure.

The real type as defined in the object structure must be one of the following;
otherwise, an error is returned.

ESNMP_TYPE_Integer32

32-bit integer

ESNMP_TYPE_Counter32

32-bit counter (unsigned)

ESNMP_TYPE_Gauge32

32-bit gauge (unsigned)

ESNMP_TYPE_TimeTicks

32-bit timeticks (unsigned)

ESNMP_TYPE_UInteger32

32-bit integer (unsigned)

ESNMP_TYPE_Counter64

64-bit counter (unsigned)

ESNMP_TYPE_IpAddress

Implicit octet string (4)

Note

If the real type is

IpAddress

, then eSNMP assumes that the 4-byte

integer is in network byte order and packages it into an octet string.

Return Values

ESNMP_MTHD_noError

The routine completed successfully.

ESNMP_MTHD_genErr

An error has occurred.

eSNMP API Routines 5–31