Property | Type | Description | |
---|---|---|---|
_community | string | ||
_maxRepetitions | int | ||
_nonRepeaters | int | ||
_peerIP | |||
_peerName | string | ||
_peerPort | int | ||
_retry | int | ||
_suppressExceptions | bool | ||
_target | |||
_timeout | int |
Method | Description | |
---|---|---|
Get ( SnmpVersion version, Pdu pdu ) : AsnType>.Dictionary |
SNMP GET request
|
|
Get ( SnmpVersion version, string oidList ) : AsnType>.Dictionary |
SNMP GET request
|
|
GetBulk ( Pdu pdu ) : AsnType>.Dictionary |
SNMP GET-BULK request GetBulk request type is only available with SNMP v2c agents. SNMP v3 also supports the request itself but that version of the protocol is not supported by SimpleSnmp. GetBulk method will return a dictionary of Oid to value mapped values as returned form a single GetBulk request to the agent. You can change how the request itself is made by changing the SimpleSnmp.NonRepeaters and SimpleSnmp.MaxRepetitions values. SimpleSnmp properties are only used when values in the parameter Pdu are set to 0. |
|
GetBulk ( string oidList ) : AsnType>.Dictionary |
SNMP GET-BULK request Performs a GetBulk SNMP v2 operation on a list of OIDs. This is a convenience function that calls GetBulk(Pdu) method. |
|
GetNext ( SnmpVersion version, Pdu pdu ) : AsnType>.Dictionary |
SNMP GET-NEXT request
|
|
GetNext ( SnmpVersion version, string oidList ) : AsnType>.Dictionary |
SNMP GET-NEXT request
|
|
Set ( SnmpVersion version, Pdu pdu ) : AsnType>.Dictionary |
SNMP SET request
|
|
Set ( SnmpVersion version, |
SNMP SET request
|
|
SimpleSnmp ( ) : System |
Constructor. Class is initialized to default values. Peer IP address is set to loopback, peer port number to 161, timeout to 2000 ms (2 seconds), retry count to 2 and community name to public. |
|
SimpleSnmp ( string peerName ) : System |
Constructor. Class is initialized with default values with the agent name set to the supplied DNS name (or IP address). If peer name is a DNS name, DNS resolution will take place in the constructor attempting to resolve it an IP address. |
|
SimpleSnmp ( string peerName, int peerPort, string community ) : System |
Constructor.
|
|
SimpleSnmp ( string peerName, int peerPort, string community, int timeout, int retry ) : System |
Constructor.
|
|
SimpleSnmp ( string peerName, string community ) : System |
Constructor
|
|
Walk ( SnmpVersion version, string rootOid ) : AsnType>.Dictionary |
SNMP WALK operation When using SNMP version 1, walk is performed using GET-NEXT calls. When using SNMP version 2, walk is performed using GET-BULK calls. |
|
Walk ( bool tryGetBulk, SnmpVersion version, string rootOid ) : AsnType>.Dictionary |
SNMP WALK operation When using SNMP version 1, walk is performed using GET-NEXT calls. When using SNMP version 2, walk is performed using GET-BULK calls. |
Method | Description | |
---|---|---|
Resolve ( ) : bool |
Resolve peer name to an IP address This method will not throw any exceptions, even on failed DNS resolution. Make sure you call SimpleSnmp.Valid property to verify class state. |
public Get ( SnmpVersion version, Pdu pdu ) : AsnType>.Dictionary |
||
version | SnmpVersion | SNMP protocol version. Acceptable values are SnmpVersion.Ver1 and SnmpVersion.Ver2 |
pdu | Pdu | Request Protocol Data Unit |
return | AsnType>.Dictionary |
public Get ( SnmpVersion version, string oidList ) : AsnType>.Dictionary |
||
version | SnmpVersion | SNMP protocol version number. Acceptable values are SnmpVersion.Ver1 and SnmpVersion.Ver2 |
oidList | string | List of request OIDs in string dotted decimal format. |
return | AsnType>.Dictionary |
public GetBulk ( Pdu pdu ) : AsnType>.Dictionary |
||
pdu | Pdu | Request Protocol Data Unit |
return | AsnType>.Dictionary |
public GetBulk ( string oidList ) : AsnType>.Dictionary |
||
oidList | string | List of request OIDs in string dotted decimal format. |
return | AsnType>.Dictionary |
public GetNext ( SnmpVersion version, Pdu pdu ) : AsnType>.Dictionary |
||
version | SnmpVersion | SNMP protocol version. Acceptable values are SnmpVersion.Ver1 and SnmpVersion.Ver2 |
pdu | Pdu | Request Protocol Data Unit |
return | AsnType>.Dictionary |
public GetNext ( SnmpVersion version, string oidList ) : AsnType>.Dictionary |
||
version | SnmpVersion | SNMP protocol version number. Acceptable values are SnmpVersion.Ver1 and SnmpVersion.Ver2 |
oidList | string | List of request OIDs in string dotted decimal format. |
return | AsnType>.Dictionary |
public Set ( SnmpVersion version, Pdu pdu ) : AsnType>.Dictionary |
||
version | SnmpVersion | SNMP protocol version number. Acceptable values are SnmpVersion.Ver1 and SnmpVersion.Ver2 |
pdu | Pdu | Request Protocol Data Unit |
return | AsnType>.Dictionary |
public Set ( SnmpVersion version, |
||
version | SnmpVersion | SNMP protocol version number. Acceptable values are SnmpVersion.Ver1 and SnmpVersion.Ver2 |
vbs | Vb array containing Oid/AsnValue pairs for the SET operation | |
return | AsnType>.Dictionary |
public SimpleSnmp ( string peerName ) : System | ||
peerName | string | Peer name or IP address |
return | System |
public SimpleSnmp ( string peerName, int peerPort, string community ) : System | ||
peerName | string | Peer name or IP address |
peerPort | int | Peer UDP port number |
community | string | SNMP community name |
return | System |
public SimpleSnmp ( string peerName, int peerPort, string community, int timeout, int retry ) : System | ||
peerName | string | Peer name or IP address |
peerPort | int | Peer UDP port number |
community | string | SNMP community name |
timeout | int | SNMP request timeout |
retry | int | Maximum number of retries excluding the first request (0 = 1 request is sent) |
return | System |
public SimpleSnmp ( string peerName, string community ) : System | ||
peerName | string | Peer name or IP address |
community | string | SNMP community name |
return | System |
public Walk ( SnmpVersion version, string rootOid ) : AsnType>.Dictionary |
||
version | SnmpVersion | SNMP protocol version. Acceptable values are SnmpVersion.Ver1 and /// SnmpVersion.Ver2 |
rootOid | string | OID to start WALK operation from. Only child OIDs of the rootOid will be /// retrieved and returned |
return | AsnType>.Dictionary |
public Walk ( bool tryGetBulk, SnmpVersion version, string rootOid ) : AsnType>.Dictionary |
||
tryGetBulk | bool | this param is used to use get bulk on V2 requests |
version | SnmpVersion | SNMP protocol version. Acceptable values are SnmpVersion.Ver1 and /// SnmpVersion.Ver2 |
rootOid | string | OID to start WALK operation from. Only child OIDs of the rootOid will be /// retrieved and returned |
return | AsnType>.Dictionary |