http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / userapps / opensource / net-snmp / agent / mibgroup / mibII / snmp_mib.c
index 1390ebe..9284c90 100755 (executable)
@@ -111,6 +111,21 @@ snmp_enableauthentraps_store(int a, int b, void *c, void *d)
 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 
      */