com.adventnet.snmp.beans
Class SnmpServer

java.lang.Object
  extended by com.adventnet.snmp.beans.SnmpServer
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SnmpRequestServer, SnmpTarget

public class SnmpServer
extends java.lang.Object
implements java.io.Serializable

This class maintains all the resources required for Snmp manager applications and applets. The resources are like SnmpAPI, SnmpSession, MibOperations and etc.The beans component like SnmpTarget and SnmpRequestServer extends this class. For every instance of these beans the SnmpServer uses the same resources.

See Also:
Serialized Form

Field Summary
(package private)  SnmpAPI api
           
(package private)  java.applet.Applet applet
          This is if SAS needs to be used
(package private) static java.lang.String ASN1_ERROR_ERR
           
(package private) static java.lang.String ASN1_ERROR_OID
           
(package private)  boolean attemptCompleteData
          get complete PDU by spliting the request if tooBig
(package private)  boolean attemptPartialData
          get part of the PDU if some objects fails
static byte AUTH_NO_PRIV
          Used to specify that authenticated message be sent to the peer.
static byte AUTH_PRIV
          Used to specify that authentication and privacy are used in the communication with the peer.
(package private)  byte[] authKey
           
(package private)  java.lang.String authPassword
           
(package private)  int authProtocol
           
(package private)  boolean broadCast
           
static int CBC_3DES
          Constant for SNMPV3 usmUser CBC_3DES PrivProtocol.
static int CBC_DES
          Constant for SNMPV3 usmUser CBC_DES PrivProtocol.
static int CFB_AES_128
          Constant for SNMPV3 usmUser CFB_AES_128 PrivProtocol.
static int CFB_AES_192
          Constant for SNMPV3 usmUser CFB_AES_192 PrivProtocol.
static int CFB_AES_256
          Constant for SNMPV3 usmUser CFB_AES_256 PrivProtocol.
(package private)  int clientID
           
(package private)  java.lang.String community
           
(package private)  byte[] contextID
           
(package private)  java.lang.String contextName
           
(package private)  int count
           
(package private)  boolean debugon
           
(package private) static java.lang.String DECRYPT_ERROR_ERR
           
(package private) static java.lang.String DECRYPT_ERROR_OID
           
(package private)  java.util.Vector discoveryTimeSyncListener
           
(package private)  java.lang.String enc
           
(package private)  byte[] engineID
           
(package private)  SnmpEngineTable engineTable
           
(package private)  java.lang.String error
           
(package private)  int errorCode
           
(package private)  java.util.Hashtable errorcodes
           
(package private)  boolean errorFlag
           
(package private)  int errorIndex
           
(package private)  int exceptionCode
           
(package private)  java.util.Hashtable exceptionCodes
           
(package private) static boolean finalize_called
           
(package private)  SnmpGroup group
           
(package private)  java.lang.String[] group_oidList
           
(package private)  boolean isName
           
(package private)  boolean isNotSet
           
(package private)  boolean isSendPDUByGroup
           
(package private)  java.util.Vector listeners
           
(package private)  java.lang.String[] localAddrs
           
(package private)  int localPort
          this is for starting session at this localport
(package private)  boolean logFlag
           
(package private)  com.adventnet.utils.SnmpLoggerImpl loggerImpl
           
(package private)  int logLevel
           
(package private)  int logType
           
(package private)  java.util.Vector matchServ
           
(package private)  java.util.Hashtable matchtable
           
(package private)  int MAX_NUM_ROWS
           
(package private)  int maxRepetitions
           
static int MD5_AUTH
          Constants USM Authentication
(package private)  MibOperations mibOps
           
(package private)  Snmp3Message msg
           
static int NO_AUTH
          Constants USM Authentication
static byte NO_AUTH_NO_PRIV
          Used to specify that both authentication and privacy should not be used.
static int NO_PRIV
          Constant for SNMPV3 usmUser NoPrivProtocol.
(package private)  int nonRepeaters
           
(package private) static java.lang.String NOT_TIME_WINDOWS_ERR
           
(package private) static java.lang.String NOT_TIME_WINDOWS_OID
           
(package private)  java.util.Vector nullsession_targets
           
 SnmpOID[] oidList
          The Object Identifiers will be stored in this array variable.
(package private)  ProtocolOptions options
           
(package private)  int pduErrorIndex
           
(package private)  java.util.Vector pollertargets
           
(package private)  int pollInterval
           
(package private)  int port
           
(package private)  java.util.Vector port_targets
           
(package private)  java.lang.String principal
           
(package private)  java.lang.String printStr
           
(package private)  byte[] privKey
           
(package private)  java.lang.String privPassword
           
(package private)  int privProtocol
           
(package private)  java.util.Vector propertylisteners
           
(package private)  int protocol
           
(package private)  com.adventnet.snmp.snmp2.server.RequestHandler reqHandler
           
(package private)  int reqid
           
(package private)  int retries
           
(package private)  int secModel
           
(package private)  byte securityLevel
           
(package private)  boolean sendTimeoutEvents
           
(package private)  int sentreqid
           
(package private)  SnmpSession session
           
(package private)  java.util.Vector session_port_targets
          To keep track of the number of different targets.
(package private)  java.util.Vector session_targets
           
(package private)  java.lang.String sessionName
           
static int SHA_AUTH
          Constants USM Authentication
static byte SNMPGET
          Constant for SNMP get request.
static byte SNMPGETBULK
          Constant for SNMP V2 Get Bulk request.
static byte SNMPGETNEXT
          Constant for SNMP get next request.
static byte SNMPINFORM
          Constant for SNMP V2 INFORM request.
static byte SNMPREPORT
          Constant for SNMP V2 Report request.
static byte SNMPRESPONSE
          Constant for SNMP response request
static byte SNMPSET
          Constant for SNMP set request request.
(package private) static java.util.Hashtable snmpStore
          This will store the common session used by all SnmpServers in a VM
static byte SNMPTRAP
          Constant for SNMP trap request.
static byte SNMPV2TRAP
          Constant for SNMP V2 Trap request.
(package private)  java.lang.String targetHost
           
(package private)  java.util.Vector targets
          This will track SnmpServers using the common SNMP session
(package private)  int timeout
           
(package private) static java.lang.String UKN_ENGINEID_ERR
           
(package private) static java.lang.String UKN_ENGINEID_OID
           
(package private) static java.lang.String UKN_USERNAMES_ERR
           
