Difference between revisions of "Agent Architecture"

From Net-SNMP Wiki
Jump to: navigation, search
(beginning page about the architecture)
 
(Startup)
Line 10: Line 10:
 
## initializes the mib-module registration tree
 
## initializes the mib-module registration tree
 
## registers its own configuration file tokens and callbacks
 
## registers its own configuration file tokens and callbacks
## initializes the ''helpers''
+
## initializes the ''[[Agent Helpers]]''
 
# initializes all the compiled-in mib modules
 
# initializes all the compiled-in mib modules
 
# initializes the base libnetsnmp library
 
# initializes the base libnetsnmp library

Revision as of 22:14, 17 June 2011

The Net-SNMP agent is responsible for handling incoming requests (passed to it from the library's transport and processing layers). This page describes how the agent works internally.

Startup

Upon starting, the agent goes through the following steps (in SnmpDaemonMain()):

  1. reads command line options
  2. decides whether it's a master or subagent
  3. calls init_agent()
    1. initializes the mib-module registration tree
    2. registers its own configuration file tokens and callbacks
    3. initializes the Agent Helpers
  4. initializes all the compiled-in mib modules
  5. initializes the base libnetsnmp library
  6. opens all the required ports to listen on
  7. forks
  8. saves persistent data (it's likely at least something has changed already)
  9. sends a coldStart trap
  10. invokes receive() to perform the main packet handling

Request Processing

Shutting Down