public interface SnmpContextv3Face extends SnmpContextBasisFace
Modifier and Type | Field and Description |
---|---|
static int |
AES_ENCRYPT
The AES 128 encryption type.
|
static java.lang.String |
Default_ContextName
The default Context Name.
|
static java.lang.String |
Default_UserName
The default value for the (security) user name.
|
static int |
DES_ENCRYPT
The DES encryption type.
|
static int |
MD5_PROTOCOL
The MD5 protocol type.
|
static java.lang.String[] |
ProtocolNames
The array with the String represensations of the protocols.
|
static int |
SHA1_PROTOCOL
The SHA-1 protocol type.
|
static int |
SNMPv1_Security_Model
The SNMPv1 security model.
|
static int |
SNMPv2c_Security_Model
The SNMPv2c security model.
|
static int |
USM_Security_Model
The USM security model.
|
static java.lang.String |
version_id |
DEFAULT_PORT, MAXPDU, MSS, STANDARD_SOCKET, TCP_SOCKET
Modifier and Type | Method and Description |
---|---|
boolean |
addDiscoveryPdu(DiscoveryPdu pdu)
Adds a discovery PDU.
|
byte[] |
encodeDiscoveryPacket(byte msg_type,
int rId,
int errstat,
int errind,
java.util.Enumeration ve,
java.lang.Object obj)
Encodes a discovery PDU.
|
int |
getAuthenticationProtocol()
Returns the protocol to be used for authentication.
|
byte[] |
getContextEngineId()
Returns the contextEngineID.
|
java.lang.String |
getContextName()
Returns the contextName.
|
int |
getPrivacyProtocol()
Returns the protocol to be used for privacy.
|
java.lang.String |
getUserAuthenticationPassword()
Returns the user authentication password.
|
java.lang.String |
getUserName()
Returns the username.
|
java.lang.String |
getUserPrivacyPassword()
Returns the user privacy password.
|
UsmAgent |
getUsmAgent()
Returns the UsmAgent.
|
boolean |
isUseAuthentication()
Returns if authentication is used or not.
|
boolean |
isUsePrivacy()
Returns if privacy is used or not.
|
void |
setAuthenticationProtocol(int protocol)
Sets the protocol to be used for authentication.
|
void |
setContextEngineId(byte[] newContextEngineId)
Sets the contextEngineID.
|
void |
setContextName(java.lang.String newContextName)
Sets the contextName.
|
void |
setPrivacyProtocol(int protocol)
Sets the protocol to be used for privacy.
|
void |
setUseAuthentication(boolean newUseAuthentication)
Sets whether authentication has to be used.
|
void |
setUsePrivacy(boolean newUsePrivacy)
Sets whether privacy has to be used.
|
void |
setUserAuthenticationPassword(java.lang.String newUserAuthPassword)
Sets the user authentication password.
|
void |
setUserName(java.lang.String newUserName)
Sets the username.
|
void |
setUserPrivacyPassword(java.lang.String newUserAuthPassword)
Sets the user privacy password.
|
void |
setUsmAgent(UsmAgent agent)
Sets the UsmAgent, needed when this stack is used as authoritative
SNMP engine.
|
addPdu, addRequestPduListener, addRequestPduListener, addRequestPduListener, addTrapListener, addTrapListener, addTrapListener, clone, destroy, encodePacket, getBindAddress, getHashKey, getHost, getPort, getReceivedFromHostAddress, getSendToHostAddress, getTypeSocket, getVersion, isDestroyed, processIncomingPdu, removePdu, removeRequestPduListener, removeRequestPduListener, removeRequestPduListener, removeTrapListener, removeTrapListener, removeTrapListener, sendPacket
static final java.lang.String version_id
static final int SNMPv1_Security_Model
static final int SNMPv2c_Security_Model
static final int USM_Security_Model
static final int MD5_PROTOCOL
static final int SHA1_PROTOCOL
static final int DES_ENCRYPT
static final int AES_ENCRYPT
static final java.lang.String Default_UserName
static final java.lang.String Default_ContextName
static final java.lang.String[] ProtocolNames
java.lang.String getUserName()
void setUserName(java.lang.String newUserName)
newUserName
- The new usernameboolean isUseAuthentication()
void setUseAuthentication(boolean newUseAuthentication)
newUseAuthentication
- The use of authenticationjava.lang.String getUserAuthenticationPassword()
void setUserAuthenticationPassword(java.lang.String newUserAuthPassword) throws java.lang.IllegalArgumentException
newUserAuthPassword
- The user authentication passwordjava.lang.IllegalArgumentException
void setAuthenticationProtocol(int protocol) throws java.lang.IllegalArgumentException
protocol
- The authentication protocol to be usedjava.lang.IllegalArgumentException
MD5_PROTOCOL
,
SHA1_PROTOCOL
int getAuthenticationProtocol()
MD5_PROTOCOL
,
SHA1_PROTOCOL
void setPrivacyProtocol(int protocol) throws java.lang.IllegalArgumentException
protocol
- The privacy protocol to be usedjava.lang.IllegalArgumentException
DES_ENCRYPT
,
AES_ENCRYPT
int getPrivacyProtocol()
DES_ENCRYPT
,
AES_ENCRYPT
boolean isUsePrivacy()
void setUsePrivacy(boolean newUsePrivacy)
newUsePrivacy
- The use of privacyjava.lang.String getUserPrivacyPassword()
void setUserPrivacyPassword(java.lang.String newUserAuthPassword) throws java.lang.IllegalArgumentException
newUserAuthPassword
- The user privacy passwordjava.lang.IllegalArgumentException
void setContextEngineId(byte[] newContextEngineId) throws java.lang.IllegalArgumentException
Note, when the stack is an authoritative engine, this parameter should equal the UsmAgent.getSnmpEngineId(). See the StackUsage documentation for an explanation.
If the contextEngineID is of length zero, the encoder will use the (discovered) snmpEngineId.
newContextEngineId
- The contextEngineIDjava.lang.IllegalArgumentException
UsmAgent.getSnmpEngineId()
byte[] getContextEngineId()
void setContextName(java.lang.String newContextName)
newContextName
- The contextNameDefault_ContextName
java.lang.String getContextName()
boolean addDiscoveryPdu(DiscoveryPdu pdu) throws java.io.IOException, PduException
pdu
- the discovery PDUjava.io.IOException
PduException
byte[] encodeDiscoveryPacket(byte msg_type, int rId, int errstat, int errind, java.util.Enumeration ve, java.lang.Object obj) throws java.io.IOException, EncodingException
java.io.IOException
EncodingException
void setUsmAgent(UsmAgent agent)
agent
- The USM authoritative interfaceUsmAgent getUsmAgent()
setUsmAgent(uk.co.westhawk.snmp.stack.UsmAgent)