GNUnet  0.10.x
gnunet-service-testbed_connectionpool.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2008--2015 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
20 
26 #include "gnunet_ats_service.h"
27 #include "gnunet_core_service.h"
29 
34 
35 
44 
49 
54 };
55 
56 
64 void
65 GST_connection_pool_init(unsigned int size);
66 
67 
71 void
73 
90  void *cls,
91  struct GNUNET_CORE_Handle *ch,
92  struct GNUNET_TRANSPORT_CoreHandle *th,
94  const struct GNUNET_PeerIdentity *peer_id,
95  const struct GNUNET_CONFIGURATION_Handle *cfg);
96 
97 
107  void *cls,
108  const struct GNUNET_PeerIdentity *target);
109 
110 
145  unsigned int peer_id,
146  const struct GNUNET_CONFIGURATION_Handle *cfg,
149  void *cb_cls,
150  const struct GNUNET_PeerIdentity *target,
152  void *connect_notify_cb_cls);
153 
154 
167 void
169 
170 
171 /* End of gnunet-service-testbed_connectionpool.h */
static struct GNUNET_CADET_Channel * ch
Channel handle.
Definition: gnunet-cadet.c:117
GST_connection_pool_peer_connect_notify connect_notify_cb
The callback to be called for serving notification that the target peer is connected.
static struct GNUNET_SERVICE_Handle * service
Handle to our service instance.
void GST_connection_pool_destroy(void)
Cleanup the connection pool.
Context for the core service connection.
Definition: core_api.c:76
void GST_connection_pool_get_handle_done(struct GST_ConnectionPool_GetHandle *gh)
Relinquish a GST_ConnectionPool_GetHandle object.
GST_ConnectionPool_Service
The type of service.
The request handle for obtaining a pooled connection.
const struct GNUNET_PeerIdentity * target
The peer identity of the target peer.
void * connect_notify_cb_cls
The closure for the notify callback.
static char * peer_id
Option –peer.
Definition: gnunet-cadet.c:42
struct GST_ConnectionPool_GetHandle * GST_connection_pool_get_handle(unsigned int peer_id, const struct GNUNET_CONFIGURATION_Handle *cfg, enum GST_ConnectionPool_Service service, GST_connection_pool_connection_ready_cb cb, void *cb_cls, const struct GNUNET_PeerIdentity *target, GST_connection_pool_peer_connect_notify connect_notify_cb, void *connect_notify_cb_cls)
Get a connection handle to service.
void GST_connection_pool_init(unsigned int size)
Initialise the connection pool.
GST_connection_pool_connection_ready_cb cb
The cache callback to call when a handle is available.
void(* GST_connection_pool_peer_connect_notify)(void *cls, const struct GNUNET_PeerIdentity *target)
Callback to notify when the target peer given to GST_connection_pool_get_handle() is connected...
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
static unsigned int size
Size of the "table".
Definition: peer.c:66
static struct GNUNET_MQ_Envelope * ac
Handle to current GNUNET_PEERINFO_add_peer() operation.
void * cb_cls
The closure for the above callback.
The identity of the host (wraps the signing key of the peer).
void(* GST_connection_pool_connection_ready_cb)(void *cls, struct GNUNET_CORE_Handle *ch, struct GNUNET_TRANSPORT_CoreHandle *th, struct GNUNET_ATS_ConnectivityHandle *ac, const struct GNUNET_PeerIdentity *peer_id, const struct GNUNET_CONFIGURATION_Handle *cfg)
Functions of this type are called when the needed handle is available for usage.
configuration data
Definition: configuration.c:83
Automatic transport selection and outbound bandwidth determination.
static struct GNUNET_TRANSPORT_HelloGetHandle * gh
Pending GNUNET_TRANSPORT_hello_get() operation.
Handle for the transport service (includes all of the state for the transport service).
Handle to the ATS subsystem for connectivity management.