Release Notes for Version 1.2
1. Changes from Version 1.1 to 1.2
-
Automatic loading of modules from imports clause has been added. In the 1.0.3 version the user has to load the modules one by one. In order for this to work, the module file name should be same as what is used in the imports clause. In case of applets the directory where the mib files are there is specified using an applet parameter MIBS_DIR.
-
The Callback method is called from a seperate thread. Now the application need not return from callback for the session receiver to receive subsequent responses. But for the callback method to be called again, the application should have returned from the callback.
-
The callback method is now called during timeout too with a null pdu so that the application knows about timeouts.
-
Changed MibNode.indexNames and MibTrap.variables to Vector from String.
-
A new method MibModule.getNereastNode(long[] oid) has been added to get the nearest node for a numbered oid.
-
A new method SnmpOID.getNereastNode(SnmpAPI api) has been added to get the nearest node from an SnmpOID object.
-
More features are added to SAS server so that users can extend SAS with custom Java classes, which may include native methods.
-
Added a way for the client to invoke custom Java functions on
the server.
-
Added more complete file system operation support, including
providing complete path information, and creating and deleting
directories and files on the server.
-
Changed the way SAS is invoked so that SAS server can be used even when applet is not loaded through the webserver. i.e even when an applet is loaded through classpath it will attempt to use the SAS server.
The following bugs have been fixed in Version 1.2.
-
Fixed:. The problem with MibModule.nodeList being static since it cannot take the oids with same labels in two different modules.
-
Fixed:. Problem parsing MAX, MIN value in INTEGER SYNTAX.
-
Fixed:. Problem not setting MAX value in INTEGER SYNTAX.
-
Fixed:. Parsing numbers in Description clause in OBJECT-TYPE.
-
Fixed:.Problem with MIB parsing of comma (or comment --) separated words without white space
-
Fixed:. Problem with MibNode.indexNames where the elements where added with a comma.
-
Fixed:. Problem not setting type in SnmpOID class.
-
Fixed:. Problem not setting name in MibTrap class.
-
The nodeList variable in MibModule class has been made static. There will be only one MIB tree for all the mib modules parsed. There will be only one instance of a unique node in the nodeList tree. In 1.0.3, because of different nodeList trees for different mib module, the same node could be duplicated in more than one tree and this was causing some problems when more than one mib module was parsed.
-
The allocation of 8k buffer to the data byte array in the SnmpSession
receiver to store the received pdu is done only once for all the pdus for a
particular session. A new allocation was done for each pdu being received
in the 1.0.3 version. This gives better performance in high intensity
applications.
-
The copy() method in the SnmpPDU class has been made public so that API
users can use that to copy pdus.
-
The decode() method in the SnmpPDU class has been made public so that API users
can directly call it to decode an existing byte stream and construct the pdu
object.
-
The byte[] data variable in SnmpPDU has been made public so that the API user can
directly assign a byte stream or directly read the byte stream message.
-
A new method get_encoded_length() has been added in the SnmpPDU class which
returns the length of the pdu that has been encoded. This is useful when the
user wants to know the number of varbinds a single pdu can be filled with.
-
Adding callbacks for a received pdu has been made available
for every session opened
as well as for every api thread. This gives the flexibility for defining
a different callback for each of the sessions opened.
-
The receiver thread in the SnmpSession has been modified to recover from
the IO exception thrown when receiving through the SASClient. In 1.0.3, the receiver simply stops the thread and aborts the session.
-
The indexNames variable in the MibModule class has been converted from String to Vector.
-
The access clause variable constants like RONLY in SnmpAPI class have been made public.
-
The modifiers of some of the variables and methods in the MibMacro and the MibModule class
has been changed from default to protected. But this will not affect the API user and
these variables and methods are anyway not used by the user directly.
The following bugs have been fixed in Version 1.1.
-
Fixed:. There is a Problem in parsing constructs of format "Integer(0 | 2)".
-
Fixed:. There is a Problem in parsing Integers more than 6 digits.
-
Fixed:. There is a Problem in parsing the DEFVAL clause of format { "XXXX" }
-
Fixed:. Problem when using the callback. The queued request pdu was
not dequeued when the user defined callback returns true after processing the
response pdu. This results in timeout messages even though a response was received.
-
Fixed:. While sending a pdu, a copy of the pdu was stored for retries. The was a
rare occurence of unneccessary retries even after receiving a response pdu.
-
Fixed:. There is a problem in reusing the same pdu object for different
request, if there is a request already pending.
-
Fixed:. There was a problem while resolving from named to numbered oid and vice versa
when more than one mib file is loaded. This has been resolved in the SnmpOID class.
-
Fixed:. There is a parsing error while parsing the mib file with JDK1.1
-
SNMP Applet Server (SAS) performance has been much improved,
and is now close to the same response times of local sockets.
-
API handling of request IDs has been improved to further
reduce the possibility of conflict with users re-using
and incrementing request IDs. A pseudo-random value
is being used, rather than simply incrementing the initial
random value. A genReqID() method has been added for this, and to
enable users to get unique IDs for themselves if needed.
-
Printing of SnmpIpAddress is improved to remove the problem
caused by using the java.net.InetAddress toString(), which
often prints the IP address twice.
-
New methods have been added to the SnmpCounter class to make it
easier to work with counter increments.
-
New methods have been added to get integer and long values
more easily from SnmpInt, SnmpGauge, SnmpCounter and SnmpTimeticks.
-
New methods have been added to help with printing and displaying
SNMP variables. A toByteString() method has been added to
SnmpString to print octet strings.
Two methods have been added to SnmpInt to print enumerated integers.
-
Printing of PDU variable bindings has been enhanced to
print byte strings for PhysAddress types (mib-2, or only if
required MIB is loaded), and enumerated integers.
-
A toShortString() method has been added to
SnmpOID to print label.instance values instead
of the complete OID.
Two methods have been added to SnmpInt to print enumerated integers.
-
The SNMP error constants have been made public in SnmpAPI and
better documented in the SnmpException documentation, to make
intrepreting SNMP exceptions easier.
-
MIB parsing performance has been improved, particularly for
MIBs loaded over the network.
The following bugs have been fixed in Version 1.0.3.
-
Fixed:
There is a problem with retransmissions using the SAS server.
If retransmissions are used, it can result in an error that crashes the SAS.
-
Fixed:The SNMP Applet Server (SAS) on NT often fails to properly send
PDUs back to the applets, resulting in decode errors at the applet.
This is due to a JDK bug with getLength() in java.net.DatagramPacket.
A workaround has been implemented in SAS.
-
Fixed:
Multiple responses due to excessive retransmissions
can result in the SnmpSession response queue
overflowing, and cause an out of memory error. With 1.0.3, the SnmpSession
response queue size is now limited to 100 responses and avoids the
out of memory error.
-
Fixed: Loading MIB modules can fail with DEBUG
turned on if the SnmpAPI thread is not yet been
able to properly initialize itself.
-
Fixed:
SnmpIpAddress variables give rise to a security exception
when used in browsers that load the applets off the net.
-
Fixed:
SnmpSession.close() does not properly close sockets
in browsers that load the applets off the net, and gives a security
exception. In Version 1.0.3, if there is a working SNMP agent
setup for the session, then this problem does not arise.
Aside from bug fixes, only one library enhancement has been made
in Version 1.0.2. These is a new method in the SASClient class
called appendFile() that allows for appending data to
files on the web server. Corresponding changes have been
made in the SAS.
-
Fixed:There is a large delay in the syncSend() method in
the SnmpSession class, which was introduced on account of threading problems.
-
Fixed:There is an infrequent problem with PDU decodes.
-
Fixed:The SnmpSession close() method hangs, on account of being
unable to properly close the socket.
-
Fixed:Retransmissions are not working properly, since the retransmits
parameter is not being updated.
-
Fixed:There is a MIB related bug with
loading mutiple MIBs with the same root node.
-
Fixed:The SAS cannot run for long with high usage,
due to memory problems on account of being unable to close sockets.
- Numerous bug fixes including (besides fixes from new JDK releases):
- Fixed: Decoding of PDUs using ASN_LONG_LEN (3 byte length encoding)
is incorrect. This results in missing variable bindings in PDUs so encoded.
- Fixed: When specifying an OID (either in the SnmpOID constructor,
or in applications that use it, e.g. snmpget), you cannot use just the
label to specify a node in the MIB tree.
- Fixed: Snmpwalk is very slow, on account of problems with the
way a PDU instance is re-used, resulting in long pauses between getnexts.
- Fixed: PDU printVarBinds method generates SnmpException in
applets when one of the variables is an IPADDRESS, due to security exception.
- Fixed: MIB parser throws exception upon encountering
braces around the enterprise field
in a TRAP-TYPE macro.
- Fixed: Bug in snmptrap that ignored the generic trap argument.
- Fixed: Bug with parsing syntaxes with large negative integers.
- Added GET, GETNEXT and SET methods (two flavors of each)
to the SnmpSession class
to simplify common operations of getting or setting a single variable
from/to the SNMP agent. This will further simplify writing applications.
-
A number of improvements made to the MIB browser applet, including
proper resizing, setting the SNMP port via applet parameter,
better graph resizing and rescaling, etc.
-
MIB browser applet classes converted to advent.mibBrowser package,
and SNMP applet server classes to advent.sas package.
-
Eliminated "Unload Mib" function from MIB browser.
-
MIB parser allows including or excluding DisplayString and
PhysAddr textual conventions in MIBs to accomodate standard and
CMU specific versions of MIBs.
-
Added getNextLeafNode to MibNode class to simplify getting the next
node OID or label for agents implementing getnext.
-
Improved handling of label.instance strings while specifying or
printing object identifiers.
- Based on the CMU
SNMP 1.2U, this set of JAVA classes supports SNMP version 1 only. It
is however different from the CMU release in some ways, and not only because
it's JAVA.
- Includes a completely new parser, that allows loading
of multiple MIB modules at any time for both applications and applets (via
URLs).
- It is completely in JAVA, i.e. no native methods.
- Supports loading of applet and SNMP class files from
local filesystem or over the network from a Web Server.
- Supports Java enabled browsers with socket restrictions
on network loaded applets through a SNMP Applet Server
(SAS, a supplied java application) on the Web server that acts as a passthrough
for Applet SNMP PDUs.
- Supports Java enabled browsers with file access restrictions
on network loaded applets, by enabling storage of files on the Web Server
through the SNMP Applet Server.
- Suport for multiple user threads using the same SNMP
session instance.
- Support for a client interface class that allows the
user to specify callbacks and authentication functions and where to print
debugging output.
- Supports synchronous and asynchronous requests.
- JAVA versions (applications) of some, but not all of
the CMU provided command line applications are provided with this package,
i.e. snmpget, snmpgetnext, snmpwalk, snmpset, snmptrap, snmptrapd are provided.
-
With JDK1.1.1 there is a large delay in Windows 95/NT while doing snmp operations in debug mode. In non debug mode, the problem does not occur. If the hostsnames are defined in the hosts file, the problem does not occur.
- For applets, decoding agent address in an SNMP Trap always fails
when using the SASClient, on account of a InetAddress.getByName()
security violation. This is because DNS is not allowed for applets.
- On Windows 95/NT, the SNMP Applet Server (SAS) fails to
work (i.e. read PDUs) on a specified port on server, e.g. trap port,
that is closed and re-opened without restarting
the SAS server.
- The snmptrap and snmpset Java applications
do not allow use of negative integers on account of a limitation in the
ParseOptions class.
- The MIB parser requires textual conventions to be defined before they
are used in a MIB file. Parent nodes must also be defined before
children in a MIB file.
- The SNMP Applet server, which is needed to allow applets to
send/receive SNMP PDUs thourgh the web server host, needs to be
separately started ahead of using the applet.
- The MIB parser accepts only one MIB module per file (or
URL).
- Handling of sequences needs to be improved. Sequences
in a MIB module are not stored as an easily accessible list. There is no
support for having one sequence be used in multiple tables, or even sequence
definitions preceding the containing table definitions. Fortunately, not
too many MIBs do that. The sequence is stored in the table node instance,
i.e. is available as a Vector of names (tableItems) in a MIB node that
corresponds to a table. It is not available in the corresponding table
entry instance.
- The SNMP Applet Server and client
interaction is very simple, and does not support error recovery for example.
- Exception reporting is incomplete, i.e. does not report
all errors properly.
- Too many methods and variables in the package are public.
We need to do more data hiding.
