What's wrong about check_log_size(...) function?
I test a single module with check_log_size function.But it never is called.
If I change it's name to other,it is successfully called.
What's wrong with this?The check_log_size function seems not to be the default
function.
How should I do?
Thanks.
ooxxoo.c
##################################################################
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>
#include "ooxxoo.h"
static int ooxxoo = 2;
void
check_log_size(unsigned int clientreg, void *clientarg)
{
DEBUGMSGTL(("ooxxoo",
"check_log_size\n"));
}
void
init_ooxxoo(void)
{
static oid ooxxoo_oid[] =
{ 1, 3, 6, 1, 4, 1, 8072, 2, 4, 1, 1, 2, 0 };
netsnmp_register_int_instance("ooxxoo",
ooxxoo_oid,
OID_LENGTH(ooxxoo_oid),
&ooxxoo, NULL);
DEBUGMSGTL(("ooxxoo",
"Done initalizing ooxxoo module\n"));
snmp_alarm_register(3, SA_REPEAT, check_log_size, NULL);
}
void shutdown_ooxxoo(void)
{
DEBUGMSGTL(("ooxxoo",
"lalashutdown_ooxxoo\n"));
}
void deinit_ooxxoo(void)
{
shutdown_ooxxoo();
}
########################################################################
ooxxoo.h
########################################################################
#ifndef OOXXOO_H
#define OOXXOO_H
/*
* function declarations
*/
void init_ooxxoo(void);
void shutdown_ooxxoo(void);
void deinit_ooxxoo(void);
#endif /* OOXXOO_H */
########################################################################
杜絕網路駭客,保障帳號安全 - 馬上設定 Yahoo!奇摩安全圖章!-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders