Hello,
I'm trying to write a simple master agent, based on the file example-demon.c. I'm using MVC++ 6 to compile the file in windows. I'm using it with an MIB file I created as a test. It only has an integer object. So in the code I called init_test(). I changed the agentx_subagent=0 to run it as master agent.
If I wanted to initialize the other MIB's the snmpd agent does, do I have to call some function or is it done by default? For example to access the system group or even other MIB's I have developed.
What exactly does this funtion do init_agent("example-demon"), it initializes what library?
Does init_snmp("example-demon") only worries for reading a file named example-demon.conf, so if I change the parameter to test, it would read a file named test.conf?
Lastly, I am having trouble building the example. I get this errors:
Compiling...
example-demon.c
C:\Documents and Settings\Nico.NICOLAS-CASA\Desktop\New Folder\win32\example-demon.c(48) : warning C4013: 'init_vacm_vars' undefined; assuming extern returning int
C:\Documents and Settings\Nico.NICOLAS-CASA\Desktop\New Folder\win32\example-demon.c(49) : warning C4013: 'init_usmUser' undefined; assuming extern returning int
Linking...
example-demon.obj : error LNK2001: unresolved external symbol _agent_check_and_process
example-demon.obj : error LNK2001: unresolved external symbol _init_master_agent
example-demon.obj : error LNK2001: unresolved external symbol _init_usmUser
example-demon.obj : error LNK2001: unresolved external symbol _init_vacm_vars
example-demon.obj : error LNK2001: unresolved external symbol _init_test
example-demon.obj : error LNK2001: unresolved external symbol _init_agent
They arise in the if statement:
if (!agentx_subagent) {
init_vacm_vars();
init_usmUser();
}
I don't know why I get a problem here. What does this part intend to do? How can I solve this?
Thanks a lot.
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.com/
------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click _______________________________________________ Net-snmp-coders mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
