smiOCTETS structure (winsnmp.h)

[SNMP is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use Windows Remote Management, which is the Microsoft implementation of WS-Man.]

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.

Syntax

typedef struct {
  smiUINT32 len;
  smiLPBYTE ptr;
} 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 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.

Requirements

   
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header winsnmp.h

See also

SnmpContextToStr

SnmpDecodeMsg

SnmpEncodeMsg

SnmpFreeDescriptor

SnmpStrToContext

WinSNMP API Overview

WinSNMP Structures

smiVALUE