Platform SDK: Network Management

AsnAny

The AsnAny structure contains an SNMP variable type and value. This structure is a member of the SnmpVarBind structure that is used as a parameter in many of the SNMP functions. This structure is not used by the WinSNMP API functions.

typedef struct {
    BYTE asnType;
     union {
       AsnInteger32         number;      // ASN_INTEGER
                                         // ASN_INTEGER32
       AsnUnsigned32        unsigned32;  // ASN_UNSIGNED32
       AsnCounter64         counter64;   // ASN_COUNTER64
       AsnOctetString       string;      // ASN_OCTETSTRING
       AsnBits              bits;        // ASN_BITS
       AsnObjectIdentifier  object;      // ASN_OBJECTIDENTIFIER
       AsnSequence          sequence;    // ASN_SEQUENCE
       AsnIPAddress         address;     // ASN_IPADDRESS
       AsnCounter32         counter;     // ASN_COUNTER32
       AsnGauge32           gauge;       // ASN_GAUGE32
       AsnTimeticks         ticks;       // ASN_TIMETICKS
       AsnOpaque            arbitrary;   // ASN_OPAQUE
} asnValue;
} AsnAny;

Members

asnType
Indicates the variable's type. This member must be only one of the following values.
Value Meaning
ASN_INTEGER Indicates a 32-bit signed integer variable.
ASN_INTEGER32 Indicates a 32-bit signed integer variable.
ASN_UNSIGNED32 Indicates a 32-bit unsigned integer variable.
ASN_COUNTER64 Indicates a counter variable that increases until it reaches a maximum value of (2^64) – 1.
ASN_OCTETSTRING Indicates an octet string variable.
ASN_BITS Indicates a variable that is an enumeration of named bits.
ASN_OBJECTIDENTIFIER Indicates an object identifier variable.
ASN_SEQUENCE Indicates an ASN sequence variable.
ASN_IPADDRESS Indicates an IP address variable.
ASN_COUNTER32 Indicates a counter variable.
ASN_GAUGE32 Indicates a gauge variable.
ASN_TIMETICKS Indicates a timeticks variable.
ASN_OPAQUE Indicates an opaque variable.

asnValue
Contains the variable's value. This member can be only one of the following values.
Value Meaning
number Accesses a 32-bit signed integer variable.
unsigned32 Accesses a 32-bit unsigned integer variable.
counter64 Accesses a counter variable that increases until it reaches a maximum value of (2^64) – 1.
String Accesses an octet string variable.
bits Accesses a variable that is an enumeration of named bits with non-negative, contiguous values, starting at zero.
Object Accesses an object identifier variable.
sequence Accesses an ASN sequence variable.
address Accesses an IP address variable.
counter Accesses a counter variable that increases until it reaches a maximum value of (2^32) – 1.
Gauge Accesses a gauge variable.
ticks Accesses a timeticks counter variable that is relative to a specific timer event.
Arbitrary Accesses an opaque variable.

Requirements

  Windows NT/2000: Requires Windows NT 3.51 or later.
  Windows 95/98: Requires Windows 95 or later.
  Header: Declared in Snmp.h.

See Also

Simple Network Management Protocol (SNMP) Overview, SNMP Structures, SnmpVarBind, SnmpExtensionMonitor