(package private) static java.lang.String UKN_USERNAMES_OID
           
(package private) static java.lang.String UNSUPP_SEC_LEVEL_ERR
           
(package private) static java.lang.String UNSUPP_SEC_LEVEL_OID
           
(package private)  java.lang.String userError
           
(package private)  int userErrorCode
           
(package private)  USMUserTable usmTable
           
(package private)  java.util.Hashtable v3ErrorTable
           
(package private)  boolean validateUser
           
(package private)  int varbinds_per_request
          number of varbinds to be sent with the splitted request
(package private)  SnmpVar[] varList
           
(package private)  int version
           
static int VERSION1
          Constant for SNMP Version 1.
static int VERSION2C
          Constant for SNMP Version 2C.
static int VERSION3
          Constant for SNMP Version 3.
(package private)  java.lang.String writeCommunity
           
(package private) static java.lang.String WRONG_DIGEST_ERR
           
(package private) static java.lang.String WRONG_DIGEST_OID
           
 
Constructor Summary
SnmpServer()
          Use this constructor for applications.
SnmpServer(java.applet.Applet applet)
          Use this constructor for applets.
SnmpServer(java.applet.Applet applet, int localPort, java.lang.String sessionName)
          Use this constructor for applets with the specified local port and specified session name .
SnmpServer(int protocol, ProtocolOptions options)
          Use this constructor when using protocols other than UDP/IP with the specified protocol and the protocol options.
SnmpServer(int localPort, java.lang.String sessionName)
          Use this constructor for applications with the specified local port and specified session name .
SnmpServer(SnmpSession ses, MibOperations mib)
           
SnmpServer(java.lang.String[] localAddrs, java.lang.String sessionName)
          Use this constructor for applications in which the session needs to be bound to some local address.
 
Method Summary
(package private)  void assignLogger(com.adventnet.afp.log.LoggerProperties loggerProps)
           
 void async_create_v3_tables()
          Method to create new users and add them to the userTable in USMUserTable.
 int create_v3_tables()
          Method to create new users and add them to the userTable in USMUserTable.
protected  void finalize()
          This cleanses up the common connection if no one is using
protected  void genEvent(SnmpPDU pdu)
          generate the events to the listeners
protected  void genEvent(SnmpPDU pdu, SnmpServer server)
          generate the events to the listeners
protected  void genTimeoutEvent(SnmpPDU pdu)
          generate the events to the listeners
 java.lang.String getCharacterEncoding()
          Get the Character Encoding being used.
(package private)  java.lang.Object[] getCompleteResponse(int varbinds_per_request)
          Gets the complete data from the agent by splitting the varbinds into multiple requests.This can set if request pdu is very big.
(package private)  void getGROUPSNMPResponse(SnmpPDU pdu)
           
 java.lang.String getHostAddress(java.lang.String hostname)
          To return the ip address as String for the given host name.
 boolean getIgnoreSpecificControlCodes()
          To get the value determining whether the new-line characters, tabs and carriage returns are printed or their hex values.
 java.lang.String[] getLocalAddresses()
          Returns the value of localAddress bound on the session instance.
 java.lang.String getMibPath()
          To get the search Path in which the loadMibModules() will search for the MIB modules.
 boolean getOverwriteCMI()
          Deprecated. Instead use isOverwriteCMI() method.
 int getPacketBufferSize()
          Gets the Datagram Buffer Size used for receiving SNMP packets.
(package private)  SnmpPDU getPdu(byte command)
           
 byte getSecLevelForTimeSync()
          Returns the securitylevel that would be used when doing a V3 timeSync for a authPriv user.
 SecurityProvider getSecurityProvider()
          Gets the security provider.
 java.lang.Object getSecurityTable(int secModel)
          Returns the SecurityModelTable as an object for a given security model.
 java.lang.String getSerializedMibFileName()
          Gets the name of the Serialized Mib file
 java.text.SimpleDateFormat getSimpleDateFormat()
          Gets the SimpleDateFormat for this class.
 byte[] getSnmpEngineID()
          Gets the SnmpEngineID of this SNMP entity.
 SnmpEngineTable getSnmpEngineTable()
          returns the SnmpEnginetable which contains the information about v3 engine configured to this bean
(package private)  SnmpPDU getSNMPResponse(byte command)
          This gets the SNMP response from the agent
(package private)  SnmpPDU getSNMPResponse(SnmpOID[] oids, SnmpVar[] vars, byte command)
          This gets the SNMP response from the agent
(package private)  SnmpPDU getSNMPResponse(SnmpPDU pdu)
           
(package private)  SnmpPDU getSNMPResponse(SnmpPDU pdu, boolean errflag)
           
 int getTimeoutInMilliSec()
          Returns the timeout value in milliseconds.
 int getTimeToWait()
          Gets the inter-packet delay time set on this SnmpSession object.
 USMUserTable getUSMTable()
          returns the USMUserTable which contains the informations about v3 Users
 java.lang.String getV3ConfigTable()
          Gets the table name that was configured for V3.
 int getV3MsgMaxSize()
          Get the maximum size of the Snmp3Message.
 void initJdbcParams(java.lang.String driverName, java.lang.String URL, java.lang.String userName, java.lang.String passWord)
          If you need to use a database support, this method should be invoked to initialize the Jdbc Parameters.
 void initSecurityProvider()
          This method initiates the SecurityProvider by reading from the file securityProvider.confg .
(package private)  void initSnmpStore(SnmpServer target)
          This sets up the common connection
 boolean isBroadcastFeatureEnable()
          The method returns whether the API has the broadcast feature enabled or not.
 boolean isLoadFromCompiledMibs()
          To check whether the mib will be loaded from CompiledMib files or not.
 boolean isLoadFromSerializedMibs()
          To check whether the mib will be loaded from Serialized Mib files or not.
 boolean isLoadMibsFromDatabase()
          To check whether the mib will be loaded from database or not.
 boolean isOverwriteCMI()
          Returns the status of whether overwrite compiled mibs option is set.
 boolean isOverwriteMibsInDatabase()
          Returns whether the mibs in database will be overwritten or not.
 boolean isReadDesc()
          Returns true if reading descriptions from compiled modules is enabled
 boolean isSendPDUByGroup()
          returns the state whether the pdus will be grouped and sent as single PDU.
 boolean isSerializeMibs()
          Returns whether the mib file will be serialized or not.
 boolean isSetAutoInformResponse()
          High level API method to check if the automatic response flag for the Inform Request is set.
 boolean isSupportedSecurityModel(int secModel)
          Specifies if a particular security model is supported or not.
 boolean isV3DatabaseFlag()
          To check whether V3 database flag is set or not
 boolean isValidateUser()
          To check whether the validating user is enabled for v3 case
