Changes in preparation for version 0.7.5 release

Based on the feedback so far from users and the fixes needed in the released version of the library, following changes have so far been planned for the new release:

  • fixed: socket error 10054 now throws SnmpNetworkException in UdpTransport.Request method
  • added ICloneable to all AsnType child classes that didn’t have it
  • added IComparable interface implementation to OctetString class
  • implemented error handling in UdpTransport async methods. Now legitimate errors will result in request being aborted (same as blocking requests) with
    appropriate error code returned in the callback
  • added VbCollection.ContainsOid(Oid) method
  • added VbCollection index access to variable bindings using Oid class and string representation of oid (this(string oid))
  • removed unnecessary byte array allocation in MutableByte.Append(byte) method
  • removed unused MutableByte class allocation from Pdu.encode() method
  • added a check for a correct sequence type at the start of an SNMP packet in SnmpPacket.GetProtocolVersion() and SnmpPacket.decode() methods (SnmpDecodingException thrown)
  • added sequence type check when parsing global message data sequence in SnmpV3Packet.decode() method
  • removed unused versionHeaderLength variable in SnmpV3Packet.encode method
  • removed unused variable byteCount from Privacy3DES.Encrypt method
  • removed unused asnBuf variable from Counter64.decode method
  • removed unused oldOffset variable from Oid.decode method
  • removed unused oldOffset variable from Sequence.decode method
  • removed unused AgentParameter assignments from UdpTarget.AsyncResponse method
  • added sequence type check in SnmpV3Packet.GetUSM method
  • added exception XML documentation to SnmpV3Packet.GetUSM method
  • removed unused preVersionLength variable in SnmpV3Packet.encode method
  • removed unused asnBuf variable from Counter64.decode() method
  • implemented IDisposeable interface in UdpTransport class and changed UdpTransport.Close() into UdpTransport.Dispose() method
  • added IDisposeable interface to UdpTarget class. Implementation Dispose() method is inherited from the UdpTransport class
  • fixed Pdu.Reset() method request id value increment to handle value rollover to avoid integer overflow

More updates will be made based on any new feedback received.

To keep the library evolving to provide as complete as possible implementation of SNMP, send me feedback or comments you have through the SourceForge project page and I’ll do my best to implement it.