snmp-d 0.1.0

net-snmp bindings for D


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

snmp.d

CI

D bindings for net-snmp. Supports SNMPv1/v2c/v3, MIB loading, and subagents.

Requirements

  • net-snmp ≥ 5.9 — sudo apt install libsnmp-dev / brew install net-snmp
  • D frontend ≥ 2.111 (LDC or DMD)

macOS: net-snmp is keg-only. Add to your environment:

export LDFLAGS="-L$(brew --prefix net-snmp)/lib"
export CPPFLAGS="-I$(brew --prefix net-snmp)/include"

Usage

Add in your dub.json|dub.sdl:

dub add snmp-d

Modules

ModuleProvides
snmp.sessionSNMPSessionget, getNext, getBulk
snmp.pduSNMPResponseforeach, length
snmp.varbindVarBind — cursor over response variables, value extractors
snmp.oidOID — parse, compare, format, prefix checks
snmp.v3SNMPV3Session — SNMPv3 USM auth/priv
snmp.mibMIB — load MIB files, resolve named OIDs
snmp.agentSNMPAgent — embedded agent / AgentX subagent
snmp.typesEnums: SNMPVersion, PDUType, SNMPError, ASNType
c.net_snmpRaw ImportC declarations

Examples

cd examples
dub build :snmp_get   # ./build/examples_snmp_get  [host] [community]
dub build :snmp_walk  # ./build/examples_snmp_walk [host] [community]

License

BSL-1.0

Authors:
  • Matheus Catarino França
Dependencies:
none
Versions:
0.1.0 2026-Mar-16
Show all 1 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 1 downloads this month

  • 2 downloads total

Score:
0.0
Short URL:
snmp-d.dub.pm