summaryrefslogtreecommitdiff
path: root/src/connman.h
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2010-06-30 13:59:51 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-06-30 19:26:43 +0200
commit14236b2a2b6121963d1fc1e1eead753a380498f2 (patch)
tree95ab0fcacea598710770b11948fb843147b29d61 /src/connman.h
parente4fb1ca873f840acd1e0a72a6f266843f65854ae (diff)
downloadconnman-14236b2a2b6121963d1fc1e1eead753a380498f2.tar.gz
connman-14236b2a2b6121963d1fc1e1eead753a380498f2.tar.bz2
connman-14236b2a2b6121963d1fc1e1eead753a380498f2.zip
Add service statistic data structure
The static values are maintained in the Service object and exposed through simple accessors. When a Service object enters the ready state it registers itself at Counter. If the Service object is leaving the ready state it will de-register itself from Counter and consequently it will not be updated anymore. The user can shorten the update interval when he registers a Counter object with a shorter interval value. The statistic is stored in the profile file. Only the current value is stored, no history. If there is not Counter object the stats wont be upated. This short coming will be addressed by the 'data threshold netfilter module' patches.
Diffstat (limited to 'src/connman.h')
-rw-r--r--src/connman.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/connman.h b/src/connman.h
index 8bf5e970..81eda658 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -435,6 +435,13 @@ void __connman_service_append_nameserver(struct connman_service *service,
void __connman_service_remove_nameserver(struct connman_service *service,
const char *nameserver);
+unsigned long __connman_service_stats_get_tx_bytes(struct connman_service *service);
+unsigned long __connman_service_stats_get_rx_bytes(struct connman_service *service);
+unsigned long __connman_service_stats_get_time(struct connman_service *service);
+void __connman_service_stats_update(struct connman_service *service,
+ unsigned long rx_bytes,
+ unsigned long tx_bytes);
+
#include <connman/location.h>
int __connman_location_init(void);