aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMatthias Wachs <wachs@net.in.tum.de>2014-01-08 10:50:27 +0000
committerMatthias Wachs <wachs@net.in.tum.de>2014-01-08 10:50:27 +0000
commit0db0f5b8f69e2137256904edf29222e71051e77c (patch)
tree490944a3362d95c412c3d26f034a229c8e106676 /src/include
parentf98fb14e5a1c4acc0444d9c78c654468fab02c6a (diff)
downloadgnunet-0db0f5b8f69e2137256904edf29222e71051e77c.tar.gz
gnunet-0db0f5b8f69e2137256904edf29222e71051e77c.zip
implementing monitoring api
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_protocols.h21
-rw-r--r--src/include/gnunet_transport_service.h17
2 files changed, 33 insertions, 5 deletions
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index e2923b971..1861c318b 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -1278,7 +1278,7 @@ extern "C"
1278/** 1278/**
1279 * Request to monitor addresses used by a peer or all peers. 1279 * Request to monitor addresses used by a peer or all peers.
1280 */ 1280 */
1281#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE 380 1281#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_REQUEST 380
1282 1282
1283/** 1283/**
1284 * Message send by a peer to notify the other to keep the session alive 1284 * Message send by a peer to notify the other to keep the session alive
@@ -1287,16 +1287,16 @@ extern "C"
1287#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE 381 1287#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE 381
1288 1288
1289/** 1289/**
1290 * Response to a GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE message to 1290 * Response to a #GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE message to
1291 * measure latency in a regular interval 1291 * measure latency in a regular interval
1292 */ 1292 */
1293#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE_RESPONSE 382 1293#define GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE_RESPONSE 382
1294 1294
1295
1296/** 1295/**
1297 * Request to iterate over all known addresses. 1296 * Response to #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_REQUEST
1297 * request to iterate over all known addresses.
1298 */ 1298 */
1299#define GNUNET_MESSAGE_TYPE_TRANSPORT_ADDRESS_ITERATE_RESPONSE 383 1299#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_PEER_RESPONSE 383
1300 1300
1301/** 1301/**
1302 * Message send by a peer to notify the other to keep the session alive. 1302 * Message send by a peer to notify the other to keep the session alive.
@@ -1308,6 +1308,17 @@ extern "C"
1308 */ 1308 */
1309#define GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC 385 1309#define GNUNET_MESSAGE_TYPE_TRANSPORT_TRAFFIC_METRIC 385
1310 1310
1311/**
1312 * Request to monitor address validations by a peer or all peers.
1313 */
1314#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_REQUEST 386
1315
1316/**
1317 * Response to #GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_REQUEST
1318 * request to iterate over all known addresses.
1319 */
1320#define GNUNET_MESSAGE_TYPE_TRANSPORT_MONITOR_VALIDATION_RESPONSE 387
1321
1311 1322
1312 1323
1313/******************************************************************************* 1324/*******************************************************************************
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index dee8e7118..5448460ad 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -587,6 +587,23 @@ GNUNET_TRANSPORT_address_to_string_cancel (struct
587 GNUNET_TRANSPORT_AddressToStringContext 587 GNUNET_TRANSPORT_AddressToStringContext
588 *pic); 588 *pic);
589 589
590/**
591 * Convert a transport state to a human readable string.
592 *
593 * @param alc handle for the request to cancel
594 */
595const char *
596GNUNET_TRANSPORT_p2s (enum GNUNET_TRANSPORT_PeerState state);
597
598
599/**
600 * Check if a state is defined as connected
601 *
602 * @param state the state value
603 * @return GNUNET_YES or GNUNET_NO
604 */
605int
606GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state);
590 607
591/** 608/**
592 * Return information about a specific peer or all peers currently known to 609 * Return information about a specific peer or all peers currently known to