com.outbackinc.services.protocol.snmp.CSM
Class CSMSecurityModel
java.lang.Object
|
+--com.outbackinc.services.protocol.snmp.CSM.CSMSecurityModel
- All Implemented Interfaces:
- SnmpSecurityModel
- public class CSMSecurityModel
- extends java.lang.Object
- implements SnmpSecurityModel
The CSMSecurityModel class implements the community-based SnmpSecurityModel
interface for community-based SNMP versions (SNMPv1/2).
- See Also:
SnmpConstants
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSMSecurityModel
public CSMSecurityModel()
- Creates a new CSMSecurityModel object.
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
- Description copied from interface:
SnmpSecurityModel
- Creates a security token for an authoritative session.
A token is particular to a specific security model implementation,
and can only be used by the security model that created it.
- Specified by:
createSecurityToken
in interface SnmpSecurityModel
- Following copied from interface:
com.outbackinc.services.protocol.snmp.SnmpSecurityModel
- Parameters:
cSnmpAuthoritativeSession
- the session that the security model will create a token for- Returns:
- the security token for the session
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_1 or SnmpConstants.SNMP_VERSION_2
- See Also:
SnmpConstants
Home Services Products Purchase Contact Us About Us Legal Ceramics
Copyright © 2003-2008 jSNMP Enterprises All rights reserved.