LOG (GNUNET_ERROR_TYPE_DEBUG,
" Channel %s destroy, due to client %s shutdown.\n",
- GMCH_2s (ch), GML_2s (c));
+ GCCH_2s (ch), GML_2s (c));
- GMCH_handle_local_destroy (ch, c, key < GNUNET_CADET_LOCAL_CHANNEL_ID_SERV);
+ GCCH_handle_local_destroy (ch, c, key < GNUNET_CADET_LOCAL_CHANNEL_ID_SERV);
return GNUNET_OK;
}
}
if (GNUNET_OK !=
- GMCH_handle_local_create (c,
+ GCCH_handle_local_create (c,
(struct GNUNET_CADET_ChannelMessage *) message))
{
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
return;
}
- GMCH_handle_local_destroy (ch, c, chid < GNUNET_CADET_LOCAL_CHANNEL_ID_SERV);
+ GCCH_handle_local_destroy (ch, c, chid < GNUNET_CADET_LOCAL_CHANNEL_ID_SERV);
GNUNET_SERVER_receive_done (client, GNUNET_OK);
return;
}
if (GNUNET_OK !=
- GMCH_handle_local_data (ch, c,
+ GCCH_handle_local_data (ch, c,
(struct GNUNET_MessageHeader *)&msg[1], fwd))
{
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
/* If client is dest, the ACK is going BCK, therefore this is "FWD ACK" */
fwd = chid >= GNUNET_CADET_LOCAL_CHANNEL_ID_SERV;
- GMCH_handle_local_ack (ch, fwd);
+ GCCH_handle_local_ack (ch, fwd);
GNUNET_SERVER_receive_done (client, GNUNET_OK);
return;
msg.header.size = htons (sizeof (msg));
msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS);
msg.destination = *peer;
- msg.paths = htons (GMP_count_paths (p));
- msg.tunnel = htons (NULL != GMP_get_tunnel (p));
+ msg.paths = htons (GCP_count_paths (p));
+ msg.tunnel = htons (NULL != GCP_get_tunnel (p));
LOG (GNUNET_ERROR_TYPE_DEBUG, "sending info about peer %s\n",
GNUNET_i2s (peer));
"Received get peers request from client %u (%p)\n",
c->id, client);
- GMP_iterate_all (get_all_peers_iterator, client);
+ GCP_iterate_all (get_all_peers_iterator, client);
reply.size = htons (sizeof (reply));
reply.type = htons (GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_PEERS);
GNUNET_SERVER_notification_context_unicast (nc, client, &reply, GNUNET_NO);
void *value)
{
struct GNUNET_SERVER_Client *client = cls;
- struct CadetTunnel3 *t = value;
+ struct CadetTunnel *t = value;
struct GNUNET_CADET_LocalInfoTunnel msg;
msg.header.size = htons (sizeof (msg));
msg.header.type = htons (GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS);
msg.destination = *peer;
- msg.channels = htonl (GMT_count_channels (t));
- msg.connections = htonl (GMT_count_connections (t));
- msg.cstate = htons ((uint16_t) GMT_get_cstate (t));
- msg.estate = htons ((uint16_t) GMT_get_estate (t));
+ msg.channels = htonl (GCT_count_channels (t));
+ msg.connections = htonl (GCT_count_connections (t));
+ msg.cstate = htons ((uint16_t) GCT_get_cstate (t));
+ msg.estate = htons ((uint16_t) GCT_get_estate (t));
LOG (GNUNET_ERROR_TYPE_DEBUG, "sending info about tunnel ->%s\n",
GNUNET_i2s (peer));
"Received get tunnels request from client %u (%p)\n",
c->id, client);
- GMT_iterate_all (get_all_tunnels_iterator, client);
+ GCT_iterate_all (get_all_tunnels_iterator, client);
reply.size = htons (sizeof (reply));
reply.type = htons (GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNELS);
GNUNET_SERVER_notification_context_unicast (nc, client, &reply, GNUNET_NO);
struct GNUNET_CADET_LocalInfoTunnel *msg = cls;
struct GNUNET_CADET_Hash *h = (struct GNUNET_CADET_Hash *) &msg[1];
- h[msg->connections] = *(GMC_get_id (c));
+ h[msg->connections] = *(GCC_get_id (c));
msg->connections++;
}
struct GNUNET_HashCode *h = (struct GNUNET_HashCode *) &msg[1];
CADET_ChannelNumber *chn = (CADET_ChannelNumber *) &h[msg->connections];
- chn[msg->channels] = GMCH_get_id (ch);
+ chn[msg->channels] = GCCH_get_id (ch);
msg->channels++;
}
const struct GNUNET_CADET_LocalInfo *msg;
struct GNUNET_CADET_LocalInfoTunnel *resp;
struct CadetClient *c;
- struct CadetTunnel3 *t;
+ struct CadetTunnel *t;
unsigned int ch_n;
unsigned int c_n;
size_t size;
"Received tunnel info request from client %u for tunnel %s\n",
c->id, GNUNET_i2s_full(&msg->peer));
- t = GMP_get_tunnel (GMP_get (&msg->peer));
+ t = GCP_get_tunnel (GCP_get (&msg->peer));
if (NULL == t)
{
/* We don't know the tunnel */
}
/* Initialize context */
- ch_n = GMT_count_channels (t);
- c_n = GMT_count_connections (t);
+ ch_n = GCT_count_channels (t);
+ c_n = GCT_count_connections (t);
size = sizeof (struct GNUNET_CADET_LocalInfoTunnel);
size += c_n * sizeof (struct GNUNET_CADET_Hash);
resp = GNUNET_malloc (size);
resp->header.type = htons (GNUNET_MESSAGE_TYPE_CADET_LOCAL_INFO_TUNNEL);
resp->header.size = htons (size);
- GMT_iterate_connections (t, &iter_connection, resp);
- GMT_iterate_channels (t, &iter_channel, resp);
+ GCT_iterate_connections (t, &iter_connection, resp);
+ GCT_iterate_channels (t, &iter_channel, resp);
/* Do not interleave with iterators, iter_channel needs conn in HBO */
resp->destination = msg->peer;
resp->connections = htonl (resp->connections);
resp->channels = htonl (resp->channels);
- resp->cstate = htons (GMT_get_cstate (t));
- resp->estate = htons (GMT_get_estate (t));
+ resp->cstate = htons (GCT_get_cstate (t));
+ resp->estate = htons (GCT_get_estate (t));
GNUNET_SERVER_notification_context_unicast (nc, c->handle,
&resp->header, GNUNET_NO);
GNUNET_free (resp);