SNMP++
is based around a set of C++ classes including the Object Identifier (Oid) class, Variable Binding (Vb)
class, Protocol Data Unit (Pdu) class, Snmp class and a variety of classes making work with
Abstract Syntax Notation
(ASN.1) Structure of Management Information (SMI) types easy and
object oriented.
The
classes manage various SNMP structures and resources automatically when objects
are instantiated and destroyed. This frees the application programmer from
having to worry about de-allocating structures and resources and thus provides
better protection from memory corruption and leaks. SNMP++ objects may be
instantiated statically or dynamically. Static object instantiation allows
destruction when the object goes out of scope. Dynamic allocation requires use
of C++ constructs new and delete. Internal to SNMP++, are various Structure of
Management Information (SMI) structures which are protected and hidden from the
public interface. All SMI
structures are managed internally, the programmer does not need to define or
manage SMI structures or values. For the most part, usage of ‘C’ pointers in
SNMP++ is non existent.
By
hiding and managing all SMI structures and values, the SNMP++ classes are easy
and safe to use. The programmer
cannot corrupt what is hidden and protected from scope.
SNMP++
provides power and flexibility which would otherwise be difficult to implement
and manage. Each SNMP++ object communicates with an agent through a session
model. That is,
an instance of a SNMP++ session class maintains connections to
specified agents. Each SNMP++ object provides reliability through automatic
retry and time-outs. An application may have multiple SNMP++ object instances,
each instance communicating to the same or different agent(s). This is a
powerful feature which allows a network management application to have
different sessions for each management component. Alternatively, a single Snmp session may be used for everything. For example, an
application may have one SNMP++ object to provide graphing statistics, another
SNMP++ object to monitor traps, and a third SNMP++ object to allow SNMP
browsing. SNMP++ automatically
handles multiple concurrent requests from different SNMP++ instances.
The
majority of SNMP++ is portable C++ code.
Only the Snmp class implementation is
different for each target operating system. If your program contains SNMP++ code, this code will port without any
changes!
SNMP++
supports automatic time-out and retries. This frees the programmer from having
to implement time-out or retry code.
Retransmission policy is defined in the SnmpTarget
class. This allows each managed target to have its own time-out / retry policy.
SNMP++
includes a blocked model. The
blocked mode for MS-Windows allows multiple blocked requests on separate SNMP
class instances.
SNMP++
also supports a non-blocking asynchronous mode for requests. Time-outs and
retries are supported in both blocked and asynchronous modes.
SNMP++ is designed to allow trap reception
and sending on multiple transports including IP and IPX. In addition, SNMP++
allows trap reception and sending using non-standard
trap IP ports and IPX socket numbers.
SNMP++
has been designed with support and usage for SNMP version one and two. All
operations within the API are designed to be bilingual. That is, operations are
not SNMP specific. Through utilization of the SnmpTarget
class, SNMP version specific operations are abstracted.
SNMP++ supports all
six SNMP operations. All six SNMP++
member functions utilize similar parameter lists and operate in a blocked or
non-blocked (asynchronous) manner.
SNMP++
is implemented using C++ and thus allows a programmer to overload or redefine
behavior which does not suite their needs. For example, if an application requires
special Oid object needs, a subclass of the Oid class may be created, inheriting all the attributes and
behavior the Oid base class while allowing new
behavior and attributes to be added to the derived class.