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

Roseville, CA

 

 


Hewlett-Packard Company version 2.61 11 July, 1997

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.

 

Authors 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 OKeefe 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 Bankers , 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 OKeefe, HP Network Systems Management Division

Frank Wang, Purdue University

Table Of Contents

1.    Whats New in Revision 2.61. 7

2.    Products Now Using SNMP++. 8

3.    Introduction.. 9

3.1.      What Is SNMP++?. 9

3.2.      Objectives of SNMP++. 10

3.2.1.      Ease of Use and SNMP++.. 10

3.2.2.      Programming Safety and SNMP++.. 10

3.2.3.      Portability and SNMP++.. 11

3.2.4.      Extensibility and SNMP++.. 11

4.    An Introductory Example. 12

4.1.      A Simple SNMP++ Example. 12

5.    SNMP++ Features.. 13

5.1.      Full Set of C++ based SNMP classes. 13

5.2.      Automatic SNMP Memory Management.. 13

5.3.      Ease Of  Use. 13

5.4.      Power and Flexibility.. 13

5.5.      Portable Objects. 13

5.6.      Automatic Time-out And Retries. 13

5.7.      Blocked Mode Requests. 14

5.8.      Non-Blocking Asynchronous Mode Requests. 14

5.9.     Notifications, Trap Reception and Sending.. 14

5.10.        Support For SNMP Version 1 and 2 Through a Bilingual API 14

5.11.        SNMP Get, Get Next, Get Bulk, Set, Inform and Trap Supported.. 14

5.12.        Redefinition Through Inheritance. 14

6.    SNMP++ for the Microsoft Windows Family of Operating Systems.. 15

6.1.      Utilization of WinSNMP Version  1.1. 15

6.2.      IP and IPX Support.. 15

6.3.     Notifications, Trap Receive and Send Support.. 15

6.4.     Compatibility with HP OpenView for Windows. 15

7.    SNMP++ for UNIX.. 16

7.1.      Identical Class Interface. 16

7.2.     Portable to Windows-to-UNIX Emulators. 16

7.3.      Compatibility with HP OpenView for UNIX.. 16

8.    SNMP Syntax Classes.. 17

9.    Object Id Class.. 18

9.1.      The Object Identifier Class. 18

9.2.      Overview of Oid Class Member Functions. 18

9.3.      Overview of Oid Class Member Functions Continued.. 19

9.4.      Some Oid Class Examples. 20

10.      OctetStr Class.. 22

10.1.        The OctetStr Class. 22

10.2.        Overview of OctetStr Class Member Functions. 22

10.3.        Overview of OctetStr Class Member Functions Continued.. 23

10.4.        Special features. 23

10.5.        Some OctetStr Class Examples. 24

11.      TimeTicks Class.. 25

11.1.        The TimeTicks Class. 25

11.2.        Overview of TimeTicks Class Member Functions. 25

11.3.        Special Features. 25

11.4.       Some TimeTicks Class Examples. 26

12.      Counter32 Class.. 27

12.1.        The Counter32 Class. 27

12.2.        Overview of Counter32 Class Member Functions. 27

12.3.        Some Counter32 Class Examples. 28

13.      Gauge32 Class.. 29

13.1.        The Gauge32 Class. 29

13.2.        Overview of Gauge32 Class Member Functions. 29

13.3.        Some Gauge32 Examples. 30

14.      Counter64 Class.. 31

14.1.        The Counter64 Class. 31

14.2.        Overview of Counter64 Class Member Functions. 31

14.3.        Overview of Counter64Class Member Functions Continued.. 32

14.4.        Some Counter64 Class Examples. 33

15.      Address Class.. 34

15.1.       What is the Network Address Class?. 34

15.2.        Why use the Network Address Class?. 34

15.3.        Address Classes. 34

15.4.        Address Classes and Interfaces. 35

15.5.        IpAddress Class Special Features. 35

15.6.        GenAddress. 36

15.7.        Address Class Validation..