# SNMP support for Perl 5

Copyright (c) 1995-2009, Simon Leinen
All rights reserved

This program is free software; you can redistribute it under the "Artistic License 2.0" included in this distribution.

Author: Simon Leinen <simon.leinen@switch.ch>

This package contains Perl 5 modules `SNMP_Session.pm`, `BER.pm`, and `SNMP_util.pm` which, when used together, provide rudimentary access to remote SNMP (v1/v2) agents.

Download it from `http://code.google.com/p/snmp-session/downloads/`

The library is featured in the book Essential SNMP by Douglas R. Mauro and Kevin J. Schmidt, July 2001, O'Reilly & Associates, ISBN: 0-59600020-0. You can buy it on-line at .

## Features

This module differs from existing SNMP packages in that it is completely stand-alone, i.e. you don't need to have another SNMP package such as Net-SNMP. It is also written entirely in Perl, so you don't have to compile any C modules. It uses the Perl 5 `Socket.pm` module and should therefore be very portable, even to non-Unix systems.

Note: For the development of new scripts, I strongly recommend to use the higher-level programming interface provided by `SNMP_util.pm`. Its use is described in `README.SNMP_util`. The remainder of this page desribes the low-level API in `SNMP_Session.pm`, which you normally shouldn't use.

The SNMP operations currently supported are "get", "get-next", "get-bulk" and "set", as well as trap generation and reception.

For an excellent example of the type of application this is useful for, see Tobias Oetiker's ``mrtg'' (Multi Router Traffic Grapher) tool. Another application that uses this library is IOG (Input/Output Grapher).

## Recent Changes:

For a list of changes, see the `changes.html` file packaged with this system.

## Usage

See the EXAMPLES section in the POD documentation of `SNMP_Session.pm`.

## Future Plans

### SNMPv3 Support

The code could first be restructured to follow the modularization proposed in RFC 2271 (An Architecture for Describing SNMP Management Frameworks). The existing SNMPv1 and SNMPv2c support must somehow be retrofitted to this framework. Later, one could add support for SNMPv3 PDU formats and for user-based security.

### Higher-Level APIs

The current programming interface is very close to the level of SNMP operations and PDUs. For actual management applications, there are probably more convenient interfaces that could be defined.