SNMP Manager Programmer's Guide

Reference Summary
SNMP Manager Programmer’s Guide134249
9-36
Packet Encoding and Decoding Functions
Packet Encoding and Decoding Functions
Managing the Encoded-Packet Buffer
Summary of Buffer Management Functions
Function Description
EBufferClean() Releases dynamically obtained memory for a buffer and calls
EBufferInitialize().
EBufferClone() Copies a buffer into a second buffer after dynamically
allocating memory for it, duplicating the source buffer’s
contents and descriptors.
EBufferInitialize() Initializes descriptors for a buffer that has no memory
allocated for it, setting them all to 0.
EBufferNext() Returns the value of next_bp, the buffer descriptor pointing to
the next unused byte in the buffer.
EBufferPreLoad() Sets up buffer descriptors for a buffer to which you have
already written information but have not initialized.
EBufferRemaining() Returns the value of remaining, the buffer descriptor
indicating the number of bytes still available in the buffer.
EBufferReset() Resets the buffer descriptors for a buffer already allocated;
start_bp and next_bp are set to point to the start of the buffer,
and the number of bytes allocated is assigned to
remaining.
EBufferSetup() Initializes descriptors for a buffer for which you have
allocated memory; start_bp and next_bp are set to point to
the start of the buffer, and the number of bytes allocated is
assigned to remaining.
EBufferStart() Returns the value of start_bp, the buffer descriptor pointing to
the first byte of interest.
EBufferUsed() Returns the number of used bytes in the buffer.
SNMP_memory_alloc() Dynamically allocates memory for the buffer.