(package private)  void loadMibs(java.lang.String mibs)
          Load the mibs specified by white-space separated list of mibs.
(package private)  void logErrorMessage(java.lang.String error)
          All the methods of this class (including sub classes), which needs to redirect an error message to the LogManger or to the standard console, can use this method.
(package private)  void logInfoMessage(java.lang.String info)
          All the methods of this class (including sub classes), which needs to redirect an info message to the LogManger or to the standard console, can use this method.
 void manage_v3_tables()
          Method to create new users and add them to userTable in USMUserTable.
 void managing_v3_tables()
          Method to create new users and add them to userTable in USMUserTable.
 void releaseResources()
          Though the resources will be cleaned up by the garbage collector, if the application is no more using the SnmpTarget and SnmpRequestServer bean instances, this method can be used to immediately release the resources.
(package private)  int sendSNMPRequest(byte command)
          This gets the SNMP response from the agent
(package private)  int sendSNMPRequest(SnmpOID[] oids, SnmpVar[] vars, byte command)
          This sends the SNMP request to the agent
(package private)  int sendSNMPRequest(SnmpPDU pdu)
          This sends the SNMP request.
 void setAutoInformResponse(boolean flag)
          High-level API method to set the automatic response flag for the Inform Request.
 void setBroadcastFeatureEnable(boolean bool)
          The method can be used to enable/disable the broadcast feature available in the API.
 void setCharacterEncoding(java.lang.String enc)
          Set the Character Encoding to be used.
 void setErrorFlagEnable(boolean errflag)
           
(package private)  void setErrorMessage(java.lang.Exception e, SnmpPDU pdu)
           
 void setIgnoreSpecificControlCodes(boolean specConCode)
          To set the value determining whether the new-line characters, tabs and carriage returns are printed or their hex values.
 void setLoadFromCompiledMibs(boolean flag)
          Defines whether to load mib from compiled MIBs.
 void setLoadFromSerializedMibs(boolean flag)
          Method defines whether to load MIB from serialized file.
 void setLoadMibsFromDatabase(boolean flag)
          Defines whether to load mib from DataBase.
 void setMibOperations(MibOperations mibops)
          Set the MibOperations.This can be used when the API user wants the MibBrowser to use the localinstance of MibOperations instead of the Static MibOperations shared by all the other beans.
 void setMibPath(java.lang.String path)
          To set the search Path in which the loadMibModules() will search for the MIB modules.
 void setOverwriteCMI(boolean overWrite)
          Defines whether to overwrite the existing compiled MIB files.
 void setOverwriteMibsInDatabase(boolean overWrite)
          Defines whether to overwrite the MIB in the DataBase.
 void setPacketBufferSize(int size)
          Sets the Datagram Buffer Size used for receiving SNMP packets.
(package private)  void setPduParams(SnmpPDU pdu)
           
 void setReadDesc(boolean readFlag)
          Sets the flag to read descriptions from compiled mib modules.
 void setReceiveBufferSize(int size)
          Sets the buffer size of this SnmpServer.
 void setSecLevelForTimeSync(byte secLevel)
          Sets the securityLevel to use when doing a V3 timeSync for a authPriv user.
 void setSendPDUByGroup(boolean flag)
          set the state whether the PDUs should be grouped and send all PDUs as single PDU.After setting it to true this instance will be added to vector.This should be set to false, if this instance is no longer used.
 void setSerializedMibFileName(java.lang.String serFileName)
          Method defines the name of the Serialized MIB File.
 void setSerializeMibs(boolean flag)
          Defines whether to serialize the MibModule.
 void setSimpleDateFormat(java.text.SimpleDateFormat sdf)
          Sets the SimpleDateFormat for this class.
 void setSnmpEngineID(byte[] engineID)
          Sets the SnmpEngineID for this SNMP entity.
 void setTimeoutInMilliSec(int time)
          Sets the timeout value which should be given in milliseconds.
 void setTimeToWait(int waittime)
          Sets the inter-packet delay time.
 void setV3ConfigTable(java.lang.String tableName)
          Sets the configured tableName specified in the case of V3Database.
 void setV3DatabaseFlag(boolean v3Flag)
          If you need to use database support for V3 , set this flag to true.
 void setV3MsgMaxSize(int size)
          Sets the maximum size of Snmp3Message.
(package private)  void updateEntry(USMUserEntry u, byte[] eid, int authProtocol, java.lang.String authPassword, java.lang.String privPassword)
           
(package private)  void updateEntry(USMUserEntry u, byte[] eid, int authProtocol, java.lang.String authPassword, java.lang.String privPassword, int privProtocol)
           
 void validateUser(boolean validate)
          Can be used to set whether the NO_AUTH_NO_PRIV user should be authenticated and, to validate the privPassword in AUTHPRIV case
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

reqid

int reqid

debugon

boolean debugon

clientID

int clientID

protocol

int protocol

options

ProtocolOptions options

finalize_called

static volatile boolean finalize_called

localAddrs

java.lang.String[] localAddrs

reqHandler

transient com.adventnet.snmp.snmp2.server.RequestHandler reqHandler

broadCast

boolean broadCast

loggerImpl

com.adventnet.utils.SnmpLoggerImpl loggerImpl

logFlag

boolean logFlag

logLevel

int logLevel

logType

int logType

printStr

java.lang.String printStr

isSendPDUByGroup

boolean isSendPDUByGroup

isNotSet

boolean isNotSet

count

int count

sentreqid

int sentreqid

matchtable

java.util.Hashtable matchtable

matchServ

java.util.Vector matchServ

group_oidList

java.lang.String[] group_oidList

snmpStore

static java.util.Hashtable snmpStore
This will store the common session used by all SnmpServers in a VM


targets

transient java.util.Vector targets
This will track SnmpServers using the common SNMP session


session_port_targets

transient java.util.Vector session_port_targets
To keep track of the number of different targets.


session_targets

transient java.util.Vector session_targets

port_targets

transient java.util.Vector port_targets

nullsession_targets

transient java.util.Vector nullsession_targets

pollertargets

transient java.util.Vector pollertargets

api

transient SnmpAPI api

