Template:FAQ:Coding 01
From Net-SNMP Wiki
At the moment, there are three methods for integrating external C code within the agent.
- The code can be included within the agent itself, statically configured and linked in when the agent is compiled.
- Alternatively, with the 4.2 release of the agent, it's possible to dynamically load MIB modules once the agent is running.
- Finally, the agent can be configured to pass certain portions of the MIB tree off to one or more subagents. See the earlier question on AgentX, SMUX and proxied SNMP for more details.
All three mechanisms use the same module API. This is described (in
excruciating detail) in the file AGENT.txt, shipped with the standard
distribution. There is also an HTML version accessible via the project
web page. This task can be aided using the tool 'mib2c'
which generates
most of the necessary skeleton code from the description in the MIB file.
Note that the UCD suite does not include support for SMUX subagents.