SNMP Manager Programmer's Guide
Reference Summary
SNMP Manager Programmer’s Guide–134249
9-43
Managing the Encoded-Packet Buffer
EBufferUsed()
This function returns the number of used bytes in an EBUFFER_T buffer. This value is
derived by counting the number of bytes between start_bp and next_bp:
SNMP_memory_alloc()
This function allocates buffer memory dynamically. It is a define for the C function
malloc.
start-ptr = EBufferStart(buffer);
OCTET_T* EBufferStart(*buffer);
start-ptr
Where to return the value of start_bp.
buffer
A pointer to the descriptor structure from which you want to
retrieve the value of start_bp.
used-bytes = EBufferUsed(buffer);
ALENGTH_T EbufferUsed(EBUFFER_T *buffer);
used-bytes
An integer indicating the number of used bytes in the buffer.
buffer
A pointer to the descriptor structure from which you want to
retrieve the number of used bytes.
SNMP_memory_alloc(need);
#define SNMP_memory_alloc(need) malloc(need)
need
The number of bytes to dynamically allocate.
904
remaining
start_bp next_bp
(EBufferUsed())