session

transient SnmpSession session

group

transient SnmpGroup group

mibOps

transient MibOperations mibOps

propertylisteners

java.util.Vector propertylisteners

listeners

java.util.Vector listeners

sendTimeoutEvents

boolean sendTimeoutEvents

targetHost

java.lang.String targetHost

port

int port

community

java.lang.String community

writeCommunity

java.lang.String writeCommunity

oidList

public SnmpOID[] oidList
The Object Identifiers will be stored in this array variable. This will be used for PDU construction.


varList

SnmpVar[] varList

timeout

int timeout

retries

int retries

maxRepetitions

int maxRepetitions

nonRepeaters

int nonRepeaters

MAX_NUM_ROWS

int MAX_NUM_ROWS

version

int version

isName

boolean isName

localPort

int localPort
this is for starting session at this localport


sessionName

java.lang.String sessionName

pollInterval

int pollInterval

principal

java.lang.String principal

engineID

byte[] engineID

contextName

java.lang.String contextName

contextID

byte[] contextID

authPassword

java.lang.String authPassword

privPassword

java.lang.String privPassword

authKey

byte[] authKey

authProtocol

int authProtocol

privProtocol

int privProtocol

privKey

byte[] privKey

securityLevel

byte securityLevel

secModel

int secModel

engineTable

SnmpEngineTable engineTable

usmTable

USMUserTable usmTable

discoveryTimeSyncListener

java.util.Vector discoveryTimeSyncListener

applet

java.applet.Applet applet
This is if SAS needs to be used


attemptPartialData

boolean attemptPartialData
get part of the PDU if some objects fails


attemptCompleteData

boolean attemptCompleteData
get complete PDU by spliting the request if tooBig


varbinds_per_request

int varbinds_per_request
number of varbinds to be sent with the splitted request


error

java.lang.String error

userError

java.lang.String userError

userErrorCode

int userErrorCode

errorCode

int errorCode

errorIndex

int errorIndex

pduErrorIndex

int pduErrorIndex

errorcodes

java.util.Hashtable errorcodes

exceptionCode

int exceptionCode

exceptionCodes

java.util.Hashtable exceptionCodes

SNMPGET

public static final byte SNMPGET
Constant for SNMP get request.

See Also:
Constant Field Values

SNMPGETNEXT

public static final byte SNMPGETNEXT
Constant for SNMP get next request.

See Also:
Constant Field Values

SNMPRESPONSE

public static final byte SNMPRESPONSE
Constant for SNMP response request

See Also:
Constant Field Values

SNMPSET

public static final byte SNMPSET
Constant for SNMP set request request.

See Also:
Constant Field Values

SNMPTRAP

public static final byte SNMPTRAP
Constant for SNMP trap request.

See Also:
Constant Field Values

SNMPGETBULK

public static final byte SNMPGETBULK
Constant for SNMP V2 Get Bulk request.

See Also:
Constant Field Values

SNMPINFORM

public static final byte SNMPINFORM
Constant for SNMP V2 INFORM request.

See Also:
Constant Field Values

SNMPV2TRAP

public static final byte SNMPV2TRAP
Constant for SNMP V2 Trap request.

See Also:
Constant Field Values

SNMPREPORT

public static final byte SNMPREPORT
Constant for SNMP V2 Report request.

See Also:
Constant Field Values

VERSION1

public static final int VERSION1
Constant for SNMP Version 1.

See Also:
Constant Field Values

VERSION2C

public static final int VERSION2C
Constant for SNMP Version 2C.

See Also:
Constant Field Values

VERSION3

public static final int VERSION3
Constant for SNMP Version 3.

See Also:
Constant Field Values

NO_AUTH

public static final int NO_AUTH
Constants USM Authentication

See Also:
Constant Field Values

MD5_AUTH

public static final int MD5_AUTH
Constants USM Authentication

See Also:
Constant Field Values

SHA_AUTH

public static final int SHA_AUTH
Constants USM Authentication

See Also:
Constant Field Values

NO_PRIV

public static final int NO_PRIV
Constant for SNMPV3 usmUser NoPrivProtocol.

Since:
AdventNet SNMP API 4 SP4 ( Release 4.0.4 )
See Also:
Constant Field Values

CBC_DES

public static final int CBC_DES
Constant for SNMPV3 usmUser CBC_DES PrivProtocol.

Since:
AdventNet SNMP API 4 SP4 ( Release 4.0.4 )
See Also:
Constant Field Values

CFB_AES_128

public static final int CFB_AES_128
Constant for SNMPV3 usmUser CFB_AES_128 PrivProtocol.

Since:
AdventNet SNMP API 4 SP4 ( Release 4.0.4 )
See Also:
Constant Field Values

CFB_AES_192

public static final int CFB_AES_192
Constant for SNMPV3 usmUser CFB_AES_192 PrivProtocol.

Since:
AdventNet SNMP API 4 SP5 ( Release 4.0.5 )
See Also:
Constant Field Values

CFB_AES_256

public static final int CFB_AES_256
Constant for SNMPV3 usmUser CFB_AES_256 PrivProtocol.

Since:
AdventNet SNMP API 4 SP5 ( Release 4.0.5 )
See Also:
Constant Field Values

CBC_3DES

public static final int CBC_3DES
Constant for SNMPV3 usmUser CBC_3DES PrivProtocol.

Since:
AdventNet SNMP API 4 SP5 ( Release 4.0.5 )
See Also:
Constant Field Values

NO_AUTH_NO_PRIV

public static final byte NO_AUTH_NO_PRIV
Used to specify that both authentication and privacy should not be used.

See Also:
Constant Field Values

AUTH_NO_PRIV

public static final byte AUTH_NO_PRIV
Used to specify that authenticated message be sent to the peer.

See Also:
Constant Field Values

AUTH_PRIV

public static final byte AUTH_PRIV
Used to specify that authentication and privacy are used in the communication with the peer.

See Also:
Constant Field Values

validateUser

boolean validateUser

v3ErrorTable

java.util.Hashtable v3ErrorTable

UNSUPP_SEC_LEVEL_OID

static java.lang.String UNSUPP_SEC_LEVEL_OID

NOT_TIME_WINDOWS_OID

static java.lang.String NOT_TIME_WINDOWS_OID

UKN_USERNAMES_OID

static java.lang.String UKN_USERNAMES_OID

UKN_ENGINEID_OID

static java.lang.String UKN_ENGINEID_OID

