|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface SecurityModel
The SecurityModel interface as described in RFC3411 section 4.4.
| Field Summary | |
|---|---|
static int |
SECURITY_MODEL_ANY
|
static int |
SECURITY_MODEL_SNMPv1
|
static int |
SECURITY_MODEL_SNMPv2c
|
static int |
SECURITY_MODEL_USM
|
| Method Summary | |
|---|---|
int |
generateRequestMessage(int messageProcessingModel,
byte[] globalData,
int maxMessageSize,
int securityModel,
byte[] securityEngineID,
byte[] securityName,
int securityLevel,
BERInputStream scopedPDU,
SecurityParameters securityParameters,
BEROutputStream wholeMsg)
Generate a request message. |
int |
generateResponseMessage(int messageProcessingModel,
byte[] globalData,
int maxMessageSize,
int securityModel,
byte[] securityEngineID,
byte[] securityName,
int securityLevel,
BERInputStream scopedPDU,
SecurityStateReference securityStateReference,
SecurityParameters securityParameters,
BEROutputStream wholeMsg)
Generates a response message. |
int |
getID()
Gets the ID of the security model. |
SecurityParameters |
newSecurityParametersInstance()
Creates a new SecurityParameters instance that corresponds to this
security model. |
SecurityStateReference |
newSecurityStateReference()
Creates a new SecurityStateReference instance that corresponds to
this security model. |
int |
processIncomingMsg(int messageProcessingModel,
int maxMessageSize,
SecurityParameters securityParameters,
SecurityModel securityModel,
int securityLevel,
BERInputStream wholeMsg,
OctetString securityEngineID,
OctetString securityName,
BEROutputStream scopedPDU,
Integer32 maxSizeResponseScopedPDU,
SecurityStateReference securityStateReference,
StatusInformation statusInfo)
Processes an incoming message and returns its plaintext payload. |
| Field Detail |
|---|
static final int SECURITY_MODEL_ANY
static final int SECURITY_MODEL_SNMPv1
static final int SECURITY_MODEL_SNMPv2c
static final int SECURITY_MODEL_USM
| Method Detail |
|---|
int getID()
SecurityModel
interface.SECURITY_MODEL_ANY,
SECURITY_MODEL_SNMPv1,
SECURITY_MODEL_SNMPv2c,
SECURITY_MODEL_USMSecurityParameters newSecurityParametersInstance()
SecurityParameters instance that corresponds to this
security model.
SecurityParameters instance.SecurityStateReference newSecurityStateReference()
SecurityStateReference instance that corresponds to
this security model.
SecurityStateReference instance.
int generateRequestMessage(int messageProcessingModel,
byte[] globalData,
int maxMessageSize,
int securityModel,
byte[] securityEngineID,
byte[] securityName,
int securityLevel,
BERInputStream scopedPDU,
SecurityParameters securityParameters,
BEROutputStream wholeMsg)
throws java.io.IOException
messageProcessingModel - the ID of the message processing model (SNMP version) to use.globalData - the message header and admin data.maxMessageSize - the maximum message size of the sending (this) SNMP entity for the
selected transport mapping (determined by the message processing model).securityModel - the security model for the outgoing message.securityEngineID - the authoritative SNMP entity.securityName - the principal on behalf of this message is generated.securityLevel - the requested SecurityLevel.scopedPDU - a BERInputStream containing the message (plain text) payload.securityParameters - returns the SecurityParameters filled by the security model.wholeMsg - returns the complete generated message in a BEROutputStream.
The buffer of wholeMsg is set to null by the
caller and must be set by the implementation of this method.
SnmpConstants.SNMPv3_USM_OK is returned, otherwise one of the
other SnmpConstants.SNMPv3_USM_* values is returned.
java.io.IOException - if generation of the message fails because of an internal or an resource
error.
int generateResponseMessage(int messageProcessingModel,
byte[] globalData,
int maxMessageSize,
int securityModel,
byte[] securityEngineID,
byte[] securityName,
int securityLevel,
BERInputStream scopedPDU,
SecurityStateReference securityStateReference,
SecurityParameters securityParameters,
BEROutputStream wholeMsg)
throws java.io.IOException
messageProcessingModel - the ID of the message processing model (SNMP version) to use.globalData - the message header and admin data.maxMessageSize - the maximum message size of the sending (this) SNMP entity for the
selected transport mapping (determined by the message processing model).securityModel - the security model for the outgoing message.securityEngineID - the authoritative SNMP entity.securityName - the principal on behalf of this message is generated.securityLevel - the requested SecurityLevel.scopedPDU - a BERInputStream containing the message (plain text) payload.securityStateReference - a SecurityStateReference instance providing information from
original request.securityParameters - returns the SecurityParameters filled by the security model.wholeMsg - returns the complete generated message in a BEROutputStream.
The buffer of wholeMsg is set to null by the
caller and must be set by the implementation of this method.
SnmpConstants.SNMPv3_USM_OK is returned, otherwise one of the
other SnmpConstants.SNMPv3_USM_* values is returned.
java.io.IOException - if generation of the message fails because of an internal or an resource
error.
int processIncomingMsg(int messageProcessingModel,
int maxMessageSize,
SecurityParameters securityParameters,
SecurityModel securityModel,
int securityLevel,
BERInputStream wholeMsg,
OctetString securityEngineID,
OctetString securityName,
BEROutputStream scopedPDU,
Integer32 maxSizeResponseScopedPDU,
SecurityStateReference securityStateReference,
StatusInformation statusInfo)
throws java.io.IOException
messageProcessingModel - the ID of the message processing model (SNMP version) to use.maxMessageSize - the maximum message size of the message processing model for the
transport mapping associated with this message's source address less
the length of the maximum header length of the message processing model.
This value is used by the security model to determine the
maxSizeResponseScopedPDU value.securityParameters - the SecurityParameters for the received message.securityModel - the SecurityModel instance for the receied message.securityLevel - the SecurityLevel ID.wholeMsg - the BERInputStream containing the whole message as recieved
on the wire.securityEngineID - the authoritative SNMP entity.securityName - the identification of the principal.scopedPDU - returns the message (plaintext) payload into the supplied
BEROutputStream.
The buffer of scopedPDU is set to null by the
caller and must be set by the implementation of this method.maxSizeResponseScopedPDU - the determined maxmimum size for a response PDU.securityStateReference - the SecurityStateReference information needed for
a response.statusInfo - the StatusInformation needed to generate reports if
processing of the incoming message failed.
SnmpConstants.SNMPv3_USM_OK is returned, otherwise one of the
other SnmpConstants.SNMPv3_USM_* values is returned.
java.io.IOException - if an unexpected (internal) or an resource error occured.
|
Copyright 2003-2009 Frank Fock and Jochen Katz (SNMP4J.org) | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||