/**
* Re-establish the connection to the ATS service.
*
- * @param sh handle to use to re-connect.
+ * @param ph handle to use to re-connect.
*/
static void
reconnect (struct GNUNET_ATS_PerformanceHandle *ph);
* We have received a 'ClientStartMessage' from a client. Find out which
* type of client it is and notify the respective subsystem.
*
+ * @param cls closure, unused
* @param client handle to the client
* @param message the start message
*/
*/
/**
- * @file transport/gnunet-service-transport_math.c
+ * @file ats/gnunet-service-transport_math.c
* @brief automatic transport selection, LP code
* @author Matthias Wachs
*
*/
/**
- * @file transport/gnunet-service-ats_math.h
+ * @file ats/gnunet-service-ats_math.h
* @brief common internal definitions for transport service's ats code
* @author Matthias Wachs
*/
*/
#define GNUNET_PACKED __attribute__((packed))
+/**
+ * gcc-ism to document unused arguments
+ */
+#define GNUNET_UNUSED __attribute__((unused))
+
/* ************************ super-general types *********************** */
* ATS to not use this address anymore (until it is re-validated).
*
* @param cls the 'struct GNUNET_HELLO_Address' of the address that was tried
+ * @param target peer to send the message to
* @param success GNUNET_OK on success
*/
static void
GNUNET_free (cc);
}
+
/**
* We tried to switch addresses with an peer already connected. If it failed,
* we should tell ATS to not use this address anymore (until it is re-validated).
*
* @param cls the 'struct NeighbourMapEntry'
+ * @param target peer to send the message to
* @param success GNUNET_OK on success
*/
static void
GNUNET_free (cc);
}
+
/**
* We tried to send a SESSION_CONNECT message to another peer. If this
* succeeded, we change the state. If it failed, we should tell
* ATS to not use this address anymore (until it is re-validated).
*
* @param cls the 'struct NeighbourMapEntry'
+ * @param target peer to send the message to
* @param success GNUNET_OK on success
*/
static void
GNUNET_free (cc);
}
+
/**
* For an existing neighbour record, set the active connection to
* the given address.
* to this peer
*
* @param neighbour neighbour to keep alive
+ * @param ats performance data
+ * @param ats_count number of entries in ats
*/
void
GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour,
* to this peer
*
* @param neighbour neighbour to keep alive
+ * @param ats performance data
+ * @param ats_count number of entries in ats
*/
void
GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour,
/**
- * ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg
- * @iterator: radiotap_iterator to move to next arg (if any)
- *
- * Returns: next present arg index on success or negative if no more or error
+ * @brief ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg
*
* This function returns the next radiotap arg index (IEEE80211_RADIOTAP_...)
* and sets iterator->this_arg to point to the payload for the arg. It takes
* care of alignment handling and extended present fields. interator->this_arg
* can be changed by the caller. The args pointed to are in little-endian
* format.
+ *
+ * @param iterator: radiotap_iterator to move to next arg (if any)
+ *
+ * @return next present arg index on success or negative if no more or error
*/
static int
ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator
* Function to call with a human-readable format of an address
*
* @param cls closure
- * @param address NULL on error, otherwise 0-terminated printable UTF-8 string
+ * @param peer identity of the peer
+ * @param transport name of the plugin
+ * @param addr binary address
+ * @param addrlen number of bytes in addr
*/
static void
process_address (void *cls, const struct GNUNET_PeerIdentity *peer,
/*
This file is part of GNUnet
- (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Christian Grothoff (and other contributing authors)
+ (C) 2011 Christian Grothoff (and other contributing authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
*/
/**
- * @file transport/plugin_transport_sat_send.h
+ * @file transport/plugin_transport_sat_constants.h
* @brief header for transport plugin for satellite for send operations
* @author Christian Rupp
*/
is valid for the getopt call we must make sure that the ARGV passed
to getopt is that one passed to the process. */
static void
- __attribute__ ((unused)) store_args_and_env (int argc, char *const *argv)
+ GNUNET_UNUSED store_args_and_env (int argc, char *const *argv)
{
/* XXX This is no good solution. We should rather copy the args so
* that we can compare them later. But we must not use malloc(3). */
* Function that frees everything from a hashmap
*/
static int
-free_iterate (void *cls __attribute__ ((unused)), const GNUNET_HashCode * hash
- __attribute__ ((unused)), void *value)
+free_iterate (void *cls GNUNET_UNUSED, const GNUNET_HashCode * hash
+ GNUNET_UNUSED, void *value)
{
GNUNET_free (value);
return GNUNET_YES;
*/
static void
cleanup (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_SCHEDULER_TaskContext *tskctx)
{
GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
static void *
new_tunnel (void *cls
- __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel,
+ GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
const struct GNUNET_PeerIdentity *initiator
- __attribute__ ((unused)), const struct GNUNET_ATS_Information *ats
- __attribute__ ((unused)))
+ GNUNET_UNUSED, const struct GNUNET_ATS_Information *ats
+ GNUNET_UNUSED)
{
struct tunnel_state *s = GNUNET_malloc (sizeof *s);
static void
clean_tunnel (void *cls
- __attribute__ ((unused)), const struct GNUNET_MESH_Tunnel *tunnel,
+ GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel,
void *tunnel_ctx)
{
GNUNET_free (tunnel_ctx);
* Receive packets from the helper-process
*/
static void
-message_token (void *cls __attribute__ ((unused)), void *client
- __attribute__ ((unused)),
+message_token (void *cls GNUNET_UNUSED, void *client
+ GNUNET_UNUSED,
const struct GNUNET_MessageHeader *message)
{
GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER);
* @param section name of section in config, equal to hostname
*/
static void
-read_service_conf (void *cls __attribute__ ((unused)), const char *section)
+read_service_conf (void *cls GNUNET_UNUSED, const char *section)
{
if ((strlen (section) < 8) ||
(0 != strcmp (".gnunet.", section + (strlen (section) - 8))))
*/
static int
receive_tcp_service (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_PeerIdentity *sender
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_MessageHeader *message,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n");
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
static int
receive_tcp_remote (void *cls
- __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel,
+ GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
void **tunnel_ctx
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_PeerIdentity *sender
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_MessageHeader *message,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct tcp_pkt *pkt = (struct tcp_pkt *) (desc + 1);
static int
receive_udp_remote (void *cls
- __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel,
+ GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
void **tunnel_ctx
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_PeerIdentity *sender
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_MessageHeader *message,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
*/
static int
receive_udp_service (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
struct GNUNET_MESH_Tunnel *tunnel, void **tunnel_ctx,
const struct GNUNET_PeerIdentity *sender
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_MessageHeader *message,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
* @param cfg_ configuration
*/
static void
-run (void *cls, char *const *args __attribute__ ((unused)), const char *cfgfile
- __attribute__ ((unused)), const struct GNUNET_CONFIGURATION_Handle *cfg_)
+run (void *cls, char *const *args GNUNET_UNUSED, const char *cfgfile
+ GNUNET_UNUSED, const struct GNUNET_CONFIGURATION_Handle *cfg_)
{
cfg = cfg_;
* {{{
*/
size_t
-send_query (void *cls __attribute__ ((unused)), size_t size, void *buf)
+send_query (void *cls GNUNET_UNUSED, size_t size, void *buf)
{
size_t len;
*/
void
connect_to_service_dns (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
conn_task = GNUNET_SCHEDULER_NO_TASK;
*/
void
dns_answer_handler (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_MessageHeader *msg)
{
/* the service disconnected, reconnect after short wait */
*/
void
helper_write (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_SCHEDULER_TaskContext *tsdkctx)
{
if (tsdkctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)
* Receive packets from the helper-process
*/
void
-message_token (void *cls __attribute__ ((unused)), void *client
- __attribute__ ((unused)),
+message_token (void *cls GNUNET_UNUSED, void *client
+ GNUNET_UNUSED,
const struct GNUNET_MessageHeader *message)
{
GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER);
*/
static void
cleanup (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_SCHEDULER_TaskContext *tskctx)
{
GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
static void
collect_mappings (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
if ((tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
void
send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
/* peer == NULL means that all peers in this request are connected */
if (peer == NULL)
static int
receive_udp_back (void *cls
- __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel,
+ GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender,
const struct GNUNET_MessageHeader *message,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct remote_addr *s = (struct remote_addr *) desc;
static int
receive_tcp_back (void *cls
- __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel,
+ GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
void **tunnel_ctx, const struct GNUNET_PeerIdentity *sender
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_MessageHeader *message,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct remote_addr *s = (struct remote_addr *) desc;
* @param cfg_ configuration
*/
static void
-run (void *cls, char *const *args __attribute__ ((unused)), const char *cfgfilep
- __attribute__ ((unused)), const struct GNUNET_CONFIGURATION_Handle *cfg_)
+run (void *cls, char *const *args GNUNET_UNUSED, const char *cfgfilep
+ GNUNET_UNUSED, const struct GNUNET_CONFIGURATION_Handle *cfg_)
{
static const struct GNUNET_MESH_MessageHandler handlers[] = {
{receive_udp_back, GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK, 0},
*/
static void
hijack (void *cls
- __attribute__ ((unused)), const struct GNUNET_SCHEDULER_TaskContext *tc)
+ GNUNET_UNUSED, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
static void *
new_tunnel (void *cls
- __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel,
+ GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
const struct GNUNET_PeerIdentity *initiator
- __attribute__ ((unused)), const struct GNUNET_ATS_Information *ats
- __attribute__ ((unused)))
+ GNUNET_UNUSED, const struct GNUNET_ATS_Information *ats
+ GNUNET_UNUSED)
{
struct tunnel_state *s = GNUNET_malloc (sizeof *s);
static void
clean_tunnel (void *cls
- __attribute__ ((unused)), const struct GNUNET_MESH_Tunnel *tunnel,
+ GNUNET_UNUSED, const struct GNUNET_MESH_Tunnel *tunnel,
void *tunnel_ctx)
{
GNUNET_free (tunnel_ctx);
void
mesh_connect (void *cls, const struct GNUNET_PeerIdentity *peer,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
if (NULL == peer)
return;
static int
receive_mesh_query (void *cls
- __attribute__ ((unused)), struct GNUNET_MESH_Tunnel *tunnel,
+ GNUNET_UNUSED, struct GNUNET_MESH_Tunnel *tunnel,
void **ctx
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_PeerIdentity *sender
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_MessageHeader *message,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
struct dns_pkt *dns = (struct dns_pkt *) (message + 1);
static int
receive_mesh_answer (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
struct GNUNET_MESH_Tunnel *tunnel, void **ctx
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_PeerIdentity *sender,
const struct GNUNET_MessageHeader *message,
const struct GNUNET_ATS_Information *atsi
- __attribute__ ((unused)))
+ GNUNET_UNUSED)
{
/* TODo: size check */
struct dns_pkt *dns = (struct dns_pkt *) (message + 1);
*/
static void
receive_dht (void *cls, struct GNUNET_TIME_Absolute exp
- __attribute__ ((unused)), const GNUNET_HashCode * key
- __attribute__ ((unused)),
+ GNUNET_UNUSED, const GNUNET_HashCode * key
+ GNUNET_UNUSED,
const struct GNUNET_PeerIdentity *get_path
- __attribute__ ((unused)), unsigned int get_path_length
- __attribute__ ((unused)),
+ GNUNET_UNUSED, unsigned int get_path_length
+ GNUNET_UNUSED,
const struct GNUNET_PeerIdentity *put_path
- __attribute__ ((unused)), unsigned int put_path_length
- __attribute__ ((unused)), enum GNUNET_BLOCK_Type type, size_t size,
+ GNUNET_UNUSED, unsigned int put_path_length
+ GNUNET_UNUSED, enum GNUNET_BLOCK_Type type, size_t size,
const void *data)
{
*/
static void
rehijack (void *cls
- __attribute__ ((unused)), struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader *message __attribute__ ((unused)))
+ GNUNET_UNUSED, struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *message GNUNET_UNUSED)
{
unhijack (dnsoutport);
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS, &hijack, NULL);
*/
static void
receive_query (void *cls
- __attribute__ ((unused)), struct GNUNET_SERVER_Client *client,
+ GNUNET_UNUSED, struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message)
{
struct query_packet *pkt = (struct query_packet *) message;
*/
static void
read_response6 (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct sockaddr_in6 addr;
*/
static void
read_response (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct sockaddr_in addr;
*/
static void
cleanup_task (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_assert (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
* @param section the current section
*/
static void
-publish_iterate (void *cls __attribute__ ((unused)), const char *section)
+publish_iterate (void *cls GNUNET_UNUSED, const char *section)
{
char *udp_redirects;
char *tcp_redirects;
*/
static void
publish_names (void *cls
- __attribute__ ((unused)),
+ GNUNET_UNUSED,
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))