AsnAny 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 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.
Syntax
typedef struct {
BYTE asnType;
union {
AsnInteger32 number;
AsnUnsigned32 unsigned32;
AsnCounter64 counter64;
AsnOctetString string;
AsnBits bits;
AsnObjectIdentifier object;
AsnSequence sequence;
AsnIPAddress address;
AsnCounter32 counter;
AsnGauge32 gauge;
AsnTimeticks ticks;
AsnOpaque arbitrary;
} asnValue;
} AsnAny;
Members
asnType
Type: BYTE
Indicates the variable's type. This member must be only one of the following values.
asnValue
Contains the variable's value. This member can be only one of the following values.
number
Type: AsnInteger32 Accesses a 32-bit signed integer variable.
unsigned32
Type: AsnUnsigned32 Accesses a 32-bit unsigned integer variable.
counter64
Type: AsnCounter64 Accesses a counter variable that increases until it reaches a maximum value of (2^64) – 1.
string
Type: AsnOctetString Accesses an octet string variable.
bits
Type: AsnBits Accesses a variable that is an enumeration of named bits with non-negative, contiguous values, starting at zero.
object
Type: AsnObjectIdentifier Accesses an object identifier variable.
sequence
Type: AsnSequence Accesses an ASN sequence variable.
address
Type: AsnIPAddress Accesses an IP address variable.
counter
Type: AsnCounter32 Accesses a counter variable that increases until it reaches a maximum value of (2^32) – 1.
gauge
Type: AsnGauge32 Accesses a gauge variable.
ticks
Type: AsnTimeticks Accesses a timeticks counter variable that is relative to a specific timer event.
arbitrary
Type: AsnOpaque Accesses an opaque variable.
asnValue.number
asnValue.unsigned32
asnValue.counter64
asnValue.string
asnValue.bits
asnValue.object
asnValue.sequence
asnValue.address
asnValue.counter
asnValue.gauge
asnValue.ticks
asnValue.arbitrary
Remarks
To use the definition of the Unsigned32 type described in RFC 1902, you can specify the ASN_GAUGE32 variable type. Currently the ASN_UNSIGNED32 variable type specifies the UInteger32 type described in RFC 1442.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | snmp.h |