|
Changes from release 3.1 to 3.2
New features added to this release
Database support for loading MIBs has been included in this release. Applications can now load MIB files directly from any industry standard RDBMS. The loading of MIB files from database also gives good performance improvement when compared to the loading of the normal MIB file, particularly if the MIB files to be loaded are high in number. Refer Loading MIBs from Database for further details.
Support for saving SNMPv3 security parameters information in a database has been added in this release. Applications can now store the security information in the database and use that for accessing the devices. See Saving SNMPv3 User Information for more information.![]()
The other new features and enhancements that are added in this release are as follows.
Low-Level API (snmp2 package)
Support for broadcast of SNMP messages is added to the SnmpSession class.![]()
A new method getLocalAddress()
is added in the TcpProtocolOptionsImpl class.
In SnmpSession class, partialSet()
method has been added.
While using applets in SnmpSession class, deQueuing problem that occured has been fixed.
The setSecLevelForTimeSync()
method has been added to the SnmpSession class for performing v3 time Sync with security level authPriv or authNoPriv for a authPriv user.![]()
The getSecLevelForTimeSync()
method has been added to the SnmpSession class for getting the security level that can be used for performing v3 time Sync for an authPriv user.![]()
A new class TransportUtil
has been added to the management package. This contains methods to write the contents to an HTML file. It also contains methods to set the transport home directory.
The following methods are added to the USMUtils
class in the com.adventnet.snmp.snmp2.usm package.![]()
public static void init_v3_parameters(String userName, int authProtocol, String authPassword, String privPassword, String targetHost, int port, SnmpSession session) throws SnmpException
public static void init_v3_params(String userName, int authProtocol, String authPassword, String privPassword, String engineName, SnmpSession session) throws SnmpException
A new method getEngineName()
has been added to SnmpEngineEntry. This method can be used to get the engineName in the case of Independent Transport Provider.![]()
MIB Support API (mibs package)
A new method isImportedNode()
is added to the MibNode class.
Support for TAddress TC is provided in LeafSyntax.
Support for MacAddress is provided in LeafSyntax.
The getImpliedNode()
method is added to the MibNode class.
Method toByteString()
has been added to the MibOperations class.
High-Level API (beans and ui package)
Support for broadcast of SNMP messages is provided in SnmpRequestServer.![]()
In SnmpTable, the getIndices()
method has been added.
In SnmpTable, the stopPollingTable()
method has been added.
In LineGraphBean, the isTimeAvg()
method has been added.
Method isEndOfTable() is added to the SnmpTableModel.
Methods setMenuFont(Font menuFont) and getMenuFont()
methods have been added to the MibBrowserBean to customize the menu font.
Added method setSecLevelForTimeSync()
for doing v3 time Sync with security level of authPriv or authNoPriv for an authPriv user in the SnmpServer class.![]()
Added method getSecLevelForTimeSync()
for getting the security level that is used for doing v3 time Sync for an authPriv user.![]()
Constructors added for SnmpTable class for independent protocol provider option and a new SnmpSession with local port.
Methods addMouseListener() and removeMouseListener() have been added to LineGraphBean
, BarGraphBean
, and GraphWrapper
classes.![]()
Methods getShowSeverityColumnColor() and setShowSeverityColumnColor()
have been added to TrapBrowser.
In the LineGraphBean
methods, getLinecolors() and setLinecolors() have been deprecated because it is not fully implemented and methods getLineColors() and setLineColors() have been added.
Methods getMibPath() and setMibPath()
have been added to SnmpTrapReceiver.
Constructors added for SnmpPoller
class for independent protocol provider option.
Methods getIgnoreSpecificControlCodes() and setIgnoreSpecificControlCodes()
have been added to SnmpTarget bean.
Read Community field of MibBrowser has been changed to text field.
The Mibs loaded previously is stored and updated in the File menu at startup of the MibBrowser application.
In the SnmpTablePanel bean supports SNMP table columns not implemented by the agent.
The SnmpTablePanel bean now displays the number of rows along with the page number.
The following method is added to the SnmpTarget class.
public void removeV3HandShakeListener(V3HandShakeResultListener l)![]()
The following method is added to the SnmpRequestServer class.![]()
public void removeV3HandShakeListener(V3HandShakeResultListener l)![]()
Method getTrapViewer()
has been added to the MibBrowser that returns the last TrapViewer instance of MibBrowser.
The following new methods have been added to the SnmpTarget class.![]()
void setParams(String host,String port,String community,String mib,String oid)
void setParams(String host,String port,String community,String mib,String[] oidlist)
The following new methods have been added to the SnmpTable class.
void setTableOIDWoStart(String tableOID)![]()
void setParams(String host,String mib,String tableOID)
void setCellValue(String tableOID,Object aValue, int rowIndex,int columnIndex)
Object getCellValue(String tableOID, int rowIndex, int columnIndex)
String[] getColumn(int columnIndex)
String[] getColumn(String columnName)![]()
The method void setParams(String host,String mibs,String tableOID)
has been added to the TableBean class.
The following methods have been added to the SnmpTable class.
getNotAccessibleIndex() - to get the values for the not-accessible indices
getNotAccessibleIndexColumns() - To get the names of the not-accessible index columns
The method getRow(String tableOID,String index) is added in the SnmpTable bean.
A method to setSettingsTitle(String title) to set the title of MibBrowser Settings Frame has been added in MibBrowser bean.
RMI API (rmi package)
The following new methods have been added and implemented in the SnmpTable
interface. The methods are also implemented in the respective implementing classes.
setCellValue(String tableOID, Object aValue, int rowIndex, int columnIndex)
getCellValue(String tableOID, int rowIndex, int columnIndex)
getRow(String tableOID, String index)
getColumn(int columnIndex)
setParams(String host,String mib, String tableOID)
setTableOIDWoStart(String tableOID)
getColumn(String columnName)
getIndices()
addRow(boolean Status,String[] oidlist, String [] s)
deleteRow(String oid)
The following new methods have been added and implemented to the SnmpTarget
interface. The methods are also implemented in the respective implementing classes.
setParams(String host, String port, String community, String mib, String oid)
setParams(String host, String port, String community, String mib,String[] oidlist)
The following new methods have been added in the SnmpRequestServer
interface. The methods are also implemented in the respective Implementing classes.
setParams(String host,String port,String community,String mib,String oid)
setParams(String host,String port,String community,String mib,String[] oidlist).
In SnmpTable class, the following methods are added.
String[][] getNotAccessibleIndex() - To get the values for the not-accessible indices.
String[] getNotAccessibleIndexColumns() - To get the names of the not-accessible index columns.
In the SnmpTarget and the SnmpRequestServer interfaces, the releaseResources() method is added to release the resources in the respective instances of the components.
CORBA API (corba package)
Two new methods stringMatrix getNotAccessibleIndex() and stringSeq getNotAccessibleIndexColumns() are added to the corba.idl file.
The methods public String[][] getNotAccessibleIndex() and public String[] getNotAccessibleIndexColumns() are implemented in the com.adventnet.snmp.corba.SnmpTableImpl class.
Bug Fixes Done
Low Level API (snmp2 package)
For the SNMP requests sent, proper response was received. But after some time, a series of "Request timed out" message was printed. This has been fixed.
MIB Support API (mibs package)
When a textual convention loop exists in a MIB, StackOverflowError was thrown. Now, this is throws a ParseException.
Bug with getSize(), getMax(), and getMin() methods in LeafSyntax is fixed. Now it returns appropriate value.
High-Level API (beans and ui package)
In SnmpTarget, NullPointerException has been fixed while generating trap.
Error: null has been fixed while invoking SnmpTablePanel in MibBrowser.
In the SnmpTablePanel bean, while adding a row to the table, the default values are added to the columns to which the values are not given when the row status is 5(createAndWait). This is not the expected behavior. This is fixed and now the request is made only for the OIDs with the values given.
Missing columns when column count is changed has been fixed.
JDK 1.3 issue for TableHeader has been fixed.
Changes from release 3.0 to 3.1
New Features added to this release
The WebNMS SNMP Release 3.1 supports Enterprise Java Beans (EJB) development of network management applications. The SNMP-enabled applications developed using WebNMS SNMP Release 3.1 can be deployed in application servers supporting EJB. This enables building and deploying scalable applications which leverage the load-balancing, fail-over, transactions, scalability of the multi-tier application server architecture that support a large number of users, and other high-end capabilities. Apart from this, the other major new features that are added in this release are as follows.
Low Level API (snmp2 package)
SNMP Transport Provider Framework
A new protocol-independent transport provider framework has been provided for SNMP communication in which any transport protocol can be plugged in. This essentially means that the user can use WebNMS SNMP over any transport protocol, such as UDP/IP, TCP/IP, Serial link, and so on. This mechanism can also be used by users requiring more security to run SNMP over SSL. UDP/IP is the default protocol implementation with a reference implementation for TCP/IP also provided.
The following interfaces are added for the SnmpTransport provider framework. Users wanting to use their own protocols for transport communication should implement these interfaces.
A new class SnmpTransportPacket
has been included which consists of the details of the parameters that are needed for the transport communication and the details of the message data that is to be sent or received.
The following are the new TCP reference implementation classes which have been added to the snmp2 package.
TcpProtocolOptionsImpl - implementation of the ProtocolOptions interface
TcpTransportImpl - implementation of the SnmpTransportProvider interface.
Others
Support for GNU compiler for Java or the GCJ compiler is included for the low-level API.
Support to re-authenticate a received SNMPv3 Trap is included.
A new class SnmpBits
has been included in the snmp2 package. This class can be used to create and set values for variables with syntax BITS.
MIB Support API (mibs package)
Support for loading MIBs from a JAR file in an application is added.
Option provided for the user to specify the handling of specific control code characters (new line, tab and carriage return) while printing them. Now, they can be printed as what they imply or their hex values can be printed. The following methods have been added to the MibOperations class.
LeafSyntax class has been modified to handle variables with syntax BITS.
SAS API (sas package)
Protocol-independent communication framework for SAS communication
A new protocol-independent communication framework is provided in which any transport protocol can be plugged in for SAS communication. The following interfaces are added. Users wishing to use any protocol provider must implement these interfaces.
TCP is provided as the default protocol implementation with implementation for HTTP.
Now applications can also use SAS to communicate with the server. They can use the com.adventnet.snmp.snmp2.SASAppletStub
API.
High level API (beans and ui package)
The SnmpTableModel bean has been included in AdventNetSnmp jar.
In SnmpTable, an option has been provided to view the selected columns of the table. The column names can be specified by using the setObjectIDList()
method provided in this bean. The same method is also made available in the SnmpTableModel and the TableBean.
SnmpTablePanel displays the hostname and querying can be done for different hosts by changing the host name.
In SnmpTablePanel, an option for deleting rows using the Delete key has been added.
SnmpTablePanel now shows the name of the table in the title bar.
The refreshTable()
method has been added to SnmpTable.
Polling option has been provided in SnmpTablePanel.
The editHeader()
method has been added to TableBean.
TrapParserCustomizer provides an option to create an empty trap parser file.
The UI of RowAddEditor, which is used to add rows to SnmpTablePanel, is enhanced to include ScrollBar.
The following methods have been added to the SnmpTablePanel.
startPoll()
- starts the polling
stopPoll()
- stops the polling
Confirm Message is added for Unload Mib option in MibBrowser.
In the MibBrowser bean, the getMibOperations()
method is added to get the MibOperations instance owned by MibBrowser.
Option provided for the user to specify the handling of specific control code characters (new line, tab, and carriage return) while printing them. Now, they can be printed as what they imply or their hex values can also be printed out. The following methods have been added to the SnmpServer class.
Two new methods setTargetHostNames()
and getTargetHostNames()
methods are added to the MibBrowser bean.
A new method setCallbackthread(boolean)
is added to the SnmpTrapReceiver bean. If ti is enabled, the EventListener method is called from the callback thread when the value is set to true. By default, it is disabled.
The Find Node option in MibBrowser supports Global view.
The SnmpTablePanel bean now displays non-accessible index columns.
The options set in the MibBrowser Settings dialog box have effect in the SnmpTable panel.
MibBrowser can display partial table view.
In the SnmpTable bean, an option of changing the number of column view has been added.
In case of large tables, tables are frequently updated.
LineGraphBean is provided with an option to view the polled values. Methods setPollDuration(int)
and getPollDuration()
are included so that the user can specify the polling duration.
LineGraphBean is provided with an option to store the polled values. The method setLogEnabled(boolean)
is included to specify whether to store the polled values. The method isLogEnabled()
is included to check whether the option to store the values is enabled.
In the LineGraphBean, methods setLogFileName(String filename)
and getLogFileName()
are included for the user to specify the file name for the log.
Mibs Search Path option is included for beans. Methods setMibPath(String searchpath)
and getMibPath()
are included in the SnmpServer so that before loading MIBs the user can specify the search path to find the MIBs.
The Community or Context name is displayed based on the SNMP version.
The ErrorMessages class is enhanced. The ErrorCodes are made public. User can see the class ErrorMessages for list of ErrorCodes. Methods getErrorCode()
and getErrorString()
in the SnmpTarget bean can be used to get the errorCodes and errorStrings respectively.
MibModule Customizer has the option to load multiple MIBs.
PropertySettingsBean is modified so that the user can specify the image and can change the button font.
TrapBrowser now has buttons to add and delete the traps and to view the trap details. Moreover, the user can right-click to get a popup menu to add and delete traps and to view trap details.
In TableBean, methods setHost(), getHost(), getPort(), and setPort() are deprecated and new methods setTargetHost(), getTargetHost(), getTargetPort(), and setTargetPort() are added for uniformity.
Methods setAttemptComplete(boolean),
getAttemptComplete(),
setVarBindCount(int),
, and getVarBindCount()
are added to the SnmpTarget bean. This is used for PDU splitting. Setting the method to true enables the request PDU to be split and sent to get the complete data . By default, it is disabled.
A new constructor is added to the RequestEvent class. This constructor takes in three parameters: Object o, String[] objectidlist, SnmpVar[] vars. This is used only for SET operations. This can be useful for performing SET operations without loading mibs.
In MibBrowser, a new feature to decode the SNMPv3 PDU is added.
In Snmp3Message class, a new constructor is added. This creates an Snmp3Message object initialized with the given byte array and security provider.
In SnmpServer, a new method getSecurityProvider() is added which returns the Security Provider.
New constructors are added for the SnmpTarget and SnmpTrapReceiver beans. These constructors should be used for protocols other than UDP/IP.
A new method readPollDataFromFile(String filename)
is added in the LineGraphBean which is useful for plotting the stored polled values. User can specify the file name containing the data.
In the MibTreeComponent, a new public method getStringObjectID()
has been added to get the object ID as String.
The method async_create_v3_tables()
has been added to SnmpServer to create SNMPv3 tables using asynchronous SNMP operations.
TrapParserBean supports parsing based on the trap varbinds and agent address apart from the Generic Trap, Specific Type, and Enterprise OID. TrapParser Editor UI has been changed.
TrapParser button is removed from MibBrowser and it is moved to TrapBrowser as ParserEditor.
TrapBrowser provides an option to load Trap Parser file.
In TrapParser Editor, the parser updations are written to the file only if user explicitly saves it.
The following methods are added to the SnmpTable class.
addRow(boolean entryStatus, String[ ] oids, String[ ] values) - adds a row
deleteRow(String oid) - deletes a row
getRow(int index) - retrieves a row
Bug Fixes Done
Low-Level API (snmp2 package)
The SNMPv3 message uses the value of engineID in the contextID field if the contextID parameter is not explicitly specified.
In case of agent side implementations, the agent responds to a request only when the secLevel is less than the secLevel configured for that user.
A null pointer exception thrown in case of wrong DNS configuration has been fixed in the SnmpSession class.
In ASN1Parser, decodeOID() method now decodes OIDs starting with values other than .1.3.
MIB Support API (mibs package.)
Set operation for enumerated Integers fails because of a bug in LeafSyntax class. This has been fixed now.
While loading multiple MIBs using a single command, some of the MIBs could not be loaded. This has been fixed now.
A NullPointerException is thrown when a node is imported from a MIB file that is not defined in the imported MIB. This has been fixed to throw a MibException.
Standard nodes are now automatically loaded without the user explicitly importing them. The standard nodes are: org, dod, internet, directory, mgmt, experimental, private, snmpv2, enterprises, mib-2, snmpDomains, snmpProxies, and snmpModules.
An ArrayIndexOutOfBounds exception is thrown when the index of the table was MAC address. This has been fixed.
While adding a new row to a table which is indexed by the IMPLIED keyword, the length of the index was also encoded. This has been fixed.
A NullPointerException is thrown while loading MIBs using the "file:" protocol. This is due to a bug in the loadMibModule(String) method of the MibOperations class and this has been fixed now.
A null value is returned while retrieving the name of the trap module. This is because of the bug in the getModuleName() of the MibTrap class. This has been fixed.
There was a bug while parsing the node object which has BIT STRING syntax. This has been fixed.
The MibNode class contains getObjects() method, which is used to get the OBJECT clause names in OBJECT-GROUP, returns null vector. This has been fixed.
SAS API (sas package)
SAServer throws a NullPointerException if creation of custom class instance fails. This has been fixed.
High-Level API (beans and ui package)/p>
A NullPointerException is thrown because the reference to USMUserTable was null in the method manage_v3_tables() of SnmpServer. This has been fixed.
ResultEvent.getErrorString now gives the SNMPv3 USMStats error, if any. Moreover, the ResultEvent.isSuccess() returns the appropriate value.
ResultEvent.getRequestID now returns the MessageID in case of SNMPv3. Earlier, it returned RequestID.
The GETBULK retrieval mode in SnmpTableBean in MibBrowser uses the default data retrieval mode, GETNEXT, even if the selection is for GETBULK. This bug has been fixed.
The delete row option in the SnmpTablePanel does not delete the selected row if the sorting is done not according to the indices. This bug has been fixed now.
In the current release, SnmpTrapReceiver bean does not create SnmpAPI and SnmpSession objects when it is constructed. They are created while setting the port using setPort() method because a session is created for a unique port. However, some properties are directly set on these objects and a NullPointerException is thrown if they are set before invoking the setPort() method. Moreover, the properties set to the SnmpTrapReceiver are set to the current session and they are not updated to the new session created for a different port. These issues have been fixed now.
In MibBrowser, when scalar objects are added to the Multi-Varbind list, index value is not appended. This bug is fixed now.
In the UI Table beans, while retrieving partial columns of the table, the option is not available for Enumerated types. This bug has been fixed.
In the SnmpTablePanel, while refreshing and polling the table, an out of memory error occurs. This bug has been fixed.
The message "Instantiated superpoller scheduler with 4 threads" which is printed while instantiating SnmpPoller has been removed.
There was a bug in SnmpPoller due to which the event notification is sent twice for each polling cycle. Now it gives event notification twice only for the first polling cycle and is prevented in subsequent polling.
The SnmpTable and ClippedTable returns table columns by the first occurrence of the Table Name rather than the MIB Module in which the table is defined. This has been fixed.
In the MibBrowser, the Load dialog box closes when the warning dialog box is closed. This has been fixed.
TrapParserBean parses the trap based on the enterprise OID, generic type, and specific type that is specific to SNMPv1 trap. Therefore, SNMPv2c traps are not parsed properly. This has been fixed.
The getErrorString() method in the SnmpTarget bean now gives the SNMPv3 USMStats errors, if any.
A device having virtual IP addresses responding with a different IP address than the one to which it has been sent, has been fixed.
While adding a row to the table, set request is sent to the index OIDs. This has been fixed.
The table handling API has been changed to allow the user to define the RowStatus according to their requirements. Earlier, the API allowed the RowStatus be defined only in the MIB as the last columnar value while defining a table.
The MibBrowser bean does not enable or disable the GetBulk button, when the SNMP version was set using the setSnmpVersion(int) method. This bug has been fixed.
If the TrapBrowser columns are changed, exception is thrown by displayEvent() method and addRow() method. This has been fixed.
LineGraphBean's x-axis label shows Time in Minutes. It is now changed to Time in Seconds.
LineGraphBean hangs when the user selects AverageOverInterval and click the restart button. This bug has been fixed.
Re-painting problem in LineGraphBean has been fixed.
While retrieving large tables, the table UIs do not display all the columns. This has been fixed.
The SnmpPoller bean polls twice for each poll interval. This bug has been fixed.
In the LoadMib dialog box of MibBrowser, the warning message "Enter the file name of MibModule" is displayed if the Load button is clicked without specifying the URL of the MIB file. If the error dialog box is closed, the MibLoad dialog box is also closed. This has been fixed.
Changes from release 2.2 to 3.0
The mibs package uses new MibParser which offers better performance. The key enhancement is the option of loading MIB files as compiled MIB files. The loading of compiled MIB files gives good performance improvement when compared to the loading of the normal MIB file.
This release of WebNMS SNMPv3 API provides an elegant way of implementing the security and access controls. It includes the new security and access frameworks through which users can implement their own message-level security and access control. Users can define and implement their own security model and the access control model. The WebNMS SNMPv3 security classes provide a default implementation and registration of the User-based Security Model (USM) and the View-based Access Control Model (VACM) based on these frameworks.
Support for HTTP access is provided in this release. Therefore, the applets now have the choice of selecting the protocol. By default, the applet uses SAS for communication. If the protocol is set to HTTP, then the communication is through the servlet loaded in the web server.
Patch Manager, a utility for managing the patches is provided in this release.
New Features added to this release
Low-Level API (snmp2 package)
This release includes a new security and access framework through which users can define and implement their own security model and the access control model.
Support for debug
level in low-level API.
Support for logging debug statements
to file in low-level API.
In the 2.2 release support for SnmpGroup
, counters were provided only for those defined in RFC1213-MIB. In the 3.0 release, the additional SnmpGroup counters defined in RFC1907 are supported.
The method isAuthenticationFailed()
has been added to Snmp3Message
class which returns the success or failure result of the Snmpv3 authentication module that checks the digest and timeliness.
Support is provided to make SnmpEngineBoots, SnmpAPI persistent. This is useful for an agent side implementation. The following methods are provided in the SnmpAPI.
public void setEngineBootsSerializeFileName(String name)![]()
public String GetEngineBootsSerializeFileName()![]()
public boolean serializeEngineBoots()![]()
public boolean deSerializeEngineBoots()![]()
The method getVersionString()
has been added to SnmpAPI to get the release version of the SNMP library.
The method getSnmpClients()
has been added to SnmpSession which returns the clients that have registered for callbacks.
Added support for sending/disable sending automatic response to the received inform request through two public API methods in SnmpSession namely, setAutoInformResponse(boolean flag)
and isSetAutoInformResponse()
.
MIBs Package
Performance improvement in the MibParser is achieved by providing the option of loading MIB files as the compiled MIB files.
The MibParser now supports loading of Multiple Mib Modules from the same MIB file.
Cyclic imports are supported by the MibParser.
Forward reference of MibNode is supported in the current MibParser.
Multiple roots
are supported with the current parser (cross iso ccitt mibs).
Support for dateAndTime TC is provided in mibs package.
High-Level API (beans and ui packages)
Inform request is fully supported.
External Index support for table is added.
Support for entry status is added.
GETBULK support for retrieving tables is provided.
Provision is made for displaying graph for multiple OIDs in LineGraphBean
.
Methods setMaxNumRows() and getMaxNumRows() are added to SnmpTarget
bean to set the maximum number of rows that can be processed. By default, it is set to 1000. This can be used when the number of rows of the table to be queried exceeds 1000.
Add, Delete and Graph buttons are provided with SnmpTablePanel bean.![]()
Graphing multiple column instances of SNMP Table is supported by the SnmpTablePanel bean.
TrapBrowser
bean can receive traps by listening on multiple ports.
TrapViewer
bean is added. It can be directly used to receive, parse, and show the parsed traps. It combines SnmpTrapReceiver, TrapParser, and TrapBrowser beans into a single bean.
MibTree shows index and external index for the tables using special images.
The dialog box for line graph in SnmpTablePanel of MibBrowser is made similar to the dialog box displayed for scalar values.
New method getErrorCode()
is provided in SnmpTarget
which returns the actual error messages returned by the low-level api, if any. This returns an integer. If the error is due to the high-level API, the return value of this is same as that of getErrorString(). Use the static method getErrorString(int index) of ErrorMessages to get the corresponding error message.
The method getHostAddress(String)
is added to SnmpServer
class to return the IP address for the given host name.
The method getNotificationDefinition() is added to the TrapEvent
class to get the details of the notification received.
Method setPollInterval()
and getPollInterval()
are added to the TableBean
class to set and get the poll interval for the table.
With the current release, the methods isTrapAuthEnable()
and setTrapAuthEnable()
are added to SnmpTrapReceiver for v3 trap authentication. If the TrapAuthEnable flag is set, the stack drops a v3 packet if authentication fails. Otherwise, a TrapEvent is generated.
The method releaseResources() has been added to SnmpServer and SnmpTrapReceiver. If SnmpTarget, SnmpRequestServer, SnmpTrapReceiver bean instances are not used by an application, this method can be used to release the resources, such as SnmpSession thread, SnmpAPI thread, etc.
MibBrowser Application
The Find option is added in the MibBrowser application to search a MIB node from the MibTree.
SNMPDecoder utility for decoding v1 and v2c PDU HEX dumps is provided in the Debug window of the MibBrowser.
Logging feature is provided, which can log MibBrowser result display, Debug messages and SNMPDecoder messages.
The Print option is provided to print the SNMP operations results, debug messages, and SNMP Decoder messages.
TrapParserCustomizer is added to the MibBrowser to edit the trap parser file.
Delete option is provided to delete the trap messages from the TrapBrowser.
TrapBrowser bean's status is shown with a LED panel and status panel.
Applet Support API
HTTP tunneling support for the applets is provided, which enables the applet client that is part of a network with firewall restrictions to talk to other hosts.
Jetty HTTP web-server is bundled along with the API instead of ACME web-server.
Bug fixes done
Low-Level API (snmp2 package)
For SNMPv3 manager applications, some of the report PDUs are not generated. This bug has been fixed.
For agent side implementations, if the value of requestID/messageID in the request message is zero, the agent generates the response message with a non-zero requestID/messageID value. Therefore, the manager drops the response message. This has been fixed.
SnmpSession gives a null pointer exception if an Snmp Entity returns a PDU with an ASN.1 serialization error. This has been fixed.
The Snmp callback client is not called in case of timeout. This has been fixed.
Bugs in the snmpv3trap and snmpv3trapd examples, which are available in the snmpapps and mibapps directories, have been fixed.
SnmpCounter64 data type is implemented using long data type to handle up to 2^63-1. Now, it can handle up to 2^64 by using java.math.BigInteger data type.
Bug in encoding and decoding SnmpCounter64 data has been fixed.
When setRemoteHost() method in the SnmpPDU class is invoked second time on an already constructed PDU, the remote host is still set to the first remote host and the PDU was sent again to the first host. This has been fixed.
The getIncrement() method in the SnmpCounter64 returns proper difference (including counter rollover).
Bug in re-using the PDU is fixed.
If the received SNMP packet resulted in an ASN.1 error or decryption error (in case of SNMPv3), subsequent packets received may not have the correct data. This bug has been fixed.
SNMP_ERR_NOSUCHNAME and NOSUCHOBJECTEXP are mapped to the same error string "There is no such variable name in this MIB". Now, NOSUCHOBJECTEXP is mapped to "There is no such object in this MIB."
While using privacy features, the decryption module was using PKCS#5 padding scheme. Now, it has been modified so that padding is ignored.
MIBs Package
Bug in createVariableBinding method of the MibOperations class when numbered OID is given as input. This has been fixed.
The mibs package was unable to handle the OID of type {parent oid1 oid2 } where a node with oid1 is defined under the parent node in some other module. This bug has been fixed.
Bug in selecting the next node (GETNEXT) for a particular module in case a node is available in more than one MIB modules. This bug has been fixed.
High-Level API (beans and ui package)
Methods setObjectID() and SetSnmpOID() of SnmpTarget bean do not update the OID list properly. If an array of OIDs are set using setObjectIDList() or setSnmpOIDList() method and an OID is set using setObjectID() or setSnmpOID() method, only the first element of the oidList is replaced instead of removing all other OIDs from the OID list. This bug has been fixed.
Using SnmpTarget bean for multiple polling sessions or prolonged polling leads to out of memory error. This bug has been fixed.
The traps received by the trap parser bean are delayed due to DNS lookup issues. This bug has been fixed.
In the SnmpTarget bean, if a v2c GetResponse PDU is received with a noSuchObject or noSuchInstance error values, SNMP error was being returned instead of returning the response PDU with partial results. This bug has been fixed.
In SnmpRequestServer bean, the request ID is added to a list to identify the response PDU. If an early response is received before adding the request to the request list, the response is dropped. When a response arrives, it checks for the request ID and waits for 100 milliseconds. If it is not available again, it checks for the request ID causing a delay when multiple SnmpRequestServer instances are used. This bug has been fixed.
UI problems in the Trap Details screen of the TrapBrowser bean have been fixed.
Bug in the handling the nonprintable characters in the trap message of TrapBrowser bean has been fixed.
TrapParserBean used to create a default parser file if the file was not available sometimes causing problem. Now, the default file is not created and the user has to set the file properly. Otherwise an error message is displayed and all traps are accepted.
The poll interval value is not set properly if the restart button was clicked in BarGraph and LineGraph bean of MibBrowser. It has been fixed.
Error messages are not displayed if the graphs are plotted for columns with non-numeric values. This has been fixed.
Exception is thrown while changing the table OID in the tableSettingsDemo example present in uiapplications directory. It has been fixed.
The Bar Chart gives a NumberFormatException for large values involving the exponent sign "E". This has been fixed now.
SnmpTrapReceiver does not release resources unless cleanup() method was invoked from an application. The cleanup() may also release shared resources. This has been fixed and made deprecated. An alternative method stop() is provided to stop receiving traps. An application should remove all the TrapListeners registered with an SnmpTrapListener to release the resources, which are no longer used, by garbage collector.
SnmpRequestServer resources are never garbage collected when no RequestListeners is registered and removed. This bug has been fixed.
In the TrapEvent.getAgentAddress() method, there is a delay involved when a DNS look-up is performed. This has been fixed.
Creating multiple instances of Java bean components (SnmpTarget, SnmpRequestServer, etc.) and using multi-threading had problem with reusing the low-level resources. It is fixed by synchronizing the creation of the low-level resources.
Invalid OID format error occurs when the value of the table is set from the combo box. This has been fixed.
Applet Support API (sas package)
If an applet registers for traps with SAServer on a port and if the SAServer receives any traps, after all the registered applets are closed, deadlock occurs and no more traps can be received by the SAServer on that port.
Changes from release 2.1 to 2.2
Features added in this release
sasappclient applet example is modified and the SAServerClient implementation of the sasappserver class is removed from sasapps examples directory . Instead, the TestSsnClient class can be used. It is available in sasapps\sasadvanced directory.
getMaxSasType() method has been added in SASClient and SASession classes for users to find the number of sas types available. It is useful for users to give users types greater than this value.
The SnmpTarget bean throws SnmpPropertyChangeEvent when there is any change in beans properties.
Multiple TrapBrowser windows can be opened for listening on different ports and multiple TrapBrowsers can listen on the same trap port.
The SNMP Group Counters in RFC1213 is supported. A new class SnmpGroup is provided along with some methods in SnmpAPI.
View-based Access Control Model (VACM) is supported in the API.
While using the low-level API, the userName on USMUserEntry reference is to be set in the Snmp3Message as follows.
((Snmp3Message)(pdu.getMsg())).getSecurity().setUserName(userName.getBytes()); or ((Snmp3Message)(pdu.getMsg())).getSecurity().setSecurityName(userName.getBytes());
This can no longer be used because public access to setUserName and setSecurityName is removed. Now, the user needs to set the userName on the SnmpPDU. Instead, the following code can be used.
pdu.setUserName(userName.getBytes())
Refer the examples/low_level_api_examples/snmpapps directory for more information.
Methods to serialize some of the SNMPv3-related tables are provided in SnmpAPI.
The constructor SnmpOpaque(SnmpVar) and the method SnmpVar decodeVariable() have been added to SnmpOpaque.
The constructor SnmpBitString(byte[], size) has been added.
For SnmpVar and all its derived classes, the method getVarObject() is added. This returns toValue() or toString() depending on the type of the SNMP variable. For SnmpString, SnmpBitString, SnmpCounter64, SnmpInt, SnmpNull, and SnmpUnsignedInt, the getVarObject() method returns toValue(). For SnmpIpAddress and SnmpOID, it returns toString().
The class SnmpProperties has been added to com.adventnet.snmp.snmp2. It uses a property file snmp.properties in the com.adventnet.snmp.snmp2 directory. Users can set the values of RESPONSE_QUEUE_SIZE and TIMEOUT_QUEUE_SIZE of SnmpSession by specifying them in the snmp.properties file. However, it is not advisable to change the values in this file.
Added a convenience routine byte[] encodeVariable(SnmpVar) to get the byte encoding for the variable.
The method loadMibModules() in MibOperations is modified to take a valid URL as input.
Changes are made to MibModule so that while loading the imported modules, the location is taken from the HTML file specified in MIBS_DIR parameter.
Agent-CapabilitiesModule is made public and a method getAgentCapabilities() is added to MibNode.
A feature for adding and deleting rows has been added to the SnmpTablePanel bean. Now, you can add a row by using the createAndGo(4) method. In this method, the user should specify all values required to activate a row in a single SET, along with an assignment of the status available to createAndGo(4).
In MibBrowser applet, Remote Browsing of MIB file is supported through SAServer.
Option for Serializing MibModule is provided now. You can serialize or load from serialized file by setting the option provided in MibOperations.
Global view option is provided in MibTree.
Traps and Textual Conventions defined in a module are listed in the Mib Tree.
The method getIsAugmented() is added to MibNode to check whether a node is augmented or not.
Feature for grouping PDUs of SnmpPoller that run under the same JVM has been added. Groups of PDUs is formed by a set of the SnmpPollers which all have the same host, port, retries, timeout, pollinterval, contextName, contextID, and principal. Instead of sending each PDU for each poller, the API stack sends a single PDU.
Support for adding and deleting rows is provided in SnmpTableBean.
Customizer has been added in all the bean components for editing Snmpv3 properties.
The PropertyCombiner bean has been added to set properties of target beans from single propertyEditor.
The method setPortWithExceptionMsg(int) has been added to SnmpTrapReceiver bean to throw Snmpexception in case of BindException.
The method copy() has been added to the SnmpPDU. This returns a copy of the SnmpPDU.
Bug Fixes done
While running applications with the SnmpAPI debug mode active, there is a possibility of delay due to DNS calls. This has been fixed.
SAServer should not create a socket on the system assigned port if the specified local port is less than zero. This bug has been fixed.
Bug with the modify routine in USMUserTable has been fixed.
Bug in storing IMPLIED index names has been fixed.
Bugs while setting foreGround color, backGround color, font, and size of LineGraphBean have been fixed.
Bug in the example sendv2trap in applications directory has been fixed.
Bugs in the node list while loading some of the MIB files have been fixed.
The method setRequestID(int) in RequestEvent does not work. It has been fixed now.
The SnmpTrapReceiver bean throws NullPointerException when MIB is loaded without setting the port. This has been fixed.
The method getSelectedMibNode() in MibTree returns null. It has been fixed.
Exception is thrown while parsing the access value of not-implemented in AGENT-CAPABILITIES. This has been fixed
If the Augmented node is present in the current module, the index is not set properly. It has been fixed.
If non SNMP messages are received, decode failure occurs and the null PDU is returned. It is added to the response list and NullPointerException is thrown while checking the reqid for the next request. This has been fixed.
WebNMS SNMPv3 API supported only the standard discovery process. Now, the implementation is modified so that if the msgAuthoritativeEngineID field is of zero-length, regardless of the other security parameters, the API returns a report PDU containing the authoritative snmpEngineID.
An encrypted timeSync message is sent for the user who had a securityLevel of authPriv. Now the timeSync Message is sent with a securityLevel of authNoPriv.
WebNMS SNMPv3 drops the PDU if the authentication fails. This has been fixed so that the registered callBack method receives the PDU.
Migration to 2.2
The API compared to the earlier releases. The API users hae tov make some changes to their applications so that the existing code compiles with AdventNetSnmpv3 2.2 API. This document guides the API user on the changes to be made to upgrade to the 2.2 release.
Changes in the snmp2 package
In the 2.1 release and earlier, the SnmpEngineTable class provided methods which could be used to retrieve the respective SnmpEngineEntry objects for a particular agent host and port as well as add entries to the table. These methods were static. Now they are made non-static. Similarly, the USMUserTable class in the 2.1 release and earlier had methods which could be used to retrieve the respective USMUserEntry objects. The methods in this class which were static are now non-static. The SnmpAPI instantiates these two classes in its constructor and has a reference to them. Methods are provided in the SnmpAPI to retrieve these classes. These methods are getSnmpEngine() to retrieve the SnmpEngineTable reference and getUSMTable() to retrieve the USMUserTable reference. There is no need for the API user to separately instantiate these classes. Therefore, the API user writes the code similar to the following.
|
SnmpAPI api = new SnmpAPI(); USMTable.addEntry(userEntry); |
The API user need not instantiate these classes. Instead, the instance of these classes provided in the SnmpAPI should be operated.
Moreover, the method init_v3_params in USMUtils class is a comprehensive initialization routine to perform discovery and time synchronization. When this method is used, the user need not create/maintain the Engine and USM tables. If this method is already been used (this method was is present in the 2.1 release and earlier), the existing applications works with the 2.2 release. Therefere, no changes are required. The snmpget.java in low_level_api_examples/snmpapps provides a good source of example to understand the changes.
In the release 2.1 and earlier, the get and set methods for SnmpEngineID, SnmpEngineBoots, SnmpEngineTime, and TimeWindow were static. These methods are now non-static and the API user needs to perform get and set on the SnmpAPI instance.
In the release 2.1 and earlier, the Snmp3Message had a method setMsgFlags. The msgFlags field of the PDU is calculated internally based on the securityLevel while encoding and therefore the setMsgFlags method is removed in release 2.2.
In the release 2.1 and earlier, the SnmpEngineTable had methods which were static. These are non-static now. Moreover, the constructor is no longer public and there is no need to instantiate this class. SnmpAPI instantiates this class in its constructor and provides methods to retrieve this SnmpEngineTable reference.
In the USMUserEntry, public access to setEngineID, setUserName, and setSecurityName is removed. In earlier versions of WebNMSWebNMS SNMPv3, while using the lowlevel API, the userName on USMUserEntry reference needs to be set in theSnmp3Message with the following code.
|
((Snmp3Message)(pdu.getMsg())).getSecurity().setUserName(userName.getBytes()); |
This can no longer be used as public and now the user needs to set the userName on the SnmpPDU. Therefore, the following code can be used instead.
pdu.setUserName(userName.getBytes())
Refer the examples present in the low_level_api_examples/snmpapps directory for more details. Also the methods get/set KeyStatus and get/set Status are removed from the API.
In the release 2.1 and earlier, the USMUserTable had methods which were static. These are non-static now. Moreover, the constructor is no longer public and there is no need to instantiate this class. The SnmpAPI instantiates this class in its constructor and provides methods to retrieve this USMUserTable reference.
In USMUtils, the method auth_password_to_key is renamed as password_to_key. The methods signPdu and checkDigest are no longer public.
Changes from release 2.0.1 to 2.1
Features added in this release
Support for swing1.0 has been removed.
SnmpTrapReceiver has been modified to work with the SNMP Applet Server.
A new method decodeDefval has been incorporated in the MibNode. It returns the SnmpVar corresponding to the defval for the node.
Option for unloading mibs is provided. The method unloadMibModule has been added to MibOperations.
The loadMibs method in all the beans has been modified to load only a single MIB at a time.
The addLabel() method in MibOperations to add label which need not be treated as reserved word. Therefore, in case if a particular reserved word in MIBs is used in a different manner, the conflict can be resolved using this method.
Support for OIDs of the form ModuleName.NodeName has been included.
APIs are provided to make USMUserTable and SnmpEngineTable persistent. The User and Engine Tables are serialized into the files UserEntry.ser and EngineEntry.ser.
A beta version of TrapBrowser and TrapParser bean are provided.
The SnmpTablePanel has the following features added.
Sorting of columns with header.
Multi-column selection.
Right-click on header to provide charting options.
Indices with ellipsis button [...] to show decoded indices that can be easily edited.
Next page selections preserved while scrolling across pages.
Provided ways of customizing columns.
Support for functional SET operations on table entries.
The jars have been renamed. AdvSnmpAllBeans.jar is now called AdventNetSnmp.jar, AdvSnmp.jar is called AdventNetSnmpLLAPI.jar, and AdvSnmpBeans.jar is now AdventNetSnmpHLAPI.jar.
More number of MIBs have been packaged in this release. They are present in the mibs directory.
Bug Fixes done
The packet size restriction has been removed in this release.
Memory issues have been fixed with the beans. The poller and requestserver resources do not get de-allocated because of the underlying thread-based resources. his has been resolved by inserting checks for listeners and explicit release of resources when all listeners are removed.
Call to MibOperations.createVariableBinding() with some of the mnemonics returned wrong VarBind value. This has been fixed.
The OID should translated from .iso as far as loaded MIBs allow. This has been is fixed.
Exception while parsing AGENT-CAPABILITIES macro has been fixed.
The SnmpIpAddress.toString() routine gives a StringIndexOutOfBoundsException in case of UnKnownHost. It has been fixed and null is returned.
ArrayIndexOutOfBoundsException is thrown while using MibOperations.getSnmpOID(). This has been fixed now.
Bug in MODULE-COMPLIANCE in storing the value of OBJECT clause. This has been fixed.
Changes from release 2.0 to 2.0.1
A separate AdvSnmpAllBeans.jar has been provided for working with swing1.1. This is located in AdventNetSNMP v3 /classes/swing1.1 directory.
The PropertySettings bean has been added. This is a GUI component, which allows easy entry and modification of PDU settings.
SnmpTrapReceiver has been modified to listen for traps only when the trap port property for the bean has been set.
SnmpSession now includes methods to enable trap authentication for SNMPv3. The default setting accepts all v3 traps even if an authentication failure occurs.
Bug in large table, which throws ArrayIndexOutOfBounds exception under specific conditions, has been fixed.
LineGraph can be viewed for selected table columns in SnmpTablePanel bean.
SnmpTarget has been updated to send notifications.
There is a change in SnmpTarget related to traps. If the target SNMP version is v2c or v3, the v1 trap parameters passed on invoking snmpSendTrap are converted to v2 notification parameters.
SnmpPDU has been modified to disallow sending a v1 trap PDU when the SNMP version for the PDU is v2c or v3. Sending a v2 version PDU with command type of v1 trap (TRP_REQ_MSG) is not a valid behavior and is no longer permitted.
|