C# Class SnmpSharpNet.SnmpConstants

SNMP SMI version 1, version 2c and version 3 constants.
Show file Open project: griffina/SnmpSharpNet Class Usage Examples

Public Properties

Property Type Description
SMI_APPSTRING byte
SMI_APPSTRING_STR string
SMI_COUNTER32 byte
SMI_COUNTER32_STR string
SMI_COUNTER64 byte
SMI_COUNTER64_STR string
SMI_ENDOFMIBVIEW byte
SMI_GAUGE32 byte
SMI_GAUGE32_STR string
SMI_INTEGER byte
SMI_INTEGER_STR string
SMI_IPADDRESS byte
SMI_IPADDRESS_STR string
SMI_NOSUCHINSTANCE byte
SMI_NOSUCHOBJECT byte
SMI_NULL byte
SMI_NULL_STR string
SMI_OBJECTID byte
SMI_OBJECTID_STR string
SMI_OPAQUE byte
SMI_OPAQUE_STR string
SMI_PARTY_CLOCK byte
SMI_SEQUENCE byte
SMI_STRING byte
SMI_STRING_STR string
SMI_TIMETICKS byte
SMI_TIMETICKS_STR string
SMI_UNKNOWN_STR string
SMI_UNSIGNED32 byte
SMI_UNSIGNED32_STR string
SysUpTime Oid
TrapObjectId Oid
snmpInvalidMsgs Oid
snmpUnknownPDUHandlers Oid
snmpUnknownSecurityModels Oid
usmStatsDecryptionErrors Oid
usmStatsNotInTimeWindows Oid
usmStatsUnknownEngineIDs Oid
usmStatsUnknownSecurityNames Oid
usmStatsUnsupportedSecLevels Oid
usmStatsWrongDigests Oid
v3ErrorOids Oid[]

Public Methods

Method Description
DumpHex ( byte data ) : void

Debugging function used to dump on the console supplied byte array in a format suitable for console output.

GetSyntaxObject ( byte asnType ) : AsnType

Used to create correct variable type object for the specified encoded type

GetSyntaxObject ( string name ) : AsnType

Return SNMP type object of the type specified by name. Supported variable types are: * Integer32 * Counter32 * Gauge32 * Counter64 * TimeTicks * OctetString * IpAddress * Oid * Null

GetTypeName ( byte type ) : string

Return string representation of the SMI value type.

IsValidVersion ( int version ) : bool

Check if SNMP version value is correct

Private Methods

Method Description
SnmpConstants ( ) : System

Private constructor to prevent the class with all static members from being instantiated.

Method Details

DumpHex() public static method

Debugging function used to dump on the console supplied byte array in a format suitable for console output.
public static DumpHex ( byte data ) : void
data byte Byte array data
return void

GetSyntaxObject() public static method

Used to create correct variable type object for the specified encoded type
public static GetSyntaxObject ( byte asnType ) : AsnType
asnType byte ASN.1 type code
return AsnType

GetSyntaxObject() public static method

Return SNMP type object of the type specified by name. Supported variable types are: * Integer32 * Counter32 * Gauge32 * Counter64 * TimeTicks * OctetString * IpAddress * Oid * Null
public static GetSyntaxObject ( string name ) : AsnType
name string Name of the object type
return AsnType

GetTypeName() public static method

Return string representation of the SMI value type.
public static GetTypeName ( byte type ) : string
type byte AsnType class Type member function value.
return string

IsValidVersion() public static method

Check if SNMP version value is correct
public static IsValidVersion ( int version ) : bool
version int SNMP version value
return bool

Property Details

SMI_APPSTRING public static property

An application string is a sequence of octets defined at the application level. Although the SMI does not define an Application String, it does define an IP Address which is an Application String of length four.
public static byte SMI_APPSTRING
return byte

SMI_APPSTRING_STR public static property

String representation of the SMI_APPSTRING type.
public static string SMI_APPSTRING_STR
return string

SMI_COUNTER32 public static property

A non-negative integer that may be incremented, but not decremented. The value is a 32-bit unsigned quantity representing the range of zero to 2^32-1 (4,294,967,295). When the counter reaches its maximum value it wraps back to zero and starts again.
public static byte SMI_COUNTER32
return byte

SMI_COUNTER32_STR public static property

String representation of the SMI_COUNTER32 type.
public static string SMI_COUNTER32_STR
return string

SMI_COUNTER64 public static property

Defines a 64-bit unsigned counter. A counter is an integer that can be incremented, but cannot be decremented. A maximum value of 2^64 - 1 (18,446,744,073,709,551,615) can be represented. When the counter reaches it's maximum it wraps back to zero and starts again.
public static byte SMI_COUNTER64
return byte

SMI_COUNTER64_STR public static property

String representation of the SMI_COUNTER64 type.
public static string SMI_COUNTER64_STR
return string

SMI_ENDOFMIBVIEW public static property

The SNMPv2 error representing the End-Of-Mib-View. This error variable will be returned by a SNMPv2 agent if the requested object identifier has reached the end of the agent's mib table and there is no lexicographic successor.
public static byte SMI_ENDOFMIBVIEW
return byte

SMI_GAUGE32 public static property

Represents a non-negative integer that may increase or decrease with a maximum value of 2^32-1. If the maximum value is reached the gauge stays latched until reset.
public static byte SMI_GAUGE32
return byte

SMI_GAUGE32_STR public static property

