Platform SDK: Network Management

smiOID

The WinSNMP smiOID structure passes object identifiers to multiple WinSNMP functions. The structure also receives the variable name of a variable binding entry in a call to the SnmpGetVb function.

The smiOID structure contains a pointer to a variable length array of a named object's subidentifiers. The structure can be a member of the smiVALUE structure.

typedef struct {
    smiUINT32     len;    // number of array elements 
    smiLPUINT32   ptr;    // pointer to an array of subidentifiers 
} smiOID, *smiLPOID; 

Members

len
Specifies an unsigned long integer value that indicates the number of elements in the array pointed to by the ptr member.
ptr
Pointer to an array of unsigned long integers that represent the object identifier's subidentifiers.

Remarks

In an smiOID structure, the format of the array pointed to by the ptr member is one subidentifier per array element. For example, the string "1.3.6.1" would be an array of four elements {1,3,6,1}.

The Microsoft WinSNMP implementation allocates and deallocates memory for all output smiOID structures. The WinSNMP application should not free memory that the implementation allocates for the ptr member of an smiOID 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

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winsnmp.h.

See Also

WinSNMP API Overview, WinSNMP Structures, SnmpGetVb, SnmpStrToOid, SnmpOidToStr, SnmpOidCopy, SnmpOidCompare, SnmpFreeDescriptor, smiVALUE