Template:FAQ:Coding 01

From Net-SNMP Wiki
Jump to: navigation, search

There are three main methods for integrating external C code within the agent. The code can be compiled directly into the agent itself, it can be loaded dynamically while the agent is running, or it can be compiled into a separate application (a "subagent") which communicates with the main master agent. All three approaches have been touched on elsewhere within this FAQ.

As far as the module code is concerned, all three mechanisms use exactly the same module API. So a module developed for use directly within the agent, could also be included within a subagent, or loaded dynamically with no (or minimal) code changes needed.

Most of this section is concerned with more detailed aspects of developing such code - including the 'mib2c' tool, which can handle generating a basic code framework for implementing a given set of MIB objects.