SNMP Manager Programmer's Guide

Encoding and Decoding Packets
SNMP Manager Programmer’s Guide–134249
6-12
EBufferSetup()
buffer
a pointer to the descriptor structure for the buffer whose buffer descriptors you want
reset.
The following call resets buffer descriptors in ebuff:
EBUFFER_T ebuff;
EBufferReset(&ebuff);
EBufferSetup()
This function initializes buffer descriptors for a buffer you have obtained static or
dynamic memory for, setting start_bp and next_bp to point to the first byte in the buffer
and the value of remaining to the number of bytes you allocated.
BFL_IS_DYNAMIC
BFL_IS_STATIC
are Manager Services defines indicating whether you allocated dynamic or static
memory, respectively, for the buffer.
buffer
a pointer to the descriptor structure for the buffer for which you want buffer
descriptors initialized.
start-byte
is the location of the buffer.
num-bytes
is the number of bytes you allocated for the buffer.
flags
is one of the following integers corresponding to the define you specify in your first
argument:
0 (BFL_IS_DYNAMIC)
1 (BFL_IS_STATIC)
EBufferSetup( {BFL_IS_DYNAMIC | BFL_IS_STATIC},
buffer, start-byte, num-bytes);
void EBufferSetup (unsigned int flags,
EBUFFER_T *buffer,
OCTET_T *start-byte,
ALENGTH_T num-bytes);