forgot to attach the files ..... here they are ....
Need Help <[EMAIL PROTECTED]> wrote: Sorry about flip flopping with this topic,
but it turns out this is still a problem for me. I forgot to remove the ".o"
previously created so that is why I did not see the warnings anymore when I
recompiled. When I remove the subagent ".o" file and recompile, the warnings
are seen everytime.
I created the "ocStbHostMib_subagent_Makefile" file which is based off of the
Makefile syntax generated by "mib2c.mfd.conf". I created the
"ocStbHostMib_subagent.c" file based off of the "example-demon.c" file used in
the "Writing a Subagent" tutorial.
My goal is to create a subagent (ie: ocStbHostMib_subagent) to process my MIB.
My directory structure is as follows:
OC-STB-HOST-MIB/ocStbHostMib_subagent.c
OC-STB-HOST-MIB/ocStbHostMib_subagent_Makefile
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.c
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.h
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_access.c
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_access.h
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_get.c
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_get.h
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_set.c
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_set.h
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_interface.c
OC-STB-HOST-MIB/ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_interface.h
When I tried compiling the above code, I get the following output which
includes multiple warnings:
make -f ocStbHostMib_subagent_Makefile
gcc -I. `net-snmp-config --base-cflags` -Wall -Wstrict-prototypes -c -o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_get.o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_get.c
gcc -I. `net-snmp-config --base-cflags` -Wall -Wstrict-prototypes -c -o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_set.o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_set.c
gcc -I. `net-snmp-config --base-cflags` -Wall -Wstrict-prototypes -c -o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_access.o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_access.c
gcc -I. `net-snmp-config --base-cflags` -Wall -Wstrict-prototypes -c -o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.c
gcc -I. `net-snmp-config --base-cflags` -Wall -Wstrict-prototypes -c -o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_interface.o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_interface.c
gcc -I. `net-snmp-config --base-cflags` -Wall -Wstrict-prototypes -c -o
ocStbHostMib_subagent.o ocStbHostMib_subagent.c
ocStbHostMib_subagent.c: In function `main':
ocStbHostMib_subagent.c:53: warning: implicit declaration of function
`init_ocStbHostAVInterfaceTable'
ocStbHostMib_subagent.c:59: warning: implicit declaration of function
`init_vacm_vars'
ocStbHostMib_subagent.c:60: warning: implicit declaration of function
`init_usmUser'
gcc -o ocStbHostMib_subagent
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_get.o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_set.o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_data_access.o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable.o
ocStbHostAVInterfaceTable/ocStbHostAVInterfaceTable_interface.o
ocStbHostMib_subagent.o `net-snmp-config --agent-libs`
I have attached the following files:
ocStbHostMib_subagent_Makefile
ocStbHostMib_subagent.c
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?
PS: I am "playing around" with this stuff and it does seem to build the ".o"
files for me, along with the subagent.o file as well, I just can not figured
out why the warnings are being produced.
---------------------------------
Choose the right car based on your needs. Check out Yahoo! Autos new Car
Finder tool.
---------------------------------
Pinpoint customers who are looking for what you sell.
ocStbHostMib_subagent.c
Description: 4286710225-ocStbHostMib_subagent.c
ocStbHostMib_subagent_Makefile
Description: 296672171-ocStbHostMib_subagent_Makefile
------------------------------------------------------------------------- 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
