aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-01-27 04:29:52 +0100
committerChristian Grothoff <christian@grothoff.org>2019-01-27 04:29:52 +0100
commit1c9f269ea5cadb20bb5f7fc209274ba5d6af4749 (patch)
treece241e18c8db4876be1fd7ed4d7b7460994fd815 /src/include
parentf0b35049f6d9e743d2bc5fcf11664633d130d6fc (diff)
downloadgnunet-1c9f269ea5cadb20bb5f7fc209274ba5d6af4749.tar.gz
gnunet-1c9f269ea5cadb20bb5f7fc209274ba5d6af4749.zip
in principle finished with #5385, could use some testing...
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_cadet_service.h59
-rw-r--r--src/include/gnunet_protocols.h48
2 files changed, 17 insertions, 90 deletions
diff --git a/src/include/gnunet_cadet_service.h b/src/include/gnunet_cadet_service.h
index 82350ed32..ac3d11216 100644
--- a/src/include/gnunet_cadet_service.h
+++ b/src/include/gnunet_cadet_service.h
@@ -649,65 +649,6 @@ void *
649GNUNET_CADET_list_tunnels_cancel (struct GNUNET_CADET_ListTunnels *lt); 649GNUNET_CADET_list_tunnels_cancel (struct GNUNET_CADET_ListTunnels *lt);
650 650
651 651
652
653/**
654 * Method called to retrieve information about a specific tunnel the cadet peer
655 * has established, o`r is trying to establish.
656 *
657 * @param cls Closure.
658 * @param peer Peer towards whom the tunnel is directed.
659 * @param n_channels Number of channels.
660 * @param n_connections Number of connections.
661 * @param channels Channels.
662 * @param connections Connections.
663 * @param estate Encryption state.
664 * @param cstate Connectivity state.
665 */
666typedef void
667(*GNUNET_CADET_TunnelCB) (void *cls,
668 const struct GNUNET_PeerIdentity *peer,
669 unsigned int n_channels,
670 unsigned int n_connections,
671 const struct GNUNET_CADET_ChannelTunnelNumber *channels,
672 const struct GNUNET_CADET_ConnectionTunnelIdentifier *connections,
673 unsigned int estate,
674 unsigned int cstate);
675
676
677/**
678 * Operation handle.
679 */
680struct GNUNET_CADET_GetTunnel;
681
682
683/**
684 * Request information about a tunnel of the running cadet peer.
685 * The callback will be called for the tunnel once.
686 * Only one info request (of any kind) can be active at once.
687 *
688 * @param cfg configuration to use
689 * @param id Peer whose tunnel to examine.
690 * @param callback Function to call with the requested data.
691 * @param callback_cls Closure for @c callback.
692 * @return NULL on error
693 */
694struct GNUNET_CADET_GetTunnel *
695GNUNET_CADET_get_tunnel (const struct GNUNET_CONFIGURATION_Handle *cfg,
696 const struct GNUNET_PeerIdentity *id,
697 GNUNET_CADET_TunnelCB callback,
698 void *callback_cls);
699
700
701/**
702 * Cancel a monitor request. The monitor callback will not be called.
703 *
704 * @param lt operation handle
705 * @return Closure given to #GNUNET_CADET_get_tunnel(), if any.
706 */
707void *
708GNUNET_CADET_get_tunnel_cancel (struct GNUNET_CADET_GetTunnel *gt);
709
710
711#if 0 /* keep Emacsens' auto-indent happy */ 652#if 0 /* keep Emacsens' auto-indent happy */
712{ 653{
713#endif 654#endif
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 9d3280d36..1cd06de8d 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2862,29 +2862,29 @@ extern "C"
2862#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL 1031 2862#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL 1031
2863 2863
2864/** 2864/**
2865 * Local information about all tunnels of service. 2865 * End of local information of service about channels.
2866 */ 2866 */
2867#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS 1032 2867#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL_END 1032
2868 2868
2869/** 2869/**
2870 * Local information of service about a specific tunnel. 2870 * Request local information about all peers known to the service.
2871 */ 2871 */
2872#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL 1033 2872#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PEERS 1033
2873 2873
2874/** 2874/**
2875 * Local information about all connections of service. 2875 * Local information about all peers known to the service.
2876 */ 2876 */
2877#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTIONS 1034 2877#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS 1034
2878 2878
2879/** 2879/**
2880 * Local information of service about a specific connection. 2880 * End of local information about all peers known to the service.
2881 */ 2881 */
2882#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CONNECTION 1035 2882#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS_END 1035
2883 2883
2884/** 2884/**
2885 * Local information about all peers known to the service. 2885 * Request local information of service about paths to specific peer.
2886 */ 2886 */
2887#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS 1036 2887#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PATH 1036
2888 2888
2889/** 2889/**
2890 * Local information of service about a specific path. 2890 * Local information of service about a specific path.
@@ -2892,39 +2892,25 @@ extern "C"
2892#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PATH 1037 2892#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PATH 1037
2893 2893
2894/** 2894/**
2895 * End of local information of service about channels. 2895 * End of local information of service about a specific path.
2896 */
2897#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_CHANNEL_END 1038
2898
2899/**
2900 * End of local information about all peers known to the service.
2901 */
2902#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS_END 1039
2903
2904/**
2905 * Request local information about all peers known to the service.
2906 */ 2896 */
2907#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PEERS 1040 2897#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PATH_END 1038
2908 2898
2909/** 2899/**
2910 * End of local information of service about a specific path. 2900 * Request local information about all tunnels of service.
2911 */ 2901 */
2912#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PATH_END 1041 2902#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_TUNNELS 1039
2913 2903
2914/** 2904/**
2915 * Request local information of service about paths to specific peer. 2905 * Local information about all tunnels of service.
2916 */ 2906 */
2917#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_PATH 1042 2907#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS 1040
2918 2908
2919/** 2909/**
2920 * End of local information about all tunnels of service. 2910 * End of local information about all tunnels of service.
2921 */ 2911 */
2922#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS_END 1043 2912#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS_END 1041
2923 2913
2924/**
2925 * Request local information about all tunnels of service.
2926 */
2927#define GNUNET_MESSAGE_TYPE_CADET_LOCAL_REQUEST_INFO_TUNNELS 1044
2928 2914
2929/******************************** Application *******************************/ 2915/******************************** Application *******************************/
2930 2916