WRONG_DIGEST_OID

static java.lang.String WRONG_DIGEST_OID

DECRYPT_ERROR_OID

static java.lang.String DECRYPT_ERROR_OID

ASN1_ERROR_OID

static java.lang.String ASN1_ERROR_OID

UNSUPP_SEC_LEVEL_ERR

static java.lang.String UNSUPP_SEC_LEVEL_ERR

NOT_TIME_WINDOWS_ERR

static java.lang.String NOT_TIME_WINDOWS_ERR

UKN_USERNAMES_ERR

static java.lang.String UKN_USERNAMES_ERR

UKN_ENGINEID_ERR

static java.lang.String UKN_ENGINEID_ERR

WRONG_DIGEST_ERR

static java.lang.String WRONG_DIGEST_ERR

DECRYPT_ERROR_ERR

static java.lang.String DECRYPT_ERROR_ERR

ASN1_ERROR_ERR

static java.lang.String ASN1_ERROR_ERR

enc

java.lang.String enc

errorFlag

boolean errorFlag

msg

Snmp3Message msg
Constructor Detail

SnmpServer

SnmpServer(SnmpSession ses,
           MibOperations mib)

SnmpServer

SnmpServer()
Use this constructor for applications. Use for applets only if you want to prevent use of SAS. MIB loading from applets may fail from this SnmpServer instance if you use this constructor.This matters only for the first SnmpServer instance, and subsequent instances will use the same SNMP mechanisms.


SnmpServer

SnmpServer(java.applet.Applet applet)
Use this constructor for applets. Applets will try and use SAS, and if unsuccessful will use local sockets. MIB loading from applets may fail from this SnmpServer instance if you use this constructor. This matters only for the first SnmpServer instance, and subsequent instances will use the same SNMP mechanisms.


SnmpServer

SnmpServer(int localPort,
           java.lang.String sessionName)
Use this constructor for applications with the specified local port and specified session name . Use for applets only if you want to prevent use of SAS. MIB loading from applets may fail from this SnmpServer instance if you use this constructor. This matters only for the first SnmpServer instance, and subsequent instancesi will use the same SNMP mechanisms.


SnmpServer

SnmpServer(java.applet.Applet applet,
           int localPort,
           java.lang.String sessionName)
Use this constructor for applets with the specified local port and specified session name . Applets will try and use SAS, and if unsuccessful will use local sockets. MIB loading from applets may fail from this SnmpServer instance if you use this constructor. This matters only for the first SnmpServer instance, and subsequent instances will use the same SNMP mechanisms.


SnmpServer

SnmpServer(int protocol,
           ProtocolOptions options)
Use this constructor when using protocols other than UDP/IP with the specified protocol and the protocol options. Applets will try and use SAS, and if unsuccessful will use local sockets. MIB loading from applets may fail from this SnmpServer instance if you use this constructor. This matters only for the first SnmpServer instance, and subsequent instances will use the same SNMP mechanisms.


SnmpServer

SnmpServer(java.lang.String[] localAddrs,
           java.lang.String sessionName)
Use this constructor for applications in which the session needs to be bound to some local address. Usually, the session will be shared across different instances of this class. If seperate session needs to be used, then specify unique sessionNames for the instances created.

Parameters:
localAddrs - The local addresses to which the session needs to be bound.
sessionName - Specify unique sessionNames for the instances which need to use different SnmpSession instances to send data.
Method Detail

loadMibs

void loadMibs(java.lang.String mibs)
        throws MibException,
               java.io.IOException,
               java.io.FileNotFoundException
Load the mibs specified by white-space separated list of mibs. If first SnmpServer has been opened with applet parameter, then URLs will be used.

Throws:
MibException - is thrown upon parse errors.
java.io.IOException - is thrown upon IO errors.
java.io.FileNotFoundException - is thrown if the file is not found.

getHostAddress

public java.lang.String getHostAddress(java.lang.String hostname)
To return the ip address as String for the given host name. e.g., returns 192.234.123.56 for littleangel.com

Parameters:
hostname - the host whose ipaddress needs to be looked up
Returns:
the host address, null if Host Not Found

getSecurityProvider

public SecurityProvider getSecurityProvider()
Gets the security provider.

Returns:
Security Provider.

getSNMPResponse

SnmpPDU getSNMPResponse(SnmpOID[] oids,
                        SnmpVar[] vars,
                        byte command)
This gets the SNMP response from the agent


getSNMPResponse

SnmpPDU getSNMPResponse(SnmpPDU pdu)

getSNMPResponse

SnmpPDU getSNMPResponse(SnmpPDU pdu,
                        boolean errflag)

isSendPDUByGroup

public boolean isSendPDUByGroup()
returns the state whether the pdus will be grouped and sent as single PDU.

Returns:
true if the pdus will be sent as single pdu by grouping.

setSendPDUByGroup

public void setSendPDUByGroup(boolean flag)
set the state whether the PDUs should be grouped and send all PDUs as single PDU.After setting it to true this instance will be added to vector.This should be set to false, if this instance is no longer used.


getPacketBufferSize

public int getPacketBufferSize()
Gets the Datagram Buffer Size used for receiving SNMP packets. The default value is 64K.

Returns:
the datagram packet buffer size in bytes.
Since:
AdventNet SNMP API 4 SP3 ( Release 4.0.3 )

setPacketBufferSize

public void setPacketBufferSize(int size)
Sets the Datagram Buffer Size used for receiving SNMP packets. Use this method only in case you would need to have a buffer size in excess of 8000 bytes

Parameters:
size - The size of the datagram packet buffer to be used in bytes. An initial allocation of 64K is made by default.
Since:
AdventNet SNMP API 4 SP3 ( Release 4.0.3 )

getSNMPResponse

SnmpPDU getSNMPResponse(byte command)
This gets the SNMP response from the agent


getGROUPSNMPResponse

void getGROUPSNMPResponse(SnmpPDU pdu)

sendSNMPRequest

int sendSNMPRequest(SnmpOID[] oids,
                    SnmpVar[] vars,
                    byte command)
This sends the SNMP request to the agent


sendSNMPRequest

int sendSNMPRequest(byte command)
This gets the SNMP response from the agent


sendSNMPRequest

int sendSNMPRequest(SnmpPDU pdu)
This sends the SNMP request.


genTimeoutEvent

protected void genTimeoutEvent(SnmpPDU pdu)
generate the events to the listeners


