3 <! by Michael R. MacFaden mrm@cisco.com
>
4 <title>ASNMP Overview
</title>
6 <h1>ASNMP Overview
</h1>
8 <p>The Another SNMP class library is an Object Oriented programming
9 toolkit for using IETF standard network management protocols in the
10 Internet. The SNMP protocol is perhaps the most ubiquitous management
11 protocol running on most very device or application deployed in the
14 <p>ASNMP is targeted to programmers that want to write command and
15 control (C&C) applications. C&C Applications communicate with
18 <li>network devices such as ATM switches, Internet routers,
19 LAN bridges and LAN printers
20 <li>Routing protocols such as OSPF
21 <li>database servers such as ORACLE or Informix.
23 <p>ASNMP Version
1 implements a blocking SNMP Version
1 with some
24 Version
2c additions (Counter32, Counter64 SMI values). See
25 SNMP Version
1 as defined in the IETF Request for Comments (RFC)
32 <p>Also see the RFC
1902 spec for new SMI datatypes such as Counter64.
34 <p>ASNMP is built using the CMU SNMP and HP SNMP++ as the base
35 classes then modified for use in the ACE framework. About
10% of the API
36 changed during code rework. See ASNMP/asnmp/ChangeLog for details.
38 <p>ASNMP can be used for either manager applications or agent applications.
39 The
<i>Snmp
</i> class contains the interface for manager applications. The
40 <i>sagent
</i> class contains the interface for agent applications. A
41 trivial agent that implements the mib II system group per rfc1213 is
42 in the agents/ directory.
44 <h2>Class Hierarchy
</h2>
47 UdpTarget - Defines a collection of attributes needed to define a
48 communications session with an SNMP agent
49 This includes network address, response timeout, etc.
51 Snmp - A logical session between NM app and agent. Provides the
52 commands get, get_next, trap. Manages transactions between app and
55 Pdu - A container object that represents an SNMP Protocol Data Unit.
56 A Pdu contains a command (get,getnext,trap) Varbind List list,
59 Vb - Aka Varbind or Variable Binding. A pdu can have zero,
60 one or more of these. A Vb consists of an Oid to identify
61 the variable and a value corresponding to one of the SMI values.
62 The oid/value binding is defined in a MIB file (RFC
1155)
63 Agents hava a MIB file that defines what each variable means.
64 Most agents implement MIB II as defined in RFC
1156.
66 <p>The Structure of Management Information (SMI) datatypes
67 and related types are:
69 <li>Address-
>IpAddress-
>UdpAddress as well as MAC, IPX, IPXSOCK, Netbios
82 <h2>Sample program
</h2>
83 <p>A sample Object to get obtain an Agent's Systems' Description
84 given an network address and a community string.
88 system_id(UdpAddress addr, OctetStr read_community_string)
93 Oid oid(
"1.3.6.1.2.1.1.1.0");
95 tgt.set_address(addr);
96 tgt.set_read_community(read_community_string);
99 if (snmp.get(pdu, tgt) ==
0) {
104 desc_ =
"<error - no value set>"
107 int get_description(OctetStr& description) {
116 <h1>Future Directions
</h1>
117 <p>Here are some areas for further work
119 <li>Add OO mib parser and mib code generator
120 <li>Collapse the CMU/HP code into one set of classes.
121 <li>Add full V2c support.
122 <li>Size/Speed improvements
127 <li><a href=
"http://www.ece.ucdavis.edu/ucd-snmp/">UCD SNMP
</a>
128 <li><a href=
"news://comp.protocols.snmp">comp.protocols.snmp
</a>
129 <li><a href=
"http://snmp.cs.utwente.nl">University of Twente
</a>
130 <li><a href=
"http://www.cis.ohio-state.edu/hypertext/faq/bngusenet/comp/protocols/snmp/top.html">SNMP FAQ
</a>
131 <li><a href=
"http://www.adventnet.com/">Java based SNMP tools from Ardent
</a>
132 <li><a href=
"http://misa.zurich.ibm.com/Webbin/">IBM SNMP/CMIP research
</a>