Platform SDK: Network Management |
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 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 application allocates memory for input descriptor objects with variable lengths, it must free that memory. For more information, see WinSNMP Data Management Concepts.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Winsnmp.h.
WinSNMP API Overview, WinSNMP Structures, SnmpStrToContext, SnmpContextToStr, SnmpEncodeMsg, SnmpDecodeMsg, SnmpFreeDescriptor, smiVALUE