genEvent

protected void genEvent(SnmpPDU pdu,
                        SnmpServer server)
generate the events to the listeners


setSimpleDateFormat

public void setSimpleDateFormat(java.text.SimpleDateFormat sdf)
Sets the SimpleDateFormat for this class. When the debug is on, the time stamp will be printed along with the packet dumps. The format of this timestamp can be changed using this method.

Parameters:
format - The SimpleDateFormat used for printing the timestamp.
See Also:
getSimpleDateFormat()

getSimpleDateFormat

public java.text.SimpleDateFormat getSimpleDateFormat()
Gets the SimpleDateFormat for this class.

Returns:
the SimpleDateFormat used by this class. This method will return a non-null value, only when
1. The SimpleDateFormat is previously set using setSimpleDateFormat(SimpleDateFormat) OR
2. When the debug mode is on and atleast one packet has been printed.
See Also:
setSimpleDateFormat(SimpleDateFormat)

getUSMTable

public USMUserTable getUSMTable()
returns the USMUserTable which contains the informations about v3 Users

See Also:
USMUserTable

getSnmpEngineTable

public SnmpEngineTable getSnmpEngineTable()
returns the SnmpEnginetable which contains the information about v3 engine configured to this bean

See Also:
SnmpEngineTable

setSnmpEngineID

public void setSnmpEngineID(byte[] engineID)
Sets the SnmpEngineID for this SNMP entity.

Parameters:
engineID - The SnmpEngineID to be used.

getSnmpEngineID

public byte[] getSnmpEngineID()
Gets the SnmpEngineID of this SNMP entity.

Returns:
the SnmpEngineID of this entity.

genEvent

protected void genEvent(SnmpPDU pdu)
generate the events to the listeners


initSnmpStore

void initSnmpStore(SnmpServer target)
This sets up the common connection


initJdbcParams

public void initJdbcParams(java.lang.String driverName,
                           java.lang.String URL,
                           java.lang.String userName,
                           java.lang.String passWord)
                    throws java.sql.SQLException,
                           java.lang.ClassNotFoundException
If you need to use a database support, this method should be invoked to initialize the Jdbc Parameters.

Parameters:
driverName - Name of the DataBase driver.
URL - URL pointing to the DataBase file name
userName - userName
passWord - password
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

isV3DatabaseFlag

public boolean isV3DatabaseFlag()
To check whether V3 database flag is set or not

Returns:
boolean v3 database flag

setV3DatabaseFlag

public void setV3DatabaseFlag(boolean v3Flag)
If you need to use database support for V3 , set this flag to true.

Parameters:
v3Flag - flag to be set.

setV3ConfigTable

public void setV3ConfigTable(java.lang.String tableName)
Sets the configured tableName specified in the case of V3Database.

Parameters:
tableName - the name of the table name to be configured.

getV3ConfigTable

public java.lang.String getV3ConfigTable()
Gets the table name that was configured for V3.


releaseResources

public void releaseResources()
Though the resources will be cleaned up by the garbage collector, if the application is no more using the SnmpTarget and SnmpRequestServer bean instances, this method can be used to immediately release the resources. Close the session and api if number of targets sharing it becomes zero. Otherwise decrement the targets count for that session and api.


finalize

protected void finalize()
                 throws java.lang.Throwable
This cleanses up the common connection if no one is using

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable - in case of finalization of errors

getSecLevelForTimeSync

public byte getSecLevelForTimeSync()
Returns the securitylevel that would be used when doing a V3 timeSync for a authPriv user. Can be AUTH_PRIV(3) or AUTH_NO_PRIV(1).

Returns:
The securityLevel.

setSecLevelForTimeSync

public void setSecLevelForTimeSync(byte secLevel)
Sets the securityLevel to use when doing a V3 timeSync for a authPriv user. Can be either AUTH_PRIV(3) or AUTH_NO_PRIV(1).

Parameters:
secLevel - The securityLevel to be set on this SnmpServer instance.

async_create_v3_tables

public void async_create_v3_tables()
Method to create new users and add them to the userTable in USMUserTable. It performs a discovery and timeSync (if required) asynchronously. Returns immediately after sending the requests.


validateUser

public void validateUser(boolean validate)
Can be used to set whether the NO_AUTH_NO_PRIV user should be authenticated and, to validate the privPassword in AUTHPRIV case

Parameters:
validate - The boolean value. If this value is set to true, and if this method is called for an
  • NO_AUTH_NO_PRIV user, then a get request will be sent to know if the user exits.
  • AUTH_PRIV user, then a get request will be sent to know if the priv password is correct.

isValidateUser

public boolean isValidateUser()
To check whether the validating user is enabled for v3 case


create_v3_tables

public int create_v3_tables()
Method to create new users and add them to the userTable in USMUserTable. Returns 1 if userTable is successfully created, negative value otherwise. The following error codes can be set ErrorCodes DISCOVERY_FAILED, TIME_SYNC_FAILED, WRONG_DIGEST_ERR,DECRYPT_ERROR_ERR, UKNOWN_ENGINEID_ERR,UKNOWN_USERNAMES_ERR,UNSUPP_SECLEVEL_ERR, WRONG_PRIVPASSWORD.

Returns:
0 if the version is other than v3. 1 if userTable is created Successfully. -1 if discovery fails. -2 if TimeSync fails. -3 if User is already cretaed for that host and port.
See Also:
ErrorMessages, #getErrorCode(), #getErrorString()

manage_v3_tables

public void manage_v3_tables()
Method to create new users and add them to userTable in USMUserTable. If the v3 parameters specified are already present in the userTable, it modifies the entry. However the UserName cannot be modified. The following error codes can be set ErrorCodes DISCOVERY_FAILED, TIME_SYNC_FAILED

See Also:
ErrorMessages, #getErrorCode(), #geterrorstring()

managing_v3_tables

public void managing_v3_tables()
                        throws SnmpException
Method to create new users and add them to userTable in USMUserTable. If the v3 parameters specified are already present in the userTable, it modifies the entry. However the UserName cannot be modified. The following error codes can be set ErrorCodes DISCOVERY_FAILED, TIME_SYNC_FAILED

Throws:
SnmpException
See Also:
ErrorMessages, #getErrorCode(), #getErrorString()

updateEntry

void updateEntry(USMUserEntry u,
                 byte[] eid,
                 int authProtocol,
                 java.lang.String authPassword,
                 java.lang.String privPassword)

