Property | Type | Description | |
---|---|---|---|
_securityModel | Integer32 |
Method | Description | |
---|---|---|
BuildInformResponse ( ) : |
Build SNMP RESPONSE packet for the received INFORM packet.
|
|
BuildInformResponse ( |
Build SNMP RESPONSE packet for the INFORM packet class.
|
|
DiscoveryRequest ( ) : |
Build an SNMP version 3 packet suitable for use in discovery process.
|
|
DiscoveryResponse ( |
Build SNMP discovery response packet. Manager application has to be able to respond to discovery requests to be able to handle SNMPv3 INFORM notifications. In an INFORM packet, engineId value is set to the manager stations id (unlike all other requests where agent is the authoritative SNMP engine). For the agent to discover appropriate manager engine id, boots and time values (required for authentication and privacy packet handling), manager has to be able to respond to the discovery request. |
|
GenerateAuthenticationKey ( ) : byte[] |
Generate authentication key from authentication password and engine id
|
|
GeneratePrivacyKey ( ) : byte[] |
Generate privacy key from authentication password and engine id
|
|
GetUSM ( byte berBuffer, int length ) : |
"Look-ahead" decode of SNMP packet header including USM information Decode first component of the SNMP version 3 packet allowing the caller to retrieve USM SecureName needed to retrieve client security parameters that will allow authentication and privacy decryption to take place. This method is used to support Agent like behavior or to handle unsolicited packets like TRAP and INFORMs. In all of these cases, sender of packets will forward a packet without a request being sent by you. In turn, you will need to parse enough of the packet to retrieve SecureName which you can use to retrieve security parameters associated with that user and attempt to authorize and privacy decrypt the received packet. Only use this method when your application is acting as an Agent or if you need to process TRAP and INFORM packets. |
|
NoAuthNoPriv ( ) : void |
Set class security to no authentication and no privacy. User name is set to "initial" (suitable for SNMP version 3 discovery process). Change username before using if discovery is not being performed.
|
|
NoAuthNoPriv ( byte userName ) : void |
Set class security to no authentication and no privacy with the specific user name.
|
|
SetEngineId ( byte engineId ) : void |
Set authoritative engine id
|
|
SetEngineTime ( int engineBoots, int engineTime ) : void |
Set engine time and boots values
|
|
SnmpV3Packet ( ) : System |
Standard constructor.
|
|
SnmpV3Packet ( |
Constructor. Sets internal ScopedPdu class to the argument supplied instance of the class. This is a good cheat that will allow you direct access to the internal ScopedPdu class since it is not cloned but assigned to the internal variable. |
|
SnmpV3Packet ( |
Constructor. Create new SNMPv3 packet class and initialize security parameters |
|
SnmpV3Packet ( |
Constructor Create new SNMPv3 packet class and initialize security parameters and ScopedPdu. |
|
authNoPriv ( byte userName, byte authenticationPassword, AuthenticationDigests authenticationProtocol ) : void |
Set class security to enabled authentication and no privacy. To perform authentication, authentication password needs to be supplied and authentication protocol to be used to perform authentication. This method does not initialize the packet user name. Use SNMPV3Packet.SecurityName method to set the security name (also called user name) for this request.
|
|
authPriv ( byte userName, byte authenticationPassword, AuthenticationDigests authenticationProtocol, byte privacyPassword, PrivacyProtocols privacyProtocol ) : void |
Set packet security to authentication enabled and privacy protection enabled (SNMP v3 mode authPriv)
|
|
decode ( byte berBuffer, int length ) : int |
Decode SNMP version 3 packet. This method will perform authentication check and decode privacy protected ScopedPdu. This method will not check for the timeliness of the packet, correct engine boot value or engine id because it does not have a reference to the engine time prior to this call.
|
|
decode ( byte berBuffer, int length, byte authKey, byte privKey ) : int |
Decode SNMP version 3 packet. This method will perform authentication check and decode privacy protected ScopedPdu. This method will not check for the timeliness of the packet, correct engine boot value or engine id because it does not have a reference to the engine time prior to this call.
|
|
encode ( ) : byte[] |
Encode SNMP version 3 packet Before encoding the packet into a byte array you need to ensure all required information is set. Examples of required information is request type, Vbs (Oid + values pairs), USM settings including SecretName, authentication method and secret (if needed), privacy method and secret (if needed), etc. |
|
encode ( byte authKey, byte privKey ) : byte[] |
Encode SNMP version 3 packet Before encoding the packet into a byte array you need to ensure all required information is set. Examples of required information is request type, Vbs (Oid + values pairs), USM settings including SecretName, authentication method and secret (if needed), privacy method and secret (if needed), etc. |
public BuildInformResponse ( ) : |
||
return |
public static BuildInformResponse ( |
||
informPacket | SNMP INFORM packet | |
return |
public static DiscoveryRequest ( ) : |
||
return |
public static DiscoveryResponse ( |
||
messageId | Message id from the received discovery packet | |
requestId | Request id from the received discovery packets Pdu | |
engineId | OctetString | Local engine id |
engineBoots | Number of times local SNMP engine has been restarted | |
engineTime | Time since the engine was started in seconds | |
unknownEngineIdCount | Number of discovery packets received by the local SNMP engine | |
return |
public GenerateAuthenticationKey ( ) : byte[] | ||
return | byte[] |
public GetUSM ( byte berBuffer, int length ) : |
||
berBuffer | byte | Raw SNMP version 3 packet |
length | int | SNMP version 3 packet length |
return |
public NoAuthNoPriv ( byte userName ) : void | ||
userName | byte | User name |
return | void |
public SetEngineId ( byte engineId ) : void | ||
engineId | byte | Authoritative engine id |
return | void |
public SetEngineTime ( int engineBoots, int engineTime ) : void | ||
engineBoots | int | Authoritative engine boots value retrived from the agent during discovery procedure. |
engineTime | int | Engine time value. |
return | void |
public SnmpV3Packet ( |
||
pdu | ||
return | System |
public SnmpV3Packet ( |
||
param | Initialization SNMPv3 security parameters | |
return | System |
public SnmpV3Packet ( |
||
param | SNMPv3 security parameters | |
pdu | ScopedPdu assigned to the class | |
return | System |
public authNoPriv ( byte userName, byte authenticationPassword, AuthenticationDigests authenticationProtocol ) : void | ||
userName | byte | User name |
authenticationPassword | byte | Authentication password to use in authenticating the message. This /// value has to match the password configured on the agent. |
authenticationProtocol | AuthenticationDigests | Authentication protocol to use. Available authentication protocols are:
/// |
return | void |
public authPriv ( byte userName, byte authenticationPassword, AuthenticationDigests authenticationProtocol, byte privacyPassword, PrivacyProtocols privacyProtocol ) : void | ||
userName | byte | User name |
authenticationPassword | byte | Authentication password |
authenticationProtocol | AuthenticationDigests | Authentication protocol. See definitions in |
privacyPassword | byte | Privacy protection password. |
privacyProtocol | PrivacyProtocols | Privacy protocol. See definitions in |
return | void |
public decode ( byte berBuffer, int length ) : int | ||
berBuffer | byte | BER encoded SNMP version 3 packet buffer |
length | int | Buffer length |
return | int |
public decode ( byte berBuffer, int length, byte authKey, byte privKey ) : int | ||
berBuffer | byte | BER encoded SNMP version 3 packet buffer |
length | int | Buffer length |
authKey | byte | Authentication key (not password) |
privKey | byte | Privacy key (not password) |
return | int |
public encode ( byte authKey, byte privKey ) : byte[] | ||
authKey | byte | Authentication key (not password) |
privKey | byte | Privacy key (not password) |
return | byte[] |