The convenience header file <net-snmp/agent/netsnmp-agent-includes.h>
can be used to load all the agent-related API declarations, as well as the
agent configuration settings (USING_XXX).

These config header files (mib_module_config.h & agent_module_config.h)
are read in *after* the API header files.  However one of the API header files
(net-snmp/agent/snmp_vars.h) relies on one of these config settings
(USING_AGENTX_SUBAGENT_MODULE).

[Originally reported by Mark Atwood]


Proposal:
The two config header files should be read in *before* the API header files:


--- include/net-snmp/agent/net-snmp-agent-includes.h    (revision 16513)
+++ include/net-snmp/agent/net-snmp-agent-includes.h    (working copy)
@@ -6,6 +6,9 @@
 #ifndef NET_SNMP_AGENT_INCLUDES_H
 #define NET_SNMP_AGENT_INCLUDES_H

+#include <net-snmp/agent/mib_module_config.h>
+#include <net-snmp/agent/agent_module_config.h>
+
 #include <net-snmp/agent/snmp_agent.h>
 #include <net-snmp/agent/snmp_vars.h>
 #include <net-snmp/agent/ds_agent.h>
@@ -16,7 +19,4 @@
 #include <net-snmp/agent/all_helpers.h>
 #include <net-snmp/agent/var_struct.h>

-#include <net-snmp/agent/mib_module_config.h>
-#include <net-snmp/agent/agent_module_config.h>
-
 #endif                          /* NET_SNMP_AGENT_INCLUDES_H */


Dave

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to