SNMP Manager Programmer's Guide

Reference Summary
SNMP Manager Programmer’s Guide–134249
9-33
Binding MIB Objects
SNMP_Bind_Unsigned_Integer()
This function associates a variable binding of type Counter, Gauge, Timeticks, or
UINTEGER32 with a packet previously initialized with SNMP_Create_Request() or
SNMP_Create_Trap().
value-length
The number of bytes in the value.
value
A pointer to a buffer containing the string value.
buffer-flag
An indication of whether you want Manager Services to allocate
dynamic memory for holding a copy of your string value or to
use a buffer you have already allocated for it. Specify one of
these values:
0 indicates dynamic memory
1 indicates existing buffer
rcode = SNMP_Bind_Unsigned_Integer(packet,
index,
instance-count,
instance-components,
data-type,
value,);
int SNMP_Bind_Unsigned_Integer(SNMP_PKT_T *packet,
int index,
int instance-count,
OIDC_T *instance-
components,
OCTET_T data-type,
UINT_32_T value,);
rcode
A return integer indicating whether the call succeeded. A value
of 0 indicates success, and -1 indicates failure.
packet
A pointer to an initialized request or trap packet.
index
A zero-based index value indicating the position into which to
bind the MIB variable in a list of variable bindings. A value of 0
binds the variable at the front of the list, 1 binds the variable into
the second position, and so forth. The order in which you assign
variable bindings to a list is irrelevant. For example, if you have
two variable bindings, you can use an index value of 1 in the first
SNMP_Bind_ call and a value of 0 in the second call to bind the
variables into the second and first positions, respectively.
instance-
count
The number of components in the instance identifier whose value
you supply in instance-components. For example, an
instance identifier of 1.2.3.4 has a component count of 4.