I created "ocStbHostAVInterfaceTable_subagent.c" using the mib2c.mfd.conf.

When I tried compiling it, I got the following warning as well:

ocStbHostAVInterfaceTable_subagent.c:128: warning: implicit declaration of 
function `netsnmp_enable_subagent'

My "net-snmp/include/net-snmp/agent/net-snmp-agent-includes.h" file has been 
updated to move the two ".conf" #include statements to the top as follows:


   #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>
   #include <net-snmp/agent/agent_handler.h>
   #include <net-snmp/agent/agent_read_config.h>
   #include <net-snmp/agent/agent_trap.h>
   #include <net-snmp/agent/agent_handler.h>
   #include <net-snmp/agent/all_helpers.h>
   #include <net-snmp/agent/var_struct.h>

   #endif 

Any ideas why I am still getting this warning?



On 08 Jun 2007 11:58:11 -0700, Mark Atwood <[EMAIL PROTECTED]> wrote:
> Both <net-snmp/agent/snmp_vars.h> and <net-snmp/agent/agent_module_config.h>
> are included together by <net-snmp/agent/net-snmp-agent-includes.h>.  However,
> agent_module_config.h is included *after* snmp_vars.h, and so
> USING_AGENTX_SUBAGENT_MODULE isnt yet defined, and so
> netsnmp_enable_subagent doesnt get declared.
>
> Is this a bug?


Yes - it's a bug.
The two "config.h" header files should be read in first, before any
of the API header files.

Thanks for the report - we'll update the code accordingly.

Dave


 
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and 
always stay connected to friends.
-------------------------------------------------------------------------
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