dart_snmp 3.0.1 copy "dart_snmp: ^3.0.1" to clipboard
dart_snmp: ^3.0.1 copied to clipboard

A dart library for communicating with simple network management protocol (snmp) enabled devices

example/main.dart

import 'dart:io';
import 'package:dart_snmp/dart_snmp.dart';

void main() async {
  // Starting a session
  var target = InternetAddress('192.168.1.1');
  var session = await Snmp.createSession(target);

  // Reading a parameter
  var oid = Oid.fromString('1.3.6.1.2.1.1.1.0'); // sysDesc
  var message = await session.get(oid);
  print(message.pdu.varbinds[0].value); // outputs system description

  // Writing a parameter
  var varbind = Varbind(
    oid,
    VarbindType.octetString,
    'New system description',
  ); // create payload
  await session.set(varbind); // send new system description to target
}
17
likes
160
points
273
downloads

Publisher

unverified uploader

Weekly Downloads

A dart library for communicating with simple network management protocol (snmp) enabled devices

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

asn1lib, logging

More

Packages that depend on dart_snmp