String representation of the SMI_GAUGE32 type.
public static string SMI_GAUGE32_STR
return string

SMI_INTEGER public static property

Signed 32-bit integer ASN.1 data type. For implementation, see Integer32
public static byte SMI_INTEGER
return byte

SMI_INTEGER_STR public static property

String representation of the AsnType.INTEGER type.
public static string SMI_INTEGER_STR
return string

SMI_IPADDRESS public static property

An IP Address is an application string of length four and is indistinguishable from the SMI_APPSTRING value. The address is a 32-bit quantity stored in network byte order.
public static byte SMI_IPADDRESS
return byte

SMI_IPADDRESS_STR public static property

String representation of the SMI_IPADDRESS type.
public static string SMI_IPADDRESS_STR
return string

SMI_NOSUCHINSTANCE public static property

The SNMPv2 error representing that there is No-Such-Instance for a particular object identifier. This error is the result of a requested object identifier instance does not exist in the agent's tables.
public static byte SMI_NOSUCHINSTANCE
return byte

SMI_NOSUCHOBJECT public static property

The SNMPv2 error representing that there is No-Such-Object for a particular object identifier. This error is the result of a requested object identifier that does not exist in the agent's tables
public static byte SMI_NOSUCHOBJECT
return byte

SMI_NULL public static property

Null ASN.1 value type. For implementation, see Null.
public static byte SMI_NULL
return byte

SMI_NULL_STR public static property

String representation of the SMI_NULL type.
public static string SMI_NULL_STR
return string

SMI_OBJECTID public static property

Object id ASN.1 type. For implementation, see Oid
public static byte SMI_OBJECTID
return byte

SMI_OBJECTID_STR public static property

String representation of the SMI_OBJECTID type.
public static string SMI_OBJECTID_STR
return string

SMI_OPAQUE public static property

Used to support the transport of arbitrary data. The data itself is encoded as an octet string, but may be in any format defined by ASN.1 or another standard.
public static byte SMI_OPAQUE
return byte

SMI_OPAQUE_STR public static property

String representation of the SMI_OPAQUE type.
public static string SMI_OPAQUE_STR
return string

SMI_PARTY_CLOCK public static property

Defines an SNMPv2 Party Clock. The Party Clock is currently Obsolete, but included for backwards compatibility. Obsoleted in RFC 1902.
public static byte SMI_PARTY_CLOCK
return byte

SMI_SEQUENCE public static property

SEQUENCE Variable Binding code. Hex value: 0x30
public static byte SMI_SEQUENCE
return byte

SMI_STRING public static property

Data type representing a sequence of zero or more 8-bit byte values. For implementation, see OctetString
public static byte SMI_STRING
return byte

SMI_STRING_STR public static property

String representation of the AsnType.OCTETSTRING type.
public static string SMI_STRING_STR
return string

SMI_TIMETICKS public static property

This represents a non-negative integer that counts time, modulo 2^32. The time is represented in hundredths (1/100th) of a second.
public static byte SMI_TIMETICKS
return byte

SMI_TIMETICKS_STR public static property

String representation of the SMI_TIMETICKS type.
public static string SMI_TIMETICKS_STR
return string

SMI_UNKNOWN_STR public static property

String representation of the unknown SMI data type.
public static string SMI_UNKNOWN_STR
return string

SMI_UNSIGNED32 public static property

Used to represent the integers in the range of 0 to 2^32-1. This type is identical to the SMI_COUNTER32 and are indistinguishable in ASN.1
public static byte SMI_UNSIGNED32
return byte

SMI_UNSIGNED32_STR public static property

String representation of the SMI_UNSIGNED32 type.
public static string SMI_UNSIGNED32_STR
return string

SysUpTime public static property

sysUpTime.0 OID is the first value in the VarBind array of SNMP version 2 TRAP packets
public static Oid SysUpTime
return Oid

TrapObjectId public static property

trapObjectID.0 OID is the second value in the VarBind array of SNMP version 2 TRAP packets
public static Oid TrapObjectId
return Oid

snmpInvalidMsgs public static property

SNMP version 3, USM error
public static Oid snmpInvalidMsgs
return Oid

snmpUnknownPDUHandlers public static property

SNMP version 3, USM error
public static Oid snmpUnknownPDUHandlers
return Oid

snmpUnknownSecurityModels public static property

SNMP version 3, USM error
public static Oid snmpUnknownSecurityModels
return Oid

usmStatsDecryptionErrors public static property

SNMP version 3, USM error
public static Oid usmStatsDecryptionErrors
return Oid

usmStatsNotInTimeWindows public static property

SNMP version 3, USM error
public static Oid usmStatsNotInTimeWindows
return Oid

usmStatsUnknownEngineIDs public static property

SNMP version 3, USM error
public static Oid usmStatsUnknownEngineIDs
return Oid

usmStatsUnknownSecurityNames public static property

SNMP version 3, USM error
public static Oid usmStatsUnknownSecurityNames
return Oid

usmStatsUnsupportedSecLevels public static property

SNMP version 3, USM error
public static Oid usmStatsUnsupportedSecLevels
return Oid

usmStatsWrongDigests public static property

SNMP version 3, USM error
public static Oid usmStatsWrongDigests
return Oid

v3ErrorOids public static property

Array of all SNMP version 3 REPORT packet error OIDs
public static Oid[] v3ErrorOids
return Oid[]