updateEntry

void updateEntry(USMUserEntry u,
                 byte[] eid,
                 int authProtocol,
                 java.lang.String authPassword,
                 java.lang.String privPassword,
                 int privProtocol)

setCharacterEncoding

public void setCharacterEncoding(java.lang.String enc)
Set the Character Encoding to be used. The encoding specified will be used internally to convert String <--> byte[]. The Default value is ISO8859_1.

Parameters:
enc - The name of a character encoding. All the string encoding will be done base on this encoding.

getCharacterEncoding

public java.lang.String getCharacterEncoding()
Get the Character Encoding being used. This encoding scheme will be used internally to convert String <--> byte[]. The Default value is ISO8859_1.

Returns:
enc The character encoding used.

getPdu

SnmpPDU getPdu(byte command)

setPduParams

void setPduParams(SnmpPDU pdu)
            throws java.lang.Exception
Throws:
java.lang.Exception

setSerializeMibs

public void setSerializeMibs(boolean flag)
Defines whether to serialize the MibModule. This flag should be set before loading the MIBs. If this is set to true it will serialize the loaded MIBs. For ex: if RMON2-MIB is loaded, it will serialize this module along with the Imported Modules viz ., RFC1271-MIB,RFC1213-MIB,TOKEN-RING-RMON and saves it in a single file.The name of the serialized file can be set using the setSerializedMibFileName() method. In case,if serialized file name is not set,it will save the serialized file with the MIB file name along with ".ser" extention.Here, it will save it as RMON2-MIB.ser. Serialization is not supported in applets.


isSerializeMibs

public boolean isSerializeMibs()
Returns whether the mib file will be serialized or not.


setLoadFromSerializedMibs

public void setLoadFromSerializedMibs(boolean flag)
Method defines whether to load MIB from serialized file. This flag should be set before loading the MIBs. If both serializeMibs and loadFromSerializedMibs are set to true, it will just try to load the MIB as a serialized file.


setLoadFromCompiledMibs

public void setLoadFromCompiledMibs(boolean flag)
Defines whether to load mib from compiled MIBs. This flag should be set before loading the MIBs (By default it is set to false). If this flag is set to true, it will load from compiled file( i.e; .cmi and .cds files). For ex: RMON2-MIB is loaded, it will automatically load RMON2-MIB.cmi if it exists. otherwise it creates compiled files by parsing and then loads from it. If this flag is set to false, the mib is loaded without creating .cmi and .cds files. This is recommended in case of applets where you have security restrictions for file creation. This is slightly slower than loading from precompiled mibs. In Applets, precompiled mibs can be loaded but it cannot create/write compiled files.

If both loadFromSerializedMibs and loadFromCompiledMibs is set to true, it will just try to load the MIB as a serialized file.


setLoadMibsFromDatabase

public void setLoadMibsFromDatabase(boolean flag)
Defines whether to load mib from DataBase. The Jdbc Parameters should be set, using the initJdbcParams(), before calling this method. This flag should be set before loading the MIBs (By default it is set to false). If this flag is set to true, it will parse the mibs,and store it in the database. For ex: RMON2-MIB is loaded, it will parse the mib and store it in the database.

Parameters:
flag - boolean
See Also:
initJdbcParams(java.lang.String, java.lang.String, java.lang.String, java.lang.String)

setOverwriteMibsInDatabase

public void setOverwriteMibsInDatabase(boolean overWrite)
Defines whether to overwrite the MIB in the DataBase. NOTE: This applies only when the setLoadFromDataBase is set to true.


setOverwriteCMI

public void setOverwriteCMI(boolean overWrite)
Defines whether to overwrite the existing compiled MIB files. NOTE: This applies only when the setLoadFromCompiledMibs is set to true.


getOverwriteCMI

public boolean getOverwriteCMI()
Deprecated. Instead use isOverwriteCMI() method.

Gets the overwrite compiled mibs boolean. NOTE: This applies only when the setLoadFromCompiledMibs is set to true.


isOverwriteCMI

public boolean isOverwriteCMI()
Returns the status of whether overwrite compiled mibs option is set.

Returns:
true if the overwrite compiled mibs is set to true, otherwise false. NOTE: This applies only when the setLoadFromCompiledMibs is set to true

isOverwriteMibsInDatabase

public boolean isOverwriteMibsInDatabase()
Returns whether the mibs in database will be overwritten or not. NOTE: This applies only when the setLoadFromDataBase is set to true.


setReadDesc

public void setReadDesc(boolean readFlag)
Sets the flag to read descriptions from compiled mib modules. Default is true. Set it to false if you don't need the descriptions. NOTE: This applies only when the setLoadFromCompiledMibs is set to true.


isReadDesc

public boolean isReadDesc()
Returns true if reading descriptions from compiled modules is enabled


isLoadFromSerializedMibs

public boolean isLoadFromSerializedMibs()
To check whether the mib will be loaded from Serialized Mib files or not.

Returns:
true if the mib will be loaded from serialized mib files and false otherwise.

isLoadFromCompiledMibs

public boolean isLoadFromCompiledMibs()
To check whether the mib will be loaded from CompiledMib files or not.

Returns:
true if the mib will be loaded from compiled mib files and false otherwise.

isLoadMibsFromDatabase

public boolean isLoadMibsFromDatabase()
To check whether the mib will be loaded from database or not.

Returns:
true if the mib will be loaded from database and false otherwise.

setSerializedMibFileName

public void setSerializedMibFileName(java.lang.String serFileName)
Method defines the name of the Serialized MIB File. The Serialized file will be saved with this filename in the directory from which the mib is loaded.


getIgnoreSpecificControlCodes

public boolean getIgnoreSpecificControlCodes()
To get the value determining whether the new-line characters, tabs and carriage returns are printed or their hex values.

Returns:
true indicates that they are printed as they are false indicates that their hex value is printed.

setIgnoreSpecificControlCodes

public void setIgnoreSpecificControlCodes(boolean specConCode)
To set the value determining whether the new-line characters, tabs and carriage returns are printed or their hex values.

Parameters:
specConCode - true implies that they are printed as they are false implies that their hex value is printed.

getSerializedMibFileName

public java.lang.String getSerializedMibFileName()
Gets the name of the Serialized Mib file


initSecurityProvider

public void initSecurityProvider()
                          throws SnmpException
