smiOID

[This is preliminary documentation and subject to change.]

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 manager 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 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, SnmpGetVb, SnmpStrToOid, SnmpOidToStr, SnmpOidCopy, SnmpOidCompare, SnmpFreeDescriptor, smiVALUE