summaryrefslogtreecommitdiff
path: root/src/cadet
diff options
context:
space:
mode:
Diffstat (limited to 'src/cadet')
-rw-r--r--src/cadet/.gitignore1
-rw-r--r--src/cadet/cadet.h1
-rw-r--r--src/cadet/cadet_api.c24
-rw-r--r--src/cadet/cadet_api_drop_message.c2
-rw-r--r--src/cadet/cadet_api_get_path.c9
-rw-r--r--src/cadet/cadet_api_list_tunnels.c2
-rw-r--r--src/cadet/desirability_table.c1
-rw-r--r--src/cadet/gnunet-cadet-profiler.c4
-rw-r--r--src/cadet/gnunet-service-cadet.c10
-rw-r--r--src/cadet/gnunet-service-cadet_channel.c70
-rw-r--r--src/cadet/gnunet-service-cadet_channel.h14
-rw-r--r--src/cadet/gnunet-service-cadet_connection.c33
-rw-r--r--src/cadet/gnunet-service-cadet_connection.h6
-rw-r--r--src/cadet/gnunet-service-cadet_core.c19
-rw-r--r--src/cadet/gnunet-service-cadet_dht.c26
-rw-r--r--src/cadet/gnunet-service-cadet_hello.c2
-rw-r--r--src/cadet/gnunet-service-cadet_paths.c14
-rw-r--r--src/cadet/gnunet-service-cadet_paths.h3
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c53
-rw-r--r--src/cadet/gnunet-service-cadet_peer.h8
-rw-r--r--src/cadet/gnunet-service-cadet_tunnels.c68
-rw-r--r--src/cadet/gnunet-service-cadet_tunnels.h21
-rw-r--r--src/cadet/test_cadet.c2
-rw-r--r--src/cadet/test_cadet_flow.c2
24 files changed, 61 insertions, 334 deletions
diff --git a/src/cadet/.gitignore b/src/cadet/.gitignore
index b556fa4c8..e72d81bd8 100644
--- a/src/cadet/.gitignore
+++ b/src/cadet/.gitignore
@@ -24,3 +24,4 @@ test_cadet_local_mq
test_cadet_*_newtest_cadet_2_reopen
test_cadet_5_reopen
test_cadet_2_reopen
+test_cadet_2_destroy
diff --git a/src/cadet/cadet.h b/src/cadet/cadet.h
index 31dad4117..e8caa7d35 100644
--- a/src/cadet/cadet.h
+++ b/src/cadet/cadet.h
@@ -55,7 +55,6 @@ extern "C" {
#include "platform.h"
#include "gnunet_util_lib.h"
-#include "gnunet_peer_lib.h"
#include "gnunet_core_service.h"
#include "gnunet_cadet_service.h"
#include "gnunet_protocols.h"
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index c9f0722d5..0bfb01868 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -198,7 +198,6 @@ create_channel (struct GNUNET_CADET_Handle *h,
* - Frees all memory used
*
* @param ch Pointer to the channel.
- * @param call_cleaner Whether to call the cleaner handler.
*/
static void
destroy_channel (struct GNUNET_CADET_Channel *ch)
@@ -461,7 +460,7 @@ cadet_mq_cancel_impl (struct GNUNET_MQ_Handle *mq, void *impl_state)
/**
* Process the new channel notification and add it to the channels in the handle
*
- * @param h The cadet handle
+ * @param cls The cadet handle
* @param msg A message with the details of the new incoming channel
*/
static void
@@ -529,7 +528,7 @@ handle_channel_created (
/**
* Process the channel destroy notification and free associated resources
*
- * @param h The cadet handle
+ * @param cls The cadet handle
* @param msg A message with the details of the channel being destroyed
*/
static void
@@ -582,7 +581,7 @@ check_local_data (void *cls, const struct GNUNET_CADET_LocalData *message)
/**
* Process the incoming data packets, call appropriate handlers.
*
- * @param h The cadet handle
+ * @param cls The cadet handle
* @param message A message encapsulating the data
*/
static void
@@ -620,7 +619,7 @@ handle_local_data (void *cls, const struct GNUNET_CADET_LocalData *message)
* Process a local ACK message, enabling the client to send
* more data to the service.
*
- * @param h Cadet handle.
+ * @param cls Cadet handle.
* @param message Message itself.
*/
static void
@@ -798,12 +797,6 @@ GNUNET_CADET_disconnect (struct GNUNET_CADET_Handle *handle)
}
-/**
- * Close a port opened with @a GNUNET_CADET_open_port().
- * The @a new_channel callback will no longer be called.
- *
- * @param p Port handle.
- */
void
GNUNET_CADET_close_port (struct GNUNET_CADET_Port *p)
{
@@ -853,15 +846,6 @@ GNUNET_CADET_channel_destroy (struct GNUNET_CADET_Channel *channel)
}
-/**
- * Get information about a channel.
- *
- * @param channel Channel handle.
- * @param option Query (GNUNET_CADET_OPTION_*).
- * @param ... dependent on option, currently not used
- *
- * @return Union with an answer to the query.
- */
const union GNUNET_CADET_ChannelInfo *
GNUNET_CADET_channel_get_info (struct GNUNET_CADET_Channel *channel,
enum GNUNET_CADET_ChannelInfoOption option,
diff --git a/src/cadet/cadet_api_drop_message.c b/src/cadet/cadet_api_drop_message.c
index 2b031b5c0..e172418c4 100644
--- a/src/cadet/cadet_api_drop_message.c
+++ b/src/cadet/cadet_api_drop_message.c
@@ -27,7 +27,7 @@
/**
- * Drop the next cadet message of a given type..
+ * Drop the next cadet message of a given type.
*
* @param mq message queue
* @param ccn client channel number.
diff --git a/src/cadet/cadet_api_get_path.c b/src/cadet/cadet_api_get_path.c
index 68070eab2..f32a5e20b 100644
--- a/src/cadet/cadet_api_get_path.c
+++ b/src/cadet/cadet_api_get_path.c
@@ -216,15 +216,6 @@ reconnect (void *cls)
}
-/**
- * Request information about paths known to the running cadet peer.
- *
- * @param cfg configuration to use
- * @param id Peer whose paths to examine.
- * @param callback Function to call with the requested data.
- * @param callback_cls Closure for @c callback.
- * @return NULL on error
- */
struct GNUNET_CADET_GetPath *
GNUNET_CADET_get_path (const struct GNUNET_CONFIGURATION_Handle *cfg,
const struct GNUNET_PeerIdentity *id,
diff --git a/src/cadet/cadet_api_list_tunnels.c b/src/cadet/cadet_api_list_tunnels.c
index e9ae069bb..dce12835f 100644
--- a/src/cadet/cadet_api_list_tunnels.c
+++ b/src/cadet/cadet_api_list_tunnels.c
@@ -95,7 +95,7 @@ handle_get_tunnels (void *cls,
* Process a local reply about info on all tunnels, pass info to the user.
*
* @param cls a `struct GNUNET_CADET_ListTunnels *`
- * @param message Message itself.
+ * @param msg Message itself.
*/
static void
handle_get_tunnels_end (void *cls,
diff --git a/src/cadet/desirability_table.c b/src/cadet/desirability_table.c
index 829c618af..b4db7c2dd 100644
--- a/src/cadet/desirability_table.c
+++ b/src/cadet/desirability_table.c
@@ -5,6 +5,7 @@
* for various plausible inputs.
* @author Christian Grothoff
*/
+#include "platform.h"
#include <stdio.h>
int
diff --git a/src/cadet/gnunet-cadet-profiler.c b/src/cadet/gnunet-cadet-profiler.c
index e61053f94..22cbe55dc 100644
--- a/src/cadet/gnunet-cadet-profiler.c
+++ b/src/cadet/gnunet-cadet-profiler.c
@@ -22,8 +22,8 @@
*
* @brief Profiler for cadet experiments.
*/
-#include <stdio.h>
#include "platform.h"
+#include <stdio.h>
#include "cadet_test_lib.h"
#include "gnunet_cadet_service.h"
#include "gnunet_statistics_service.h"
@@ -659,8 +659,6 @@ ping (void *cls)
/**
* @brief Reply with a pong to origin.
*
- * @param cls Closure (peer).
- * @param tc Task context.
*/
static void
pong (struct GNUNET_CADET_Channel *channel,
diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c
index 73e463e9b..07b580005 100644
--- a/src/cadet/gnunet-service-cadet.c
+++ b/src/cadet/gnunet-service-cadet.c
@@ -442,7 +442,7 @@ shutdown_task (void *cls)
* client @a cls opened port @a port. Bind them now.
*
* @param cls the `struct CadetClient`
- * @param h_port the hashed port
+ * @param port the hashed port
* @param value the `struct CadetChannel`
* @return #GNUNET_YES (iterate over all such channels)
*/
@@ -1097,13 +1097,6 @@ GSC_handle_remote_channel_destroy (struct CadetClient *c,
}
-/**
- * A client that created a loose channel that was not bound to a port
- * disconnected, drop it from the #loose_channels list.
- *
- * @param h_port the hashed port the channel was trying to bind to
- * @param ch the channel that was lost
- */
void
GSC_drop_loose_channel (const struct GNUNET_HashCode *h_port,
struct CadetChannel *ch)
@@ -1233,7 +1226,6 @@ client_disconnect_cb (void *cls,
* Setup CADET internals.
*
* @param cls closure
- * @param server the initialized server
* @param c configuration to use
*/
static void
diff --git a/src/cadet/gnunet-service-cadet_channel.c b/src/cadet/gnunet-service-cadet_channel.c
index 9a2180cc1..78658c296 100644
--- a/src/cadet/gnunet-service-cadet_channel.c
+++ b/src/cadet/gnunet-service-cadet_channel.c
@@ -388,11 +388,6 @@ struct CadetChannel
};
-/**
- * Assign type of message to drop.
- * @param ch CadetChannel to assign type to drop.
- * @param message GNUNET_CADET_RequestDropCadetMessage to get the type from.
- */
void
GCCH_assign_type_to_drop (struct CadetChannel *ch, const struct
GNUNET_CADET_RequestDropCadetMessage *message)
@@ -660,16 +655,6 @@ GCCH_tunnel_up (struct CadetChannel *ch)
}
-/**
- * Create a new channel.
- *
- * @param owner local client owning the channel
- * @param ccn local number of this channel at the @a owner
- * @param destination peer to which we should build the channel
- * @param port desired port at @a destination
- * @param options options for the channel
- * @return handle to the new channel
- */
struct CadetChannel *
GCCH_channel_local_new (struct CadetClient *owner,
struct GNUNET_CADET_ClientChannelNumber ccn,
@@ -756,15 +741,6 @@ timeout_closed_cb (void *cls)
}
-/**
- * Create a new channel based on a request coming in over the network.
- *
- * @param t tunnel to the remote peer
- * @param ctn identifier of this channel in the tunnel
- * @param h_port desired hash of local port
- * @param options options for the channel
- * @return handle to the new channel
- */
struct CadetChannel *
GCCH_channel_incoming_new (struct CadetTunnel *t,
struct GNUNET_CADET_ChannelTunnelNumber ctn,
@@ -960,15 +936,6 @@ send_ack_to_client (struct CadetChannel *ch, int to_owner)
}
-/**
- * A client is bound to the port that we have a channel
- * open to. Send the acknowledgement for the connection
- * request and establish the link with the client.
- *
- * @param ch open incoming channel
- * @param c client listening on the respective @a port
- * @param port the port @a is listening on
- */
void
GCCH_bind (struct CadetChannel *ch,
struct CadetClient *c,
@@ -1126,15 +1093,6 @@ GCCH_channel_local_destroy (struct CadetChannel *ch,
}
-/**
- * We got an acknowledgement for the creation of the channel
- * (the port is open on the other side). Verify that the
- * other end really has the right port, and begin transmissions.
- *
- * @param ch channel to destroy
- * @param cti identifier of the connection that delivered the message
- * @param port port number (needed to verify receiver knows the port)
- */
void
GCCH_handle_channel_open_ack (
struct CadetChannel *ch,
@@ -1199,7 +1157,7 @@ GCCH_handle_channel_open_ack (
* @param cls closure, to a flag where we indicate duplicate packets
* @param m1 a message of to sort
* @param m2 another message to sort
- * @return #GNUNET_YES if @e1 < @e2, otherwise #GNUNET_NO
+ * @return #GNUNET_YES if @a e1 < @a e2, otherwise #GNUNET_NO
*/
static int
is_before (void *cls,
@@ -1227,14 +1185,6 @@ is_before (void *cls,
}
-/**
- * We got payload data for a channel. Pass it on to the client
- * and send an ACK to the other end (once flow control allows it!)
- *
- * @param ch channel that got data
- * @param cti identifier of the connection that delivered the message
- * @param msg message that was received
- */
void
GCCH_handle_channel_plaintext_data (
struct CadetChannel *ch,
@@ -1657,15 +1607,6 @@ GCCH_handle_channel_plaintext_data_ack (
}
-/**
- * Destroy channel, based on the other peer closing the
- * connection. Also needs to remove this channel from
- * the tunnel.
- *
- * @param ch channel to destroy
- * @param cti identifier of the connection that delivered the message,
- * NULL if we are simulating receiving a destroy due to shutdown
- */
void
GCCH_handle_remote_destroy (
struct CadetChannel *ch,
@@ -1704,7 +1645,7 @@ GCCH_handle_remote_destroy (
* @param cls closure, to a flag where we indicate duplicate packets
* @param crm1 an element of to sort
* @param crm2 another element to sort
- * @return #GNUNET_YES if @e1 < @e2, otherwise #GNUNET_NO
+ * @return #GNUNET_YES if @a e1 < @a e2, otherwise #GNUNET_NO
*/
static int
cmp_crm_by_next_retry (void *cls,
@@ -1916,13 +1857,6 @@ GCCH_handle_local_data (struct CadetChannel *ch,
}
-/**
- * Handle ACK from client on local channel. Means the client is ready
- * for more data, see if we have any for it.
- *
- * @param ch channel to destroy
- * @param client_ccn ccn of the client sending the ack
- */
void
GCCH_handle_local_ack (struct CadetChannel *ch,
struct GNUNET_CADET_ClientChannelNumber client_ccn)
diff --git a/src/cadet/gnunet-service-cadet_channel.h b/src/cadet/gnunet-service-cadet_channel.h
index 6d691cafc..b09de883f 100644
--- a/src/cadet/gnunet-service-cadet_channel.h
+++ b/src/cadet/gnunet-service-cadet_channel.h
@@ -67,7 +67,7 @@ GCCH_is_type_to_drop (struct CadetChannel *ch, const struct
GNUNET_MessageHeader *message);
/**
- * Check if type of message is the one to drop.
+ * Assign type of message to drop.
* @param ch CadetChannel to assign type to drop.
* @param message GNUNET_CADET_RequestDropCadetMessage to get the type from.
*/
@@ -174,7 +174,6 @@ GCCH_tunnel_up (struct CadetChannel *ch);
*
* @param t tunnel to the remote peer
* @param chid identifier of this channel in the tunnel
- * @param origin peer to who initiated the channel
* @param h_port hash of desired local port
* @param options options for the channel
* @return handle to the new channel
@@ -201,7 +200,8 @@ GCCH_handle_duplicate_open (struct CadetChannel *ch,
/**
- * We got payload data for a channel. Pass it on to the client.
+ * We got payload data for a channel. Pass it on to the client
+ * and send an ACK to the other end (once flow control allows it!)
*
* @param ch channel that got data
* @param cti identifier of the connection that delivered the message
@@ -234,7 +234,8 @@ GCCH_handle_channel_plaintext_data_ack (struct CadetChannel *ch,
/**
* We got an acknowledgement for the creation of the channel
- * (the port is open on the other side). Begin transmissions.
+ * (the port is open on the other side). Verify that the
+ * other end really has the right port, and begin transmissions.
*
* @param ch channel to destroy
* @param cti identifier of the connection that delivered the message,
@@ -262,7 +263,7 @@ GCCH_handle_channel_open_ack (struct CadetChannel *ch,
*
* @param ch channel to destroy
* @param cti identifier of the connection that delivered the message,
- * NULL during shutdown
+ * NULL if we are simulating receiving a destroy due to shutdown
*/
void
GCCH_handle_remote_destroy (struct CadetChannel *ch,
@@ -292,7 +293,8 @@ GCCH_handle_local_data (struct CadetChannel *ch,
/**
- * Handle ACK from client on local channel.
+ * Handle ACK from client on local channel. Means the client is ready
+ * for more data, see if we have any for it.
*
* @param ch channel to destroy
* @param client_ccn ccn of the client sending the ack
diff --git a/src/cadet/gnunet-service-cadet_connection.c b/src/cadet/gnunet-service-cadet_connection.c
index 637e8663b..f01c1388e 100644
--- a/src/cadet/gnunet-service-cadet_connection.c
+++ b/src/cadet/gnunet-service-cadet_connection.c
@@ -431,9 +431,9 @@ GCC_ack_expected (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid)
/**
* We observed an ACK for a message that was originally sent via
- * the connection identified by @a cti.
+ * the connection identified by @a cid.
*
- * @param cti connection identifier where we got an ACK for a message
+ * @param cid connection identifier where we got an ACK for a message
* that was originally sent via this connection (the ACK
* may have gotten back to us via a different connection).
*/
@@ -449,14 +449,6 @@ GCC_ack_observed (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid)
}
-/**
- * We observed some the given @a latency on the connection
- * identified by @a cti. (The same connection was taken
- * in both directions.)
- *
- * @param cid connection identifier where we measured latency
- * @param latency the observed latency
- */
void
GCC_latency_observed (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid,
struct GNUNET_TIME_Relative latency)
@@ -484,13 +476,6 @@ GCC_latency_observed (const struct GNUNET_CADET_ConnectionTunnelIdentifier *cid,
}
-/**
- * A #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK was received for
- * this connection, implying that the end-to-end connection is up.
- * Process it.
- *
- * @param cc the connection that got the ACK.
- */
void
GCC_handle_connection_create_ack (struct CadetConnection *cc)
{
@@ -943,18 +928,6 @@ GCC_create_inbound (struct CadetPeer *destination,
}
-/**
- * Create a connection to @a destination via @a path and
- * notify @a cb whenever we are ready for more data.
- *
- * @param destination where to go
- * @param path which path to take (may not be the full path)
- * @param off offset of @a destination on @a path
- * @param ct tunnel that uses the connection
- * @param ready_cb function to call when ready to transmit
- * @param ready_cb_cls closure for @a cb
- * @return handle to the connection
- */
struct CadetConnection *
GCC_create (struct CadetPeer *destination,
struct CadetPeerPath *path,
@@ -1010,7 +983,7 @@ GCC_transmit (struct CadetConnection *cc, struct GNUNET_MQ_Envelope *env)
* Obtain the path used by this connection.
*
* @param cc connection
- * @param off[out] set to the length of the path we use
+ * @param[out] off set to the length of the path we use
* @return path to @a cc
*/
struct CadetPeerPath *
diff --git a/src/cadet/gnunet-service-cadet_connection.h b/src/cadet/gnunet-service-cadet_connection.h
index d646b3dc2..54c845b13 100644
--- a/src/cadet/gnunet-service-cadet_connection.h
+++ b/src/cadet/gnunet-service-cadet_connection.h
@@ -142,7 +142,9 @@ GCC_transmit (struct CadetConnection *cc,
/**
- * A CREATE_ACK was received for this connection, process it.
+ * A #GNUNET_MESSAGE_TYPE_CADET_CONNECTION_CREATE_ACK was received for
+ * this connection, implying that the end-to-end connection is up.
+ * Process it.
*
* @param cc the connection that got the ACK.
*/
@@ -320,7 +322,7 @@ GCC_get_ct (struct CadetConnection *cc);
* Obtain the path used by this connection.
*
* @param cc connection
- * @param off[out] set to offset in this path where the connection @a cc ends
+ * @param[out] off set to offset in this path where the connection @a cc ends
* @return path to @a cc
*/
struct CadetPeerPath *
diff --git a/src/cadet/gnunet-service-cadet_core.c b/src/cadet/gnunet-service-cadet_core.c
index 95a5d3f63..68f7405c3 100644
--- a/src/cadet/gnunet-service-cadet_core.c
+++ b/src/cadet/gnunet-service-cadet_core.c
@@ -139,14 +139,6 @@ struct RouteDirection
};
-/**
- * Description of a segment of a `struct CadetConnection` at the
- * intermediate peers. Routes are basically entries in a peer's
- * routing table for forwarding traffic. At both endpoints, the
- * routes are terminated by a `struct CadetConnection`, which knows
- * the complete `struct CadetPath` that is formed by the individual
- * routes.
- */
struct CadetRoute
{
/**
@@ -620,10 +612,10 @@ timeout_cb (void *cls)
* later if the connection ever goes down.
*
* @param cls the `struct RouteDirection`
- * @param available #GNUNET_YES if sending is now possible,
- * #GNUNET_NO if sending is no longer possible
- * #GNUNET_SYSERR if sending is no longer possible
- * and the last envelope was discarded
+ * @param ready #GNUNET_YES if sending is now possible,
+ * #GNUNET_NO if sending is no longer possible
+ * #GNUNET_SYSERR if sending is no longer possible
+ * and the last envelope was discarded
*/
static void
dir_ready_cb (void *cls, int ready)
@@ -1321,9 +1313,6 @@ GCO_init (const struct GNUNET_CONFIGURATION_Handle *c)
}
-/**
- * Shut down the CORE subsystem.
- */
void
GCO_shutdown ()
{
diff --git a/src/cadet/gnunet-service-cadet_dht.c b/src/cadet/gnunet-service-cadet_dht.c
index 3df2687de..82ba326b4 100644
--- a/src/cadet/gnunet-service-cadet_dht.c
+++ b/src/cadet/gnunet-service-cadet_dht.c
@@ -55,9 +55,6 @@
#define LOG(level, ...) GNUNET_log_from (level, "cadet-dht", __VA_ARGS__)
-/**
- * Handle for DHT searches.
- */
struct GCD_search_handle
{
/**
@@ -215,10 +212,6 @@ announce_id (void *cls)
}
-/**
- * Function called by the HELLO subsystem whenever OUR hello
- * changes. Re-triggers the DHT PUT immediately.
- */
void
GCD_hello_update ()
{
@@ -232,11 +225,6 @@ GCD_hello_update ()
}
-/**
- * Initialize the DHT subsystem.
- *
- * @param c Configuration.
- */
void
GCD_init (const struct GNUNET_CONFIGURATION_Handle *c)
{
@@ -277,9 +265,6 @@ GCD_init (const struct GNUNET_CONFIGURATION_Handle *c)
}
-/**
- * Shut down the DHT subsystem.
- */
void
GCD_shutdown (void)
{
@@ -296,12 +281,6 @@ GCD_shutdown (void)
}
-/**
- * Search DHT for paths to @a peeR_id
- *
- * @param peer_id peer to search for
- * @return handle to abort search
- */
struct GCD_search_handle *
GCD_search (const struct GNUNET_PeerIdentity *peer_id)
{
@@ -338,11 +317,6 @@ GCD_search (const struct GNUNET_PeerIdentity *peer_id)
}
-/**
- * Stop DHT search started with #GCD_search().
- *
- * @param h handle to search to stop
- */
void
GCD_search_stop (struct GCD_search_handle *h)
{
diff --git a/src/cadet/gnunet-service-cadet_hello.c b/src/cadet/gnunet-service-cadet_hello.c
index c7857032b..e1850d60a 100644
--- a/src/cadet/gnunet-service-cadet_hello.c
+++ b/src/cadet/gnunet-service-cadet_hello.c
@@ -57,7 +57,7 @@ static struct GNUNET_PEERINFO_NotifyContext *nc;
* Process each hello message received from peerinfo.
*
* @param cls Closure (unused).
- * @param peer Identity of the peer.
+ * @param id Identity of the peer.
* @param hello Hello of the peer.
* @param err_msg Error message.
*/
diff --git a/src/cadet/gnunet-service-cadet_paths.c b/src/cadet/gnunet-service-cadet_paths.c
index aa31aaa74..83b996e05 100644
--- a/src/cadet/gnunet-service-cadet_paths.c
+++ b/src/cadet/gnunet-service-cadet_paths.c
@@ -594,13 +594,6 @@ GCPP_try_path_from_dht (const struct GNUNET_DHT_PathElement *get_path,
}
-/**
- * We got an incoming connection, obtain the corresponding path.
- *
- * @param path_length number of segments on the @a path
- * @param pids path through the network, in reverse order (we are at the end at index @a path_length)
- * @return corresponding path object
- */
struct CadetPeerPath *
GCPP_get_path_from_route (unsigned int path_length,
const struct GNUNET_PeerIdentity *pids)
@@ -723,13 +716,6 @@ GCPP_find_peer (struct CadetPeerPath *path,
}
-/**
- * Obtain the peer at offset @a off in @a path.
- *
- * @param path peer path to inspect
- * @param off offset to return, must be smaller than path length
- * @return the peer at offset @a off
- */
struct CadetPeer *
GCPP_get_peer_at_offset (struct CadetPeerPath *path,
unsigned int off)
diff --git a/src/cadet/gnunet-service-cadet_paths.h b/src/cadet/gnunet-service-cadet_paths.h
index afd193596..0f3b4dd1a 100644
--- a/src/cadet/gnunet-service-cadet_paths.h
+++ b/src/cadet/gnunet-service-cadet_paths.h
@@ -53,7 +53,8 @@ GCPP_try_path_from_dht (const struct GNUNET_DHT_PathElement *get_path,
* We got an incoming connection, obtain the corresponding path.
*
* @param path_length number of segments on the @a path
- * @param path through the network, in reverse order (we are at the end!)
+ * @param pids path through the network, in reverse order
+ * (we are at the end, at index @a path_length)
* @return corresponding path object
*/
struct CadetPeerPath *
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index 2437a3e1b..f2b508ae0 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -211,7 +211,7 @@ struct CadetPeer
/**
* Sum over all of the offsets of all of the paths in the @a path_heads DLLs.
- * Used to speed-up @GCP_get_desirability_of_path() calculation.
+ * Used to speed-up #GCP_get_desirability_of_path() calculation.
*/
unsigned int off_sum;
@@ -225,19 +225,13 @@ struct CadetPeer
unsigned int mqm_ready_counter;
/**
- * Current length of the @e path_heads and @path_tails arrays.
+ * Current length of the @e path_heads and @e path_tails arrays.
* The arrays should be grown as needed.
*/
unsigned int path_dll_length;
};
-/**
- * Get the static string for a peer ID.
- *
- * @param cp Peer.
- * @return Static string for it's ID.
- */
const char *
GCP_2s (const struct CadetPeer *cp)
{
@@ -260,21 +254,6 @@ GCP_2s (const struct CadetPeer *cp)
}
-/**
- * Calculate how desirable a path is for @a cp if @a cp
- * is at offset @a off.
- *
- * The 'desirability_table.c' program can be used to compute a list of
- * sample outputs for different scenarios. Basically, we score paths
- * lower if there are many alternatives, and higher if they are
- * shorter than average, and very high if they are much shorter than
- * average and without many alternatives.
- *
- * @param cp a peer reachable via a path
- * @param off offset of @a cp in the path
- * @return score how useful a path is to reach @a cp,
- * positive scores mean path is more desirable
- */
double
GCP_get_desirability_of_path (struct CadetPeer *cp,
unsigned int off)
@@ -965,17 +944,6 @@ path_heap_cleanup (void *cls)
}
-/**
- * Try adding a @a path to this @a peer. If the peer already
- * has plenty of paths, return NULL.
- *
- * @param cp peer to which the @a path leads to
- * @param path a path looking for an owner; may not be fully initialized yet!
- * @param off offset of @a cp in @a path
- * @param force force attaching the path
- * @return NULL if this peer does not care to become a new owner,
- * otherwise the node in the peer's path heap for the @a path.
- */
struct GNUNET_CONTAINER_HeapNode *
GCP_attach_path (struct CadetPeer *cp,
struct CadetPeerPath *path,
@@ -1287,16 +1255,6 @@ GCP_iterate_indirect_paths (struct CadetPeer *cp,
}
-/**
- * Iterate over the paths to @a cp where
- * @a cp is at distance @a dist from us.
- *
- * @param cp Peer to get path info.
- * @param dist desired distance of @a cp to us on the path
- * @param callback Function to call for every path.
- * @param callback_cls Closure for @a callback.
- * @return Number of iterated paths.
- */
unsigned int
GCP_iterate_paths_at (struct CadetPeer *cp,
unsigned int dist,
@@ -1365,13 +1323,6 @@ hello_offer_done (void *cls)
}
-/**
- * We got a HELLO for a @a peer, remember it, and possibly
- * trigger adequate actions (like trying to connect).
- *
- * @param cp the peer we got a HELLO for
- * @param hello the HELLO to remember
- */
void
GCP_set_hello (struct CadetPeer *cp,
const struct GNUNET_HELLO_Message *hello)
diff --git a/src/cadet/gnunet-service-cadet_peer.h b/src/cadet/gnunet-service-cadet_peer.h
index 7a39615ff..69436d766 100644
--- a/src/cadet/gnunet-service-cadet_peer.h
+++ b/src/cadet/gnunet-service-cadet_peer.h
@@ -62,6 +62,12 @@ GCP_get (const struct GNUNET_PeerIdentity *peer_id,
* Calculate how desirable a path is for @a cp if
* @a cp is at offset @a off in the path.
*
+ * The 'desirability_table.c' program can be used to compute a list of
+ * sample outputs for different scenarios. Basically, we score paths
+ * lower if there are many alternatives, and higher if they are
+ * shorter than average, and very high if they are much shorter than
+ * average and without many alternatives.
+ *
* @param cp a peer reachable via a path
* @param off offset of @a cp in a path
* @return score how useful a path is to reach @a cp,
@@ -229,7 +235,7 @@ GCP_drop_tunnel (struct CadetPeer *cp,
* @param cp peer to which the @a path leads to
* @param path a path looking for an owner; may not be fully initialized yet!
* @param off offset of @a cp in @a path
- * @param force for attaching the path
+ * @param force force attaching the path
* @return NULL if this peer does not care to become a new owner,
* otherwise the node in the peer's path heap for the @a path.
*/
diff --git a/src/cadet/gnunet-service-cadet_tunnels.c b/src/cadet/gnunet-service-cadet_tunnels.c
index cabbeed0c..c7e422926 100644
--- a/src/cadet/gnunet-service-cadet_tunnels.c
+++ b/src/cadet/gnunet-service-cadet_tunnels.c
@@ -169,7 +169,7 @@ struct CadetTunnelAxolotl
* 32-byte chain keys (used for forward-secrecy) for
* receiving messages. Updated for every message. If
* messages are skipped, the respective derived MKs
- * (and the current @HKr) are kept in the @e skipped_head DLL.
+ * (and the current @e HKr) are kept in the @e skipped_head DLL.
*/
struct GNUNET_CRYPTO_SymmetricSessionKey CKr;
@@ -576,13 +576,6 @@ GCT_get_destination (struct CadetTunnel *t)
}
-/**
- * Count channels of a tunnel.
- *
- * @param t Tunnel on which to count.
- *
- * @return Number of channels.
- */
unsigned int
GCT_count_channels (struct CadetTunnel *t)
{
@@ -606,13 +599,6 @@ lookup_channel (struct CadetTunnel *t,
}
-/**
- * Count all created connections of a tunnel. Not necessarily ready connections!
- *
- * @param t Tunnel on which to count.
- *
- * @return Number of connections created, either being established or ready.
- */
unsigned int
GCT_count_any_connections (const struct CadetTunnel *t)
{
@@ -688,7 +674,7 @@ new_ephemeral (struct CadetTunnelAxolotl *ax)
* @param size Size of @c plaintext.
* @param iv Initialization vector for the message.
* @param key Key to use.
- * @param hmac[out] Destination to store the HMAC.
+ * @param[out] hmac Destination to store the HMAC.
*/
static void
t_hmac (const void *plaintext,
@@ -904,7 +890,7 @@ t_ax_decrypt (struct CadetTunnelAxolotl *ax,
* Encrypt header with the axolotl header key.
*
* @param ax key material to use.
- * @param[in|out] msg Message whose header to encrypt.
+ * @param[in,out] msg Message whose header to encrypt.
*/
static void
t_h_encrypt (struct CadetTunnelAxolotl *ax,
@@ -1502,7 +1488,7 @@ cleanup_ax (struct CadetTunnelAxolotl *ax)
* Computes the new chain keys, and root keys, etc, and also checks
* whether this is a replay of the current chain.
*
- * @param[in|out] axolotl chain key state to recompute
+ * @param[in,out] ax chain key state to recompute
* @param pid peer identity of the other peer
* @param ephemeral_key ephemeral public key of the other peer
* @param ratchet_key senders next ephemeral public key
@@ -1706,14 +1692,6 @@ retry_kx (void *cls)
}
-/**
- * Handle KX message that lacks authentication (and which will thus
- * only be considered authenticated after we respond with our own
- * KX_AUTH and finally successfully decrypt payload).
- *
- * @param ct connection/tunnel combo that received encrypted message
- * @param msg the key exchange message
- */
void
GCT_handle_kx (struct CadetTConnection *ct,
const struct GNUNET_CADET_TunnelKeyExchangeMessage *msg)
@@ -2839,14 +2817,6 @@ maintain_connections_cb (void *cls)
}
-/**
- * Consider using the path @a p for the tunnel @a t.
- * The tunnel destination is at offset @a off in path @a p.
- *
- * @param cls our tunnel
- * @param path a path to our destination
- * @param off offset of the destination on path @a path
- */
void
GCT_consider_path (struct CadetTunnel *t,
struct CadetPeerPath *p,
@@ -3216,16 +3186,6 @@ GCT_create_tunnel (struct CadetPeer *destination)
}
-/**
- * Add a @a connection to the @a tunnel.
- *
- * @param t a tunnel
- * @param cid connection identifier to use for the connection
- * @param options options for the connection
- * @param path path to use for the connection
- * @return #GNUNET_OK on success,
- * #GNUNET_SYSERR on failure (duplicate connection)
- */
int
GCT_add_inbound_connection (struct CadetTunnel *t,
const struct
@@ -3449,17 +3409,6 @@ GCT_handle_encrypted (struct CadetTConnection *ct,
}
-/**
- * Sends an already built message on a tunnel, encrypting it and
- * choosing the best connection if not provided.
- *
- * @param message Message to send. Function modifies it.
- * @param t Tunnel on which this message is transmitted.
- * @param cont Continuation to call once message is really sent.
- * @param cont_cls Closure for @c cont.
- * @param The ID of the channel we are using for sending.
- * @return Handle to cancel message
- */
struct CadetTunnelQueueEntry *
GCT_send (struct CadetTunnel *t,
const struct GNUNET_MessageHeader *message,
@@ -3538,15 +3487,6 @@ GCT_send (struct CadetTunnel *t,
}
-/**
- * Cancel a previously sent message while it's in the queue.
- *
- * ONLY can be called before the continuation given to the send
- * function is called. Once the continuation is called, the message is
- * no longer in the queue!
- *
- * @param tq Handle to the queue entry to cancel.
- */
void
GCT_send_cancel (struct CadetTunnelQueueEntry *tq)
{
diff --git a/src/cadet/gnunet-service-cadet_tunnels.h b/src/cadet/gnunet-service-cadet_tunnels.h
index aea131542..e893955a0 100644
--- a/src/cadet/gnunet-service-cadet_tunnels.h
+++ b/src/cadet/gnunet-service-cadet_tunnels.h
@@ -160,8 +160,8 @@ GCT_get_destination (struct CadetTunnel *t);
* Consider using the path @a p for the tunnel @a t.
* The tunnel destination is at offset @a off in path @a p.
*
- * @param cls our tunnel
- * @param path a path to our destination
+ * @param t our tunnel
+ * @param p a path to our destination
* @param off offset of the destination on path @a path
*/
void
@@ -252,20 +252,21 @@ GCT_send_cancel (struct CadetTunnelQueueEntry *q);
/**
- * Return the number of channels using a tunnel.
+ * Returns the number of channels using a tunnel.
*
- * @param t tunnel to count obtain the number of channels for
- * @return number of channels using the tunnel
+ * @param t Tunnel in question.
+ * @return Number of channels using the tunnel.
*/
unsigned int
GCT_count_channels (struct CadetTunnel *t);
/**
- * Return the number of connections available for a tunnel.
+ * Counts the number of connections created for a tunnel,
+ * including busy connections.
*
- * @param t tunnel to count obtain the number of connections for
- * @return number of connections available for the tunnel
+ * @param t Tunnel to be counted.
+ * @return Number of connections created for the tunnel.
*/
unsigned int
GCT_count_any_connections (const struct CadetTunnel *t);
@@ -341,7 +342,9 @@ GCT_change_estate (struct CadetTunnel *t,
enum CadetTunnelEState state);
/**
- * Handle KX message.
+ * Handle KX message that lacks authentication (and which will thus
+ * only be considered authenticated after we respond with our own
+ * KX_AUTH and finally successfully decrypt the payload).
*
* @param ct connection/tunnel combo that received encrypted message
* @param msg the key exchange message
diff --git a/src/cadet/test_cadet.c b/src/cadet/test_cadet.c
index bdf2ac986..61c09f389 100644
--- a/src/cadet/test_cadet.c
+++ b/src/cadet/test_cadet.c
@@ -23,8 +23,8 @@
* @author Christian Grothoff
* @brief Test for the cadet service using mq API.
*/
-#include <stdio.h>
#include "platform.h"
+#include <stdio.h>
#include "cadet.h"
#include "cadet_test_lib.h"
#include "gnunet_cadet_service.h"
diff --git a/src/cadet/test_cadet_flow.c b/src/cadet/test_cadet_flow.c
index 9f5a45986..441599973 100644
--- a/src/cadet/test_cadet_flow.c
+++ b/src/cadet/test_cadet_flow.c
@@ -23,8 +23,8 @@
* @author Christian Grothoff
* @brief Test for flow control of CADET service
*/
-#include <stdio.h>
#include "platform.h"
+#include <stdio.h>
#include "cadet_test_lib.h"
#include "gnunet_cadet_service.h"
#include "gnunet_statistics_service.h"