|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface contains the SNMP context interface that is needed by every PDU to send a SNMP v3 request. See SNMP-USER-BASED-SM-MIB, RFC 3411.
Field Summary | |
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 |
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
|
Fields inherited from interface uk.co.westhawk.snmp.stack.SnmpContextBasisFace |
DEFAULT_PORT, KVM_SOCKET, MAXPDU, MSS, NETSCAPE_SOCKET, STANDARD_SOCKET, TCP_SOCKET |
Method Summary | |
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. |
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 |
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. |
Methods inherited from interface uk.co.westhawk.snmp.stack.SnmpContextBasisFace |
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 |
Field Detail |
public static final java.lang.String version_id
public static final int SNMPv1_Security_Model
public static final int SNMPv2c_Security_Model
public static final int USM_Security_Model
public static final int MD5_PROTOCOL
public static final int SHA1_PROTOCOL
public static final java.lang.String Default_UserName
public static final java.lang.String Default_ContextName
public static final java.lang.String[] ProtocolNames
Method Detail |
public java.lang.String getUserName()
public void setUserName(java.lang.String newUserName)
newUserName
- The new usernamepublic boolean isUseAuthentication()
public void setUseAuthentication(boolean newUseAuthentication)
newUseAuthentication
- The use of authenticationpublic java.lang.String getUserAuthenticationPassword()
public void setUserAuthenticationPassword(java.lang.String newUserAuthPassword) throws java.lang.IllegalArgumentException
newUserAuthPassword
- The user authentication password
java.lang.IllegalArgumentException
public void setAuthenticationProtocol(int protocol) throws java.lang.IllegalArgumentException
protocol
- The authentication protocol to be used
java.lang.IllegalArgumentException
MD5_PROTOCOL
,
SHA1_PROTOCOL
public int getAuthenticationProtocol()
MD5_PROTOCOL
,
SHA1_PROTOCOL
public boolean isUsePrivacy()
public void setUsePrivacy(boolean newUsePrivacy)
newUsePrivacy
- The use of privacypublic java.lang.String getUserPrivacyPassword()
public void setUserPrivacyPassword(java.lang.String newUserAuthPassword) throws java.lang.IllegalArgumentException
newUserAuthPassword
- The user privacy password
java.lang.IllegalArgumentException
public 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 contextEngineID
java.lang.IllegalArgumentException
UsmAgent.getSnmpEngineId()
public byte[] getContextEngineId()
public void setContextName(java.lang.String newContextName)
newContextName
- The contextNameDefault_ContextName
public java.lang.String getContextName()
public boolean addDiscoveryPdu(DiscoveryPdu pdu) throws java.io.IOException, PduException
pdu
- the discovery PDU
java.io.IOException
PduException
public 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
public void setUsmAgent(UsmAgent agent)
agent
- The USM authoritative interfacepublic UsmAgent getUsmAgent()
setUsmAgent(uk.co.westhawk.snmp.stack.UsmAgent)
|
SNMP Stack 5_1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |