* @return Handle to the cadet service NULL on error.
*/
struct GNUNET_CADET_Handle *
-GNUNET_CADET_connecT (const struct GNUNET_CONFIGURATION_Handle *cfg)
+GNUNET_CADET_connect (const struct GNUNET_CONFIGURATION_Handle *cfg)
{
struct GNUNET_CADET_Handle *h;
LOG (GNUNET_ERROR_TYPE_DEBUG,
- "GNUNET_CADET_connecT()\n");
+ "GNUNET_CADET_connect()\n");
h = GNUNET_new (struct GNUNET_CADET_Handle);
h->cfg = cfg;
h->ports = GNUNET_CONTAINER_multihashmap_create (4,
* @return Port handle.
*/
struct GNUNET_CADET_Port *
-GNUNET_CADET_open_porT (struct GNUNET_CADET_Handle *h,
+GNUNET_CADET_open_port (struct GNUNET_CADET_Handle *h,
const struct GNUNET_HashCode *port,
GNUNET_CADET_ConnectEventHandler connects,
void * connects_cls,
* @return Handle to the channel.
*/
struct GNUNET_CADET_Channel *
-GNUNET_CADET_channel_creatE (struct GNUNET_CADET_Handle *h,
+GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h,
void *channel_cls,
const struct GNUNET_PeerIdentity *destination,
const struct GNUNET_HashCode *port,
struct GNUNET_CADET_Handle *h;
unsigned int i;
- h = GNUNET_CADET_connecT (cfg);
+ h = GNUNET_CADET_connect (cfg);
if (NULL == ctx->ports)
return h;
actx->ports = GNUNET_new_array (ctx->port_count, struct GNUNET_CADET_Port *);
for (i = 0; i < ctx->port_count; i++)
{
- actx->ports[i] = GNUNET_CADET_open_porT (h,
+ actx->ports[i] = GNUNET_CADET_open_port (h,
ctx->ports[i],
ctx->connects,
(void *) (long) actx->peer,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Connecting to CADET service\n");
- mh = GNUNET_CADET_connecT (cfg);
+ mh = GNUNET_CADET_connect (cfg);
GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
NULL);
if (NULL == mh)
GNUNET_CRYPTO_hash (listen_port,
strlen (listen_port),
&porthash);
- lp = GNUNET_CADET_open_porT (mh,
+ lp = GNUNET_CADET_open_port (mh,
&porthash,
&channel_incoming,
NULL,
GNUNET_CRYPTO_hash (target_port,
strlen(target_port),
&porthash);
- ch = GNUNET_CADET_channel_creatE (mh,
+ ch = GNUNET_CADET_channel_create (mh,
NULL,
&pid,
&porthash,
/**
* Method called whenever a peer connects to a port in MQ-based CADET.
*
- * @param cls Closure from #GNUNET_CADET_open_porT (peer # as long).
+ * @param cls Closure from #GNUNET_CADET_open_port (peer # as long).
* @param channel New handle to the channel.
* @param source Peer that started this channel.
* @return Closure for the incoming @a channel. It's given to:
* - The #GNUNET_CADET_DisconnectEventHandler (given to
- * #GNUNET_CADET_open_porT) when the channel dies.
+ * #GNUNET_CADET_open_port) when the channel dies.
* - Each the #GNUNET_MQ_MessageCallback handlers for each message
* received on the @a channel.
*/
}
ch = GNUNET_new (struct CadetTestChannelWrapper);
- outgoing_ch = GNUNET_CADET_channel_creatE (h1,
+ outgoing_ch = GNUNET_CADET_channel_create (h1,
ch,
p_id[1],
&port,
/**
* Method called whenever a peer connects to a port in MQ-based CADET.
*
- * @param cls Closure from #GNUNET_CADET_open_porT.
+ * @param cls Closure from #GNUNET_CADET_open_port.
* @param channel New handle to the channel.
* @param source Peer that started this channel.
* @return Closure for the incoming @a channel. It's given to:
* - The #GNUNET_CADET_DisconnectEventHandler (given to
- * #GNUNET_CADET_open_porT) when the channel dies.
+ * #GNUNET_CADET_open_port) when the channel dies.
* - Each the #GNUNET_MQ_MessageCallback handlers for each message
* received on the @a channel.
*/
GNUNET_TESTING_peer_get_identity (me, &id);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"creating channel\n");
- ch = GNUNET_CADET_channel_creatE (cadet_peer_1, /* cadet handle */
+ ch = GNUNET_CADET_channel_create (cadet_peer_1, /* cadet handle */
NULL, /* channel cls */
&id, /* destination */
GC_u2h (TEST_MESSAGE_TYPE), /* port */
abort_task = GNUNET_SCHEDULER_add_delayed (delay,
&do_abort,
(void *) (long) __LINE__);
- cadet_peer_1 = GNUNET_CADET_connecT (cfg);
- cadet_peer_2 = GNUNET_CADET_connecT (cfg);
+ cadet_peer_1 = GNUNET_CADET_connect (cfg);
+ cadet_peer_2 = GNUNET_CADET_connect (cfg);
if ( (NULL == cadet_peer_1) ||
(NULL == cadet_peer_2) )
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "CADET 1: %p\n", cadet_peer_1);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "CADET 2: %p\n", cadet_peer_2);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "handlers 2: %p\n", handlers);
- GNUNET_CADET_open_porT (cadet_peer_2, /* cadet handle */
+ GNUNET_CADET_open_port (cadet_peer_2, /* cadet handle */
GC_u2h (TEST_PORT_ID), /* port id */
&connected, /* connect handler */
(void *) 2L, /* handle for #connected */
line->channel_tail,
ch);
ch->status = CS_CALLER_CALLING;
- ch->channel = GNUNET_CADET_channel_creatE (cadet,
+ ch->channel = GNUNET_CADET_channel_create (cadet,
ch,
&msg->target,
&msg->line_port,
};
line->line_port = msg->line_port;
- line->port = GNUNET_CADET_open_porT (cadet,
+ line->port = GNUNET_CADET_open_port (cadet,
&msg->line_port,
&inbound_channel,
line,
GNUNET_assert (GNUNET_OK ==
GNUNET_CRYPTO_get_peer_identity (cfg,
&my_identity));
- cadet = GNUNET_CADET_connecT (cfg);
+ cadet = GNUNET_CADET_connect (cfg);
if (NULL == cadet)
{
GNUNET_break (0);
GNUNET_h2s (&cadet_port),
name,
(unsigned int) destination_port);
- service->port = GNUNET_CADET_open_porT (cadet_handle,
+ service->port = GNUNET_CADET_open_port (cadet_handle,
&cadet_port,
&new_service_channel,
service,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Opening CADET port %s for DNS exit service\n",
GNUNET_h2s (&port));
- dns_port = GNUNET_CADET_open_porT (cadet_handle,
+ dns_port = GNUNET_CADET_open_port (cadet_handle,
&port,
&new_channel,
NULL,
NULL);
stats = GNUNET_STATISTICS_create ("exit",
cfg);
- cadet_handle = GNUNET_CADET_connecT (cfg);
+ cadet_handle = GNUNET_CADET_connect (cfg);
if (NULL == cadet_handle)
{
GNUNET_SCHEDULER_shutdown ();
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Opening CADET port %s for IPv4 gateway service\n",
GNUNET_h2s (&port));
- cadet_port4 = GNUNET_CADET_open_porT (cadet_handle,
+ cadet_port4 = GNUNET_CADET_open_port (cadet_handle,
&port,
&new_channel,
NULL,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Opening CADET port %s for IPv6 gateway service\n",
GNUNET_h2s (&port));
- cadet_port6 = GNUNET_CADET_open_porT (cadet_handle,
+ cadet_port6 = GNUNET_CADET_open_port (cadet_handle,
&port,
&new_channel,
NULL,
GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_FS_BLOCK_TRANSFER,
strlen (GNUNET_APPLICATION_PORT_FS_BLOCK_TRANSFER),
&port);
- mh->channel = GNUNET_CADET_channel_creatE (cadet_handle,
+ mh->channel = GNUNET_CADET_channel_create (cadet_handle,
mh,
&mh->target,
&port,
GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_FS_BLOCK_TRANSFER,
strlen (GNUNET_APPLICATION_PORT_FS_BLOCK_TRANSFER),
&port);
- mh->channel = GNUNET_CADET_channel_creatE (cadet_handle,
+ mh->channel = GNUNET_CADET_channel_create (cadet_handle,
mh,
&mh->target,
&port,
"Initializing cadet FS server with a limit of %llu connections\n",
sc_count_max);
cadet_map = GNUNET_CONTAINER_multipeermap_create (16, GNUNET_YES);
- cadet_handle = GNUNET_CADET_connecT (GSF_cfg);
+ cadet_handle = GNUNET_CADET_connect (GSF_cfg);
GNUNET_assert (NULL != cadet_handle);
GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_FS_BLOCK_TRANSFER,
strlen (GNUNET_APPLICATION_PORT_FS_BLOCK_TRANSFER),
&port);
- cadet_port = GNUNET_CADET_open_porT (cadet_handle,
+ cadet_port = GNUNET_CADET_open_port (cadet_handle,
&port,
&connect_cb,
NULL,
/*
This file is part of GNUnet.
- Copyright (C) 2009-2014 GNUnet e.V.
+ Copyright (C) 2009-2017 GNUnet e.V.
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
/**
* Method called whenever a peer connects to a port in MQ-based CADET.
*
- * @param cls Closure from #GNUNET_CADET_open_porT.
+ * @param cls Closure from #GNUNET_CADET_open_port.
* @param channel New handle to the channel.
* @param source Peer that started this channel.
* @return Closure for the incoming @a channel. It's given to:
* - The #GNUNET_CADET_DisconnectEventHandler (given to
- * #GNUNET_CADET_open_porT) when the channel dies.
+ * #GNUNET_CADET_open_port) when the channel dies.
* - Each the #GNUNET_MQ_MessageCallback handlers for each message
* received on the @a channel.
*/
* @return Handle to the cadet service NULL on error.
*/
struct GNUNET_CADET_Handle *
-GNUNET_CADET_connecT (const struct GNUNET_CONFIGURATION_Handle *cfg);
+GNUNET_CADET_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
* @return Port handle.
*/
struct GNUNET_CADET_Port *
-GNUNET_CADET_open_porT (struct GNUNET_CADET_Handle *h,
+GNUNET_CADET_open_port (struct GNUNET_CADET_Handle *h,
const struct GNUNET_HashCode *port,
GNUNET_CADET_ConnectEventHandler connects,
void *connects_cls,
* @return Handle to the channel.
*/
struct GNUNET_CADET_Channel *
-GNUNET_CADET_channel_creatE (struct GNUNET_CADET_Handle *h,
+GNUNET_CADET_channel_create (struct GNUNET_CADET_Handle *h,
void *channel_cls,
const struct GNUNET_PeerIdentity *destination,
const struct GNUNET_HashCode *port,
GNUNET_MQ_handler_end ()
};
- chn->channel = GNUNET_CADET_channel_creatE (cadet, chn, &chn->peer,
+ chn->channel = GNUNET_CADET_channel_create (cadet, chn, &chn->peer,
&grp->cadet_port_hash,
GNUNET_CADET_OPTION_RELIABLE,
cadet_notify_window_change,
};
- orig->cadet_port = GNUNET_CADET_open_porT (cadet,
+ orig->cadet_port = GNUNET_CADET_open_port (cadet,
&grp->cadet_port_hash,
cadet_notify_connect,
NULL,
replay_req_cadet = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_NO);
replay_req_client = GNUNET_CONTAINER_multihashmap_create (1, GNUNET_NO);
- cadet = GNUNET_CADET_connecT (cfg);
+ cadet = GNUNET_CADET_connect (cfg);
GNUNET_assert (NULL != cadet);
/* move to the head of the DLL */
pos->cadet_channel
- = GNUNET_CADET_channel_creatE (cadet_handle,
+ = GNUNET_CADET_channel_create (cadet_handle,
pos,
&pos->peer,
&port,
GNUNET_SCHEDULER_shutdown ();
return;
}
- cadet_handle = GNUNET_CADET_connecT (cfg);
+ cadet_handle = GNUNET_CADET_connect (cfg);
if (NULL == cadet_handle)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
/* Initialise cadet */
- cadet_handle = GNUNET_CADET_connecT (cfg);
+ cadet_handle = GNUNET_CADET_connect (cfg);
GNUNET_assert (NULL != cadet_handle);
GNUNET_CRYPTO_hash (GNUNET_APPLICATION_PORT_RPS,
strlen (GNUNET_APPLICATION_PORT_RPS),
&port);
- cadet_port = GNUNET_CADET_open_porT (cadet_handle,
+ cadet_port = GNUNET_CADET_open_port (cadet_handle,
&port,
&Peers_handle_inbound_channel, /* Connect handler */
NULL, /* cls */
strlen (GNUNET_APPLICATION_PORT_RPS),
&port);
peer_ctx->send_channel =
- GNUNET_CADET_channel_creatE (cadet_handle,
+ GNUNET_CADET_channel_create (cadet_handle,
(struct GNUNET_PeerIdentity *) peer, /* context */
peer,
&port,
"Creating new channel for session with key %s.\n",
GNUNET_h2s (&s->session_id));
s->channel
- = GNUNET_CADET_channel_creatE (my_cadet,
+ = GNUNET_CADET_channel_create (my_cadet,
s,
&s->peer,
&s->session_id,
GNUNET_CRYPTO_ecc_rnd_mpi (edc,
&my_privkey,
&my_privkey_inv);
- my_cadet = GNUNET_CADET_connecT (cfg);
+ my_cadet = GNUNET_CADET_connect (cfg);
if (NULL == my_cadet)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received client request, opening port %s!\n",
GNUNET_h2s (&msg->session_key));
- s->port = GNUNET_CADET_open_porT (my_cadet,
+ s->port = GNUNET_CADET_open_port (my_cadet,
&msg->session_key,
&cb_channel_incoming,
s,
/* We don't really do DLOG, so we can setup with very minimal resources */
edc = GNUNET_CRYPTO_ecc_dlog_prepare (4 /* max value */,
2 /* RAM */);
- my_cadet = GNUNET_CADET_connecT (cfg);
+ my_cadet = GNUNET_CADET_connect (cfg);
GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
NULL);
if (NULL == my_cadet)
"Creating new channel for session with key %s.\n",
GNUNET_h2s (&s->session_id));
s->channel
- = GNUNET_CADET_channel_creatE (my_cadet,
+ = GNUNET_CADET_channel_create (my_cadet,
s,
&s->peer,
&s->session_id,
GNUNET_CRYPTO_PAILLIER_BITS / 3);
GNUNET_CRYPTO_paillier_create (&my_pubkey,
&my_privkey);
- my_cadet = GNUNET_CADET_connecT (cfg);
+ my_cadet = GNUNET_CADET_connect (cfg);
GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
NULL);
if (NULL == my_cadet)
}
GNUNET_SERVICE_client_continue (s->client);
/* We're ready, open the port */
- s->port = GNUNET_CADET_open_porT (my_cadet,
+ s->port = GNUNET_CADET_open_port (my_cadet,
&msg->session_key,
&cb_channel_incoming,
s,
GNUNET_CRYPTO_paillier_create (&my_pubkey,
&my_privkey);
- my_cadet = GNUNET_CADET_connecT (cfg);
+ my_cadet = GNUNET_CADET_connect (cfg);
GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
NULL);
if (NULL == my_cadet)
listener->operation,
GNUNET_h2s (&listener->app_id));
listener->open_port
- = GNUNET_CADET_open_porT (cadet,
+ = GNUNET_CADET_open_port (cadet,
&msg->app_id,
&channel_new_cb,
listener,
"Creating new CADET channel to port %s for set operation type %u\n",
GNUNET_h2s (&msg->app_id),
set->operation);
- op->channel = GNUNET_CADET_channel_creatE (cadet,
+ op->channel = GNUNET_CADET_channel_create (cadet,
op,
&msg->target_peer,
&msg->app_id,
NULL);
_GSS_statistics = GNUNET_STATISTICS_create ("set",
cfg);
- cadet = GNUNET_CADET_connecT (cfg);
+ cadet = GNUNET_CADET_connect (cfg);
if (NULL == cadet)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
GNUNET_MQ_handler_end()
};
- return GNUNET_CADET_channel_creatE (cadet_handle,
+ return GNUNET_CADET_channel_create (cadet_handle,
ts,
target,
port,
}
vpn_argv[6] = NULL;
- cadet_handle = GNUNET_CADET_connecT (cfg_);
+ cadet_handle = GNUNET_CADET_connect (cfg_);
// FIXME never opens ports???
helper_handle = GNUNET_HELPER_start (GNUNET_NO,
"gnunet-helper-vpn", vpn_argv,