From 4ec038ad1cefcec2eaa60af61b8e973c27c4cf09 Mon Sep 17 00:00:00 2001 From: Omar Tarabai Date: Tue, 12 Aug 2014 10:57:54 +0000 Subject: sensor: force fake anomaly --- src/include/gnunet_sensor_service.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/include') diff --git a/src/include/gnunet_sensor_service.h b/src/include/gnunet_sensor_service.h index a31b20e52..59e4248ab 100644 --- a/src/include/gnunet_sensor_service.h +++ b/src/include/gnunet_sensor_service.h @@ -145,6 +145,23 @@ GNUNET_SENSOR_iterate (struct GNUNET_SENSOR_Handle *h, GNUNET_SENSOR_SensorIterateCB callback, void *callback_cls); + +/** + * Force an anomaly status change on a given sensor. If the sensor reporting + * module is running, this will trigger the usual reporting logic, therefore, + * please only use this in a test environment. + * + * Also, if the sensor analysis module is running, it might conflict and cause + * undefined behaviour if it detects a real anomaly. + * + * @param h Service handle + * @param sensor_name Sensor name to set the anomaly status + * @param anomalous The desired status: #GNUNET_YES / #GNUNET_NO + */ +void +GNUNET_SENSOR_force_anomaly (struct GNUNET_SENSOR_Handle *h, char *sensor_name, + int anomalous); + #if 0 /* keep Emacsens' auto-indent happy */ { #endif -- cgit v1.2.3