aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-01-27 04:21:27 +0100
committerChristian Grothoff <christian@grothoff.org>2019-01-27 04:21:27 +0100
commitf0b35049f6d9e743d2bc5fcf11664633d130d6fc (patch)
treebee27beb5d8a25ca043e483a40400fef783056c9 /src/include
parentd3f013aba71486c121800d279cd1d3af4425c412 (diff)
downloadgnunet-f0b35049f6d9e743d2bc5fcf11664633d130d6fc.tar.gz
gnunet-f0b35049f6d9e743d2bc5fcf11664633d130d6fc.zip
more work towards fixing #5385
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_cadet_service.h44
-rw-r--r--src/include/gnunet_protocols.h9
2 files changed, 43 insertions, 10 deletions
diff --git a/src/include/gnunet_cadet_service.h b/src/include/gnunet_cadet_service.h
index ce44be88a..82350ed32 100644
--- a/src/include/gnunet_cadet_service.h
+++ b/src/include/gnunet_cadet_service.h
@@ -572,25 +572,49 @@ GNUNET_CADET_get_path_cancel (struct GNUNET_CADET_GetPath *gp);
572 572
573 573
574/** 574/**
575 * Details about a tunnel managed by CADET.
576 */
577struct GNUNET_CADET_TunnelDetails
578{
579 /**
580 * Target of the tunnel.
581 */
582 struct GNUNET_PeerIdentity peer;
583
584 /**
585 * How many channels use the tunnel.
586 */
587 uint32_t channels;
588
589 /**
590 * How many connections support the tunnel.
591 */
592 uint32_t connections;
593
594 /**
595 * What is our encryption state?
596 */
597 uint16_t estate;
598
599 /**
600 * What is our connectivity state?
601 */
602 uint16_t cstate;
603};
604
605
606/**
575 * Method called to retrieve information about all tunnels in CADET, called 607 * Method called to retrieve information about all tunnels in CADET, called
576 * once per tunnel. 608 * once per tunnel.
577 * 609 *
578 * After last tunnel has been reported, an additional call with NULL is done. 610 * After last tunnel has been reported, an additional call with NULL is done.
579 * 611 *
580 * @param cls Closure. 612 * @param cls Closure.
581 * @param peer Destination peer, or NULL on "EOF". 613 * @param td tunnel details, NULL for end of list
582 * @param channels Number of channels.
583 * @param connections Number of connections.
584 * @param estate Encryption state.
585 * @param cstate Connectivity state.
586 */ 614 */
587typedef void 615typedef void
588(*GNUNET_CADET_TunnelsCB) (void *cls, 616(*GNUNET_CADET_TunnelsCB) (void *cls,
589 const struct GNUNET_PeerIdentity *peer, 617 const struct GNUNET_CADET_TunnelDetails *td);
590 unsigned int channels,
591 unsigned int connections,
592 uint16_t estate,
593 uint16_t cstate);
594 618
595 619
596/** 620/**
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 1b1bdc099..9d3280d36 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2916,6 +2916,15 @@ extern "C"
2916 */ 2916 */
2917#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PATH 1042 2917#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PATH 1042
2918 2918
2919/**
2920 * End of local information about all tunnels of service.
2921 */
2922#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS_END 1043
2923
2924/**
2925 * Request local information about all tunnels of service.
2926 */
2927#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_TUNNELS 1044
2919 2928
2920/******************************** Application *******************************/ 2929/******************************** Application *******************************/
2921 2930