diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-10-27 14:49:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-10-27 14:49:03 +0000 |
commit | 6b048559eadd3e57fda24a23d3f3b4681d4e1408 (patch) | |
tree | 88c6f0ab9f0dda3d090f95adfd365078e6ed3b1a /src/testbed/gnunet-service-testbed_connectionpool.h | |
parent | 57d4c0d631fc90945e92f264c841068a8be6565f (diff) | |
download | gnunet-6b048559eadd3e57fda24a23d3f3b4681d4e1408.tar.gz gnunet-6b048559eadd3e57fda24a23d3f3b4681d4e1408.zip |
prepare testbed for #3675 by having an option to establish connections to ATS
Diffstat (limited to 'src/testbed/gnunet-service-testbed_connectionpool.h')
-rw-r--r-- | src/testbed/gnunet-service-testbed_connectionpool.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/testbed/gnunet-service-testbed_connectionpool.h b/src/testbed/gnunet-service-testbed_connectionpool.h index 5d375842c..acc597e9e 100644 --- a/src/testbed/gnunet-service-testbed_connectionpool.h +++ b/src/testbed/gnunet-service-testbed_connectionpool.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | Copyright (C) 2008--2013 Christian Grothoff (and other contributing authors) | 3 | Copyright (C) 2008--2015 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -23,7 +23,9 @@ | |||
23 | * @brief Interface for connection pooling subroutines | 23 | * @brief Interface for connection pooling subroutines |
24 | * @author Sree Harsha Totakura <sreeharsha@totakura.in> | 24 | * @author Sree Harsha Totakura <sreeharsha@totakura.in> |
25 | */ | 25 | */ |
26 | 26 | #include "gnunet_ats_service.h" | |
27 | #include "gnunet_core_service.h" | ||
28 | #include "gnunet_transport_service.h" | ||
27 | 29 | ||
28 | /** | 30 | /** |
29 | * The request handle for obtaining a pooled connection | 31 | * The request handle for obtaining a pooled connection |
@@ -44,7 +46,12 @@ enum GST_ConnectionPool_Service | |||
44 | /** | 46 | /** |
45 | * Core service | 47 | * Core service |
46 | */ | 48 | */ |
47 | GST_CONNECTIONPOOL_SERVICE_CORE | 49 | GST_CONNECTIONPOOL_SERVICE_CORE, |
50 | |||
51 | /** | ||
52 | * ATS service | ||
53 | */ | ||
54 | GST_CONNECTIONPOOL_SERVICE_ATS_CONNECTIVITY | ||
48 | }; | 55 | }; |
49 | 56 | ||
50 | 57 | ||
@@ -63,7 +70,7 @@ GST_connection_pool_init (unsigned int size); | |||
63 | * Cleanup the connection pool | 70 | * Cleanup the connection pool |
64 | */ | 71 | */ |
65 | void | 72 | void |
66 | GST_connection_pool_destroy (); | 73 | GST_connection_pool_destroy (void); |
67 | 74 | ||
68 | /** | 75 | /** |
69 | * Functions of this type are called when the needed handle is available for | 76 | * Functions of this type are called when the needed handle is available for |
@@ -75,15 +82,16 @@ GST_connection_pool_destroy (); | |||
75 | * @param cls the closure passed to GST_connection_pool_get_handle() | 82 | * @param cls the closure passed to GST_connection_pool_get_handle() |
76 | * @param ch the handle to CORE. Can be NULL if it is not requested | 83 | * @param ch the handle to CORE. Can be NULL if it is not requested |
77 | * @param th the handle to TRANSPORT. Can be NULL if it is not requested | 84 | * @param th the handle to TRANSPORT. Can be NULL if it is not requested |
85 | * @param ac the handle to ATS, can be NULL if it is not requested | ||
78 | * @param peer_id the identity of the peer. Will be NULL if ch is NULL. In other | 86 | * @param peer_id the identity of the peer. Will be NULL if ch is NULL. In other |
79 | * cases, its value being NULL means that CORE connection has failed. | 87 | * cases, its value being NULL means that CORE connection has failed. |
80 | */ | 88 | */ |
81 | typedef void | 89 | typedef void |
82 | (*GST_connection_pool_connection_ready_cb) (void *cls, | 90 | (*GST_connection_pool_connection_ready_cb) (void *cls, |
83 | struct GNUNET_CORE_Handle * ch, | 91 | struct GNUNET_CORE_Handle *ch, |
84 | struct GNUNET_TRANSPORT_Handle * th, | 92 | struct GNUNET_TRANSPORT_Handle *th, |
85 | const struct GNUNET_PeerIdentity * | 93 | struct GNUNET_ATS_ConnectivityHandle *ac, |
86 | peer_id); | 94 | const struct GNUNET_PeerIdentity *peer_id); |
87 | 95 | ||
88 | 96 | ||
89 | /** | 97 | /** |
@@ -96,8 +104,7 @@ typedef void | |||
96 | */ | 104 | */ |
97 | typedef void | 105 | typedef void |
98 | (*GST_connection_pool_peer_connect_notify) (void *cls, | 106 | (*GST_connection_pool_peer_connect_notify) (void *cls, |
99 | const struct GNUNET_PeerIdentity | 107 | const struct GNUNET_PeerIdentity *target); |
100 | *target); | ||
101 | 108 | ||
102 | 109 | ||
103 | /** | 110 | /** |