SNMP++
C++ Based
Application Programmers Interface for the Simple Network Management Protocol |
This document describes SNMP++, an open specification for object oriented network management development using SNMP and C++. This document describes the various portable classes which make up the API and goes through a number of examples.
Visit
the SNMP++Web site for source code, real working examples and other related
documents @
http://rosegarden.external.hp.com/snmp++
Peter
Erik Mellquist
Hewlett-Packard
Company
Workgroup
Networks Division
Network
Management Section
Hewlett-Packard Company version
2.61
Copyright
© 1994-1996 Hewlett Packard Company
All Rights Reserved
Hewlett Packard
Peter Erik Mellquist
This document may be distributed in any form, electronic or otherwise, provided that it is distributed in its entirety and that the copyright and this notice are included.
ATTENTION: USE OF THIS SOFTWARE IS SUBJECT TO THE FOLLOWING TERMS.
Permission to use, copy, modify, distribute and/or sell this software and/or its documentation is hereby granted without fee. User agrees to display the above copyright notice and this license notice in all copies of the software and any documentation of the software. User agrees to assume all liability for the use of the software; Hewlett-Packard makes no representations about the suitability of this software for any purpose. It is provided "AS-IS without warranty of any kind,either express or implied. User hereby grants a royalty-free license to any and all derivatives based upon this software code base.
Author’s Contact Information:
Comments, suggestions and inquiries regarding SNMP++ may be submitted via electronic mail to peter_mellquist@hp.com.
Acknowledgments:
I would especially like thank five people for their generous assistance. For revision 2.6 and all of its changes, credit is given to Brian O’Keefe of HP Network Management Systems Division, for his many suggestions and SNMP version 2 knowledge. The SNMP++ project would not have been possible if not for Kim Banker’s , HP Roseville Networks Division, continual support and effort. Bob Natale of American Computers and Electronics Corp., provided valuable access the WinSNMP working group where many comments and suggestions have originated. Lastly Jeff Meyer and Tom Murray, of HP Network Computing Division, provided significant contributions to the classes and the UNIX implementation of the code base.
Where this document and code can be found:
This document is freely available in both Microsoft Word for Windows and Postscript formats on the following WWW server.
http://rosegarden.external.hp.com/snmp++
Technical Contributors:
Kim Banker , HP Roseville Networks Division
Gary Berard , HP Roseville Networks Division
Chuck Black ,HP Roseville Networks Division
Bruce Falzarano ,HP Roseville Networks Division
Greg Fichtenholtz , HP OpenView Operations
Harry Kellog, HP Roseville Networks Division
Moises Medina , HP Roseville Networks Division
Jeff Meyer, HP Network Computing Division
Tom Milner, HP Roseville Networks Division
Tom Murray, HP Network Computing Division
Mark Pearson, HP Roseville Networks Division
Bob Natale, American Computers and Electronics Corporation
Brian O’Keefe, HP Network Systems Management Division
Frank
Wang,
Table Of Contents
1. What’s New in Revision 2.61
3.2.2. Programming Safety and SNMP++
3.2.4. Extensibility and SNMP++
5.1. Full Set of C++ based SNMP
classes
5.2. Automatic SNMP Memory
Management
5.6. Automatic Time-out And Retries
5.8. Non-Blocking Asynchronous Mode
Requests
5.9. Notifications,
Trap Reception and Sending
5.10. Support For SNMP
Version 1 and 2 Through a Bilingual API
5.11. SNMP Get, Get Next,
Get Bulk, Set, Inform and Trap Supported
5.12. Redefinition
Through Inheritance
6. SNMP++ for the
Microsoft Windows Family of Operating Systems
6.1. Utilization of WinSNMP
Version 1.1.
6.3. Notifications,
Trap Receive and Send Support
6.4. Compatibility
with HP OpenView for Windows
7.1. Identical
Class Interface
7.2. Portable
to Windows-to-UNIX Emulators
7.3. Compatibility with HP OpenView
for UNIX
9.1. The Object Identifier Class
9.2. Overview of Oid Class Member
Functions
9.3. Overview of Oid Class Member
Functions Continued
10.2. Overview of
OctetStr Class Member Functions
10.3. Overview of
OctetStr Class Member Functions Continued
10.5. Some OctetStr Class
Examples
11.2. Overview of
TimeTicks Class Member Functions
11.4. Some TimeTicks Class Examples
12.2. Overview of Counter32
Class Member Functions
12.3. Some Counter32
Class Examples
13.2. Overview of Gauge32
Class Member Functions
14.2. Overview of
Counter64 Class Member Functions
14.3. Overview of
Counter64Class Member Functions Continued
14.4. Some Counter64
Class Examples
15.1. What is the Network Address Class?
15.2. Why use the Network
Address Class?
15.4. Address Classes and
Interfaces
15.5. IpAddress Class
Special Features
15.7. Address Class
Validation
15.8. UdpAddresses and
IpxSockAddresses
15.8.1. Using UdpAddresses for
Making Requests
15.8.2. Using IpxSockAddresses
for Making Requests
15.8.3. Using UdpAddress and
IpxSockAddress for Notification Reception
16. The
Variable Binding Class
16.1. Variable Binding
Class Member Functions Overview
16.2. Vb Class Public
Member Functions
16.2.1. Vb Class Constructors
& Destructors
16.2.2. Vb Class Get Oid / Set
Oid Member Functions
16.2.3. Vb Class Get Value /
Set Value Member Functions
16.2.4. Set the value to a
GenAdress object.
16.2.5. Set the value to a
UdpAdress object.
16.2.6. Set the value to a
IpxSockAdress object.
16.2.7. Set the value portion
of a Vb to an Octet object.
16.2.8. Vb Class Get Value
Member Functions
16.2.9. Vb Object Get Syntax
Member Function
16.2.10. Vb Object
Validation Check
16.2.11. Vb Object
Assignment to Other Vb Objects
17.1. Pdu Class Member
Functions Overview
17.2. Pdu Class
Constructors and Destructors
17.3. Pdu Access Member Functions
17.4. Pdu Class Overloaded Operators
17.5. Pdu Class Member
Functions for Traps and Informs
19.5. CTarget Class (
Community Based Targets)
20.1. Snmp Class Member Functions
Overview
20.3. Snmp Class Public
Member Functions
20.3.1. Snmp Class
Constructors and Destructors
20.3.2. Snmp Class Constructor
20.3.4. Snmp Class Request
Member Functions
20.3.5. Snmp Class Blocked Get
Member Function
20.3.6. Snmp Class Blocked Get
Next Member Function
20.3.7. Snmp Class Blocked Set
Member Function
20.3.8. Snmp Class Blocked Get
Bulk Member Function
20.3.9. SNMP Class Blocked
Inform Member Function
20.4. Snmp Class
Asynchronous Member Functions
20.4.1. SNMP++ Asynchronous
Callback Function Type Definition
20.4.2. Canceling an
Asynchronous Request
20.4.3. Snmp Class
Asynchronous Get Member Function
20.4.4. Snmp Class
Asynchronous Set Member Function
20.4.5. Snmp Class
Asynchronous Get Next Member
Function
20.4.6. Snmp Class
Asynchronous Get Bulk Member
Function
20.4.7. Snmp Class
Asynchronous Inform Member Function
20.5. SNMP++ Notification
Methods
20.5.2. Receiving
Notifications
20.5.3. Filtering Using
OidCollection, TargetCollection and AddressCollections.
20.6. SNMP+ Class Error
Return Codes
20.6.1. Snmp Class Error
Message Member Function
21.1.1. Microsoft Windows
Event System Operation
21.1.2. Open Systems
Foundation (OSF) X11 Motif Operation
21.1.3. Non GUI Based
Application Operation
24.1. Getting a Single
MIB Variable Example
24.2. Getting Multiple
MIB Variables Example
24.3. Setting a Single
MIB Variable Example
24.4. Setting Multiple
MIB Variables Example
24.5. Walking a MIB using
Get-Next Example