SNMP Manager Programmer's Guide
Encoding and Decoding Packets
SNMP Manager Programmer’s Guide–134249
6-6
Using a Buffer for General Purposes
•
EBufferPreLoad() sets up buffer descriptors for a buffer to which you have already
written information but have not initialized using the buffer functions:
EBufferPreLoad(BFL_IS_DYNAMIC, &ebuff, buffp, length);
•
EBufferClone() copies a buffer into a second buffer it dynamically allocates,
duplicating the contents of the source buffer and its buffer descriptors in the
destination buffer:
rcode = EBufferClone(&buffsrc, &buffdest);
605
ebuff
next_bpstart_bp
remaining = 0
buffp
length
ebuff
EBufferPreLoad()
606
buffsrc
remaining
start_bp next_bp
buffdest
remaining
start_bp next_bp
EBufferClone()