summaryrefslogtreecommitdiff
path: root/cleopatre/application/spidnetsnmp/agent
diff options
context:
space:
mode:
authorTom Yang2012-05-12 13:17:23 +0530
committerTom Yang2012-05-22 20:53:29 +0530
commit2bb707f6e27929fbd10b1341b6d209f3b775679c (patch)
treec38c6b7d71ef3d3611c85f1efc4d0bc943b7d88a /cleopatre/application/spidnetsnmp/agent
parent8a7d661ae2dcffc9a39834b0550ea9d9e7ee82d5 (diff)
cleo/app/snmp[eoc]: implement eocPropertyGroup of the NSCRTV-EPONEOC-PROPERTY-MIB, closes #3033
Diffstat (limited to 'cleopatre/application/spidnetsnmp/agent')
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib.h4
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent.h2
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects.h4
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects.h2
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects.h2
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.c993
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.h4
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects.h2
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects.h2
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.c424
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.h3
11 files changed, 1046 insertions, 396 deletions
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib.h
index 4565c7b6bf..9549f7a542 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib.h
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib.h
@@ -1,2 +1,2 @@
-//config_add_mib(MSTAR-EOC-PROPERTY-MIB)
-//config_require(mstar-property-mib/propertyIdent)
+config_add_mib(MSTAR-EOC-PROPERTY-MIB)
+config_require(mstar-property-mib/propertyIdent)
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent.h
index f8663f334b..b19239a70b 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent.h
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent.h
@@ -1 +1 @@
-//config_require(mstar-property-mib/propertyIdent/eocPropertyObjects)
+config_require(mstar-property-mib/propertyIdent/eocPropertyObjects)
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects.h
index 79dd5371b0..d0f4d6fcbe 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects.h
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects.h
@@ -1,2 +1,2 @@
-//config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects)
-//config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects)
+config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects)
+config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects)
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects.h
index 8fca4e5508..24295dbfd6 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects.h
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects.h
@@ -1 +1 @@
-//config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects)
+config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects)
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects.h
index 74e4c898c0..f8515b2cb5 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects.h
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects.h
@@ -1 +1 @@
-//config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects)
+config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects)
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.c
index 656d60eae0..cb41f280df 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.c
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.c
@@ -65,25 +65,36 @@ handle_eocCbatEnvTemperature(netsnmp_mib_handler *handler,
netsnmp_agent_request_info *reqinfo,
netsnmp_request_info *requests)
{
+ int ret;
+ int env_temp;
/* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
+ * "instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one. */
-
- switch(reqinfo->mode) {
-
- case MODE_GET:
- snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
- (u_char *) /* XXX: a pointer to the scalar's data */,
- /* XXX: the length of the data in bytes */);
- break;
-
-
- default:
- /* we should never get here, so this is a really bad error */
- snmp_log(LOG_ERR, "unknown mode (%d) in handle_eocCbatEnvTemperature\n", reqinfo->mode );
- return SNMP_ERR_GENERR;
+ * we don't need to loop over a list of requests; we'll only get one. */
+
+ switch (reqinfo->mode)
+ {
+
+ case MODE_GET:
+ ret = libspid_hardware_get_temperature (&env_temp);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_hardware_get_temperature error\n");
+ /* default temperature value set to 0 to permit walk requests */
+ env_temp = 0;
+ }
+ snmp_set_var_typed_value (requests->requestvb, ASN_INTEGER,
+ (u_char *) & env_temp, sizeof (env_temp));
+ break;
+
+
+ default:
+ /* we should never get here, so this is a really bad error */
+ snmp_log (LOG_ERR,
+ "unknown mode (%d) in handle_eocCbatEnvTemperature\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
@@ -95,74 +106,185 @@ handle_eocCbatEnvTempHighThreshold(netsnmp_mib_handler *handler,
netsnmp_request_info *requests)
{
int ret;
+ char buffer[LIBSPID_LINE_MAX_LEN];
+ int env_temp_highthreshold;
+ int env_temp_lowthreshold;
+ int *env_temp_highthreshold_save = NULL;
+ u_char *value;
+
/* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
+ * "instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one. */
-
- switch(reqinfo->mode) {
-
- case MODE_GET:
- snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
- (u_char *) /* XXX: a pointer to the scalar's data */,
- /* XXX: the length of the data in bytes */);
- break;
+ * we don't need to loop over a list of requests; we'll only get one. */
+
+ switch (reqinfo->mode)
+ {
+
+ case MODE_GET:
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_HIGHTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse env_temp_highthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &env_temp_highthreshold))
+ {
+ env_temp_highthreshold = 0;
+ }
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ env_temp_highthreshold = 0;
+ }
+
+ snmp_set_var_typed_value (requests->requestvb, ASN_INTEGER,
+ (u_char *) & env_temp_highthreshold,
+ sizeof (env_temp_highthreshold));
+ break;
/*
* SET REQUEST
*
* multiple states in the transaction. See:
- * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
+ * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/
+ * set-actions.jpg
*/
- case MODE_SET_RESERVE1:
- /* or you could use netsnmp_check_vb_type_and_size instead */
- ret = netsnmp_check_vb_type(requests->requestvb, ASN_INTEGER);
- if ( ret != SNMP_ERR_NOERROR ) {
- netsnmp_set_request_error(reqinfo, requests, ret );
+ case MODE_SET_RESERVE1:
+ /* or you could use netsnmp_check_vb_type_and_size instead */
+ ret = netsnmp_check_vb_type (requests->requestvb, ASN_INTEGER);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
+
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_LOWTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse env_temp_lowthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &env_temp_lowthreshold))
+ {
+ env_temp_lowthreshold = 0;
}
- break;
-
- case MODE_SET_RESERVE2:
- /* XXX malloc "undo" storage buffer */
- if (/* XXX if malloc, or whatever, failed: */) {
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_RESOURCEUNAVAILABLE);
- }
- break;
-
- case MODE_SET_FREE:
- /* XXX: free resources allocated in RESERVE1 and/or
- RESERVE2. Something failed somewhere, and the states
- below won't be called. */
- break;
-
- case MODE_SET_ACTION:
- /* XXX: perform the value change here */
- if (/* XXX: error? */) {
- netsnmp_set_request_error(reqinfo, requests, /* some error */);
- }
- break;
-
- case MODE_SET_COMMIT:
- /* XXX: delete temporary storage */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_COMMITFAILED);
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ env_temp_lowthreshold = 0;
+ }
+
+ if ((*requests->requestvb->val.integer < env_temp_lowthreshold)
+ || (*requests->requestvb->val.integer >
+ LIBSPID_EOC_ENVTEMP_THRESHOLD_MAX))
+ {
+ ret = SNMP_ERR_WRONGLENGTH;
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ snmp_log (LOG_ERR, "set high temp threshold too big"
+ " or smaller than low temp threshold\n");
+ }
+ break;
+
+ case MODE_SET_RESERVE2:
+ /* malloc "undo" storage buffer */
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_HIGHTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse env_temp_highthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &env_temp_highthreshold))
+ {
+ env_temp_highthreshold = 0;
}
- break;
-
- case MODE_SET_UNDO:
- /* XXX: UNDO and return to previous value for the object */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_UNDOFAILED);
- }
- break;
-
- default:
- /* we should never get here, so this is a really bad error */
- snmp_log(LOG_ERR, "unknown mode (%d) in handle_eocCbatEnvTempHighThreshold\n", reqinfo->mode );
- return SNMP_ERR_GENERR;
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ /* parse alarm detection settings from buffer */
+
+ memdup ((u_char **) & env_temp_highthreshold_save,
+ (u_char *) & env_temp_highthreshold,
+ sizeof (env_temp_highthreshold));
+ /* if malloc, or whatever, failed: */
+ if (NULL == env_temp_highthreshold_save)
+ {
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ else
+ {
+ netsnmp_request_add_list_data (requests,
+ netsnmp_create_data_list
+ ("temp_highthreshold",
+ env_temp_highthreshold_save,
+ free));
+ }
+ break;
+
+ case MODE_SET_FREE:
+ /* : free resources allocated in RESERVE1 and/or
+ * RESERVE2. Something failed somewhere, and the states
+ * below won't be called. */
+ free (env_temp_highthreshold_save);
+ break;
+
+ case MODE_SET_ACTION:
+ /* perform the value change here */
+
+ value = *(requests->requestvb->val.integer);
+
+ sprintf (buffer, "%d", value);
+
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_HIGHTHRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_COMMITFAILED);
+ }
+ break;
+
+ case MODE_SET_COMMIT:
+ /* delete temporary storage */
+ free (env_temp_highthreshold_save);
+ break;
+
+ case MODE_SET_UNDO:
+ /*: UNDO and return to previous value for the object */
+ value = *((u_long *) netsnmp_request_get_list_data (requests,
+ "temp_highthreshold"));
+ sprintf (buffer, "%d", value);
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_HIGHTHRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ /* try _really_really_ hard to never get to this point */
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_UNDOFAILED);
+ }
+ break;
+
+ default:
+ /* we should never get here, so this is a really bad error */
+ snmp_log (LOG_ERR,
+ "unknown mode (%d) in handle_eocCbatEnvTempHighThreshold\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
@@ -174,74 +296,184 @@ handle_eocCbatEnvTempLowThreshold(netsnmp_mib_handler *handler,
netsnmp_request_info *requests)
{
int ret;
+ char buffer[LIBSPID_LINE_MAX_LEN];
+ int env_temp_lowthreshold;
+ int env_temp_highthreshold;
+ int *env_temp_lowthreshold_save = NULL;
+ u_char *value;
/* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
+ * "instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one. */
-
- switch(reqinfo->mode) {
-
- case MODE_GET:
- snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
- (u_char *) /* XXX: a pointer to the scalar's data */,
- /* XXX: the length of the data in bytes */);
- break;
+ * we don't need to loop over a list of requests; we'll only get one. */
+
+ switch (reqinfo->mode)
+ {
+ case MODE_GET:
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_LOWTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse env_temp_lowthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &env_temp_lowthreshold))
+ {
+ env_temp_lowthreshold = 0;
+ }
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ env_temp_lowthreshold = 0;
+ }
+
+ snmp_set_var_typed_value (requests->requestvb, ASN_INTEGER,
+ (u_char *) & env_temp_lowthreshold,
+ sizeof (env_temp_lowthreshold));
+ break;
/*
* SET REQUEST
*
* multiple states in the transaction. See:
- * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
+ * http://www.net-snmp.org/tutorial-5/toolkit/
+ * mib_module/set-actions.jpg
*/
- case MODE_SET_RESERVE1:
- /* or you could use netsnmp_check_vb_type_and_size instead */
- ret = netsnmp_check_vb_type(requests->requestvb, ASN_INTEGER);
- if ( ret != SNMP_ERR_NOERROR ) {
- netsnmp_set_request_error(reqinfo, requests, ret );
- }
- break;
-
- case MODE_SET_RESERVE2:
- /* XXX malloc "undo" storage buffer */
- if (/* XXX if malloc, or whatever, failed: */) {
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_RESOURCEUNAVAILABLE);
- }
- break;
-
- case MODE_SET_FREE:
- /* XXX: free resources allocated in RESERVE1 and/or
- RESERVE2. Something failed somewhere, and the states
- below won't be called. */
- break;
-
- case MODE_SET_ACTION:
- /* XXX: perform the value change here */
- if (/* XXX: error? */) {
- netsnmp_set_request_error(reqinfo, requests, /* some error */);
+ case MODE_SET_RESERVE1:
+ /* or you could use netsnmp_check_vb_type_and_size instead */
+ ret = netsnmp_check_vb_type (requests->requestvb, ASN_INTEGER);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
+
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_HIGHTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse env_temp_highthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &env_temp_highthreshold))
+ {
+ env_temp_highthreshold = 0;
}
- break;
-
- case MODE_SET_COMMIT:
- /* XXX: delete temporary storage */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_COMMITFAILED);
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ env_temp_highthreshold = 0;
+ }
+
+ if ((*requests->requestvb->val.integer <
+ LIBSPID_EOC_ENVTEMP_THRESHOLD_MIN) ||
+ (*requests->requestvb->val.integer >
+ env_temp_highthreshold))
+ {
+ ret = SNMP_ERR_WRONGLENGTH;
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ snmp_log (LOG_ERR, "set low temp threshold too small"
+ " or bigger than high temp threshold\n");
+ }
+ break;
+
+ case MODE_SET_RESERVE2:
+ /* malloc "undo" storage buffer */
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_LOWTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse env_temp_lowthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &env_temp_lowthreshold))
+ {
+ env_temp_lowthreshold = 0;
}
- break;
-
- case MODE_SET_UNDO:
- /* XXX: UNDO and return to previous value for the object */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_UNDOFAILED);
- }
- break;
-
- default:
- /* we should never get here, so this is a really bad error */
- snmp_log(LOG_ERR, "unknown mode (%d) in handle_eocCbatEnvTempLowThreshold\n", reqinfo->mode );
- return SNMP_ERR_GENERR;
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ /* parse alarm detection settings from buffer */
+
+ memdup ((u_char **) & env_temp_lowthreshold_save,
+ (u_char *) & env_temp_lowthreshold,
+ sizeof (env_temp_lowthreshold));
+ /* if malloc, or whatever, failed: */
+ if (NULL == env_temp_lowthreshold_save)
+ {
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ else
+ {
+ netsnmp_request_add_list_data (requests,
+ netsnmp_create_data_list
+ ("temp_lowthreshold",
+ env_temp_lowthreshold_save,
+ free));
+ }
+ break;
+
+ case MODE_SET_FREE:
+ /* free resources allocated in RESERVE1 and/or
+ * RESERVE2. Something failed somewhere, and the states
+ * below won't be called. */
+ free (env_temp_lowthreshold_save);
+ break;
+
+ case MODE_SET_ACTION:
+ /* perform the value change here */
+ value = *(requests->requestvb->val.integer);
+
+ sprintf (buffer, "%d", value);
+
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_LOWTHRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_COMMITFAILED);
+ }
+ break;
+
+ case MODE_SET_COMMIT:
+ /*delete temporary storage */
+ free (env_temp_lowthreshold_save);
+ break;
+
+ case MODE_SET_UNDO:
+ /*: UNDO and return to previous value for the object */
+ value = *((u_long *) netsnmp_request_get_list_data (requests,
+ "temp_lowthreshold"));
+ sprintf (buffer, "%d", value);
+
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_TEMP_LOWTHRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ /* try _really_really_ hard to never get to this point */
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_UNDOFAILED);
+ }
+ break;
+
+ default:
+ /* we should never get here, so this is a really bad error */
+ snmp_log (LOG_ERR,
+ "unknown mode (%d) in handle_eocCbatEnvTempLowThreshold\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
@@ -253,24 +485,35 @@ handle_eocCbatCardCpuLoad(netsnmp_mib_handler *handler,
netsnmp_request_info *requests)
{
/* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
-
+ * "instance", as it's "magically" handled for us. */
+ int ret;
+ int cpu_load_percent = 0;
/* a instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one. */
-
- switch(reqinfo->mode) {
-
- case MODE_GET:
- snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
- (u_char *) /* XXX: a pointer to the scalar's data */,
- /* XXX: the length of the data in bytes */);
- break;
-
-
- default:
- /* we should never get here, so this is a really bad error */
- snmp_log(LOG_ERR, "unknown mode (%d) in handle_eocCbatCardCpuLoad\n", reqinfo->mode );
- return SNMP_ERR_GENERR;
+ * we don't need to loop over a list of requests; we'll only get one. */
+
+ switch (reqinfo->mode)
+ {
+
+ case MODE_GET:
+ ret = libspid_system_get_cpuload_percent (&cpu_load_percent);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_system_get_cpuload error\n");
+ /* default temperature value set to 0 to permit walk requests */
+ cpu_load_percent = 0;
+ }
+ snmp_set_var_typed_value (requests->requestvb, ASN_INTEGER,
+ (u_char *) & cpu_load_percent,
+ sizeof (cpu_load_percent));
+ break;
+
+
+ default:
+ /* we should never get here, so this is a really bad error */
+ snmp_log (LOG_ERR,
+ "unknown mode (%d) in handle_eocCbatCardCpuLoad\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
@@ -282,19 +525,42 @@ handle_eocCbatCardCpuLoadThreshold(netsnmp_mib_handler *handler,
netsnmp_request_info *requests)
{
int ret;
+ char buffer[LIBSPID_LINE_MAX_LEN];
+ int cpuload_threshold;
+ int *cpuload_threshold_save = NULL;
+ u_char *value;
/* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
+ * "instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one. */
-
- switch(reqinfo->mode) {
-
- case MODE_GET:
- snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
- (u_char *) /* XXX: a pointer to the scalar's data */,
- /* XXX: the length of the data in bytes */);
- break;
+ * we don't need to loop over a list of requests; we'll only get one. */
+
+ switch (reqinfo->mode)
+ {
+
+ case MODE_GET:
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_CPULOAD_THRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse cpuload_threshold from buffer */
+ if (1 != sscanf (buffer, "%d", &cpuload_threshold))
+ {
+ cpuload_threshold = 0;
+ }
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ cpuload_threshold = 0;
+ }
+
+ snmp_set_var_typed_value (requests->requestvb, ASN_INTEGER,
+ (u_char *) & cpuload_threshold,
+ sizeof (cpuload_threshold));
+ break;
/*
* SET REQUEST
@@ -302,54 +568,116 @@ handle_eocCbatCardCpuLoadThreshold(netsnmp_mib_handler *handler,
* multiple states in the transaction. See:
* http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
*/
- case MODE_SET_RESERVE1:
- /* or you could use netsnmp_check_vb_type_and_size instead */
- ret = netsnmp_check_vb_type(requests->requestvb, ASN_INTEGER);
- if ( ret != SNMP_ERR_NOERROR ) {
- netsnmp_set_request_error(reqinfo, requests, ret );
- }
- break;
-
- case MODE_SET_RESERVE2:
- /* XXX malloc "undo" storage buffer */
- if (/* XXX if malloc, or whatever, failed: */) {
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_RESOURCEUNAVAILABLE);
+ case MODE_SET_RESERVE1:
+ /* or you could use netsnmp_check_vb_type_and_size instead */
+ ret = netsnmp_check_vb_type (requests->requestvb, ASN_INTEGER);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
+ ret = netsnmp_check_vb_range (requests->requestvb,
+ LIBSPID_EOC_CPULOAD_THRESHOLD_MIN,
+ LIBSPID_EOC_CPULOAD_THRESHOLD_MAX);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
+ break;
+
+ case MODE_SET_RESERVE2:
+ /* malloc "undo" storage buffer */
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_CPULOAD_THRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse cpuload_threshold from buffer */
+ if (1 != sscanf (buffer, "%d", &cpuload_threshold))
+ {
+ cpuload_threshold = 0;
}
- break;
-
- case MODE_SET_FREE:
- /* XXX: free resources allocated in RESERVE1 and/or
- RESERVE2. Something failed somewhere, and the states
- below won't be called. */
- break;
-
- case MODE_SET_ACTION:
- /* XXX: perform the value change here */
- if (/* XXX: error? */) {
- netsnmp_set_request_error(reqinfo, requests, /* some error */);
- }
- break;
-
- case MODE_SET_COMMIT:
- /* XXX: delete temporary storage */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_COMMITFAILED);
- }
- break;
-
- case MODE_SET_UNDO:
- /* XXX: UNDO and return to previous value for the object */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_UNDOFAILED);
- }
- break;
-
- default:
- /* we should never get here, so this is a really bad error */
- snmp_log(LOG_ERR, "unknown mode (%d) in handle_eocCbatCardCpuLoadThreshold\n", reqinfo->mode );
- return SNMP_ERR_GENERR;
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ /* parse alarm detection settings from buffer */
+
+ memdup ((u_char **) & cpuload_threshold_save,
+ (u_char *) & cpuload_threshold, sizeof (cpuload_threshold));
+ /* if malloc, or whatever, failed: */
+ if (NULL == cpuload_threshold_save)
+ {
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ else
+ {
+ netsnmp_request_add_list_data (requests,
+ netsnmp_create_data_list
+ ("cpuload_threshold",
+ cpuload_threshold_save, free));
+ }
+ break;
+
+ case MODE_SET_FREE:
+ /*free resources allocated in RESERVE1 and/or
+ * RESERVE2. Something failed somewhere, and the states
+ * below won't be called. */
+ free (cpuload_threshold_save);
+ break;
+
+ case MODE_SET_ACTION:
+ /* perform the value change here */
+ value = *(requests->requestvb->val.integer);
+
+ sprintf (buffer, "%d", value);
+
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_CPULOAD_THRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_COMMITFAILED);
+ }
+ break;
+
+ case MODE_SET_COMMIT:
+ /*delete temporary storage */
+ free (cpuload_threshold_save);
+ break;
+
+ case MODE_SET_UNDO:
+ /*: UNDO and return to previous value for the object */
+ value = *((u_long *) netsnmp_request_get_list_data (requests,
+ "cpuload_threshold"));
+ sprintf (buffer, "%d", value);
+
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_CPULOAD_THRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ /* try _really_really_ hard to never get to this point */
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_UNDOFAILED);
+ }
+ break;
+
+ default:
+ /* we should never get here, so this is a really bad error */
+ snmp_log (LOG_ERR,
+ "unknown mode (%d) in handle_eocCbatCardCpuLoadThreshold\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
@@ -361,24 +689,35 @@ handle_eocCbatCardMemUsage(netsnmp_mib_handler *handler,
netsnmp_request_info *requests)
{
/* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
-
+ * "instance", as it's "magically" handled for us. */
+ int ret;
+ int mem_usage_percent = 0;
/* a instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one. */
-
- switch(reqinfo->mode) {
-
- case MODE_GET:
- snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
- (u_char *) /* XXX: a pointer to the scalar's data */,
- /* XXX: the length of the data in bytes */);
- break;
-
-
- default:
- /* we should never get here, so this is a really bad error */
- snmp_log(LOG_ERR, "unknown mode (%d) in handle_eocCbatCardMemUsage\n", reqinfo->mode );
- return SNMP_ERR_GENERR;
+ * we don't need to loop over a list of requests; we'll only get one. */
+
+ switch (reqinfo->mode)
+ {
+
+ case MODE_GET:
+ ret = libspid_system_get_memusage_percent (&mem_usage_percent);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_system_get_cpuload error\n");
+ /* default temperature value set to 0 to permit walk requests */
+ mem_usage_percent = 0;
+ }
+ snmp_set_var_typed_value (requests->requestvb, ASN_INTEGER,
+ (u_char *) & mem_usage_percent,
+ sizeof (mem_usage_percent));
+ break;
+
+
+ default:
+ /* we should never get here, so this is a really bad error */
+ snmp_log (LOG_ERR,
+ "unknown mode (%d) in handle_eocCbatCardMemUsage\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
@@ -390,74 +729,160 @@ handle_eocCbatCardMemUsageThreshold(netsnmp_mib_handler *handler,
netsnmp_request_info *requests)
{
int ret;
+ char buffer[LIBSPID_LINE_MAX_LEN];
+ int memusage_threshold;
+ int *memusage_threshold_save = NULL;
+ u_char *value;
/* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
+ * "instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one. */
-
- switch(reqinfo->mode) {
-
- case MODE_GET:
- snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
- (u_char *) /* XXX: a pointer to the scalar's data */,
- /* XXX: the length of the data in bytes */);
- break;
-
- /*
- * SET REQUEST
- *
- * multiple states in the transaction. See:
- * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
- */
- case MODE_SET_RESERVE1:
- /* or you could use netsnmp_check_vb_type_and_size instead */
- ret = netsnmp_check_vb_type(requests->requestvb, ASN_INTEGER);
- if ( ret != SNMP_ERR_NOERROR ) {
- netsnmp_set_request_error(reqinfo, requests, ret );
+ * we don't need to loop over a list of requests; we'll only get one. */
+
+ switch (reqinfo->mode)
+ {
+
+ case MODE_GET:
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_MEMUSAGE_THRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse memusage_threshold from buffer */
+ if (1 != sscanf (buffer, "%d", &memusage_threshold))
+ {
+ memusage_threshold = 0;
}
- break;
-
- case MODE_SET_RESERVE2:
- /* XXX malloc "undo" storage buffer */
- if (/* XXX if malloc, or whatever, failed: */) {
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_RESOURCEUNAVAILABLE);
- }
- break;
-
- case MODE_SET_FREE:
- /* XXX: free resources allocated in RESERVE1 and/or
- RESERVE2. Something failed somewhere, and the states
- below won't be called. */
- break;
-
- case MODE_SET_ACTION:
- /* XXX: perform the value change here */
- if (/* XXX: error? */) {
- netsnmp_set_request_error(reqinfo, requests, /* some error */);
- }
- break;
-
- case MODE_SET_COMMIT:
- /* XXX: delete temporary storage */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_COMMITFAILED);
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ memusage_threshold = 0;
+ }
+
+ snmp_set_var_typed_value (requests->requestvb, ASN_INTEGER,
+ (u_char *) & memusage_threshold,
+ sizeof (memusage_threshold));
+ break;
+
+ /*
+ * SET REQUEST
+ *
+ * multiple states in the transaction. See:
+ * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
+ */
+ case MODE_SET_RESERVE1:
+ /* or you could use netsnmp_check_vb_type_and_size instead */
+ ret = netsnmp_check_vb_type (requests->requestvb, ASN_INTEGER);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
+ ret = netsnmp_check_vb_range (requests->requestvb,
+ LIBSPID_EOC_MEMUSAGE_THRESHOLD_MIN,
+ LIBSPID_EOC_MENUSAGE_THRESHOLD_MAX);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
+ break;
+
+ case MODE_SET_RESERVE2:
+ /* malloc "undo" storage buffer */
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_MEMUSAGE_THRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse memusage_threshold from buffer */
+ if (1 != sscanf (buffer, "%d", &memusage_threshold))
+ {
+ memusage_threshold = 0;
}
- break;
-
- case MODE_SET_UNDO:
- /* XXX: UNDO and return to previous value for the object */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_UNDOFAILED);
- }
- break;
-
- default:
- /* we should never get here, so this is a really bad error */
- snmp_log(LOG_ERR, "unknown mode (%d) in handle_eocCbatCardMemUsageThreshold\n", reqinfo->mode );
- return SNMP_ERR_GENERR;
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ /* parse alarm detection settings from buffer */
+
+ memdup ((u_char **) & memusage_threshold_save,
+ (u_char *) & memusage_threshold, sizeof (memusage_threshold));
+ /* if malloc, or whatever, failed: */
+ if (NULL == memusage_threshold_save)
+ {
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ else
+ {
+ netsnmp_request_add_list_data (requests,
+ netsnmp_create_data_list
+ ("memusage_threshold",
+ memusage_threshold_save, free));
+ }
+ break;
+
+ case MODE_SET_FREE:
+ /*free resources allocated in RESERVE1 and/or
+ * RESERVE2. Something failed somewhere, and the states
+ * below won't be called. */
+ free (memusage_threshold_save);
+ break;
+
+ case MODE_SET_ACTION:
+ /* perform the value change here */
+ value = *(requests->requestvb->val.integer);
+
+ sprintf (buffer, "%d", value);
+
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_MEMUSAGE_THRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_COMMITFAILED);
+ }
+ break;
+
+ case MODE_SET_COMMIT:
+ /*delete temporary storage */
+ free (memusage_threshold_save);
+ break;
+
+ case MODE_SET_UNDO:
+ /*: UNDO and return to previous value for the object */
+ value = *((u_long *) netsnmp_request_get_list_data (
+ requests,
+ "cpuload_threshold"));
+ sprintf (buffer, "%d", value);
+
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_MEMUSAGE_THRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ /* try _really_really_ hard to never get to this point */
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_UNDOFAILED);
+ }
+ break;
+
+ default:
+ /* we should never get here, so this is a really bad error */
+ snmp_log (LOG_ERR,
+ "unknown mode (%d) in handle_eocCbatCardMemUsageThreshold\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.h
index 89daa81276..2f9189fa0b 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.h
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCbatPropertyObjects/eocCbatPropertyGlobalObjects/eocCbatPropertyGlobalObjects.h
@@ -5,6 +5,10 @@
#ifndef EOCCBATPROPERTYGLOBALOBJECTS_H
#define EOCCBATPROPERTYGLOBALOBJECTS_H
+/* include common header */
+#include "EoCCommon.h"
+
+
/* function declarations */
void init_eocCbatPropertyGlobalObjects(void);
Netsnmp_Node_Handler handle_eocCbatEnvTemperature;
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects.h
index 5f743105ea..c323c00da5 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects.h
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects.h
@@ -1 +1 @@
-//config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects)
+config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects)
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects.h
index fe9dfd4aec..185d83caa8 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects.h
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects.h
@@ -1 +1 @@
-//config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects)
+config_require(mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects)
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.c
index ae3b59c4ea..916dc5fcec 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.c
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.c
@@ -36,19 +36,44 @@ handle_eocCnuRfHighAtnThreshold(netsnmp_mib_handler *handler,
netsnmp_request_info *requests)
{
int ret;
+ char buffer[LIBSPID_KEY_MAX_LEN];
+ int rf_atn_highthreshold;
+ int rf_atn_lowthreshold;
+ int *rf_atn_highthreshold_save = NULL;
+ u_char *value;
+
/* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
+ * "instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one. */
-
- switch(reqinfo->mode) {
+ * we don't need to loop over a list of requests; we'll only get one. */
+
+ switch (reqinfo->mode)
+ {
+
+ case MODE_GET:
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_HIGHTHRESHOLD,
+ buffer, LIBSPID_KEY_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse rf_atn_highthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &rf_atn_highthreshold))
+ {
+ rf_atn_highthreshold = 0;
+ }
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ rf_atn_highthreshold = 0;
+ }
- case MODE_GET:
- snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
- (u_char *) /* XXX: a pointer to the scalar's data */,
- /* XXX: the length of the data in bytes */);
- break;
+ snmp_set_var_typed_value (requests->requestvb, ASN_INTEGER,
+ (u_char *) & rf_atn_highthreshold,
+ sizeof (rf_atn_highthreshold));
+ break;
/*
* SET REQUEST
@@ -56,54 +81,139 @@ handle_eocCnuRfHighAtnThreshold(netsnmp_mib_handler *handler,
* multiple states in the transaction. See:
* http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
*/
- case MODE_SET_RESERVE1:
- /* or you could use netsnmp_check_vb_type_and_size instead */
- ret = netsnmp_check_vb_type(requests->requestvb, ASN_INTEGER);
- if ( ret != SNMP_ERR_NOERROR ) {
- netsnmp_set_request_error(reqinfo, requests, ret );
- }
- break;
+ case MODE_SET_RESERVE1:
+ /* or you could use netsnmp_check_vb_type_and_size instead */
+ ret = netsnmp_check_vb_type (requests->requestvb, ASN_INTEGER);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
+
- case MODE_SET_RESERVE2:
- /* XXX malloc "undo" storage buffer */
- if (/* XXX if malloc, or whatever, failed: */) {
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_RESOURCEUNAVAILABLE);
- }
- break;
-
- case MODE_SET_FREE:
- /* XXX: free resources allocated in RESERVE1 and/or
- RESERVE2. Something failed somewhere, and the states
- below won't be called. */
- break;
-
- case MODE_SET_ACTION:
- /* XXX: perform the value change here */
- if (/* XXX: error? */) {
- netsnmp_set_request_error(reqinfo, requests, /* some error */);
- }
- break;
- case MODE_SET_COMMIT:
- /* XXX: delete temporary storage */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_COMMITFAILED);
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_LOWTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse rf_atn_lowthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &rf_atn_lowthreshold))
+ {
+ rf_atn_lowthreshold = 0;
}
- break;
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ rf_atn_lowthreshold = 0;
+ }
- case MODE_SET_UNDO:
- /* XXX: UNDO and return to previous value for the object */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_UNDOFAILED);
+ ret = netsnmp_check_vb_range (requests->requestvb,
+ rf_atn_lowthreshold,
+ LIBSPID_EOC_ATTENUATION_THRESHOLD_MAX);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
+ break;
+
+ case MODE_SET_RESERVE2:
+ /* malloc "undo" storage buffer */
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_HIGHTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse rf_atn_highthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &rf_atn_highthreshold))
+ {
+ rf_atn_highthreshold = 0;
}
- break;
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ /* parse alarm detection settings from buffer */
+
+ memdup ((u_char **) & rf_atn_highthreshold_save,
+ (u_char *) & rf_atn_highthreshold,
+ sizeof (rf_atn_highthreshold));
+ /* if malloc, or whatever, failed: */
+ if (NULL == rf_atn_highthreshold_save)
+ {
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ else
+ {
+ netsnmp_request_add_list_data (requests,
+ netsnmp_create_data_list
+ ("rfatn_highthreshold",
+ rf_atn_highthreshold_save, free));
+ }
+ break;
+
+ case MODE_SET_FREE:
+ /* : free resources allocated in RESERVE1 and/or
+ * RESERVE2. Something failed somewhere, and the states
+ * below won't be called. */
+ free (rf_atn_highthreshold_save);
+ break;
+
+ case MODE_SET_ACTION:
+ /* perform the value change here */
+
+ value = *(requests->requestvb->val.integer);
+
+ sprintf (buffer, "%d", value);
+
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_HIGHTHRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_COMMITFAILED);
+ }
+ break;
+
+ case MODE_SET_COMMIT:
+ /* delete temporary storage */
+ free (rf_atn_highthreshold_save);
+ break;
- default:
- /* we should never get here, so this is a really bad error */
- snmp_log(LOG_ERR, "unknown mode (%d) in handle_eocCnuRfHighAtnThreshold\n", reqinfo->mode );
- return SNMP_ERR_GENERR;
+ case MODE_SET_UNDO:
+ /*: UNDO and return to previous value for the object */
+ value = *((u_long *) netsnmp_request_get_list_data (
+ requests,
+ "rfatn_highthreshold"));
+ sprintf (buffer, "%d", value);
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_HIGHTHRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ /* try _really_really_ hard to never get to this point */
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_UNDOFAILED);
+ }
+ break;
+
+ default:
+ /* we should never get here, so this is a really bad error */
+ snmp_log (LOG_ERR,
+ "unknown mode (%d) in handle_eocCnuRfHighAtnThreshold\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
@@ -115,74 +225,182 @@ handle_eocCnuRfLowAtnThreshold(netsnmp_mib_handler *handler,
netsnmp_request_info *requests)
{
int ret;
+ char buffer[LIBSPID_LINE_MAX_LEN];
+ int rf_atn_lowthreshold;
+ int rf_atn_highthreshold;
+ int *rf_atn_lowthreshold_save = NULL;
+ u_char *value;
+
/* We are never called for a GETNEXT if it's registered as a
- "instance", as it's "magically" handled for us. */
+ * "instance", as it's "magically" handled for us. */
/* a instance handler also only hands us one request at a time, so
- we don't need to loop over a list of requests; we'll only get one. */
-
- switch(reqinfo->mode) {
+ * we don't need to loop over a list of requests; we'll only get one. */
+
+ switch (reqinfo->mode)
+ {
+
+ case MODE_GET:
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_LOWTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse rf_atn_lowthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &rf_atn_lowthreshold))
+ {
+ rf_atn_lowthreshold = 0;
+ }
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ rf_atn_lowthreshold = 0;
+ }
- case MODE_GET:
- snmp_set_var_typed_value(requests->requestvb, ASN_INTEGER,
- (u_char *) /* XXX: a pointer to the scalar's data */,
- /* XXX: the length of the data in bytes */);
- break;
+ snmp_set_var_typed_value (requests->requestvb, ASN_INTEGER,
+ (u_char *) & rf_atn_lowthreshold,
+ sizeof (rf_atn_lowthreshold));
+ break;
/*
* SET REQUEST
*
* multiple states in the transaction. See:
- * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/set-actions.jpg
+ * http://www.net-snmp.org/tutorial-5/toolkit/mib_module/
+ * set-actions.jpg
*/
- case MODE_SET_RESERVE1:
- /* or you could use netsnmp_check_vb_type_and_size instead */
- ret = netsnmp_check_vb_type(requests->requestvb, ASN_INTEGER);
- if ( ret != SNMP_ERR_NOERROR ) {
- netsnmp_set_request_error(reqinfo, requests, ret );
- }
- break;
+ case MODE_SET_RESERVE1:
+ /* or you could use netsnmp_check_vb_type_and_size instead */
+ ret = netsnmp_check_vb_type (requests->requestvb, ASN_INTEGER);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
- case MODE_SET_RESERVE2:
- /* XXX malloc "undo" storage buffer */
- if (/* XXX if malloc, or whatever, failed: */) {
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_RESOURCEUNAVAILABLE);
- }
- break;
-
- case MODE_SET_FREE:
- /* XXX: free resources allocated in RESERVE1 and/or
- RESERVE2. Something failed somewhere, and the states
- below won't be called. */
- break;
-
- case MODE_SET_ACTION:
- /* XXX: perform the value change here */
- if (/* XXX: error? */) {
- netsnmp_set_request_error(reqinfo, requests, /* some error */);
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_HIGHTHRESHOLD,
+ buffer, LIBSPID_KEY_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse rf_atn_highthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &rf_atn_highthreshold))
+ {
+ rf_atn_highthreshold = 0;
}
- break;
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ rf_atn_highthreshold = 0;
+ }
+ ret = netsnmp_check_vb_range (requests->requestvb,
+ LIBSPID_EOC_ATTENUATION_THRESHOLD_MIN,
+ rf_atn_highthreshold);
+ if (ret != SNMP_ERR_NOERROR)
+ {
+ netsnmp_set_request_error (reqinfo, requests, ret);
+ }
+ break;
- case MODE_SET_COMMIT:
- /* XXX: delete temporary storage */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_COMMITFAILED);
+ case MODE_SET_RESERVE2:
+ /* malloc "undo" storage buffer */
+ ret = libspid_config_read_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_LOWTHRESHOLD,
+ buffer, LIBSPID_CONFIG_LINE_MAX_LEN);
+ if (ret == LIBSPID_SUCCESS)
+ {
+ /* parse rf_atn_lowthreshold from buffer */
+ if (1 != sscanf (buffer, "%d", &rf_atn_lowthreshold))
+ {
+ rf_atn_lowthreshold = 0;
}
- break;
+ }
+ else
+ {
+ snmp_log (LOG_ERR, "libspid_config_read_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ /* parse alarm detection settings from buffer */
- case MODE_SET_UNDO:
- /* XXX: UNDO and return to previous value for the object */
- if (/* XXX: error? */) {
- /* try _really_really_ hard to never get to this point */
- netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_UNDOFAILED);
- }
- break;
+ memdup ((u_char **) & rf_atn_lowthreshold_save,
+ (u_char *) & rf_atn_lowthreshold,
+ sizeof (rf_atn_lowthreshold));
+ /* if malloc, or whatever, failed: */
+ if (NULL == rf_atn_lowthreshold_save)
+ {
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_RESOURCEUNAVAILABLE);
+ }
+ else
+ {
+ netsnmp_request_add_list_data (requests,
+ netsnmp_create_data_list
+ ("rfatn_lowthreshold",
+ rf_atn_lowthreshold_save, free));
+ }
+ break;
+
+ case MODE_SET_FREE:
+ /* : free resources allocated in RESERVE1 and/or
+ * RESERVE2. Something failed somewhere, and the states
+ * below won't be called. */
+ free (rf_atn_lowthreshold_save);
+ break;
+
+ case MODE_SET_ACTION:
+ /* perform the value change here */
+
+ value = *(requests->requestvb->val.integer);
+
+ sprintf (buffer, "%d", value);
+
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_LOWTHRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_COMMITFAILED);
+ }
+ break;
+
+ case MODE_SET_COMMIT:
+ /* delete temporary storage */
+ free (rf_atn_lowthreshold_save);
+ break;
+
+ case MODE_SET_UNDO:
+ /*: UNDO and return to previous value for the object */
+ value = *((u_long *) netsnmp_request_get_list_data (
+ requests,
+ "rfatn_lowthreshold"));
+ sprintf (buffer, "%d", value);
+ ret = libspid_config_write_item (
+ LIBSPID_SNMP_CONF_PATH,
+ LIBSPID_SNMP_CONF_LABEL_ALARM_ATN_LOWTHRESHOLD,
+ buffer);
+ if (LIBSPID_SUCCESS != ret)
+ {
+ snmp_log (LOG_ERR, "libspid_config_write_item error\n");
+ /* try _really_really_ hard to never get to this point */
+ netsnmp_set_request_error (reqinfo, requests,
+ SNMP_ERR_UNDOFAILED);
+ }
+ break;
- default:
- /* we should never get here, so this is a really bad error */
- snmp_log(LOG_ERR, "unknown mode (%d) in handle_eocCnuRfLowAtnThreshold\n", reqinfo->mode );
- return SNMP_ERR_GENERR;
+ default:
+ /* we should never get here, so this is a really bad error */
+ snmp_log (LOG_ERR,
+ "unknown mode (%d) in handle_eocCnuRfLowAtnThreshold\n",
+ reqinfo->mode);
+ return SNMP_ERR_GENERR;
}
return SNMP_ERR_NOERROR;
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.h b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.h
index f2325db290..21867db4fb 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.h
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-property-mib/propertyIdent/eocPropertyObjects/eocCnuPropertyObjects/eocCnuPropertyGlobalObjects/eocCnuPropertyGlobalObjects.h
@@ -5,6 +5,9 @@
#ifndef EOCCNUPROPERTYGLOBALOBJECTS_H
#define EOCCNUPROPERTYGLOBALOBJECTS_H
+/* include common header */
+#include "EoCCommon.h"
+
/* function declarations */
void init_eocCnuPropertyGlobalObjects(void);
Netsnmp_Node_Handler handle_eocCnuRfHighAtnThreshold;