Various Simple Network Management Protocol (SNMP) Application Programmers Interfaces (APIs) exist which allow for the creation of network management applications. The majority of these APIs provide a large library of functions which require the programmer to be familiar with the inner workings of SNMP and SNMP resource management. Most of these APIs are platform specific, resulting in SNMP code specific to an operating system or network operating system platform and thus not portable. Application development using C++ has entered the main stream and with it a rich set of reusable class libraries are now readily available. What is missing is a standard set of C++ classes for network management. An object oriented approach to SNMP network programming provides many benefits including ease of use, safety, portability and extensibility. SNMP++ offers power and flexibility which would otherwise be difficult to implement and manage.
SNMP++ is a set of C++ classes which
provide SNMP services to a network management application developer. SNMP++ is not an additional layer or
wrapper over existing SNMP engines. SNMP++ utilizes existing SNMP libraries
in a few minimized areas and in doing so is efficient and portable. SNMP++ is not meant to replace other
existing SNMP APIs such as WinSNMP, rather it offers
power and flexibility which would otherwise be difficult to manage and
implement. SNMP++ brings the Object Advantage to network
An Object Oriented (OO) approach to SNMP programming should be easy to use. After all, this is supposed to be a simple network management protocol. SNMP++ puts the simple back into SNMP! The application programmer does not need be concerned with low level SNMP mechanisms. An OO approach to SNMP encapsulates and hides the internal mechanisms of SNMP. In regard to ease of use, SNMP++ addresses the following areas.
A user does not have to be an expert in SNMP to use SNMP++. Furthermore, a user does not have to be an expert in C++! For the most part C pointers do not exist in SNMP++. The result is an easy to use straight forward API.
A major goal of SNMP++ has been to develop an API which scales to SNMP version 2 with minimal impact on code. The SnmpTarget class makes this possible.
A user may want to bypass the OO approach and code directly to low level SNMP calls. SNMP++ is fast and efficient. However, there may be instances where the programmer requires coding directly to a lower level SNMP API.
A user does not have to be an expert in C++ to use SNMP++. Basic knowledge of SNMP is required, but as will be shown, a minimal understanding of C++ is needed.
Most SNMP APIs require the programmer to manage a variety of resources. Improper allocation or de-allocation of these resources can result in corrupted or lost memory. SNMP++ provides safety by managing these resources automatically. The user of SNMP++ realizes the benefits of automatic resource and session management. In regard to programming safety, SNMP++ addresses the following areas.
This includes SNMP structures, sessions, and transport layer management. SNMP classes are designed as Abstract Data Types ( ADTs) providing data hiding and the provision of public member functions to inspect or modify hidden instance variables.
A user of SNMP++ does not have to be concerned with providing reliability for an unreliable transport mechanism. A variety of communications errors can occur including: lost datagrams, duplicated datagrams, and reordered datagrams. SNMP++ addresses each of these possible error conditions and provides the user with transparent reliability.
A major goal of SNMP++ is to provide a
portable API across a variety of operating systems (
Extensibility is not a binary function but rather one of degree. SNMP++ not only can be extended, but can and has been extended easily. Extensions to SNMP++ include supporting new OS’s, NOS’s , network management platforms, protocols, supporting SNMP version 2, and adding new features. Through C++ class derivation, users of SNMP++ can inherit what they like and overload what they wish to redefine.
The application programmer may subclass the base SNMP++ classes to provide specialized behavior and attributes. This theme is central to object orientation. The base classes of SNMP++ are meant to be generic and do not contain any vendor specific data structures or behavior. New attributes can be easily added through C++ sub-classing and virtual member function redefinition.