AsnOctetString structure (snmp.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 AsnOctetString structure contains octet quantities, usually bytes. This structure is used by multiple SNMP functions. This structure is not used by the WinSNMP API functions.

Syntax

typedef struct {
  BYTE *stream;
  UINT length;
  BOOL dynamic;
} AsnOctetString;

Members

stream

Pointer to the octet stream.

length

The number of octets in the data stream.

dynamic

Flag that specifies whether the data stream has been dynamically allocated with the SnmpUtilMemAlloc function.

Remarks

Use the AsnOctetString structure to transfer string values. For example, use it to transfer the string that represents a computer name as a MIB object value.

You must check the flag specified in the dynamic member before you release the data stream of an octet string. Call the SnmpUtilMemFree function only if the dynamic member is set to TRUE.

Requirements

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

See also

SNMP Structures

Simple Network Management Protocol (SNMP) Overview

SnmpUtilMemAlloc

SnmpUtilMemFree