smiOCTETS

[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; 
 

Members

len
Specifies an unsigned long integer value that indicates the number of bytes in the octet string array pointed to by the ptr member.
ptr
Pointer to a byte array that contains the octet string of interest. A NULL-terminating byte is not required.

Remarks

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.

QuickInfo

  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.

See Also

WinSNMP Manager API Overview, WinSNMP Structures, SnmpStrToContext, SnmpContextToStr, SnmpEncodeMsg, SnmpDecodeMsg, SnmpFreeDescriptor, smiVALUE