Template:FAQ:Coding 01

From Net-SNMP Wiki
Revision as of 10:56, 23 October 2006 by Dts12 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.