Permalink
Browse files

Protocol API doc update

  • Loading branch information...
1 parent f5effef commit a8cabe2dd4748dcb2621d50451410da73861d59f Keith M Wesolowski committed Mar 11, 2012
Showing with 1,020 additions and 30 deletions.
  1. +11 −9 index.html
  2. +979 −0 protocol.html
  3. +30 −21 snmp.html
View
@@ -35,10 +35,11 @@
intended primarily to enable the construction of a simple, general-purpose agent
as an alternative to Net-SNMP.</p>
-<pre><code>var snmp = require('./lib/index.js');
-var Logger = require('bunyan');
+<pre><code>var os = require('os');
+var snmp = require('snmpjs');
+var logger = require('bunyan');
-var log = new Logger({
+var log = new logger({
name: 'snmpd',
level: 'info'
});
@@ -47,12 +48,13 @@
log: log
});
-agent.mib('.1.3.6.1.2.1.1.5', function (arg) {
+agent.request({ oid: '.1.3.6.1.2.1.1.5', handler: function (prq) {
var nodename = os.hostname();
- var val = { type: 'String', value: nodename };
+ var val = snmp.data.createData({ type: 'OctetString',
+ value: nodename });
- snmp.util.readOnlyScalar(arg, val);
-});
+ snmp.provider.readOnlyScalar(prq, val);
+} });
agent.bind('udp4', 161);
</code></pre>
@@ -89,7 +91,7 @@ <h1 id="getting-started">Getting Started</h1>
<tr><td><a href="agent.html">agent</a></td><td>Reference for implementing SNMP agents.</td></tr>
<tr><td><a href="mib.html">mib</a></td><td>API reference for the Management Information Base (MIB).</td></tr>
<tr><td><a href="protocol.html">protocol</a></td><td>API reference for low-level message encoding and decoding.</td></tr>
-<tr><td>[providers][]</td><td>API reference for MIB providers.</td></tr>
+<tr><td><a href="provider.html">provider</a></td><td>API reference for MIB providers.</td></tr>
<tr><td><a href="errors.html">errors</a></td><td>Listing of all snmpjs Error objects.</td></tr>
<tr><td><a href="examples.html">examples</a></td><td>Collection of sample/getting started code.</td></tr>
</tbody>
@@ -99,7 +101,7 @@ <h1 id="more-information">More Information</h1>
<table>
<tbody>
-<tr><td>License</td><td>TBD</td></tr>
+<tr><td>License</td><td><a href="http://www.opensource.org/licenses/mit-license.php">MIT</a></td></tr>
<tr><td>Code</td><td><a href="https://github.com/wesolows/node-snmpjs">wesolows/node-snmpjs</a></td></tr>
<tr><td>node.js version</td><td>0.6.x</td></tr>
</tbody>
Oops, something went wrong.

0 comments on commit a8cabe2

Please sign in to comment.