This method initiates the SecurityProvider by reading from the file securityProvider.confg . It will register all the security models specified in the securityProvider.config file. Before you make any requests using any of the beans, this method has to be called so that the security provider is initiated.

Throws:
SnmpException - if the file could not be found or if the security model could not be registered.

getSecurityTable

public java.lang.Object getSecurityTable(int secModel)
Returns the SecurityModelTable as an object for a given security model.

Returns:
the SecurityModelTable as an object for a given security model. Null if the SecurityModelTable is not created.

isSupportedSecurityModel

public boolean isSupportedSecurityModel(int secModel)
Specifies if a particular security model is supported or not. Returns true if the security model is supported. False otherwise.

Parameters:
secModel - The secuirty model number which needs to be checked if it is supported.
Returns:
true if the specified securitymodel is supported. False otherwise.

isSetAutoInformResponse

public boolean isSetAutoInformResponse()
High level API method to check if the automatic response flag for the Inform Request is set. The default value is true.

Returns:
boolean value of the Inform Request response flag.

setAutoInformResponse

public void setAutoInformResponse(boolean flag)
High-level API method to set the automatic response flag for the Inform Request. If this flag is set to true, then the SNMP stack automatically sends a Get Reponse message back to the sender. The default value is true.

Parameters:
flag - boolean value of the flag to be set.

setMibPath

public void setMibPath(java.lang.String path)
To set the search Path in which the loadMibModules() will search for the MIB modules. Multiple paths can be specified using the pipe (|) as a separator.

Parameters:
searchPath - String specifying the search path, for multiple paths separate the paths by the pipe (|) symbol.

getMibPath

public java.lang.String getMibPath()
To get the search Path in which the loadMibModules() will search for the MIB modules.

Returns:
String containing the path which will be searched for the MIBs. null if the searchPath has not been set previously.

setMibOperations

public void setMibOperations(MibOperations mibops)
Set the MibOperations.This can be used when the API user wants the MibBrowser to use the localinstance of MibOperations instead of the Static MibOperations shared by all the other beans. Note:This will over-write the existing MibOperations used by the other beans.


setTimeToWait

public void setTimeToWait(int waittime)
Sets the inter-packet delay time. This method can be used to set the time delay which is required between consecutive SNMP requests due to low bandwidth in a network.

Parameters:
waitTime - The inter-packet delay time in milli seconds. Warning : This method should be used only when the underlying protocol is UDP.The timeout value to be set for the request should be taken care by the user.

getTimeToWait

public int getTimeToWait()
Gets the inter-packet delay time set on this SnmpSession object.

Returns:
The inter-packet delay time in milli seconds.

logErrorMessage

void logErrorMessage(java.lang.String error)
All the methods of this class (including sub classes), which needs to redirect an error message to the LogManger or to the standard console, can use this method. - Mahesh


logInfoMessage

void logInfoMessage(java.lang.String info)
All the methods of this class (including sub classes), which needs to redirect an info message to the LogManger or to the standard console, can use this method. - Mahesh


setErrorMessage

void setErrorMessage(java.lang.Exception e,
                     SnmpPDU pdu)

setTimeoutInMilliSec

public void setTimeoutInMilliSec(int time)
Sets the timeout value which should be given in milliseconds.

Parameters:
time - The timeout value to be set in milliseconds.

getTimeoutInMilliSec

public int getTimeoutInMilliSec()
Returns the timeout value in milliseconds.

Returns:
the timeout value in milliseconds.

getLocalAddresses

public java.lang.String[] getLocalAddresses()
Returns the value of localAddress bound on the session instance.

Returns:
The localAddress to which session is bound.

getCompleteResponse

java.lang.Object[] getCompleteResponse(int varbinds_per_request)
Gets the complete data from the agent by splitting the varbinds into multiple requests.This can set if request pdu is very big. The number of varbinds that should be sent per request can be set using setVarBindCount() method. Also, if there is any errored varbind, it will be removed and the response for the rest of the varbind will be obtained. The errored index with the corresponding error, the successful responses and the success code (SUCCESS, PARTIAL or NOSUCCESS) can be obtained from Object[] returned.

Parameters:
varbinds_per_request - The number of varbinds that need to be split and sent.
Returns:
Object[] of size 3 containing Vector, Hashtable and Integer. Note : Vector will contian the successful responses in the form oid : value, Hashtable will contain the error index and the corresponding error if any and Integer will be the status of response (SUCCESS/PARTIAL/NOSUCCESS).

assignLogger

void assignLogger(com.adventnet.afp.log.LoggerProperties loggerProps)

setReceiveBufferSize

public void setReceiveBufferSize(int size)
Sets the buffer size of this SnmpServer. This method SHOULD be called only when jdk1.2 and higher version is used.

Parameters:
size - the size of the buffer.

setBroadcastFeatureEnable

public void setBroadcastFeatureEnable(boolean bool)
The method can be used to enable/disable the broadcast feature available in the API. By default, the API has the broadcast feature enabled, and if the user wishes to disable this feature, he/she can do so by simply calling this method with "false" as value.

Parameters:
bool - the boolean value that is to enable/disable the broadcast feature in the API.
Since:
AdventNet SNMP API 4 SP2 ( Release 4.0.2 )

isBroadcastFeatureEnable

public boolean isBroadcastFeatureEnable()
The method returns whether the API has the broadcast feature enabled or not.

Returns:
returns a boolean, which tells whether the API currently has the broadcast feature enabled or not.
Since:
AdventNet SNMP API 4 SP2 ( Release 4.0.2 )
See Also:
setBroadcastFeatureEnable(boolean)

setErrorFlagEnable

public void setErrorFlagEnable(boolean errflag)

setV3MsgMaxSize

public void setV3MsgMaxSize(int size)
Sets the maximum size of Snmp3Message. This method is to set the maximum size of the Snmp3Message. If this is not set, then it will take the default size as 8192 which is already set as default in Snmp3Message.

Parameters:
size - the maximum size of Snmp3Message.
Since:
AdventNet SNMP API 4 SP4 ( Release 4.0.4 )

getV3MsgMaxSize

public int getV3MsgMaxSize()
Get the maximum size of the Snmp3Message. This method is to get the maximum size of the Snmp3Message. It will return the msgMaxSize set using setV3MsgMaxSize(). If not set using setV3MsgMaxSize, then it will fetch the default value set in Snmp3Message.

Returns:
The max message size of the Snmp3Message.
Since:
AdventNet SNMP API 4 SP4 ( Release 4.0.4 )