Skip to content

LeSpocky/vigilant-enigma

Repository files navigation

Vigilant Enigma

standard-readme compliant reuse compliant

Net-SNMP example subagent

How to write an AgentX based extension to Net-SNMP in C with CMake as build system.

Background

It was hard to find any working examples which do not make extensive use of magic code generators, outdated wiki pages, complicated code not needed for a simple example, …

Install

There's no install. You have to compile the source by yourself. This mini project uses CMake for build. You can use all kinds of CMake GUIs, do what your preferred style is. A simple way to build on command line, starting in the source directory, would be:

mkdir -p build
cd build
cmake ..
make

Note: You can change the AgentX master socket to be connected to by changing the CMake variable VE_AGENTX_MASTER_SOCKET, there's no config file or command line argument for that. (Remember: this is just a simple example, that would not be focus of this project.)

Dependencies

You need Net-SNMP library headers. On Debian based systems you get those with the libsnmp-dev package.

Usage

There's nothing special about using this. Start the binary from your CMake build folder.

Contribute

PRs accepted.

License

This project is licensed under BSD Zero Clause License. The parts generated by mib2c and the NET-SNMP-TUTORIAL-MIB are subject to the Net-SNMP license.