aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-08-04 13:55:10 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-08-04 13:55:10 +0000
commitf70a3e885ab86875a3c1215d755e3f3dd0030a1b (patch)
treec98daefbcb452032b75f38c72e5835d981019e39 /src/include
parent4371b0fcd9b50f78ca27ac48adf2f4663b2dfc9b (diff)
downloadgnunet-f70a3e885ab86875a3c1215d755e3f3dd0030a1b.tar.gz
gnunet-f70a3e885ab86875a3c1215d755e3f3dd0030a1b.zip
sensor: towards p2p anomaly reporting
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_sensor_util_lib.h67
1 files changed, 35 insertions, 32 deletions
diff --git a/src/include/gnunet_sensor_util_lib.h b/src/include/gnunet_sensor_util_lib.h
index e048cb9f0..b497d05d6 100644
--- a/src/include/gnunet_sensor_util_lib.h
+++ b/src/include/gnunet_sensor_util_lib.h
@@ -47,78 +47,78 @@ struct GNUNET_SENSOR_SensorInfo
47 */ 47 */
48 struct GNUNET_CONFIGURATION_Handle *cfg; 48 struct GNUNET_CONFIGURATION_Handle *cfg;
49 49
50 /* 50 /**
51 * Sensor name 51 * Sensor name
52 */ 52 */
53 char *name; 53 char *name;
54 54
55 /* 55 /**
56 * Path to definition file 56 * Path to definition file
57 */ 57 */
58 char *def_file; 58 char *def_file;
59 59
60 /* 60 /**
61 * First part of version number 61 * First part of version number
62 */ 62 */
63 uint16_t version_major; 63 uint16_t version_major;
64 64
65 /* 65 /**
66 * Second part of version number 66 * Second part of version number
67 */ 67 */
68 uint16_t version_minor; 68 uint16_t version_minor;
69 69
70 /* 70 /**
71 * Sensor description 71 * Sensor description
72 */ 72 */
73 char *description; 73 char *description;
74 74
75 /* 75 /**
76 * Sensor currently enabled 76 * Sensor currently enabled
77 */ 77 */
78 int enabled; 78 int enabled;
79 79
80 /* 80 /**
81 * Category under which the sensor falls (e.g. tcp, datastore) 81 * Category under which the sensor falls (e.g. tcp, datastore)
82 */ 82 */
83 char *category; 83 char *category;
84 84
85 /* 85 /**
86 * When does the sensor become active 86 * When does the sensor become active
87 */ 87 */
88 struct GNUNET_TIME_Absolute *start_time; 88 struct GNUNET_TIME_Absolute *start_time;
89 89
90 /* 90 /**
91 * When does the sensor expire 91 * When does the sensor expire
92 */ 92 */
93 struct GNUNET_TIME_Absolute *end_time; 93 struct GNUNET_TIME_Absolute *end_time;
94 94
95 /* 95 /**
96 * Time interval to collect sensor information (e.g. every 1 min) 96 * Time interval to collect sensor information (e.g. every 1 min)
97 */ 97 */
98 struct GNUNET_TIME_Relative interval; 98 struct GNUNET_TIME_Relative interval;
99 99
100 /* 100 /**
101 * Lifetime of an information sample after which it is deleted from storage 101 * Lifetime of an information sample after which it is deleted from storage
102 * If not supplied, will default to the interval value 102 * If not supplied, will default to the interval value
103 */ 103 */
104 struct GNUNET_TIME_Relative lifetime; 104 struct GNUNET_TIME_Relative lifetime;
105 105
106 /* 106 /**
107 * A set of required peer capabilities for the sensor to collect meaningful information (e.g. ipv6) 107 * A set of required peer capabilities for the sensor to collect meaningful information (e.g. ipv6)
108 */ 108 */
109 char *capabilities; 109 char *capabilities;
110 110
111 /* 111 /**
112 * Either "gnunet-statistics" or external "process" 112 * Either "gnunet-statistics" or external "process"
113 */ 113 */
114 char *source; 114 char *source;
115 115
116 /* 116 /**
117 * Name of the GNUnet service that is the source for the gnunet-statistics entry 117 * Name of the GNUnet service that is the source for the gnunet-statistics entry
118 */ 118 */
119 char *gnunet_stat_service; 119 char *gnunet_stat_service;
120 120
121 /* 121 /**
122 * Name of the gnunet-statistics entry 122 * Name of the gnunet-statistics entry
123 */ 123 */
124 char *gnunet_stat_name; 124 char *gnunet_stat_name;
@@ -128,59 +128,61 @@ struct GNUNET_SENSOR_SensorInfo
128 */ 128 */
129 struct GNUNET_STATISTICS_GetHandle *gnunet_stat_get_handle; 129 struct GNUNET_STATISTICS_GetHandle *gnunet_stat_get_handle;
130 130
131 /* 131 /**
132 * Name of the external process to be executed 132 * Name of the external process to be executed
133 */ 133 */
134 char *ext_process; 134 char *ext_process;
135 135
136 /* 136 /**
137 * Arguments to be passed to the external process 137 * Arguments to be passed to the external process
138 */ 138 */
139 char *ext_args; 139 char *ext_args;
140 140
141 /* 141 /**
142 * Handle to the external process 142 * Handle to the external process
143 */ 143 */
144 struct GNUNET_OS_CommandHandle *ext_cmd; 144 struct GNUNET_OS_CommandHandle *ext_cmd;
145 145
146 /* 146 /**
147 * Did we already receive a value 147 * Did we already receive a value
148 * from the currently running external 148 * from the currently running external
149 * proccess ? #GNUNET_YES / #GNUNET_NO 149 * proccess ? #GNUNET_YES / #GNUNET_NO
150 */ 150 */
151 int ext_cmd_value_received; 151 int ext_cmd_value_received;
152 152
153 /* 153 /**
154 * The output datatype to be expected 154 * The output datatype to be expected
155 */ 155 */
156 char *expected_datatype; 156 char *expected_datatype;
157 157
158 /* 158 /**
159 * Peer-identity of peer running collection point 159 * Peer-identity of peer running collection point
160 */ 160 */
161 struct GNUNET_PeerIdentity *collection_point; 161 struct GNUNET_PeerIdentity *collection_point;
162 162
163 /* 163 /**
164 * Time interval to send sensor information to collection point (e.g. every 30 mins) 164 * Do we report received sensor values to collection point?
165 * #GNUNET_YES / #GNUNET_NO
165 */ 166 */
166 struct GNUNET_TIME_Relative collection_interval; 167 int report_values;
167 168
168 /* 169 /**
169 * Flag specifying if value is to be communicated to the p2p network 170 * Time interval to send sensor values to collection point (e.g. every 30 mins)
170 */ 171 */
171 int p2p_report; 172 struct GNUNET_TIME_Relative value_reporting_interval;
172 173
173 /* 174 /**
174 * Time interval to communicate value to the p2p network 175 * Do we report anomalies to collection point?
176 * #GNUNET_YES / #GNUNET_NO
175 */ 177 */
176 struct GNUNET_TIME_Relative p2p_interval; 178 int report_anomalies;
177 179
178 /* 180 /**
179 * Execution task (OR GNUNET_SCHEDULER_NO_TASK) 181 * Execution task (OR GNUNET_SCHEDULER_NO_TASK)
180 */ 182 */
181 GNUNET_SCHEDULER_TaskIdentifier execution_task; 183 GNUNET_SCHEDULER_TaskIdentifier execution_task;
182 184
183 /* 185 /**
184 * Is the sensor being executed 186 * Is the sensor being executed
185 */ 187 */
186 int running; 188 int running;
@@ -296,6 +298,7 @@ struct GNUNET_SENSOR_SensorFullMessage
296}; 298};
297 299
298GNUNET_NETWORK_STRUCT_END 300GNUNET_NETWORK_STRUCT_END
301
299/** 302/**
300 * Given two version numbers as major and minor, compare them. 303 * Given two version numbers as major and minor, compare them.
301 * 304 *