void
init_snmp_mib(void)
{
+ FILE *fs = NULL;
+ int i=0;
+ char name[32],value[32],temp[256];
+
+ fs = fopen("/var/snmpd.conf", "r"); //get Snmp Trap Status
+ if (fs == NULL ){
+ printf("can't open snmpd.conf\n");
+ } else {
+ for (i=1 ; i<=6 ; i++)
+ fgets(temp,256,fs);
+ fscanf(fs,"%s %s",name,value);
+ fclose(fs);
+ }
+ snmp_enableauthentraps=atoi(value);
+
/*
* register ourselves with the agent to handle our mib tree
*/