[This is preliminary documentation and subject to change.]
The WinSNMP smiOCTETS structure passes context strings to multiple WinSNMP functions. The structure also describes and receives encoded SNMP messages.
The smiOCTETS structure contains a pointer to an SNMP octet string of variable length. The structure can be a member of the smiVALUE structure.
typedef struct {
smiUINT32 len; // number of bytes in the octet string
smiLPBYTE ptr; // pointer to an octet string
} smiOCTETS, *smiLPOCTETS;
The Microsoft WinSNMP implementation allocates and deallocates memory for all output smiOCTETS structures. The WinSNMP manager application should not free memory that the implementation allocates for the ptr member of an smiOCTETS structure. Instead, the application must call the SnmpFreeDescriptor function to free the memory.
Because the WinSNMP manager application allocates memory for input descriptor objects with variable lengths, it must free that memory. For additional information, see WinSNMP Data Management Concepts.
Windows NT: Requires version 5.0 or later. Available as a redistributable for Windows NT 4.0.
Windows: Unsupported.
Windows CE: Unsupported.
Header: Declared in winsnmp.h.
WinSNMP Manager API Overview, WinSNMP Structures, SnmpStrToContext, SnmpContextToStr, SnmpEncodeMsg, SnmpDecodeMsg, SnmpFreeDescriptor, smiVALUE