com.outbackinc.services.protocol.snmp.USM
Class USMSecurityModel
java.lang.Object
|
+--com.outbackinc.services.protocol.snmp.USM.USMSecurityModel
- All Implemented Interfaces:
- SnmpSecurityModel
- public class USMSecurityModel
- extends java.lang.Object
- implements SnmpSecurityModel
The USMSecurityModel class implements the user-based SnmpSecurityModel
interface for user-based SNMP versions (SNMPv3).
- See Also:
SnmpConstants
,
SnmpSecurityLevels
,
RFC 2574 - User-based Security Model (USM) for version 3 of the Simple Network Management Protocol (SNMPv3)
Constructor Summary |
USMSecurityModel()
Constructs a new USMSecurityModel object whose engine clock counts time from the given starting time. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USMSecurityModel
public USMSecurityModel()
- Constructs a new USMSecurityModel object whose engine clock counts time from the given starting time.
getID
public int getID()
- Description copied from interface:
SnmpSecurityModel
- Returns the unique identifier, used in an SNMPv3 header, of the security model.
Each security model implementation that is registered with jSNMP must return a unique value.
- Specified by:
getID
in interface SnmpSecurityModel
processOutgoingMessage
public com.outbackinc.util.ds.Pair processOutgoingMessage(SnmpAuthoritativeSession cSnmpAuthoritativeSession,
int iMtu,
byte[] cbMessageHeader,
byte[] cbScopedPDU)
throws SnmpSecurityException
- Description copied from interface:
SnmpSecurityModel
- Processes a message to be sent out to an agent. Performs any security mechanisms defined in the security model and specified in the security token.
USM, for example, will encrypt and authenticate the message if security the security level is set to authPriv.
- Specified by:
processOutgoingMessage
in interface SnmpSecurityModel
- Following copied from interface:
com.outbackinc.services.protocol.snmp.SnmpSecurityModel
- Parameters:
cSnmpAuthoritativeSession
- specific sessioniMtu
- MTU of sending socketcbMessageHeader
- an ASN.1 encoded header (global data) for the PDU, excluding the security parameters.cbScopedPDU
- the scoped PDU of the message, which will be encrypted if encryption is used.- Returns:
- an ready to send SNMP message (ASN.1-encoded byte array) as a Pair (byte[] array and length).
processIncomingMessage
public byte[] processIncomingMessage(SnmpAuthoritativeSession cSnmpAuthoritativeSession,
java.net.DatagramPacket cDatagramPacket)
throws SnmpSecurityException
- Description copied from interface:
SnmpSecurityModel
- Processes an incoming message. Performs any decryption or authentication necessary, and returns a scoped PDU if sucessful.
- Specified by:
processIncomingMessage
in interface SnmpSecurityModel
- Following copied from interface:
com.outbackinc.services.protocol.snmp.SnmpSecurityModel
- Parameters:
cSnmpAuthoritativeSession
- specific sessioncDatagramPacket
- the entire Datagram message, ASN.1 encoded- Returns:
- an ASN.1 encoded scoped PDU.
createSecurityToken
public SnmpSecurityToken createSecurityToken(SnmpAuthoritativeSession cSnmpAuthoritativeSession)
throws SnmpSecurityException
- Creates and returns a token for a SnmpAuthorititativeSession.
- Specified by:
createSecurityToken
in interface SnmpSecurityModel
- Parameters:
cSnmpAuthoritativeSession
- authoritative session- Returns:
- security token on success
- Throws:
SnmpSecurityException
- on message digest failure or null arguments
supportedBySnmpVersion
public boolean supportedBySnmpVersion(int iSnmpVersion)
- Description copied from interface:
SnmpSecurityModel
- Determines if the given SNMP version supports this security model.
- Specified by:
supportedBySnmpVersion
in interface SnmpSecurityModel
- Returns:
- true if the SNMP version is SnmpConstants.SNMP_VERSION_3
- See Also:
SnmpConstants
Home Services Products Purchase Contact Us About Us Legal Ceramics
Copyright © 2003-2008 jSNMP Enterprises All rights reserved.