[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r16587 - in gnunet: . src/arm src/chat src/core src/datacac
From: |
gnunet |
Subject: |
[GNUnet-SVN] r16587 - in gnunet: . src/arm src/chat src/core src/datacache src/datastore src/dht src/dv src/fs src/hostlist src/include src/mesh src/nat src/nse src/peerinfo src/statistics src/testing src/topology src/transport src/transport/wlan src/util src/vpn |
Date: |
Tue, 16 Aug 2011 18:03:21 +0200 |
Author: grothoff
Date: 2011-08-16 18:03:20 +0200 (Tue, 16 Aug 2011)
New Revision: 16587
Modified:
gnunet/.indent.pro
gnunet/pre-commit
gnunet/src/arm/gnunet-arm.c
gnunet/src/arm/gnunet-service-arm.c
gnunet/src/arm/gnunet-service-arm.h
gnunet/src/arm/gnunet-service-arm_interceptor.c
gnunet/src/arm/test_exponential_backoff.c
gnunet/src/chat/chat.c
gnunet/src/chat/gnunet-chat.c
gnunet/src/core/core_api.c
gnunet/src/core/gnunet-service-core.c
gnunet/src/core/test_core_api_preferences.c
gnunet/src/core/test_core_api_reliability.c
gnunet/src/core/test_core_quota_compliance.c
gnunet/src/datacache/perf_datacache.c
gnunet/src/datastore/datastore_api.c
gnunet/src/datastore/gnunet-service-datastore.c
gnunet/src/datastore/perf_datastore_api.c
gnunet/src/datastore/perf_plugin_datastore.c
gnunet/src/datastore/plugin_datastore_mysql.c
gnunet/src/datastore/test_datastore_api.c
gnunet/src/datastore/test_datastore_api_management.c
gnunet/src/datastore/test_plugin_datastore.c
gnunet/src/dht/dht_api.c
gnunet/src/dht/dhtlog.h
gnunet/src/dht/gnunet-dht-driver.c
gnunet/src/dht/gnunet-service-dht.c
gnunet/src/dht/plugin_dhtlog_dummy.c
gnunet/src/dht/test_dht_api.c
gnunet/src/dht/test_dht_twopeer.c
gnunet/src/dv/dv.h
gnunet/src/dv/dv_api.c
gnunet/src/dv/gnunet-service-dv.c
gnunet/src/dv/test_transport_api_dv.c
gnunet/src/fs/fs.c
gnunet/src/fs/fs.h
gnunet/src/fs/fs_download.c
gnunet/src/fs/fs_file_information.c
gnunet/src/fs/fs_publish.c
gnunet/src/fs/fs_search.c
gnunet/src/fs/fs_test_lib.h
gnunet/src/fs/fs_tree.c
gnunet/src/fs/fs_tree.h
gnunet/src/fs/fs_uri.c
gnunet/src/fs/gnunet-download.c
gnunet/src/fs/gnunet-publish.c
gnunet/src/fs/gnunet-search.c
gnunet/src/fs/gnunet-service-fs.h
gnunet/src/fs/gnunet-service-fs_cp.c
gnunet/src/fs/gnunet-service-fs_cp.h
gnunet/src/fs/gnunet-service-fs_indexing.c
gnunet/src/fs/gnunet-service-fs_indexing.h
gnunet/src/fs/gnunet-service-fs_lc.h
gnunet/src/fs/gnunet-service-fs_pe.c
gnunet/src/fs/gnunet-service-fs_pe.h
gnunet/src/fs/gnunet-service-fs_pr.c
gnunet/src/fs/gnunet-service-fs_pr.h
gnunet/src/fs/gnunet-service-fs_push.c
gnunet/src/fs/gnunet-service-fs_push.h
gnunet/src/fs/gnunet-service-fs_put.c
gnunet/src/fs/gnunet-service-fs_put.h
gnunet/src/fs/perf_gnunet_service_fs_p2p.c
gnunet/src/fs/perf_gnunet_service_fs_p2p_trust.c
gnunet/src/fs/test_fs_download.c
gnunet/src/fs/test_fs_download_indexed.c
gnunet/src/fs/test_fs_download_persistence.c
gnunet/src/fs/test_fs_list_indexed.c
gnunet/src/fs/test_fs_publish.c
gnunet/src/fs/test_fs_publish_persistence.c
gnunet/src/fs/test_fs_search.c
gnunet/src/fs/test_fs_search_persistence.c
gnunet/src/fs/test_fs_unindex.c
gnunet/src/fs/test_fs_unindex_persistence.c
gnunet/src/hostlist/hostlist-client.c
gnunet/src/hostlist/hostlist-client.h
gnunet/src/hostlist/hostlist-server.c
gnunet/src/hostlist/hostlist-server.h
gnunet/src/include/gnunet_arm_service.h
gnunet/src/include/gnunet_ats_service.h
gnunet/src/include/gnunet_bandwidth_lib.h
gnunet/src/include/gnunet_bio_lib.h
gnunet/src/include/gnunet_block_lib.h
gnunet/src/include/gnunet_chat_service.h
gnunet/src/include/gnunet_client_lib.h
gnunet/src/include/gnunet_common.h
gnunet/src/include/gnunet_configuration_lib.h
gnunet/src/include/gnunet_connection_lib.h
gnunet/src/include/gnunet_container_lib.h
gnunet/src/include/gnunet_core_service.h
gnunet/src/include/gnunet_crypto_lib.h
gnunet/src/include/gnunet_datacache_lib.h
gnunet/src/include/gnunet_datastore_service.h
gnunet/src/include/gnunet_dht_service.h
gnunet/src/include/gnunet_disk_lib.h
gnunet/src/include/gnunet_dv_service.h
gnunet/src/include/gnunet_fragmentation_lib.h
gnunet/src/include/gnunet_fs_service.h
gnunet/src/include/gnunet_getopt_lib.h
gnunet/src/include/gnunet_hello_lib.h
gnunet/src/include/gnunet_load_lib.h
gnunet/src/include/gnunet_mesh_service.h
gnunet/src/include/gnunet_mesh_service_new.h
gnunet/src/include/gnunet_nat_lib.h
gnunet/src/include/gnunet_network_lib.h
gnunet/src/include/gnunet_nse_service.h
gnunet/src/include/gnunet_os_lib.h
gnunet/src/include/gnunet_peer_lib.h
gnunet/src/include/gnunet_peerinfo_service.h
gnunet/src/include/gnunet_plugin_lib.h
gnunet/src/include/gnunet_program_lib.h
gnunet/src/include/gnunet_pseudonym_lib.h
gnunet/src/include/gnunet_resolver_service.h
gnunet/src/include/gnunet_scheduler_lib.h
gnunet/src/include/gnunet_server_lib.h
gnunet/src/include/gnunet_service_lib.h
gnunet/src/include/gnunet_signal_lib.h
gnunet/src/include/gnunet_statistics_service.h
gnunet/src/include/gnunet_strings_lib.h
gnunet/src/include/gnunet_testing_lib.h
gnunet/src/include/gnunet_time_lib.h
gnunet/src/include/gnunet_transport_service.h
gnunet/src/include/gnunet_upnp_service.h
gnunet/src/include/platform.h
gnunet/src/mesh/test_mesh_small.c
gnunet/src/nat/nat.c
gnunet/src/nat/nat_mini.c
gnunet/src/nse/gnunet-nse-profiler.c
gnunet/src/nse/gnunet-service-nse.c
gnunet/src/nse/nse_api.c
gnunet/src/peerinfo/peerinfo_api.c
gnunet/src/peerinfo/peerinfo_api_notify.c
gnunet/src/statistics/statistics_api.c
gnunet/src/testing/test_testing_reconnect.c
gnunet/src/testing/testing.c
gnunet/src/testing/testing_group.c
gnunet/src/testing/testing_peergroup.c
gnunet/src/topology/gnunet-daemon-topology.c
gnunet/src/transport/gnunet-service-transport-new.c
gnunet/src/transport/gnunet-service-transport.c
gnunet/src/transport/gnunet-service-transport_ats.c
gnunet/src/transport/gnunet-service-transport_ats.h
gnunet/src/transport/gnunet-service-transport_blacklist.c
gnunet/src/transport/gnunet-service-transport_blacklist.h
gnunet/src/transport/gnunet-service-transport_clients.h
gnunet/src/transport/gnunet-service-transport_hello.h
gnunet/src/transport/gnunet-service-transport_neighbours.c
gnunet/src/transport/gnunet-service-transport_neighbours.h
gnunet/src/transport/gnunet-service-transport_plugins.h
gnunet/src/transport/gnunet-service-transport_validation.h
gnunet/src/transport/gnunet-transport-wlan-helper.c
gnunet/src/transport/plugin_transport_http.c
gnunet/src/transport/plugin_transport_smtp.c
gnunet/src/transport/plugin_transport_tcp.c
gnunet/src/transport/plugin_transport_udp.c
gnunet/src/transport/plugin_transport_unix.c
gnunet/src/transport/plugin_transport_wlan.c
gnunet/src/transport/test_plugin_transport_http.c
gnunet/src/transport/test_plugin_transport_https.c
gnunet/src/transport/test_quota_compliance.c
gnunet/src/transport/test_transport_api_disconnect.c
gnunet/src/transport/transport-testing.c
gnunet/src/transport/transport-testing.h
gnunet/src/transport/transport_api.c
gnunet/src/transport/transport_api_blacklist.c
gnunet/src/transport/wlan/byteorder.h
gnunet/src/transport/wlan/helper_common.h
gnunet/src/transport/wlan/loopback_helper.h
gnunet/src/transport/wlan/radiotap-parser.c
gnunet/src/transport/wlan/radiotap-parser.h
gnunet/src/util/client.c
gnunet/src/util/connection.c
gnunet/src/util/container_heap.c
gnunet/src/util/container_meta_data.c
gnunet/src/util/crypto_rsa.c
gnunet/src/util/disk.h
gnunet/src/util/getopt.c
gnunet/src/util/os_network.c
gnunet/src/util/os_priority.c
gnunet/src/util/peer.c
gnunet/src/util/perf_crypto_hash.c
gnunet/src/util/resolver_api.c
gnunet/src/util/scheduler.c
gnunet/src/util/server.c
gnunet/src/util/server_nc.c
gnunet/src/util/test_crypto_ksk.c
gnunet/src/util/test_crypto_rsa.c
gnunet/src/util/test_os_network.c
gnunet/src/util/test_time.c
gnunet/src/vpn/gnunet-daemon-vpn-dns.h
gnunet/src/vpn/gnunet-daemon-vpn-helper.c
gnunet/src/vpn/gnunet-daemon-vpn-helper.h
gnunet/src/vpn/gnunet-daemon-vpn.c
gnunet/src/vpn/gnunet-daemon-vpn.h
gnunet/src/vpn/gnunet-dns-parser.h
gnunet/src/vpn/gnunet-helper-vpn-api.h
gnunet/src/vpn/gnunet-service-dns.c
gnunet/src/vpn/gnunet-vpn-checksum.h
Log:
even nicer indentation, thanks to LRN's indent patch
Modified: gnunet/.indent.pro
===================================================================
--- gnunet/.indent.pro 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/.indent.pro 2011-08-16 16:03:20 UTC (rev 16587)
@@ -1,3 +1,5 @@
+//LRN extension for return values for prototypes
+-nddd
//GNU (default) style:
//
//-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
Modified: gnunet/pre-commit
===================================================================
--- gnunet/pre-commit 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/pre-commit 2011-08-16 16:03:20 UTC (rev 16587)
@@ -1,8 +1,8 @@
#!/bin/sh
find src/ -name "*.c" -exec indent {} \;
-find src/ -name "*.c" -exec indent {} \;
+find src/ -name "*.h" -exec indent {} \;
if test -x "`which 'dos2unix'`"
then
find src/ -name "*.c" -exec dos2unix {} \;
- find src/ -name "*.c" -exec dos2unix {} \;
+ find src/ -name "*.h" -exec dos2unix {} \;
fi
Modified: gnunet/src/arm/gnunet-arm.c
===================================================================
--- gnunet/src/arm/gnunet-arm.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/arm/gnunet-arm.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -138,7 +138,8 @@
* @param cls closure, unused
* @param tc context, unused
*/
-static void cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext
*tc);
+static void
+cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -305,9 +306,8 @@
{
GNUNET_ARM_stop_service (h, "arm",
(0 ==
- timeout.
- rel_value) ? STOP_TIMEOUT_ARM : timeout,
- &confirm_cb, "arm");
+ timeout.rel_value) ? STOP_TIMEOUT_ARM :
+ timeout, &confirm_cb, "arm");
return;
}
break;
@@ -336,9 +336,8 @@
{
GNUNET_CLIENT_service_test (test, cfg,
(0 ==
- timeout.
- rel_value) ? TEST_TIMEOUT : timeout,
- &confirm_task, test);
+ timeout.rel_value) ? TEST_TIMEOUT :
+ timeout, &confirm_task, test);
return;
}
break;
Modified: gnunet/src/arm/gnunet-service-arm.c
===================================================================
--- gnunet/src/arm/gnunet-service-arm.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/arm/gnunet-service-arm.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -722,8 +722,8 @@
{
lowestRestartDelay =
GNUNET_TIME_relative_min (lowestRestartDelay,
- GNUNET_TIME_absolute_get_remaining (pos->
-
restartAt));
+ GNUNET_TIME_absolute_get_remaining
+ (pos->restartAt));
}
}
pos = pos->next;
Modified: gnunet/src/arm/gnunet-service-arm.h
===================================================================
--- gnunet/src/arm/gnunet-service-arm.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/arm/gnunet-service-arm.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -35,8 +35,9 @@
* @param lsocks -1 terminated list of listen sockets to pass (systemd style),
or NULL
* @return GNUNET_OK on success
*/
-int start_service (struct GNUNET_SERVER_Client *client, const char
*servicename,
- const int *lsocks);
+int
+start_service (struct GNUNET_SERVER_Client *client, const char *servicename,
+ const int *lsocks);
/**
* Stop listening for connections to a service.
@@ -45,9 +46,10 @@
* @return GNUNET_OK if we stopped to listen, GNUNET_NO if we were
* not listening
*/
-int stop_listening (const char *serviceName);
+int
+stop_listening (const char *serviceName);
-void prepareServices (const struct GNUNET_CONFIGURATION_Handle
- *configurationHandle);
+void
+prepareServices (const struct GNUNET_CONFIGURATION_Handle
*configurationHandle);
#endif
Modified: gnunet/src/arm/gnunet-service-arm_interceptor.c
===================================================================
--- gnunet/src/arm/gnunet-service-arm_interceptor.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/arm/gnunet-service-arm_interceptor.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -356,8 +356,8 @@
* @param cls callback data, struct ForwardedConnection for the
communication between client and service
* @param tc context
*/
-static void receiveFromClient (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -366,15 +366,15 @@
* @param cls callback data, struct ForwardedConnection for the communication
between client and service
* @param tc scheduler context
*/
-static void receiveFromService (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+receiveFromService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
*
*/
-static void start_forwarding (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+start_forwarding (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
@@ -497,8 +497,7 @@
GNUNET_a2s (fc->listen_info->service_addr,
fc->listen_info->service_addr_len),
(unsigned long long) GNUNET_TIME_relative_min (fc->back_off,
- rem).
- rel_value);
+
rem).rel_value);
#endif
rem = GNUNET_TIME_absolute_get_remaining (fc->timeout);
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task);
@@ -584,8 +583,7 @@
GNUNET_a2s (fc->listen_info->service_addr,
fc->listen_info->service_addr_len),
(unsigned long long) GNUNET_TIME_relative_min (fc->back_off,
- rem).
- rel_value);
+
rem).rel_value);
#endif
rem = GNUNET_TIME_absolute_get_remaining (fc->timeout);
GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task);
@@ -913,8 +911,8 @@
* @param cls callback data, struct ServiceListeningInfo describing a listen
socket
* @param tc context
*/
-static void acceptConnection (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static void
@@ -948,8 +946,8 @@
return;
}
GNUNET_break (GNUNET_OK ==
- GNUNET_NETWORK_socket_close (serviceListeningInfo->
- listeningSocket));
+ GNUNET_NETWORK_socket_close
+ (serviceListeningInfo->listeningSocket));
start_service (NULL, serviceListeningInfo->serviceName, NULL);
GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Service `%s' started\n"),
fc->listen_info->serviceName);
Modified: gnunet/src/arm/test_exponential_backoff.c
===================================================================
--- gnunet/src/arm/test_exponential_backoff.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/arm/test_exponential_backoff.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -251,8 +251,8 @@
}
-static void kill_task (void *cbData,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc);
static void
@@ -273,8 +273,8 @@
}
-static void kill_task (void *cbData,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc);
static void
Modified: gnunet/src/chat/chat.c
===================================================================
--- gnunet/src/chat/chat.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/chat/chat.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -148,7 +148,8 @@
/**
* Ask client to send a join request.
*/
-static int rejoin_room (struct GNUNET_CHAT_Room *chat_room);
+static int
+rejoin_room (struct GNUNET_CHAT_Room *chat_room);
/**
@@ -404,9 +405,8 @@
if (NULL != room->confirmation_callback)
room->confirmation_callback (room->confirmation_cls, room,
ntohl (receipt->sequence_number),
- GNUNET_TIME_absolute_ntoh (receipt->
- timestamp),
- &receipt->target);
+ GNUNET_TIME_absolute_ntoh
+ (receipt->timestamp), &receipt->target);
break;
default:
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Unknown message type: '%u'\n"),
Modified: gnunet/src/chat/gnunet-chat.c
===================================================================
--- gnunet/src/chat/gnunet-chat.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/chat/gnunet-chat.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -76,7 +76,8 @@
}
}
-static int do_help (const char *args, const void *xtra);
+static int
+do_help (const char *args, const void *xtra);
/**
Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/core/core_api.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -371,7 +371,8 @@
*
* @param h our handle to the core service
*/
-static void reconnect (struct GNUNET_CORE_Handle *h);
+static void
+reconnect (struct GNUNET_CORE_Handle *h);
/**
@@ -515,8 +516,8 @@
* @param h core handle
* @param ignore_currently_down transmit message even if not initialized?
*/
-static void trigger_next_request (struct GNUNET_CORE_Handle *h,
- int ignore_currently_down);
+static void
+trigger_next_request (struct GNUNET_CORE_Handle *h, int ignore_currently_down);
/**
@@ -526,9 +527,8 @@
* @param cls the transmit handle of the request that timed out
* @param tc context, can be NULL (!)
*/
-static void transmission_timeout (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+transmission_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext
*tc);
/**
@@ -776,8 +776,8 @@
}
if (h->control_pending_head != NULL)
msize =
- ntohs (((struct GNUNET_MessageHeader *) &h->control_pending_head[1])->
- size);
+ ntohs (((struct GNUNET_MessageHeader *) &h->
+ control_pending_head[1])->size);
else if (h->ready_peer_head != NULL)
msize =
h->ready_peer_head->pending_head->msize + sizeof (struct SendMessage);
Modified: gnunet/src/core/gnunet-service-core.c
===================================================================
--- gnunet/src/core/gnunet-service-core.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/core/gnunet-service-core.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -1807,7 +1807,8 @@
*
* @param n neighbour to check.
*/
-static void process_encrypted_neighbour_queue (struct Neighbour *n);
+static void
+process_encrypted_neighbour_queue (struct Neighbour *n);
/**
@@ -1854,7 +1855,8 @@
*
* @param n neighbour to consider discarding
*/
-static void consider_free_neighbour (struct Neighbour *n);
+static void
+consider_free_neighbour (struct Neighbour *n);
/**
@@ -2006,9 +2008,9 @@
#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Copied message of type %u and size %u into transport buffer
for `%4s'\n",
- (unsigned int) ntohs (((struct GNUNET_MessageHeader *) &m[1])->
- type), (unsigned int) ret,
- GNUNET_i2s (&n->peer));
+ (unsigned int)
+ ntohs (((struct GNUNET_MessageHeader *) &m[1])->type),
+ (unsigned int) ret, GNUNET_i2s (&n->peer));
#endif
process_encrypted_neighbour_queue (n);
}
@@ -2017,8 +2019,9 @@
#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Transmission of message of type %u and size %u failed\n",
- (unsigned int) ntohs (((struct GNUNET_MessageHeader *) &m[1])->
- type), (unsigned int) m->size);
+ (unsigned int)
+ ntohs (((struct GNUNET_MessageHeader *) &m[1])->type),
+ (unsigned int) m->size);
#endif
}
GNUNET_free (m);
@@ -2038,7 +2041,8 @@
*
* @param n neighbour to check.
*/
-static void process_plaintext_neighbour_queue (struct Neighbour *n);
+static void
+process_plaintext_neighbour_queue (struct Neighbour *n);
/**
@@ -2071,9 +2075,8 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Asking transport for transmission of %u bytes to `%4s' in next
%llu ms\n",
(unsigned int) m->size, GNUNET_i2s (&n->peer),
- (unsigned long long) GNUNET_TIME_absolute_get_remaining (m->
-
deadline).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_remaining (m->deadline).rel_value);
#endif
n->th =
GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer, m->size,
@@ -2436,8 +2439,8 @@
(unsigned int)
ntohs (((const struct GNUNET_MessageHeader *)
&pos[1])->type),
(unsigned int)
- ntohs (((const struct GNUNET_MessageHeader *) &pos[1])->
- size));
+ ntohs (((const struct GNUNET_MessageHeader *)
+ &pos[1])->size));
#endif
/* copy for encrypted transmission */
memcpy (&buf[ret], &pos[1], pos->size);
@@ -2448,9 +2451,8 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Adding plaintext message of size %u with deadline %llu ms
to batch\n",
(unsigned int) pos->size,
- (unsigned long long) GNUNET_TIME_absolute_get_remaining
(pos->
-
deadline).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_remaining
(pos->deadline).rel_value);
#endif
deadline->abs_value =
GNUNET_MIN (deadline->abs_value, pos->deadline.abs_value);
@@ -2548,7 +2550,8 @@
*
* @param n the other peer
*/
-static void send_key (struct Neighbour *n);
+static void
+send_key (struct Neighbour *n);
/**
* Task that will retry "send_key" if our previous attempt failed
@@ -2734,9 +2737,9 @@
* @param cls neighbour for the quota update
* @param tc context
*/
-static void neighbour_quota_update (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+neighbour_quota_update (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -3269,9 +3272,9 @@
#if DEBUG_CORE
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Have %llu ms left for `%s' transmission.\n",
- (unsigned long long) GNUNET_TIME_absolute_get_remaining (me->
-
deadline).
- rel_value, "SET_KEY");
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_remaining (me->deadline).rel_value,
+ "SET_KEY");
#endif
trigger_processing:
/* trigger queue processing */
@@ -3293,9 +3296,10 @@
* @param ats performance data
* @param ats_count number of entries in ats (excluding 0-termination)
*/
-static void handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m,
- const struct GNUNET_TRANSPORT_ATS_Information *ats,
- uint32_t ats_count);
+static void
+handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m,
+ const struct GNUNET_TRANSPORT_ATS_Information *ats,
+ uint32_t ats_count);
@@ -3843,8 +3847,8 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Core service passes message from `%4s' of type %u to client.\n",
GNUNET_i2s (&sender->peer),
- (unsigned int) ntohs (((const struct GNUNET_MessageHeader *) m)->
- type));
+ (unsigned int)
+ ntohs (((const struct GNUNET_MessageHeader *) m)->type));
#endif
ntm = (struct NotifyTrafficMessage *) buf;
ntm->header.size = htons (size);
Modified: gnunet/src/core/test_core_api_preferences.c
===================================================================
--- gnunet/src/core/test_core_api_preferences.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/core/test_core_api_preferences.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -75,8 +75,8 @@
static unsigned int total_reserve = 5;
-static void process_hello (void *cls,
- const struct GNUNET_MessageHeader *message);
+static void
+process_hello (void *cls, const struct GNUNET_MessageHeader *message);
static void
terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -151,11 +151,10 @@
return sizeof (struct GNUNET_MessageHeader);
}
-static void preference_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
- struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
- int32_t amount,
- struct GNUNET_TIME_Relative res_delay,
- uint64_t preference);
+static void
+preference_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, int32_t
amount,
+ struct GNUNET_TIME_Relative res_delay, uint64_t preference);
static void
do_reserve (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
Modified: gnunet/src/core/test_core_api_reliability.c
===================================================================
--- gnunet/src/core/test_core_api_reliability.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/core/test_core_api_reliability.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -113,8 +113,8 @@
return sizeof (struct TestMessage) + (ret % 60000);
}
-static void process_hello (void *cls,
- const struct GNUNET_MessageHeader *message);
+static void
+process_hello (void *cls, const struct GNUNET_MessageHeader *message);
static void
terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -296,7 +296,8 @@
}
-static size_t transmit_ready (void *cls, size_t size, void *buf);
+static size_t
+transmit_ready (void *cls, size_t size, void *buf);
static int
process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
Modified: gnunet/src/core/test_core_quota_compliance.c
===================================================================
--- gnunet/src/core/test_core_quota_compliance.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/core/test_core_quota_compliance.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -114,8 +114,8 @@
uint32_t num;
};
-static void process_hello (void *cls,
- const struct GNUNET_MessageHeader *message);
+static void
+process_hello (void *cls, const struct GNUNET_MessageHeader *message);
static void
terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -424,7 +424,8 @@
}
-static size_t transmit_ready (void *cls, size_t size, void *buf);
+static size_t
+transmit_ready (void *cls, size_t size, void *buf);
static int
process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
Modified: gnunet/src/datacache/perf_datacache.c
===================================================================
--- gnunet/src/datacache/perf_datacache.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/datacache/perf_datacache.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -91,8 +91,8 @@
}
fprintf (stderr, "\n");
fprintf (stdout, "Stored %u items in %llums\n", ITERATIONS,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value);
GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name);
GAUGER (gstr, "Time to PUT item in datacache",
GNUNET_TIME_absolute_get_duration (start).rel_value / ITERATIONS,
@@ -111,8 +111,9 @@
fprintf (stdout,
"Found %u/%u items in %llums (%u were deleted during storage
processing)\n",
found, ITERATIONS,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value, ITERATIONS - found);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value,
+ ITERATIONS - found);
if (found > 0)
GAUGER (gstr, "Time to GET item from datacache",
GNUNET_TIME_absolute_get_duration (start).rel_value / found,
Modified: gnunet/src/datastore/datastore_api.c
===================================================================
--- gnunet/src/datastore/datastore_api.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/datastore/datastore_api.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -480,7 +480,8 @@
*
* @param h handle to the datastore
*/
-static void process_queue (struct GNUNET_DATASTORE_Handle *h);
+static void
+process_queue (struct GNUNET_DATASTORE_Handle *h);
/**
Modified: gnunet/src/datastore/gnunet-service-datastore.c
===================================================================
--- gnunet/src/datastore/gnunet-service-datastore.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/datastore/gnunet-service-datastore.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -276,8 +276,8 @@
* @param cls not used
* @param tc task context
*/
-static void delete_expired (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+delete_expired (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/datastore/perf_datastore_api.c
===================================================================
--- gnunet/src/datastore/perf_datastore_api.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/datastore/perf_datastore_api.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -104,8 +104,8 @@
-static void run_continuation (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
Modified: gnunet/src/datastore/perf_plugin_datastore.c
===================================================================
--- gnunet/src/datastore/perf_plugin_datastore.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/datastore/perf_plugin_datastore.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -145,7 +145,8 @@
stored_entries++;
}
-static void test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static int
Modified: gnunet/src/datastore/plugin_datastore_mysql.c
===================================================================
--- gnunet/src/datastore/plugin_datastore_mysql.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/datastore/plugin_datastore_mysql.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -1068,12 +1068,12 @@
{
ret =
prepared_statement_run_select (plugin,
-
plugin->count_entry_by_hash_vhash_and_type,
- 1, cbind, MYSQL_TYPE_BLOB, key,
- hashSize, &hashSize, MYSQL_TYPE_BLOB,
- vhash, hashSize2, &hashSize2,
- MYSQL_TYPE_LONG, &type, GNUNET_YES,
- -1);
+ plugin->
+ count_entry_by_hash_vhash_and_type, 1,
+ cbind, MYSQL_TYPE_BLOB, key, hashSize,
+ &hashSize, MYSQL_TYPE_BLOB, vhash,
+ hashSize2, &hashSize2,
MYSQL_TYPE_LONG,
+ &type, GNUNET_YES, -1);
}
else
{
Modified: gnunet/src/datastore/test_datastore_api.c
===================================================================
--- gnunet/src/datastore/test_datastore_api.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/datastore/test_datastore_api.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -134,8 +134,8 @@
};
-static void run_continuation (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static void
Modified: gnunet/src/datastore/test_datastore_api_management.c
===================================================================
--- gnunet/src/datastore/test_datastore_api_management.c 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/datastore/test_datastore_api_management.c 2011-08-16
16:03:20 UTC (rev 16587)
@@ -117,8 +117,8 @@
};
-static void run_continuation (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static void
Modified: gnunet/src/datastore/test_plugin_datastore.c
===================================================================
--- gnunet/src/datastore/test_plugin_datastore.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/datastore/test_plugin_datastore.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -141,7 +141,8 @@
}
-static void test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static uint64_t guid;
Modified: gnunet/src/dht/dht_api.c
===================================================================
--- gnunet/src/dht/dht_api.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/dht/dht_api.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -203,7 +203,8 @@
/**
* Transmit the next pending message, called by notify_transmit_ready
*/
-static size_t transmit_pending (void *cls, size_t size, void *buf);
+static size_t
+transmit_pending (void *cls, size_t size, void *buf);
/**
@@ -211,8 +212,8 @@
* a demultiplexer which handles numerous message types
*
*/
-static void service_message_handler (void *cls,
- const struct GNUNET_MessageHeader *msg);
+static void
+service_message_handler (void *cls, const struct GNUNET_MessageHeader *msg);
@@ -273,7 +274,8 @@
* Try to send messages from list of messages to send
* @param handle DHT_Handle
*/
-static void process_pending_messages (struct GNUNET_DHT_Handle *handle);
+static void
+process_pending_messages (struct GNUNET_DHT_Handle *handle);
/**
@@ -760,11 +762,9 @@
route_handle->message);
}
GNUNET_assert (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_remove (route_handle->
- dht_handle->
- active_requests,
- &route_handle->key,
- route_handle));
+ GNUNET_CONTAINER_multihashmap_remove
+ (route_handle->dht_handle->active_requests,
&route_handle->key,
+ route_handle));
GNUNET_free (route_handle->message);
GNUNET_free (route_handle);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "DHT route stop request processed\n");
Modified: gnunet/src/dht/dhtlog.h
===================================================================
--- gnunet/src/dht/dhtlog.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/dht/dhtlog.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -373,14 +373,14 @@
*
* @param c a configuration to use
*/
-struct GNUNET_DHTLOG_Handle *GNUNET_DHTLOG_connect (const struct
- GNUNET_CONFIGURATION_Handle
- *c);
+struct GNUNET_DHTLOG_Handle *
+GNUNET_DHTLOG_connect (const struct GNUNET_CONFIGURATION_Handle *c);
/**
* Shutdown the module.
*/
-void GNUNET_DHTLOG_disconnect (struct GNUNET_DHTLOG_Handle *api);
+void
+GNUNET_DHTLOG_disconnect (struct GNUNET_DHTLOG_Handle *api);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/dht/gnunet-dht-driver.c
===================================================================
--- gnunet/src/dht/gnunet-dht-driver.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/dht/gnunet-dht-driver.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -1244,12 +1244,14 @@
/**
* Forward declaration.
*/
-static void do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Forward declaration.
*/
-static void do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Iterator over hash map entries.
@@ -1465,8 +1467,8 @@
GNUNET_TESTING_daemons_connect (d1, d2, timeout,
DEFAULT_RECONNECT_ATTEMPTS,
GNUNET_YES, NULL, NULL);
}
- if (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
- rel_value > 0)
+ if (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).rel_value
+ > 0)
return GNUNET_YES;
else
return GNUNET_NO;
@@ -1475,10 +1477,10 @@
/**
* Forward declaration.
*/
-static void schedule_churn_find_peer_requests (void *cls,
- const struct
- GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+schedule_churn_find_peer_requests (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext
+ *tc);
/**
* Callback for iterating over all the peer connections of a peer group.
@@ -1555,12 +1557,11 @@
*/
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Out of %u peers, fewest connections is %d\n",
- GNUNET_CONTAINER_heap_get_size (find_peer_context->
- peer_min_heap),
- peer_count->count);
+ GNUNET_CONTAINER_heap_get_size
+ (find_peer_context->peer_min_heap), peer_count->count);
if ((peer_count->count == 0) &&
- (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
- rel_value > 0))
+ (GNUNET_TIME_absolute_get_remaining
+ (find_peer_context->endtime).rel_value > 0))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Found peer with no connections, will choose some peer(s) at
random to connect to!\n");
@@ -1570,8 +1571,9 @@
GNUNET_SCHEDULER_add_now (&schedule_churn_find_peer_requests,
find_peer_context);
}
- else if ((GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
- rel_value > 0) && (find_peer_context->last_sent != 0))
+ else if ((GNUNET_TIME_absolute_get_remaining
+ (find_peer_context->endtime).rel_value > 0) &&
+ (find_peer_context->last_sent != 0))
{
GNUNET_SCHEDULER_add_now (&schedule_churn_find_peer_requests,
find_peer_context);
@@ -1772,8 +1774,8 @@
}
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Added %d peers to heap, total size %d\n", count_added,
- GNUNET_CONTAINER_heap_get_size (find_peer_context->
- peer_min_heap));
+ GNUNET_CONTAINER_heap_get_size
+ (find_peer_context->peer_min_heap));
GNUNET_SCHEDULER_add_delayed (DEFAULT_PEER_DISCONNECT_TIMEOUT,
&schedule_churn_get_topology,
find_peer_context);
@@ -2262,14 +2264,14 @@
test_put->next);
}
-static void schedule_find_peer_requests (void *cls,
- const struct
- GNUNET_SCHEDULER_TaskContext *tc);
+static void
+schedule_find_peer_requests (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
#if HAVE_MALICIOUS
-static void setup_malicious_peers (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+setup_malicious_peers (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
#endif
/**
@@ -2322,8 +2324,8 @@
if ((find_peer_context->last_sent < 8) ||
((find_peer_context->current_peers <
2 * connection_estimate (num_peers, DEFAULT_BUCKET_SIZE)) &&
- (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
- rel_value > 0) &&
+ (GNUNET_TIME_absolute_get_remaining
+ (find_peer_context->endtime).rel_value > 0) &&
(find_peer_context->current_peers < target_total_connections)))
{
GNUNET_SCHEDULER_add_now (&schedule_find_peer_requests,
@@ -2424,11 +2426,9 @@
peer_count =
GNUNET_CONTAINER_heap_remove_root (find_peer_ctx->peer_min_heap);
GNUNET_assert (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_remove (find_peer_ctx->
- peer_hash,
-
&peer_count->peer_id.
- hashPubKey,
- peer_count));
+ GNUNET_CONTAINER_multihashmap_remove
+ (find_peer_ctx->peer_hash,
&peer_count->peer_id.hashPubKey,
+ peer_count));
test_find_peer->daemon =
GNUNET_TESTING_daemon_get_by_id (pg, &peer_count->peer_id);
GNUNET_assert (test_find_peer->daemon != NULL);
@@ -2879,17 +2879,14 @@
#if ONLY_TESTING
/* Forward declaration */
-static void topology_callback (void *cls,
- const struct GNUNET_PeerIdentity *first,
- const struct GNUNET_PeerIdentity *second,
- uint32_t distance,
- const struct GNUNET_CONFIGURATION_Handle
- *first_cfg,
- const struct GNUNET_CONFIGURATION_Handle
- *second_cfg,
- struct GNUNET_TESTING_Daemon *first_daemon,
- struct GNUNET_TESTING_Daemon *second_daemon,
- const char *emsg);
+static void
+topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
+ const struct GNUNET_PeerIdentity *second, uint32_t distance,
+ const struct GNUNET_CONFIGURATION_Handle *first_cfg,
+ const struct GNUNET_CONFIGURATION_Handle *second_cfg,
+ struct GNUNET_TESTING_Daemon *first_daemon,
+ struct GNUNET_TESTING_Daemon *second_daemon,
+ const char *emsg);
/**
* Retry connecting two specific peers until they connect,
@@ -2993,12 +2990,12 @@
/* Get duration in seconds */
duration =
GNUNET_TIME_absolute_get_difference (connect_last_time,
- GNUNET_TIME_absolute_get ()).
- rel_value / 1000;
+ GNUNET_TIME_absolute_get
+ ()).rel_value / 1000;
total_duration =
GNUNET_TIME_absolute_get_difference (connect_start_time,
- GNUNET_TIME_absolute_get ()).
- rel_value / 1000;
+ GNUNET_TIME_absolute_get
+ ()).rel_value / 1000;
failed_conns_per_sec_recent =
(double) new_failed_connections / (double) duration;
@@ -3086,8 +3083,8 @@
total_duration =
GNUNET_TIME_absolute_get_difference (connect_start_time,
- GNUNET_TIME_absolute_get ()).
- rel_value / 1000;
+ GNUNET_TIME_absolute_get
+ ()).rel_value / 1000;
failed_conns_per_sec_total =
(long double) failed_connections / total_duration;
conns_per_sec_total = (long double) total_connections / total_duration;
@@ -3299,14 +3296,16 @@
GNUNET_CONFIGURATION_have_value (config, "TESTING", "HOSTKEYSFILE"))
{
GAUGER_ID ("DHT_TESTING", "HOSTKEY_GENERATION",
- GNUNET_TIME_absolute_get_duration (hostkey_start_time).
- rel_value / (double) num_peers, "ms/hostkey", revision_str);
+ GNUNET_TIME_absolute_get_duration
+ (hostkey_start_time).rel_value / (double) num_peers,
+ "ms/hostkey", revision_str);
}
else
{
GAUGER_ID ("DHT_TESTING", "HOSTKEY_GENERATION_REAL",
- GNUNET_TIME_absolute_get_duration (hostkey_start_time).
- rel_value / (double) num_peers, "ms/hostkey", revision_str);
+ GNUNET_TIME_absolute_get_duration
+ (hostkey_start_time).rel_value / (double) num_peers,
+ "ms/hostkey", revision_str);
}
}
Modified: gnunet/src/dht/gnunet-service-dht.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/dht/gnunet-service-dht.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -934,11 +934,13 @@
/**
* Forward declaration.
*/
-static size_t send_generic_reply (void *cls, size_t size, void *buf);
+static size_t
+send_generic_reply (void *cls, size_t size, void *buf);
/** Declare here so retry_core_send is aware of it */
-static size_t core_transmit_notify (void *cls, size_t size, void *buf);
+static size_t
+core_transmit_notify (void *cls, size_t size, void *buf);
/**
* Convert unique ID to hash code.
@@ -1160,7 +1162,8 @@
result_message->hop_count = htonl (msg_ctx->hop_count + 1);
GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_bloomfilter_get_raw_data (msg_ctx->bloom,
-
result_message->bloomfilter,
+ result_message->
+ bloomfilter,
DHT_BLOOM_SIZE));
result_message->unique_id = GNUNET_htonll (msg_ctx->unique_id);
memcpy (&result_message->key, &msg_ctx->key, sizeof (GNUNET_HashCode));
@@ -1474,9 +1477,9 @@
}
/* Forward declaration */
-static void update_core_preference (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+update_core_preference (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Function called with statistics about the given peer.
*
@@ -1776,7 +1779,8 @@
if (msg_ctx->bloom != NULL)
GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_bloomfilter_get_raw_data (msg_ctx->bloom,
-
route_message->bloomfilter,
+ route_message->
+ bloomfilter,
DHT_BLOOM_SIZE));
memcpy (&route_message->key, &msg_ctx->key, sizeof (GNUNET_HashCode));
memcpy (&route_message[1], msg, ntohs (msg->size));
@@ -1885,8 +1889,8 @@
client->transmit_handle =
GNUNET_SERVER_notify_transmit_ready (client->client_handle,
- ntohs (client->pending_head->msg->
- size),
+ ntohs (client->pending_head->
+ msg->size),
GNUNET_TIME_UNIT_FOREVER_REL,
&send_generic_reply, client);
}
@@ -2457,8 +2461,9 @@
* @param msg the message to be routed
* @param msg_ctx the context containing all pertinent information about the
message
*/
-static void route_message (const struct GNUNET_MessageHeader *msg,
- struct DHT_MessageContext *msg_ctx);
+static void
+route_message (const struct GNUNET_MessageHeader *msg,
+ struct DHT_MessageContext *msg_ctx);
/**
@@ -2815,8 +2820,8 @@
* @param cls closure (a struct RepublishContext)
* @param tc runtime context for this task
*/
-static void republish_content (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+republish_content (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Server handler for initiating local dht put requests
@@ -3509,10 +3514,10 @@
break; /* overflow case */
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Choose %d matching bits (%d bits match me) (%.2f percent)
converge ret %llu\n",
- GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->
- id.hashPubKey, target),
- GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->
- id.hashPubKey,
+ GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->id.
+ hashPubKey, target),
+ GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->id.
+ hashPubKey,
&my_identity.hashPubKey),
(temp_converge_distance / (double) total_distance) * 100,
temp_converge_distance);
@@ -4473,7 +4478,8 @@
temp_bloom);
GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_bloomfilter_get_raw_data (temp_bloom,
-
find_peer_msg->bloomfilter,
+ find_peer_msg->
+ bloomfilter,
DHT_BLOOM_SIZE));
GNUNET_CONTAINER_bloomfilter_free (temp_bloom);
memset (&msg_ctx, 0, sizeof (struct DHT_MessageContext));
Modified: gnunet/src/dht/plugin_dhtlog_dummy.c
===================================================================
--- gnunet/src/dht/plugin_dhtlog_dummy.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/dht/plugin_dhtlog_dummy.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -281,18 +281,18 @@
*
* @return GNUNET_OK on success, GNUNET_SYSERR on failure
*/
-int insert_stat (const struct GNUNET_PeerIdentity *peer,
- unsigned int route_requests, unsigned int route_forwards,
- unsigned int result_requests, unsigned int client_requests,
- unsigned int result_forwards, unsigned int gets,
- unsigned int puts, unsigned int data_inserts,
- unsigned int find_peer_requests,
- unsigned int find_peers_started, unsigned int gets_started,
- unsigned int puts_started,
- unsigned int find_peer_responses_received,
- unsigned int get_responses_received,
- unsigned int find_peer_responses_sent,
- unsigned int get_responses_sent)
+int
+insert_stat (const struct GNUNET_PeerIdentity *peer,
+ unsigned int route_requests, unsigned int route_forwards,
+ unsigned int result_requests, unsigned int client_requests,
+ unsigned int result_forwards, unsigned int gets, unsigned int
puts,
+ unsigned int data_inserts, unsigned int find_peer_requests,
+ unsigned int find_peers_started, unsigned int gets_started,
+ unsigned int puts_started,
+ unsigned int find_peer_responses_received,
+ unsigned int get_responses_received,
+ unsigned int find_peer_responses_sent,
+ unsigned int get_responses_sent)
{
return GNUNET_OK;
}
Modified: gnunet/src/dht/test_dht_api.c
===================================================================
--- gnunet/src/dht/test_dht_api.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/dht/test_dht_api.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -237,8 +237,8 @@
* @param cls closure
* @param tc context information (why was this task triggered now?)
*/
-void retry_find_peer_stop (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+retry_find_peer_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext
*tc);
/**
* Retry the find_peer task on timeout.
Modified: gnunet/src/dht/test_dht_twopeer.c
===================================================================
--- gnunet/src/dht/test_dht_twopeer.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/dht/test_dht_twopeer.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -141,7 +141,8 @@
}
/* Forward declaration */
-static void do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Iterator called on each result obtained for a DHT
@@ -199,8 +200,8 @@
}
-static void stop_retry_get (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+stop_retry_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static void
get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
Modified: gnunet/src/dv/dv.h
===================================================================
--- gnunet/src/dv/dv.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/dv/dv.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -257,17 +257,17 @@
} p2p_dv_MESSAGE_Disconnect;
-struct GNUNET_DV_Handle *GNUNET_DV_connect (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- GNUNET_DV_MessageReceivedHandler
- receive_handler,
- void *receive_handler_cls);
+struct GNUNET_DV_Handle *
+GNUNET_DV_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_DV_MessageReceivedHandler receive_handler,
+ void *receive_handler_cls);
/**
* Disconnect from the DV service
*
* @param handle the current handle to the service to disconnect
*/
-void GNUNET_DV_disconnect (struct GNUNET_DV_Handle *handle);
+void
+GNUNET_DV_disconnect (struct GNUNET_DV_Handle *handle);
#endif
Modified: gnunet/src/dv/dv_api.c
===================================================================
--- gnunet/src/dv/dv_api.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/dv/dv_api.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -180,7 +180,8 @@
return GNUNET_NO;
}
-static void process_pending_message (struct GNUNET_DV_Handle *handle);
+static void
+process_pending_message (struct GNUNET_DV_Handle *handle);
/**
* Send complete, schedule next
@@ -284,8 +285,8 @@
if (NULL ==
(handle->th =
GNUNET_CLIENT_notify_transmit_ready (handle->client,
- ntohs
(handle->current->msg->header.
- size),
+ ntohs (handle->current->msg->
+ header.size),
handle->current->msg->timeout,
GNUNET_YES, &transmit_pending,
handle)))
Modified: gnunet/src/dv/gnunet-service-dv.c
===================================================================
--- gnunet/src/dv/gnunet-service-dv.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/dv/gnunet-service-dv.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -761,8 +761,8 @@
if (plugin_pending_head != NULL)
plugin_transmit_handle =
GNUNET_SERVER_notify_transmit_ready (client_handle,
- ntohs (plugin_pending_head->
- msg->size),
+ ntohs (plugin_pending_head->msg->
+ size),
GNUNET_TIME_UNIT_FOREVER_REL,
&transmit_to_plugin, NULL);
@@ -858,7 +858,8 @@
}
/* Declare here so retry_core_send is aware of it */
-size_t core_transmit_notify (void *cls, size_t size, void *buf);
+size_t
+core_transmit_notify (void *cls, size_t size, void *buf);
/**
* Try to send another message from our core sending list
@@ -999,9 +1000,9 @@
find_context.via = recipient;
find_context.tid = 0;
GNUNET_CONTAINER_multihashmap_get_multiple (extended_neighbors,
- &send_context->distant_peer->
- hashPubKey, &find_specific_id,
- &find_context);
+ &send_context->
+ distant_peer->hashPubKey,
+ &find_specific_id,
&find_context);
if (find_context.tid == 0)
{
@@ -2071,19 +2072,16 @@
}
/** Forward declarations **/
-static int handle_dv_gossip_message (void *cls,
- const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_MessageHeader
*message,
- const struct
- GNUNET_TRANSPORT_ATS_Information *atsi);
+static int
+handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer,
+ const struct GNUNET_MessageHeader *message,
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi);
-static int handle_dv_disconnect_message (void *cls,
- const struct GNUNET_PeerIdentity
*peer,
- const struct GNUNET_MessageHeader
- *message,
- const struct
- GNUNET_TRANSPORT_ATS_Information
- *atsi);
+static int
+handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity
*peer,
+ const struct GNUNET_MessageHeader *message,
+ const struct GNUNET_TRANSPORT_ATS_Information
+ *atsi);
/** End forward declarations **/
@@ -2658,8 +2656,8 @@
atsi[0].value = htonl (referrer->pending_messages[i].distance);
atsi[1].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
atsi[1].value =
- htonl ((uint32_t) referrer->pending_messages[i].latency.
- rel_value);
+ htonl ((uint32_t) referrer->pending_messages[i].
+ latency.rel_value);
atsi[2].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
atsi[2].value = htonl (0);
handle_dv_data_message (NULL, &referrer->pending_messages[i].sender,
Modified: gnunet/src/dv/test_transport_api_dv.c
===================================================================
--- gnunet/src/dv/test_transport_api_dv.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/dv/test_transport_api_dv.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -382,8 +382,8 @@
}
}
-static void send_other_messages (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
*tc);
+static void
+send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Get distance information from 'atsi'.
Modified: gnunet/src/fs/fs.c
===================================================================
--- gnunet/src/fs/fs.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -72,8 +72,8 @@
qe->h->active_blocks -= qe->blocks;
qe->run_time =
GNUNET_TIME_relative_add (qe->run_time,
- GNUNET_TIME_absolute_get_duration (qe->
-
start_time));
+ GNUNET_TIME_absolute_get_duration
+ (qe->start_time));
GNUNET_CONTAINER_DLL_remove (qe->h->running_head, qe->h->running_tail, qe);
GNUNET_CONTAINER_DLL_insert_after (qe->h->pending_head, qe->h->pending_tail,
qe->h->pending_tail, qe);
@@ -638,12 +638,8 @@
* the infromation
* @return NULL on error
*/
-static struct GNUNET_FS_FileInformation *deserialize_file_information (struct
-
GNUNET_FS_Handle
- *h,
- const
- char
-
*filename);
+static struct GNUNET_FS_FileInformation *
+deserialize_file_information (struct GNUNET_FS_Handle *h, const char
*filename);
/**
@@ -1152,8 +1148,8 @@
(GNUNET_OK !=
GNUNET_BIO_write_string (wh,
(fi->data.dir.entries ==
- NULL) ? NULL : fi->data.dir.entries->
- serialization)))
+ NULL) ? NULL : fi->data.dir.
+ entries->serialization)))
{
GNUNET_break (0);
goto cleanup;
@@ -1566,9 +1562,9 @@
(GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->num_children)) ||
(dr->num_children > CHK_PER_INODE) ||
(GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->depth)) || ((dr->depth ==
0)
- && (dr->
-
num_children
- > 0)) ||
+ &&
+
(dr->num_children
+ > 0)) ||
((dr->depth > 0) && (dr->num_children == 0)))
{
GNUNET_break (0);
@@ -2017,11 +2013,12 @@
* @param search associated search
* @param serialization name under which the search was serialized
*/
-static void deserialize_download (struct GNUNET_FS_Handle *h,
- struct GNUNET_BIO_ReadHandle *rh,
- struct GNUNET_FS_DownloadContext *parent,
- struct GNUNET_FS_SearchResult *search,
- const char *serialization);
+static void
+deserialize_download (struct GNUNET_FS_Handle *h,
+ struct GNUNET_BIO_ReadHandle *rh,
+ struct GNUNET_FS_DownloadContext *parent,
+ struct GNUNET_FS_SearchResult *search,
+ const char *serialization);
/**
@@ -2032,16 +2029,11 @@
* @param psearch_result parent search result
* @param serialization name under which the search was serialized
*/
-static struct GNUNET_FS_SearchContext *deserialize_search (struct
- GNUNET_FS_Handle *h,
- struct
-
GNUNET_BIO_ReadHandle
- *rh,
- struct
-
GNUNET_FS_SearchResult
- *psearch_result,
- const char
- *serialization);
+static struct GNUNET_FS_SearchContext *
+deserialize_search (struct GNUNET_FS_Handle *h,
+ struct GNUNET_BIO_ReadHandle *rh,
+ struct GNUNET_FS_SearchResult *psearch_result,
+ const char *serialization);
/**
@@ -2203,7 +2195,8 @@
*
* @param sc search being resumed
*/
-static void signal_search_resume (struct GNUNET_FS_SearchContext *sc);
+static void
+signal_search_resume (struct GNUNET_FS_SearchContext *sc);
/**
@@ -2255,7 +2248,8 @@
*
* @param sc search context to free
*/
-static void free_search_context (struct GNUNET_FS_SearchContext *sc);
+static void
+free_search_context (struct GNUNET_FS_SearchContext *sc);
/**
Modified: gnunet/src/fs/fs.h
===================================================================
--- gnunet/src/fs/fs.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -759,17 +759,17 @@
* @param blocks number of blocks this download has
* @return queue handle
*/
-struct GNUNET_FS_QueueEntry *GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h,
- GNUNET_FS_QueueStart start,
- GNUNET_FS_QueueStop stop,
- void *cls, unsigned int blocks);
+struct GNUNET_FS_QueueEntry *
+GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h, GNUNET_FS_QueueStart start,
+ GNUNET_FS_QueueStop stop, void *cls, unsigned int blocks);
/**
* Dequeue a job from the queue.
* @param qh handle for the job
*/
-void GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh);
+void
+GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh);
/**
@@ -788,9 +788,9 @@
* @param emsg location for the reader to store an error message
* @return number of bytes written, usually "max", 0 on error
*/
-size_t GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset,
- size_t max, void *buf,
- char **emsg);
+size_t
+GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset, size_t max, void *buf,
+ char **emsg);
/**
@@ -799,7 +799,8 @@
* @param filename file to read
* @return closure to use
*/
-void *GNUNET_FS_make_file_reader_context_ (const char *filename);
+void *
+GNUNET_FS_make_file_reader_context_ (const char *filename);
@@ -819,8 +820,9 @@
* @param emsg location for the reader to store an error message
* @return number of bytes written, usually "max", 0 on error
*/
-size_t GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max,
- void *buf, char **emsg);
+size_t
+GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max, void *buf,
+ char **emsg);
/**
* Notification of FS that a search probe has made progress.
@@ -837,9 +839,9 @@
* will be passed to future callbacks in the respective
* field in the GNUNET_FS_ProgressInfo struct.
*/
-void *GNUNET_FS_search_probe_progress_ (void *cls,
- const struct GNUNET_FS_ProgressInfo
- *info);
+void *
+GNUNET_FS_search_probe_progress_ (void *cls,
+ const struct GNUNET_FS_ProgressInfo *info);
/**
@@ -848,8 +850,9 @@
* @param cls "struct GNUNET_FS_PublishContext" identifies the upload
* @param tc task context
*/
-void GNUNET_FS_publish_main_ (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+GNUNET_FS_publish_main_ (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -859,8 +862,8 @@
* @param cls closure, unindex context
* @param file_id computed hash, NULL on error
*/
-void GNUNET_FS_unindex_process_hash_ (void *cls,
- const GNUNET_HashCode * file_id);
+void
+GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id);
/**
@@ -873,10 +876,11 @@
* @param offset where in the file are we so far
* @return value returned from callback
*/
-void *GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
- struct GNUNET_FS_PublishContext *sc,
- const struct GNUNET_FS_FileInformation
*p,
- uint64_t offset);
+void *
+GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+ struct GNUNET_FS_PublishContext *sc,
+ const struct GNUNET_FS_FileInformation *p,
+ uint64_t offset);
/**
@@ -886,8 +890,9 @@
* @param pi structure to fill in
* @param dc overall download context
*/
-void GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
- struct GNUNET_FS_DownloadContext *dc);
+void
+GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+ struct GNUNET_FS_DownloadContext *dc);
/**
@@ -897,9 +902,9 @@
* @param cls the 'struct GNUNET_FS_DownloadContext'
* @param tc scheduler context
*/
-void GNUNET_FS_download_start_task_ (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
- *tc);
+void
+GNUNET_FS_download_start_task_ (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
@@ -911,9 +916,10 @@
* @param uc overall unindex context
* @param offset where we are in the file (for progress)
*/
-void GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
- struct GNUNET_FS_UnindexContext *uc,
- uint64_t offset);
+void
+GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+ struct GNUNET_FS_UnindexContext *uc,
+ uint64_t offset);
/**
* Fill in all of the generic fields for a search event and
@@ -923,8 +929,9 @@
* @param sc overall search context
* @return value returned by the callback
*/
-void *GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
- struct GNUNET_FS_SearchContext *sc);
+void *
+GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+ struct GNUNET_FS_SearchContext *sc);
/**
@@ -932,7 +939,8 @@
*
* @param uc context for the unindex operation.
*/
-void GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc);
+void
+GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc);
/**
* Build the request and actually initiate the search using the
@@ -941,15 +949,16 @@
* @param sc search context
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc);
+int
+GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc);
/**
* Start the downloading process (by entering the queue).
*
* @param dc our download context
*/
-void GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext
- *dc);
+void
+GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc);
/**
@@ -957,7 +966,8 @@
*
* @param sr the search result
*/
-void GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr);
+void
+GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr);
/**
* Remove serialization/deserialization file from disk.
@@ -966,8 +976,9 @@
* @param ext component of the path
* @param ent entity identifier
*/
-void GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext,
- const char *ent);
+void
+GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext,
+ const char *ent);
/**
@@ -977,8 +988,9 @@
* @param ext component of the path
* @param uni unique name of parent
*/
-void GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
- const char *uni);
+void
+GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
+ const char *uni);
/**
@@ -989,7 +1001,8 @@
*
* @param fi the struct to sync
*/
-void GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f);
+void
+GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f);
/**
* Synchronize this publishing struct with its mirror
@@ -999,7 +1012,8 @@
*
* @param pc the struct to sync
*/
-void GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc);
+void
+GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc);
/**
* Synchronize this unindex struct with its mirror
@@ -1009,7 +1023,8 @@
*
* @param uc the struct to sync
*/
-void GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc);
+void
+GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc);
/**
* Synchronize this search struct with its mirror
@@ -1019,7 +1034,8 @@
*
* @param sc the struct to sync
*/
-void GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc);
+void
+GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc);
/**
* Synchronize this search result with its mirror
@@ -1029,7 +1045,8 @@
*
* @param sr the struct to sync
*/
-void GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr);
+void
+GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr);
/**
* Synchronize this download struct with its mirror
@@ -1039,7 +1056,8 @@
*
* @param dc the struct to sync
*/
-void GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc);
+void
+GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc);
/**
* Create SUSPEND event for the given publish operation
@@ -1047,7 +1065,8 @@
*
* @param cls the 'struct GNUNET_FS_PublishContext' to signal for
*/
-void GNUNET_FS_publish_signal_suspend_ (void *cls);
+void
+GNUNET_FS_publish_signal_suspend_ (void *cls);
/**
* Create SUSPEND event for the given search operation
@@ -1055,7 +1074,8 @@
*
* @param cls the 'struct GNUNET_FS_SearchContext' to signal for
*/
-void GNUNET_FS_search_signal_suspend_ (void *cls);
+void
+GNUNET_FS_search_signal_suspend_ (void *cls);
/**
* Create SUSPEND event for the given download operation
@@ -1063,7 +1083,8 @@
*
* @param cls the 'struct GNUNET_FS_DownloadContext' to signal for
*/
-void GNUNET_FS_download_signal_suspend_ (void *cls);
+void
+GNUNET_FS_download_signal_suspend_ (void *cls);
/**
* Create SUSPEND event for the given unindex operation
@@ -1071,7 +1092,8 @@
*
* @param cls the 'struct GNUNET_FS_UnindexContext' to signal for
*/
-void GNUNET_FS_unindex_signal_suspend_ (void *cls);
+void
+GNUNET_FS_unindex_signal_suspend_ (void *cls);
/**
* Function signature of the functions that can be called
@@ -1118,9 +1140,9 @@
* @param ssf_cls closure for ssf
* @return fresh top-level activity handle
*/
-struct TopLevelActivity *GNUNET_FS_make_top (struct GNUNET_FS_Handle *h,
- SuspendSignalFunction ssf,
- void *ssf_cls);
+struct TopLevelActivity *
+GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, SuspendSignalFunction ssf,
+ void *ssf_cls);
/**
@@ -1129,8 +1151,8 @@
* @param h global fs handle
* @param top top level activity entry
*/
-void GNUNET_FS_end_top (struct GNUNET_FS_Handle *h,
- struct TopLevelActivity *top);
+void
+GNUNET_FS_end_top (struct GNUNET_FS_Handle *h, struct TopLevelActivity *top);
@@ -1736,7 +1758,8 @@
*
* @param dr request to free
*/
-void GNUNET_FS_free_download_request_ (struct DownloadRequest *dr);
+void
+GNUNET_FS_free_download_request_ (struct DownloadRequest *dr);
/**
Modified: gnunet/src/fs/fs_download.c
===================================================================
--- gnunet/src/fs/fs_download.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs_download.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -143,7 +143,8 @@
* @param buf where the callee should write the message
* @return number of bytes written to buf
*/
-static size_t transmit_download_request (void *cls, size_t size, void *buf);
+static size_t
+transmit_download_request (void *cls, size_t size, void *buf);
/**
@@ -194,8 +195,9 @@
* @param value value in the hash map (a 'struct DownloadRequest')
* @return GNUNET_YES (we should continue to iterate); unless serious error
*/
-static int process_result_with_request (void *cls, const GNUNET_HashCode * key,
- void *value);
+static int
+process_result_with_request (void *cls, const GNUNET_HashCode * key,
+ void *value);
/**
@@ -261,7 +263,8 @@
*
* @param dc download context that is having trouble
*/
-static void try_reconnect (struct GNUNET_FS_DownloadContext *dc);
+static void
+try_reconnect (struct GNUNET_FS_DownloadContext *dc);
/**
@@ -275,10 +278,11 @@
* @param length number of bytes in data
* @param data contents of the file (or NULL if they were not inlined)
*/
-static void trigger_recursive_download (void *cls, const char *filename,
- const struct GNUNET_FS_Uri *uri,
- const struct GNUNET_CONTAINER_MetaData
- *meta, size_t length, const void
*data);
+static void
+trigger_recursive_download (void *cls, const char *filename,
+ const struct GNUNET_FS_Uri *uri,
+ const struct GNUNET_CONTAINER_MetaData *meta,
+ size_t length, const void *data);
/**
@@ -940,8 +944,8 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received block `%s' matching pending request at depth %u and
offset %llu/%llu\n",
GNUNET_h2s (key), dr->depth, (unsigned long long) dr->offset,
- (unsigned long long) GNUNET_ntohll (dc->uri->data.chk.
- file_length));
+ (unsigned long long) GNUNET_ntohll (dc->uri->data.
+ chk.file_length));
#endif
bs = GNUNET_FS_tree_calculate_block_size (GNUNET_ntohll
@@ -953,8 +957,8 @@
_
("Internal error or bogus download URI (expected %u bytes
at depth %u and offset %llu/%llu, got %u bytes)\n"),
bs, dr->depth, (unsigned long long) dr->offset,
- (unsigned long long) GNUNET_ntohll (dc->uri->data.chk.
- file_length),
+ (unsigned long long) GNUNET_ntohll (dc->uri->data.
+ chk.file_length),
prc->size);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%s", dc->emsg);
while (dr->parent != NULL)
@@ -1077,8 +1081,8 @@
#if DEBUG_DOWNLOAD
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Download completed, truncating file to desired length %llu\n",
- (unsigned long long) GNUNET_ntohll (dc->uri->data.chk.
- file_length));
+ (unsigned long long) GNUNET_ntohll (dc->uri->data.
+ chk.file_length));
#endif
/* truncate file to size (since we store IBlocks at the end) */
if (dc->filename != NULL)
@@ -1757,8 +1761,7 @@
GNUNET_DISK_OPEN_READWRITE |
GNUNET_DISK_OPEN_CREATE |
((0 ==
- GNUNET_FS_uri_chk_get_file_size (dc->
- uri)) ?
+ GNUNET_FS_uri_chk_get_file_size (dc->uri))
?
GNUNET_DISK_OPEN_TRUNCATE : 0),
GNUNET_DISK_PERM_USER_READ |
GNUNET_DISK_PERM_USER_WRITE |
Modified: gnunet/src/fs/fs_file_information.c
===================================================================
--- gnunet/src/fs/fs_file_information.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs_file_information.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -638,8 +638,8 @@
no = GNUNET_NO;
if (GNUNET_OK !=
proc (proc_cls, dir,
- (dir->is_directory) ? dir->data.dir.dir_size : dir->data.file.
- file_size, dir->meta, &dir->keywords, &dir->bo,
+ (dir->is_directory) ? dir->data.dir.dir_size : dir->data.
+ file.file_size, dir->meta, &dir->keywords, &dir->bo,
(dir->is_directory) ? &no : &dir->data.file.do_index,
&dir->client_info))
return;
@@ -651,8 +651,8 @@
no = GNUNET_NO;
if (GNUNET_OK !=
proc (proc_cls, pos,
- (pos->is_directory) ? pos->data.dir.dir_size : pos->data.file.
- file_size, pos->meta, &pos->keywords, &pos->bo,
+ (pos->is_directory) ? pos->data.dir.dir_size : pos->data.
+ file.file_size, pos->meta, &pos->keywords, &pos->bo,
(dir->is_directory) ? &no : &dir->data.file.do_index,
&pos->client_info))
break;
Modified: gnunet/src/fs/fs_publish.c
===================================================================
--- gnunet/src/fs/fs_publish.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs_publish.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -179,8 +179,8 @@
pi.value.publish.specifics.completed.chk_uri = p->chk_uri;
p->client_info =
GNUNET_FS_publish_make_status_ (&pi, pc, p,
- GNUNET_ntohll (p->chk_uri->data.chk.
- file_length));
+ GNUNET_ntohll (p->chk_uri->data.
+ chk.file_length));
}
@@ -1333,8 +1333,8 @@
* @param cls closure of type "struct PublishKskContext*"
* @param tc unused
*/
-static void publish_ksk_cont (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+publish_ksk_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/fs/fs_search.c
===================================================================
--- gnunet/src/fs/fs_search.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs_search.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -440,15 +440,10 @@
* @param psearch parent search result (for namespace update searches)
* @return context that can be used to control the search
*/
-static struct GNUNET_FS_SearchContext *search_start (struct GNUNET_FS_Handle
*h,
- const struct GNUNET_FS_Uri
- *uri, uint32_t anonymity,
- enum
- GNUNET_FS_SearchOptions
- options, void *cctx,
- struct
- GNUNET_FS_SearchResult
- *psearch);
+static struct GNUNET_FS_SearchContext *
+search_start (struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *uri,
+ uint32_t anonymity, enum GNUNET_FS_SearchOptions options,
+ void *cctx, struct GNUNET_FS_SearchResult *psearch);
/**
@@ -813,7 +808,8 @@
*
* @param sc the search to reconnec
*/
-static void try_reconnect (struct GNUNET_FS_SearchContext *sc);
+static void
+try_reconnect (struct GNUNET_FS_SearchContext *sc);
/**
@@ -855,8 +851,8 @@
*
* @param sc context for the search
*/
-static void schedule_transmit_search_request (struct GNUNET_FS_SearchContext
- *sc);
+static void
+schedule_transmit_search_request (struct GNUNET_FS_SearchContext *sc);
/**
Modified: gnunet/src/fs/fs_test_lib.h
===================================================================
--- gnunet/src/fs/fs_test_lib.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs_test_lib.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -53,11 +53,12 @@
* 'GNUNET_FS_TEST_daemons_stop'!
* @param cont_cls closure for cont
*/
-void GNUNET_FS_TEST_daemons_start (const char *template_cfg_file,
- struct GNUNET_TIME_Relative timeout,
- unsigned int total,
- struct GNUNET_FS_TestDaemon **daemons,
- GNUNET_SCHEDULER_Task cont, void *cont_cls);
+void
+GNUNET_FS_TEST_daemons_start (const char *template_cfg_file,
+ struct GNUNET_TIME_Relative timeout,
+ unsigned int total,
+ struct GNUNET_FS_TestDaemon **daemons,
+ GNUNET_SCHEDULER_Task cont, void *cont_cls);
/**
@@ -70,11 +71,11 @@
* @param cont function to call when done
* @param cont_cls closure for cont
*/
-void GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1,
- struct GNUNET_FS_TestDaemon *daemon2,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_SCHEDULER_Task cont,
- void *cont_cls);
+void
+GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1,
+ struct GNUNET_FS_TestDaemon *daemon2,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_SCHEDULER_Task cont, void *cont_cls);
/**
@@ -83,9 +84,8 @@
* @param daemons array with the daemons (must contain at least one)
* @return peer group
*/
-struct GNUNET_TESTING_PeerGroup *GNUNET_FS_TEST_get_group (struct
- GNUNET_FS_TestDaemon
- **daemons);
+struct GNUNET_TESTING_PeerGroup *
+GNUNET_FS_TEST_get_group (struct GNUNET_FS_TestDaemon **daemons);
@@ -96,9 +96,9 @@
* @param off which configuration to get
* @return peer configuration
*/
-const struct GNUNET_CONFIGURATION_Handle
- *GNUNET_FS_TEST_get_configuration (struct GNUNET_FS_TestDaemon **daemons,
- unsigned int off);
+const struct GNUNET_CONFIGURATION_Handle *
+GNUNET_FS_TEST_get_configuration (struct GNUNET_FS_TestDaemon **daemons,
+ unsigned int off);
/**
* Stop daemons used for testing.
@@ -106,8 +106,9 @@
* @param total number of daemons to stop
* @param daemons array with the daemons (values will be clobbered)
*/
-void GNUNET_FS_TEST_daemons_stop (unsigned int total,
- struct GNUNET_FS_TestDaemon **daemons);
+void
+GNUNET_FS_TEST_daemons_stop (unsigned int total,
+ struct GNUNET_FS_TestDaemon **daemons);
/**
@@ -136,12 +137,12 @@
* @param cont function to call when done
* @param cont_cls closure for cont
*/
-void GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon,
- struct GNUNET_TIME_Relative timeout,
- uint32_t anonymity, int do_index, uint64_t size,
- uint32_t seed, unsigned int verbose,
- GNUNET_FS_TEST_UriContinuation cont,
- void *cont_cls);
+void
+GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon,
+ struct GNUNET_TIME_Relative timeout, uint32_t
anonymity,
+ int do_index, uint64_t size, uint32_t seed,
+ unsigned int verbose,
+ GNUNET_FS_TEST_UriContinuation cont, void *cont_cls);
/**
@@ -157,12 +158,12 @@
* @param cont function to call when done
* @param cont_cls closure for cont
*/
-void GNUNET_FS_TEST_download (struct GNUNET_FS_TestDaemon *daemon,
- struct GNUNET_TIME_Relative timeout,
- uint32_t anonymity, uint32_t seed,
- const struct GNUNET_FS_Uri *uri,
- unsigned int verbose, GNUNET_SCHEDULER_Task cont,
- void *cont_cls);
+void
+GNUNET_FS_TEST_download (struct GNUNET_FS_TestDaemon *daemon,
+ struct GNUNET_TIME_Relative timeout,
+ uint32_t anonymity, uint32_t seed,
+ const struct GNUNET_FS_Uri *uri, unsigned int verbose,
+ GNUNET_SCHEDULER_Task cont, void *cont_cls);
Modified: gnunet/src/fs/fs_tree.c
===================================================================
--- gnunet/src/fs/fs_tree.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs_tree.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -395,8 +395,7 @@
if (NULL != te->proc)
te->proc (te->cls, mychk, te->publish_offset, te->current_depth,
(0 ==
- te->
- current_depth) ? GNUNET_BLOCK_TYPE_FS_DBLOCK :
+ te->current_depth) ? GNUNET_BLOCK_TYPE_FS_DBLOCK :
GNUNET_BLOCK_TYPE_FS_IBLOCK, enc, pt_size);
if (NULL != te->progress)
te->progress (te->cls, te->publish_offset, pt_block, pt_size,
Modified: gnunet/src/fs/fs_tree.h
===================================================================
--- gnunet/src/fs/fs_tree.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs_tree.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -40,7 +40,8 @@
* @param flen file length for which to compute the depth
* @return depth of the tree, always > 0. A depth of 1 means only a DBLOCK.
*/
-unsigned int GNUNET_FS_compute_depth (uint64_t flen);
+unsigned int
+GNUNET_FS_compute_depth (uint64_t flen);
/**
@@ -52,7 +53,8 @@
* @param depth depth of the block. depth==0 is a DBLOCK.
* @return number of bytes of payload a subtree of this depth may correspond to
*/
-uint64_t GNUNET_FS_tree_compute_tree_size (unsigned int depth);
+uint64_t
+GNUNET_FS_tree_compute_tree_size (unsigned int depth);
/**
@@ -66,8 +68,9 @@
* @param depth depth of the node in the tree, 0 for DBLOCK
* @return number of bytes stored in this node
*/
-size_t GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset,
- unsigned int depth);
+size_t
+GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset,
+ unsigned int depth);
/**
@@ -134,18 +137,12 @@
* @param cont function to call when done
* @return tree encoder context
*/
-struct GNUNET_FS_TreeEncoder *GNUNET_FS_tree_encoder_create (struct
- GNUNET_FS_Handle
- *h, uint64_t size,
- void *cls,
-
GNUNET_FS_DataReader
- reader,
-
GNUNET_FS_TreeBlockProcessor
- proc,
-
GNUNET_FS_TreeProgressCallback
- progress,
-
GNUNET_SCHEDULER_Task
- cont);
+struct GNUNET_FS_TreeEncoder *
+GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size,
+ void *cls, GNUNET_FS_DataReader reader,
+ GNUNET_FS_TreeBlockProcessor proc,
+ GNUNET_FS_TreeProgressCallback progress,
+ GNUNET_SCHEDULER_Task cont);
/**
@@ -156,7 +153,8 @@
*
* @param te tree encoder to use
*/
-void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
+void
+GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
/**
@@ -170,8 +168,9 @@
* prior to completion and prior to an internal error,
* both "*uri" and "*emsg" will be set to NULL).
*/
-void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
- struct GNUNET_FS_Uri **uri, char **emsg);
+void
+GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
+ struct GNUNET_FS_Uri **uri, char **emsg);
#if 0
@@ -185,8 +184,9 @@
* @param data set to the resume data
* @param size set to the size of the resume data
*/
-void GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder
- *te, void **data, size_t * size);
+void
+GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder *te,
+ void **data, size_t * size);
/**
@@ -197,8 +197,9 @@
* @param data the resume data
* @param size the size of the resume data
*/
-void GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
- const void *data, size_t size);
+void
+GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
+ const void *data, size_t size);
#endif
#endif
Modified: gnunet/src/fs/fs_uri.c
===================================================================
--- gnunet/src/fs/fs_uri.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/fs_uri.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -1834,8 +1834,8 @@
GNUNET_asprintf (&ret, "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX,
GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash,
(const char *) &queryhash,
- (unsigned long long) GNUNET_ntohll (uri->data.loc.fi.
- file_length), peerId,
+ (unsigned long long) GNUNET_ntohll (uri->data.loc.
+ fi.file_length), peerId,
peerSig,
(unsigned long long)
uri->data.loc.expirationTime.abs_value);
GNUNET_free (peerSig);
Modified: gnunet/src/fs/gnunet-download.c
===================================================================
--- gnunet/src/fs/gnunet-download.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/gnunet-download.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -106,8 +106,8 @@
s = GNUNET_STRINGS_relative_time_to_string (info->value.download.eta);
t = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed *
1000LL /
- (info->value.download.duration.
- rel_value + 1));
+ (info->value.download.
+ duration.rel_value + 1));
fprintf (stdout,
_("Downloading `%s' at %llu/%llu (%s remaining, %s/s)\n"),
info->value.download.filename,
@@ -124,8 +124,8 @@
break;
case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
s = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000 /
- (info->value.download.duration.
- rel_value + 1));
+ (info->value.download.
+ duration.rel_value + 1));
fprintf (stdout, _("Downloading `%s' done (%s/s).\n"),
info->value.download.filename, s);
GNUNET_free (s);
Modified: gnunet/src/fs/gnunet-publish.c
===================================================================
--- gnunet/src/fs/gnunet-publish.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/gnunet-publish.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -133,8 +133,8 @@
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
fprintf (stdout, _("Publishing `%s' done.\n"),
info->value.publish.filename);
- s = GNUNET_FS_uri_to_string (info->value.publish.specifics.completed.
- chk_uri);
+ s = GNUNET_FS_uri_to_string (info->value.publish.specifics.
+ completed.chk_uri);
fprintf (stdout, _("URI is `%s'.\n"), s);
GNUNET_free (s);
if (info->value.publish.pctx == NULL)
Modified: gnunet/src/fs/gnunet-search.c
===================================================================
--- gnunet/src/fs/gnunet-search.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/gnunet-search.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -150,8 +150,8 @@
uri = GNUNET_FS_uri_to_string (info->value.search.specifics.result.uri);
printf ("#%u:\n", cnt++);
filename =
- GNUNET_CONTAINER_meta_data_get_by_type (info->value.search.specifics.
- result.meta,
+ GNUNET_CONTAINER_meta_data_get_by_type (info->value.search.
+ specifics.result.meta,
EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME);
if (filename != NULL)
{
@@ -162,8 +162,8 @@
else
printf ("gnunet-download %s\n", uri);
if (verbose)
- GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.result.
- meta, &item_printer, NULL);
+ GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.
+ result.meta, &item_printer, NULL);
printf ("\n");
fflush (stdout);
GNUNET_free_non_null (filename);
Modified: gnunet/src/fs/gnunet-service-fs.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/gnunet-service-fs.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -167,7 +167,8 @@
* GNUNET_NO to process normally (load normal)
* GNUNET_SYSERR to process for free (load low)
*/
-int GSF_test_get_load_too_high_ (uint32_t priority);
+int
+GSF_test_get_load_too_high_ (uint32_t priority);
/**
@@ -176,7 +177,8 @@
*
* @param start time when the datastore request was issued
*/
-void GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start);
+void
+GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start);
Modified: gnunet/src/fs/gnunet-service-fs_cp.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_cp.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -383,7 +383,8 @@
* @param buf where to copy the message
* @return number of bytes copied to buf
*/
-static size_t peer_transmit_ready_cb (void *cls, size_t size, void *buf);
+static size_t
+peer_transmit_ready_cb (void *cls, size_t size, void *buf);
@@ -400,12 +401,11 @@
* long should the client wait until re-trying?
* @param preference current traffic preference for the given peer
*/
-static void core_reserve_callback (void *cls,
- const struct GNUNET_PeerIdentity *peer,
- struct GNUNET_BANDWIDTH_Value32NBO
- bandwidth_out, int32_t amount,
- struct GNUNET_TIME_Relative res_delay,
- uint64_t preference);
+static void
+core_reserve_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
+ int32_t amount, struct GNUNET_TIME_Relative res_delay,
+ uint64_t preference);
/**
@@ -491,9 +491,8 @@
GNUNET_assert (0 < cp->ppd.pending_replies--);
}
GNUNET_LOAD_update (cp->ppd.transmission_delay,
- GNUNET_TIME_absolute_get_duration (pth->
-
transmission_request_start_time).
- rel_value);
+ GNUNET_TIME_absolute_get_duration
+ (pth->transmission_request_start_time).rel_value);
ret = pth->gmc (pth->gmc_cls, size, buf);
GNUNET_assert (NULL == pth->cth);
for (pos = cp->pth_head; pos != NULL; pos = pos->next)
@@ -1732,9 +1731,9 @@
#if DEBUG_FS && 0
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Migration already blocked for another %llu ms\n",
- (unsigned long long) GNUNET_TIME_absolute_get_remaining (cp->
-
last_migration_block).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_remaining
+ (cp->last_migration_block).rel_value);
#endif
return; /* already blocked */
}
Modified: gnunet/src/fs/gnunet-service-fs_cp.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_cp.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -170,11 +170,9 @@
* @param atsi performance data for the connection
* @return handle to connected peer entry
*/
-struct GSF_ConnectedPeer *GSF_peer_connect_handler_ (const struct
- GNUNET_PeerIdentity *peer,
- const struct
-
GNUNET_TRANSPORT_ATS_Information
- *atsi);
+struct GSF_ConnectedPeer *
+GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer,
+ const struct GNUNET_TRANSPORT_ATS_Information
*atsi);
/**
@@ -183,8 +181,8 @@
* @param peer peer's identity
* @return NULL if this peer is not currently connected
*/
-struct GSF_ConnectedPeer *GSF_peer_get_ (const struct GNUNET_PeerIdentity
- *peer);
+struct GSF_ConnectedPeer *
+GSF_peer_get_ (const struct GNUNET_PeerIdentity *peer);
/**
@@ -201,13 +199,10 @@
* @param gmc_cls closure for gmc
* @return handle to cancel request
*/
-struct GSF_PeerTransmitHandle *GSF_peer_transmit_ (struct GSF_ConnectedPeer
*cp,
- int is_query,
- uint32_t priority,
- struct GNUNET_TIME_Relative
- timeout, size_t size,
- GSF_GetMessageCallback gmc,
- void *gmc_cls);
+struct GSF_PeerTransmitHandle *
+GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, int is_query,
+ uint32_t priority, struct GNUNET_TIME_Relative timeout,
+ size_t size, GSF_GetMessageCallback gmc, void *gmc_cls);
/**
@@ -215,7 +210,8 @@
*
* @param pth request to cancel
*/
-void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth);
+void
+GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth);
/**
@@ -225,9 +221,10 @@
* @param request_time time at which the original query was transmitted
* @param request_priority priority of the original request
*/
-void GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp,
- struct GNUNET_TIME_Absolute request_time,
- uint32_t request_priority);
+void
+GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp,
+ struct GNUNET_TIME_Absolute request_time,
+ uint32_t request_priority);
/**
@@ -237,9 +234,9 @@
* @param cp responding peer (will be updated)
* @param initiator_client local client on responsible for query
*/
-void GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp,
- struct GSF_LocalClient
- *initiator_client);
+void
+GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp,
+ struct GSF_LocalClient *initiator_client);
/**
@@ -249,9 +246,10 @@
* @param cp responding peer (will be updated)
* @param initiator_peer other peer responsible for query
*/
-void GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
- const struct GSF_ConnectedPeer
- *initiator_peer);
+void
+GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
+ const struct GSF_ConnectedPeer
+ *initiator_peer);
/**
@@ -265,13 +263,12 @@
* unless we see some further activity from it
* @param atsi status information
*/
-void GSF_peer_status_handler_ (void *cls,
- const struct GNUNET_PeerIdentity *peer,
- struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
- struct GNUNET_BANDWIDTH_Value32NBO
bandwidth_out,
- struct GNUNET_TIME_Absolute timeout,
- const struct GNUNET_TRANSPORT_ATS_Information
- *atsi);
+void
+GSF_peer_status_handler_ (void *cls, const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
+ struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
+ struct GNUNET_TIME_Absolute timeout,
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi);
/**
@@ -285,11 +282,12 @@
* @return GNUNET_OK to keep the connection open,
* GNUNET_SYSERR to close it (signal serious error)
*/
-int GSF_handle_p2p_migration_stop_ (void *cls,
- const struct GNUNET_PeerIdentity *other,
- const struct GNUNET_MessageHeader *message,
- const struct
- GNUNET_TRANSPORT_ATS_Information *atsi);
+int
+GSF_handle_p2p_migration_stop_ (void *cls,
+ const struct GNUNET_PeerIdentity *other,
+ const struct GNUNET_MessageHeader *message,
+ const struct GNUNET_TRANSPORT_ATS_Information
+ *atsi);
/**
@@ -303,11 +301,9 @@
* @param message the actual message
* @return pending request handle, NULL on error
*/
-struct GSF_PendingRequest *GSF_handle_p2p_query_ (const struct
- GNUNET_PeerIdentity *other,
- const struct
- GNUNET_MessageHeader
- *message);
+struct GSF_PendingRequest *
+GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
+ const struct GNUNET_MessageHeader *message);
/**
@@ -316,9 +312,8 @@
* @param cp peer to query
* @return performance data record for the peer
*/
-struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct
-
GSF_ConnectedPeer
- *cp);
+struct GSF_PeerPerformanceData *
+GSF_get_peer_performance_data_ (struct GSF_ConnectedPeer *cp);
/**
@@ -328,8 +323,9 @@
* @param cp peer to ask
* @param block_time until when to block
*/
-void GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
- struct GNUNET_TIME_Relative block_time);
+void
+GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
+ struct GNUNET_TIME_Relative block_time);
/**
@@ -339,8 +335,9 @@
* @param cls unused
* @param peer identity of peer that connected
*/
-void GSF_peer_disconnect_handler_ (void *cls,
- const struct GNUNET_PeerIdentity *peer);
+void
+GSF_peer_disconnect_handler_ (void *cls,
+ const struct GNUNET_PeerIdentity *peer);
/**
@@ -349,7 +346,8 @@
*
* @param lc handle to the local client (henceforth invalid)
*/
-void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc);
+void
+GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc);
/**
@@ -361,8 +359,9 @@
* @param cp peer to reserve bandwidth from
* @param pref preference change
*/
-void GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp,
- uint64_t pref);
+void
+GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp,
+ uint64_t pref);
/**
@@ -371,8 +370,9 @@
* @param cp peer to reserve bandwidth from
* @param id identity to set (written to)
*/
-void GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp,
- struct GNUNET_PeerIdentity *id);
+void
+GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp,
+ struct GNUNET_PeerIdentity *id);
/**
@@ -381,19 +381,22 @@
* @param it function to call for each peer
* @param it_cls closure for it
*/
-void GSF_iterate_connected_peers_ (GSF_ConnectedPeerIterator it, void *it_cls);
+void
+GSF_iterate_connected_peers_ (GSF_ConnectedPeerIterator it, void *it_cls);
/**
* Initialize peer management subsystem.
*/
-void GSF_connected_peer_init_ (void);
+void
+GSF_connected_peer_init_ (void);
/**
* Shutdown peer management subsystem.
*/
-void GSF_connected_peer_done_ (void);
+void
+GSF_connected_peer_done_ (void);
#endif
Modified: gnunet/src/fs/gnunet-service-fs_indexing.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_indexing.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_indexing.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -228,8 +228,7 @@
("Index request received for file `%s' is already indexed as
`%s'. Permitting anyway.\n"),
ii->filename,
(const char *) GNUNET_CONTAINER_multihashmap_get (ifm,
- &ii->
- file_id));
+
&ii->file_id));
GNUNET_SERVER_transmit_context_append_data (ii->tc, NULL, 0,
GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK);
GNUNET_SERVER_transmit_context_run (ii->tc, GNUNET_TIME_UNIT_MINUTES);
@@ -447,8 +446,8 @@
prev->next = next;
GNUNET_break (GNUNET_OK ==
GNUNET_CONTAINER_multihashmap_remove (ifm, &pos->file_id,
- (void *) pos->
- filename));
+ (void *)
+ pos->filename));
GNUNET_free (pos);
found = GNUNET_YES;
}
Modified: gnunet/src/fs/gnunet-service-fs_indexing.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs_indexing.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_indexing.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -54,14 +54,14 @@
* @param cont_cls closure for cont
* @return GNUNET_OK on success
*/
-int GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
- uint32_t size, const void *data,
- enum GNUNET_BLOCK_Type type,
- uint32_t priority, uint32_t anonymity,
- struct GNUNET_TIME_Absolute expiration,
- uint64_t uid,
- GNUNET_DATASTORE_DatumProcessor cont,
- void *cont_cls);
+int
+GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size,
+ const void *data, enum GNUNET_BLOCK_Type
type,
+ uint32_t priority, uint32_t anonymity,
+ struct GNUNET_TIME_Absolute expiration,
+ uint64_t uid,
+ GNUNET_DATASTORE_DatumProcessor cont,
+ void *cont_cls);
/**
* Handle INDEX_START-message.
@@ -70,9 +70,9 @@
* @param client identification of the client
* @param message the actual message
*/
-void GNUNET_FS_handle_index_start (void *cls,
- struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader *message);
+void
+GNUNET_FS_handle_index_start (void *cls, struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *message);
/**
@@ -82,10 +82,9 @@
* @param client identification of the client
* @param message the actual message
*/
-void GNUNET_FS_handle_index_list_get (void *cls,
- struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader
- *message);
+void
+GNUNET_FS_handle_index_list_get (void *cls, struct GNUNET_SERVER_Client
*client,
+ const struct GNUNET_MessageHeader *message);
/**
@@ -95,8 +94,9 @@
* @param client identification of the client
* @param message the actual message
*/
-void GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader *message);
+void
+GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *message);
/**
@@ -106,14 +106,16 @@
* @param d datastore to use
* @return GNUNET_OK on success
*/
-int GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c,
- struct GNUNET_DATASTORE_Handle *d);
+int
+GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c,
+ struct GNUNET_DATASTORE_Handle *d);
/**
* Shutdown the module.
*/
-void GNUNET_FS_indexing_done (void);
+void
+GNUNET_FS_indexing_done (void);
#endif
Modified: gnunet/src/fs/gnunet-service-fs_lc.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs_lc.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_lc.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -36,8 +36,8 @@
* @param client handle of the client
* @return handle to local client entry
*/
-struct GSF_LocalClient *GSF_local_client_lookup_ (struct GNUNET_SERVER_Client
- *client);
+struct GSF_LocalClient *
+GSF_local_client_lookup_ (struct GNUNET_SERVER_Client *client);
/**
@@ -50,12 +50,10 @@
* @param message the actual message
* @return pending request handle for the request, NULL on error
*/
-struct GSF_PendingRequest *GSF_local_client_start_search_handler_ (struct
-
GNUNET_SERVER_Client
- *client,
- const struct
-
GNUNET_MessageHeader
- *message);
+struct GSF_PendingRequest *
+GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader
+ *message);
/**
@@ -66,8 +64,9 @@
* @param lc recipient
* @param msg message to transmit to client
*/
-void GSF_local_client_transmit_ (struct GSF_LocalClient *lc,
- const struct GNUNET_MessageHeader *msg);
+void
+GSF_local_client_transmit_ (struct GSF_LocalClient *lc,
+ const struct GNUNET_MessageHeader *msg);
/**
@@ -76,8 +75,8 @@
* @param cls unused
* @param client handle of the client
*/
-void GSF_client_disconnect_handler_ (void *cls,
- struct GNUNET_SERVER_Client *client);
+void
+GSF_client_disconnect_handler_ (void *cls, struct GNUNET_SERVER_Client
*client);
#endif
Modified: gnunet/src/fs/gnunet-service-fs_pe.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pe.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_pe.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -207,9 +207,9 @@
* @param cls the 'struct GSF_ConnectedPeer' for transmission
* @param tc scheduler context
*/
-static void schedule_peer_transmission (void *cls,
- const struct
- GNUNET_SCHEDULER_TaskContext *tc);
+static void
+schedule_peer_transmission (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -243,8 +243,8 @@
#endif
GNUNET_assert (rp->hn == NULL);
- if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).
- rel_value == 0)
+ if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).rel_value
+ == 0)
rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp,
rp->priority);
else
rp->hn =
@@ -359,8 +359,8 @@
}
/* move ready requests to priority queue */
while ((NULL != (rp = GNUNET_CONTAINER_heap_peek (pp->delay_heap))) &&
- (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).
- rel_value == 0))
+ (GNUNET_TIME_absolute_get_remaining
+ (rp->earliest_transmission).rel_value == 0))
{
GNUNET_assert (rp == GNUNET_CONTAINER_heap_remove_root (pp->delay_heap));
rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp,
rp->priority);
@@ -380,9 +380,9 @@
#if DEBUG_FS
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Sleeping for %llu ms before retrying requests on plan %p.\n",
- (unsigned long long) GNUNET_TIME_absolute_get_remaining (rp->
-
earliest_transmission).
- rel_value, pp);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_remaining
+ (rp->earliest_transmission).rel_value, pp);
#endif
pp->task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
Modified: gnunet/src/fs/gnunet-service-fs_pe.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pe.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_pe.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -35,8 +35,8 @@
* @param cp peer with the entry
* @param pr request with the entry
*/
-void GSF_plan_add_ (struct GSF_ConnectedPeer *cp,
- struct GSF_PendingRequest *pr);
+void
+GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr);
/**
@@ -45,7 +45,8 @@
*
* @param cp connected peer
*/
-void GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp);
+void
+GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp);
/**
@@ -54,19 +55,22 @@
*
* @param pr request that is done
*/
-void GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr);
+void
+GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr);
/**
* Initialize plan subsystem.
*/
-void GSF_plan_init (void);
+void
+GSF_plan_init (void);
/**
* Shutdown plan subsystem.
*/
-void GSF_plan_done (void);
+void
+GSF_plan_done (void);
#endif
Modified: gnunet/src/fs/gnunet-service-fs_pr.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_pr.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -817,9 +817,8 @@
/* short cut: stop processing early, no BF-update, etc. */
update_request_performance_data (prq, pr);
GNUNET_LOAD_update (GSF_rt_entry_lifetime,
- GNUNET_TIME_absolute_get_duration (pr->public_data.
- start_time).
- rel_value);
+ GNUNET_TIME_absolute_get_duration (pr->
+
public_data.start_time).rel_value);
/* pass on to other peers / local clients */
pr->rh (pr->rh_cls, prq->eval, pr, prq->anonymity_level, prq->expiration,
prq->type, prq->data, prq->size);
@@ -1101,9 +1100,8 @@
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Datastore lookup already took %llu ms!\n"),
- (unsigned long long) GNUNET_TIME_absolute_get_duration (pr->
-
qe_start).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (pr->qe_start).rel_value);
pr->warn_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, &warn_delay_task,
pr);
@@ -1123,9 +1121,8 @@
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("On-demand lookup already took %llu ms!\n"),
- (unsigned long long) GNUNET_TIME_absolute_get_duration (pr->
-
qe_start).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (pr->qe_start).rel_value);
pr->warn_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
&odc_warn_delay_task, pr);
@@ -1257,12 +1254,12 @@
GNUNET_BLOCK_TYPE_FS_DBLOCK ?
GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
(0 !=
- (GSF_PRO_PRIORITY_UNLIMITED & pr->
- public_data.options)) ? UINT_MAX : 1
+ (GSF_PRO_PRIORITY_UNLIMITED &
+ pr->public_data.options)) ? UINT_MAX : 1
/* queue priority */ ,
(0 !=
- (GSF_PRO_PRIORITY_UNLIMITED & pr->
- public_data.options)) ? UINT_MAX : 1
+ (GSF_PRO_PRIORITY_UNLIMITED &
+ pr->public_data.options)) ? UINT_MAX : 1
/* max queue size */ ,
GNUNET_TIME_UNIT_FOREVER_REL,
&process_local_reply, pr);
@@ -1298,12 +1295,12 @@
GNUNET_BLOCK_TYPE_FS_DBLOCK ?
GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
(0 !=
- (GSF_PRO_PRIORITY_UNLIMITED & pr->
- public_data.options)) ? UINT_MAX : 1
+ (GSF_PRO_PRIORITY_UNLIMITED &
+ pr->public_data.options)) ? UINT_MAX : 1
/* queue priority */ ,
(0 !=
- (GSF_PRO_PRIORITY_UNLIMITED & pr->
- public_data.options)) ? UINT_MAX : 1
+ (GSF_PRO_PRIORITY_UNLIMITED &
+ pr->public_data.options)) ? UINT_MAX : 1
/* max queue size */ ,
GNUNET_TIME_UNIT_FOREVER_REL,
&process_local_reply, pr);
@@ -1357,12 +1354,12 @@
GNUNET_BLOCK_TYPE_FS_DBLOCK ?
GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
(0 !=
- (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
- options)) ? UINT_MAX : 1
+ (GSF_PRO_PRIORITY_UNLIMITED & pr->
+ public_data.options)) ? UINT_MAX : 1
/* queue priority */ ,
(0 !=
- (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
- options)) ? UINT_MAX : 1
+ (GSF_PRO_PRIORITY_UNLIMITED & pr->
+ public_data.options)) ? UINT_MAX : 1
/* max queue size */ ,
GNUNET_TIME_UNIT_FOREVER_REL,
&process_local_reply, pr);
@@ -1413,12 +1410,12 @@
GNUNET_BLOCK_TYPE_FS_DBLOCK ?
GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
(0 !=
- (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
- options)) ? UINT_MAX : 1
+ (GSF_PRO_PRIORITY_UNLIMITED & pr->
+ public_data.options)) ? UINT_MAX : 1
/* queue priority */ ,
(0 !=
- (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
- options)) ? UINT_MAX : 1
+ (GSF_PRO_PRIORITY_UNLIMITED & pr->
+ public_data.options)) ? UINT_MAX : 1
/* max queue size */ ,
GNUNET_TIME_UNIT_FOREVER_REL,
&process_local_reply, pr);
Modified: gnunet/src/fs/gnunet-service-fs_pr.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs_pr.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_pr.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -201,33 +201,19 @@
* @param rh_cls closure for rh
* @return handle for the new pending request
*/
-struct GSF_PendingRequest *GSF_pending_request_create_ (enum
-
GSF_PendingRequestOptions
- options,
- enum GNUNET_BLOCK_Type
- type,
- const GNUNET_HashCode *
- query,
- const GNUNET_HashCode *
- namespace,
- const struct
- GNUNET_PeerIdentity
- *target,
- const char *bf_data,
- size_t bf_size,
- uint32_t mingle,
- uint32_t
- anonymity_level,
- uint32_t priority,
- int32_t ttl,
- GNUNET_PEER_Id
- sender_pid,
- const GNUNET_HashCode *
- replies_seen,
- unsigned int
- replies_seen_count,
-
GSF_PendingRequestReplyHandler
- rh, void *rh_cls);
+struct GSF_PendingRequest *
+GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
+ enum GNUNET_BLOCK_Type type,
+ const GNUNET_HashCode * query,
+ const GNUNET_HashCode * namespace,
+ const struct GNUNET_PeerIdentity *target,
+ const char *bf_data, size_t bf_size,
+ uint32_t mingle, uint32_t anonymity_level,
+ uint32_t priority, int32_t ttl,
+ GNUNET_PEER_Id sender_pid,
+ const GNUNET_HashCode * replies_seen,
+ unsigned int replies_seen_count,
+ GSF_PendingRequestReplyHandler rh, void *rh_cls);
/**
@@ -238,9 +224,10 @@
* @param replies_seen hash codes of replies that we've seen
* @param replies_seen_count size of the replies_seen array
*/
-void GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
- const GNUNET_HashCode * replies_seen,
- unsigned int replies_seen_count);
+void
+GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
+ const GNUNET_HashCode * replies_seen,
+ unsigned int replies_seen_count);
/**
@@ -249,9 +236,8 @@
* @param pr pending request
* @return associated public data
*/
-struct GSF_PendingRequestData *GSF_pending_request_get_data_ (struct
-
GSF_PendingRequest
- *pr);
+struct GSF_PendingRequestData *
+GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr);
/**
@@ -263,8 +249,9 @@
* @param pra another pending request
* @return GNUNET_OK if the requests are compatible
*/
-int GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
- struct GSF_PendingRequest *prb);
+int
+GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
+ struct GSF_PendingRequest *prb);
/**
@@ -276,9 +263,9 @@
* @param buf where to copy the message (can be NULL)
* @return number of bytes needed (if buf_size too small) or used
*/
-size_t GSF_pending_request_get_message_ (struct GSF_PendingRequest
- *pr, size_t buf_size,
- void *buf);
+size_t
+GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
+ size_t buf_size, void *buf);
/**
@@ -287,8 +274,8 @@
* @param pr request to cancel
* @param full_cleanup fully purge the request
*/
-void GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr,
- int full_cleanup);
+void
+GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup);
/**
@@ -311,7 +298,8 @@
* @param it function to call for each request
* @param cls closure for it
*/
-void GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
+void
+GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
/**
@@ -327,8 +315,9 @@
* GNUNET_SYSERR if the message was malformed (close connection,
* do not cache under any circumstances)
*/
-int GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
- const struct GNUNET_MessageHeader *message);
+int
+GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
+ const struct GNUNET_MessageHeader *message);
/**
@@ -336,7 +325,8 @@
*
* @param pr the pending request to process
*/
-void GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
+void
+GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
/**
@@ -360,20 +350,23 @@
* @param cont function to call at the end
* @param cont_cls closure for cont
*/
-void GSF_local_lookup_ (struct GSF_PendingRequest *pr,
- GSF_LocalLookupContinuation cont, void *cont_cls);
+void
+GSF_local_lookup_ (struct GSF_PendingRequest *pr,
+ GSF_LocalLookupContinuation cont, void *cont_cls);
/**
* Setup the subsystem.
*/
-void GSF_pending_request_init_ (void);
+void
+GSF_pending_request_init_ (void);
/**
* Shutdown the subsystem.
*/
-void GSF_pending_request_done_ (void);
+void
+GSF_pending_request_done_ (void);
#endif
Modified: gnunet/src/fs/gnunet-service-fs_push.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_push.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_push.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -191,7 +191,8 @@
/**
* Find content for migration to this peer.
*/
-static void find_content (struct MigrationReadyPeer *mrp);
+static void
+find_content (struct MigrationReadyPeer *mrp);
/**
@@ -343,7 +344,8 @@
* If the migration task is not currently running, consider
* (re)scheduling it with the appropriate delay.
*/
-static void consider_gathering (void);
+static void
+consider_gathering (void);
/**
@@ -421,9 +423,9 @@
* @param cls unused
* @param tc scheduler context (also unused)
*/
-static void gather_migration_blocks (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+gather_migration_blocks (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/fs/gnunet-service-fs_push.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs_push.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_push.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -32,13 +32,15 @@
/**
* Setup the module.
*/
-void GSF_push_init_ (void);
+void
+GSF_push_init_ (void);
/**
* Shutdown the module.
*/
-void GSF_push_done_ (void);
+void
+GSF_push_done_ (void);
/**
@@ -47,7 +49,8 @@
*
* @param peer handle for the peer that connected
*/
-void GSF_push_start_ (struct GSF_ConnectedPeer *peer);
+void
+GSF_push_start_ (struct GSF_ConnectedPeer *peer);
/**
@@ -56,7 +59,8 @@
*
* @param peer handle for the peer that disconnected
*/
-void GSF_push_stop_ (struct GSF_ConnectedPeer *peer);
+void
+GSF_push_stop_ (struct GSF_ConnectedPeer *peer);
#endif
Modified: gnunet/src/fs/gnunet-service-fs_put.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_put.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_put.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -86,9 +86,9 @@
* @param cls type of blocks to gather
* @param tc scheduler context (unused)
*/
-static void gather_dht_put_blocks (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+gather_dht_put_blocks (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/fs/gnunet-service-fs_put.h
===================================================================
--- gnunet/src/fs/gnunet-service-fs_put.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/gnunet-service-fs_put.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -32,13 +32,15 @@
/**
* Setup the module.
*/
-void GSF_put_init_ (void);
+void
+GSF_put_init_ (void);
/**
* Shutdown the module.
*/
-void GSF_put_done_ (void);
+void
+GSF_put_done_ (void);
#endif
Modified: gnunet/src/fs/perf_gnunet_service_fs_p2p.c
===================================================================
--- gnunet/src/fs/perf_gnunet_service_fs_p2p.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/perf_gnunet_service_fs_p2p.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -129,7 +129,8 @@
/**
* Function that gathers stats from all daemons.
*/
-static void stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext
*tc);
+static void
+stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -206,8 +207,7 @@
sm->stat =
GNUNET_STATISTICS_create ("<driver>",
GNUNET_FS_TEST_get_configuration (daemons,
- sm->
- daemon));
+
sm->daemon));
GNUNET_SCHEDULER_add_now (&stat_run, sm);
}
else
Modified: gnunet/src/fs/perf_gnunet_service_fs_p2p_trust.c
===================================================================
--- gnunet/src/fs/perf_gnunet_service_fs_p2p_trust.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/fs/perf_gnunet_service_fs_p2p_trust.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -162,7 +162,8 @@
/**
* Function that gathers stats from all daemons.
*/
-static void stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext
*tc);
+static void
+stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -244,8 +245,7 @@
sm->stat =
GNUNET_STATISTICS_create ("<driver>",
GNUNET_FS_TEST_get_configuration (daemons,
- sm->
- daemon));
+
sm->daemon));
GNUNET_SCHEDULER_add_now (&stat_run, sm);
}
else
Modified: gnunet/src/fs/test_fs_download.c
===================================================================
--- gnunet/src/fs/test_fs_download.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/test_fs_download.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -140,42 +140,42 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kb/s.\n",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL));
GAUGER ("FS", "Publishing speed (insertion)",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL), "kb/s");
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL), "kb/s");
fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
start = GNUNET_TIME_absolute_get ();
download =
GNUNET_FS_download_start (fs,
- event->value.publish.specifics.completed.
- chk_uri, NULL, fn, NULL, 0, FILESIZE, 1,
- GNUNET_FS_DOWNLOAD_OPTION_NONE, "download",
- NULL);
+ event->value.publish.specifics.
+ completed.chk_uri, NULL, fn, NULL, 0,
+ FILESIZE, 1, GNUNET_FS_DOWNLOAD_OPTION_NONE,
+ "download", NULL);
GNUNET_assert (download != NULL);
break;
case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
printf ("Download complete, %llu kb/s.\n",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL));
GAUGER ("FS", "Local download speed (inserted)",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL), "kb/s");
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL), "kb/s");
GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
break;
case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -185,8 +185,8 @@
(unsigned long long) event->value.download.completed,
(unsigned long long) event->value.download.size,
event->value.download.specifics.progress.depth,
- (unsigned long long) event->value.download.specifics.progress.
- offset);
+ (unsigned long long) event->value.download.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
Modified: gnunet/src/fs/test_fs_download_indexed.c
===================================================================
--- gnunet/src/fs/test_fs_download_indexed.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/test_fs_download_indexed.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -141,42 +141,42 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL));
GAUGER ("FS", "Publishing speed (indexing)",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL), "kb/s");
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL), "kb/s");
fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
start = GNUNET_TIME_absolute_get ();
download =
GNUNET_FS_download_start (fs,
- event->value.publish.specifics.completed.
- chk_uri, NULL, fn, NULL, 0, FILESIZE, 1,
- GNUNET_FS_DOWNLOAD_OPTION_NONE, "download",
- NULL);
+ event->value.publish.specifics.
+ completed.chk_uri, NULL, fn, NULL, 0,
+ FILESIZE, 1, GNUNET_FS_DOWNLOAD_OPTION_NONE,
+ "download", NULL);
GNUNET_assert (download != NULL);
break;
case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
printf ("Download complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL));
GAUGER ("FS", "Local download speed (indexed)",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL), "kb/s");
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL), "kb/s");
GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
break;
case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -186,8 +186,8 @@
(unsigned long long) event->value.download.completed,
(unsigned long long) event->value.download.size,
event->value.download.specifics.progress.depth,
- (unsigned long long) event->value.download.specifics.progress.
- offset);
+ (unsigned long long) event->value.download.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
Modified: gnunet/src/fs/test_fs_download_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_download_persistence.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/fs/test_fs_download_persistence.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -123,8 +123,8 @@
}
-static void *progress_cb (void *cls,
- const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
static void
@@ -171,16 +171,16 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL));
fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
start = GNUNET_TIME_absolute_get ();
GNUNET_assert (download == NULL);
@@ -194,8 +194,8 @@
printf ("Download complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024LL));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024LL));
GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
break;
case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -206,8 +206,8 @@
(unsigned long long) event->value.download.completed,
(unsigned long long) event->value.download.size,
event->value.download.specifics.progress.depth,
- (unsigned long long) event->value.download.specifics.progress.
- offset);
+ (unsigned long long) event->value.download.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
Modified: gnunet/src/fs/test_fs_list_indexed.c
===================================================================
--- gnunet/src/fs/test_fs_list_indexed.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/test_fs_list_indexed.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -110,8 +110,8 @@
printf ("Publish complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000 /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024));
if (0 == strcmp ("list_indexed-context-dir", event->value.publish.cctx))
GNUNET_SCHEDULER_add_continuation (&list_indexed_task, NULL,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
@@ -125,8 +125,8 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
Modified: gnunet/src/fs/test_fs_publish.c
===================================================================
--- gnunet/src/fs/test_fs_publish.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/test_fs_publish.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -98,8 +98,8 @@
printf ("Publish complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000 /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024));
if (0 == strcmp ("publish-context-dir", event->value.publish.cctx))
GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
@@ -112,8 +112,8 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
Modified: gnunet/src/fs/test_fs_publish_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_publish_persistence.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/test_fs_publish_persistence.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -97,8 +97,8 @@
}
-static void *progress_cb (void *cls,
- const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
static void
@@ -149,8 +149,8 @@
printf ("Publish complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000LL /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024));
if (0 == strcmp ("publish-context-dir", event->value.publish.cctx))
GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL);
break;
@@ -163,8 +163,8 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_SUSPEND:
@@ -175,8 +175,9 @@
if (NULL == publish)
{
GNUNET_assert (GNUNET_YES ==
- GNUNET_FS_file_information_is_directory (event->value.
- publish.fi));
+ GNUNET_FS_file_information_is_directory (event->
+ value.publish.
+ fi));
publish = event->value.publish.pc;
return "publish-context-dir";
}
Modified: gnunet/src/fs/test_fs_search.c
===================================================================
--- gnunet/src/fs/test_fs_search.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/test_fs_search.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -101,8 +101,8 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
Modified: gnunet/src/fs/test_fs_search_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_search_persistence.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/test_fs_search_persistence.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -86,8 +86,8 @@
}
-static void *progress_cb (void *cls,
- const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
static void
@@ -140,8 +140,8 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
Modified: gnunet/src/fs/test_fs_unindex.c
===================================================================
--- gnunet/src/fs/test_fs_unindex.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/fs/test_fs_unindex.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -100,16 +100,16 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000 /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024));
start = GNUNET_TIME_absolute_get ();
unindex = GNUNET_FS_unindex_start (fs, fn, "unindex");
GNUNET_assert (unindex != NULL);
@@ -118,8 +118,8 @@
printf ("Unindex complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000 /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024));
GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
break;
@@ -130,8 +130,8 @@
(unsigned long long) event->value.unindex.completed,
(unsigned long long) event->value.unindex.size,
event->value.unindex.specifics.progress.depth,
- (unsigned long long) event->value.unindex.specifics.progress.
- offset);
+ (unsigned long long) event->value.unindex.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_ERROR:
Modified: gnunet/src/fs/test_fs_unindex_persistence.c
===================================================================
--- gnunet/src/fs/test_fs_unindex_persistence.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/fs/test_fs_unindex_persistence.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -94,8 +94,8 @@
}
-static void *progress_cb (void *cls,
- const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
static void
@@ -141,16 +141,16 @@
(unsigned long long) event->value.publish.completed,
(unsigned long long) event->value.publish.size,
event->value.publish.specifics.progress.depth,
- (unsigned long long) event->value.publish.specifics.progress.
- offset);
+ (unsigned long long) event->value.publish.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
printf ("Publishing complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000 /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024));
start = GNUNET_TIME_absolute_get ();
unindex = GNUNET_FS_unindex_start (fs, fn, "unindex");
GNUNET_assert (unindex != NULL);
@@ -159,8 +159,8 @@
printf ("Unindex complete, %llu kbps.\n",
(unsigned long long) (FILESIZE * 1000 /
(1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value) / 1024));
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value) / 1024));
GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
GNUNET_SCHEDULER_REASON_PREREQ_DONE);
break;
@@ -172,8 +172,8 @@
(unsigned long long) event->value.unindex.completed,
(unsigned long long) event->value.unindex.size,
event->value.unindex.specifics.progress.depth,
- (unsigned long long) event->value.unindex.specifics.progress.
- offset);
+ (unsigned long long) event->value.unindex.specifics.
+ progress.offset);
#endif
break;
case GNUNET_FS_STATUS_PUBLISH_SUSPEND:
Modified: gnunet/src/hostlist/hostlist-client.c
===================================================================
--- gnunet/src/hostlist/hostlist-client.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/hostlist/hostlist-client.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -476,7 +476,8 @@
* Method to save hostlist to a file during hostlist client shutdown
* @param shutdown set if called because of shutdown, entries in linked list
will be destroyed
*/
-static void save_hostlist_file (int shutdown);
+static void
+save_hostlist_file (int shutdown);
/**
@@ -708,8 +709,8 @@
* @param cls closure, unused
* @param tc task context, unused
*/
-static void task_download (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+task_download (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/hostlist/hostlist-client.h
===================================================================
--- gnunet/src/hostlist/hostlist-client.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/hostlist/hostlist-client.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -89,17 +89,19 @@
* @param learn set if client is learning new hostlists
* @return GNUNET_OK on success
*/
-int GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
- struct GNUNET_STATISTICS_Handle *st,
- GNUNET_CORE_ConnectEventHandler *ch,
- GNUNET_CORE_DisconnectEventHandler *dh,
- GNUNET_CORE_MessageCallback *msgh, int
learn);
+int
+GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
+ struct GNUNET_STATISTICS_Handle *st,
+ GNUNET_CORE_ConnectEventHandler *ch,
+ GNUNET_CORE_DisconnectEventHandler *dh,
+ GNUNET_CORE_MessageCallback *msgh, int learn);
/**
* Stop downloading hostlists from hostlist servers as necessary.
*/
-void GNUNET_HOSTLIST_client_stop (void);
+void
+GNUNET_HOSTLIST_client_stop (void);
#endif
Modified: gnunet/src/hostlist/hostlist-server.c
===================================================================
--- gnunet/src/hostlist/hostlist-server.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/hostlist/hostlist-server.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -448,8 +448,8 @@
* Function that queries MHD's select sets and
* starts the task waiting for them.
*/
-static GNUNET_SCHEDULER_TaskIdentifier prepare_daemon (struct MHD_Daemon
- *daemon_handle);
+static GNUNET_SCHEDULER_TaskIdentifier
+prepare_daemon (struct MHD_Daemon *daemon_handle);
/**
Modified: gnunet/src/hostlist/hostlist-server.h
===================================================================
--- gnunet/src/hostlist/hostlist-server.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/hostlist/hostlist-server.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -38,18 +38,20 @@
*
* @return GNUNET_OK on success
*/
-int GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
- struct GNUNET_STATISTICS_Handle *st,
- struct GNUNET_CORE_Handle *core,
- GNUNET_CORE_ConnectEventHandler *server_ch,
- GNUNET_CORE_DisconnectEventHandler
*server_dh,
- int advertise);
+int
+GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
+ struct GNUNET_STATISTICS_Handle *st,
+ struct GNUNET_CORE_Handle *core,
+ GNUNET_CORE_ConnectEventHandler *server_ch,
+ GNUNET_CORE_DisconnectEventHandler *server_dh,
+ int advertise);
/**
* Stop server offering our hostlist.
*/
-void GNUNET_HOSTLIST_server_stop (void);
+void
+GNUNET_HOSTLIST_server_stop (void);
#endif
Modified: gnunet/src/include/gnunet_arm_service.h
===================================================================
--- gnunet/src/include/gnunet_arm_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_arm_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -73,9 +73,9 @@
* @param service service that *this* process is implementing/providing, can
be NULL
* @return context to use for further ARM operations, NULL on error
*/
-struct GNUNET_ARM_Handle *GNUNET_ARM_connect (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *service);
+struct GNUNET_ARM_Handle *
+GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *service);
/**
@@ -83,7 +83,8 @@
*
* @param h the handle that was being used
*/
-void GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
+void
+GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
/**
@@ -104,10 +105,10 @@
* @param cb callback to invoke when service is ready
* @param cb_cls closure for callback
*/
-void GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h,
- const char *service_name,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_ARM_Callback cb, void *cb_cls);
+void
+GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h, const char
*service_name,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_ARM_Callback cb, void *cb_cls);
/**
@@ -121,10 +122,10 @@
* @param cb callback to invoke when service is ready
* @param cb_cls closure for callback
*/
-void GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h,
- const char *service_name,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_ARM_Callback cb, void *cb_cls);
+void
+GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h, const char *service_name,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_ARM_Callback cb, void *cb_cls);
Modified: gnunet/src/include/gnunet_ats_service.h
===================================================================
--- gnunet/src/include/gnunet_ats_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_ats_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -83,10 +83,10 @@
* @param alloc_cb_cls closure for 'alloc_cb'
* @return ats context
*/
-struct GNUNET_ATS_Handle *GNUNET_ATS_init (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
-
GNUNET_TRANSPORT_ATS_AllocationNotification
- alloc_cb, void *alloc_cb_cls);
+struct GNUNET_ATS_Handle *
+GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_TRANSPORT_ATS_AllocationNotification alloc_cb,
+ void *alloc_cb_cls);
/**
@@ -94,7 +94,8 @@
*
* @param atc handle
*/
-void GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc);
+void
+GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc);
/**
@@ -140,15 +141,11 @@
* @param cb function to call with the address
* @param cb_cls closure for cb
*/
-struct GNUNET_ATS_SuggestionContext *GNUNET_ATS_suggest_address (struct
-
GNUNET_ATS_Handle
- *atc,
- const struct
-
GNUNET_PeerIdentity
- *peer,
-
GNUNET_ATS_AddressSuggestionCallback
- cb,
- void *cb_cls);
+struct GNUNET_ATS_SuggestionContext *
+GNUNET_ATS_suggest_address (struct GNUNET_ATS_Handle *atc,
+ const struct GNUNET_PeerIdentity *peer,
+ GNUNET_ATS_AddressSuggestionCallback cb,
+ void *cb_cls);
/**
@@ -156,8 +153,8 @@
*
* @param asc handle of the request to cancel
*/
-void GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext
- *asc);
+void
+GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext *asc);
/**
@@ -174,12 +171,13 @@
* @param ats performance data for the connection
* @param ats_count number of performance records in 'ats'
*/
-void GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
- const struct GNUNET_PeerIdentity *peer,
- const char *plugin_name, struct Session *session,
- const void *plugin_addr, size_t plugin_addr_len,
- const struct GNUNET_TRANSPORT_ATS_Information
- *ats, uint32_t ats_count);
+void
+GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
+ const struct GNUNET_PeerIdentity *peer,
+ const char *plugin_name, struct Session *session,
+ const void *plugin_addr, size_t plugin_addr_len,
+ const struct GNUNET_TRANSPORT_ATS_Information *ats,
+ uint32_t ats_count);
/**
@@ -190,8 +188,9 @@
* @param atc handle
* @param peer identity of the peer
*/
-void GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc,
- const struct GNUNET_PeerIdentity *peer);
+void
+GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc,
+ const struct GNUNET_PeerIdentity *peer);
/**
@@ -201,9 +200,10 @@
* @param peer identity of the peer
* @param session session handle that is no longer valid
*/
-void GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc,
- const struct GNUNET_PeerIdentity *peer,
- const struct Session *session);
+void
+GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc,
+ const struct GNUNET_PeerIdentity *peer,
+ const struct Session *session);
/**
@@ -224,14 +224,14 @@
* @param ats performance data for the address
* @param ats_count number of performance records in 'ats'
*/
-void GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc,
- const struct GNUNET_PeerIdentity *peer,
- struct GNUNET_TIME_Absolute valid_until,
- const char *plugin_name,
- struct Session *session,
- const void *plugin_addr, size_t
plugin_addr_len,
- const struct GNUNET_TRANSPORT_ATS_Information
- *ats, uint32_t ats_count);
+void
+GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc,
+ const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_TIME_Absolute valid_until,
+ const char *plugin_name, struct Session *session,
+ const void *plugin_addr, size_t plugin_addr_len,
+ const struct GNUNET_TRANSPORT_ATS_Information *ats,
+ uint32_t ats_count);
#endif
Modified: gnunet/src/include/gnunet_bandwidth_lib.h
===================================================================
--- gnunet/src/include/gnunet_bandwidth_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_bandwidth_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -89,8 +89,8 @@
* @param bytes_per_second value to create
* @return the new bandwidth value
*/
-struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_init (uint32_t
-
bytes_per_second);
+struct GNUNET_BANDWIDTH_Value32NBO
+GNUNET_BANDWIDTH_value_init (uint32_t bytes_per_second);
/**
@@ -107,12 +107,11 @@
* @param deadline when is the deadline
* @return number of bytes available at bps until deadline
*/
-uint64_t GNUNET_BANDWIDTH_value_get_available_until (struct
-
GNUNET_BANDWIDTH_Value32NBO
- bps,
- struct
-
GNUNET_TIME_Relative
-
deadline);
+uint64_t
+GNUNET_BANDWIDTH_value_get_available_until (struct GNUNET_BANDWIDTH_Value32NBO
+ bps,
+ struct GNUNET_TIME_Relative
+ deadline);
/**
@@ -123,11 +122,9 @@
* @param size number of bytes we want to have available
* @return how long it would take
*/
-struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_value_get_delay_for (struct
-
GNUNET_BANDWIDTH_Value32NBO
- bps,
- uint64_t
- size);
+struct GNUNET_TIME_Relative
+GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps,
+ uint64_t size);
@@ -138,12 +135,9 @@
* @param b2 second value
* @return the min of b1 and b2
*/
-struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_min (struct
-
GNUNET_BANDWIDTH_Value32NBO
- b1,
- struct
-
GNUNET_BANDWIDTH_Value32NBO
- b2);
+struct GNUNET_BANDWIDTH_Value32NBO
+GNUNET_BANDWIDTH_value_min (struct GNUNET_BANDWIDTH_Value32NBO b1,
+ struct GNUNET_BANDWIDTH_Value32NBO b2);
/**
@@ -160,10 +154,10 @@
* @param max_carry_s maximum number of seconds unused bandwidth
* may accumulate before it expires
*/
-void GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
- struct GNUNET_BANDWIDTH_Value32NBO
- bytes_per_second_limit,
- uint32_t max_carry_s);
+void
+GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
+ struct GNUNET_BANDWIDTH_Value32NBO
+ bytes_per_second_limit, uint32_t max_carry_s);
/**
@@ -177,8 +171,9 @@
* @param size number of bytes consumed
* @return GNUNET_YES if this consumption is above the limit
*/
-int GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av,
- ssize_t size);
+int
+GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av,
+ ssize_t size);
/**
@@ -190,10 +185,9 @@
* @param size number of bytes we would like to consume
* @return time to wait for consumption to be OK
*/
-struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_tracker_get_delay (struct
-
GNUNET_BANDWIDTH_Tracker
- *av,
- size_t size);
+struct GNUNET_TIME_Relative
+GNUNET_BANDWIDTH_tracker_get_delay (struct GNUNET_BANDWIDTH_Tracker *av,
+ size_t size);
/**
@@ -203,9 +197,8 @@
* @param av tracker to query
* @return number of bytes available for consumption right now
*/
-int64_t GNUNET_BANDWIDTH_tracker_get_available (struct
-
GNUNET_BANDWIDTH_Tracker
- *av);
+int64_t
+GNUNET_BANDWIDTH_tracker_get_available (struct GNUNET_BANDWIDTH_Tracker *av);
/**
@@ -214,9 +207,10 @@
* @param av tracker to initialize
* @param bytes_per_second_limit new limit to assume
*/
-void GNUNET_BANDWIDTH_tracker_update_quota (struct GNUNET_BANDWIDTH_Tracker
*av,
- struct GNUNET_BANDWIDTH_Value32NBO
- bytes_per_second_limit);
+void
+GNUNET_BANDWIDTH_tracker_update_quota (struct GNUNET_BANDWIDTH_Tracker *av,
+ struct GNUNET_BANDWIDTH_Value32NBO
+ bytes_per_second_limit);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_bio_lib.h
===================================================================
--- gnunet/src/include/gnunet_bio_lib.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/include/gnunet_bio_lib.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -49,7 +49,8 @@
* @param fn file name to be opened
* @return IO handle on success, NULL on error
*/
-struct GNUNET_BIO_ReadHandle *GNUNET_BIO_read_open (const char *fn);
+struct GNUNET_BIO_ReadHandle *
+GNUNET_BIO_read_open (const char *fn);
/**
@@ -60,7 +61,8 @@
* @param emsg set to the error message
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
+int
+GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
/**
@@ -72,8 +74,9 @@
* @param len the number of bytes to read
* @return GNUNET_OK on success, GNUNET_SYSERR on failure
*/
-int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
- void *result, size_t len);
+int
+GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
+ void *result, size_t len);
/**
@@ -86,8 +89,9 @@
* @param len the number of bytes to read
* @return GNUNET_OK on success, GNUNET_SYSERR on failure
*/
-int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file,
- int line, void *result, size_t len);
+int
+GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file, int
line,
+ void *result, size_t len);
/**
* Read 0-terminated string from a file.
@@ -99,8 +103,9 @@
* @param maxLen maximum allowed length for the string
* @return GNUNET_OK on success, GNUNET_SYSERR on failure
*/
-int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
- char **result, size_t maxLen);
+int
+GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
+ char **result, size_t maxLen);
/**
@@ -111,9 +116,9 @@
* @param result the buffer to store a pointer to the (allocated) metadata
* @return GNUNET_OK on success, GNUNET_SYSERR on failure
*/
-int GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h,
- const char *what,
- struct GNUNET_CONTAINER_MetaData **result);
+int
+GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
+ struct GNUNET_CONTAINER_MetaData **result);
/**
@@ -144,8 +149,9 @@
* @param i address of 32-bit integer to read
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
- int line, int32_t * i);
+int
+GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
+ int line, int32_t * i);
/**
@@ -166,8 +172,9 @@
* @param i address of 64-bit integer to read
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
- int line, int64_t * i);
+int
+GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
+ int line, int64_t * i);
/**
@@ -190,7 +197,8 @@
* @param fn file name to be opened
* @return IO handle on success, NULL on error
*/
-struct GNUNET_BIO_WriteHandle *GNUNET_BIO_write_open (const char *fn);
+struct GNUNET_BIO_WriteHandle *
+GNUNET_BIO_write_open (const char *fn);
/**
@@ -199,7 +207,8 @@
* @param h file handle
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
+int
+GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
/**
@@ -210,8 +219,9 @@
* @param n number of bytes to write
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
- size_t n);
+int
+GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
+ size_t n);
/**
@@ -221,7 +231,8 @@
* @param s string to write (can be NULL)
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
+int
+GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
@@ -233,8 +244,9 @@
* @param m metadata to write
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
- const struct GNUNET_CONTAINER_MetaData *m);
+int
+GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
+ const struct GNUNET_CONTAINER_MetaData *m);
@@ -264,7 +276,8 @@
* @param i address of 32-bit integer to write
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
+int
+GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
/**
@@ -274,7 +287,8 @@
* @param i address of 64-bit integer to write
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i);
+int
+GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_block_lib.h
===================================================================
--- gnunet/src/include/gnunet_block_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_block_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -161,8 +161,9 @@
* @param mingle_number number for hash permutation
* @param hc where to store the result.
*/
-void GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in,
- uint32_t mingle_number, GNUNET_HashCode * hc);
+void
+GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in, uint32_t mingle_number,
+ GNUNET_HashCode * hc);
/**
@@ -171,9 +172,8 @@
* @param cfg configuration to use
* @return NULL on error
*/
-struct GNUNET_BLOCK_Context *GNUNET_BLOCK_context_create (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg);
+struct GNUNET_BLOCK_Context *
+GNUNET_BLOCK_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -181,7 +181,8 @@
*
* @param ctx context to destroy
*/
-void GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
+void
+GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
/**
@@ -202,23 +203,14 @@
* @param reply_block_size number of bytes in reply block
* @return characterization of result
*/
-enum GNUNET_BLOCK_EvaluationResult GNUNET_BLOCK_evaluate (struct
- GNUNET_BLOCK_Context
- *ctx,
- enum
GNUNET_BLOCK_Type
- type,
- const GNUNET_HashCode
- * query,
- struct
-
GNUNET_CONTAINER_BloomFilter
- **bf,
- int32_t bf_mutator,
- const void *xquery,
- size_t xquery_size,
- const void
- *reply_block,
- size_t
- reply_block_size);
+enum GNUNET_BLOCK_EvaluationResult
+GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
+ enum GNUNET_BLOCK_Type type,
+ const GNUNET_HashCode * query,
+ struct GNUNET_CONTAINER_BloomFilter **bf,
+ int32_t bf_mutator, const void *xquery,
+ size_t xquery_size, const void *reply_block,
+ size_t reply_block_size);
/**
@@ -234,9 +226,10 @@
* GNUNET_SYSERR if type not supported
* (or if extracting a key from a block of this type does not work)
*/
-int GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
- enum GNUNET_BLOCK_Type type, const void *block,
- size_t block_size, GNUNET_HashCode * key);
+int
+GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
+ enum GNUNET_BLOCK_Type type, const void *block,
+ size_t block_size, GNUNET_HashCode * key);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_chat_service.h
===================================================================
--- gnunet/src/include/gnunet_chat_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_chat_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -183,26 +183,19 @@
* @param me member ID (pseudonym)
* @return NULL on error
*/
-struct GNUNET_CHAT_Room *GNUNET_CHAT_join_room (const struct
- GNUNET_CONFIGURATION_Handle
- *cfg, const char *nick_name,
- struct
GNUNET_CONTAINER_MetaData
- *member_info,
- const char *room_name,
- enum GNUNET_CHAT_MsgOptions
- msg_options,
- GNUNET_CHAT_JoinCallback
- joinCallback, void *join_cls,
- GNUNET_CHAT_MessageCallback
- messageCallback,
- void *message_cls,
- GNUNET_CHAT_MemberListCallback
- memberCallback,
- void *member_cls,
- GNUNET_CHAT_MessageConfirmation
- confirmationCallback,
- void *confirmation_cls,
- GNUNET_HashCode * me);
+struct GNUNET_CHAT_Room *
+GNUNET_CHAT_join_room (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *nick_name,
+ struct GNUNET_CONTAINER_MetaData *member_info,
+ const char *room_name,
+ enum GNUNET_CHAT_MsgOptions msg_options,
+ GNUNET_CHAT_JoinCallback joinCallback, void *join_cls,
+ GNUNET_CHAT_MessageCallback messageCallback,
+ void *message_cls,
+ GNUNET_CHAT_MemberListCallback memberCallback,
+ void *member_cls,
+ GNUNET_CHAT_MessageConfirmation confirmationCallback,
+ void *confirmation_cls, GNUNET_HashCode * me);
/**
* Send a message.
@@ -213,18 +206,18 @@
* @param receiver use NULL to send to everyone in the room
* @param sequence_number where to write the sequence id of the message
*/
-void GNUNET_CHAT_send_message (struct GNUNET_CHAT_Room *room,
- const char *message,
- enum GNUNET_CHAT_MsgOptions options,
- const struct
- GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *receiver, uint32_t * sequence_number);
+void
+GNUNET_CHAT_send_message (struct GNUNET_CHAT_Room *room, const char *message,
+ enum GNUNET_CHAT_MsgOptions options,
+ const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+ *receiver, uint32_t * sequence_number);
/**
* Leave a chat room.
*/
-void GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room);
+void
+GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room);
#if 0
@@ -241,9 +234,10 @@
* List all of the (publically visible) chat rooms.
* @return number of rooms on success, GNUNET_SYSERR if iterator aborted
*/
-int GNUNET_CHAT_list_rooms (struct GNUNET_GE_Context *ectx,
- struct GNUNET_GC_Configuration *cfg,
- GNUNET_CHAT_RoomIterator it, void *cls);
+int
+GNUNET_CHAT_list_rooms (struct GNUNET_GE_Context *ectx,
+ struct GNUNET_GC_Configuration *cfg,
+ GNUNET_CHAT_RoomIterator it, void *cls);
#endif
Modified: gnunet/src/include/gnunet_client_lib.h
===================================================================
--- gnunet/src/include/gnunet_client_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_client_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -53,11 +53,9 @@
* @param cfg configuration to use
* @return NULL on error (service unknown to configuration)
*/
-struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char
- *service_name,
- const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg);
+struct GNUNET_CLIENT_Connection *
+GNUNET_CLIENT_connect (const char *service_name,
+ const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -66,8 +64,9 @@
* @param h client handle
* @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
*/
-void GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
- int do_ignore);
+void
+GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
+ int do_ignore);
@@ -86,8 +85,9 @@
* @param finish_pending_write should a transmission already passed to the
* handle be completed?
*/
-void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
- int finish_pending_write);
+void
+GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
+ int finish_pending_write);
/**
* Type of a function to call when we receive a message
@@ -120,10 +120,10 @@
* @param handler_cls closure for handler
* @param timeout how long to wait until timing out
*/
-void GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
- GNUNET_CLIENT_MessageHandler handler,
- void *handler_cls,
- struct GNUNET_TIME_Relative timeout);
+void
+GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
+ GNUNET_CLIENT_MessageHandler handler, void *handler_cls,
+ struct GNUNET_TIME_Relative timeout);
/**
@@ -152,20 +152,13 @@
* non-NULL if the notify callback was queued (can be used to cancel
* using GNUNET_CONNECTION_notify_transmit_ready_cancel)
*/
-struct GNUNET_CLIENT_TransmitHandle *GNUNET_CLIENT_notify_transmit_ready
(struct
-
GNUNET_CLIENT_Connection
-
*sock,
-
size_t
- size,
-
struct
-
GNUNET_TIME_Relative
-
timeout,
- int
-
auto_retry,
-
GNUNET_CONNECTION_TransmitReadyNotify
-
notify,
- void
-
*notify_cls);
+struct GNUNET_CLIENT_TransmitHandle *
+GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock,
+ size_t size,
+ struct GNUNET_TIME_Relative timeout,
+ int auto_retry,
+ GNUNET_CONNECTION_TransmitReadyNotify
+ notify, void *notify_cls);
/**
@@ -173,9 +166,9 @@
*
* @param th handle from the original request.
*/
-void GNUNET_CLIENT_notify_transmit_ready_cancel (struct
- GNUNET_CLIENT_TransmitHandle
- *th);
+void
+GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle
+ *th);
/**
@@ -199,14 +192,13 @@
* @return GNUNET_OK on success, GNUNET_SYSERR if a request
* is already pending
*/
-int GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection
- *sock,
- const struct GNUNET_MessageHeader
- *hdr,
- struct GNUNET_TIME_Relative
- timeout, int auto_retry,
- GNUNET_CLIENT_MessageHandler rn,
- void *rn_cls);
+int
+GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection *sock,
+ const struct GNUNET_MessageHeader
*hdr,
+ struct GNUNET_TIME_Relative timeout,
+ int auto_retry,
+ GNUNET_CLIENT_MessageHandler rn,
+ void *rn_cls);
/**
@@ -220,10 +212,11 @@
* or "TIMEOUT" (service not known to be running))
* @param task_cls closure for task
*/
-void GNUNET_CLIENT_service_test (const char *service,
- const struct GNUNET_CONFIGURATION_Handle *cfg,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_SCHEDULER_Task task, void *task_cls);
+void
+GNUNET_CLIENT_service_test (const char *service,
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_SCHEDULER_Task task, void *task_cls);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_common.h
===================================================================
--- gnunet/src/include/gnunet_common.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/include/gnunet_common.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -168,7 +168,8 @@
* @param message what is the message (format string)
* @param ... arguments for format string
*/
-void GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
+void
+GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
@@ -181,8 +182,9 @@
* @param message what is the message (format string)
* @param ... arguments for format string
*/
-void GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
- const char *message, ...);
+void
+GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
+ const char *message, ...);
/**
@@ -191,7 +193,8 @@
* @param n number of log calls to ignore
* @param check_reset GNUNET_YES to assert that the log skip counter is
currently zero
*/
-void GNUNET_log_skip (unsigned int n, int check_reset);
+void
+GNUNET_log_skip (unsigned int n, int check_reset);
/**
@@ -202,8 +205,8 @@
* @param logfile change logging to logfile (use NULL to keep stderr)
* @return GNUNET_OK on success, GNUNET_SYSERR if logfile could not be opened
*/
-int GNUNET_log_setup (const char *comp, const char *loglevel,
- const char *logfile);
+int
+GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile);
/**
@@ -212,7 +215,8 @@
* @param logger log function
* @param logger_cls closure for logger
*/
-void GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls);
+void
+GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls);
/**
@@ -221,7 +225,8 @@
* @param logger log function
* @param logger_cls closure for logger
*/
-void GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
+void
+GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
/**
@@ -232,7 +237,8 @@
* @param hc the hash code
* @return string
*/
-const char *GNUNET_h2s (const GNUNET_HashCode * hc);
+const char *
+GNUNET_h2s (const GNUNET_HashCode * hc);
/**
@@ -244,7 +250,8 @@
* @param hc the hash code
* @return string
*/
-const char *GNUNET_h2s_full (const GNUNET_HashCode * hc);
+const char *
+GNUNET_h2s_full (const GNUNET_HashCode * hc);
/**
@@ -256,7 +263,8 @@
* @return string form of the pid; will be overwritten by next
* call to GNUNET_i2s.
*/
-const char *GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
+const char *
+GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
/**
@@ -269,7 +277,8 @@
* @return nicely formatted string for the address
* will be overwritten by next call to GNUNET_a2s.
*/
-const char *GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen);
+const char *
+GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen);
/**
* Convert error type to string.
@@ -277,7 +286,8 @@
* @param kind type to convert
* @return string corresponding to the type
*/
-const char *GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
+const char *
+GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
/**
@@ -327,14 +337,16 @@
* @param n the value in network byte order
* @return the same value in host byte order
*/
-unsigned long long GNUNET_ntohll (unsigned long long n);
+unsigned long long
+GNUNET_ntohll (unsigned long long n);
/**
* Convert a long long to network-byte-order.
* @param n the value in host byte order
* @return the same value in network byte order
*/
-unsigned long long GNUNET_htonll (unsigned long long n);
+unsigned long long
+GNUNET_htonll (unsigned long long n);
/* ************************* allocation functions ****************** */
@@ -468,7 +480,8 @@
* @param ... data for format string
* @return number of bytes written to buf or negative value on error
*/
-int GNUNET_snprintf (char *buf, size_t size, const char *format, ...);
+int
+GNUNET_snprintf (char *buf, size_t size, const char *format, ...);
/**
@@ -479,7 +492,8 @@
* @param ... data for format string
* @return number of bytes in "*buf" excluding 0-termination
*/
-int GNUNET_asprintf (char **buf, const char *format, ...);
+int
+GNUNET_asprintf (char **buf, const char *format, ...);
/* ************** internal implementations, use macros above! ************** */
@@ -495,7 +509,8 @@
* @param linenumber line where this call is being made (for debugging)
* @return allocated memory, never NULL
*/
-void *GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber);
+void *
+GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber);
@@ -510,8 +525,9 @@
* @param linenumber line where this call is being made (for debugging)
* @return allocated memory, never NULL
*/
-void *GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
- int linenumber);
+void *
+GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
+ int linenumber);
/**
@@ -526,15 +542,15 @@
* @param linenumber line where this call is being made (for debugging)
* @return pointer to size bytes of memory, NULL if we do not have enough
memory
*/
-void *GNUNET_xmalloc_unchecked_ (size_t size, const char *filename,
- int linenumber);
+void *
+GNUNET_xmalloc_unchecked_ (size_t size, const char *filename, int linenumber);
/**
* Reallocate memory. Checks the return value, aborts if no more
* memory is available.
*/
-void *GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename,
- int linenumber);
+void *
+GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename, int linenumber);
/**
* Free memory. Merely a wrapper for the case that we
@@ -545,7 +561,8 @@
* @param filename where is this call being made (for debugging)
* @param linenumber line where this call is being made (for debugging)
*/
-void GNUNET_xfree_ (void *ptr, const char *filename, int linenumber);
+void
+GNUNET_xfree_ (void *ptr, const char *filename, int linenumber);
/**
@@ -555,7 +572,8 @@
* @param linenumber line where this call is being made (for debugging)
* @return the duplicated string
*/
-char *GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber);
+char *
+GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber);
/**
* Dup partially a string. Don't call GNUNET_xstrndup_ directly. Use the
GNUNET_strndup macro.
@@ -565,8 +583,9 @@
* @param linenumber line where this call is being made (for debugging)
* @return the duplicated string
*/
-char *GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
- int linenumber);
+char *
+GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
+ int linenumber);
/**
* Grow an array, the new elements are zeroed out.
@@ -583,9 +602,9 @@
* @param filename where is this call being made (for debugging)
* @param linenumber line where this call is being made (for debugging)
*/
-void GNUNET_xgrow_ (void **old, size_t elementSize, unsigned int *oldCount,
- unsigned int newCount, const char *filename,
- int linenumber);
+void
+GNUNET_xgrow_ (void **old, size_t elementSize, unsigned int *oldCount,
+ unsigned int newCount, const char *filename, int linenumber);
Modified: gnunet/src/include/gnunet_configuration_lib.h
===================================================================
--- gnunet/src/include/gnunet_configuration_lib.h 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/include/gnunet_configuration_lib.h 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -49,7 +49,8 @@
* Create a new configuration object.
* @return fresh configuration object
*/
-struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_create (void);
+struct GNUNET_CONFIGURATION_Handle *
+GNUNET_CONFIGURATION_create (void);
/**
@@ -58,9 +59,8 @@
* @param cfg configuration to duplicate
* @return duplicate configuration
*/
-struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_dup (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg);
+struct GNUNET_CONFIGURATION_Handle *
+GNUNET_CONFIGURATION_dup (const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -68,7 +68,8 @@
*
* @param cfg configuration to destroy
*/
-void GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg);
+void
+GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -80,8 +81,9 @@
* @param filename name of the configuration file, NULL to load defaults
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *filename);
+int
+GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *filename);
/**
@@ -92,8 +94,9 @@
* @param filename name of the configuration file
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *filename);
+int
+GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *filename);
/**
@@ -103,8 +106,9 @@
* @param filename where to write the configuration
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *filename);
+int
+GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *filename);
/**
* Write only configuration entries that have been changed to configuration
file
@@ -113,10 +117,11 @@
* @param filename where to write the configuration diff between default and
new
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle
- *cfgDefault,
- const struct GNUNET_CONFIGURATION_Handle
- *cfgNew, const char *filename);
+int
+GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle
+ *cfgDefault,
+ const struct GNUNET_CONFIGURATION_Handle
+ *cfgNew, const char *filename);
/**
* Test if there are configuration options that were
@@ -125,8 +130,8 @@
* @param cfg configuration to inspect
* @return GNUNET_NO if clean, GNUNET_YES if dirty, GNUNET_SYSERR on error
(i.e. last save failed)
*/
-int GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle
- *cfg);
+int
+GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -159,9 +164,10 @@
* @param iter function to call on each option
* @param iter_cls closure for iter
*/
-void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle
- *cfg, GNUNET_CONFIGURATION_Iterator iter,
- void *iter_cls);
+void
+GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_CONFIGURATION_Iterator iter,
+ void *iter_cls);
/**
@@ -171,10 +177,11 @@
* @param iter function to call on each section
* @param iter_cls closure for iter
*/
-void GNUNET_CONFIGURATION_iterate_sections (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
-
GNUNET_CONFIGURATION_Section_Iterator
- iter, void *iter_cls);
+void
+GNUNET_CONFIGURATION_iterate_sections (const struct GNUNET_CONFIGURATION_Handle
+ *cfg,
+ GNUNET_CONFIGURATION_Section_Iterator
+ iter, void *iter_cls);
/**
@@ -183,8 +190,9 @@
* @param cfg configuration to inspect
* @param section name of the section to remove
*/
-void GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle
- *cfg, const char *section);
+void
+GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section);
/**
* Get a configuration value that should be a number.
@@ -195,11 +203,11 @@
* @param number where to store the numeric value of the option
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_CONFIGURATION_get_value_number (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- unsigned long long *number);
+int
+GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle
+ *cfg, const char *section,
+ const char *option,
+ unsigned long long *number);
/**
@@ -211,11 +219,11 @@
* @param time set to the time value stored in the configuration
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_CONFIGURATION_get_value_time (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- struct GNUNET_TIME_Relative *time);
+int
+GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle
+ *cfg, const char *section,
+ const char *option,
+ struct GNUNET_TIME_Relative *time);
/**
@@ -226,9 +234,9 @@
* @param option option of interest
* @return GNUNET_YES if so, GNUNET_NO if not.
*/
-int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle
- *cfg, const char *section,
- const char *option);
+int
+GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section, const char *option);
/**
@@ -241,10 +249,10 @@
* value, or NULL if option is not specified
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_CONFIGURATION_get_value_string (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option, char **value);
+int
+GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Handle
+ *cfg, const char *section,
+ const char *option, char **value);
/**
@@ -258,10 +266,11 @@
* value, or NULL if option is not specified
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_CONFIGURATION_get_value_filename (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option, char **value);
+int
+GNUNET_CONFIGURATION_get_value_filename (const struct
+ GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option, char **value);
/**
* Iterate over the set of filenames stored in a configuration value.
@@ -273,12 +282,13 @@
* @param cb_cls closure for cb
* @return number of filenames iterated over, -1 on error
*/
-int GNUNET_CONFIGURATION_iterate_value_filenames (const struct
- GNUNET_CONFIGURATION_Handle
- *cfg, const char *section,
- const char *option,
- GNUNET_FileNameCallback cb,
- void *cb_cls);
+int
+GNUNET_CONFIGURATION_iterate_value_filenames (const struct
+ GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ const char *option,
+ GNUNET_FileNameCallback cb,
+ void *cb_cls);
/**
* Iterate over values of a section in the configuration.
@@ -288,11 +298,12 @@
* @param iter function to call on each option
* @param iter_cls closure for iter
*/
-void GNUNET_CONFIGURATION_iterate_section_values (const struct
- GNUNET_CONFIGURATION_Handle
- *cfg, const char *section,
- GNUNET_CONFIGURATION_Iterator
- iter, void *iter_cls);
+void
+GNUNET_CONFIGURATION_iterate_section_values (const struct
+ GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section,
+ GNUNET_CONFIGURATION_Iterator
iter,
+ void *iter_cls);
/**
* Get a configuration value that should be in a set of
@@ -306,12 +317,11 @@
* or NULL if option is not specified and no default given
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_CONFIGURATION_get_value_choice (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option,
- const char **choices,
- const char **value);
+int
+GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle
+ *cfg, const char *section,
+ const char *option, const char
**choices,
+ const char **value);
/**
* Get a configuration value that should be in a set of
@@ -322,10 +332,10 @@
* @param option option of interest
* @return GNUNET_YES, GNUNET_NO or if option has no valid value, GNUNET_SYSERR
*/
-int GNUNET_CONFIGURATION_get_value_yesno (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *section,
- const char *option);
+int
+GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle
+ *cfg, const char *section,
+ const char *option);
/**
* Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR"
@@ -336,9 +346,9 @@
* @param orig string to $-expand (will be freed!)
* @return $-expanded string
*/
-char *GNUNET_CONFIGURATION_expand_dollar (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- char *orig);
+char *
+GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle
+ *cfg, char *orig);
/**
@@ -349,10 +359,10 @@
* @param option option of interest
* @param number value to set
*/
-void GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle
- *cfg, const char *section,
- const char *option,
- unsigned long long number);
+void
+GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section, const char *option,
+ unsigned long long number);
/**
@@ -363,10 +373,10 @@
* @param option option of interest
* @param value value to set
*/
-void GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle
- *cfg, const char *section,
- const char *option,
- const char *value);
+void
+GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section, const char *option,
+ const char *value);
/**
* Remove a filename from a configuration value that
@@ -379,11 +389,11 @@
* @return GNUNET_OK on success,
* GNUNET_SYSERR if the filename is not in the list
*/
-int GNUNET_CONFIGURATION_remove_value_filename (struct
- GNUNET_CONFIGURATION_Handle
- *cfg, const char *section,
- const char *option,
- const char *value);
+int
+GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle
+ *cfg, const char *section,
+ const char *option,
+ const char *value);
/**
* Append a filename to a configuration value that
@@ -396,11 +406,11 @@
* @return GNUNET_OK on success,
* GNUNET_SYSERR if the filename already in the list
*/
-int GNUNET_CONFIGURATION_append_value_filename (struct
- GNUNET_CONFIGURATION_Handle
- *cfg, const char *section,
- const char *option,
- const char *value);
+int
+GNUNET_CONFIGURATION_append_value_filename (struct GNUNET_CONFIGURATION_Handle
+ *cfg, const char *section,
+ const char *option,
+ const char *value);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_connection_lib.h
===================================================================
--- gnunet/src/include/gnunet_connection_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_connection_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -111,7 +111,8 @@
*
* @param sock the connection to set persistent
*/
-void GNUNET_CONNECTION_persist_ (struct GNUNET_CONNECTION_Handle *sock);
+void
+GNUNET_CONNECTION_persist_ (struct GNUNET_CONNECTION_Handle *sock);
/**
* Disable the "CORK" feature for communication with the given socket,
@@ -124,7 +125,8 @@
* @param sock the connection to make flushing and blocking
* @return GNUNET_OK on success
*/
-int GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock);
+int
+GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock);
/**
@@ -135,9 +137,8 @@
* @param osSocket existing socket to box
* @return the boxed socket handle
*/
-struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_existing (struct
-
GNUNET_NETWORK_Handle
-
*osSocket);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_existing (struct GNUNET_NETWORK_Handle
*osSocket);
/**
@@ -149,10 +150,10 @@
* @param lsock listen socket
* @return the socket handle, NULL on error (for example, access refused)
*/
-struct GNUNET_CONNECTION_Handle
- *GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck
access,
- void *access_cls,
- struct GNUNET_NETWORK_Handle
*lsock);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access,
+ void *access_cls,
+ struct GNUNET_NETWORK_Handle *lsock);
/**
@@ -165,15 +166,10 @@
* @param port port to connect to
* @return the socket handle
*/
-struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_connect (const
- struct
-
GNUNET_CONFIGURATION_Handle
- *cfg,
- const
- char
-
*hostname,
-
uint16_t
- port);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_connect (const struct GNUNET_CONFIGURATION_Handle
+ *cfg, const char *hostname,
+ uint16_t port);
/**
@@ -185,11 +181,10 @@
* @param unixpath path to connect to)
* @return the socket handle, NULL on systems without UNIX support
*/
-struct GNUNET_CONNECTION_Handle
- *GNUNET_CONNECTION_create_from_connect_to_unixpath (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg,
- const char *unixpath);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_connect_to_unixpath (const struct
+ GNUNET_CONFIGURATION_Handle
+ *cfg, const char *unixpath);
@@ -204,14 +199,10 @@
* @param addrlen length of server address
* @return the socket handle
*/
-struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_sockaddr (int
-
af_family,
- const
- struct
-
sockaddr
-
*serv_addr,
-
socklen_t
-
addrlen);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_sockaddr (int af_family,
+ const struct sockaddr *serv_addr,
+ socklen_t addrlen);
/**
* Check if socket is valid (no fatal errors have happened so far).
@@ -221,7 +212,8 @@
* @param sock socket to check
* @return GNUNET_YES if valid, GNUNET_NO otherwise
*/
-int GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock);
+int
+GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock);
/**
@@ -232,8 +224,9 @@
* @param addrlen where to store the length of the address
* @return GNUNET_OK on success
*/
-int GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock,
- void **addr, size_t * addrlen);
+int
+GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock,
+ void **addr, size_t * addrlen);
/**
@@ -249,8 +242,9 @@
* read from the application; all other transmissions should be
* aborted using 'GNUNET_CONNECTION_notify_transmit_ready_cancel').
*/
-void GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
- int finish_pending_write);
+void
+GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
+ int finish_pending_write);
/**
@@ -266,10 +260,11 @@
* @param receiver function to call with received data
* @param receiver_cls closure for receiver
*/
-void GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *sock,
- size_t max, struct GNUNET_TIME_Relative
timeout,
- GNUNET_CONNECTION_Receiver receiver,
- void *receiver_cls);
+void
+GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *sock, size_t max,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_CONNECTION_Receiver receiver,
+ void *receiver_cls);
/**
@@ -280,7 +275,8 @@
* @param sock socket handle
* @return closure of the original receiver callback closure
*/
-void *GNUNET_CONNECTION_receive_cancel (struct GNUNET_CONNECTION_Handle *sock);
+void *
+GNUNET_CONNECTION_receive_cancel (struct GNUNET_CONNECTION_Handle *sock);
/**
@@ -333,13 +329,12 @@
* @return non-NULL if the notify callback was queued,
* NULL if we are already going to notify someone else (busy)
*/
-struct GNUNET_CONNECTION_TransmitHandle
- *GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle
- *sock, size_t size,
- struct GNUNET_TIME_Relative
- timeout,
-
GNUNET_CONNECTION_TransmitReadyNotify
- notify, void *notify_cls);
+struct GNUNET_CONNECTION_TransmitHandle *
+GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle *sock,
+ size_t size,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_CONNECTION_TransmitReadyNotify
+ notify, void *notify_cls);
/**
@@ -348,9 +343,10 @@
*
* @param h handle for notification to cancel
*/
-void GNUNET_CONNECTION_notify_transmit_ready_cancel (struct
-
GNUNET_CONNECTION_TransmitHandle
- *h);
+void
+GNUNET_CONNECTION_notify_transmit_ready_cancel (struct
+
GNUNET_CONNECTION_TransmitHandle
+ *h);
/**
@@ -359,8 +355,9 @@
* @param sock socket handle
* @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
*/
-void GNUNET_CONNECTION_ignore_shutdown (struct GNUNET_CONNECTION_Handle *sock,
- int do_ignore);
+void
+GNUNET_CONNECTION_ignore_shutdown (struct GNUNET_CONNECTION_Handle *sock,
+ int do_ignore);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_container_lib.h
===================================================================
--- gnunet/src/include/gnunet_container_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_container_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -75,13 +75,9 @@
* element (number of bits set per element in the set)
* @return the bloomfilter
*/
-struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_load (const
- char
-
*filename,
- size_t
- size,
-
unsigned
- int k);
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_load (const char *filename, size_t size,
+ unsigned int k);
/**
@@ -97,13 +93,9 @@
* element (number of bits set per element in the set)
* @return the bloomfilter
*/
-struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_init (const
- char
- *data,
- size_t
- size,
-
unsigned
- int k);
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_init (const char *data, size_t size,
+ unsigned int k);
/**
@@ -114,9 +106,10 @@
* @param size the size of the given data array
* @return GNUNET_SYSERR if the data array of the wrong size
*/
-int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
- GNUNET_CONTAINER_BloomFilter
*bf,
- char *data, size_t size);
+int
+GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
+ GNUNET_CONTAINER_BloomFilter *bf,
+ char *data, size_t size);
/**
@@ -125,8 +118,9 @@
* @param bf the filter
* @return GNUNET_YES if the element is in the filter, GNUNET_NO if not
*/
-int GNUNET_CONTAINER_bloomfilter_test (const struct
GNUNET_CONTAINER_BloomFilter
- *bf, const GNUNET_HashCode * e);
+int
+GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
+ *bf, const GNUNET_HashCode * e);
/**
@@ -134,8 +128,9 @@
* @param bf the filter
* @param e the element
*/
-void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
- const GNUNET_HashCode * e);
+void
+GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
+ const GNUNET_HashCode * e);
/**
@@ -143,8 +138,9 @@
* @param bf the filter
* @param e the element to remove
*/
-void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter
- *bf, const GNUNET_HashCode * e);
+void
+GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf,
+ const GNUNET_HashCode * e);
/**
@@ -153,10 +149,9 @@
* @param bf the filter
* @return copy of bf
*/
-struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_copy (const
- struct
-
GNUNET_CONTAINER_BloomFilter
- *bf);
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_copy (const struct GNUNET_CONTAINER_BloomFilter
+ *bf);
@@ -166,8 +161,8 @@
* free the space on the drive)
* @param bf the filter
*/
-void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter
- *bf);
+void
+GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter *bf);
/**
@@ -176,17 +171,17 @@
* @param bf the filter
* @return number of bytes used for the data of the bloom filter
*/
-size_t GNUNET_CONTAINER_bloomfilter_get_size (const
struct
-
GNUNET_CONTAINER_BloomFilter
- *bf);
+size_t
+GNUNET_CONTAINER_bloomfilter_get_size (const struct
GNUNET_CONTAINER_BloomFilter
+ *bf);
/**
* Reset a bloom filter to empty.
* @param bf the filter
*/
-void GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter
- *bf);
+void
+GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter *bf);
/**
* Or the entries of the given raw data array with the
@@ -199,8 +194,9 @@
* @param size size of data
* @return GNUNET_OK on success
*/
-int GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf,
- const char *data, size_t size);
+int
+GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf,
+ const char *data, size_t size);
/**
* Or the entries of the given raw data array with the
@@ -212,9 +208,10 @@
* @param to_or the bloomfilter to or-in
* @param size number of bytes in data
*/
-int GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
- const struct GNUNET_CONTAINER_BloomFilter
- *to_or, size_t size);
+int
+GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
+ const struct GNUNET_CONTAINER_BloomFilter
+ *to_or, size_t size);
/**
* Resize a bloom filter. Note that this operation
@@ -227,10 +224,11 @@
* @param size the new size for the filter
* @param k the new number of GNUNET_CRYPTO_hash-function to apply per element
*/
-void GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter
- *bf, GNUNET_HashCodeIterator
iterator,
- void *iterator_cls, size_t size,
- unsigned int k);
+void
+GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter *bf,
+ GNUNET_HashCodeIterator iterator,
+ void *iterator_cls, size_t size,
+ unsigned int k);
/* ****************** metadata ******************* */
@@ -244,7 +242,8 @@
*
* @return empty meta-data container
*/
-struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_create (void);
+struct GNUNET_CONTAINER_MetaData *
+GNUNET_CONTAINER_meta_data_create (void);
/**
* Duplicate a MetaData token.
@@ -252,17 +251,17 @@
* @param md what to duplicate
* @return duplicate meta-data container
*/
-struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_duplicate (const
- struct
-
GNUNET_CONTAINER_MetaData
- *md);
+struct GNUNET_CONTAINER_MetaData *
+GNUNET_CONTAINER_meta_data_duplicate (const struct GNUNET_CONTAINER_MetaData
+ *md);
/**
* Free meta data.
*
* @param md what to free
*/
-void GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md);
+void
+GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md);
/**
* Test if two MDs are equal. We consider them equal if
@@ -274,10 +273,11 @@
* @param md2 other value to check
* @return GNUNET_YES if they are equal
*/
-int GNUNET_CONTAINER_meta_data_test_equal (const struct
- GNUNET_CONTAINER_MetaData *md1,
- const struct
- GNUNET_CONTAINER_MetaData *md2);
+int
+GNUNET_CONTAINER_meta_data_test_equal (const struct GNUNET_CONTAINER_MetaData
+ *md1,
+ const struct GNUNET_CONTAINER_MetaData
+ *md2);
/**
@@ -297,12 +297,13 @@
* @return GNUNET_OK on success, GNUNET_SYSERR if this entry already exists
* data_mime_type and plugin_name are not considered for "exists"
checks
*/
-int GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
- const char *plugin_name,
- enum EXTRACTOR_MetaType type,
- enum EXTRACTOR_MetaFormat format,
- const char *data_mime_type,
- const char *data, size_t data_len);
+int
+GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
+ const char *plugin_name,
+ enum EXTRACTOR_MetaType type,
+ enum EXTRACTOR_MetaFormat format,
+ const char *data_mime_type, const char
*data,
+ size_t data_len);
/**
@@ -312,9 +313,9 @@
* @param md metadata to extend
* @param in metadata to merge
*/
-void GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md,
- const struct GNUNET_CONTAINER_MetaData
- *in);
+void
+GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md,
+ const struct GNUNET_CONTAINER_MetaData *in);
/**
@@ -327,9 +328,10 @@
* @param data_len number of bytes in data
* @return GNUNET_OK on success, GNUNET_SYSERR if the item does not exist in md
*/
-int GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md,
- enum EXTRACTOR_MetaType type,
- const char *data, size_t data_len);
+int
+GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md,
+ enum EXTRACTOR_MetaType type,
+ const char *data, size_t data_len);
/**
@@ -337,7 +339,8 @@
*
* @param md metadata to manipulate
*/
-void GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md);
+void
+GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md);
/**
@@ -346,9 +349,9 @@
*
* @param md metadata to modify
*/
-void GNUNET_CONTAINER_meta_data_add_publication_date (struct
- GNUNET_CONTAINER_MetaData
- *md);
+void
+GNUNET_CONTAINER_meta_data_add_publication_date (struct
+ GNUNET_CONTAINER_MetaData
*md);
/**
@@ -359,9 +362,10 @@
* @param iter_cls closure for iterator
* @return number of entries
*/
-int GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData
- *md, EXTRACTOR_MetaDataProcessor iter,
- void *iter_cls);
+int
+GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData *md,
+ EXTRACTOR_MetaDataProcessor iter,
+ void *iter_cls);
/**
* Get the first MD entry of the given type. Caller
@@ -373,9 +377,9 @@
* @param type type to look for
* @return NULL if no entry was found
*/
-char *GNUNET_CONTAINER_meta_data_get_by_type (const struct
- GNUNET_CONTAINER_MetaData *md,
- enum EXTRACTOR_MetaType type);
+char *
+GNUNET_CONTAINER_meta_data_get_by_type (const struct GNUNET_CONTAINER_MetaData
+ *md, enum EXTRACTOR_MetaType type);
/**
@@ -389,9 +393,10 @@
* @return NULL if we do not have any such entry,
* otherwise client is responsible for freeing the value!
*/
-char *GNUNET_CONTAINER_meta_data_get_first_by_types (const struct
- GNUNET_CONTAINER_MetaData
- *md, ...);
+char *
+GNUNET_CONTAINER_meta_data_get_first_by_types (const struct
+ GNUNET_CONTAINER_MetaData *md,
+ ...);
/**
* Get a thumbnail from the meta-data (if present). Only matches meta
@@ -402,9 +407,9 @@
* freed by the caller!
* @return number of bytes in thumbnail, 0 if not available
*/
-size_t GNUNET_CONTAINER_meta_data_get_thumbnail (const struct
- GNUNET_CONTAINER_MetaData *md,
- unsigned char **thumb);
+size_t
+GNUNET_CONTAINER_meta_data_get_thumbnail (const struct
GNUNET_CONTAINER_MetaData
+ *md, unsigned char **thumb);
@@ -445,7 +450,7 @@
* -1 on error (typically: not enough
* space)
*/
-ssize_t
+ssize_t
GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
*md, char **target, size_t max,
enum
@@ -459,7 +464,7 @@
* @param md metadata to inspect
* @return number of bytes needed for serialization, -1 on error
*/
-ssize_t
+ssize_t
GNUNET_CONTAINER_meta_data_get_serialized_size (const struct
GNUNET_CONTAINER_MetaData *md);
@@ -472,11 +477,8 @@
* @return MD on success, NULL on error (i.e.
* bad format)
*/
-struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_deserialize (const
- char
-
*input,
-
size_t
-
size);
+struct GNUNET_CONTAINER_MetaData *
+GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size);
/* ******************************* HashMap **************************** */
@@ -541,8 +543,8 @@
* @param len initial size (map will grow as needed)
* @return NULL on error
*/
-struct GNUNET_CONTAINER_MultiHashMap
- *GNUNET_CONTAINER_multihashmap_create (unsigned int len);
+struct GNUNET_CONTAINER_MultiHashMap *
+GNUNET_CONTAINER_multihashmap_create (unsigned int len);
/**
@@ -551,8 +553,9 @@
*
* @param map the map
*/
-void GNUNET_CONTAINER_multihashmap_destroy (struct
GNUNET_CONTAINER_MultiHashMap
- *map);
+void
+GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
+ *map);
/**
@@ -565,9 +568,9 @@
* happen to be NULL; use "contains" to test for
* key-value pairs with value NULL
*/
-void *GNUNET_CONTAINER_multihashmap_get (const struct
- GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key);
+void *
+GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
+ *map, const GNUNET_HashCode * key);
/**
@@ -581,9 +584,9 @@
* @return GNUNET_YES on success, GNUNET_NO if the key-value pair
* is not in the map
*/
-int GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap
- *map, const GNUNET_HashCode * key,
- void *value);
+int
+GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap
*map,
+ const GNUNET_HashCode * key, void
*value);
/**
* Remove all entries for the given key from the map.
@@ -593,10 +596,9 @@
* @param key identifies values to be removed
* @return number of values removed
*/
-int GNUNET_CONTAINER_multihashmap_remove_all (struct
- GNUNET_CONTAINER_MultiHashMap
- *map,
- const GNUNET_HashCode * key);
+int
+GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
+ *map, const GNUNET_HashCode * key);
/**
@@ -608,9 +610,10 @@
* @return GNUNET_YES if such a value exists,
* GNUNET_NO if not
*/
-int GNUNET_CONTAINER_multihashmap_contains (const struct
- GNUNET_CONTAINER_MultiHashMap *map,
- const GNUNET_HashCode * key);
+int
+GNUNET_CONTAINER_multihashmap_contains (const struct
+ GNUNET_CONTAINER_MultiHashMap *map,
+ const GNUNET_HashCode * key);
/**
@@ -623,11 +626,11 @@
* @return GNUNET_YES if such a value exists,
* GNUNET_NO if not
*/
-int GNUNET_CONTAINER_multihashmap_contains_value (const struct
- GNUNET_CONTAINER_MultiHashMap
- *map,
- const GNUNET_HashCode * key,
- const void *value);
+int
+GNUNET_CONTAINER_multihashmap_contains_value (const struct
+ GNUNET_CONTAINER_MultiHashMap
+ *map, const GNUNET_HashCode *
key,
+ const void *value);
/**
@@ -642,11 +645,11 @@
* GNUNET_SYSERR if UNIQUE_ONLY was the option and the
* value already exists
*/
-int GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap
- *map, const GNUNET_HashCode * key,
- void *value,
- enum GNUNET_CONTAINER_MultiHashMapOption
- opt);
+int
+GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
+ const GNUNET_HashCode * key, void *value,
+ enum GNUNET_CONTAINER_MultiHashMapOption
+ opt);
/**
* Get the number of key-value pairs in the map.
@@ -654,9 +657,9 @@
* @param map the map
* @return the number of key value pairs
*/
-unsigned int GNUNET_CONTAINER_multihashmap_size (const struct
- GNUNET_CONTAINER_MultiHashMap
- *map);
+unsigned int
+GNUNET_CONTAINER_multihashmap_size (const struct GNUNET_CONTAINER_MultiHashMap
+ *map);
/**
@@ -668,10 +671,11 @@
* @return the number of key value pairs processed,
* GNUNET_SYSERR if it aborted iteration
*/
-int GNUNET_CONTAINER_multihashmap_iterate (const struct
- GNUNET_CONTAINER_MultiHashMap *map,
- GNUNET_CONTAINER_HashMapIterator it,
- void *it_cls);
+int
+GNUNET_CONTAINER_multihashmap_iterate (const struct
+ GNUNET_CONTAINER_MultiHashMap *map,
+ GNUNET_CONTAINER_HashMapIterator it,
+ void *it_cls);
/**
@@ -684,12 +688,12 @@
* @return the number of key value pairs processed,
* GNUNET_SYSERR if it aborted iteration
*/
-int GNUNET_CONTAINER_multihashmap_get_multiple (const struct
- GNUNET_CONTAINER_MultiHashMap
- *map,
- const GNUNET_HashCode * key,
-
GNUNET_CONTAINER_HashMapIterator
- it, void *it_cls);
+int
+GNUNET_CONTAINER_multihashmap_get_multiple (const struct
+ GNUNET_CONTAINER_MultiHashMap *map,
+ const GNUNET_HashCode * key,
+ GNUNET_CONTAINER_HashMapIterator
it,
+ void *it_cls);
/* ******************** doubly-linked list *************** */
@@ -864,9 +868,8 @@
* @param order how should the heap be sorted?
* @return handle to the heap
*/
-struct GNUNET_CONTAINER_Heap *GNUNET_CONTAINER_heap_create (enum
-
GNUNET_CONTAINER_HeapOrder
- order);
+struct GNUNET_CONTAINER_Heap *
+GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder order);
/**
@@ -875,7 +878,8 @@
*
* @param heap heap to destroy
*/
-void GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap);
+void
+GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap);
/**
@@ -884,7 +888,8 @@
* @param heap heap to inspect
* @return NULL if heap is empty
*/
-void *GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap);
+void *
+GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap);
/**
@@ -893,8 +898,8 @@
* @param heap the heap to get the size of
* @return number of elements stored
*/
-unsigned int GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap
- *heap);
+unsigned int
+GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap);
/**
@@ -903,9 +908,9 @@
* @param node the node to get the cost of
* @return cost of the node
*/
-GNUNET_CONTAINER_HeapCostType GNUNET_CONTAINER_heap_node_get_cost (const struct
-
GNUNET_CONTAINER_HeapNode
- *node);
+GNUNET_CONTAINER_HeapCostType
+GNUNET_CONTAINER_heap_node_get_cost (const struct GNUNET_CONTAINER_HeapNode
+ *node);
/**
* Iterator for heap
@@ -931,9 +936,10 @@
* @param iterator function to call on each entry
* @param iterator_cls closure for iterator
*/
-void GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap,
- GNUNET_CONTAINER_HeapIterator iterator,
- void *iterator_cls);
+void
+GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap,
+ GNUNET_CONTAINER_HeapIterator iterator,
+ void *iterator_cls);
/**
@@ -948,8 +954,9 @@
* NULL if the heap is empty.
*
*/
-void *GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap,
- uint32_t max);
+void *
+GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap,
+ uint32_t max);
/**
@@ -963,7 +970,8 @@
* @return data stored at the next random node in the walk;
* NULL if the tree is empty.
*/
-void *GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap);
+void *
+GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap);
/**
@@ -974,12 +982,9 @@
* @param cost cost for the element
* @return node for the new element
*/
-struct GNUNET_CONTAINER_HeapNode *GNUNET_CONTAINER_heap_insert (struct
-
GNUNET_CONTAINER_Heap
- *heap,
- void *element,
-
GNUNET_CONTAINER_HeapCostType
- cost);
+struct GNUNET_CONTAINER_HeapNode *
+GNUNET_CONTAINER_heap_insert (struct GNUNET_CONTAINER_Heap *heap, void
*element,
+ GNUNET_CONTAINER_HeapCostType cost);
/**
@@ -988,7 +993,8 @@
* @param heap heap to modify
* @return element data stored at the root node
*/
-void *GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
+void *
+GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
/**
@@ -997,8 +1003,8 @@
* @param node node to remove
* @return element data stored at the node, NULL if heap is empty
*/
-void *GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode
- *node);
+void *
+GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode *node);
/**
@@ -1008,9 +1014,10 @@
* @param node node for which the cost is to be changed
* @param new_cost new cost for the node
*/
-void GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_Heap *heap,
- struct GNUNET_CONTAINER_HeapNode *node,
- GNUNET_CONTAINER_HeapCostType
new_cost);
+void
+GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_Heap *heap,
+ struct GNUNET_CONTAINER_HeapNode *node,
+ GNUNET_CONTAINER_HeapCostType new_cost);
/* ******************** Singly linked list *************** */
@@ -1057,9 +1064,10 @@
* @param buf payload buffer
* @param len length of the buffer
*/
-void GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
- enum GNUNET_CONTAINER_SListDisposition disp,
- const void *buf, size_t len);
+void
+GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
+ enum GNUNET_CONTAINER_SListDisposition disp,
+ const void *buf, size_t len);
/**
@@ -1069,9 +1077,10 @@
* @param buf payload buffer
* @param len length of the buffer
*/
-void GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
- enum GNUNET_CONTAINER_SListDisposition
- disp, const void *buf, size_t len);
+void
+GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
+ enum GNUNET_CONTAINER_SListDisposition disp,
+ const void *buf, size_t len);
/**
@@ -1079,22 +1088,25 @@
* @param dst list to append to
* @param src source
*/
-void GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
- struct GNUNET_CONTAINER_SList *src);
+void
+GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
+ struct GNUNET_CONTAINER_SList *src);
/**
* Create a new singly linked list
* @return the new list
*/
-struct GNUNET_CONTAINER_SList *GNUNET_CONTAINER_slist_create (void);
+struct GNUNET_CONTAINER_SList *
+GNUNET_CONTAINER_slist_create (void);
/**
* Destroy a singly linked list
* @param l the list to be destroyed
*/
-void GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
+void
+GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
/**
@@ -1103,9 +1115,8 @@
* @param l list
* @return iterator pointing to the beginning, free using "GNUNET_free"
*/
-struct GNUNET_CONTAINER_SList_Iterator *GNUNET_CONTAINER_slist_begin (struct
-
GNUNET_CONTAINER_SList
- *l);
+struct GNUNET_CONTAINER_SList_Iterator *
+GNUNET_CONTAINER_slist_begin (struct GNUNET_CONTAINER_SList *l);
/**
@@ -1113,7 +1124,8 @@
*
* @param l list
*/
-void GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
+void
+GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
/**
@@ -1122,8 +1134,9 @@
* @param buf payload buffer to find
* @param len length of the payload (number of bytes in buf)
*/
-int GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
- const void *buf, size_t len);
+int
+GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
+ const void *buf, size_t len);
/**
@@ -1131,14 +1144,16 @@
* @param l list
* @return number of elements in the list
*/
-int GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l);
+int
+GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l);
/**
* Remove an element from the list
* @param i iterator that points to the element to be removed
*/
-void GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
+void
+GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
/**
@@ -1148,10 +1163,10 @@
* @param buf payload buffer
* @param len length of the payload
*/
-void GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator
- *before,
- enum GNUNET_CONTAINER_SListDisposition
disp,
- const void *buf, size_t len);
+void
+GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator *before,
+ enum GNUNET_CONTAINER_SListDisposition disp,
+ const void *buf, size_t len);
/**
@@ -1159,7 +1174,8 @@
* @param i iterator
* @return GNUNET_YES on success, GNUNET_NO if the end has been reached
*/
-int GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
+int
+GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
/**
@@ -1168,7 +1184,8 @@
* @return GNUNET_YES if the end has been reached, GNUNET_NO if the iterator
* points to a valid element
*/
-int GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
+int
+GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
/**
@@ -1178,16 +1195,17 @@
* @param len set to the payload length
* @return payload
*/
-void *GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator
- *i, size_t * len);
+void *
+GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator *i,
+ size_t * len);
/**
* Release an iterator
* @param i iterator
*/
-void GNUNET_CONTAINER_slist_iter_destroy (struct
GNUNET_CONTAINER_SList_Iterator
- *i);
+void
+GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator
*i);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_core_service.h
===================================================================
--- gnunet/src/include/gnunet_core_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_core_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -219,27 +219,18 @@
* @return handle to the core service (only useful for disconnect until 'init'
is called),
* NULL on error (in this case, init is never called)
*/
-struct GNUNET_CORE_Handle *GNUNET_CORE_connect (const struct
- GNUNET_CONFIGURATION_Handle
- *cfg, unsigned int queue_size,
- void *cls,
- GNUNET_CORE_StartupCallback
- init,
- GNUNET_CORE_ConnectEventHandler
- connects,
-
GNUNET_CORE_DisconnectEventHandler
- disconnects,
-
GNUNET_CORE_PeerStatusEventHandler
- status_events,
- GNUNET_CORE_MessageCallback
- inbound_notify,
- int inbound_hdr_only,
- GNUNET_CORE_MessageCallback
- outbound_notify,
- int outbound_hdr_only,
- const struct
- GNUNET_CORE_MessageHandler
- *handlers);
+struct GNUNET_CORE_Handle *
+GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ unsigned int queue_size, void *cls,
+ GNUNET_CORE_StartupCallback init,
+ GNUNET_CORE_ConnectEventHandler connects,
+ GNUNET_CORE_DisconnectEventHandler disconnects,
+ GNUNET_CORE_PeerStatusEventHandler status_events,
+ GNUNET_CORE_MessageCallback inbound_notify,
+ int inbound_hdr_only,
+ GNUNET_CORE_MessageCallback outbound_notify,
+ int outbound_hdr_only,
+ const struct GNUNET_CORE_MessageHandler *handlers);
/**
@@ -249,7 +240,8 @@
*
* @param handle connection to core to disconnect
*/
-void GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle);
+void
+GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle);
/**
@@ -290,17 +282,11 @@
* @param cont_cls closure for cont
* @return NULL on error (cont will not be called), otherwise handle for
cancellation
*/
-struct GNUNET_CORE_PeerRequestHandle *GNUNET_CORE_peer_request_connect (struct
-
GNUNET_CORE_Handle
- *h,
- const
- struct
-
GNUNET_PeerIdentity
- *peer,
-
GNUNET_CORE_ControlContinuation
- cont,
- void
-
*cont_cls);
+struct GNUNET_CORE_PeerRequestHandle *
+GNUNET_CORE_peer_request_connect (struct GNUNET_CORE_Handle *h,
+ const struct GNUNET_PeerIdentity *peer,
+ GNUNET_CORE_ControlContinuation cont,
+ void *cont_cls);
/**
@@ -309,9 +295,9 @@
*
* @param req request handle that was returned for the original request
*/
-void GNUNET_CORE_peer_request_connect_cancel (struct
- GNUNET_CORE_PeerRequestHandle
- *req);
+void
+GNUNET_CORE_peer_request_connect_cancel (struct GNUNET_CORE_PeerRequestHandle
+ *req);
/**
@@ -372,15 +358,14 @@
* @param info_cls closure for info
* @return NULL on error
*/
-struct GNUNET_CORE_InformationRequestContext
- *GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h,
- const struct GNUNET_PeerIdentity
*peer,
- struct GNUNET_TIME_Relative timeout,
- struct GNUNET_BANDWIDTH_Value32NBO
- bw_out, int32_t amount,
- uint64_t preference,
-
GNUNET_CORE_PeerConfigurationInfoCallback
- info, void *info_cls);
+struct GNUNET_CORE_InformationRequestContext *
+GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h,
+ const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_TIME_Relative timeout,
+ struct GNUNET_BANDWIDTH_Value32NBO bw_out,
+ int32_t amount, uint64_t preference,
+ GNUNET_CORE_PeerConfigurationInfoCallback
+ info, void *info_cls);
/**
@@ -394,9 +379,10 @@
*
* @param irc context returned by the original GNUNET_CORE_peer_get_info call
*/
-void GNUNET_CORE_peer_change_preference_cancel (struct
-
GNUNET_CORE_InformationRequestContext
- *irc);
+void
+GNUNET_CORE_peer_change_preference_cancel (struct
+
GNUNET_CORE_InformationRequestContext
+ *irc);
/**
@@ -407,9 +393,10 @@
* @param cb_cls closure for peer_cb
* @return GNUNET_OK on success, GNUNET_SYSERR on errors
*/
-int GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
- GNUNET_CORE_ConnectEventHandler peer_cb,
- void *cb_cls);
+int
+GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_CORE_ConnectEventHandler peer_cb,
+ void *cb_cls);
/**
* Iterate over all currently connected peers.
@@ -424,10 +411,11 @@
*
* @return GNUNET_OK if iterating, GNUNET_SYSERR on error
*/
-int GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle
- *cfg, struct GNUNET_PeerIdentity *peer,
- GNUNET_CORE_ConnectEventHandler peer_cb,
- void *cb_cls);
+int
+GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ struct GNUNET_PeerIdentity *peer,
+ GNUNET_CORE_ConnectEventHandler peer_cb,
+ void *cb_cls);
/**
@@ -464,25 +452,14 @@
* NULL if we can not even queue the request (insufficient
* memory); if NULL is returned, "notify" will NOT be called.
*/
-struct GNUNET_CORE_TransmitHandle *GNUNET_CORE_notify_transmit_ready (struct
-
GNUNET_CORE_Handle
- *handle,
- int cork,
- uint32_t
- priority,
- struct
-
GNUNET_TIME_Relative
- maxdelay,
- const
- struct
-
GNUNET_PeerIdentity
- *target,
- size_t
-
notify_size,
-
GNUNET_CONNECTION_TransmitReadyNotify
- notify,
- void
-
*notify_cls);
+struct GNUNET_CORE_TransmitHandle *
+GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
+ uint32_t priority,
+ struct GNUNET_TIME_Relative maxdelay,
+ const struct GNUNET_PeerIdentity *target,
+ size_t notify_size,
+ GNUNET_CONNECTION_TransmitReadyNotify
notify,
+ void *notify_cls);
/**
@@ -490,8 +467,9 @@
*
* @param th handle that was returned by "notify_transmit_ready".
*/
-void GNUNET_CORE_notify_transmit_ready_cancel (struct
GNUNET_CORE_TransmitHandle
- *th);
+void
+GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle
+ *th);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_crypto_lib.h
===================================================================
--- gnunet/src/include/gnunet_crypto_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_crypto_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -231,7 +231,8 @@
* @param len the length of the buffer in bytes
* @return the resulting CRC32 checksum
*/
-int32_t GNUNET_CRYPTO_crc32_n (const void *buf, size_t len);
+int32_t
+GNUNET_CRYPTO_crc32_n (const void *buf, size_t len);
/**
@@ -241,7 +242,8 @@
* @param i the upper limit (exclusive) for the random number
* @return a random value in the interval [0,i) (exclusive).
*/
-uint32_t GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t
i);
+uint32_t
+GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i);
/**
@@ -251,8 +253,8 @@
* @param max value returned will be in range [0,max) (exclusive)
* @return random 64-bit number
*/
-uint64_t GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode,
- uint64_t max);
+uint64_t
+GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode, uint64_t max);
/**
@@ -262,8 +264,8 @@
* @param n the size of the array
* @return the permutation array (allocated from heap)
*/
-unsigned int *GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode,
- unsigned int n);
+unsigned int *
+GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode, unsigned int n);
/**
@@ -271,8 +273,8 @@
*
* @param key key to initialize
*/
-void GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey
- *key);
+void
+GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey *key);
/**
* Check that a new session key is well-formed.
@@ -280,8 +282,9 @@
* @param key key to check
* @return GNUNET_OK if the key is valid
*/
-int GNUNET_CRYPTO_aes_check_session_key (const struct
- GNUNET_CRYPTO_AesSessionKey *key);
+int
+GNUNET_CRYPTO_aes_check_session_key (const struct GNUNET_CRYPTO_AesSessionKey
+ *key);
/**
@@ -295,12 +298,11 @@
* for streams.
* @return the size of the encrypted block, -1 for errors
*/
-ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len,
- const struct GNUNET_CRYPTO_AesSessionKey
- *sessionkey,
- const struct
- GNUNET_CRYPTO_AesInitializationVector *iv,
- void *result);
+ssize_t
+GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len,
+ const struct GNUNET_CRYPTO_AesSessionKey
*sessionkey,
+ const struct GNUNET_CRYPTO_AesInitializationVector
+ *iv, void *result);
/**
@@ -313,12 +315,11 @@
* @param result address to store the result at
* @return -1 on failure, size of decrypted block on success
*/
-ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size,
- const struct GNUNET_CRYPTO_AesSessionKey
- *sessionkey,
- const struct
- GNUNET_CRYPTO_AesInitializationVector *iv,
- void *result);
+ssize_t
+GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size,
+ const struct GNUNET_CRYPTO_AesSessionKey
*sessionkey,
+ const struct GNUNET_CRYPTO_AesInitializationVector
+ *iv, void *result);
/**
@@ -329,11 +330,10 @@
* @param salt_len size of the salt
* @param ... pairs of void * & size_t for context chunks, terminated by NULL
*/
-void GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector
- *iv,
- const struct GNUNET_CRYPTO_AesSessionKey
- *skey, const void *salt, size_t salt_len,
- ...);
+void
+GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector *iv,
+ const struct GNUNET_CRYPTO_AesSessionKey *skey,
+ const void *salt, size_t salt_len, ...);
/**
@@ -344,11 +344,10 @@
* @param salt_len size of the salt
* @param argp pairs of void * & size_t for context chunks, terminated by NULL
*/
-void GNUNET_CRYPTO_aes_derive_iv_v (struct
GNUNET_CRYPTO_AesInitializationVector
- *iv,
- const struct GNUNET_CRYPTO_AesSessionKey
- *skey, const void *salt, size_t salt_len,
- va_list argp);
+void
+GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector
*iv,
+ const struct GNUNET_CRYPTO_AesSessionKey *skey,
+ const void *salt, size_t salt_len, va_list
argp);
/**
@@ -357,8 +356,9 @@
* @param result where to store the encoding (struct
GNUNET_CRYPTO_HashAsciiEncoded can be
* safely cast to char*, a '\\0' termination is set).
*/
-void GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
- struct GNUNET_CRYPTO_HashAsciiEncoded *result);
+void
+GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
+ struct GNUNET_CRYPTO_HashAsciiEncoded *result);
/**
@@ -367,7 +367,8 @@
* @param result where to store the GNUNET_CRYPTO_hash code
* @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding
*/
-int GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result);
+int
+GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result);
/**
@@ -381,8 +382,9 @@
* @param b some hash code
* @return number between 0 and UINT32_MAX
*/
-uint32_t GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
- const GNUNET_HashCode * b);
+uint32_t
+GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
+ const GNUNET_HashCode * b);
/**
@@ -392,7 +394,8 @@
* @param size size of the block
* @param ret pointer to where to write the hashcode
*/
-void GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode *
ret);
+void
+GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret);
/**
@@ -403,9 +406,10 @@
* @param plaintext_len length of plaintext
* @param hmac where to store the hmac
*/
-void GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
- const void *plaintext, size_t plaintext_len,
- GNUNET_HashCode * hmac);
+void
+GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
+ const void *plaintext, size_t plaintext_len,
+ GNUNET_HashCode * hmac);
/**
@@ -435,16 +439,11 @@
* @param callback_cls closure for callback
* @return NULL on (immediate) errror
*/
-struct GNUNET_CRYPTO_FileHashContext *GNUNET_CRYPTO_hash_file (enum
-
GNUNET_SCHEDULER_Priority
- priority,
- const char
- *filename,
- size_t
blocksize,
-
GNUNET_CRYPTO_HashCompletedCallback
- callback,
- void
- *callback_cls);
+struct GNUNET_CRYPTO_FileHashContext *
+GNUNET_CRYPTO_hash_file (enum GNUNET_SCHEDULER_Priority priority,
+ const char *filename, size_t blocksize,
+ GNUNET_CRYPTO_HashCompletedCallback callback,
+ void *callback_cls);
/**
@@ -452,7 +451,8 @@
*
* @param fhc operation to cancel (callback must not yet have been invoked)
*/
-void GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext
*fhc);
+void
+GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc);
/**
@@ -461,8 +461,9 @@
* @param mode desired quality level
* @param result hash code that is randomized
*/
-void GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
- GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
+ GNUNET_HashCode * result);
/**
@@ -472,9 +473,10 @@
* @param b some hash code
* @param result set to b - a
*/
-void GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
- const GNUNET_HashCode * b,
- GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
+ const GNUNET_HashCode * b,
+ GNUNET_HashCode * result);
/**
@@ -484,9 +486,10 @@
* @param delta some hash code
* @param result set to a + delta
*/
-void GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
- const GNUNET_HashCode * delta,
- GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
+ const GNUNET_HashCode * delta,
+ GNUNET_HashCode * result);
/**
@@ -496,9 +499,9 @@
* @param b some hash code
* @param result set to a ^ b
*/
-void GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a,
- const GNUNET_HashCode * b,
- GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b,
+ GNUNET_HashCode * result);
/**
@@ -508,10 +511,11 @@
* @param skey set to a valid session key
* @param iv set to a valid initialization vector
*/
-void GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
- struct GNUNET_CRYPTO_AesSessionKey *skey,
- struct
GNUNET_CRYPTO_AesInitializationVector
- *iv);
+void
+GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
+ struct GNUNET_CRYPTO_AesSessionKey *skey,
+ struct GNUNET_CRYPTO_AesInitializationVector
+ *iv);
/**
@@ -521,7 +525,8 @@
* @param bit index into the hashcode, [0...159]
* @return Bit \a bit from hashcode \a code, -1 for invalid index
*/
-int GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int
bit);
+int
+GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
/**
* Determine how many low order bits match in two
@@ -535,8 +540,9 @@
*
* @return the number of bits that match
*/
-unsigned int GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
- const GNUNET_HashCode * second);
+unsigned int
+GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
+ const GNUNET_HashCode * second);
/**
@@ -547,8 +553,8 @@
* @param h2 some hash code
* @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2.
*/
-int GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1,
- const GNUNET_HashCode * h2);
+int
+GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode *
h2);
/**
@@ -560,9 +566,10 @@
* @param target some hash code
* @return -1 if h1 is closer, 1 if h2 is closer and 0 if h1==h2.
*/
-int GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
- const GNUNET_HashCode * h2,
- const GNUNET_HashCode * target);
+int
+GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
+ const GNUNET_HashCode * h2,
+ const GNUNET_HashCode * target);
/**
@@ -573,10 +580,11 @@
* @param salt_len size of the salt
* @param argp pair of void * & size_t for context chunks, terminated by NULL
*/
-void GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key,
- const struct GNUNET_CRYPTO_AesSessionKey
- *rkey, const void *salt, size_t salt_len,
- va_list argp);
+void
+GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key,
+ const struct GNUNET_CRYPTO_AesSessionKey
*rkey,
+ const void *salt, size_t salt_len,
+ va_list argp);
/**
@@ -587,10 +595,10 @@
* @param salt_len size of the salt
* @param ... pair of void * & size_t for context chunks, terminated by NULL
*/
-void GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key,
- const struct GNUNET_CRYPTO_AesSessionKey
- *rkey, const void *salt, size_t salt_len,
- ...);
+void
+GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key,
+ const struct GNUNET_CRYPTO_AesSessionKey *rkey,
+ const void *salt, size_t salt_len, ...);
/**
* @brief Derive key
@@ -604,9 +612,10 @@
* @param skm_len length of skm
* @return GNUNET_YES on success
*/
-int GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo,
- int prf_algo, const void *xts, size_t xts_len,
- const void *skm, size_t skm_len, ...);
+int
+GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo, int prf_algo,
+ const void *xts, size_t xts_len, const void *skm,
+ size_t skm_len, ...);
/**
@@ -622,9 +631,10 @@
* @param argp va_list of void * & size_t pairs for context chunks
* @return GNUNET_YES on success
*/
-int GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo,
- int prf_algo, const void *xts, size_t xts_len,
- const void *skm, size_t skm_len, va_list argp);
+int
+GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo, int prf_algo,
+ const void *xts, size_t xts_len, const void *skm,
+ size_t skm_len, va_list argp);
/**
@@ -638,9 +648,10 @@
* @param argp va_list of void * & size_t pairs for context chunks
* @return GNUNET_YES on success
*/
-int GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
- size_t xts_len, const void *skm, size_t skm_len,
- va_list argp);
+int
+GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
+ size_t xts_len, const void *skm, size_t skm_len,
+ va_list argp);
/**
@@ -654,8 +665,9 @@
* @param ... void * & size_t pairs for context chunks
* @return GNUNET_YES on success
*/
-int GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
- size_t xts_len, const void *skm, size_t skm_len, ...);
+int
+GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
+ size_t xts_len, const void *skm, size_t skm_len, ...);
/**
@@ -663,7 +675,8 @@
*
* @return fresh private key
*/
-struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_key_create (void);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_key_create (void);
/**
* Decode the private key from the data-format back
@@ -672,9 +685,8 @@
* @param buf the buffer where the private key data is stored
* @param len the length of the data in 'buffer'
*/
-struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_decode_key (const char
- *buf,
- uint16_t
len);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_decode_key (const char *buf, uint16_t len);
/**
* Create a new private key by reading it from a file. If the
@@ -690,8 +702,8 @@
* @return new private key, NULL on error (for example,
* permission denied)
*/
-struct GNUNET_CRYPTO_RsaPrivateKey
- *GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename);
/**
@@ -701,15 +713,16 @@
* @param hc "random" input to PRNG
* @return some private key purely dependent on input
*/
-struct GNUNET_CRYPTO_RsaPrivateKey
- *GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc);
/**
* Free memory occupied by the private key.
* @param hostkey pointer to the memory to free
*/
-void GNUNET_CRYPTO_rsa_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey);
+void
+GNUNET_CRYPTO_rsa_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey);
/**
@@ -718,11 +731,11 @@
* @param priv the private key
* @param pub where to write the public key
*/
-void GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey
- *priv,
- struct
- GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *pub);
+void
+GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey
+ *priv,
+ struct
GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+ *pub);
/**
@@ -735,11 +748,11 @@
* @param target where to store the encrypted block
* @return GNUNET_SYSERR on error, GNUNET_OK if ok
*/
-int GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
- const struct
- GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey,
- struct GNUNET_CRYPTO_RsaEncryptedData *target);
+int
+GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
+ const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+ *publicKey,
+ struct GNUNET_CRYPTO_RsaEncryptedData *target);
/**
@@ -751,10 +764,10 @@
* @param max how many bytes of a result are expected? Must be exact.
* @return the size of the decrypted block (that is, size) or -1 on error
*/
-ssize_t GNUNET_CRYPTO_rsa_decrypt (const struct GNUNET_CRYPTO_RsaPrivateKey
- *key,
- const struct GNUNET_CRYPTO_RsaEncryptedData
- *block, void *result, size_t max);
+ssize_t
+GNUNET_CRYPTO_rsa_decrypt (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
+ const struct GNUNET_CRYPTO_RsaEncryptedData *block,
+ void *result, size_t max);
/**
@@ -765,9 +778,10 @@
* @param sig where to write the signature
* @return GNUNET_SYSERR on error, GNUNET_OK on success
*/
-int GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
- const struct GNUNET_CRYPTO_RsaSignaturePurpose
- *purpose, struct GNUNET_CRYPTO_RsaSignature *sig);
+int
+GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
+ const struct GNUNET_CRYPTO_RsaSignaturePurpose
*purpose,
+ struct GNUNET_CRYPTO_RsaSignature *sig);
/**
@@ -780,13 +794,13 @@
* @param publicKey public key of the signer
* @return GNUNET_OK if ok, GNUNET_SYSERR if invalid
*/
-int GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
- const struct GNUNET_CRYPTO_RsaSignaturePurpose
- *validate,
- const struct GNUNET_CRYPTO_RsaSignature *sig,
- const struct
- GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey);
+int
+GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
+ const struct GNUNET_CRYPTO_RsaSignaturePurpose
+ *validate,
+ const struct GNUNET_CRYPTO_RsaSignature *sig,
+ const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+ *publicKey);
@@ -795,7 +809,8 @@
* where strong entropy gathering is not desired
* (for example, for hostkey generation).
*/
-void GNUNET_CRYPTO_random_disable_entropy_gathering (void);
+void
+GNUNET_CRYPTO_random_disable_entropy_gathering (void);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: gnunet/src/include/gnunet_datacache_lib.h
===================================================================
--- gnunet/src/include/gnunet_datacache_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_datacache_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -56,10 +56,9 @@
* @param section section in the configuration that contains our options
* @return handle to use to access the service
*/
-struct GNUNET_DATACACHE_Handle *GNUNET_DATACACHE_create (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg,
- const char *section);
+struct GNUNET_DATACACHE_Handle *
+GNUNET_DATACACHE_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *section);
/**
@@ -67,7 +66,8 @@
*
* @param h handle to the datastore
*/
-void GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h);
+void
+GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h);
/**
@@ -99,10 +99,11 @@
* @param discard_time when to discard the value in any case
* @return GNUNET_OK on success, GNUNET_SYSERR on error (full, etc.)
*/
-int GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
- const GNUNET_HashCode * key, size_t size,
- const char *data, enum GNUNET_BLOCK_Type type,
- struct GNUNET_TIME_Absolute discard_time);
+int
+GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
+ const GNUNET_HashCode * key, size_t size,
+ const char *data, enum GNUNET_BLOCK_Type type,
+ struct GNUNET_TIME_Absolute discard_time);
/**
@@ -116,11 +117,10 @@
* @param iter_cls closure for iter
* @return the number of results found
*/
-unsigned int GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
- const GNUNET_HashCode * key,
- enum GNUNET_BLOCK_Type type,
- GNUNET_DATACACHE_Iterator iter,
- void *iter_cls);
+unsigned int
+GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
+ const GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type,
+ GNUNET_DATACACHE_Iterator iter, void *iter_cls);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_datastore_service.h
===================================================================
--- gnunet/src/include/gnunet_datastore_service.h 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/include/gnunet_datastore_service.h 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -63,9 +63,8 @@
* @param cfg configuration to use
* @return handle to use to access the service
*/
-struct GNUNET_DATASTORE_Handle *GNUNET_DATASTORE_connect (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg);
+struct GNUNET_DATASTORE_Handle *
+GNUNET_DATASTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -75,7 +74,8 @@
* @param h handle to the datastore
* @param drop set to GNUNET_YES to delete all data in datastore (!)
*/
-void GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop);
+void
+GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop);
/**
@@ -112,21 +112,13 @@
* cancel; note that even if NULL is returned, the callback will be
invoked
* (or rather, will already have been invoked)
*/
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_reserve (struct
-
GNUNET_DATASTORE_Handle
- *h,
- uint64_t amount,
- uint32_t entries,
- unsigned int
- queue_priority,
- unsigned int
- max_queue_size,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_DATASTORE_ContinuationWithStatus
- cont,
- void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h, uint64_t amount,
+ uint32_t entries, unsigned int queue_priority,
+ unsigned int max_queue_size,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_DATASTORE_ContinuationWithStatus cont,
+ void *cont_cls);
/**
@@ -155,29 +147,17 @@
* cancel; note that even if NULL is returned, the callback will be
invoked
* (or rather, will already have been invoked)
*/
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_put (struct
-
GNUNET_DATASTORE_Handle
- *h, uint32_t rid,
- const GNUNET_HashCode
- * key, size_t size,
- const void *data,
- enum
GNUNET_BLOCK_Type
- type,
- uint32_t priority,
- uint32_t anonymity,
- uint32_t replication,
- struct
- GNUNET_TIME_Absolute
- expiration,
- unsigned int
- queue_priority,
- unsigned int
- max_queue_size,
- struct
- GNUNET_TIME_Relative
- timeout,
-
GNUNET_DATASTORE_ContinuationWithStatus
- cont, void
*cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
+ const GNUNET_HashCode * key, size_t size,
+ const void *data, enum GNUNET_BLOCK_Type type,
+ uint32_t priority, uint32_t anonymity,
+ uint32_t replication,
+ struct GNUNET_TIME_Absolute expiration,
+ unsigned int queue_priority, unsigned int max_queue_size,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_DATASTORE_ContinuationWithStatus cont,
+ void *cont_cls);
/**
@@ -201,24 +181,13 @@
* cancel; note that even if NULL is returned, the callback will be
invoked
* (or rather, will already have been invoked)
*/
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_release_reserve (struct
-
GNUNET_DATASTORE_Handle
- *h,
- uint32_t
- rid,
- unsigned
- int
-
queue_priority,
- unsigned
- int
-
max_queue_size,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_DATASTORE_ContinuationWithStatus
- cont,
- void
-
*cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
+ uint32_t rid, unsigned int queue_priority,
+ unsigned int max_queue_size,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_DATASTORE_ContinuationWithStatus cont,
+ void *cont_cls);
/**
@@ -238,23 +207,15 @@
* cancel; note that even if NULL is returned, the callback will be
invoked
* (or rather, will already have been invoked)
*/
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_update (struct
-
GNUNET_DATASTORE_Handle
- *h, uint64_t uid,
- uint32_t priority,
- struct
-
GNUNET_TIME_Absolute
- expiration,
- unsigned int
- queue_priority,
- unsigned int
- max_queue_size,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_DATASTORE_ContinuationWithStatus
- cont,
- void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
+ uint32_t priority,
+ struct GNUNET_TIME_Absolute expiration,
+ unsigned int queue_priority,
+ unsigned int max_queue_size,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_DATASTORE_ContinuationWithStatus cont,
+ void *cont_cls);
/**
@@ -278,23 +239,14 @@
* cancel; note that even if NULL is returned, the callback will be
invoked
* (or rather, will already have been invoked)
*/
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_remove (struct
-
GNUNET_DATASTORE_Handle
- *h,
- const
- GNUNET_HashCode *
- key, size_t size,
- const void *data,
- unsigned int
- queue_priority,
- unsigned int
- max_queue_size,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_DATASTORE_ContinuationWithStatus
- cont,
- void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
+ const GNUNET_HashCode * key, size_t size,
+ const void *data, unsigned int queue_priority,
+ unsigned int max_queue_size,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_DATASTORE_ContinuationWithStatus cont,
+ void *cont_cls);
/**
@@ -342,26 +294,14 @@
* @return NULL if the entry was not queued, otherwise a handle that can be
used to
* cancel
*/
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_key (struct
-
GNUNET_DATASTORE_Handle
- *h,
- uint64_t offset,
- const
- GNUNET_HashCode *
- key,
- enum
- GNUNET_BLOCK_Type
- type,
- unsigned int
- queue_priority,
- unsigned int
- max_queue_size,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_DATASTORE_DatumProcessor
- proc,
- void *proc_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
+ const GNUNET_HashCode * key,
+ enum GNUNET_BLOCK_Type type,
+ unsigned int queue_priority,
+ unsigned int max_queue_size,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_DATASTORE_DatumProcessor proc, void
*proc_cls);
/**
@@ -388,27 +328,15 @@
* @return NULL if the entry was not queued, otherwise a handle that can be
used to
* cancel
*/
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_zero_anonymity (struct
-
GNUNET_DATASTORE_Handle
- *h,
-
uint64_t
-
offset,
-
unsigned
- int
-
queue_priority,
-
unsigned
- int
-
max_queue_size,
- struct
-
GNUNET_TIME_Relative
-
timeout,
- enum
-
GNUNET_BLOCK_Type
- type,
-
GNUNET_DATASTORE_DatumProcessor
- proc,
- void
-
*proc_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
+ uint64_t offset,
+ unsigned int queue_priority,
+ unsigned int max_queue_size,
+ struct GNUNET_TIME_Relative timeout,
+ enum GNUNET_BLOCK_Type type,
+ GNUNET_DATASTORE_DatumProcessor proc,
+ void *proc_cls);
/**
@@ -430,22 +358,13 @@
* @return NULL if the entry was not queued, otherwise a handle that can be
used to
* cancel
*/
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_for_replication
(struct
-
GNUNET_DATASTORE_Handle
- *h,
-
unsigned
- int
-
queue_priority,
-
unsigned
- int
-
max_queue_size,
-
struct
-
GNUNET_TIME_Relative
-
timeout,
-
GNUNET_DATASTORE_DatumProcessor
- proc,
- void
-
*proc_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h,
+ unsigned int queue_priority,
+ unsigned int max_queue_size,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_DATASTORE_DatumProcessor proc,
+ void *proc_cls);
@@ -455,7 +374,8 @@
*
* @param qe operation to cancel
*/
-void GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe);
+void
+GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_dht_service.h
===================================================================
--- gnunet/src/include/gnunet_dht_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_dht_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -123,9 +123,9 @@
* processing multiple GET/FIND requests in parallel
* @return NULL on error
*/
-struct GNUNET_DHT_Handle *GNUNET_DHT_connect (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- unsigned int ht_len);
+struct GNUNET_DHT_Handle *
+GNUNET_DHT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ unsigned int ht_len);
/**
@@ -133,7 +133,8 @@
*
* @param handle connection to shut down
*/
-void GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle);
+void
+GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle);
/* *************** Standard API: get and put ******************* */
@@ -154,14 +155,14 @@
* @param cont continuation to call when done (transmitting request to service)
* @param cont_cls closure for cont
*/
-void GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle,
- const GNUNET_HashCode * key,
- uint32_t desired_replication_level,
- enum GNUNET_DHT_RouteOption options,
- enum GNUNET_BLOCK_Type type, size_t size, const char
*data,
- struct GNUNET_TIME_Absolute exp,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_SCHEDULER_Task cont, void *cont_cls);
+void
+GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, const GNUNET_HashCode * key,
+ uint32_t desired_replication_level,
+ enum GNUNET_DHT_RouteOption options,
+ enum GNUNET_BLOCK_Type type, size_t size, const char *data,
+ struct GNUNET_TIME_Absolute exp,
+ struct GNUNET_TIME_Relative timeout, GNUNET_SCHEDULER_Task
cont,
+ void *cont_cls);
/**
@@ -211,23 +212,16 @@
*
* @return handle to stop the async get
*/
-struct GNUNET_DHT_GetHandle *GNUNET_DHT_get_start (struct GNUNET_DHT_Handle
- *handle,
- struct GNUNET_TIME_Relative
- timeout,
- enum GNUNET_BLOCK_Type type,
- const GNUNET_HashCode * key,
- uint32_t
- desired_replication_level,
- enum GNUNET_DHT_RouteOption
- options,
- const struct
- GNUNET_CONTAINER_BloomFilter
- *bf, int32_t bf_mutator,
- const void *xquery,
- size_t xquery_size,
- GNUNET_DHT_GetIterator iter,
- void *iter_cls);
+struct GNUNET_DHT_GetHandle *
+GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
+ struct GNUNET_TIME_Relative timeout,
+ enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key,
+ uint32_t desired_replication_level,
+ enum GNUNET_DHT_RouteOption options,
+ const struct GNUNET_CONTAINER_BloomFilter *bf,
+ int32_t bf_mutator, const void *xquery,
+ size_t xquery_size, GNUNET_DHT_GetIterator iter,
+ void *iter_cls);
/**
@@ -238,7 +232,8 @@
* On return get_handle will no longer be valid, caller
* must not use again!!!
*/
-void GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle);
+void
+GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle);
/* ******** Special high-level API for finding peers *********** */
@@ -267,21 +262,12 @@
* @param proc_cls closure for proc
* @return handle to stop the async get, NULL on error
*/
-struct GNUNET_DHT_FindPeerHandle *GNUNET_DHT_find_peer_start (struct
- GNUNET_DHT_Handle
- *handle,
- struct
-
GNUNET_TIME_Relative
- timeout,
- const
- GNUNET_HashCode *
- key,
- enum
-
GNUNET_DHT_RouteOption
- options,
-
GNUNET_DHT_FindPeerProcessor
- proc,
- void *proc_cls);
+struct GNUNET_DHT_FindPeerHandle *
+GNUNET_DHT_find_peer_start (struct GNUNET_DHT_Handle *handle,
+ struct GNUNET_TIME_Relative timeout,
+ const GNUNET_HashCode * key,
+ enum GNUNET_DHT_RouteOption options,
+ GNUNET_DHT_FindPeerProcessor proc, void *proc_cls);
/**
@@ -289,8 +275,8 @@
*
* @param find_peer_handle GET operation to stop.
*/
-void GNUNET_DHT_find_peer_stop (struct GNUNET_DHT_FindPeerHandle
- *find_peer_handle);
+void
+GNUNET_DHT_find_peer_stop (struct GNUNET_DHT_FindPeerHandle *find_peer_handle);
@@ -337,25 +323,15 @@
* @param cont_cls closure for cont
* @return handle to stop the request, NULL if the request is "fire and forget"
*/
-struct GNUNET_DHT_RouteHandle *GNUNET_DHT_route_start (struct GNUNET_DHT_Handle
- *handle,
- const GNUNET_HashCode *
- key,
- uint32_t
-
desired_replication_level,
- enum
- GNUNET_DHT_RouteOption
- options,
- const struct
- GNUNET_MessageHeader
- *enc,
- struct
- GNUNET_TIME_Relative
- timeout,
-
GNUNET_DHT_ReplyProcessor
- iter, void *iter_cls,
- GNUNET_SCHEDULER_Task
- cont, void *cont_cls);
+struct GNUNET_DHT_RouteHandle *
+GNUNET_DHT_route_start (struct GNUNET_DHT_Handle *handle,
+ const GNUNET_HashCode * key,
+ uint32_t desired_replication_level,
+ enum GNUNET_DHT_RouteOption options,
+ const struct GNUNET_MessageHeader *enc,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_DHT_ReplyProcessor iter, void *iter_cls,
+ GNUNET_SCHEDULER_Task cont, void *cont_cls);
@@ -364,7 +340,8 @@
*
* @param route_handle operation to stop.
*/
-void GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle);
+void
+GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle);
/* ***** Special API for controlling DHT routing maintenance ******* */
@@ -381,8 +358,9 @@
* @param cont_cls closure for cont
* @param handle handle to the DHT service
*/
-void GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle,
- GNUNET_SCHEDULER_Task cont, void *cont_cls);
+void
+GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle,
+ GNUNET_SCHEDULER_Task cont, void *cont_cls);
/* ***** Special API for testing robustness with malicious peers ******* */
@@ -402,9 +380,9 @@
* @param cont_cls closure for cont
*
*/
-void GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle,
- GNUNET_SCHEDULER_Task cont,
- void *cont_cls);
+void
+GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle,
+ GNUNET_SCHEDULER_Task cont, void *cont_cls);
/**
@@ -416,10 +394,10 @@
* @param cont continuation to call when done (transmitting request to service)
* @param cont_cls closure for cont
*/
-void GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle,
- struct GNUNET_TIME_Relative frequency,
- GNUNET_SCHEDULER_Task cont,
- void *cont_cls);
+void
+GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle,
+ struct GNUNET_TIME_Relative frequency,
+ GNUNET_SCHEDULER_Task cont, void *cont_cls);
/**
@@ -431,10 +409,10 @@
* @param cont continuation to call when done (transmitting request to service)
* @param cont_cls closure for cont
*/
-void GNUNET_DHT_set_malicious_getter (struct GNUNET_DHT_Handle *handle,
- struct GNUNET_TIME_Relative frequency,
- GNUNET_SCHEDULER_Task cont,
- void *cont_cls);
+void
+GNUNET_DHT_set_malicious_getter (struct GNUNET_DHT_Handle *handle,
+ struct GNUNET_TIME_Relative frequency,
+ GNUNET_SCHEDULER_Task cont, void *cont_cls);
#endif
Modified: gnunet/src/include/gnunet_disk_lib.h
===================================================================
--- gnunet/src/include/gnunet_disk_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_disk_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -262,7 +262,8 @@
* @param part a file on the partition to check
* @return -1 on errors, otherwise the number of free blocks
*/
-long GNUNET_DISK_get_blocks_available (const char *part);
+long
+GNUNET_DISK_get_blocks_available (const char *part);
/**
@@ -271,7 +272,8 @@
* @param h handle to check
* @return GNUNET_YES if invalid, GNUNET_NO if valid
*/
-int GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
/**
@@ -282,7 +284,8 @@
* @return GNUNET_YES if yes, GNUNET_NO if not a file, GNUNET_SYSERR if
something
* else (will print an error message in that case, too).
*/
-int GNUNET_DISK_file_test (const char *fil);
+int
+GNUNET_DISK_file_test (const char *fil);
/**
@@ -292,8 +295,9 @@
* @param whence specification to which position the offset parameter relates
to
* @return the new position on success, GNUNET_SYSERR otherwise
*/
-off_t GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h,
- off_t offset, enum GNUNET_DISK_Seek whence);
+off_t
+GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, off_t offset,
+ enum GNUNET_DISK_Seek whence);
/**
@@ -308,8 +312,9 @@
* included?
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_DISK_file_size (const char *filename, uint64_t * size,
- int includeSymLinks);
+int
+GNUNET_DISK_file_size (const char *filename, uint64_t * size,
+ int includeSymLinks);
/**
@@ -327,8 +332,9 @@
* @param ino set to the inode ID
* @return GNUNET_OK on success
*/
-int GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
- uint64_t * ino);
+int
+GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
+ uint64_t * ino);
/**
@@ -342,7 +348,8 @@
* @return NULL on error, otherwise name of fresh
* file on disk in directory for temporary files
*/
-char *GNUNET_DISK_mktemp (const char *t);
+char *
+GNUNET_DISK_mktemp (const char *t);
/**
@@ -357,12 +364,9 @@
* call (because of flags)
* @return IO handle on success, NULL on error
*/
-struct GNUNET_DISK_FileHandle *GNUNET_DISK_file_open (const char *fn,
- enum
GNUNET_DISK_OpenFlags
- flags,
- enum
-
GNUNET_DISK_AccessPermissions
- perm);
+struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_file_open (const char *fn, enum GNUNET_DISK_OpenFlags flags,
+ enum GNUNET_DISK_AccessPermissions perm);
/**
* Creates an interprocess channel
@@ -371,8 +375,8 @@
* @param inherit_write 1 to make write handle inheritable, 0 otherwise (NT
only)
* @return handle to the new pipe, NULL on error
*/
-struct GNUNET_DISK_PipeHandle *GNUNET_DISK_pipe (int blocking, int
inherit_read,
- int inherit_write);
+struct GNUNET_DISK_PipeHandle *
+GNUNET_DISK_pipe (int blocking, int inherit_read, int inherit_write);
/**
@@ -380,7 +384,8 @@
* @param p pipe
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
+int
+GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
/**
* Closes one half of an interprocess channel
@@ -389,8 +394,9 @@
* @param end which end of the pipe to close
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p,
- enum GNUNET_DISK_PipeEnd end);
+int
+GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p,
+ enum GNUNET_DISK_PipeEnd end);
/**
* Close an open file.
@@ -398,7 +404,8 @@
* @param h file handle
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
/**
@@ -408,12 +415,9 @@
* @param n end to access
* @return handle for the respective end
*/
-const struct GNUNET_DISK_FileHandle *GNUNET_DISK_pipe_handle (const struct
-
GNUNET_DISK_PipeHandle
- *p,
- enum
-
GNUNET_DISK_PipeEnd
- n);
+const struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p,
+ enum GNUNET_DISK_PipeEnd n);
/**
* Read the contents of a binary file into a buffer.
@@ -422,8 +426,9 @@
* @param len the maximum number of bytes to read
* @return the number of bytes read on success, GNUNET_SYSERR on failure
*/
-ssize_t GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
- void *result, size_t len);
+ssize_t
+GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, void *result,
+ size_t len);
/**
@@ -434,7 +439,8 @@
* @param len the maximum number of bytes to read
* @return number of bytes read, GNUNET_SYSERR on failure
*/
-ssize_t GNUNET_DISK_fn_read (const char *fn, void *result, size_t len);
+ssize_t
+GNUNET_DISK_fn_read (const char *fn, void *result, size_t len);
/**
@@ -445,8 +451,9 @@
* @param n number of bytes to write
* @return number of bytes written on success, GNUNET_SYSERR on error
*/
-ssize_t GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
- const void *buffer, size_t n);
+ssize_t
+GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
+ const void *buffer, size_t n);
/**
@@ -459,8 +466,9 @@
* @param mode file permissions
* @return number of bytes written on success, GNUNET_SYSERR on error
*/
-ssize_t GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n,
- enum GNUNET_DISK_AccessPermissions mode);
+ssize_t
+GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n,
+ enum GNUNET_DISK_AccessPermissions mode);
/**
@@ -470,7 +478,8 @@
* @param dst destination file name
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_DISK_file_copy (const char *src, const char *dst);
+int
+GNUNET_DISK_file_copy (const char *src, const char *dst);
/**
@@ -481,9 +490,10 @@
* @param callback_cls closure for callback
* @return the number of files found, -1 on error
*/
-int GNUNET_DISK_directory_scan (const char *dirName,
- GNUNET_FileNameCallback callback,
- void *callback_cls);
+int
+GNUNET_DISK_directory_scan (const char *dirName,
+ GNUNET_FileNameCallback callback,
+ void *callback_cls);
/**
@@ -521,8 +531,9 @@
* GNUNET_NO if this was the last entry (and iteration is complete),
* GNUNET_SYSERR if "can" was YES
*/
-int GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator
- *iter, int can);
+int
+GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator
*iter,
+ int can);
/**
@@ -536,10 +547,11 @@
* @param callback the method to call for each file
* @param callback_cls closure for callback
*/
-void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio,
- const char *dirName,
-
GNUNET_DISK_DirectoryIteratorCallback
- callback, void *callback_cls);
+void
+GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio,
+ const char *dirName,
+ GNUNET_DISK_DirectoryIteratorCallback
+ callback, void *callback_cls);
/**
@@ -550,7 +562,8 @@
* @returns GNUNET_OK on success, GNUNET_SYSERR on failure,
* GNUNET_NO if directory exists but is not writeable
*/
-int GNUNET_DISK_directory_create_for_file (const char *filename);
+int
+GNUNET_DISK_directory_create_for_file (const char *filename);
/**
@@ -563,7 +576,8 @@
* @return GNUNET_YES if yes, GNUNET_NO if does not exist, GNUNET_SYSERR
* on any error and if exists but not directory
*/
-int GNUNET_DISK_directory_test (const char *fil);
+int
+GNUNET_DISK_directory_test (const char *fil);
/**
@@ -573,7 +587,8 @@
* @param fileName the file to remove
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_DISK_directory_remove (const char *fileName);
+int
+GNUNET_DISK_directory_remove (const char *fileName);
/**
@@ -582,7 +597,8 @@
* @param dir the directory to create
* @returns GNUNET_SYSERR on failure, GNUNET_OK otherwise
*/
-int GNUNET_DISK_directory_create (const char *dir);
+int
+GNUNET_DISK_directory_create (const char *dir);
/**
@@ -594,8 +610,9 @@
* @param excl GNUNET_YES for an exclusive lock
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart,
- off_t lockEnd, int excl);
+int
+GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart,
+ off_t lockEnd, int excl);
/**
@@ -605,15 +622,17 @@
* @param unlockEnd absolute position until where to unlock
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh,
- off_t unlockStart, off_t unlockEnd);
+int
+GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh, off_t unlockStart,
+ off_t unlockEnd);
/**
* @brief Removes special characters as ':' from a filename.
* @param fn the filename to canonicalize
*/
-void GNUNET_DISK_filename_canonicalize (char *fn);
+void
+GNUNET_DISK_filename_canonicalize (char *fn);
/**
@@ -622,7 +641,8 @@
* @param user new owner of the file
* @return GNUNET_OK on success, GNUNET_SYSERR on failure
*/
-int GNUNET_DISK_file_change_owner (const char *filename, const char *user);
+int
+GNUNET_DISK_file_change_owner (const char *filename, const char *user);
/**
@@ -639,8 +659,9 @@
* private directory name.
* @return the constructed filename
*/
-char *GNUNET_DISK_get_home_filename (const struct GNUNET_CONFIGURATION_Handle
- *cfg, const char *serviceName, ...);
+char *
+GNUNET_DISK_get_home_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *serviceName, ...);
/**
@@ -656,9 +677,10 @@
* @param len size of the mapping
* @return pointer to the mapped memory region, NULL on failure
*/
-void *GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h,
- struct GNUNET_DISK_MapHandle **m,
- enum GNUNET_DISK_MapType access, size_t len);
+void *
+GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h,
+ struct GNUNET_DISK_MapHandle **m,
+ enum GNUNET_DISK_MapType access, size_t len);
/**
* Unmap a file
@@ -666,14 +688,16 @@
* @param h mapping handle
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h);
+int
+GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h);
/**
* Write file changes to disk
* @param h handle to an open file
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h);
/**
* Creates a named pipe/FIFO and opens it
@@ -682,13 +706,9 @@
* @param perm access permissions
* @return pipe handle on success, NULL on error
*/
-struct GNUNET_DISK_FileHandle *GNUNET_DISK_npipe_create (char **fn,
- enum
- GNUNET_DISK_OpenFlags
- flags,
- enum
-
GNUNET_DISK_AccessPermissions
- perm);
+struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_npipe_create (char **fn, enum GNUNET_DISK_OpenFlags flags,
+ enum GNUNET_DISK_AccessPermissions perm);
/**
* Opens already existing named pipe/FIFO
@@ -698,20 +718,17 @@
* @param perm access permissions
* @return pipe handle on success, NULL on error
*/
-struct GNUNET_DISK_FileHandle *GNUNET_DISK_npipe_open (const char *fn,
- enum
- GNUNET_DISK_OpenFlags
- flags,
- enum
-
GNUNET_DISK_AccessPermissions
- perm);
+struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_npipe_open (const char *fn, enum GNUNET_DISK_OpenFlags flags,
+ enum GNUNET_DISK_AccessPermissions perm);
/**
* Closes a named pipe/FIFO
* @param pipe named pipe
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_DISK_npipe_close (struct GNUNET_DISK_FileHandle *pipe);
+int
+GNUNET_DISK_npipe_close (struct GNUNET_DISK_FileHandle *pipe);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: gnunet/src/include/gnunet_dv_service.h
===================================================================
--- gnunet/src/include/gnunet_dv_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_dv_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -68,12 +68,13 @@
* @param cont_cls closure for continuation
*
*/
-int GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle,
- const struct GNUNET_PeerIdentity *target,
- const char *msgbuf, size_t msgbuf_size,
- unsigned int priority, struct GNUNET_TIME_Relative timeout,
- const void *addr, size_t addrlen,
- GNUNET_TRANSPORT_TransmitContinuation cont, void
*cont_cls);
+int
+GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle,
+ const struct GNUNET_PeerIdentity *target, const char *msgbuf,
+ size_t msgbuf_size, unsigned int priority,
+ struct GNUNET_TIME_Relative timeout, const void *addr,
+ size_t addrlen, GNUNET_TRANSPORT_TransmitContinuation cont,
+ void *cont_cls);
Modified: gnunet/src/include/gnunet_fragmentation_lib.h
===================================================================
--- gnunet/src/include/gnunet_fragmentation_lib.h 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/include/gnunet_fragmentation_lib.h 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -80,22 +80,14 @@
* @param proc_cls closure for proc
* @return the fragmentation context
*/
-struct GNUNET_FRAGMENT_Context *GNUNET_FRAGMENT_context_create (struct
-
GNUNET_STATISTICS_Handle
- *stats,
- uint16_t mtu,
- struct
-
GNUNET_BANDWIDTH_Tracker
- *tracker,
- struct
-
GNUNET_TIME_Relative
- delay,
- const struct
-
GNUNET_MessageHeader
- *msg,
-
GNUNET_FRAGMENT_MessageProcessor
- proc,
- void
*proc_cls);
+struct GNUNET_FRAGMENT_Context *
+GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
+ uint16_t mtu,
+ struct GNUNET_BANDWIDTH_Tracker *tracker,
+ struct GNUNET_TIME_Relative delay,
+ const struct GNUNET_MessageHeader *msg,
+ GNUNET_FRAGMENT_MessageProcessor proc,
+ void *proc_cls);
/**
@@ -105,8 +97,8 @@
*
* @param fc fragmentation context
*/
-void GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context
- *fc);
+void
+GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context *fc);
/**
@@ -120,8 +112,9 @@
* GNUNET_NO if more messages are pending
* GNUNET_SYSERR if this ack is not valid for this fc
*/
-int GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
- const struct GNUNET_MessageHeader *msg);
+int
+GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
+ const struct GNUNET_MessageHeader *msg);
/**
@@ -132,9 +125,8 @@
* @return average delay between transmission and ACK for the
* last message, FOREVER if the message was not fully transmitted
*/
-struct GNUNET_TIME_Relative GNUNET_FRAGMENT_context_destroy (struct
-
GNUNET_FRAGMENT_Context
- *fc);
+struct GNUNET_TIME_Relative
+GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *fc);
/**
@@ -171,18 +163,12 @@
* back to the other side)
* @return the defragmentation context
*/
-struct GNUNET_DEFRAGMENT_Context *GNUNET_DEFRAGMENT_context_create (struct
-
GNUNET_STATISTICS_Handle
- *stats,
- uint16_t
- mtu,
- unsigned
int
- num_msgs,
- void *cls,
-
GNUNET_FRAGMENT_MessageProcessor
- proc,
-
GNUNET_DEFRAGMENT_AckProcessor
- ackp);
+struct GNUNET_DEFRAGMENT_Context *
+GNUNET_DEFRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
+ uint16_t mtu, unsigned int num_msgs,
+ void *cls,
+ GNUNET_FRAGMENT_MessageProcessor proc,
+ GNUNET_DEFRAGMENT_AckProcessor ackp);
/**
@@ -190,7 +176,8 @@
*
* @param dc defragmentation context
*/
-void GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
+void
+GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
/**
@@ -200,8 +187,9 @@
* @param msg the message that was received
* @return GNUNET_OK on success, GNUNET_NO if this was a duplicate,
GNUNET_SYSERR on error
*/
-int GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
- const struct GNUNET_MessageHeader
*msg);
+int
+GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
+ const struct GNUNET_MessageHeader *msg);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_fs_service.h
===================================================================
--- gnunet/src/include/gnunet_fs_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_fs_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -89,8 +89,8 @@
* @param uri uri to convert to a unique key
* @param key wherer to store the unique key
*/
-void GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
- GNUNET_HashCode * key);
+void
+GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key);
/**
* Convert a URI to a UTF-8 String.
@@ -98,7 +98,8 @@
* @param uri uri to convert to a string
* @return the UTF-8 string
*/
-char *GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri);
+char *
+GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri);
/**
* Convert keyword URI to a human readable format
@@ -107,7 +108,8 @@
* @param uri ksk uri to convert to a string
* @return string with the keywords
*/
-char *GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri);
+char *
+GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri);
/**
@@ -118,8 +120,9 @@
* @param keyword keyword to add
* @param is_mandatory is this keyword mandatory?
*/
-void GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri,
- const char *keyword, int is_mandatory);
+void
+GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri, const char *keyword,
+ int is_mandatory);
/**
@@ -129,8 +132,9 @@
* @param uri ksk uri to modify
* @param keyword keyword to add
*/
-void GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri,
- const char *keyword);
+void
+GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri,
+ const char *keyword);
/**
@@ -140,14 +144,16 @@
* @param emsg where to store the parser error message (if any)
* @return NULL on error
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_parse (const char *uri, char **emsg);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_parse (const char *uri, char **emsg);
/**
* Free URI.
*
* @param uri uri to free
*/
-void GNUNET_FS_uri_destroy (struct GNUNET_FS_Uri *uri);
+void
+GNUNET_FS_uri_destroy (struct GNUNET_FS_Uri *uri);
/**
@@ -156,8 +162,8 @@
* @param uri ksk uri to get the number of keywords from
* @return 0 if this is not a keyword URI
*/
-unsigned int GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri
- *uri);
+unsigned int
+GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri *uri);
/**
@@ -169,9 +175,10 @@
* @return -1 if this is not a keyword URI, otherwise number of
* keywords iterated over until iterator aborted
*/
-int GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri,
- GNUNET_FS_KeywordIterator iterator,
- void *iterator_cls);
+int
+GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri,
+ GNUNET_FS_KeywordIterator iterator,
+ void *iterator_cls);
/**
@@ -181,8 +188,9 @@
* @param peer where to store the identify of the peer (presumably) offering
the content
* @return GNUNET_SYSERR if this is not a location URI, otherwise GNUNET_OK
*/
-int GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri,
- struct GNUNET_PeerIdentity *peer);
+int
+GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri,
+ struct GNUNET_PeerIdentity *peer);
/**
@@ -191,8 +199,8 @@
* @param uri location URI to get the content URI from
* @return NULL if argument is not a location URI
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri
- *uri);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri *uri);
/**
@@ -201,9 +209,8 @@
* @param uri location URI to get the expiration from
* @return expiration time of the URI
*/
-struct GNUNET_TIME_Absolute GNUNET_FS_uri_loc_get_expiration (const struct
- GNUNET_FS_Uri
- *uri);
+struct GNUNET_TIME_Absolute
+GNUNET_FS_uri_loc_get_expiration (const struct GNUNET_FS_Uri *uri);
/**
@@ -214,13 +221,10 @@
* @param expiration_time how long will the content be offered?
* @return the location URI, NULL on error
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri
- *baseUri,
- const struct
- GNUNET_CONFIGURATION_Handle
- *cfg,
- struct GNUNET_TIME_Absolute
- expiration_time);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
+ const struct GNUNET_CONFIGURATION_Handle *cfg,
+ struct GNUNET_TIME_Absolute expiration_time);
/**
@@ -231,8 +235,8 @@
* @param uri the URI to canonicalize
* @return canonicalized version of the URI, NULL on error
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_canonicalize (const struct
GNUNET_FS_Uri
- *uri);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_canonicalize (const struct GNUNET_FS_Uri *uri);
/**
@@ -244,8 +248,9 @@
* @param u2 second uri
* @return merged URI, NULL on error
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_merge (const struct GNUNET_FS_Uri *u1,
- const struct GNUNET_FS_Uri *u2);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_merge (const struct GNUNET_FS_Uri *u1,
+ const struct GNUNET_FS_Uri *u2);
/**
@@ -254,7 +259,8 @@
* @param uri the URI to duplicate
* @return copy of the URI
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri);
/**
@@ -274,8 +280,8 @@
* @return an FS URI for the given keywords, NULL
* if keywords is not legal (i.e. empty).
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create (const char *keywords,
- char **emsg);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_create (const char *keywords, char **emsg);
/**
@@ -295,8 +301,8 @@
* @return an FS URI for the given keywords, NULL
* if keywords is not legal (i.e. empty).
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_args (unsigned int argc,
- const char **argv);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, const char **argv);
/**
@@ -306,8 +312,9 @@
* @param u2 the other URI
* @return GNUNET_YES if the URIs are equal
*/
-int GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
- const struct GNUNET_FS_Uri *u2);
+int
+GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
+ const struct GNUNET_FS_Uri *u2);
/**
@@ -316,7 +323,8 @@
* @param uri the uri to check
* @return GNUNET_YES if this is an SKS uri
*/
-int GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri);
+int
+GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri);
/**
@@ -333,8 +341,9 @@
* @param emsg where to store an error message
* @return an FS URI for the given namespace and identifier
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns,
- const char *id, char **emsg);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, const char *id,
+ char **emsg);
/**
@@ -344,8 +353,8 @@
* @param id identifier
* @return an FS URI for the given namespace and identifier
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode *
- nsid, const char
*id);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id);
/**
@@ -356,8 +365,9 @@
* @param nsid where to store the ID of the namespace
* @return GNUNET_OK on success
*/
-int GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
- GNUNET_HashCode * nsid);
+int
+GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
+ GNUNET_HashCode * nsid);
/**
@@ -366,7 +376,8 @@
* @param uri the sks uri
* @return NULL on error (not a valid SKS URI)
*/
-char *GNUNET_FS_uri_sks_get_content_id (const struct GNUNET_FS_Uri *uri);
+char *
+GNUNET_FS_uri_sks_get_content_id (const struct GNUNET_FS_Uri *uri);
/**
@@ -377,8 +388,9 @@
* @param uri SKS uri to convert
* @return NULL on error (not an SKS URI)
*/
-char *GNUNET_FS_uri_sks_to_string_fancy (struct GNUNET_CONFIGURATION_Handle
- *cfg, const struct GNUNET_FS_Uri
*uri);
+char *
+GNUNET_FS_uri_sks_to_string_fancy (struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct GNUNET_FS_Uri *uri);
/**
@@ -387,7 +399,8 @@
* @param uri the uri
* @return GNUNET_YES if this is a KSK uri
*/
-int GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri);
+int
+GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri);
/**
@@ -396,7 +409,8 @@
* @param uri the uri to check
* @return GNUNET_YES if this is a CHK uri
*/
-int GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri);
+int
+GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri);
/**
@@ -406,7 +420,8 @@
* @param uri the CHK (or LOC) URI to inspect
* @return size of the file as specified in the CHK URI
*/
-uint64_t GNUNET_FS_uri_chk_get_file_size (const struct GNUNET_FS_Uri *uri);
+uint64_t
+GNUNET_FS_uri_chk_get_file_size (const struct GNUNET_FS_Uri *uri);
/**
@@ -415,7 +430,8 @@
* @param uri the uri to check
* @return GNUNET_YES if this is a LOC uri
*/
-int GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri);
+int
+GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri);
/**
@@ -426,9 +442,9 @@
* @param md metadata to use
* @return NULL on error, otherwise a KSK URI
*/
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_meta_data (const struct
-
GNUNET_CONTAINER_MetaData
- *md);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_create_from_meta_data (const struct GNUNET_CONTAINER_MetaData
+ *md);
/* ******************** command-line option parsing API
*********************** */
@@ -445,10 +461,10 @@
* @param value command line argument given
* @return GNUNET_OK on success
*/
-int GNUNET_FS_getopt_set_keywords (struct
- GNUNET_GETOPT_CommandLineProcessorContext
- *ctx, void *scls, const char *option,
- const char *value);
+int
+GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext
+ *ctx, void *scls, const char *option,
+ const char *value);
/**
@@ -463,10 +479,10 @@
* @param value command line argument given
* @return GNUNET_OK on success
*/
-int GNUNET_FS_getopt_set_metadata (struct
- GNUNET_GETOPT_CommandLineProcessorContext
- *ctx, void *scls, const char *option,
- const char *value);
+int
+GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
+ *ctx, void *scls, const char *option,
+ const char *value);
@@ -1621,7 +1637,8 @@
/**
* Return the current year (i.e. '2011').
*/
-unsigned int GNUNET_FS_get_current_year (void);
+unsigned int
+GNUNET_FS_get_current_year (void);
/**
@@ -1630,7 +1647,8 @@
* @param year a year (after 1970, please ;-)).
* @return absolute time for January 1st of that year.
*/
-struct GNUNET_TIME_Absolute GNUNET_FS_year_to_time (unsigned int year);
+struct GNUNET_TIME_Absolute
+GNUNET_FS_year_to_time (unsigned int year);
/**
@@ -1650,12 +1668,10 @@
* @param ... list of optional options, terminated with GNUNET_FS_OPTIONS_END
* @return NULL on error
*/
-struct GNUNET_FS_Handle *GNUNET_FS_start (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const char *client_name,
- GNUNET_FS_ProgressCallback upcb,
- void *upcb_cls,
- enum GNUNET_FS_Flags flags, ...);
+struct GNUNET_FS_Handle *
+GNUNET_FS_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *client_name, GNUNET_FS_ProgressCallback upcb,
+ void *upcb_cls, enum GNUNET_FS_Flags flags, ...);
/**
@@ -1665,7 +1681,8 @@
*
* @param h handle that was returned from GNUNET_FS_start
*/
-void GNUNET_FS_stop (struct GNUNET_FS_Handle *h);
+void
+GNUNET_FS_stop (struct GNUNET_FS_Handle *h);
/**
@@ -1677,10 +1694,10 @@
* @return GNUNET_SYSERR on error, otherwise the number
* of meta-data items obtained
*/
-int GNUNET_FS_meta_data_extract_from_file (struct GNUNET_CONTAINER_MetaData
*md,
- const char *filename,
- struct EXTRACTOR_PluginList
- *extractors);
+int
+GNUNET_FS_meta_data_extract_from_file (struct GNUNET_CONTAINER_MetaData *md,
+ const char *filename,
+ struct EXTRACTOR_PluginList
*extractors);
/**
@@ -1721,8 +1738,8 @@
* can be passed to "GNUNET_FS_file_information_recover"
* to read this fi-struct from disk.
*/
-const char *GNUNET_FS_file_information_get_id (struct GNUNET_FS_FileInformation
- *s);
+const char *
+GNUNET_FS_file_information_get_id (struct GNUNET_FS_FileInformation *s);
@@ -1740,17 +1757,17 @@
* @param bo block options
* @return publish structure entry for the file
*/
-struct GNUNET_FS_FileInformation
- *GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h,
- void *client_info,
- const char *filename,
- const struct GNUNET_FS_Uri
- *keywords,
- const struct
- GNUNET_CONTAINER_MetaData
- *meta, int do_index,
- const struct
- GNUNET_FS_BlockOptions *bo);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h,
+ void *client_info,
+ const char *filename,
+ const struct GNUNET_FS_Uri
+ *keywords,
+ const struct
+ GNUNET_CONTAINER_MetaData *meta,
+ int do_index,
+ const struct
GNUNET_FS_BlockOptions
+ *bo);
/**
@@ -1769,17 +1786,17 @@
* @param bo block options
* @return publish structure entry for the file
*/
-struct GNUNET_FS_FileInformation
- *GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h,
- void *client_info,
- uint64_t length, void *data,
- const struct GNUNET_FS_Uri
- *keywords,
- const struct
- GNUNET_CONTAINER_MetaData
- *meta, int do_index,
- const struct
- GNUNET_FS_BlockOptions *bo);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h,
+ void *client_info, uint64_t
length,
+ void *data,
+ const struct GNUNET_FS_Uri
+ *keywords,
+ const struct
+ GNUNET_CONTAINER_MetaData *meta,
+ int do_index,
+ const struct
GNUNET_FS_BlockOptions
+ *bo);
/**
@@ -1818,19 +1835,19 @@
* @param bo block options
* @return publish structure entry for the file
*/
-struct GNUNET_FS_FileInformation
- *GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h,
- void *client_info,
- uint64_t length,
- GNUNET_FS_DataReader
reader,
- void *reader_cls,
- const struct GNUNET_FS_Uri
- *keywords,
- const struct
- GNUNET_CONTAINER_MetaData
- *meta, int do_index,
- const struct
- GNUNET_FS_BlockOptions
*bo);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h,
+ void *client_info,
+ uint64_t length,
+ GNUNET_FS_DataReader reader,
+ void *reader_cls,
+ const struct GNUNET_FS_Uri
+ *keywords,
+ const struct
+ GNUNET_CONTAINER_MetaData *meta,
+ int do_index,
+ const struct
+ GNUNET_FS_BlockOptions *bo);
/**
@@ -1890,11 +1907,12 @@
* @param emsg where to store an error message (on errors)
* @return GNUNET_OK on success
*/
-int GNUNET_FS_directory_scanner_default (void *cls, struct GNUNET_FS_Handle *h,
- const char *dirname, int do_index,
- const struct GNUNET_FS_BlockOptions
- *bo, GNUNET_FS_FileProcessor proc,
- void *proc_cls, char **emsg);
+int
+GNUNET_FS_directory_scanner_default (void *cls, struct GNUNET_FS_Handle *h,
+ const char *dirname, int do_index,
+ const struct GNUNET_FS_BlockOptions *bo,
+ GNUNET_FS_FileProcessor proc,
+ void *proc_cls, char **emsg);
/**
@@ -1917,17 +1935,16 @@
* @param emsg where to store an error message
* @return publish structure entry for the directory, NULL on error
*/
-struct GNUNET_FS_FileInformation
- *GNUNET_FS_file_information_create_from_directory (struct GNUNET_FS_Handle
- *h, void *client_info,
- const char *filename,
-
GNUNET_FS_DirectoryScanner
- scanner,
- void *scanner_cls,
- int do_index,
- const struct
- GNUNET_FS_BlockOptions
- *bo, char **emsg);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_from_directory (struct GNUNET_FS_Handle *h,
+ void *client_info,
+ const char *filename,
+ GNUNET_FS_DirectoryScanner
+ scanner, void *scanner_cls,
+ int do_index,
+ const struct
+ GNUNET_FS_BlockOptions *bo,
+ char **emsg);
/**
@@ -1944,17 +1961,16 @@
* @param bo block options
* @return publish structure entry for the directory , NULL on error
*/
-struct GNUNET_FS_FileInformation
- *GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle
- *h, void *client_info,
- const struct
- GNUNET_FS_Uri
*keywords,
- const struct
-
GNUNET_CONTAINER_MetaData
- *meta,
- const struct
- GNUNET_FS_BlockOptions
- *bo);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle *h,
+ void *client_info,
+ const struct GNUNET_FS_Uri
+ *keywords,
+ const struct
+ GNUNET_CONTAINER_MetaData
+ *meta,
+ const struct
+ GNUNET_FS_BlockOptions *bo);
/**
@@ -1963,8 +1979,9 @@
* @param ent check if this FI represents a directory
* @return GNUNET_YES if so, GNUNET_NO if not
*/
-int GNUNET_FS_file_information_is_directory (const struct
- GNUNET_FS_FileInformation *ent);
+int
+GNUNET_FS_file_information_is_directory (const struct GNUNET_FS_FileInformation
+ *ent);
/**
@@ -1978,8 +1995,9 @@
* must not include "dir" in its structure
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir,
- struct GNUNET_FS_FileInformation *ent);
+int
+GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir,
+ struct GNUNET_FS_FileInformation *ent);
/**
@@ -1996,9 +2014,10 @@
* @param proc function to call on each entry
* @param proc_cls closure for proc
*/
-void GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
- GNUNET_FS_FileInformationProcessor
- proc, void *proc_cls);
+void
+GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
+ GNUNET_FS_FileInformationProcessor proc,
+ void *proc_cls);
/**
@@ -2011,9 +2030,10 @@
* values are ignored
* @param cleaner_cls closure for cleaner
*/
-void GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
- GNUNET_FS_FileInformationProcessor
- cleaner, void *cleaner_cls);
+void
+GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
+ GNUNET_FS_FileInformationProcessor cleaner,
+ void *cleaner_cls);
/**
@@ -2047,19 +2067,12 @@
* @param options options for the publication
* @return context that can be used to control the publish operation
*/
-struct GNUNET_FS_PublishContext *GNUNET_FS_publish_start (struct
- GNUNET_FS_Handle *h,
- struct
-
GNUNET_FS_FileInformation
- *fi,
- struct
- GNUNET_FS_Namespace
- *namespace,
- const char *nid,
- const char *nuid,
- enum
-
GNUNET_FS_PublishOptions
- options);
+struct GNUNET_FS_PublishContext *
+GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
+ struct GNUNET_FS_FileInformation *fi,
+ struct GNUNET_FS_Namespace *namespace, const char
*nid,
+ const char *nuid,
+ enum GNUNET_FS_PublishOptions options);
/**
@@ -2070,7 +2083,8 @@
*
* @param pc context for the publication to stop
*/
-void GNUNET_FS_publish_stop (struct GNUNET_FS_PublishContext *pc);
+void
+GNUNET_FS_publish_stop (struct GNUNET_FS_PublishContext *pc);
/**
@@ -2098,13 +2112,14 @@
* @param cont continuation
* @param cont_cls closure for cont
*/
-void GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h,
- const struct GNUNET_FS_Uri *ksk_uri,
- const struct GNUNET_CONTAINER_MetaData *meta,
- const struct GNUNET_FS_Uri *uri,
- const struct GNUNET_FS_BlockOptions *bo,
- enum GNUNET_FS_PublishOptions options,
- GNUNET_FS_PublishContinuation cont, void
*cont_cls);
+void
+GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h,
+ const struct GNUNET_FS_Uri *ksk_uri,
+ const struct GNUNET_CONTAINER_MetaData *meta,
+ const struct GNUNET_FS_Uri *uri,
+ const struct GNUNET_FS_BlockOptions *bo,
+ enum GNUNET_FS_PublishOptions options,
+ GNUNET_FS_PublishContinuation cont, void *cont_cls);
/**
@@ -2121,14 +2136,15 @@
* @param cont continuation
* @param cont_cls closure for cont
*/
-void GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
- struct GNUNET_FS_Namespace *namespace,
- const char *identifier, const char *update,
- const struct GNUNET_CONTAINER_MetaData *meta,
- const struct GNUNET_FS_Uri *uri,
- const struct GNUNET_FS_BlockOptions *bo,
- enum GNUNET_FS_PublishOptions options,
- GNUNET_FS_PublishContinuation cont, void
*cont_cls);
+void
+GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
+ struct GNUNET_FS_Namespace *namespace,
+ const char *identifier, const char *update,
+ const struct GNUNET_CONTAINER_MetaData *meta,
+ const struct GNUNET_FS_Uri *uri,
+ const struct GNUNET_FS_BlockOptions *bo,
+ enum GNUNET_FS_PublishOptions options,
+ GNUNET_FS_PublishContinuation cont, void *cont_cls);
/**
@@ -2154,10 +2170,11 @@
* error) or "PREREQ_DONE" (on success)
* @param cont_cls closure for cont
*/
-void GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
- GNUNET_FS_IndexedFileProcessor iterator,
- void *iterator_cls,
- GNUNET_SCHEDULER_Task cont, void *cont_cls);
+void
+GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
+ GNUNET_FS_IndexedFileProcessor iterator,
+ void *iterator_cls, GNUNET_SCHEDULER_Task cont,
+ void *cont_cls);
/**
@@ -2168,10 +2185,9 @@
* @param cctx initial value for the client context
* @return NULL on error, otherwise handle
*/
-struct GNUNET_FS_UnindexContext *GNUNET_FS_unindex_start (struct
- GNUNET_FS_Handle *h,
- const char *filename,
- void *cctx);
+struct GNUNET_FS_UnindexContext *
+GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename,
+ void *cctx);
/**
@@ -2179,7 +2195,8 @@
*
* @param uc handle
*/
-void GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc);
+void
+GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc);
/**
@@ -2194,15 +2211,15 @@
* @param cont continuation
* @param cont_cls closure for cont
*/
-void GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h,
- struct GNUNET_FS_Uri *ksk_uri,
- struct GNUNET_FS_Namespace *namespace,
- const struct GNUNET_CONTAINER_MetaData
- *meta,
- const struct GNUNET_FS_BlockOptions *bo,
- const char *rootEntry,
- GNUNET_FS_PublishContinuation cont,
- void *cont_cls);
+void
+GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h,
+ struct GNUNET_FS_Uri *ksk_uri,
+ struct GNUNET_FS_Namespace *namespace,
+ const struct GNUNET_CONTAINER_MetaData *meta,
+ const struct GNUNET_FS_BlockOptions *bo,
+ const char *rootEntry,
+ GNUNET_FS_PublishContinuation cont,
+ void *cont_cls);
/**
@@ -2213,8 +2230,8 @@
* @param name name to use for the namespace
* @return handle to the namespace, NULL on error
*/
-struct GNUNET_FS_Namespace *GNUNET_FS_namespace_create (struct GNUNET_FS_Handle
- *h, const char *name);
+struct GNUNET_FS_Namespace *
+GNUNET_FS_namespace_create (struct GNUNET_FS_Handle *h, const char *name);
/**
@@ -2228,8 +2245,8 @@
*
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace,
- int freeze);
+int
+GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, int freeze);
/**
@@ -2254,9 +2271,9 @@
* @param cb function to call on each known namespace
* @param cb_cls closure for cb
*/
-void GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h,
- GNUNET_FS_NamespaceInfoProcessor cb,
- void *cb_cls);
+void
+GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h,
+ GNUNET_FS_NamespaceInfoProcessor cb, void *cb_cls);
/**
@@ -2296,10 +2313,11 @@
* @param ip function to call on each updateable identifier
* @param ip_cls closure for ip
*/
-void GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace
*namespace,
- const char *next_id,
- GNUNET_FS_IdentifierProcessor ip,
- void *ip_cls);
+void
+GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace,
+ const char *next_id,
+ GNUNET_FS_IdentifierProcessor ip,
+ void *ip_cls);
/**
@@ -2331,14 +2349,10 @@
* @param cctx initial value for the client context
* @return context that can be used to control the search
*/
-struct GNUNET_FS_SearchContext *GNUNET_FS_search_start (struct GNUNET_FS_Handle
- *h,
- const struct
- GNUNET_FS_Uri *uri,
- uint32_t anonymity,
- enum
- GNUNET_FS_SearchOptions
- options, void *cctx);
+struct GNUNET_FS_SearchContext *
+GNUNET_FS_search_start (struct GNUNET_FS_Handle *h,
+ const struct GNUNET_FS_Uri *uri, uint32_t anonymity,
+ enum GNUNET_FS_SearchOptions options, void *cctx);
/**
@@ -2346,7 +2360,8 @@
*
* @param sc context for the search that should be paused
*/
-void GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc);
+void
+GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc);
/**
@@ -2354,7 +2369,8 @@
*
* @param sc context for the search that should be resumed
*/
-void GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc);
+void
+GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc);
/**
@@ -2362,7 +2378,8 @@
*
* @param sc context for the search that should be stopped
*/
-void GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc);
+void
+GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc);
@@ -2437,26 +2454,14 @@
* for top-level downloads; useful for manually-triggered recursive
downloads)
* @return context that can be used to control this download
*/
-struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start (struct
- GNUNET_FS_Handle
*h,
- const struct
- GNUNET_FS_Uri *uri,
- const struct
-
GNUNET_CONTAINER_MetaData
- *meta,
- const char
- *filename,
- const char
- *tempname,
- uint64_t offset,
- uint64_t length,
- uint32_t anonymity,
- enum
-
GNUNET_FS_DownloadOptions
- options, void
*cctx,
- struct
-
GNUNET_FS_DownloadContext
- *parent);
+struct GNUNET_FS_DownloadContext *
+GNUNET_FS_download_start (struct GNUNET_FS_Handle *h,
+ const struct GNUNET_FS_Uri *uri,
+ const struct GNUNET_CONTAINER_MetaData *meta,
+ const char *filename, const char *tempname,
+ uint64_t offset, uint64_t length, uint32_t anonymity,
+ enum GNUNET_FS_DownloadOptions options, void *cctx,
+ struct GNUNET_FS_DownloadContext *parent);
/**
@@ -2493,29 +2498,14 @@
* @param cctx initial value for the client context for this download
* @return context that can be used to control this download
*/
-struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start_from_search (struct
-
GNUNET_FS_Handle
- *h,
- struct
-
GNUNET_FS_SearchResult
- *sr,
- const
- char
-
*filename,
- const
- char
-
*tempname,
-
uint64_t
- offset,
-
uint64_t
- length,
-
uint32_t
-
anonymity,
- enum
-
GNUNET_FS_DownloadOptions
-
options,
- void
- *cctx);
+struct GNUNET_FS_DownloadContext *
+GNUNET_FS_download_start_from_search (struct GNUNET_FS_Handle *h,
+ struct GNUNET_FS_SearchResult *sr,
+ const char *filename,
+ const char *tempname, uint64_t offset,
+ uint64_t length, uint32_t anonymity,
+ enum GNUNET_FS_DownloadOptions options,
+ void *cctx);
/**
@@ -2524,8 +2514,8 @@
* @param dc handle for the download
* @param do_delete delete files of incomplete downloads
*/
-void GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc,
- int do_delete);
+void
+GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete);
@@ -2543,8 +2533,9 @@
* @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if
* we have no mime-type information (treat as 'GNUNET_NO')
*/
-int GNUNET_FS_meta_data_test_for_directory (const struct
- GNUNET_CONTAINER_MetaData *md);
+int
+GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData
+ *md);
/**
@@ -2553,7 +2544,8 @@
*
* @param md metadata to add mimetype to
*/
-void GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md);
+void
+GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md);
/**
@@ -2562,8 +2554,9 @@
* @param md given meta data
* @return NULL if meta data is useless for suggesting a filename
*/
-char *GNUNET_FS_meta_data_suggest_filename (const struct
- GNUNET_CONTAINER_MetaData *md);
+char *
+GNUNET_FS_meta_data_suggest_filename (const struct GNUNET_CONTAINER_MetaData
+ *md);
/**
@@ -2610,10 +2603,11 @@
* GNUNET_NO if this could be part of a directory (but not 100% OK)
* GNUNET_SYSERR if 'data' does not represent a directory
*/
-int GNUNET_FS_directory_list_contents (size_t size, const void *data,
- uint64_t offset,
- GNUNET_FS_DirectoryEntryProcessor dep,
- void *dep_cls);
+int
+GNUNET_FS_directory_list_contents (size_t size, const void *data,
+ uint64_t offset,
+ GNUNET_FS_DirectoryEntryProcessor dep,
+ void *dep_cls);
/**
@@ -2626,10 +2620,9 @@
*
* @param mdir metadata for the directory
*/
-struct GNUNET_FS_DirectoryBuilder *GNUNET_FS_directory_builder_create (const
- struct
-
GNUNET_CONTAINER_MetaData
- *mdir);
+struct GNUNET_FS_DirectoryBuilder *
+GNUNET_FS_directory_builder_create (const struct GNUNET_CONTAINER_MetaData
+ *mdir);
/**
@@ -2642,10 +2635,11 @@
* data must point to exactly the number of bytes specified
* by the uri
*/
-void GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld,
- const struct GNUNET_FS_Uri *uri,
- const struct GNUNET_CONTAINER_MetaData
- *md, const void *data);
+void
+GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld,
+ const struct GNUNET_FS_Uri *uri,
+ const struct GNUNET_CONTAINER_MetaData *md,
+ const void *data);
/**
@@ -2658,8 +2652,9 @@
* @param rdata set to the encoded directory
* @return GNUNET_OK on success
*/
-int GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
- size_t * rsize, void **rdata);
+int
+GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
+ size_t * rsize, void **rdata);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_getopt_lib.h
===================================================================
--- gnunet/src/include/gnunet_getopt_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_getopt_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -207,9 +207,10 @@
* @return index into argv with first non-option
* argument, or GNUNET_SYSERR on error
*/
-int GNUNET_GETOPT_run (const char *binaryOptions,
- const struct GNUNET_GETOPT_CommandLineOption
*allOptions,
- unsigned int argc, char *const *argv);
+int
+GNUNET_GETOPT_run (const char *binaryOptions,
+ const struct GNUNET_GETOPT_CommandLineOption *allOptions,
+ unsigned int argc, char *const *argv);
/**
@@ -225,9 +226,9 @@
* @param value actual value of the option as a string.
* @return GNUNET_OK if parsing the value worked
*/
-int GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext
- *ctx, void *scls, const char *option,
- const char *value);
+int
+GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+ void *scls, const char *option, const char *value);
/**
@@ -243,9 +244,9 @@
* @param value actual value of the option as a string.
* @return GNUNET_OK if parsing the value worked
*/
-int GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext
- *ctx, void *scls, const char *option,
- const char *value);
+int
+GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+ void *scls, const char *option, const char *value);
/**
@@ -262,9 +263,9 @@
* @param value not used (NULL)
* @return GNUNET_OK
*/
-int GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext
- *ctx, void *scls, const char *option,
- const char *value);
+int
+GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+ void *scls, const char *option, const char *value);
/**
@@ -281,9 +282,9 @@
* @param value actual value of the option (a string)
* @return GNUNET_OK
*/
-int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext
- *ctx, void *scls, const char *option,
- const char *value);
+int
+GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext
*ctx,
+ void *scls, const char *option, const char *value);
/**
* Set an option of type 'unsigned int' from the command line. Each
@@ -299,10 +300,10 @@
* @param value not used (NULL)
* @return GNUNET_OK
*/
-int GNUNET_GETOPT_increment_value (struct
- GNUNET_GETOPT_CommandLineProcessorContext
- *ctx, void *scls, const char *option,
- const char *value);
+int
+GNUNET_GETOPT_increment_value (struct GNUNET_GETOPT_CommandLineProcessorContext
+ *ctx, void *scls, const char *option,
+ const char *value);
/* *************** internal prototypes - use macros above! ************* */
@@ -316,9 +317,10 @@
* @param value not used (NULL)
* @return GNUNET_SYSERR (do not continue)
*/
-int GNUNET_GETOPT_format_help_ (struct
GNUNET_GETOPT_CommandLineProcessorContext
- *ctx, void *scls, const char *option,
- const char *value);
+int
+GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
+ *ctx, void *scls, const char *option,
+ const char *value);
/**
* Print out program version (implements --version).
@@ -329,10 +331,10 @@
* @param value not used (NULL)
* @return GNUNET_SYSERR (do not continue)
*/
-int GNUNET_GETOPT_print_version_ (struct
- GNUNET_GETOPT_CommandLineProcessorContext
- *ctx, void *scls, const char *option,
- const char *value);
+int
+GNUNET_GETOPT_print_version_ (struct GNUNET_GETOPT_CommandLineProcessorContext
+ *ctx, void *scls, const char *option,
+ const char *value);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: gnunet/src/include/gnunet_hello_lib.h
===================================================================
--- gnunet/src/include/gnunet_hello_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_hello_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -60,11 +60,11 @@
* @return number of bytes copied, 0 if
* the target buffer was not big enough.
*/
-size_t GNUNET_HELLO_add_address (const char *tname,
- struct GNUNET_TIME_Absolute
- expiration, const void *addr,
- uint16_t addr_len, char *target,
- size_t max);
+size_t
+GNUNET_HELLO_add_address (const char *tname,
+ struct GNUNET_TIME_Absolute expiration,
+ const void *addr, uint16_t addr_len, char *target,
+ size_t max);
/**
@@ -90,11 +90,11 @@
*
* @return the hello message
*/
-struct GNUNET_HELLO_Message *GNUNET_HELLO_create (const struct
-
GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey,
-
GNUNET_HELLO_GenerateAddressListCallback
- addrgen, void *addrgen_cls);
+struct GNUNET_HELLO_Message *
+GNUNET_HELLO_create (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+ *publicKey,
+ GNUNET_HELLO_GenerateAddressListCallback addrgen,
+ void *addrgen_cls);
/**
@@ -102,7 +102,8 @@
* @param hello to inspect
* @return the size, 0 if HELLO is invalid
*/
-uint16_t GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello);
+uint16_t
+GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello);
/**
@@ -114,10 +115,9 @@
* @param h2 the second HELLO message
* @return the combined hello message
*/
-struct GNUNET_HELLO_Message *GNUNET_HELLO_merge (const struct
- GNUNET_HELLO_Message *h1,
- const struct
- GNUNET_HELLO_Message *h2);
+struct GNUNET_HELLO_Message *
+GNUNET_HELLO_merge (const struct GNUNET_HELLO_Message *h1,
+ const struct GNUNET_HELLO_Message *h2);
/**
@@ -136,12 +136,10 @@
* zero if the some addresses with expirations >= now
* do not match at all
*/
-struct GNUNET_TIME_Absolute GNUNET_HELLO_equals (const struct
- GNUNET_HELLO_Message *h1,
- const struct
- GNUNET_HELLO_Message *h2,
- struct GNUNET_TIME_Absolute
- now);
+struct GNUNET_TIME_Absolute
+GNUNET_HELLO_equals (const struct GNUNET_HELLO_Message *h1,
+ const struct GNUNET_HELLO_Message *h2,
+ struct GNUNET_TIME_Absolute now);
/**
@@ -174,13 +172,10 @@
* @param it_cls closure for it
* @return the modified HELLO or NULL
*/
-struct GNUNET_HELLO_Message *GNUNET_HELLO_iterate_addresses (const struct
-
GNUNET_HELLO_Message
- *msg,
- int
- return_modified,
-
GNUNET_HELLO_AddressIterator
- it, void *it_cls);
+struct GNUNET_HELLO_Message *
+GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg,
+ int return_modified,
+ GNUNET_HELLO_AddressIterator it, void *it_cls);
/**
@@ -194,14 +189,15 @@
* @param it iterator to call on each address
* @param it_cls closure for it
*/
-void GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message
- *new_hello,
- const struct GNUNET_HELLO_Message
- *old_hello,
- struct GNUNET_TIME_Absolute
- expiration_limit,
- GNUNET_HELLO_AddressIterator it,
- void *it_cls);
+void
+GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message
+ *new_hello,
+ const struct GNUNET_HELLO_Message
+ *old_hello,
+ struct GNUNET_TIME_Absolute
+ expiration_limit,
+ GNUNET_HELLO_AddressIterator it,
+ void *it_cls);
/**
@@ -211,9 +207,10 @@
* @param publicKey where to copy the public key information, can be NULL
* @return GNUNET_SYSERR if the HELLO was malformed
*/
-int GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
- struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
- *publicKey);
+int
+GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
+ struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+ *publicKey);
/**
@@ -223,8 +220,9 @@
* @param peer where to store the peer's identity
* @return GNUNET_SYSERR if the HELLO was malformed
*/
-int GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
- struct GNUNET_PeerIdentity *peer);
+int
+GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
+ struct GNUNET_PeerIdentity *peer);
/**
@@ -235,9 +233,8 @@
*
* @return header or NULL if the HELLO was malformed
*/
-struct GNUNET_MessageHeader *GNUNET_HELLO_get_header (struct
- GNUNET_HELLO_Message
- *hello);
+struct GNUNET_MessageHeader *
+GNUNET_HELLO_get_header (struct GNUNET_HELLO_Message *hello);
/* ifndef GNUNET_HELLO_LIB_H */
#endif
Modified: gnunet/src/include/gnunet_load_lib.h
===================================================================
--- gnunet/src/include/gnunet_load_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_load_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -51,8 +51,8 @@
* frequency, 0-load values will be added to the load
* @return the new load value
*/
-struct GNUNET_LOAD_Value *GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative
- autodecline);
+struct GNUNET_LOAD_Value *
+GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative autodecline);
/**
@@ -61,8 +61,9 @@
* @param load load to update
* @param autodecline frequency of load decline
*/
-void GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
- struct GNUNET_TIME_Relative autodecline);
+void
+GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
+ struct GNUNET_TIME_Relative autodecline);
/**
@@ -82,7 +83,8 @@
* 100 if the latest updates were so large
* that we could not do proper calculations
*/
-double GNUNET_LOAD_get_load (struct GNUNET_LOAD_Value *load);
+double
+GNUNET_LOAD_get_load (struct GNUNET_LOAD_Value *load);
/**
@@ -91,7 +93,8 @@
* @param load load handle
* @return zero if update was never called
*/
-double GNUNET_LOAD_get_average (struct GNUNET_LOAD_Value *load);
+double
+GNUNET_LOAD_get_average (struct GNUNET_LOAD_Value *load);
/**
@@ -100,7 +103,8 @@
* @param load to update
* @param data latest measurement value (for example, delay)
*/
-void GNUNET_LOAD_update (struct GNUNET_LOAD_Value *load, uint64_t data);
+void
+GNUNET_LOAD_update (struct GNUNET_LOAD_Value *load, uint64_t data);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_mesh_service.h
===================================================================
--- gnunet/src/include/gnunet_mesh_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_mesh_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -138,17 +138,11 @@
* @return handle to the mesh service
* NULL on error (in this case, init is never called)
*/
-struct GNUNET_MESH_Handle *GNUNET_MESH_connect (const struct
- GNUNET_CONFIGURATION_Handle
- *cfg, void *cls,
- GNUNET_MESH_TunnelEndHandler
- cleaner,
- const struct
- GNUNET_MESH_MessageHandler
- *handlers,
- const
- GNUNET_MESH_ApplicationType
- *stypes);
+struct GNUNET_MESH_Handle *
+GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls,
+ GNUNET_MESH_TunnelEndHandler cleaner,
+ const struct GNUNET_MESH_MessageHandler *handlers,
+ const GNUNET_MESH_ApplicationType *stypes);
/**
* Get the peer on the other side of this tunnel if it is just one. Return
NULL otherwise
@@ -156,9 +150,8 @@
* @param tunnel the tunnel
* @return the peer or NULL
*/
-const struct GNUNET_PeerIdentity *GNUNET_MESH_get_peer (const struct
- GNUNET_MESH_Tunnel
- *tunnel);
+const struct GNUNET_PeerIdentity *
+GNUNET_MESH_get_peer (const struct GNUNET_MESH_Tunnel *tunnel);
/**
@@ -166,7 +159,8 @@
*
* @param handle connection to mesh to disconnect
*/
-void GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
+void
+GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
@@ -220,23 +214,15 @@
* @param handler_cls closure for handler
* @return NULL on error (handler will not be called), otherwise handle for
cancellation
*/
-struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_any (struct
-
GNUNET_MESH_Handle
- *h,
- struct
-
GNUNET_TIME_Relative
- timeout,
- unsigned int
- num_peers,
- const struct
-
GNUNET_PeerIdentity
- *peers,
-
GNUNET_MESH_TunnelConnectHandler
-
connect_handler,
-
GNUNET_MESH_TunnelDisconnectHandler
-
disconnect_handler,
- void
- *handler_cls);
+struct GNUNET_MESH_Tunnel *
+GNUNET_MESH_peer_request_connect_any (struct GNUNET_MESH_Handle *h,
+ struct GNUNET_TIME_Relative timeout,
+ unsigned int num_peers,
+ const struct GNUNET_PeerIdentity *peers,
+ GNUNET_MESH_TunnelConnectHandler
+ connect_handler,
+ GNUNET_MESH_TunnelDisconnectHandler
+ disconnect_handler, void *handler_cls);
/**
@@ -256,23 +242,15 @@
* @param handler_cls closure for handler
* @return NULL on error (handler will not be called), otherwise handle for
cancellation
*/
-struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_all (struct
-
GNUNET_MESH_Handle
- *h,
- struct
-
GNUNET_TIME_Relative
- timeout,
- unsigned int
- num_peers,
- const struct
-
GNUNET_PeerIdentity
- *peers,
-
GNUNET_MESH_TunnelConnectHandler
-
connect_handler,
-
GNUNET_MESH_TunnelDisconnectHandler
-
disconnect_handler,
- void
- *handler_cls);
+struct GNUNET_MESH_Tunnel *
+GNUNET_MESH_peer_request_connect_all (struct GNUNET_MESH_Handle *h,
+ struct GNUNET_TIME_Relative timeout,
+ unsigned int num_peers,
+ const struct GNUNET_PeerIdentity *peers,
+ GNUNET_MESH_TunnelConnectHandler
+ connect_handler,
+ GNUNET_MESH_TunnelDisconnectHandler
+ disconnect_handler, void *handler_cls);
/**
@@ -283,10 +261,10 @@
* @param timeout how long to try to establish a connection
* @param peer peer to add
*/
-void GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
- struct GNUNET_TIME_Relative timeout,
- const struct GNUNET_PeerIdentity
- *peer);
+void
+GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
+ struct GNUNET_TIME_Relative timeout,
+ const struct GNUNET_PeerIdentity *peer);
/**
@@ -296,9 +274,9 @@
* @param tunnel handle to existing tunnel
* @param peer peer to remove
*/
-void GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
- const struct GNUNET_PeerIdentity
- *peer);
+void
+GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
+ const struct GNUNET_PeerIdentity *peer);
/**
@@ -318,20 +296,15 @@
* @param handler_cls closure for handler
* @return NULL on error (handler will not be called), otherwise handle for
cancellation
*/
-struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_by_type (struct
-
GNUNET_MESH_Handle
- *h,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_MESH_ApplicationType
- app_type,
-
GNUNET_MESH_TunnelConnectHandler
-
connect_handler,
-
GNUNET_MESH_TunnelDisconnectHandler
-
disconnect_handler,
- void
-
*handler_cls);
+struct GNUNET_MESH_Tunnel *
+GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Handle *h,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_MESH_ApplicationType app_type,
+ GNUNET_MESH_TunnelConnectHandler
+ connect_handler,
+ GNUNET_MESH_TunnelDisconnectHandler
+ disconnect_handler,
+ void *handler_cls);
/**
@@ -340,7 +313,8 @@
*
* @param req request handle that was returned for the original request
*/
-void GNUNET_MESH_peer_request_connect_cancel (struct GNUNET_MESH_Tunnel *req);
+void
+GNUNET_MESH_peer_request_connect_cancel (struct GNUNET_MESH_Tunnel *req);
/**
@@ -370,25 +344,14 @@
* NULL if we can not even queue the request (insufficient
* memory); if NULL is returned, "notify" will NOT be called.
*/
-struct GNUNET_MESH_TransmitHandle *GNUNET_MESH_notify_transmit_ready (struct
-
GNUNET_MESH_Tunnel
- *tunnel,
- int cork,
- uint32_t
- priority,
- struct
-
GNUNET_TIME_Relative
- maxdelay,
- const
- struct
-
GNUNET_PeerIdentity
- *target,
- size_t
-
notify_size,
-
GNUNET_CONNECTION_TransmitReadyNotify
- notify,
- void
-
*notify_cls);
+struct GNUNET_MESH_TransmitHandle *
+GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork,
+ uint32_t priority,
+ struct GNUNET_TIME_Relative maxdelay,
+ const struct GNUNET_PeerIdentity *target,
+ size_t notify_size,
+ GNUNET_CONNECTION_TransmitReadyNotify
notify,
+ void *notify_cls);
/**
@@ -396,19 +359,23 @@
*
* @param th handle that was returned by "notify_transmit_ready".
*/
-void GNUNET_MESH_notify_transmit_ready_cancel (struct
GNUNET_MESH_TransmitHandle
- *th);
+void
+GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle
+ *th);
-void GNUNET_MESH_tunnel_set_head (struct GNUNET_MESH_Tunnel *tunnel,
- void *head);
-void GNUNET_MESH_tunnel_set_tail (struct GNUNET_MESH_Tunnel *tunnel,
- void *tail);
-void *GNUNET_MESH_tunnel_get_head (struct GNUNET_MESH_Tunnel *tunnel);
-void *GNUNET_MESH_tunnel_get_tail (struct GNUNET_MESH_Tunnel *tunnel);
+void
+GNUNET_MESH_tunnel_set_head (struct GNUNET_MESH_Tunnel *tunnel, void *head);
+void
+GNUNET_MESH_tunnel_set_tail (struct GNUNET_MESH_Tunnel *tunnel, void *tail);
+void *
+GNUNET_MESH_tunnel_get_head (struct GNUNET_MESH_Tunnel *tunnel);
+void *
+GNUNET_MESH_tunnel_get_tail (struct GNUNET_MESH_Tunnel *tunnel);
-void GNUNET_MESH_tunnel_set_data (struct GNUNET_MESH_Tunnel *tunnel,
- void *data);
-void *GNUNET_MESH_tunnel_get_data (struct GNUNET_MESH_Tunnel *tunnel);
+void
+GNUNET_MESH_tunnel_set_data (struct GNUNET_MESH_Tunnel *tunnel, void *data);
+void *
+GNUNET_MESH_tunnel_get_data (struct GNUNET_MESH_Tunnel *tunnel);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: gnunet/src/include/gnunet_mesh_service_new.h
===================================================================
--- gnunet/src/include/gnunet_mesh_service_new.h 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/include/gnunet_mesh_service_new.h 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -140,17 +140,11 @@
* @return handle to the mesh service NULL on error
* (in this case, init is never called)
*/
-struct GNUNET_MESH_Handle *GNUNET_MESH_connect (const struct
- GNUNET_CONFIGURATION_Handle
- *cfg, void *cls,
- GNUNET_MESH_TunnelEndHandler
- cleaner,
- const struct
- GNUNET_MESH_MessageHandler
- *handlers,
- const
- GNUNET_MESH_ApplicationType
- *stypes);
+struct GNUNET_MESH_Handle *
+GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls,
+ GNUNET_MESH_TunnelEndHandler cleaner,
+ const struct GNUNET_MESH_MessageHandler *handlers,
+ const GNUNET_MESH_ApplicationType *stypes);
/**
@@ -158,7 +152,8 @@
*
* @param handle connection to mesh to disconnect
*/
-void GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
+void
+GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
/**
@@ -198,20 +193,19 @@
* @param disconnect_handler function to call when peers are disconnected
* @param handler_cls closure for connect/disconnect handlers
*/
-struct GNUNET_MESH_Tunnel *GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle
- *h,
-
GNUNET_MESH_TunnelConnectHandler
- connect_handler,
-
GNUNET_MESH_TunnelDisconnectHandler
- disconnect_handler,
- void *handler_cls);
+struct GNUNET_MESH_Tunnel *
+GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h,
+ GNUNET_MESH_TunnelConnectHandler connect_handler,
+ GNUNET_MESH_TunnelDisconnectHandler
+ disconnect_handler, void *handler_cls);
/**
* Destroy an existing tunnel.
*
* @param tun tunnel handle
*/
-void GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun);
+void
+GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun);
/**
@@ -222,10 +216,10 @@
* @param timeout how long to try to establish a connection
* @param peer peer to add
*/
-void GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
- struct GNUNET_TIME_Relative timeout,
- const struct GNUNET_PeerIdentity
- *peer);
+void
+GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
+ struct GNUNET_TIME_Relative timeout,
+ const struct GNUNET_PeerIdentity *peer);
/**
@@ -235,9 +229,9 @@
* @param tunnel handle to existing tunnel
* @param peer peer to remove
*/
-void GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
- const struct GNUNET_PeerIdentity
- *peer);
+void
+GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
+ const struct GNUNET_PeerIdentity *peer);
/**
@@ -249,12 +243,10 @@
* @param app_type application type that must be supported by the peer
* (MESH should discover peer in proximity handling this type)
*/
-void GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Tunnel
- *tunnel,
- struct GNUNET_TIME_Relative
- timeout,
- GNUNET_MESH_ApplicationType
- app_type);
+void
+GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Tunnel *tunnel,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_MESH_ApplicationType
app_type);
/**
@@ -283,25 +275,14 @@
* NULL if we can not even queue the request (insufficient
* memory); if NULL is returned, "notify" will NOT be called.
*/
-struct GNUNET_MESH_TransmitHandle *GNUNET_MESH_notify_transmit_ready (struct
-
GNUNET_MESH_Tunnel
- *tunnel,
- int cork,
- uint32_t
- priority,
- struct
-
GNUNET_TIME_Relative
- maxdelay,
- const
- struct
-
GNUNET_PeerIdentity
- *target,
- size_t
-
notify_size,
-
GNUNET_CONNECTION_TransmitReadyNotify
- notify,
- void
-
*notify_cls);
+struct GNUNET_MESH_TransmitHandle *
+GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork,
+ uint32_t priority,
+ struct GNUNET_TIME_Relative maxdelay,
+ const struct GNUNET_PeerIdentity *target,
+ size_t notify_size,
+ GNUNET_CONNECTION_TransmitReadyNotify
notify,
+ void *notify_cls);
/**
@@ -309,8 +290,9 @@
*
* @param th handle that was returned by "notify_transmit_ready".
*/
-void GNUNET_MESH_notify_transmit_ready_cancel (struct
GNUNET_MESH_TransmitHandle
- *th);
+void
+GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle
+ *th);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_nat_lib.h
===================================================================
--- gnunet/src/include/gnunet_nat_lib.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/include/gnunet_nat_lib.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -86,17 +86,13 @@
* @param callback_cls closure for callback
* @return NULL on error, otherwise handle that can be used to unregister
*/
-struct GNUNET_NAT_Handle *GNUNET_NAT_register (const struct
- GNUNET_CONFIGURATION_Handle
*cfg,
- int is_tcp, uint16_t adv_port,
- unsigned int num_addrs,
- const struct sockaddr **addrs,
- const socklen_t * addrlens,
- GNUNET_NAT_AddressCallback
- address_callback,
- GNUNET_NAT_ReversalCallback
- reversal_callback,
- void *callback_cls);
+struct GNUNET_NAT_Handle *
+GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp,
+ uint16_t adv_port, unsigned int num_addrs,
+ const struct sockaddr **addrs, const socklen_t * addrlens,
+ GNUNET_NAT_AddressCallback address_callback,
+ GNUNET_NAT_ReversalCallback reversal_callback,
+ void *callback_cls);
/**
@@ -109,8 +105,9 @@
* GNUNET_NO if the address is not plausible,
* GNUNET_SYSERR if the address is malformed
*/
-int GNUNET_NAT_test_address (struct GNUNET_NAT_Handle *h, const void *addr,
- socklen_t addrlen);
+int
+GNUNET_NAT_test_address (struct GNUNET_NAT_Handle *h, const void *addr,
+ socklen_t addrlen);
/**
@@ -121,8 +118,9 @@
* @param h handle (used for configuration)
* @param sa the address of the peer (IPv4-only)
*/
-void GNUNET_NAT_run_client (struct GNUNET_NAT_Handle *h,
- const struct sockaddr_in *sa);
+void
+GNUNET_NAT_run_client (struct GNUNET_NAT_Handle *h,
+ const struct sockaddr_in *sa);
@@ -132,7 +130,8 @@
*
* @param h the handle to stop
*/
-void GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *h);
+void
+GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *h);
/**
@@ -163,12 +162,10 @@
* @param report_cls closure for report
* @return handle to cancel NAT test
*/
-struct GNUNET_NAT_Test *GNUNET_NAT_test_start (const struct
- GNUNET_CONFIGURATION_Handle
*cfg,
- int is_tcp, uint16_t bnd_port,
- uint16_t adv_port,
- GNUNET_NAT_TestCallback report,
- void *report_cls);
+struct GNUNET_NAT_Test *
+GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ int is_tcp, uint16_t bnd_port, uint16_t adv_port,
+ GNUNET_NAT_TestCallback report, void *report_cls);
/**
@@ -176,7 +173,8 @@
*
* @param tst test to stop.
*/
-void GNUNET_NAT_test_stop (struct GNUNET_NAT_Test *tst);
+void
+GNUNET_NAT_test_stop (struct GNUNET_NAT_Test *tst);
/**
@@ -203,13 +201,9 @@
* @param cb_cls closure for 'cb'
* @return handle for cancellation (can only be used until 'cb' is called),
NULL on error
*/
-struct GNUNET_NAT_ExternalHandle *GNUNET_NAT_mini_get_external_ipv4 (struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_NAT_IPCallback
- cb,
- void
- *cb_cls);
+struct GNUNET_NAT_ExternalHandle *
+GNUNET_NAT_mini_get_external_ipv4 (struct GNUNET_TIME_Relative timeout,
+ GNUNET_NAT_IPCallback cb, void *cb_cls);
/**
@@ -217,8 +211,8 @@
*
* @param eh operation to cancel
*/
-void GNUNET_NAT_mini_get_external_ipv4_cancel (struct GNUNET_NAT_ExternalHandle
- *eh);
+void
+GNUNET_NAT_mini_get_external_ipv4_cancel (struct GNUNET_NAT_ExternalHandle
*eh);
/**
@@ -240,10 +234,9 @@
* @param ac_cls closure for 'ac'
* @return NULL on error
*/
-struct GNUNET_NAT_MiniHandle *GNUNET_NAT_mini_map_start (uint16_t port,
- int is_tcp,
-
GNUNET_NAT_AddressCallback
- ac, void *ac_cls);
+struct GNUNET_NAT_MiniHandle *
+GNUNET_NAT_mini_map_start (uint16_t port, int is_tcp,
+ GNUNET_NAT_AddressCallback ac, void *ac_cls);
/**
@@ -254,7 +247,8 @@
*
* @param mini the handle
*/
-void GNUNET_NAT_mini_map_stop (struct GNUNET_NAT_MiniHandle *mini);
+void
+GNUNET_NAT_mini_map_stop (struct GNUNET_NAT_MiniHandle *mini);
#endif
Modified: gnunet/src/include/gnunet_network_lib.h
===================================================================
--- gnunet/src/include/gnunet_network_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_network_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -83,13 +83,10 @@
* @param address_len length of address
* @return client socket
*/
-struct GNUNET_NETWORK_Handle *GNUNET_NETWORK_socket_accept (const struct
-
GNUNET_NETWORK_Handle
- *desc,
- struct sockaddr
- *address,
- socklen_t *
- address_len);
+struct GNUNET_NETWORK_Handle *
+GNUNET_NETWORK_socket_accept (const struct GNUNET_NETWORK_Handle *desc,
+ struct sockaddr *address,
+ socklen_t * address_len);
/**
@@ -98,7 +95,8 @@
* @param fd socket to box
* @return NULL on error (including not supported on target platform)
*/
-struct GNUNET_NETWORK_Handle *GNUNET_NETWORK_socket_box_native (int fd);
+struct GNUNET_NETWORK_Handle *
+GNUNET_NETWORK_socket_box_native (int fd);
/**
@@ -109,9 +107,10 @@
* @param address_len length of address
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc,
- const struct sockaddr *address,
- socklen_t address_len);
+int
+GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc,
+ const struct sockaddr *address,
+ socklen_t address_len);
/**
* Close a socket.
@@ -119,7 +118,8 @@
* @param desc socket to close
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc);
+int
+GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc);
/**
@@ -130,9 +130,10 @@
* @param address_len of address
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc,
- const struct sockaddr *address,
- socklen_t address_len);
+int
+GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc,
+ const struct sockaddr *address,
+ socklen_t address_len);
/**
@@ -145,9 +146,10 @@
* @param optlen length of optval
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_NETWORK_socket_getsockopt (const struct GNUNET_NETWORK_Handle *desc,
- int level, int optname, void *optval,
- socklen_t * optlen);
+int
+GNUNET_NETWORK_socket_getsockopt (const struct GNUNET_NETWORK_Handle *desc,
+ int level, int optname, void *optval,
+ socklen_t * optlen);
/**
@@ -157,16 +159,18 @@
* @param backlog length of the listen queue
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_NETWORK_socket_listen (const struct GNUNET_NETWORK_Handle *desc,
- int backlog);
+int
+GNUNET_NETWORK_socket_listen (const struct GNUNET_NETWORK_Handle *desc,
+ int backlog);
/**
* How much data is available to be read on this descriptor?
* @param desc socket
*/
-ssize_t GNUNET_NETWORK_socket_recvfrom_amount (const struct
- GNUNET_NETWORK_Handle *desc);
+ssize_t
+GNUNET_NETWORK_socket_recvfrom_amount (const struct GNUNET_NETWORK_Handle
+ *desc);
/**
@@ -178,12 +182,10 @@
* to be filled in by recvfrom
* @param addrlen length of the addr
*/
-ssize_t GNUNET_NETWORK_socket_recvfrom (const struct
- GNUNET_NETWORK_Handle
- *desc, void *buffer,
- size_t length,
- struct sockaddr
*src_addr,
- socklen_t * addrlen);
+ssize_t
+GNUNET_NETWORK_socket_recvfrom (const struct GNUNET_NETWORK_Handle *desc,
+ void *buffer, size_t length,
+ struct sockaddr *src_addr, socklen_t *
addrlen);
/**
@@ -194,8 +196,9 @@
* @param length length of buffer
* @return number of bytes read
*/
-ssize_t GNUNET_NETWORK_socket_recv (const struct GNUNET_NETWORK_Handle *desc,
- void *buffer, size_t length);
+ssize_t
+GNUNET_NETWORK_socket_recv (const struct GNUNET_NETWORK_Handle *desc,
+ void *buffer, size_t length);
/**
@@ -206,10 +209,11 @@
* @param timeout relative value when to return
* @return number of selected sockets, GNUNET_SYSERR on error
*/
-int GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds,
- struct GNUNET_NETWORK_FDSet *wfds,
- struct GNUNET_NETWORK_FDSet *efds,
- struct GNUNET_TIME_Relative timeout);
+int
+GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds,
+ struct GNUNET_NETWORK_FDSet *wfds,
+ struct GNUNET_NETWORK_FDSet *efds,
+ struct GNUNET_TIME_Relative timeout);
/**
@@ -220,8 +224,9 @@
* @param length size of the buffer
* @return number of bytes sent, GNUNET_SYSERR on error
*/
-ssize_t GNUNET_NETWORK_socket_send (const struct GNUNET_NETWORK_Handle *desc,
- const void *buffer, size_t length);
+ssize_t
+GNUNET_NETWORK_socket_send (const struct GNUNET_NETWORK_Handle *desc,
+ const void *buffer, size_t length);
/**
@@ -235,10 +240,11 @@
* @param dest_len length of address
* @return number of bytes sent, GNUNET_SYSERR on error
*/
-ssize_t GNUNET_NETWORK_socket_sendto (const struct GNUNET_NETWORK_Handle *desc,
- const void *message, size_t length,
- const struct sockaddr *dest_addr,
- socklen_t dest_len);
+ssize_t
+GNUNET_NETWORK_socket_sendto (const struct GNUNET_NETWORK_Handle *desc,
+ const void *message, size_t length,
+ const struct sockaddr *dest_addr,
+ socklen_t dest_len);
/**
@@ -251,10 +257,10 @@
* @param option_len size of option_value
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_NETWORK_socket_setsockopt (struct GNUNET_NETWORK_Handle *fd,
- int level, int option_name,
- const void *option_value,
- socklen_t option_len);
+int
+GNUNET_NETWORK_socket_setsockopt (struct GNUNET_NETWORK_Handle *fd, int level,
+ int option_name, const void *option_value,
+ socklen_t option_len);
/**
@@ -264,8 +270,8 @@
* @param how type of shutdown
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc,
- int how);
+int
+GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc, int how);
/**
@@ -277,7 +283,8 @@
* @param desc socket
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc);
+int
+GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc);
/**
@@ -290,9 +297,8 @@
* @param protocol network protocol
* @return new socket, NULL on error
*/
-struct GNUNET_NETWORK_Handle *GNUNET_NETWORK_socket_create (int domain,
- int type,
- int protocol);
+struct GNUNET_NETWORK_Handle *
+GNUNET_NETWORK_socket_create (int domain, int type, int protocol);
/**
@@ -300,7 +306,8 @@
*
* @param fds fd set to clear
*/
-void GNUNET_NETWORK_fdset_zero (struct GNUNET_NETWORK_FDSet *fds);
+void
+GNUNET_NETWORK_fdset_zero (struct GNUNET_NETWORK_FDSet *fds);
/**
@@ -308,8 +315,9 @@
* @param fds fd set
* @param desc socket to add
*/
-void GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds,
- const struct GNUNET_NETWORK_Handle *desc);
+void
+GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds,
+ const struct GNUNET_NETWORK_Handle *desc);
#ifdef __MINGW32__
@@ -319,9 +327,9 @@
* @param fds fd set
* @param h the file handle to add
*/
-void GNUNET_NETWORK_fdset_handle_set_native_w32_handle (struct
- GNUNET_NETWORK_FDSet
- *fds, HANDLE h);
+void
+GNUNET_NETWORK_fdset_handle_set_native_w32_handle (struct GNUNET_NETWORK_FDSet
+ *fds, HANDLE h);
#endif
@@ -331,8 +339,9 @@
* @param desc socket
* @return GNUNET_YES if the socket is in the set
*/
-int GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds,
- const struct GNUNET_NETWORK_Handle *desc);
+int
+GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds,
+ const struct GNUNET_NETWORK_Handle *desc);
/**
@@ -340,8 +349,9 @@
* @param dst the fd set to add to
* @param src the fd set to add from
*/
-void GNUNET_NETWORK_fdset_add (struct GNUNET_NETWORK_FDSet *dst,
- const struct GNUNET_NETWORK_FDSet *src);
+void
+GNUNET_NETWORK_fdset_add (struct GNUNET_NETWORK_FDSet *dst,
+ const struct GNUNET_NETWORK_FDSet *src);
/**
@@ -349,8 +359,9 @@
* @param to destination
* @param from source
*/
-void GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to,
- const struct GNUNET_NETWORK_FDSet *from);
+void
+GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to,
+ const struct GNUNET_NETWORK_FDSet *from);
/**
@@ -359,7 +370,8 @@
* @param desc wrapper to process
* @return POSIX file descriptor
*/
-int GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc);
+int
+GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc);
/**
@@ -368,8 +380,9 @@
* @param from native source set
* @param nfds the biggest socket number in from + 1
*/
-void GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to,
- const fd_set * from, int nfds);
+void
+GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to,
+ const fd_set * from, int nfds);
/**
@@ -378,7 +391,8 @@
* @param to destination
* @param nfd native FD to set
*/
-void GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to, int
nfd);
+void
+GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to, int nfd);
/**
@@ -388,8 +402,9 @@
* @param nfd native FD to test, -1 for none
* @return GNUNET_YES if to contains nfd
*/
-int GNUNET_NETWORK_fdset_test_native (const struct GNUNET_NETWORK_FDSet *to,
- int nfd);
+int
+GNUNET_NETWORK_fdset_test_native (const struct GNUNET_NETWORK_FDSet *to,
+ int nfd);
/**
@@ -397,8 +412,9 @@
* @param fds fd set
* @param h the file handle to add
*/
-void GNUNET_NETWORK_fdset_handle_set (struct GNUNET_NETWORK_FDSet *fds,
- const struct GNUNET_DISK_FileHandle *h);
+void
+GNUNET_NETWORK_fdset_handle_set (struct GNUNET_NETWORK_FDSet *fds,
+ const struct GNUNET_DISK_FileHandle *h);
/**
@@ -407,8 +423,9 @@
* @param h file handle
* @return GNUNET_YES if the file handle is part of the set
*/
-int GNUNET_NETWORK_fdset_handle_isset (const struct GNUNET_NETWORK_FDSet *fds,
- const struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_NETWORK_fdset_handle_isset (const struct GNUNET_NETWORK_FDSet *fds,
+ const struct GNUNET_DISK_FileHandle *h);
/**
@@ -417,22 +434,25 @@
* @param fds2 second fd set
* @return GNUNET_YES if they do overlap, GNUNET_NO otherwise
*/
-int GNUNET_NETWORK_fdset_overlap (const struct GNUNET_NETWORK_FDSet *fds1,
- const struct GNUNET_NETWORK_FDSet *fds2);
+int
+GNUNET_NETWORK_fdset_overlap (const struct GNUNET_NETWORK_FDSet *fds1,
+ const struct GNUNET_NETWORK_FDSet *fds2);
/**
* Creates an fd set
* @return a new fd set
*/
-struct GNUNET_NETWORK_FDSet *GNUNET_NETWORK_fdset_create (void);
+struct GNUNET_NETWORK_FDSet *
+GNUNET_NETWORK_fdset_create (void);
/**
* Releases the associated memory of an fd set
* @param fds fd set
*/
-void GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds);
+void
+GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_nse_service.h
===================================================================
--- gnunet/src/include/gnunet_nse_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_nse_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -84,10 +84,9 @@
*
* @return handle to use
*/
-struct GNUNET_NSE_Handle *GNUNET_NSE_connect (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- GNUNET_NSE_Callback func,
- void *func_cls);
+struct GNUNET_NSE_Handle *
+GNUNET_NSE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_NSE_Callback func, void *func_cls);
/**
@@ -96,7 +95,8 @@
* @param h handle to destroy
*
*/
-void GNUNET_NSE_disconnect (struct GNUNET_NSE_Handle *h);
+void
+GNUNET_NSE_disconnect (struct GNUNET_NSE_Handle *h);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_os_lib.h
===================================================================
--- gnunet/src/include/gnunet_os_lib.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/include/gnunet_os_lib.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -135,8 +135,8 @@
* @param dirkind what kind of directory is desired?
* @return a pointer to the dir path (to be freed by the caller)
*/
-char *GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind
- dirkind);
+char *
+GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind);
/**
@@ -160,8 +160,9 @@
* @param proc the callback function
* @param proc_cls closure for proc
*/
-void GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor
- proc, void *proc_cls);
+void
+GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
+ void *proc_cls);
/**
* @brief Get maximum string length returned by gethostname()
@@ -183,7 +184,8 @@
*
* @return pointer to the process sturcutre for this process
*/
-struct GNUNET_OS_Process *GNUNET_OS_process_current (void);
+struct GNUNET_OS_Process *
+GNUNET_OS_process_current (void);
/**
@@ -193,7 +195,8 @@
* @param sig signal
* @return 0 on success, -1 on error
*/
-int GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc, int sig);
+int
+GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc, int sig);
/**
@@ -201,7 +204,8 @@
*
* @param proc pointer to process structure
*/
-void GNUNET_OS_process_close (struct GNUNET_OS_Process *proc);
+void
+GNUNET_OS_process_close (struct GNUNET_OS_Process *proc);
/**
* Get the pid of the process in question
@@ -210,7 +214,8 @@
*
* @return the current process id
*/
-pid_t GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc);
+pid_t
+GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc);
/**
* Set process priority
@@ -219,8 +224,9 @@
* @param prio priority value
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_OS_set_process_priority (struct GNUNET_OS_Process *proc,
- enum GNUNET_SCHEDULER_Priority prio);
+int
+GNUNET_OS_set_process_priority (struct GNUNET_OS_Process *proc,
+ enum GNUNET_SCHEDULER_Priority prio);
/**
@@ -232,11 +238,10 @@
* @param ... NULL-terminated list of arguments to the process
* @return pointer to process structure of the new process, NULL on error
*/
-struct GNUNET_OS_Process *GNUNET_OS_start_process (struct
GNUNET_DISK_PipeHandle
- *pipe_stdin,
- struct
GNUNET_DISK_PipeHandle
- *pipe_stdout,
- const char *filename, ...);
+struct GNUNET_OS_Process *
+GNUNET_OS_start_process (struct GNUNET_DISK_PipeHandle *pipe_stdin,
+ struct GNUNET_DISK_PipeHandle *pipe_stdout,
+ const char *filename, ...);
/**
@@ -248,14 +253,10 @@
* @param va NULL-terminated list of arguments to the process
* @return pointer to process structure of the new process, NULL on error
*/
-struct GNUNET_OS_Process *GNUNET_OS_start_process_va (struct
- GNUNET_DISK_PipeHandle
- *pipe_stdin,
- struct
- GNUNET_DISK_PipeHandle
- *pipe_stdout,
- const char *filename,
- va_list va);
+struct GNUNET_OS_Process *
+GNUNET_OS_start_process_va (struct GNUNET_DISK_PipeHandle *pipe_stdin,
+ struct GNUNET_DISK_PipeHandle *pipe_stdout,
+ const char *filename, va_list va);
/**
* Start a process.
@@ -267,9 +268,9 @@
* including the process name as the first argument
* @return pointer to process structure of the new process, NULL on error
*/
-struct GNUNET_OS_Process *GNUNET_OS_start_process_v (const int *lsocks,
- const char *filename,
- char *const argv[]);
+struct GNUNET_OS_Process *
+GNUNET_OS_start_process_v (const int *lsocks, const char *filename,
+ char *const argv[]);
/**
@@ -290,7 +291,8 @@
*
* @param cmd handle to the process
*/
-void GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd);
+void
+GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd);
/**
@@ -304,12 +306,10 @@
* @param ... arguments to command
* @return NULL on error
*/
-struct GNUNET_OS_CommandHandle *GNUNET_OS_command_run (GNUNET_OS_LineProcessor
- proc, void *proc_cls,
- struct
- GNUNET_TIME_Relative
- timeout,
- const char *binary,
...);
+struct GNUNET_OS_CommandHandle *
+GNUNET_OS_command_run (GNUNET_OS_LineProcessor proc, void *proc_cls,
+ struct GNUNET_TIME_Relative timeout, const char *binary,
+ ...);
/**
@@ -320,9 +320,10 @@
* @param code return code/signal number
* @return GNUNET_OK on success, GNUNET_NO if the process is still running,
GNUNET_SYSERR otherwise
*/
-int GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
- enum GNUNET_OS_ProcessStatusType *type,
- unsigned long *code);
+int
+GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
+ enum GNUNET_OS_ProcessStatusType *type,
+ unsigned long *code);
/**
@@ -335,16 +336,17 @@
* @param proc pointer to process structure of the process to wait for
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc);
+int
+GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc);
/**
* Connects this process to its parent via pipe
*/
-void GNUNET_OS_install_parent_control_handler (void *cls,
- const struct
- GNUNET_SCHEDULER_TaskContext
- *tc);
+void
+GNUNET_OS_install_parent_control_handler (void *cls,
+ const struct
+ GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -358,7 +360,8 @@
* GNUNET_NO if not SUID (but binary exists)
* GNUNET_SYSERR on error (no such binary or not executable)
*/
-int GNUNET_OS_check_helper_binary (const char *binary);
+int
+GNUNET_OS_check_helper_binary (const char *binary);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_peer_lib.h
===================================================================
--- gnunet/src/include/gnunet_peer_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_peer_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -53,7 +53,8 @@
* @param pid identity to find
* @return the interned identity or 0.
*/
-GNUNET_PEER_Id GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid);
+GNUNET_PEER_Id
+GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid);
/**
@@ -63,7 +64,8 @@
* @param pid identity to intern
* @return the interned identity.
*/
-GNUNET_PEER_Id GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid);
+GNUNET_PEER_Id
+GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid);
/**
@@ -72,7 +74,8 @@
* @param id identity to change the RC of
* @param delta how much to change the RC
*/
-void GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta);
+void
+GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta);
/**
@@ -81,7 +84,8 @@
* @param ids array of PIDs to decrement the RCs of
* @param count size of the ids array
*/
-void GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count);
+void
+GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count);
/**
@@ -90,7 +94,8 @@
* @param id interned PID to convert
* @param pid where to write the normal peer identity
*/
-void GNUNET_PEER_resolve (GNUNET_PEER_Id id, struct GNUNET_PeerIdentity *pid);
+void
+GNUNET_PEER_resolve (GNUNET_PEER_Id id, struct GNUNET_PeerIdentity *pid);
/* ifndef GNUNET_PEER_LIB_H */
Modified: gnunet/src/include/gnunet_peerinfo_service.h
===================================================================
--- gnunet/src/include/gnunet_peerinfo_service.h 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/include/gnunet_peerinfo_service.h 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -54,9 +54,8 @@
* @return NULL on error (configuration related, actual connection
* etablishment may happen asynchronously).
*/
-struct GNUNET_PEERINFO_Handle *GNUNET_PEERINFO_connect (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg);
+struct GNUNET_PEERINFO_Handle *
+GNUNET_PEERINFO_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
@@ -69,7 +68,8 @@
*
* @param h handle to disconnect
*/
-void GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h);
+void
+GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h);
/**
@@ -83,8 +83,9 @@
* @param h handle to the peerinfo service
* @param hello the verified (!) HELLO message
*/
-void GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h,
- const struct GNUNET_HELLO_Message *hello);
+void
+GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h,
+ const struct GNUNET_HELLO_Message *hello);
/**
@@ -126,19 +127,12 @@
* @return NULL on error (in this case, 'callback' is never called!),
* otherwise an iterator context
*/
-struct GNUNET_PEERINFO_IteratorContext *GNUNET_PEERINFO_iterate (struct
-
GNUNET_PEERINFO_Handle
- *h,
- const struct
-
GNUNET_PeerIdentity
- *peer,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_PEERINFO_Processor
- callback,
- void
-
*callback_cls);
+struct GNUNET_PEERINFO_IteratorContext *
+GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h,
+ const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_PEERINFO_Processor callback,
+ void *callback_cls);
@@ -147,8 +141,8 @@
*
* @param ic context of the iterator to cancel
*/
-void GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext
- *ic);
+void
+GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext *ic);
@@ -170,13 +164,9 @@
* @param callback_cls closure for callback
* @return NULL on error
*/
-struct GNUNET_PEERINFO_NotifyContext *GNUNET_PEERINFO_notify (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg,
-
GNUNET_PEERINFO_Processor
- callback,
- void
- *callback_cls);
+struct GNUNET_PEERINFO_NotifyContext *
+GNUNET_PEERINFO_notify (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_PEERINFO_Processor callback, void
*callback_cls);
/**
@@ -184,7 +174,8 @@
*
* @param nc context to stop notifying
*/
-void GNUNET_PEERINFO_notify_cancel (struct GNUNET_PEERINFO_NotifyContext *nc);
+void
+GNUNET_PEERINFO_notify_cancel (struct GNUNET_PEERINFO_NotifyContext *nc);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_plugin_lib.h
===================================================================
--- gnunet/src/include/gnunet_plugin_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_plugin_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -59,7 +59,8 @@
* @param library_name name of the plugin to test if it is installed
* @return GNUNET_YES if the plugin exists, GNUNET_NO if not
*/
-int GNUNET_PLUGIN_test (const char *library_name);
+int
+GNUNET_PLUGIN_test (const char *library_name);
/**
* Setup plugin (runs the "init" callback and returns whatever "init"
@@ -73,7 +74,8 @@
* @param arg argument to the plugin initialization function
* @return whatever the initialization function returned, NULL on error
*/
-void *GNUNET_PLUGIN_load (const char *library_name, void *arg);
+void *
+GNUNET_PLUGIN_load (const char *library_name, void *arg);
/**
@@ -85,7 +87,8 @@
* @return whatever the shutdown function returned, typically NULL
* or a "char *" representing the error message
*/
-void *GNUNET_PLUGIN_unload (const char *library_name, void *arg);
+void *
+GNUNET_PLUGIN_unload (const char *library_name, void *arg);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_program_lib.h
===================================================================
--- gnunet/src/include/gnunet_program_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_program_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -66,10 +66,11 @@
* @param task_cls closure for task
* @return GNUNET_SYSERR on error, GNUNET_OK on success
*/
-int GNUNET_PROGRAM_run (int argc, char *const *argv, const char *binaryName,
- const char *binaryHelp,
- const struct GNUNET_GETOPT_CommandLineOption *options,
- GNUNET_PROGRAM_Main task, void *task_cls);
+int
+GNUNET_PROGRAM_run (int argc, char *const *argv, const char *binaryName,
+ const char *binaryHelp,
+ const struct GNUNET_GETOPT_CommandLineOption *options,
+ GNUNET_PROGRAM_Main task, void *task_cls);
Modified: gnunet/src/include/gnunet_pseudonym_lib.h
===================================================================
--- gnunet/src/include/gnunet_pseudonym_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_pseudonym_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -61,8 +61,9 @@
* @param delta by how much should the rating be changed?
* @return new rating of the namespace
*/
-int GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * nsid, int delta);
+int
+GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const GNUNET_HashCode * nsid, int delta);
/**
* Add a pseudonym to the set of known pseudonyms.
@@ -73,9 +74,10 @@
* @param id the pseudonym identifier
* @param meta metadata for the pseudonym
*/
-void GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const GNUNET_HashCode * id,
- const struct GNUNET_CONTAINER_MetaData *meta);
+void
+GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const GNUNET_HashCode * id,
+ const struct GNUNET_CONTAINER_MetaData *meta);
/**
@@ -86,41 +88,44 @@
* @param closure closure for iterator
* @return number of pseudonyms found
*/
-int GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg,
- GNUNET_PSEUDONYM_Iterator iterator,
- void *closure);
+int
+GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_PSEUDONYM_Iterator iterator, void *closure);
/**
* Register callback to be invoked whenever we discover
* a new pseudonym.
*/
-int GNUNET_PSEUDONYM_discovery_callback_register (const struct
- GNUNET_CONFIGURATION_Handle
- *cfg,
- GNUNET_PSEUDONYM_Iterator
- iterator, void *closure);
+int
+GNUNET_PSEUDONYM_discovery_callback_register (const struct
+ GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_PSEUDONYM_Iterator
+ iterator, void *closure);
/**
* Unregister namespace discovery callback.
*/
-int GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
- iterator, void *closure);
+int
+GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
+ iterator, void *closure);
/**
* Return the unique, human readable name for the given pseudonym.
*
* @return NULL on failure (should never happen)
*/
-char *GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle
- *cfg, const GNUNET_HashCode * pseudo);
+char *
+GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const GNUNET_HashCode * pseudo);
/**
* Get the pseudonym ID belonging to the given human readable name.
*
* @return GNUNET_OK on success
*/
-int GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
- const char *hname, GNUNET_HashCode * psid);
+int
+GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *hname, GNUNET_HashCode * psid);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_resolver_service.h
===================================================================
--- gnunet/src/include/gnunet_resolver_service.h 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/include/gnunet_resolver_service.h 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -63,13 +63,15 @@
*
* @param cfg configuration to use
*/
-void GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c);
+void
+GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c);
/**
* Destroy the connection to the resolver service.
*/
-void GNUNET_RESOLVER_disconnect (void);
+void
+GNUNET_RESOLVER_disconnect (void);
/**
@@ -82,16 +84,11 @@
* @param timeout how long to try resolving
* @return handle that can be used to cancel the request, NULL on error
*/
-struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_ip_get (const char
- *hostname,
- int domain,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_RESOLVER_AddressCallback
- callback,
- void
- *callback_cls);
+struct GNUNET_RESOLVER_RequestHandle *
+GNUNET_RESOLVER_ip_get (const char *hostname, int domain,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_RESOLVER_AddressCallback callback,
+ void *callback_cls);
/**
@@ -104,15 +101,11 @@
* @param timeout how long to try resolving
* @return handle that can be used to cancel the request, NULL on error
*/
-struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_hostname_resolve (int
- domain,
- struct
-
GNUNET_TIME_Relative
-
timeout,
-
GNUNET_RESOLVER_AddressCallback
-
callback,
- void
- *cls);
+struct GNUNET_RESOLVER_RequestHandle *
+GNUNET_RESOLVER_hostname_resolve (int domain,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_RESOLVER_AddressCallback callback,
+ void *cls);
/**
@@ -130,7 +123,8 @@
*
* @return local hostname, caller must free
*/
-char *GNUNET_RESOLVER_local_fqdn_get (void);
+char *
+GNUNET_RESOLVER_local_fqdn_get (void);
/**
@@ -145,19 +139,12 @@
* @param cls closure for callback
* @return handle that can be used to cancel the request, NULL on error
*/
-struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_hostname_get (const
struct
- sockaddr
- *sa,
- socklen_t
- salen,
- int
- do_resolve,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_RESOLVER_HostnameCallback
- callback,
- void *cls);
+struct GNUNET_RESOLVER_RequestHandle *
+GNUNET_RESOLVER_hostname_get (const struct sockaddr *sa, socklen_t salen,
+ int do_resolve,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_RESOLVER_HostnameCallback callback,
+ void *cls);
/**
@@ -168,7 +155,8 @@
*
* @param rh handle of request to cancel
*/
-void GNUNET_RESOLVER_request_cancel (struct GNUNET_RESOLVER_RequestHandle *rh);
+void
+GNUNET_RESOLVER_request_cancel (struct GNUNET_RESOLVER_RequestHandle *rh);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_scheduler_lib.h
===================================================================
--- gnunet/src/include/gnunet_scheduler_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_scheduler_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -224,7 +224,8 @@
* @param task task to run first (and immediately)
* @param task_cls closure of task
*/
-void GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls);
+void
+GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls);
/**
@@ -234,7 +235,8 @@
* priorities and prerequisite tasks). Note that tasks
* scheduled AFTER this call may still be delayed arbitrarily.
*/
-void GNUNET_SCHEDULER_shutdown ();
+void
+GNUNET_SCHEDULER_shutdown ();
/**
@@ -248,7 +250,8 @@
* all priority levels
* @return number of tasks pending right now
*/
-unsigned int GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p);
+unsigned int
+GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p);
/**
@@ -258,7 +261,8 @@
*
* * @return reason(s) why the current task is run
*/
-enum GNUNET_SCHEDULER_Reason GNUNET_SCHEDULER_get_reason ();
+enum GNUNET_SCHEDULER_Reason
+GNUNET_SCHEDULER_get_reason ();
/**
@@ -268,7 +272,8 @@
* * @param task id of the task to cancel
* @return the closure of the callback of the cancelled task
*/
-void *GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task);
+void *
+GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task);
/**
@@ -280,9 +285,9 @@
* @param task_cls closure of task
* @param reason reason for task invocation
*/
-void GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task,
- void *task_cls,
- enum GNUNET_SCHEDULER_Reason reason);
+void
+GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task, void *task_cls,
+ enum GNUNET_SCHEDULER_Reason reason);
/**
@@ -315,13 +320,9 @@
* @return unique task identifier for the job
* only valid until "task" is started!
*/
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_with_priority (enum
-
GNUNET_SCHEDULER_Priority
- prio,
-
GNUNET_SCHEDULER_Task
- task,
- void
- *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio,
+ GNUNET_SCHEDULER_Task task, void
*task_cls);
/**
@@ -333,8 +334,8 @@
* @return unique task identifier for the job
* only valid until "task" is started!
*/
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task
- task, void
*task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls);
/**
@@ -351,12 +352,10 @@
* @return unique task identifier for the job
* only valid until "task" is started!
*/
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now_with_lifeness (int
-
lifeness,
-
GNUNET_SCHEDULER_Task
- task,
- void
-
*task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness,
+ GNUNET_SCHEDULER_Task task,
+ void *task_cls);
/**
@@ -371,12 +370,9 @@
* @return unique task identifier for the job
* only valid until "task" is started!
*/
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_delayed (struct
-
GNUNET_TIME_Relative
- delay,
-
GNUNET_SCHEDULER_Task
- task,
- void *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay,
+ GNUNET_SCHEDULER_Task task, void *task_cls);
/**
@@ -395,15 +391,10 @@
* @return unique task identifier for the job
* only valid until "task" is started!
*/
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_net (struct
-
GNUNET_TIME_Relative
- delay,
- struct
-
GNUNET_NETWORK_Handle
- *rfd,
-
GNUNET_SCHEDULER_Task
- task,
- void *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay,
+ struct GNUNET_NETWORK_Handle *rfd,
+ GNUNET_SCHEDULER_Task task, void *task_cls);
/**
@@ -422,15 +413,10 @@
* @return unique task identifier for the job
* only valid until "task" is started!
*/
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_net (struct
-
GNUNET_TIME_Relative
- delay,
- struct
-
GNUNET_NETWORK_Handle
- *wfd,
-
GNUNET_SCHEDULER_Task
- task,
- void
*task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay,
+ struct GNUNET_NETWORK_Handle *wfd,
+ GNUNET_SCHEDULER_Task task, void *task_cls);
/**
@@ -449,15 +435,10 @@
* @return unique task identifier for the job
* only valid until "task" is started!
*/
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_file (struct
-
GNUNET_TIME_Relative
- delay,
- const struct
-
GNUNET_DISK_FileHandle
- *rfd,
-
GNUNET_SCHEDULER_Task
- task,
- void
*task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay,
+ const struct GNUNET_DISK_FileHandle *rfd,
+ GNUNET_SCHEDULER_Task task, void *task_cls);
/**
@@ -476,16 +457,10 @@
* @return unique task identifier for the job
* only valid until "task" is started!
*/
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_file (struct
-
GNUNET_TIME_Relative
- delay,
- const struct
-
GNUNET_DISK_FileHandle
- *wfd,
-
GNUNET_SCHEDULER_Task
- task,
- void
- *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay,
+ const struct GNUNET_DISK_FileHandle *wfd,
+ GNUNET_SCHEDULER_Task task, void *task_cls);
/**
@@ -520,23 +495,13 @@
* @return unique task identifier for the job
* only valid until "task" is started!
*/
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_select (enum
-
GNUNET_SCHEDULER_Priority
- prio,
-
GNUNET_SCHEDULER_TaskIdentifier
- prerequisite_task,
- struct
-
GNUNET_TIME_Relative
- delay,
- const struct
-
GNUNET_NETWORK_FDSet
- *rs,
- const struct
-
GNUNET_NETWORK_FDSet
- *ws,
-
GNUNET_SCHEDULER_Task
- task,
- void *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio,
+ GNUNET_SCHEDULER_TaskIdentifier prerequisite_task,
+ struct GNUNET_TIME_Relative delay,
+ const struct GNUNET_NETWORK_FDSet *rs,
+ const struct GNUNET_NETWORK_FDSet *ws,
+ GNUNET_SCHEDULER_Task task, void *task_cls);
/**
* Sets the select function to use in the scheduler (scheduler_select).
@@ -544,8 +509,9 @@
* @param new_select new select function to use (NULL to reset to default)
* @param new_select_cls closure for 'new_select'
*/
-void GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select,
- void *new_select_cls);
+void
+GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select,
+ void *new_select_cls);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_server_lib.h
===================================================================
--- gnunet/src/include/gnunet_server_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_server_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -122,12 +122,12 @@
* @return handle for the new server, NULL on error
* (typically, "port" already in use)
*/
-struct GNUNET_SERVER_Handle
- *GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
- void *access_cls,
- struct GNUNET_NETWORK_Handle **lsocks,
- struct GNUNET_TIME_Relative
- idle_timeout, int require_found);
+struct GNUNET_SERVER_Handle *
+GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
+ void *access_cls,
+ struct GNUNET_NETWORK_Handle **lsocks,
+ struct GNUNET_TIME_Relative idle_timeout,
+ int require_found);
/**
* Create a new server.
@@ -142,14 +142,12 @@
* @return handle for the new server, NULL on error
* (typically, "port" already in use)
*/
-struct GNUNET_SERVER_Handle *GNUNET_SERVER_create
(GNUNET_CONNECTION_AccessCheck
- access, void *access_cls,
- struct sockaddr *const
- *serverAddr,
- const socklen_t * socklen,
- struct GNUNET_TIME_Relative
- idle_timeout,
- int require_found);
+struct GNUNET_SERVER_Handle *
+GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck access, void *access_cls,
+ struct sockaddr *const *serverAddr,
+ const socklen_t * socklen,
+ struct GNUNET_TIME_Relative idle_timeout,
+ int require_found);
/**
@@ -157,7 +155,8 @@
*
* @param s server to destroy
*/
-void GNUNET_SERVER_destroy (struct GNUNET_SERVER_Handle *s);
+void
+GNUNET_SERVER_destroy (struct GNUNET_SERVER_Handle *s);
/**
@@ -173,9 +172,10 @@
* the handlers array must exist until removed
* (or server is destroyed).
*/
-void GNUNET_SERVER_add_handlers (struct GNUNET_SERVER_Handle *server,
- const struct GNUNET_SERVER_MessageHandler
- *handlers);
+void
+GNUNET_SERVER_add_handlers (struct GNUNET_SERVER_Handle *server,
+ const struct GNUNET_SERVER_MessageHandler
+ *handlers);
/**
@@ -193,12 +193,12 @@
* GNUNET_CONNECTION_notify_transmit_ready_cancel.
* NULL if we are already going to notify someone else (busy)
*/
-struct GNUNET_CONNECTION_TransmitHandle
- *GNUNET_SERVER_notify_transmit_ready (struct GNUNET_SERVER_Client *client,
- size_t size,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_CONNECTION_TransmitReadyNotify
- callback, void *callback_cls);
+struct GNUNET_CONNECTION_TransmitHandle *
+GNUNET_SERVER_notify_transmit_ready (struct GNUNET_SERVER_Client *client,
+ size_t size,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_CONNECTION_TransmitReadyNotify
+ callback, void *callback_cls);
/**
@@ -207,7 +207,8 @@
*
* @param client the client to set the persistent flag on
*/
-void GNUNET_SERVER_client_persist_ (struct GNUNET_SERVER_Client *client);
+void
+GNUNET_SERVER_client_persist_ (struct GNUNET_SERVER_Client *client);
/**
* Resume receiving from this client, we are done processing the
@@ -221,8 +222,8 @@
* GNUNET_SYSERR to close the connection (signal
* serious error)
*/
-void GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client,
- int success);
+void
+GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client, int success);
/**
@@ -233,8 +234,9 @@
* @param client the client to update
* @param timeout new timeout for activities on the socket
*/
-void GNUNET_SERVER_client_set_timeout (struct GNUNET_SERVER_Client *client,
- struct GNUNET_TIME_Relative timeout);
+void
+GNUNET_SERVER_client_set_timeout (struct GNUNET_SERVER_Client *client,
+ struct GNUNET_TIME_Relative timeout);
/**
@@ -244,8 +246,9 @@
*
* @param client client for which to disable the warning
*/
-void GNUNET_SERVER_disable_receive_done_warning (struct GNUNET_SERVER_Client
- *client);
+void
+GNUNET_SERVER_disable_receive_done_warning (struct GNUNET_SERVER_Client
+ *client);
/**
@@ -263,9 +266,10 @@
* GNUNET_SYSERR if the connection to the
* client should be shut down
*/
-int GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server,
- struct GNUNET_SERVER_Client *sender,
- const struct GNUNET_MessageHeader *message);
+int
+GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server,
+ struct GNUNET_SERVER_Client *sender,
+ const struct GNUNET_MessageHeader *message);
/**
@@ -280,12 +284,9 @@
* @return the client handle (client should call
* "client_drop" on the return value eventually)
*/
-struct GNUNET_SERVER_Client *GNUNET_SERVER_connect_socket (struct
- GNUNET_SERVER_Handle
- *server,
- struct
-
GNUNET_CONNECTION_Handle
- *connection);
+struct GNUNET_SERVER_Client *
+GNUNET_SERVER_connect_socket (struct GNUNET_SERVER_Handle *server,
+ struct GNUNET_CONNECTION_Handle *connection);
/**
@@ -295,7 +296,8 @@
*
* @param client the client to keep
*/
-void GNUNET_SERVER_client_keep (struct GNUNET_SERVER_Client *client);
+void
+GNUNET_SERVER_client_keep (struct GNUNET_SERVER_Client *client);
/**
@@ -306,7 +308,8 @@
*
* @param client the client to drop
*/
-void GNUNET_SERVER_client_drop (struct GNUNET_SERVER_Client *client);
+void
+GNUNET_SERVER_client_drop (struct GNUNET_SERVER_Client *client);
/**
@@ -317,8 +320,9 @@
* @param addrlen where to store the length of the address
* @return GNUNET_OK on success
*/
-int GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client,
- void **addr, size_t * addrlen);
+int
+GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client,
+ void **addr, size_t * addrlen);
/**
@@ -348,9 +352,10 @@
* @param callback function to call on disconnect
* @param callback_cls closure for callback
*/
-void GNUNET_SERVER_disconnect_notify (struct GNUNET_SERVER_Handle *server,
- GNUNET_SERVER_DisconnectCallback
callback,
- void *callback_cls);
+void
+GNUNET_SERVER_disconnect_notify (struct GNUNET_SERVER_Handle *server,
+ GNUNET_SERVER_DisconnectCallback callback,
+ void *callback_cls);
/**
@@ -360,10 +365,10 @@
* @param callback function to call on disconnect
* @param callback_cls closure for callback
*/
-void GNUNET_SERVER_disconnect_notify_cancel (struct GNUNET_SERVER_Handle
- *server,
- GNUNET_SERVER_DisconnectCallback
- callback, void *callback_cls);
+void
+GNUNET_SERVER_disconnect_notify_cancel (struct GNUNET_SERVER_Handle *server,
+ GNUNET_SERVER_DisconnectCallback
+ callback, void *callback_cls);
/**
@@ -374,7 +379,8 @@
*
* @param client the client to disconnect from
*/
-void GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client);
+void
+GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client);
/**
@@ -388,8 +394,8 @@
* @param h server handle
* @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
*/
-void GNUNET_SERVER_ignore_shutdown (struct GNUNET_SERVER_Handle *h,
- int do_ignore);
+void
+GNUNET_SERVER_ignore_shutdown (struct GNUNET_SERVER_Handle *h, int do_ignore);
@@ -401,7 +407,8 @@
* @param client handle to the client
* @return GNUNET_OK on success
*/
-int GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client);
+int
+GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client);
/**
@@ -419,9 +426,8 @@
* @param client client to create the context for.
* @return NULL on error
*/
-struct GNUNET_SERVER_TransmitContext
- *GNUNET_SERVER_transmit_context_create (struct GNUNET_SERVER_Client
- *client);
+struct GNUNET_SERVER_TransmitContext *
+GNUNET_SERVER_transmit_context_create (struct GNUNET_SERVER_Client *client);
/**
@@ -434,10 +440,10 @@
* @param length length of data
* @param type type of the message
*/
-void GNUNET_SERVER_transmit_context_append_data (struct
- GNUNET_SERVER_TransmitContext
- *tc, const void *data,
- size_t length, uint16_t type);
+void
+GNUNET_SERVER_transmit_context_append_data (struct
GNUNET_SERVER_TransmitContext
+ *tc, const void *data,
+ size_t length, uint16_t type);
/**
@@ -448,11 +454,12 @@
* @param tc context to use
* @param msg message to append
*/
-void GNUNET_SERVER_transmit_context_append_message (struct
-
GNUNET_SERVER_TransmitContext
- *tc,
- const struct
- GNUNET_MessageHeader *msg);
+void
+GNUNET_SERVER_transmit_context_append_message (struct
+ GNUNET_SERVER_TransmitContext
+ *tc,
+ const struct
GNUNET_MessageHeader
+ *msg);
/**
@@ -464,9 +471,9 @@
* @param tc transmission context to use
* @param timeout when to time out and abort the transmission
*/
-void GNUNET_SERVER_transmit_context_run (struct GNUNET_SERVER_TransmitContext
- *tc,
- struct GNUNET_TIME_Relative timeout);
+void
+GNUNET_SERVER_transmit_context_run (struct GNUNET_SERVER_TransmitContext *tc,
+ struct GNUNET_TIME_Relative timeout);
@@ -490,10 +497,9 @@
* if the queue gets longer than this number of messages
* @return handle to the notification context
*/
-struct GNUNET_SERVER_NotificationContext
- *GNUNET_SERVER_notification_context_create (struct GNUNET_SERVER_Handle
- *server,
- unsigned int queue_length);
+struct GNUNET_SERVER_NotificationContext *
+GNUNET_SERVER_notification_context_create (struct GNUNET_SERVER_Handle *server,
+ unsigned int queue_length);
/**
@@ -501,9 +507,10 @@
*
* @param nc context to destroy.
*/
-void GNUNET_SERVER_notification_context_destroy (struct
-
GNUNET_SERVER_NotificationContext
- *nc);
+void
+GNUNET_SERVER_notification_context_destroy (struct
+ GNUNET_SERVER_NotificationContext
+ *nc);
/**
@@ -512,11 +519,10 @@
* @param nc context to modify
* @param client client to add
*/
-void GNUNET_SERVER_notification_context_add (struct
- GNUNET_SERVER_NotificationContext
- *nc,
- struct GNUNET_SERVER_Client
- *client);
+void
+GNUNET_SERVER_notification_context_add (struct
GNUNET_SERVER_NotificationContext
+ *nc,
+ struct GNUNET_SERVER_Client *client);
/**
@@ -528,14 +534,13 @@
* @param msg message to send
* @param can_drop can this message be dropped due to queue length limitations
*/
-void GNUNET_SERVER_notification_context_unicast (struct
-
GNUNET_SERVER_NotificationContext
- *nc,
- struct GNUNET_SERVER_Client
- *client,
- const struct
- GNUNET_MessageHeader *msg,
- int can_drop);
+void
+GNUNET_SERVER_notification_context_unicast (struct
+ GNUNET_SERVER_NotificationContext
+ *nc,
+ struct GNUNET_SERVER_Client
*client,
+ const struct GNUNET_MessageHeader
+ *msg, int can_drop);
/**
@@ -545,12 +550,12 @@
* @param msg message to send
* @param can_drop can this message be dropped due to queue length limitations
*/
-void GNUNET_SERVER_notification_context_broadcast (struct
-
GNUNET_SERVER_NotificationContext
- *nc,
- const struct
- GNUNET_MessageHeader *msg,
- int can_drop);
+void
+GNUNET_SERVER_notification_context_broadcast (struct
+ GNUNET_SERVER_NotificationContext
+ *nc,
+ const struct GNUNET_MessageHeader
+ *msg, int can_drop);
@@ -580,9 +585,9 @@
* @param cb_cls closure for cb
* @return handle to tokenizer
*/
-struct GNUNET_SERVER_MessageStreamTokenizer
- *GNUNET_SERVER_mst_create (GNUNET_SERVER_MessageTokenizerCallback cb,
- void *cb_cls);
+struct GNUNET_SERVER_MessageStreamTokenizer *
+GNUNET_SERVER_mst_create (GNUNET_SERVER_MessageTokenizerCallback cb,
+ void *cb_cls);
/**
@@ -601,9 +606,10 @@
* GNUNET_NO if one_shot was set and we have another message ready
* GNUNET_SYSERR if the data stream is corrupt
*/
-int GNUNET_SERVER_mst_receive (struct GNUNET_SERVER_MessageStreamTokenizer
*mst,
- void *client_identity, const char *buf,
- size_t size, int purge, int one_shot);
+int
+GNUNET_SERVER_mst_receive (struct GNUNET_SERVER_MessageStreamTokenizer *mst,
+ void *client_identity, const char *buf, size_t size,
+ int purge, int one_shot);
/**
@@ -611,8 +617,8 @@
*
* @param mst tokenizer to destroy
*/
-void GNUNET_SERVER_mst_destroy (struct GNUNET_SERVER_MessageStreamTokenizer
- *mst);
+void
+GNUNET_SERVER_mst_destroy (struct GNUNET_SERVER_MessageStreamTokenizer *mst);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_service_lib.h
===================================================================
--- gnunet/src/include/gnunet_service_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_service_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -59,11 +59,11 @@
* zero (in this case, '*addrs' and '*addr_lens' will be
* set to NULL).
*/
-int GNUNET_SERVICE_get_server_addresses (const char *serviceName,
- const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- struct sockaddr ***addrs,
- socklen_t ** addr_lens);
+int
+GNUNET_SERVICE_get_server_addresses (const char *serviceName,
+ const struct GNUNET_CONFIGURATION_Handle
+ *cfg, struct sockaddr ***addrs,
+ socklen_t ** addr_lens);
/**
@@ -111,9 +111,10 @@
* @return GNUNET_SYSERR on error, GNUNET_OK
* if we shutdown nicely
*/
-int GNUNET_SERVICE_run (int argc, char *const *argv, const char *serviceName,
- enum GNUNET_SERVICE_Options opt,
- GNUNET_SERVICE_Main task, void *task_cls);
+int
+GNUNET_SERVICE_run (int argc, char *const *argv, const char *serviceName,
+ enum GNUNET_SERVICE_Options opt, GNUNET_SERVICE_Main task,
+ void *task_cls);
struct GNUNET_SERVICE_Context;
@@ -126,10 +127,9 @@
* @param cfg configuration to use
* @return NULL on error, service handle
*/
-struct GNUNET_SERVICE_Context *GNUNET_SERVICE_start (const char *serviceName,
- const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg);
+struct GNUNET_SERVICE_Context *
+GNUNET_SERVICE_start (const char *serviceName,
+ const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -139,9 +139,8 @@
* @param ctx the service context returned from the start function
* @return handle to the server for this service, NULL if there is none
*/
-struct GNUNET_SERVER_Handle *GNUNET_SERVICE_get_server (struct
- GNUNET_SERVICE_Context
- *ctx);
+struct GNUNET_SERVER_Handle *
+GNUNET_SERVICE_get_server (struct GNUNET_SERVICE_Context *ctx);
/**
@@ -149,7 +148,8 @@
*
* @param sctx the service context returned from the start function
*/
-void GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Context *sctx);
+void
+GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Context *sctx);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_signal_lib.h
===================================================================
--- gnunet/src/include/gnunet_signal_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_signal_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -59,9 +59,8 @@
* @param handler the function to call
* @return context that can be used to restore, NULL on error
*/
-struct GNUNET_SIGNAL_Context *GNUNET_SIGNAL_handler_install (int signal,
-
GNUNET_SIGNAL_Handler
- handler);
+struct GNUNET_SIGNAL_Context *
+GNUNET_SIGNAL_handler_install (int signal, GNUNET_SIGNAL_Handler handler);
/**
* Uninstall a previously installed signal hander.
@@ -69,7 +68,8 @@
* @param ctx context that was returned when the
* signal handler was installed
*/
-void GNUNET_SIGNAL_handler_uninstall (struct GNUNET_SIGNAL_Context *ctx);
+void
+GNUNET_SIGNAL_handler_uninstall (struct GNUNET_SIGNAL_Context *ctx);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_statistics_service.h
===================================================================
--- gnunet/src/include/gnunet_statistics_service.h 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/include/gnunet_statistics_service.h 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -72,11 +72,9 @@
* @param cfg services configuration in use
* @return handle to use
*/
-struct GNUNET_STATISTICS_Handle *GNUNET_STATISTICS_create (const char
- *subsystem,
- const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg);
+struct GNUNET_STATISTICS_Handle *
+GNUNET_STATISTICS_create (const char *subsystem,
+ const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -87,8 +85,8 @@
* @param sync_first set to GNUNET_YES if pending SET requests should
* be completed
*/
-void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h,
- int sync_first);
+void
+GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, int sync_first);
/**
@@ -103,9 +101,10 @@
* @param proc_cls closure for proc
* @return GNUNET_OK on success, GNUNET_SYSERR on error
*/
-int GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle,
- const char *subsystem, const char *name,
- GNUNET_STATISTICS_Iterator proc, void *proc_cls);
+int
+GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle,
+ const char *subsystem, const char *name,
+ GNUNET_STATISTICS_Iterator proc, void *proc_cls);
/**
@@ -135,19 +134,12 @@
* @param cls closure for proc and cont
* @return NULL on error
*/
-struct GNUNET_STATISTICS_GetHandle *GNUNET_STATISTICS_get (struct
-
GNUNET_STATISTICS_Handle
- *handle,
- const char
- *subsystem,
- const char *name,
- struct
- GNUNET_TIME_Relative
- timeout,
-
GNUNET_STATISTICS_Callback
- cont,
-
GNUNET_STATISTICS_Iterator
- proc, void *cls);
+struct GNUNET_STATISTICS_GetHandle *
+GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle,
+ const char *subsystem, const char *name,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_STATISTICS_Callback cont,
+ GNUNET_STATISTICS_Iterator proc, void *cls);
/**
@@ -156,7 +148,8 @@
*
* @param gh handle of the request to cancel
*/
-void GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh);
+void
+GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh);
/**
@@ -168,9 +161,9 @@
* @param value new value to set
* @param make_persistent should the value be kept across restarts?
*/
-void GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle,
- const char *name, uint64_t value,
- int make_persistent);
+void
+GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle,
+ const char *name, uint64_t value, int make_persistent);
/**
* Set statistic value for the peer. Will always use our
@@ -181,9 +174,9 @@
* @param delta change in value (added to existing value)
* @param make_persistent should the value be kept across restarts?
*/
-void GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle,
- const char *name, int64_t delta,
- int make_persistent);
+void
+GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle,
+ const char *name, int64_t delta, int
make_persistent);
Modified: gnunet/src/include/gnunet_strings_lib.h
===================================================================
--- gnunet/src/include/gnunet_strings_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_strings_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -56,7 +56,8 @@
* @param size number of bytes
* @return fancy representation of the size (possibly rounded) for humans
*/
-char *GNUNET_STRINGS_byte_size_fancy (unsigned long long size);
+char *
+GNUNET_STRINGS_byte_size_fancy (unsigned long long size);
/**
@@ -69,8 +70,8 @@
* @param charset character set to convert from
* @return the converted string (0-terminated)
*/
-char *GNUNET_STRINGS_to_utf8 (const char *input, size_t len,
- const char *charset);
+char *
+GNUNET_STRINGS_to_utf8 (const char *input, size_t len, const char *charset);
/**
@@ -81,7 +82,8 @@
* @return the full file name,
* NULL is returned on error
*/
-char *GNUNET_STRINGS_filename_expand (const char *fil);
+char *
+GNUNET_STRINGS_filename_expand (const char *fil);
/**
* Fill a buffer of the given size with
@@ -104,8 +106,8 @@
* @return number of bytes written to the buffer
* (or number of bytes that would have been written)
*/
-size_t GNUNET_STRINGS_buffer_fill (char *buffer, size_t size,
- unsigned int count, ...);
+size_t
+GNUNET_STRINGS_buffer_fill (char *buffer, size_t size, unsigned int count,
...);
/**
@@ -122,8 +124,9 @@
* @return offset of the character after the last 0-termination
* in the buffer, or 0 on error.
*/
-unsigned int GNUNET_STRINGS_buffer_tokenize (const char *buffer, size_t size,
- unsigned int count, ...);
+unsigned int
+GNUNET_STRINGS_buffer_tokenize (const char *buffer, size_t size,
+ unsigned int count, ...);
@@ -134,7 +137,8 @@
* @param t the absolute time to convert
* @return timestamp in human-readable form
*/
-char *GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t);
+char *
+GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t);
/**
@@ -143,8 +147,8 @@
* @param delta time in milli seconds
* @return string in human-readable form
*/
-char *GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative
- delta);
+char *
+GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative delta);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: gnunet/src/include/gnunet_testing_lib.h
===================================================================
--- gnunet/src/include/gnunet_testing_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_testing_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -466,22 +466,15 @@
* @param cb_cls closure for cb
* @return handle to the daemon (actual start will be completed asynchronously)
*/
-struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_start (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg,
- struct
- GNUNET_TIME_Relative
- timeout, int
pretend,
- const char
*hostname,
- const char
- *ssh_username,
- uint16_t sshport,
- const char *hostkey,
-
GNUNET_TESTING_NotifyHostkeyCreated
- hostkey_callback,
- void *hostkey_cls,
-
GNUNET_TESTING_NotifyDaemonRunning
- cb, void *cb_cls);
+struct GNUNET_TESTING_Daemon *
+GNUNET_TESTING_daemon_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ struct GNUNET_TIME_Relative timeout, int pretend,
+ const char *hostname, const char *ssh_username,
+ uint16_t sshport, const char *hostkey,
+ GNUNET_TESTING_NotifyHostkeyCreated
+ hostkey_callback, void *hostkey_cls,
+ GNUNET_TESTING_NotifyDaemonRunning cb,
+ void *cb_cls);
/**
* Continues GNUnet daemon startup when user wanted to be notified
@@ -490,8 +483,8 @@
*
* @param daemon the daemon to finish starting
*/
-void GNUNET_TESTING_daemon_continue_startup (struct GNUNET_TESTING_Daemon
- *daemon);
+void
+GNUNET_TESTING_daemon_continue_startup (struct GNUNET_TESTING_Daemon *daemon);
/**
* Check whether the given daemon is running.
@@ -501,7 +494,8 @@
* @return GNUNET_YES if the daemon is up, GNUNET_NO if the
* daemon is down, GNUNET_SYSERR on error.
*/
-int GNUNET_TESTING_daemon_running (struct GNUNET_TESTING_Daemon *daemon);
+int
+GNUNET_TESTING_daemon_running (struct GNUNET_TESTING_Daemon *daemon);
/**
* Restart (stop and start) a GNUnet daemon.
@@ -510,9 +504,10 @@
* @param cb function called once the daemon is (re)started
* @param cb_cls closure for cb
*/
-void GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d,
- GNUNET_TESTING_NotifyDaemonRunning cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d,
+ GNUNET_TESTING_NotifyDaemonRunning cb,
+ void *cb_cls);
/**
* Start a peer that has previously been stopped using the daemon_stop
@@ -523,10 +518,11 @@
* @param cb the callback for notification when the peer is running
* @param cb_cls closure for the callback
*/
-void GNUNET_TESTING_daemon_start_stopped (struct GNUNET_TESTING_Daemon *daemon,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TESTING_NotifyDaemonRunning
cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemon_start_stopped (struct GNUNET_TESTING_Daemon *daemon,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyDaemonRunning cb,
+ void *cb_cls);
/**
* Starts a GNUnet daemon's service.
@@ -537,11 +533,12 @@
* @param cb function called once gnunet-arm returns
* @param cb_cls closure for cb
*/
-void GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
- char *service,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TESTING_NotifyDaemonRunning
cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
+ char *service,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyDaemonRunning cb,
+ void *cb_cls);
/**
* Starts a GNUnet daemon's service which has been previously turned off.
@@ -552,12 +549,13 @@
* @param cb function called once gnunet-arm returns
* @param cb_cls closure for cb
*/
-void GNUNET_TESTING_daemon_start_stopped_service (struct GNUNET_TESTING_Daemon
- *d, char *service,
- struct GNUNET_TIME_Relative
- timeout,
-
GNUNET_TESTING_NotifyDaemonRunning
- cb, void *cb_cls);
+void
+GNUNET_TESTING_daemon_start_stopped_service (struct GNUNET_TESTING_Daemon *d,
+ char *service,
+ struct GNUNET_TIME_Relative
+ timeout,
+ GNUNET_TESTING_NotifyDaemonRunning
+ cb, void *cb_cls);
/**
* Get a certain testing daemon handle.
@@ -565,10 +563,9 @@
* @param pg handle to the set of running peers
* @param position the number of the peer to return
*/
-struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_get (struct
-
GNUNET_TESTING_PeerGroup
- *pg,
- unsigned int
position);
+struct GNUNET_TESTING_Daemon *
+GNUNET_TESTING_daemon_get (struct GNUNET_TESTING_PeerGroup *pg,
+ unsigned int position);
/*
* Get a daemon by peer identity, so callers can
@@ -579,12 +576,9 @@
*
* @return the daemon on success, or NULL if no such peer identity is found
*/
-struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_get_by_id (struct
-
GNUNET_TESTING_PeerGroup
- *pg,
- struct
-
GNUNET_PeerIdentity
- *peer_id);
+struct GNUNET_TESTING_Daemon *
+GNUNET_TESTING_daemon_get_by_id (struct GNUNET_TESTING_PeerGroup *pg,
+ struct GNUNET_PeerIdentity *peer_id);
/**
* Stops a GNUnet daemon.
@@ -599,11 +593,11 @@
* @param allow_restart GNUNET_YES to restart peer later (using this API)
* GNUNET_NO to kill off and clean up for good
*/
-void GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TESTING_NotifyCompletion cb,
- void *cb_cls, int delete_files,
- int allow_restart);
+void
+GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyCompletion cb, void *cb_cls,
+ int delete_files, int allow_restart);
/**
@@ -614,10 +608,11 @@
* @param cb function called once the configuration was changed
* @param cb_cls closure for cb
*/
-void GNUNET_TESTING_daemon_reconfigure (struct GNUNET_TESTING_Daemon *d,
- struct GNUNET_CONFIGURATION_Handle
*cfg,
- GNUNET_TESTING_NotifyCompletion cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemon_reconfigure (struct GNUNET_TESTING_Daemon *d,
+ struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_TESTING_NotifyCompletion cb,
+ void *cb_cls);
/**
* Stops a single service of a GNUnet daemon. Used like daemon_stop,
@@ -631,11 +626,12 @@
* @param cb function called once the service was stopped
* @param cb_cls closure for cb
*/
-void GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d,
- char *service,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TESTING_NotifyCompletion cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d,
+ char *service,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyCompletion cb,
+ void *cb_cls);
/**
* Read a testing hosts file based on a configuration.
@@ -646,9 +642,8 @@
*
* @return DLL of hosts on success, NULL on failure
*/
-struct GNUNET_TESTING_Host *GNUNET_TESTING_hosts_load (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg);
+struct GNUNET_TESTING_Host *
+GNUNET_TESTING_hosts_load (const struct GNUNET_CONFIGURATION_Handle *cfg);
/**
@@ -678,31 +673,19 @@
*
* @return NULL on error, otherwise handle to control peer group
*/
-struct GNUNET_TESTING_PeerGroup *GNUNET_TESTING_daemons_start (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg,
- unsigned int
- total,
- unsigned int
-
max_concurrent_connections,
- unsigned int
-
max_concurrent_ssh,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_TESTING_NotifyHostkeyCreated
-
hostkey_callback,
- void
- *hostkey_cls,
-
GNUNET_TESTING_NotifyDaemonRunning
- cb, void
*cb_cls,
-
GNUNET_TESTING_NotifyConnection
-
connect_callback,
- void
-
*connect_callback_cls,
- const struct
-
GNUNET_TESTING_Host
- *hostnames);
+struct GNUNET_TESTING_PeerGroup *
+GNUNET_TESTING_daemons_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ unsigned int total,
+ unsigned int max_concurrent_connections,
+ unsigned int max_concurrent_ssh,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyHostkeyCreated
+ hostkey_callback, void *hostkey_cls,
+ GNUNET_TESTING_NotifyDaemonRunning cb,
+ void *cb_cls,
+ GNUNET_TESTING_NotifyConnection connect_callback,
+ void *connect_callback_cls,
+ const struct GNUNET_TESTING_Host *hostnames);
/**
* Function which continues a peer group starting up
@@ -710,8 +693,8 @@
*
* @param pg the peer group to continue starting
*/
-void GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup
- *pg);
+void
+GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup *pg);
/**
@@ -728,13 +711,14 @@
* @param cb function to call at the end
* @param cb_cls closure for cb
*/
-void GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
- struct GNUNET_TESTING_Daemon *d2,
- struct GNUNET_TIME_Relative timeout,
- unsigned int max_connect_attempts,
- int send_hello,
- GNUNET_TESTING_NotifyConnection cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
+ struct GNUNET_TESTING_Daemon *d2,
+ struct GNUNET_TIME_Relative timeout,
+ unsigned int max_connect_attempts,
+ int send_hello,
+ GNUNET_TESTING_NotifyConnection cb,
+ void *cb_cls);
/**
@@ -744,9 +728,10 @@
* @param callback function to call on completion (or failure)
* @param callback_cls closure for the callback function
*/
-void GNUNET_TESTING_daemons_restart (struct GNUNET_TESTING_PeerGroup *pg,
- GNUNET_TESTING_NotifyCompletion callback,
- void *callback_cls);
+void
+GNUNET_TESTING_daemons_restart (struct GNUNET_TESTING_PeerGroup *pg,
+ GNUNET_TESTING_NotifyCompletion callback,
+ void *callback_cls);
/**
@@ -757,10 +742,10 @@
* @param cb callback to notify upon success or failure
* @param cb_cls closure for cb
*/
-void GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TESTING_NotifyCompletion cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyCompletion cb, void *cb_cls);
/**
@@ -770,8 +755,8 @@
*
* @return the number of currently running peers in the peer group
*/
-unsigned int GNUNET_TESTING_daemons_running (struct GNUNET_TESTING_PeerGroup
- *pg);
+unsigned int
+GNUNET_TESTING_daemons_running (struct GNUNET_TESTING_PeerGroup *pg);
/**
* Simulate churn by stopping some peers (and possibly
@@ -796,12 +781,12 @@
* @param cb function to call at the end
* @param cb_cls closure for cb
*/
-void GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg,
- char *service, unsigned int voff,
- unsigned int von,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TESTING_NotifyCompletion cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg,
+ char *service, unsigned int voff,
+ unsigned int von,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyCompletion cb, void
*cb_cls);
/*
* Start a given service for each of the peers in the peer group.
*
@@ -813,11 +798,12 @@
* @param cb_cls closure for cb
*
*/
-void GNUNET_TESTING_daemons_start_service (struct GNUNET_TESTING_PeerGroup *pg,
- char *service,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TESTING_NotifyCompletion cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemons_start_service (struct GNUNET_TESTING_PeerGroup *pg,
+ char *service,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyCompletion cb,
+ void *cb_cls);
/**
* Callback function to process statistic values.
@@ -847,10 +833,11 @@
* @param proc processing function for each statistic retrieved
* @param cls closure to pass to proc
*/
-void GNUNET_TESTING_get_statistics (struct GNUNET_TESTING_PeerGroup *pg,
- GNUNET_STATISTICS_Callback cont,
- GNUNET_TESTING_STATISTICS_Iterator proc,
- void *cls);
+void
+GNUNET_TESTING_get_statistics (struct GNUNET_TESTING_PeerGroup *pg,
+ GNUNET_STATISTICS_Callback cont,
+ GNUNET_TESTING_STATISTICS_Iterator proc,
+ void *cls);
/**
* Topologies supported for testbeds.
@@ -965,8 +952,9 @@
* @return GNUNET_YES if topology string matched a
* known topology, GNUNET_NO if not
*/
-int GNUNET_TESTING_topology_get (enum GNUNET_TESTING_Topology *topology,
- const char *topology_string);
+int
+GNUNET_TESTING_topology_get (enum GNUNET_TESTING_Topology *topology,
+ const char *topology_string);
/**
* Get connect topology option from string input.
@@ -977,9 +965,10 @@
* @return GNUNET_YES if topology string matched a
* known topology, GNUNET_NO if not
*/
-int GNUNET_TESTING_topology_option_get (enum GNUNET_TESTING_TopologyOption
- *topology_option,
- const char *topology_string);
+int
+GNUNET_TESTING_topology_option_get (enum GNUNET_TESTING_TopologyOption
+ *topology_option,
+ const char *topology_string);
/**
@@ -1018,13 +1007,11 @@
* @return the maximum number of connections were all allowed peers
* connected to each other
*/
-unsigned int GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup
- *pg,
- enum GNUNET_TESTING_Topology
- topology,
- enum GNUNET_TESTING_Topology
- restrict_topology,
- const char *restrict_transports);
+unsigned int
+GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg,
+ enum GNUNET_TESTING_Topology topology,
+ enum GNUNET_TESTING_Topology restrict_topology,
+ const char *restrict_transports);
/**
* Iterate over all (running) peers in the peer group, retrieve
@@ -1034,22 +1021,25 @@
* @param cb callback for topology information
* @param cls closure for callback
*/
-void GNUNET_TESTING_get_topology (struct GNUNET_TESTING_PeerGroup *pg,
- GNUNET_TESTING_NotifyTopology cb, void *cls);
+void
+GNUNET_TESTING_get_topology (struct GNUNET_TESTING_PeerGroup *pg,
+ GNUNET_TESTING_NotifyTopology cb, void *cls);
/**
* Stop the connection process temporarily.
*
* @param pg the peer group to stop connecting
*/
-void GNUNET_TESTING_stop_connections (struct GNUNET_TESTING_PeerGroup *pg);
+void
+GNUNET_TESTING_stop_connections (struct GNUNET_TESTING_PeerGroup *pg);
/**
* Resume the connection process.
*
* @param pg the peer group to resume connecting
*/
-void GNUNET_TESTING_resume_connections (struct GNUNET_TESTING_PeerGroup *pg);
+void
+GNUNET_TESTING_resume_connections (struct GNUNET_TESTING_PeerGroup *pg);
/**
* There are many ways to connect peers that are supported by this function.
@@ -1073,15 +1063,15 @@
*
* @return the number of connections that will be attempted, GNUNET_SYSERR on
error
*/
-int GNUNET_TESTING_connect_topology (struct GNUNET_TESTING_PeerGroup *pg,
- enum GNUNET_TESTING_Topology topology,
- enum GNUNET_TESTING_TopologyOption
options,
- double option_modifier,
- struct GNUNET_TIME_Relative
- connect_timeout,
- unsigned int connect_attempts,
- GNUNET_TESTING_NotifyCompletion
- notify_callback, void *notify_cls);
+int
+GNUNET_TESTING_connect_topology (struct GNUNET_TESTING_PeerGroup *pg,
+ enum GNUNET_TESTING_Topology topology,
+ enum GNUNET_TESTING_TopologyOption options,
+ double option_modifier,
+ struct GNUNET_TIME_Relative connect_timeout,
+ unsigned int connect_attempts,
+ GNUNET_TESTING_NotifyCompletion
+ notify_callback, void *notify_cls);
/**
* Start or stop an individual peer from the given group.
@@ -1093,11 +1083,11 @@
* @param cb function to call at the end
* @param cb_cls closure for cb
*/
-void GNUNET_TESTING_daemons_vary (struct GNUNET_TESTING_PeerGroup *pg,
- unsigned int offset, int desired_status,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TESTING_NotifyCompletion cb,
- void *cb_cls);
+void
+GNUNET_TESTING_daemons_vary (struct GNUNET_TESTING_PeerGroup *pg,
+ unsigned int offset, int desired_status,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyCompletion cb, void *cb_cls);
/**
* Start a peer group with a given number of peers. Notify
@@ -1116,23 +1106,14 @@
*
* @return NULL on error, otherwise handle to control peer group
*/
-struct GNUNET_TESTING_PeerGroup *GNUNET_TESTING_peergroup_start (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg,
- unsigned int
- total,
- struct
-
GNUNET_TIME_Relative
- timeout,
-
GNUNET_TESTING_NotifyConnection
- connect_cb,
-
GNUNET_TESTING_NotifyCompletion
- peergroup_cb,
- void
-
*peergroup_cls,
- const struct
-
GNUNET_TESTING_Host
- *hostnames);
+struct GNUNET_TESTING_PeerGroup *
+GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ unsigned int total,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TESTING_NotifyConnection connect_cb,
+ GNUNET_TESTING_NotifyCompletion peergroup_cb,
+ void *peergroup_cls,
+ const struct GNUNET_TESTING_Host *hostnames);
/**
* Print current topology to a graphviz readable file.
@@ -1143,11 +1124,11 @@
* @param notify_cb_cls closure for notify_cb
*
*/
-void GNUNET_TESTING_peergroup_topology_to_file (struct GNUNET_TESTING_PeerGroup
- *pg,
- const char *output_filename,
- GNUNET_TESTING_NotifyCompletion
- notify_cb, void
*notify_cb_cls);
+void
+GNUNET_TESTING_peergroup_topology_to_file (struct GNUNET_TESTING_PeerGroup *pg,
+ const char *output_filename,
+ GNUNET_TESTING_NotifyCompletion
+ notify_cb, void *notify_cb_cls);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/gnunet_time_lib.h
===================================================================
--- gnunet/src/include/gnunet_time_lib.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_time_lib.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -151,34 +151,40 @@
/**
* Return relative time of 0ms.
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_get_zero (void);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_get_zero (void);
/**
* Return absolute time of 0ms.
*/
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get_zero (void);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_get_zero (void);
/**
* Return relative time of 1ms.
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_get_unit (void);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_get_unit (void);
/**
* Return "forever".
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_get_forever (void);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_get_forever (void);
/**
* Return "forever".
*/
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get_forever (void);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_get_forever (void);
/**
* Get the current time.
*
* @return the current time
*/
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get (void);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_get (void);
/**
* Convert relative time to an absolute time in the
@@ -187,9 +193,8 @@
* @param rel relative time to convert
* @return timestamp that is "rel" in the future, or FOREVER if rel==FOREVER
(or if we would overflow)
*/
-struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute (struct
-
GNUNET_TIME_Relative
- rel);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_relative_to_absolute (struct GNUNET_TIME_Relative rel);
/**
* Return the minimum of two relative time values.
@@ -198,10 +203,9 @@
* @param t2 other timestamp
* @return timestamp that is smaller
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct
- GNUNET_TIME_Relative t1,
- struct
- GNUNET_TIME_Relative t2);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_min (struct GNUNET_TIME_Relative t1,
+ struct GNUNET_TIME_Relative t2);
/**
@@ -211,10 +215,9 @@
* @param t2 other timestamp
* @return timestamp that is larger
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_max (struct
- GNUNET_TIME_Relative t1,
- struct
- GNUNET_TIME_Relative t2);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_max (struct GNUNET_TIME_Relative t1,
+ struct GNUNET_TIME_Relative t2);
/**
* Return the minimum of two absolute time values.
@@ -223,10 +226,9 @@
* @param t2 other timestamp
* @return timestamp that is smaller
*/
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct
- GNUNET_TIME_Absolute t1,
- struct
- GNUNET_TIME_Absolute t2);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_min (struct GNUNET_TIME_Absolute t1,
+ struct GNUNET_TIME_Absolute t2);
/**
* Return the maximum of two absolute time values.
@@ -235,10 +237,9 @@
* @param t2 other timestamp
* @return timestamp that is smaller
*/
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_max (struct
- GNUNET_TIME_Absolute t1,
- struct
- GNUNET_TIME_Absolute t2);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_max (struct GNUNET_TIME_Absolute t1,
+ struct GNUNET_TIME_Absolute t2);
/**
* Given a timestamp in the future, how much time
@@ -247,9 +248,8 @@
* @param future some absolute time, typically in the future
* @return future - now, or 0 if now >= future, or FOREVER if future==FOREVER.
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining (struct
-
GNUNET_TIME_Absolute
- future);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_absolute_get_remaining (struct GNUNET_TIME_Absolute future);
/**
@@ -262,10 +262,9 @@
* @return remaining duration for the operation,
* assuming it continues at the same speed
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_calculate_eta (struct
- GNUNET_TIME_Absolute
- start, uint64_t
finished,
- uint64_t total);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_calculate_eta (struct GNUNET_TIME_Absolute start, uint64_t
finished,
+ uint64_t total);
/**
@@ -277,12 +276,9 @@
* @param end some absolute time (typically larger or equal to start)
* @return 0 if start >= end; FOREVER if end==FOREVER; otherwise end - start
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_difference (struct
-
GNUNET_TIME_Absolute
- start,
- struct
-
GNUNET_TIME_Absolute
- end);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_absolute_get_difference (struct GNUNET_TIME_Absolute start,
+ struct GNUNET_TIME_Absolute end);
/**
* Get the duration of an operation as the
@@ -291,9 +287,8 @@
* @param whence some absolute time, typically in the past
* @return aborts if hence==FOREVER, 0 if hence > now, otherwise now-hence.
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_duration (struct
-
GNUNET_TIME_Absolute
- whence);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_absolute_get_duration (struct GNUNET_TIME_Absolute whence);
/**
@@ -304,12 +299,9 @@
* @param duration some relative time to add
* @return FOREVER if either argument is FOREVER or on overflow;
start+duration otherwise
*/
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add (struct
- GNUNET_TIME_Absolute
- start,
- struct
- GNUNET_TIME_Relative
- duration);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_add (struct GNUNET_TIME_Absolute start,
+ struct GNUNET_TIME_Relative duration);
/**
@@ -320,12 +312,9 @@
* @param duration some relative time to subtract
* @return ZERO if start <= duration, or FOREVER if start time is FOREVER;
start-duration otherwise
*/
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_subtract (struct
- GNUNET_TIME_Absolute
- start,
- struct
- GNUNET_TIME_Relative
- duration);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_subtract (struct GNUNET_TIME_Absolute start,
+ struct GNUNET_TIME_Relative duration);
/**
* Multiply relative time by a given factor.
@@ -334,10 +323,9 @@
* @param factor integer to multiply with
* @return FOREVER if rel=FOREVER or on overflow; otherwise rel*factor
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply (struct
- GNUNET_TIME_Relative
- rel,
- unsigned int
factor);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_multiply (struct GNUNET_TIME_Relative rel,
+ unsigned int factor);
/**
* Divide relative time by a given factor.
@@ -346,10 +334,9 @@
* @param factor integer to divide by
* @return FOREVER if rel=FOREVER or factor==0; otherwise rel/factor
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_divide (struct
- GNUNET_TIME_Relative
- rel,
- unsigned int factor);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_divide (struct GNUNET_TIME_Relative rel,
+ unsigned int factor);
/**
* Add relative times together.
@@ -358,10 +345,9 @@
* @param a2 some other relative time
* @return FOREVER if either argument is FOREVER or on overflow; a1+a2
otherwise
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_add (struct
- GNUNET_TIME_Relative a1,
- struct
- GNUNET_TIME_Relative a2);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_add (struct GNUNET_TIME_Relative a1,
+ struct GNUNET_TIME_Relative a2);
/**
* Subtract relative timestamp from the other.
@@ -370,12 +356,9 @@
* @param a2 second timestamp
* @return ZERO if a2>=a1 (including both FOREVER), FOREVER if a1 is FOREVER,
a1-a2 otherwise
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_subtract (struct
- GNUNET_TIME_Relative
- a1,
- struct
- GNUNET_TIME_Relative
- a2);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_subtract (struct GNUNET_TIME_Relative a1,
+ struct GNUNET_TIME_Relative a2);
/**
@@ -384,9 +367,8 @@
* @param a time to convert
* @return converted time value
*/
-struct GNUNET_TIME_RelativeNBO GNUNET_TIME_relative_hton (struct
- GNUNET_TIME_Relative
- a);
+struct GNUNET_TIME_RelativeNBO
+GNUNET_TIME_relative_hton (struct GNUNET_TIME_Relative a);
/**
* Convert relative time from network byte order.
@@ -394,9 +376,8 @@
* @param a time to convert
* @return converted time value
*/
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_ntoh (struct
- GNUNET_TIME_RelativeNBO
- a);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_ntoh (struct GNUNET_TIME_RelativeNBO a);
/**
* Convert relative time to network byte order.
@@ -404,9 +385,8 @@
* @param a time to convert
* @return converted time value
*/
-struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton (struct
- GNUNET_TIME_Absolute
- a);
+struct GNUNET_TIME_AbsoluteNBO
+GNUNET_TIME_absolute_hton (struct GNUNET_TIME_Absolute a);
/**
* Convert relative time from network byte order.
@@ -414,9 +394,8 @@
* @param a time to convert
* @return converted time value
*/
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_ntoh (struct
- GNUNET_TIME_AbsoluteNBO
- a);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_ntoh (struct GNUNET_TIME_AbsoluteNBO a);
/**
* Convert a relative time to a string.
@@ -426,14 +405,16 @@
*
* @return string form of the time (as milliseconds)
*/
-const char *GNUNET_TIME_relative_to_string (struct GNUNET_TIME_Relative time);
+const char *
+GNUNET_TIME_relative_to_string (struct GNUNET_TIME_Relative time);
/**
* Set the timestamp offset for this instance.
*
* @param offset the offset to skew the locale time by
*/
-void GNUNET_TIME_set_offset (long long offset);
+void
+GNUNET_TIME_set_offset (long long offset);
#if 0 /* keep Emacsens' auto-indent happy */
{
Modified: gnunet/src/include/gnunet_transport_service.h
===================================================================
--- gnunet/src/include/gnunet_transport_service.h 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/include/gnunet_transport_service.h 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -468,18 +468,12 @@
* @param nd function to call on disconnect events
* @return NULL on error
*/
-struct GNUNET_TRANSPORT_Handle *GNUNET_TRANSPORT_connect (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg,
- const struct
- GNUNET_PeerIdentity
- *self, void *cls,
-
GNUNET_TRANSPORT_ReceiveCallback
- rec,
-
GNUNET_TRANSPORT_NotifyConnect
- nc,
-
GNUNET_TRANSPORT_NotifyDisconnect
- nd);
+struct GNUNET_TRANSPORT_Handle *
+GNUNET_TRANSPORT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const struct GNUNET_PeerIdentity *self, void *cls,
+ GNUNET_TRANSPORT_ReceiveCallback rec,
+ GNUNET_TRANSPORT_NotifyConnect nc,
+ GNUNET_TRANSPORT_NotifyDisconnect nd);
/**
@@ -487,7 +481,8 @@
*
* @param handle handle returned from connect
*/
-void GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle);
+void
+GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle);
/**
@@ -497,8 +492,9 @@
* @param handle connection to transport service
* @param target who we should try to connect to
*/
-void GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle,
- const struct GNUNET_PeerIdentity *target);
+void
+GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle,
+ const struct GNUNET_PeerIdentity *target);
/**
@@ -510,10 +506,11 @@
* @param quota_in incoming bandwidth quota
* @param quota_out outgoing bandwidth quota
*/
-void GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
- const struct GNUNET_PeerIdentity *target,
- struct GNUNET_BANDWIDTH_Value32NBO quota_in,
- struct GNUNET_BANDWIDTH_Value32NBO quota_out);
+void
+GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
+ const struct GNUNET_PeerIdentity *target,
+ struct GNUNET_BANDWIDTH_Value32NBO quota_in,
+ struct GNUNET_BANDWIDTH_Value32NBO quota_out);
/**
@@ -541,16 +538,13 @@
* non-NULL if the notify callback was queued (can be used to cancel
* using GNUNET_TRANSPORT_notify_transmit_ready_cancel)
*/
-struct GNUNET_TRANSPORT_TransmitHandle
- *GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle
- *handle,
- const struct GNUNET_PeerIdentity
- *target, size_t size,
- uint32_t priority,
- struct GNUNET_TIME_Relative
- timeout,
-
GNUNET_CONNECTION_TransmitReadyNotify
- notify, void *notify_cls);
+struct GNUNET_TRANSPORT_TransmitHandle *
+GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle,
+ const struct GNUNET_PeerIdentity
+ *target, size_t size, uint32_t
priority,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_CONNECTION_TransmitReadyNotify
+ notify, void *notify_cls);
/**
@@ -558,9 +552,10 @@
*
* @param th handle of the transmission notification request to cancel
*/
-void GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct
-
GNUNET_TRANSPORT_TransmitHandle
- *th);
+void
+GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct
+ GNUNET_TRANSPORT_TransmitHandle
+ *th);
@@ -584,9 +579,10 @@
* @param rec function to call with the HELLO
* @param rec_cls closure for rec
*/
-void GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle,
- GNUNET_TRANSPORT_HelloUpdateCallback rec,
- void *rec_cls);
+void
+GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle,
+ GNUNET_TRANSPORT_HelloUpdateCallback rec,
+ void *rec_cls);
/**
@@ -596,9 +592,10 @@
* @param rec function previously registered to be called with the HELLOs
* @param rec_cls closure for rec
*/
-void GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle,
- GNUNET_TRANSPORT_HelloUpdateCallback
- rec, void *rec_cls);
+void
+GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle,
+ GNUNET_TRANSPORT_HelloUpdateCallback rec,
+ void *rec_cls);
/**
@@ -612,9 +609,10 @@
* @param cls closure for continuation
*
*/
-void GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
- const struct GNUNET_MessageHeader *hello,
- GNUNET_SCHEDULER_Task cont, void *cls);
+void
+GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
+ const struct GNUNET_MessageHeader *hello,
+ GNUNET_SCHEDULER_Task cont, void *cls);
/**
@@ -630,13 +628,13 @@
* @param aluc function to call with the results
* @param aluc_cls closure for aluc
*/
-void GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle
- *cfg, const char *address,
- size_t addressLen, int numeric,
- const char *nameTrans,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TRANSPORT_AddressLookUpCallback
- aluc, void *aluc_cls);
+void
+GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ const char *address, size_t addressLen,
+ int numeric, const char *nameTrans,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TRANSPORT_AddressLookUpCallback aluc,
+ void *aluc_cls);
/**
@@ -649,14 +647,14 @@
* @param peer_address_callback function to call with the results
* @param peer_address_callback_cls closure for peer_address_callback
*/
-void GNUNET_TRANSPORT_peer_address_lookup (const struct
- GNUNET_CONFIGURATION_Handle *cfg,
- const struct GNUNET_PeerIdentity
- *peer,
- struct GNUNET_TIME_Relative timeout,
-
GNUNET_TRANSPORT_AddressLookUpCallback
- peer_address_callback,
- void *peer_address_callback_cls);
+void
+GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle
+ *cfg,
+ const struct GNUNET_PeerIdentity *peer,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TRANSPORT_AddressLookUpCallback
+ peer_address_callback,
+ void *peer_address_callback_cls);
/**
@@ -668,12 +666,12 @@
* @param peer_address_callback function to call with the results
* @param peer_address_callback_cls closure for peer_address_callback
*/
-void GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle
- *cfg,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_TRANSPORT_AddressLookUpCallback
- peer_address_callback,
- void *peer_address_callback_cls);
+void
+GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle
*cfg,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_TRANSPORT_AddressLookUpCallback
+ peer_address_callback,
+ void *peer_address_callback_cls);
/**
@@ -708,12 +706,10 @@
* @param cb_cls closure for cb
* @return NULL on error, otherwise handle for cancellation
*/
-struct GNUNET_TRANSPORT_Blacklist *GNUNET_TRANSPORT_blacklist (const struct
-
GNUNET_CONFIGURATION_Handle
- *cfg,
-
GNUNET_TRANSPORT_BlacklistCallback
- cb,
- void *cb_cls);
+struct GNUNET_TRANSPORT_Blacklist *
+GNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg,
+ GNUNET_TRANSPORT_BlacklistCallback cb,
+ void *cb_cls);
/**
@@ -722,7 +718,8 @@
*
* @param br handle of the request that is to be cancelled
*/
-void GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br);
+void
+GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br);
Modified: gnunet/src/include/gnunet_upnp_service.h
===================================================================
--- gnunet/src/include/gnunet_upnp_service.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/include/gnunet_upnp_service.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -54,10 +54,11 @@
* function will be called with NULL on error
* @param cls closure for callback
*/
-int GNUNET_UPNP_get_ip (struct GNUNET_CONFIGURATION_Handle *cfg, int domain,
- int type, int protocol, uint16_t port,
- struct GNUNET_TIME_Relative timeout,
- GNUNET_RESOLVER_AddressCallback callback, void *cls);
+int
+GNUNET_UPNP_get_ip (struct GNUNET_CONFIGURATION_Handle *cfg, int domain,
+ int type, int protocol, uint16_t port,
+ struct GNUNET_TIME_Relative timeout,
+ GNUNET_RESOLVER_AddressCallback callback, void *cls);
#if 0 /* keep Emacsens' auto-indent happy */
Modified: gnunet/src/include/platform.h
===================================================================
--- gnunet/src/include/platform.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/include/platform.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -226,7 +226,8 @@
#if !HAVE_ATOLL
-long long atoll (const char *nptr);
+long long
+atoll (const char *nptr);
#endif
#if ENABLE_NLS
Modified: gnunet/src/mesh/test_mesh_small.c
===================================================================
--- gnunet/src/mesh/test_mesh_small.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/mesh/test_mesh_small.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -213,8 +213,8 @@
}
-static void churn_peers (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+churn_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/nat/nat.c
===================================================================
--- gnunet/src/nat/nat.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/nat/nat.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -361,7 +361,8 @@
*
* @param h handle to NAT
*/
-static void start_gnunet_nat_server (struct GNUNET_NAT_Handle *h);
+static void
+start_gnunet_nat_server (struct GNUNET_NAT_Handle *h);
/**
@@ -548,8 +549,8 @@
* @param cls the NAT handle
* @param tc scheduler context
*/
-static void resolve_dns (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+resolve_dns (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -585,8 +586,8 @@
* @param cls the NAT handle
* @param tc scheduler context
*/
-static void resolve_hostname (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+resolve_hostname (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/nat/nat_mini.c
===================================================================
--- gnunet/src/nat/nat_mini.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/nat/nat_mini.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -279,8 +279,8 @@
* @param cls the 'struct GNUNET_NAT_MiniHandle'
* @param tc scheduler context
*/
-static void do_refresh (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -289,7 +289,8 @@
* @param cls the 'struct GNUNET_NAT_MiniHandle'
* @param line line of output, NULL at the end
*/
-static void process_map_output (void *cls, const char *line);
+static void
+process_map_output (void *cls, const char *line);
/**
@@ -376,8 +377,7 @@
return; /* skip */
if (1 !=
sscanf (line,
- (mini->
- is_tcp) ? "%*u TCP %u->%*s:%*u %*s" :
+ (mini->is_tcp) ? "%*u TCP %u->%*s:%*u %*s" :
"%*u UDP %u->%*s:%*u %*s", &nport))
return; /* skip */
mini->found = GNUNET_YES;
Modified: gnunet/src/nse/gnunet-nse-profiler.c
===================================================================
--- gnunet/src/nse/gnunet-nse-profiler.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/nse/gnunet-nse-profiler.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -263,8 +263,8 @@
}
-static void churn_peers (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+churn_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/nse/gnunet-service-nse.c
===================================================================
--- gnunet/src/nse/gnunet-service-nse.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/nse/gnunet-service-nse.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -498,8 +498,8 @@
* @param cls the 'struct NSEPeerEntry'
* @param tc scheduler context
*/
-static void transmit_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+transmit_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -545,8 +545,9 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"In round %llu, sending to `%s' estimate with %u bits\n",
(unsigned long long)
- GNUNET_TIME_absolute_ntoh
(size_estimate_messages[idx].timestamp).
- abs_value, GNUNET_i2s (&peer_entry->id),
+ GNUNET_TIME_absolute_ntoh (size_estimate_messages[idx].
+ timestamp).abs_value,
+ GNUNET_i2s (&peer_entry->id),
(unsigned int) ntohl
(size_estimate_messages[idx].matching_bits));
#endif
if (ntohl (size_estimate_messages[idx].hop_count) == 0)
@@ -861,8 +862,8 @@
incoming_flood->proof_of_work))
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Proof of work invalid: %llu!\n"),
- (unsigned long long) GNUNET_ntohll (incoming_flood->
- proof_of_work));
+ (unsigned long long)
+ GNUNET_ntohll (incoming_flood->proof_of_work));
GNUNET_break_op (0);
return GNUNET_NO;
}
@@ -959,9 +960,9 @@
GNUNET_snprintf (pred, sizeof (pred), "%s", GNUNET_i2s (peer));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Flood at %llu from `%s' via `%s' at `%s' with bits %u\n",
- (unsigned long long) GNUNET_TIME_absolute_ntoh
(incoming_flood->
- timestamp).
- abs_value, origin, pred, GNUNET_i2s (&my_identity),
+ (unsigned long long)
+ GNUNET_TIME_absolute_ntoh
(incoming_flood->timestamp).abs_value,
+ origin, pred, GNUNET_i2s (&my_identity),
(unsigned int) matching_bits);
}
#endif
Modified: gnunet/src/nse/nse_api.c
===================================================================
--- gnunet/src/nse/nse_api.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/nse/nse_api.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -85,8 +85,8 @@
* @param cls the handle to the transport service
* @param tc scheduler context
*/
-static void reconnect (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/peerinfo/peerinfo_api.c
===================================================================
--- gnunet/src/peerinfo/peerinfo_api.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/peerinfo/peerinfo_api.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -188,7 +188,8 @@
*
* @param h handle to the service
*/
-static void trigger_transmit (struct GNUNET_PEERINFO_Handle *h);
+static void
+trigger_transmit (struct GNUNET_PEERINFO_Handle *h);
/**
@@ -196,7 +197,8 @@
*
* @param h handle to the service
*/
-static void reconnect (struct GNUNET_PEERINFO_Handle *h);
+static void
+reconnect (struct GNUNET_PEERINFO_Handle *h);
/**
* Task scheduled to re-try connecting to the peerinfo service.
Modified: gnunet/src/peerinfo/peerinfo_api_notify.c
===================================================================
--- gnunet/src/peerinfo/peerinfo_api_notify.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/peerinfo/peerinfo_api_notify.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -76,7 +76,8 @@
*
* @param nc our context
*/
-static void request_notifications (struct GNUNET_PEERINFO_NotifyContext *nc);
+static void
+request_notifications (struct GNUNET_PEERINFO_NotifyContext *nc);
/**
@@ -85,7 +86,8 @@
*
* @param nc our context
*/
-static void receive_notifications (struct GNUNET_PEERINFO_NotifyContext *nc);
+static void
+receive_notifications (struct GNUNET_PEERINFO_NotifyContext *nc);
/**
Modified: gnunet/src/statistics/statistics_api.c
===================================================================
--- gnunet/src/statistics/statistics_api.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/statistics/statistics_api.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -242,14 +242,16 @@
/**
* Schedule the next action to be performed.
*/
-static void schedule_action (struct GNUNET_STATISTICS_Handle *h);
+static void
+schedule_action (struct GNUNET_STATISTICS_Handle *h);
/**
* Try to (re)connect to the statistics service.
*
* @return GNUNET_YES on success, GNUNET_NO on failure.
*/
-static int try_connect (struct GNUNET_STATISTICS_Handle *ret);
+static int
+try_connect (struct GNUNET_STATISTICS_Handle *ret);
static void
@@ -500,8 +502,8 @@
"Processing VALUE done, now reading more\n");
#endif
GNUNET_CLIENT_receive (h->client, &receive_stats, h,
- GNUNET_TIME_absolute_get_remaining (h->current->
- timeout));
+ GNUNET_TIME_absolute_get_remaining (h->
+
current->timeout));
h->backoff = GNUNET_TIME_UNIT_MILLISECONDS;
return;
}
@@ -572,8 +574,8 @@
#endif
handle->receiving = GNUNET_YES;
GNUNET_CLIENT_receive (handle->client, &receive_stats, handle,
- GNUNET_TIME_absolute_get_remaining
(handle->current->
- timeout));
+ GNUNET_TIME_absolute_get_remaining (handle->
+
current->timeout));
}
return msize;
}
Modified: gnunet/src/testing/test_testing_reconnect.c
===================================================================
--- gnunet/src/testing/test_testing_reconnect.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/testing/test_testing_reconnect.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -54,7 +54,8 @@
* Run the next phase of starting daemons, connecting them and
* stopping them again.
*/
-static void run_phase ();
+static void
+run_phase ();
static void
end2_cb (void *cls, const char *emsg)
Modified: gnunet/src/testing/testing.c
===================================================================
--- gnunet/src/testing/testing.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/testing/testing.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -164,8 +164,8 @@
#endif
}
-static void start_fsm (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
#if WAIT_FOR_HELLO
/**
@@ -195,10 +195,9 @@
d->server = NULL;
if (GNUNET_YES == d->dead)
GNUNET_TESTING_daemon_stop (d,
- GNUNET_TIME_absolute_get_remaining (d->
-
max_timeout),
- d->dead_cb, d->dead_cb_cls, GNUNET_YES,
- GNUNET_NO);
+ GNUNET_TIME_absolute_get_remaining
+ (d->max_timeout), d->dead_cb, d->dead_cb_cls,
+ GNUNET_YES, GNUNET_NO);
else if (NULL != d->cb)
d->cb (d->cb_cls, NULL, d->cfg, d,
_("Failed to connect to core service\n"));
@@ -233,10 +232,9 @@
{
if (GNUNET_YES == d->dead)
GNUNET_TESTING_daemon_stop (d,
- GNUNET_TIME_absolute_get_remaining (d->
-
max_timeout),
- d->dead_cb, d->dead_cb_cls, GNUNET_YES,
- GNUNET_NO);
+ GNUNET_TIME_absolute_get_remaining
+ (d->max_timeout), d->dead_cb, d->dead_cb_cls,
+ GNUNET_YES, GNUNET_NO);
else if (NULL != d->cb)
d->cb (d->cb_cls, &d->id, d->cfg, d,
_("Failed to connect to transport service!\n"));
@@ -349,8 +347,7 @@
if (NULL != cb)
cb (d->cb_cls, NULL, d->cfg, d,
(NULL ==
- d->
- hostname) ?
+ d->hostname) ?
_("Failed to create pipe for `gnunet-peerinfo' process.\n") :
_("Failed to create pipe for `ssh' process.\n"));
return;
@@ -415,9 +412,8 @@
if (NULL != cb)
cb (d->cb_cls, NULL, d->cfg, d,
(NULL ==
- d->
- hostname) ? _("Failed to start `gnunet-peerinfo' process.\n") :
- _("Failed to start `ssh' process.\n"));
+ d->hostname) ? _("Failed to start `gnunet-peerinfo' process.\n")
+ : _("Failed to start `ssh' process.\n"));
GNUNET_DISK_pipe_close (d->pipe_stdout);
return;
}
@@ -429,9 +425,9 @@
d->task =
GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_absolute_get_remaining
(d->max_timeout),
- GNUNET_DISK_pipe_handle (d->
- pipe_stdout,
-
GNUNET_DISK_PIPE_END_READ),
+ GNUNET_DISK_pipe_handle
+ (d->pipe_stdout,
+ GNUNET_DISK_PIPE_END_READ),
&start_fsm, d);
}
else /* Already have a hostkey! */
@@ -464,9 +460,9 @@
d->task =
GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_absolute_get_remaining
(d->max_timeout),
- GNUNET_DISK_pipe_handle (d->
- pipe_stdout,
-
GNUNET_DISK_PIPE_END_READ),
+ GNUNET_DISK_pipe_handle
+ (d->pipe_stdout,
+ GNUNET_DISK_PIPE_END_READ),
&start_fsm, d);
return;
}
@@ -614,8 +610,7 @@
if (NULL != cb)
cb (d->cb_cls, NULL, d->cfg, d,
(NULL ==
- d->
- hostname) ? _("Failed to start `gnunet-arm' process.\n") :
+ d->hostname) ? _("Failed to start `gnunet-arm' process.\n") :
_("Failed to start `ssh' process.\n"));
return;
}
@@ -639,8 +634,7 @@
if (NULL != cb)
cb (d->cb_cls, NULL, d->cfg, d,
(NULL ==
- d->
- hostname) ? _("`gnunet-arm' does not seem to terminate.\n") :
+ d->hostname) ? _("`gnunet-arm' does not seem to terminate.\n") :
_("`ssh' does not seem to terminate.\n"));
GNUNET_CONFIGURATION_destroy (d->cfg);
GNUNET_free (d->cfgfile);
@@ -698,10 +692,9 @@
{
if (GNUNET_YES == d->dead)
GNUNET_TESTING_daemon_stop (d,
- GNUNET_TIME_absolute_get_remaining (d->
-
max_timeout),
- d->dead_cb, d->dead_cb_cls, GNUNET_YES,
- GNUNET_NO);
+ GNUNET_TIME_absolute_get_remaining
+ (d->max_timeout), d->dead_cb,
+ d->dead_cb_cls, GNUNET_YES, GNUNET_NO);
else if (NULL != d->cb)
d->cb (d->cb_cls, &d->id, d->cfg, d,
_("Failed to connect to transport service!\n"));
@@ -763,8 +756,7 @@
if (NULL != cb)
cb (d->cb_cls, NULL, d->cfg, d,
(NULL ==
- d->
- hostname) ? _("`gnunet-arm' does not seem to terminate.\n") :
+ d->hostname) ? _("`gnunet-arm' does not seem to terminate.\n") :
_("`ssh' does not seem to terminate.\n"));
return;
}
@@ -782,8 +774,7 @@
if (NULL != cb)
cb (d->cb_cls, NULL, d->cfg, d,
(NULL ==
- d->
- hostname) ?
+ d->hostname) ?
_
("`gnunet-arm' terminated with non-zero exit status (or timed
out)!\n")
: _("`ssh' does not seem to terminate.\n"));
@@ -1946,9 +1937,9 @@
/** Forward declaration **/
-static void reattempt_daemons_connect (void *cls,
- const struct
GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+reattempt_daemons_connect (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
Modified: gnunet/src/testing/testing_group.c
===================================================================
--- gnunet/src/testing/testing_group.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/testing/testing_group.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -1630,19 +1630,23 @@
}
#else
if (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_contains (pg->peers[first].
- blacklisted_peers, &hash_second))
+ GNUNET_CONTAINER_multihashmap_contains (pg->
+ peers[first].blacklisted_peers,
+ &hash_second))
{
- GNUNET_CONTAINER_multihashmap_remove_all (pg->peers[first].
- blacklisted_peers, &hash_second);
+ GNUNET_CONTAINER_multihashmap_remove_all (pg->
+ peers[first].blacklisted_peers,
+ &hash_second);
}
if (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_contains (pg->peers[second].
- blacklisted_peers, &hash_first))
+ GNUNET_CONTAINER_multihashmap_contains (pg->
+ peers[second].blacklisted_peers,
+ &hash_first))
{
- GNUNET_CONTAINER_multihashmap_remove_all (pg->peers[second].
- blacklisted_peers, &hash_first);
+ GNUNET_CONTAINER_multihashmap_remove_all (pg->
+ peers[second].blacklisted_peers,
+ &hash_first);
}
#endif
@@ -2864,8 +2868,8 @@
conn_iter = pg->peers[pg_iter].allowed_peers_head;
while (conn_iter != NULL)
{
- GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->id.
- hashPubKey, &peer_enc);
+ GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->
+ id.hashPubKey, &peer_enc);
fprintf (temp_friend_handle, "%s\n", (char *) &peer_enc);
conn_iter = conn_iter->next;
}
@@ -3051,15 +3055,16 @@
conn_iter = pg->peers[pg_iter].blacklisted_peers_head;
while (conn_iter != NULL)
{
- GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->id.
- hashPubKey, &peer_enc);
+ GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->
+ id.hashPubKey, &peer_enc);
fprintf (temp_file_handle, "%s:%s\n", pos, (char *) &peer_enc);
conn_iter = conn_iter->next;
}
#else
blacklist_ctx.transport = pos;
- (void) GNUNET_CONTAINER_multihashmap_iterate (pg->peers[pg_iter].
- blacklisted_peers,
+ (void) GNUNET_CONTAINER_multihashmap_iterate (pg->
+ peers
+
[pg_iter].blacklisted_peers,
&blacklist_file_iterator,
&blacklist_ctx);
#endif
@@ -3176,8 +3181,8 @@
}
/* Forward Declaration */
-static void schedule_connect (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+schedule_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Choose a random peer's next connection to create, and
@@ -3216,9 +3221,8 @@
#if USE_SEND_HELLOS
/* Forward declaration */
-static void schedule_send_hellos (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+schedule_send_hellos (void *cls, const struct GNUNET_SCHEDULER_TaskContext
*tc);
/**
* Close connections and free the hello context.
@@ -3319,19 +3323,19 @@
conn = send_hello_context->peer->connect_peers_head;
while (conn != NULL)
{
- GNUNET_CORE_peer_request_connect (send_hello_context->peer->daemon->
- server,
- &send_hello_context->pg->peers[conn->
- index].
- daemon->id, NULL, NULL);
+ GNUNET_CORE_peer_request_connect (send_hello_context->peer->
+ daemon->server,
+ &send_hello_context->pg->
+ peers[conn->index].daemon->id, NULL,
+ NULL);
conn = conn->next;
}
send_hello_context->core_connect_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_divide
- (send_hello_context->pg->ct_ctx.
- connect_timeout,
- send_hello_context->pg->ct_ctx.
- connect_attempts),
+ (send_hello_context->pg->
+ ct_ctx.connect_timeout,
+ send_hello_context->pg->
+ ct_ctx.connect_attempts),
&send_core_connect_requests,
send_hello_context);
}
@@ -3522,10 +3526,10 @@
send_hello_context->core_connect_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_divide
- (send_hello_context->pg->ct_ctx.
- connect_timeout,
- send_hello_context->pg->ct_ctx.
- connect_attempts),
+ (send_hello_context->pg->
+ ct_ctx.connect_timeout,
+ send_hello_context->pg->
+ ct_ctx.connect_attempts),
&send_core_connect_requests,
send_hello_context);
}
@@ -3584,14 +3588,14 @@
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_("Offering Hello of peer %s to peer %s\n"),
send_hello_context->peer->daemon->shortname,
- pg->peers[send_hello_context->peer_pos->index].daemon->
- shortname);
+ pg->peers[send_hello_context->peer_pos->index].
+ daemon->shortname);
#endif
GNUNET_TRANSPORT_offer_hello (send_hello_context->peer->daemon->th,
- (const struct GNUNET_MessageHeader *) pg->
- peers[send_hello_context->peer_pos->index].
- daemon->hello, &hello_sent_callback,
- send_hello_context);
+ (const struct GNUNET_MessageHeader *)
+ pg->peers[send_hello_context->peer_pos->
+ index].daemon->hello,
+ &hello_sent_callback, send_hello_context);
send_hello_context->peer_pos = send_hello_context->peer_pos->next;
GNUNET_assert (send_hello_context->peer->daemon->th != NULL);
}
@@ -3647,10 +3651,12 @@
second_cfg, first_cfg, second_daemon,
first_daemon,
emsg);
- GNUNET_CONTAINER_DLL_remove (pg->peers[connect_ctx->second_index].
- connect_peers_head,
- pg->peers[connect_ctx->second_index].
- connect_peers_tail, connection);
+ GNUNET_CONTAINER_DLL_remove (pg->
+ peers[connect_ctx->
+ second_index].connect_peers_head,
+ pg->peers[connect_ctx->
+ second_index].connect_peers_tail,
+ connection);
GNUNET_free (connection);
}
@@ -3711,10 +3717,10 @@
#endif
pg->outstanding_connects++;
pg->total_connects_scheduled++;
- GNUNET_TESTING_daemons_connect (pg->peers[connect_context->first_index].
- daemon,
- pg->peers[connect_context->second_index].
- daemon,
+ GNUNET_TESTING_daemons_connect (pg->
+ peers[connect_context->first_index].daemon,
+ pg->peers[connect_context->
+ second_index].daemon,
connect_context->ct_ctx->connect_timeout,
connect_context->ct_ctx->connect_attempts,
#if USE_SEND_HELLOS
@@ -4224,8 +4230,8 @@
if (random_number < random_ctx->percentage)
{
GNUNET_assert (GNUNET_OK ==
- GNUNET_CONTAINER_multihashmap_put (random_ctx->first->
-
connect_peers_working_set,
+ GNUNET_CONTAINER_multihashmap_put (random_ctx->
+
first->connect_peers_working_set,
key, value,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
}
@@ -4235,12 +4241,12 @@
hash_from_uid (random_ctx->first_uid, &first_hash);
GNUNET_assert (random_ctx->pg->total > second_pos);
GNUNET_assert (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_remove (random_ctx->pg->
- peers[second_pos].
- connect_peers,
+ GNUNET_CONTAINER_multihashmap_remove (random_ctx->
+ pg->peers
+
[second_pos].connect_peers,
&first_hash,
- random_ctx->first->
- daemon));
+ random_ctx->
+ first->daemon));
return GNUNET_YES;
}
@@ -4270,29 +4276,29 @@
if (min_ctx->pg_array[i] == min_ctx->current)
{
GNUNET_assert (GNUNET_OK ==
- GNUNET_CONTAINER_multihashmap_put (min_ctx->first->
-
connect_peers_working_set,
+ GNUNET_CONTAINER_multihashmap_put (min_ctx->
+
first->connect_peers_working_set,
key, value,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
uid_from_hash (key, &second_pos);
hash_from_uid (min_ctx->first_uid, &first_hash);
GNUNET_assert (min_ctx->pg->total > second_pos);
GNUNET_assert (GNUNET_OK ==
- GNUNET_CONTAINER_multihashmap_put (min_ctx->pg->
- peers[second_pos].
-
connect_peers_working_set,
+ GNUNET_CONTAINER_multihashmap_put (min_ctx->
+ pg->peers
+
[second_pos].connect_peers_working_set,
&first_hash,
- min_ctx->
- first->daemon,
+ min_ctx->first->
+ daemon,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
/* Now we have added this particular connection, remove it from the
second peer's map so it's not double counted */
GNUNET_assert (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_remove (min_ctx->pg->
- peers[second_pos].
- connect_peers,
+ GNUNET_CONTAINER_multihashmap_remove (min_ctx->
+ pg->peers
+
[second_pos].connect_peers,
&first_hash,
- min_ctx->first->
- daemon));
+ min_ctx->
+ first->daemon));
}
}
min_ctx->current++;
@@ -4321,28 +4327,26 @@
if (dfs_ctx->current == dfs_ctx->chosen)
{
GNUNET_assert (GNUNET_OK ==
- GNUNET_CONTAINER_multihashmap_put (dfs_ctx->first->
-
connect_peers_working_set,
+ GNUNET_CONTAINER_multihashmap_put (dfs_ctx->
+
first->connect_peers_working_set,
key, value,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
uid_from_hash (key, &dfs_ctx->second_uid);
hash_from_uid (dfs_ctx->first_uid, &first_hash);
GNUNET_assert (GNUNET_OK ==
- GNUNET_CONTAINER_multihashmap_put (dfs_ctx->pg->
- peers
- [dfs_ctx->second_uid].
-
connect_peers_working_set,
+ GNUNET_CONTAINER_multihashmap_put (dfs_ctx->
+ pg->peers[dfs_ctx->
+
second_uid].connect_peers_working_set,
&first_hash,
dfs_ctx->first->daemon,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
GNUNET_assert (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_remove (dfs_ctx->pg->
- peers[dfs_ctx->
- second_uid].
- connect_peers,
+ GNUNET_CONTAINER_multihashmap_remove (dfs_ctx->
+ pg->peers
+
[dfs_ctx->second_uid].connect_peers,
&first_hash,
- dfs_ctx->first->
- daemon));
+ dfs_ctx->
+ first->daemon));
/* Can't remove second from first yet because we are currently iterating,
hence the return value in the DFSContext! */
return GNUNET_NO; /* We have found our peer, don't iterate more
*/
}
@@ -4469,8 +4473,9 @@
}
#else
count +=
- GNUNET_CONTAINER_multihashmap_size (pg->peers[pg_iter].
- connect_peers_working_set);
+ GNUNET_CONTAINER_multihashmap_size (pg->
+ peers
+
[pg_iter].connect_peers_working_set);
#endif
}
@@ -4561,10 +4566,8 @@
minimum_ctx.first_uid = pg_iter;
minimum_ctx.pg_array =
GNUNET_CRYPTO_random_permute (GNUNET_CRYPTO_QUALITY_WEAK,
- GNUNET_CONTAINER_multihashmap_size (pg->
- peers
-
[pg_iter].
-
connect_peers));
+ GNUNET_CONTAINER_multihashmap_size
+ (pg->peers[pg_iter].connect_peers));
minimum_ctx.first = &pg->peers[pg_iter];
minimum_ctx.pg = pg;
minimum_ctx.num_to_add = num;
@@ -4654,13 +4657,13 @@
&closest_ctx->curr_peer->daemon->id.hashPubKey) >
closest_ctx->closest_dist)) &&
(GNUNET_YES !=
- GNUNET_CONTAINER_multihashmap_contains (closest_ctx->curr_peer->
- connect_peers, key)))
+ GNUNET_CONTAINER_multihashmap_contains (closest_ctx->
+ curr_peer->connect_peers, key)))
{
closest_ctx->closest_dist =
GNUNET_CRYPTO_hash_matching_bits (&daemon->id.hashPubKey,
- &closest_ctx->curr_peer->daemon->id.
- hashPubKey);
+ &closest_ctx->curr_peer->daemon->
+ id.hashPubKey);
closest_ctx->closest = daemon;
uid_from_hash (key, &closest_ctx->closest_num);
}
@@ -4747,8 +4750,8 @@
for (pg_iter = 0; pg_iter < pg->total; pg_iter++)
{
temp_count =
- count_connections (pg->peers[pg_iter].
- connect_peers_working_set_head);
+ count_connections (pg->
+ peers[pg_iter].connect_peers_working_set_head);
if (temp_count < least_connections)
{
starting_peer = pg_iter;
@@ -4802,8 +4805,9 @@
{
starting_peer = pg_iter;
least_connections =
- GNUNET_CONTAINER_multihashmap_size (pg->peers[pg_iter].
- connect_peers_working_set);
+ GNUNET_CONTAINER_multihashmap_size (pg->
+ peers
+
[pg_iter].connect_peers_working_set);
}
}
}
@@ -4817,28 +4821,25 @@
/* Choose a random peer from the chosen peers set of connections to add */
dfs_ctx.chosen =
GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
- GNUNET_CONTAINER_multihashmap_size (pg->
- peers
-
[starting_peer].
-
connect_peers));
+ GNUNET_CONTAINER_multihashmap_size (pg->peers
+
[starting_peer].connect_peers));
dfs_ctx.first_uid = starting_peer;
dfs_ctx.first = &pg->peers[starting_peer];
dfs_ctx.pg = pg;
dfs_ctx.current = 0;
- GNUNET_CONTAINER_multihashmap_iterate (pg->peers[starting_peer].
- connect_peers,
&dfs_connect_iterator,
- &dfs_ctx);
+ GNUNET_CONTAINER_multihashmap_iterate (pg->
+ peers[starting_peer].connect_peers,
+ &dfs_connect_iterator, &dfs_ctx);
/* Remove the second from the first, since we will be continuing the
search and may encounter the first peer again! */
hash_from_uid (dfs_ctx.second_uid, &second_hash);
GNUNET_assert (GNUNET_YES ==
- GNUNET_CONTAINER_multihashmap_remove (pg->
- peers[starting_peer].
- connect_peers,
+ GNUNET_CONTAINER_multihashmap_remove (pg->peers
+
[starting_peer].connect_peers,
&second_hash,
- pg->peers[dfs_ctx.
- second_uid].
- daemon));
+ pg->
+ peers
+
[dfs_ctx.second_uid].daemon));
starting_peer = dfs_ctx.second_uid;
}
@@ -5620,8 +5621,8 @@
{
if (startup_ctx->churn_ctx->service != NULL)
GNUNET_TESTING_daemon_start_stopped_service (peer_restart_ctx->daemon,
- startup_ctx->churn_ctx->
- service,
+ startup_ctx->
+ churn_ctx->service,
startup_ctx->timeout,
&churn_start_callback,
startup_ctx);
@@ -5880,9 +5881,8 @@
for (i = 0; i < pg->total; i++)
{
if (pg->peers[i].internal_context.hostkey_callback != NULL)
- pg->peers[i].internal_context.hostkey_callback (pg->
-
peers[i].internal_context.
- hostkey_cls,
+ pg->peers[i].internal_context.hostkey_callback (pg->peers[i].
+
internal_context.hostkey_cls,
&pg->peers[i].daemon->id,
pg->peers[i].daemon,
NULL);
Modified: gnunet/src/testing/testing_peergroup.c
===================================================================
--- gnunet/src/testing/testing_peergroup.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/testing/testing_peergroup.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -346,12 +346,12 @@
/* Get duration in seconds */
duration =
GNUNET_TIME_absolute_get_difference (connect_last_time,
- GNUNET_TIME_absolute_get ()).
- rel_value / 1000;
+ GNUNET_TIME_absolute_get
+ ()).rel_value / 1000;
total_duration =
GNUNET_TIME_absolute_get_difference (connect_start_time,
- GNUNET_TIME_absolute_get ()).
- rel_value / 1000;
+ GNUNET_TIME_absolute_get
+ ()).rel_value / 1000;
failed_conns_per_sec_recent = (double) new_failed_connections / duration;
failed_conns_per_sec_total = (double) failed_connections / total_duration;
@@ -422,8 +422,8 @@
#if TIMING
total_duration =
GNUNET_TIME_absolute_get_difference (connect_start_time,
- GNUNET_TIME_absolute_get ()).
- rel_value / 1000;
+ GNUNET_TIME_absolute_get
+ ()).rel_value / 1000;
failed_conns_per_sec_total = (double) failed_connections / total_duration;
conns_per_sec_total = (double) total_connections / total_duration;
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -493,10 +493,8 @@
pg_start_ctx->expected_connections =
GNUNET_TESTING_connect_topology (pg_start_ctx->pg,
pg_start_ctx->connect_topology,
- pg_start_ctx->
- connect_topology_option,
- pg_start_ctx->
- connect_topology_option_modifier,
+
pg_start_ctx->connect_topology_option,
+
pg_start_ctx->connect_topology_option_modifier,
DEFAULT_CONNECT_TIMEOUT,
pg_start_ctx->connect_attempts,
NULL,
NULL);
@@ -736,8 +734,7 @@
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_number (cfg, "testing",
"max_outstanding_connections",
- &pg_start_ctx->
- max_concurrent_connections))
+
&pg_start_ctx->max_concurrent_connections))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
"testing", "max_outstanding_connections");
@@ -857,8 +854,8 @@
"connect_topology_option",
&temp_str)) &&
(GNUNET_NO ==
- GNUNET_TESTING_topology_option_get (&pg_start_ctx->
- connect_topology_option, temp_str)))
+ GNUNET_TESTING_topology_option_get
+ (&pg_start_ctx->connect_topology_option, temp_str)))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Invalid connect topology option `%s' given for section %s
option %s\n",
@@ -889,8 +886,7 @@
if (GNUNET_YES !=
GNUNET_CONFIGURATION_get_value_string (cfg, "testing",
"blacklist_transports",
- &pg_start_ctx->
- restrict_transports))
+
&pg_start_ctx->restrict_transports))
pg_start_ctx->restrict_transports = NULL;
pg_start_ctx->restrict_topology = GNUNET_TESTING_TOPOLOGY_NONE;
Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/topology/gnunet-daemon-topology.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -355,9 +355,8 @@
* @param cls 'struct Peer' to greylist
* @param tc scheduler context
*/
-static void remove_from_greylist (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+remove_from_greylist (void *cls, const struct GNUNET_SCHEDULER_TaskContext
*tc);
/**
@@ -503,7 +502,8 @@
* @param buf where the callee should write the message
* @return number of bytes written to buf
*/
-static size_t hello_advertising_ready (void *cls, size_t size, void *buf);
+static size_t
+hello_advertising_ready (void *cls, size_t size, void *buf);
/**
@@ -921,8 +921,8 @@
}
if ((!pos->is_connected) && (!pos->is_friend) &&
(0 ==
- GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).
- rel_value))
+ GNUNET_TIME_absolute_get_remaining (pos->
+ greylisted_until).rel_value))
free_peer (NULL, &pos->pid.hashPubKey, pos);
}
return;
@@ -1056,8 +1056,8 @@
{
memcpy (&enc, &data[pos], sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded));
if (!isspace
- ((unsigned char) enc.
- encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
+ ((unsigned char)
+ enc.encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
Modified: gnunet/src/transport/gnunet-service-transport-new.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport-new.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/gnunet-service-transport-new.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -218,8 +218,8 @@
ret =
GST_neighbours_calculate_receive_delay (peer,
(message ==
- NULL) ? 0 : ntohs (message->
- size),
+ NULL) ? 0 :
+ ntohs (message->size),
&do_forward);
if (do_forward == GNUNET_YES)
GST_clients_broadcast (message, GNUNET_YES);
Modified: gnunet/src/transport/gnunet-service-transport.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/gnunet-service-transport.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -953,7 +953,8 @@
* disconnected or must we ask all plugins to
* disconnect?
*/
-static void disconnect_neighbour (struct NeighbourMapEntry *n, int check);
+static void
+disconnect_neighbour (struct NeighbourMapEntry *n, int check);
/**
* Check the ready list for the given neighbour and if a plugin is
@@ -961,10 +962,11 @@
*
* @param nexi target peer for which to transmit
*/
-static void try_transmission_to_peer (struct NeighbourMapEntry *n);
+static void
+try_transmission_to_peer (struct NeighbourMapEntry *n);
-struct ForeignAddressList *get_preferred_ats_address (struct NeighbourMapEntry
- *n);
+struct ForeignAddressList *
+get_preferred_ats_address (struct NeighbourMapEntry *n);
/**
* Find an entry in the neighbour list for a particular peer.
@@ -1223,8 +1225,8 @@
#endif
memcpy (&enc, &data[pos], sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded));
if (!isspace
- ((unsigned char) enc.
- encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
+ ((unsigned char)
+ enc.encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
@@ -1523,7 +1525,8 @@
*
* @param fal address to set to 'connected'
*/
-static void mark_address_connected (struct ForeignAddressList *fal);
+static void
+mark_address_connected (struct ForeignAddressList *fal);
@@ -1939,8 +1942,8 @@
/* Have an inbound connection to this peer which is valid; our id is lower,
ignore outbound connection! */
if ((inbound != NULL) && (0 != fal->addrlen) &&
(1 ==
- GNUNET_CRYPTO_hash_xorcmp (&inbound->ready_list->neighbour->
- id.hashPubKey, &my_identity.hashPubKey,
+ GNUNET_CRYPTO_hash_xorcmp (&inbound->ready_list->neighbour->id.
+ hashPubKey, &my_identity.hashPubKey,
&null_hash)))
{
#if DEBUG_INBOUND
@@ -1951,8 +1954,8 @@
}
else if ((outbound != NULL) && (0 == fal->addrlen) &&
((-1 ==
- GNUNET_CRYPTO_hash_xorcmp (&outbound->ready_list->neighbour->id.
- hashPubKey, &my_identity.hashPubKey,
+ GNUNET_CRYPTO_hash_xorcmp (&outbound->ready_list->neighbour->
+ id.hashPubKey, &my_identity.hashPubKey,
&null_hash))))
{
#if DEBUG_INBOUND
@@ -2056,10 +2059,10 @@
if (((best_address == NULL) || (addresses->connected == GNUNET_YES) ||
(best_address->connected == GNUNET_NO)) &&
(addresses->in_transmit == GNUNET_NO) && ((best_address == NULL) ||
- (addresses->latency.
- rel_value <
- best_address->latency.
- rel_value)))
+ (addresses->
+ latency.rel_value <
+ best_address->
+ latency.rel_value)))
best_address = addresses;
/* FIXME: also give lower-latency addresses that are not
* connected a chance some times... */
@@ -2960,7 +2963,8 @@
*
* @param fal address to PING
*/
-static void schedule_next_ping (struct ForeignAddressList *fal);
+static void
+schedule_next_ping (struct ForeignAddressList *fal);
/**
@@ -3295,8 +3299,8 @@
* @param cls the 'struct BlacklistCheck*'
* @param tc unused
*/
-static void do_blacklist_check (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_blacklist_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Transmit blacklist query to the client.
@@ -3633,9 +3637,8 @@
"Some validation of address `%s' via `%s' for peer `%4s'
already in progress.\n",
(peer_address->addr != NULL) ? a2s (tp->short_name,
peer_address->addr,
- peer_address->
- addrlen) : "<inbound>",
- tp->short_name, GNUNET_i2s (&neighbour->id));
+ peer_address->addrlen) :
+ "<inbound>", tp->short_name, GNUNET_i2s (&neighbour->id));
#endif
schedule_next_ping (peer_address);
return;
@@ -4065,8 +4068,9 @@
GNUNET_NO);
fal->latency = GNUNET_TIME_absolute_get_duration (ve->send_time);
update_addr_value (fal,
- GNUNET_TIME_absolute_get_duration (ve->send_time).
- rel_value, GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
+ GNUNET_TIME_absolute_get_duration (ve->
+ send_time).rel_value,
+ GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
schedule_next_ping (fal);
if (n->latency.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
@@ -4571,8 +4575,8 @@
chvc = chvc_head;
while (NULL != chvc)
{
- if (GNUNET_HELLO_equals (hello, chvc->hello, GNUNET_TIME_absolute_get ()).
- abs_value > 0)
+ if (GNUNET_HELLO_equals
+ (hello, chvc->hello, GNUNET_TIME_absolute_get ()).abs_value > 0)
{
#if DEBUG_TRANSPORT_HELLO > 2
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -4889,8 +4893,9 @@
memcpy (&pong[1], plugin->short_name, slen);
if ((sender_address != NULL) && (sender_address_len > 0))
memcpy (&((char *) &pong[1])[slen], sender_address, sender_address_len);
- if (GNUNET_TIME_absolute_get_remaining (session_header->pong_sig_expires).
- rel_value < PONG_SIGNATURE_LIFETIME.rel_value / 4)
+ if (GNUNET_TIME_absolute_get_remaining
+ (session_header->pong_sig_expires).rel_value <
+ PONG_SIGNATURE_LIFETIME.rel_value / 4)
{
/* create / update cached sig */
#if DEBUG_TRANSPORT
@@ -5235,8 +5240,8 @@
#if DEBUG_TRANSPORT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Throttling read (%llu bytes excess at %u b/s), waiting %llu
ms before reading more.\n",
- (unsigned long long) n->in_tracker.
- consumption_since_last_update__,
+ (unsigned long long) n->
+ in_tracker.consumption_since_last_update__,
(unsigned int) n->in_tracker.available_bytes_per_s__,
(unsigned long long) ret.rel_value);
#endif
Modified: gnunet/src/transport/gnunet-service-transport_ats.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_ats.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_ats.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -473,8 +473,9 @@
* Dummy functions for CFLAGS
*/
-static void _dummy2 ();
static void
+_dummy2 ();
+static void
_dummy ()
{
return;
Modified: gnunet/src/transport/gnunet-service-transport_ats.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_ats.h 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_ats.h 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -449,40 +449,48 @@
/*
* ATS functions
*/
-struct ATS_Handle *ats_init (double D, double U, double R, int v_b_min,
- int v_n_min, int max_iterations,
- struct GNUNET_TIME_Relative max_duration,
- GNUNET_TRANSPORT_ATS_AddressNotification
- address_not,
- GNUNET_TRANSPORT_ATS_ResultCallback res_cb);
+struct ATS_Handle *
+ats_init (double D, double U, double R, int v_b_min, int v_n_min,
+ int max_iterations, struct GNUNET_TIME_Relative max_duration,
+ GNUNET_TRANSPORT_ATS_AddressNotification address_not,
+ GNUNET_TRANSPORT_ATS_ResultCallback res_cb);
-void ats_shutdown (struct ATS_Handle *ats);
+void
+ats_shutdown (struct ATS_Handle *ats);
-void ats_delete_problem (struct ATS_Handle *ats);
+void
+ats_delete_problem (struct ATS_Handle *ats);
-int ats_create_problem (struct ATS_Handle *ats, struct ATS_internals *stat,
- struct ATS_peer *peers, int c_p,
- struct ATS_mechanism *mechanisms, int c_m);
+int
+ats_create_problem (struct ATS_Handle *ats, struct ATS_internals *stat,
+ struct ATS_peer *peers, int c_p,
+ struct ATS_mechanism *mechanisms, int c_m);
-void ats_modify_problem_state (struct ATS_Handle *ats,
- enum ATS_problem_state s);
+void
+ats_modify_problem_state (struct ATS_Handle *ats, enum ATS_problem_state s);
-void ats_calculate_bandwidth_distribution (struct ATS_Handle *ats);
+void
+ats_calculate_bandwidth_distribution (struct ATS_Handle *ats);
-void ats_solve_problem (struct ATS_Handle *ats, unsigned int max_it,
- unsigned int max_dur, unsigned int c_peers,
- unsigned int c_mechs, struct ATS_internals *stat);
+void
+ats_solve_problem (struct ATS_Handle *ats, unsigned int max_it,
+ unsigned int max_dur, unsigned int c_peers,
+ unsigned int c_mechs, struct ATS_internals *stat);
-int ats_evaluate_results (int result, int solution, char *problem);
+int
+ats_evaluate_results (int result, int solution, char *problem);
-void ats_update_problem_qm (struct ATS_Handle *ats);
+void
+ats_update_problem_qm (struct ATS_Handle *ats);
-void ats_update_problem_cr (struct ATS_Handle *ats);
+void
+ats_update_problem_cr (struct ATS_Handle *ats);
-void ats_set_logging_options (struct ATS_Handle *ats,
- struct GNUNET_STATISTICS_Handle *stats,
- const struct GNUNET_CONFIGURATION_Handle *cfg);
+void
+ats_set_logging_options (struct ATS_Handle *ats,
+ struct GNUNET_STATISTICS_Handle *stats,
+ const struct GNUNET_CONFIGURATION_Handle *cfg);
#endif
/* end of file gnunet-service-transport_ats.h */
Modified: gnunet/src/transport/gnunet-service-transport_blacklist.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_blacklist.c 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_blacklist.c 2011-08-16
16:03:20 UTC (rev 16587)
@@ -161,8 +161,8 @@
* @param cls the 'struct BlacklistCheck*'
* @param tc unused
*/
-static void do_blacklist_check (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_blacklist_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -328,8 +328,8 @@
#endif
memcpy (&enc, &data[pos], sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded));
if (!isspace
- ((unsigned char) enc.
- encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
+ ((unsigned char)
+ enc.encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_
Modified: gnunet/src/transport/gnunet-service-transport_blacklist.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_blacklist.h 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_blacklist.h 2011-08-16
16:03:20 UTC (rev 16587)
@@ -34,13 +34,15 @@
*
* @param server server used to accept clients from
*/
-void GST_blacklist_start (struct GNUNET_SERVER_Handle *server);
+void
+GST_blacklist_start (struct GNUNET_SERVER_Handle *server);
/**
* Stop blacklist subsystem.
*/
-void GST_blacklist_stop (void);
+void
+GST_blacklist_stop (void);
/**
@@ -52,8 +54,9 @@
* @param client the client
* @param message the blacklist-init message that was sent
*/
-void GST_blacklist_handle_init (void *cls, struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader *message);
+void
+GST_blacklist_handle_init (void *cls, struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *message);
/**
* A blacklisting client has sent us reply. Process it.
@@ -62,8 +65,9 @@
* @param client the client
* @param message the blacklist-init message that was sent
*/
-void GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client
*client,
- const struct GNUNET_MessageHeader *message);
+void
+GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *message);
/**
* Add the given peer to the blacklist (for the given transport).
@@ -71,8 +75,9 @@
* @param peer peer to blacklist
* @param transport_name transport to blacklist for this peer, NULL for all
*/
-void GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
- const char *transport_name);
+void
+GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
+ const char *transport_name);
/**
@@ -104,13 +109,10 @@
* @return handle to the blacklist check, NULL if the decision
* was made instantly and 'cont' was already called
*/
-struct GST_BlacklistCheck *GST_blacklist_test_allowed (const struct
- GNUNET_PeerIdentity
- *peer,
- const char
- *transport_name,
-
GST_BlacklistTestContinuation
- cont, void *cont_cls);
+struct GST_BlacklistCheck *
+GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
+ const char *transport_name,
+ GST_BlacklistTestContinuation cont, void
*cont_cls);
/**
@@ -118,7 +120,8 @@
*
* @param bc check to cancel
*/
-void GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc);
+void
+GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc);
#endif
/* end of file gnunet-service-transport_blacklist.h */
Modified: gnunet/src/transport/gnunet-service-transport_clients.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_clients.h 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_clients.h 2011-08-16
16:03:20 UTC (rev 16587)
@@ -35,13 +35,15 @@
*
* @param server server used to accept clients from.
*/
-void GST_clients_start (struct GNUNET_SERVER_Handle *server);
+void
+GST_clients_start (struct GNUNET_SERVER_Handle *server);
/**
* Stop processing clients.
*/
-void GST_clients_stop (void);
+void
+GST_clients_stop (void);
/**
@@ -50,8 +52,8 @@
* @param msg message to broadcast
* @param may_drop GNUNET_YES if the message can be dropped
*/
-void GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
- int may_drop);
+void
+GST_clients_broadcast (const struct GNUNET_MessageHeader *msg, int may_drop);
/**
@@ -61,8 +63,9 @@
* @param msg message to transmit
* @param may_drop GNUNET_YES if the message can be dropped
*/
-void GST_clients_unicast (struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader *msg, int
may_drop);
+void
+GST_clients_unicast (struct GNUNET_SERVER_Client *client,
+ const struct GNUNET_MessageHeader *msg, int may_drop);
Modified: gnunet/src/transport/gnunet-service-transport_hello.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_hello.h 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_hello.h 2011-08-16
16:03:20 UTC (rev 16587)
@@ -55,13 +55,15 @@
* @param cb function to call whenever our HELLO changes
* @param cb_cls closure for cb
*/
-void GST_hello_start (GST_HelloCallback cb, void *cb_cls);
+void
+GST_hello_start (GST_HelloCallback cb, void *cb_cls);
/**
* Shutdown the HELLO module.
*/
-void GST_hello_stop (void);
+void
+GST_hello_stop (void);
/**
@@ -69,7 +71,8 @@
*
* @return our HELLO message
*/
-const struct GNUNET_MessageHeader *GST_hello_get (void);
+const struct GNUNET_MessageHeader *
+GST_hello_get (void);
/**
@@ -80,9 +83,10 @@
* @param plugin_address address in a plugin-specific format
* @param plugin_address_len number of bytes in plugin_address
*/
-void GST_hello_modify_addresses (int addremove, const char *plugin_name,
- const void *plugin_address,
- size_t plugin_address_len);
+void
+GST_hello_modify_addresses (int addremove, const char *plugin_name,
+ const void *plugin_address,
+ size_t plugin_address_len);
/**
@@ -97,10 +101,11 @@
* @return GNUNET_YES if this is one of our addresses,
* GNUNET_NO if not
*/
-int GST_hello_test_address (const char *plugin_name, const void
*plugin_address,
- size_t plugin_address_len,
- struct GNUNET_CRYPTO_RsaSignature **sig,
- struct GNUNET_TIME_Absolute **sig_expiration);
+int
+GST_hello_test_address (const char *plugin_name, const void *plugin_address,
+ size_t plugin_address_len,
+ struct GNUNET_CRYPTO_RsaSignature **sig,
+ struct GNUNET_TIME_Absolute **sig_expiration);
#endif
Modified: gnunet/src/transport/gnunet-service-transport_neighbours.c
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.c 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.c 2011-08-16
16:03:20 UTC (rev 16587)
@@ -246,8 +246,8 @@
* @param cls the 'struct NeighbourMapEntry'
* @param tc scheduler context
*/
-static void transmission_task (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+transmission_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -770,8 +770,8 @@
#if DEBUG_TRANSPORT
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Throttling read (%llu bytes excess at %u b/s), waiting %llu
ms before reading more.\n",
- (unsigned long long) n->in_tracker.
- consumption_since_last_update__,
+ (unsigned long long) n->
+ in_tracker.consumption_since_last_update__,
(unsigned int) n->in_tracker.available_bytes_per_s__,
(unsigned long long) ret.rel_value);
#endif
Modified: gnunet/src/transport/gnunet-service-transport_neighbours.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_neighbours.h 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_neighbours.h 2011-08-16
16:03:20 UTC (rev 16587)
@@ -43,14 +43,16 @@
* @param connect_cb function to call if we connect to a peer
* @param disconnect_cb function to call if we disconnect from a peer
*/
-void GST_neighbours_start (void *cls, GNUNET_TRANSPORT_NotifyConnect
connect_cb,
- GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb);
+void
+GST_neighbours_start (void *cls, GNUNET_TRANSPORT_NotifyConnect connect_cb,
+ GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb);
/**
* Cleanup the neighbours subsystem.
*/
-void GST_neighbours_stop (void);
+void
+GST_neighbours_stop (void);
/**
@@ -58,7 +60,8 @@
*
* @param target peer to try to connect to
*/
-void GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target);
+void
+GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target);
/**
@@ -67,7 +70,8 @@
* @param target peer to test
* @return GNUNET_YES if we are connected, GNUNET_NO if not
*/
-int GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target);
+int
+GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target);
/**
@@ -89,10 +93,10 @@
* @param cont function to call when done
* @param cont_cls closure for 'cont'
*/
-void GST_neighbours_send (const struct GNUNET_PeerIdentity *target,
- const void *msg, size_t msg_size,
- struct GNUNET_TIME_Relative timeout,
- GST_NeighbourSendContinuation cont, void *cont_cls);
+void
+GST_neighbours_send (const struct GNUNET_PeerIdentity *target, const void *msg,
+ size_t msg_size, struct GNUNET_TIME_Relative timeout,
+ GST_NeighbourSendContinuation cont, void *cont_cls);
/**
@@ -106,13 +110,9 @@
* GNUNET_NO if the neighbour is not connected or violates
the quota
* @return how long to wait before reading more from this sender
*/
-struct GNUNET_TIME_Relative GST_neighbours_calculate_receive_delay (const
struct
-
GNUNET_PeerIdentity
- *sender,
- ssize_t
- size,
- int
-
*do_forward);
+struct GNUNET_TIME_Relative
+GST_neighbours_calculate_receive_delay (const struct GNUNET_PeerIdentity
+ *sender, ssize_t size, int
*do_forward);
/**
@@ -121,7 +121,8 @@
*
* @param neighbour neighbour to keep alive
*/
-void GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour);
+void
+GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour);
/**
@@ -130,10 +131,9 @@
* @param neighbour identity of peer to change qutoa for
* @param quota new quota
*/
-void GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity
- *neighbour,
- struct GNUNET_BANDWIDTH_Value32NBO
- quota);
+void
+GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour,
+ struct GNUNET_BANDWIDTH_Value32NBO quota);
/**
@@ -141,7 +141,8 @@
*
* @param target peer to disconnect from
*/
-void GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity
*target);
+void
+GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target);
/**
@@ -166,7 +167,8 @@
* @param cb function to call
* @param cb_cls closure for cb
*/
-void GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls);
+void
+GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls);
/**
@@ -175,8 +177,9 @@
* @param peer identity of the peer where the session died
* @param session session that is gone
*/
-void GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
- struct Session *session);
+void
+GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
+ struct Session *session);
/**
@@ -192,13 +195,12 @@
* @param ats performance data
* @param ats_count number of entries in ats (excluding 0-termination)
*/
-void GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
- const char *plugin_name,
- const void *address, size_t address_len,
- struct Session *session,
- const struct
- GNUNET_TRANSPORT_ATS_Information *ats,
- uint32_t ats_count);
+void
+GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
+ const char *plugin_name, const void *address,
+ size_t address_len, struct Session *session,
+ const struct GNUNET_TRANSPORT_ATS_Information
+ *ats, uint32_t ats_count);
#endif
Modified: gnunet/src/transport/gnunet-service-transport_plugins.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_plugins.h 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_plugins.h 2011-08-16
16:03:20 UTC (rev 16587)
@@ -42,15 +42,17 @@
* @param address_cb function to call when our public addresses changed
* @param session_end_cb function to call when a session was terminated
*/
-void GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb,
- GNUNET_TRANSPORT_AddressNotification address_cb,
- GNUNET_TRANSPORT_SessionEnd session_end_cb);
+void
+GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb,
+ GNUNET_TRANSPORT_AddressNotification address_cb,
+ GNUNET_TRANSPORT_SessionEnd session_end_cb);
/**
* Unload all plugins
*/
-void GST_plugins_unload (void);
+void
+GST_plugins_unload (void);
/**
@@ -59,7 +61,8 @@
* @param name name of the plugin
* @return the plugin's API, NULL if the plugin is not loaded
*/
-struct GNUNET_TRANSPORT_PluginFunctions *GST_plugins_find (const char *name);
+struct GNUNET_TRANSPORT_PluginFunctions *
+GST_plugins_find (const char *name);
/**
@@ -71,8 +74,8 @@
* @param addrlen number of bytes in 'addr'
* @return statically allocated (!) human-readable address
*/
-const char *GST_plugins_a2s (const char *name, const void *addr,
- size_t addrlen);
+const char *
+GST_plugins_a2s (const char *name, const void *addr, size_t addrlen);
#endif
Modified: gnunet/src/transport/gnunet-service-transport_validation.h
===================================================================
--- gnunet/src/transport/gnunet-service-transport_validation.h 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/transport/gnunet-service-transport_validation.h 2011-08-16
16:03:20 UTC (rev 16587)
@@ -34,13 +34,15 @@
/**
* Start the validation subsystem.
*/
-void GST_validation_start (void);
+void
+GST_validation_start (void);
/**
* Stop the validation subsystem.
*/
-void GST_validation_stop (void);
+void
+GST_validation_stop (void);
/**
@@ -54,12 +56,12 @@
* if we did not initiate the connection
* @param sender_address_len number of bytes in sender_address
*/
-void GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
- const struct GNUNET_MessageHeader *hdr,
- const char *plugin_name,
- struct Session *session,
- const void *sender_address,
- size_t sender_address_len);
+void
+GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
+ const struct GNUNET_MessageHeader *hdr,
+ const char *plugin_name, struct Session *session,
+ const void *sender_address,
+ size_t sender_address_len);
/**
@@ -69,8 +71,9 @@
* @param sender peer sending the PONG
* @param hdr the PONG
*/
-void GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
- const struct GNUNET_MessageHeader *hdr);
+void
+GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
+ const struct GNUNET_MessageHeader *hdr);
/**
@@ -79,7 +82,8 @@
*
* @param hello the HELLO we received
*/
-void GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello);
+void
+GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello);
/**
@@ -122,9 +126,9 @@
* @param cb_cls closure for 'cb'
* @return context to cancel, NULL if 'snapshot_only' is GNUNET_YES
*/
-void GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target,
- GST_ValidationAddressCallback cb,
- void *cb_cls);
+void
+GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target,
+ GST_ValidationAddressCallback cb, void *cb_cls);
#endif
Modified: gnunet/src/transport/gnunet-transport-wlan-helper.c
===================================================================
--- gnunet/src/transport/gnunet-transport-wlan-helper.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/gnunet-transport-wlan-helper.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -108,7 +108,8 @@
};
// FIXME: inline?
-int getChannelFromFrequency (int frequency);
+int
+getChannelFromFrequency (int frequency);
// FIXME: make nice...
static unsigned long
Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/plugin_transport_http.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -547,24 +547,24 @@
* @param addrlen length of the address
* @return string representing the same address
*/
-static const char *http_plugin_address_to_string (void *cls, const void *addr,
- size_t addrlen);
+static const char *
+http_plugin_address_to_string (void *cls, const void *addr, size_t addrlen);
/**
* Call MHD to process pending ipv4 requests and then go back
* and schedule the next run.
*/
-static void http_server_daemon_v4_run (void *cls,
- const struct
GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+http_server_daemon_v4_run (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Call MHD to process pending ipv6 requests and then go back
* and schedule the next run.
*/
-static void http_server_daemon_v6_run (void *cls,
- const struct
GNUNET_SCHEDULER_TaskContext
- *tc);
+static void
+http_server_daemon_v6_run (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Function setting up curl handle and selecting message to send
@@ -573,7 +573,8 @@
* @param ps session
* @return GNUNET_SYSERR on failure, GNUNET_NO if connecting, GNUNET_YES if ok
*/
-static int send_check_connections (struct Plugin *plugin, struct Session *ps);
+static int
+send_check_connections (struct Plugin *plugin, struct Session *ps);
/**
* Function setting up file descriptors and scheduling task to run
@@ -581,7 +582,8 @@
* @param plugin plugin as closure
* @return GNUNET_SYSERR for hard failure, GNUNET_OK for ok
*/
-static int curl_schedule (struct Plugin *plugin);
+static int
+curl_schedule (struct Plugin *plugin);
/**
* Task scheduled to reset the inbound quota delay for a specific peer
@@ -1785,10 +1787,8 @@
"Connection %X: Forwarding message to transport service, type %u
and size %u from `%s' (`%s')\n",
ps, ntohs (message->type), ntohs (message->size),
GNUNET_i2s (&(pc->identity)), http_plugin_address_to_string
(NULL,
- ps->
-
addr,
- ps->
-
addrlen));
+
ps->addr,
+
ps->addrlen));
#endif
struct GNUNET_TRANSPORT_ATS_Information distance[2];
@@ -3333,8 +3333,7 @@
GNUNET_CONFIGURATION_get_value_string (env->cfg,
component_name,
"BINDTO4",
- &plugin->
- bind_hostname));
+
&plugin->bind_hostname));
plugin->bind4_address = GNUNET_malloc (sizeof (struct sockaddr_in));
plugin->bind4_address->sin_family = AF_INET;
plugin->bind4_address->sin_port = htons (port);
@@ -3494,8 +3493,8 @@
MHD_OPTION_SOCK_ADDR,
tmp,
MHD_OPTION_CONNECTION_LIMIT,
- (unsigned int) plugin->
-
max_connect_per_transport,
+ (unsigned int)
+
plugin->max_connect_per_transport,
#if BUILD_HTTPS
MHD_OPTION_HTTPS_PRIORITIES,
plugin->crypto_init,
@@ -3534,8 +3533,8 @@
(struct sockaddr_in *)
plugin->bind4_address,
MHD_OPTION_CONNECTION_LIMIT,
- (unsigned int) plugin->
-
max_connect_per_transport,
+ (unsigned int)
+
plugin->max_connect_per_transport,
#if BUILD_HTTPS
MHD_OPTION_HTTPS_PRIORITIES,
plugin->crypto_init,
Modified: gnunet/src/transport/plugin_transport_smtp.c
===================================================================
--- gnunet/src/transport/plugin_transport_smtp.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/plugin_transport_smtp.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -420,9 +420,8 @@
maddr = (const EmailAddress *) &hello[1];
if ((ntohs (hello->header.size) !=
sizeof (GNUNET_MessageHello) + ntohs (hello->senderAddressSize)) ||
- (maddr->
- senderAddress[ntohs (hello->senderAddressSize) - 1 -
- FILTER_STRING_SIZE] != '\0'))
+ (maddr->senderAddress
+ [ntohs (hello->senderAddressSize) - 1 - FILTER_STRING_SIZE] != '\0'))
{
GNUNET_GE_BREAK (ectx, 0);
return GNUNET_SYSERR; /* obviously invalid */
Modified: gnunet/src/transport/plugin_transport_tcp.c
===================================================================
--- gnunet/src/transport/plugin_transport_tcp.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/plugin_transport_tcp.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -605,7 +605,8 @@
*
* @param session for which session should we do this
*/
-static void process_pending_messages (struct Session *session);
+static void
+process_pending_messages (struct Session *session);
/**
@@ -779,8 +780,8 @@
(session->connect_addr !=
NULL) ? tcp_address_to_string (session->plugin,
session->connect_addr,
- session->
- connect_alen) : "*");
+ session->connect_alen) :
+ "*");
#endif
/* remove from session list */
prev = NULL;
@@ -1455,8 +1456,8 @@
session =
GNUNET_CONTAINER_multihashmap_get (plugin->nat_wait_conns,
- &tcp_nat_probe->clientIdentity.
- hashPubKey);
+ &tcp_nat_probe->
+ clientIdentity.hashPubKey);
if (session == NULL)
{
#if DEBUG_TCP_NAT
@@ -1775,8 +1776,8 @@
(session->connect_addr !=
NULL) ? tcp_address_to_string (session->plugin,
session->connect_addr,
- session->
- connect_alen) : "*");
+ session->connect_alen) :
+ "*");
#endif
GNUNET_STATISTICS_update (session->plugin->env->stats,
gettext_noop
@@ -1863,8 +1864,8 @@
tcp_probe_ctx);
tcp_probe_ctx->transmit_handle =
GNUNET_CONNECTION_notify_transmit_ready (sock,
- ntohs (tcp_probe_ctx->message.
- header.size),
+ ntohs (tcp_probe_ctx->
+ message.header.size),
GNUNET_TIME_UNIT_FOREVER_REL,
¬ify_send_probe,
tcp_probe_ctx);
Modified: gnunet/src/transport/plugin_transport_udp.c
===================================================================
--- gnunet/src/transport/plugin_transport_udp.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/plugin_transport_udp.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -852,8 +852,8 @@
return;
GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_multihashmap_remove (plugin->sessions,
- &udp->sender.
- hashPubKey,
+ &udp->
+ sender.hashPubKey,
peer_session));
plugin->last_expected_delay =
GNUNET_FRAGMENT_context_destroy (peer_session->frag);
@@ -882,8 +882,8 @@
&fragment_msg_proc, &ack_proc);
rc->hnode =
GNUNET_CONTAINER_heap_insert (plugin->defrags, rc,
- (GNUNET_CONTAINER_HeapCostType) now.
- abs_value);
+ (GNUNET_CONTAINER_HeapCostType)
+ now.abs_value);
}
#if DEBUG_UDP
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -896,8 +896,8 @@
{
/* keep this 'rc' from expiring */
GNUNET_CONTAINER_heap_update_cost (plugin->defrags, rc->hnode,
- (GNUNET_CONTAINER_HeapCostType) now.
- abs_value);
+ (GNUNET_CONTAINER_HeapCostType)
+ now.abs_value);
}
if (GNUNET_CONTAINER_heap_get_size (plugin->defrags) >
UDP_MAX_SENDER_ADDRESSES_WITH_DEFRAG)
Modified: gnunet/src/transport/plugin_transport_unix.c
===================================================================
--- gnunet/src/transport/plugin_transport_unix.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/plugin_transport_unix.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -419,16 +419,14 @@
}
/* Forward Declaration */
-static ssize_t unix_real_send (void *cls,
- struct RetrySendContext *incoming_retry_context,
- struct GNUNET_NETWORK_Handle *send_handle,
- const struct GNUNET_PeerIdentity *target,
- const char *msgbuf, size_t msgbuf_size,
- unsigned int priority,
- struct GNUNET_TIME_Relative timeout,
- const void *addr, size_t addrlen,
- GNUNET_TRANSPORT_TransmitContinuation cont,
- void *cont_cls);
+static ssize_t
+unix_real_send (void *cls, struct RetrySendContext *incoming_retry_context,
+ struct GNUNET_NETWORK_Handle *send_handle,
+ const struct GNUNET_PeerIdentity *target, const char *msgbuf,
+ size_t msgbuf_size, unsigned int priority,
+ struct GNUNET_TIME_Relative timeout, const void *addr,
+ size_t addrlen, GNUNET_TRANSPORT_TransmitContinuation cont,
+ void *cont_cls);
/**
* Retry sending a message.
Modified: gnunet/src/transport/plugin_transport_wlan.c
===================================================================
--- gnunet/src/transport/plugin_transport_wlan.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/plugin_transport_wlan.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -662,12 +662,13 @@
struct Radiotap_Send *radioHeader;
};
-static void do_transmit (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
-static void free_session (struct Plugin *plugin, struct Sessionqueue *queue,
- int do_free_macendpoint);
-static struct MacEndpoint *create_macendpoint (struct Plugin *plugin,
- const struct MacAddress *addr);
+static void
+do_transmit (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+free_session (struct Plugin *plugin, struct Sessionqueue *queue,
+ int do_free_macendpoint);
+static struct MacEndpoint *
+create_macendpoint (struct Plugin *plugin, const struct MacAddress *addr);
/**
* Generates a nice hexdump of a memory area.
@@ -1860,8 +1861,9 @@
newmsg = session->pending_message_head;
GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
"wlan_plugin_send: a pending message is already in the
queue for this client\n remaining time to send this message is %u, queued
fragment messages for this mac connection %u\n",
- GNUNET_TIME_absolute_get_remaining (newmsg->timeout).
- rel_value, session->mac->fragment_messages_out_count);
+ GNUNET_TIME_absolute_get_remaining (newmsg->
+ timeout).rel_value,
+ session->mac->fragment_messages_out_count);
}
newmsg = GNUNET_malloc (sizeof (struct PendingMessage));
@@ -2263,8 +2265,8 @@
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
"Calling plugin->env->receive for session %p; %s; size:
%u\n",
session, wlan_plugin_address_to_string (NULL,
- session->mac->addr.
- mac, 6),
+ session->mac->
+ addr.mac, 6),
htons (hdr->size));
#endif
@@ -2303,9 +2305,8 @@
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
"Func wlan_data_helper got
GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT size: %u; %s\n",
ntohs (hdr->size), wlan_plugin_address_to_string (NULL,
-
session_light->
-
addr.mac,
- 6));
+
session_light->addr.
+ mac,
6));
#endif
if (session_light->macendpoint == NULL)
@@ -2373,9 +2374,7 @@
GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
"Macendpoint does not exist for this
GNUNET_MESSAGE_TYPE_FRAGMENT_ACK size: %u; %s\n",
ntohs (hdr->size), wlan_plugin_address_to_string (NULL,
-
session_light->
- addr.
- mac,
+
session_light->addr.mac,
6));
#endif
return;
@@ -2477,8 +2476,8 @@
return;
}
if (GNUNET_TIME_absolute_get_remaining
- (GNUNET_TIME_absolute_add (endpoint->last_activity,
MACENDPOINT_TIMEOUT)).
- rel_value == 0)
+ (GNUNET_TIME_absolute_add
+ (endpoint->last_activity, MACENDPOINT_TIMEOUT)).rel_value == 0)
{
free_macendpoint (endpoint->plugin, endpoint);
}
Modified: gnunet/src/transport/test_plugin_transport_http.c
===================================================================
--- gnunet/src/transport/test_plugin_transport_http.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/test_plugin_transport_http.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -522,7 +522,8 @@
}
-static void run_connection_tests (int phase, void *cls);
+static void
+run_connection_tests (int phase, void *cls);
/**
* Recieves messages from plugin, in real world transport
@@ -646,7 +647,8 @@
}
-static size_t send_prepare (struct HTTP_Transfer *result);
+static size_t
+send_prepare (struct HTTP_Transfer *result);
static void
Modified: gnunet/src/transport/test_plugin_transport_https.c
===================================================================
--- gnunet/src/transport/test_plugin_transport_https.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/test_plugin_transport_https.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -551,7 +551,8 @@
}
-static void run_connection_tests (int phase, void *cls);
+static void
+run_connection_tests (int phase, void *cls);
/**
* Recieves messages from plugin, in real world transport
@@ -679,7 +680,8 @@
return size * nmemb;
}
-static size_t send_prepare (struct HTTP_Transfer *result);
+static size_t
+send_prepare (struct HTTP_Transfer *result);
Modified: gnunet/src/transport/test_quota_compliance.c
===================================================================
--- gnunet/src/transport/test_quota_compliance.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/test_quota_compliance.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -315,7 +315,8 @@
}
-static void measure (unsigned long long quota_p1, unsigned long long quota_p2);
+static void
+measure (unsigned long long quota_p1, unsigned long long quota_p2);
static void
measurement_counter (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
Modified: gnunet/src/transport/test_transport_api_disconnect.c
===================================================================
--- gnunet/src/transport/test_transport_api_disconnect.c 2011-08-16
15:53:40 UTC (rev 16586)
+++ gnunet/src/transport/test_transport_api_disconnect.c 2011-08-16
16:03:20 UTC (rev 16587)
@@ -80,7 +80,8 @@
#endif
-static void peers_connect ();
+static void
+peers_connect ();
static void
end ()
@@ -200,8 +201,8 @@
msgs_recv++;
}
-static void peers_disconnect (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+peers_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static size_t
notify_ready (void *cls, size_t size, void *buf)
Modified: gnunet/src/transport/transport-testing.c
===================================================================
--- gnunet/src/transport/transport-testing.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/transport-testing.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -41,10 +41,10 @@
int p2_c;
};
-static void exchange_hello_last (void *cb_cls,
- const struct GNUNET_MessageHeader *message);
-static void exchange_hello (void *cb_cls,
- const struct GNUNET_MessageHeader *message);
+static void
+exchange_hello_last (void *cb_cls, const struct GNUNET_MessageHeader *message);
+static void
+exchange_hello (void *cb_cls, const struct GNUNET_MessageHeader *message);
static void
notify_connect_internal (void *cls, const struct GNUNET_PeerIdentity *peer,
Modified: gnunet/src/transport/transport-testing.h
===================================================================
--- gnunet/src/transport/transport-testing.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/transport-testing.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -76,13 +76,12 @@
* if NULL passed the PeerContext * will be used!
* @return the peer context
*/
-struct PeerContext *GNUNET_TRANSPORT_TESTING_start_peer (const char *cfgname,
-
GNUNET_TRANSPORT_ReceiveCallback
- rec,
-
GNUNET_TRANSPORT_NotifyConnect
- nc,
-
GNUNET_TRANSPORT_NotifyDisconnect
- nd, void *cb_cls);
+struct PeerContext *
+GNUNET_TRANSPORT_TESTING_start_peer (const char *cfgname,
+ GNUNET_TRANSPORT_ReceiveCallback rec,
+ GNUNET_TRANSPORT_NotifyConnect nc,
+ GNUNET_TRANSPORT_NotifyDisconnect nd,
+ void *cb_cls);
/**
@@ -90,7 +89,8 @@
* @param p the peer
*/
-void GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext *pc);
+void
+GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext *pc);
/**
@@ -102,9 +102,10 @@
* @param cb the callback to call
* @param cb_cls callback cls
*/
-void GNUNET_TRANSPORT_TESTING_connect_peers (struct PeerContext *p1,
- struct PeerContext *p2,
-
GNUNET_TRANSPORT_TESTING_connect_cb
- cb, void *cls);
+void
+GNUNET_TRANSPORT_TESTING_connect_peers (struct PeerContext *p1,
+ struct PeerContext *p2,
+ GNUNET_TRANSPORT_TESTING_connect_cb cb,
+ void *cls);
/* end of transport_testing.h */
Modified: gnunet/src/transport/transport_api.c
===================================================================
--- gnunet/src/transport/transport_api.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/transport_api.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -295,7 +295,8 @@
*
* @param h transport service to schedule a transmission for
*/
-static void schedule_transmission (struct GNUNET_TRANSPORT_Handle *h);
+static void
+schedule_transmission (struct GNUNET_TRANSPORT_Handle *h);
/**
@@ -304,8 +305,8 @@
*
* @param h transport service to reconnect
*/
-static void disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_Handle
- *h);
+static void
+disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_Handle *h);
/**
@@ -659,8 +660,8 @@
th = n->th;
if (th->notify_size + sizeof (struct OutboundMessage) > size)
break; /* does not fit */
- if (GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker, th->notify_size).
- rel_value > 0)
+ if (GNUNET_BANDWIDTH_tracker_get_delay
+ (&n->out_tracker, th->notify_size).rel_value > 0)
break; /* too early */
GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap));
n->hn = NULL;
Modified: gnunet/src/transport/transport_api_blacklist.c
===================================================================
--- gnunet/src/transport/transport_api_blacklist.c 2011-08-16 15:53:40 UTC
(rev 16586)
+++ gnunet/src/transport/transport_api_blacklist.c 2011-08-16 16:03:20 UTC
(rev 16587)
@@ -78,7 +78,8 @@
*
* @param br overall handle
*/
-static void reconnect (struct GNUNET_TRANSPORT_Blacklist *br);
+static void
+reconnect (struct GNUNET_TRANSPORT_Blacklist *br);
/**
@@ -86,7 +87,8 @@
*
* @param br our overall context
*/
-static void reply (struct GNUNET_TRANSPORT_Blacklist *br);
+static void
+reply (struct GNUNET_TRANSPORT_Blacklist *br);
/**
Modified: gnunet/src/transport/wlan/byteorder.h
===================================================================
--- gnunet/src/transport/wlan/byteorder.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/wlan/byteorder.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -1,33 +1,33 @@
-/*
- * Compatibility header
- *
- * Copyright (C) 2009 Thomas d'Otreppe
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef _AIRCRACK_NG_BYTEORDER_H_
-#define _AIRCRACK_NG_BYTEORDER_H_
-
-#define ___my_swab16(x) \
+/*
+ * Compatibility header
+ *
+ * Copyright (C) 2009 Thomas d'Otreppe
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _AIRCRACK_NG_BYTEORDER_H_
+#define _AIRCRACK_NG_BYTEORDER_H_
+
+#define ___my_swab16(x) \
((u_int16_t)
(\
(((u_int16_t) (x) & (u_int16_t) 0x00ffU) << 8) |
\
-(((u_int16_t) (x) & (u_int16_t) 0xff00U) >> 8)))
-#define ___my_swab32(x) \
+(((u_int16_t) (x) & (u_int16_t) 0xff00U) >> 8)))
+#define ___my_swab32(x) \
((u_int32_t)
(\
(((u_int32_t) (x) & (u_int32_t) 0x000000ffUL) << 24) |
@@ -36,8 +36,8 @@
\
(((u_int32_t) (x) & (u_int32_t) 0x00ff0000UL) >> 8) |
\
-(((u_int32_t) (x) & (u_int32_t) 0xff000000UL) >> 24)))
-#define ___my_swab64(x) \
+(((u_int32_t) (x) & (u_int32_t) 0xff000000UL) >> 24)))
+#define ___my_swab64(x) \
((u_int64_t)
(\
(u_int64_t)
@@ -60,16 +60,16 @@
(u_int64_t) (((u_int64_t) (x) & (u_int64_t)
0xff00000000000000ULL) >> 56)))
-
- /*
- * Linux
- */
-#if defined(linux) || defined(Linux) || defined(__linux__) || defined(__linux)
|| defined(__gnu_linux__)
-#include <endian.h>
-#include <unistd.h>
-#include <stdint.h>
-
-#ifndef __int8_t_defined
+
+ /*
+ * Linux
+ */
+#if defined(linux) || defined(Linux) || defined(__linux__) || defined(__linux)
|| defined(__gnu_linux__)
+#include <endian.h>
+#include <unistd.h>
+#include <stdint.h>
+
+#ifndef __int8_t_defined
typedef uint64_t u_int64_t;
typedef uint32_t u_int32_t;
@@ -78,181 +78,181 @@
typedef uint8_t u_int8_t;
-
+
#endif /*
*/
-
-#ifndef htole16
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-#define htobe16(x) ___my_swab16 (x)
-#define htole16(x) (x)
-#define be16toh(x) ___my_swab16 (x)
-#define le16toh(x) (x)
-
-#define htobe32(x) ___my_swab32 (x)
-#define htole32(x) (x)
-#define be32toh(x) ___my_swab32 (x)
-#define le32toh(x) (x)
-
-#define htobe64(x) ___my_swab64 (x)
-#define htole64(x) (x)
-#define be64toh(x) ___my_swab64 (x)
-#define le64toh(x) (x)
+
+#ifndef htole16
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define htobe16(x) ___my_swab16 (x)
+#define htole16(x) (x)
+#define be16toh(x) ___my_swab16 (x)
+#define le16toh(x) (x)
+
+#define htobe32(x) ___my_swab32 (x)
+#define htole32(x) (x)
+#define be32toh(x) ___my_swab32 (x)
+#define le32toh(x) (x)
+
+#define htobe64(x) ___my_swab64 (x)
+#define htole64(x) (x)
+#define be64toh(x) ___my_swab64 (x)
+#define le64toh(x) (x)
#else /*
*/
-#define htobe16(x) (x)
-#define htole16(x) ___my_swab16 (x)
-#define be16toh(x) (x)
-#define le16toh(x) ___my_swab16 (x)
-
-#define htobe32(x) (x)
-#define htole32(x) ___my_swab32 (x)
-#define be32toh(x) (x)
-#define le32toh(x) ___my_swab32 (x)
-
-#define htobe64(x) (x)
-#define htole64(x) ___my_swab64 (x)
-#define be64toh(x) (x)
-#define le64toh(x) ___my_swab64 (x)
+#define htobe16(x) (x)
+#define htole16(x) ___my_swab16 (x)
+#define be16toh(x) (x)
+#define le16toh(x) ___my_swab16 (x)
+
+#define htobe32(x) (x)
+#define htole32(x) ___my_swab32 (x)
+#define be32toh(x) (x)
+#define le32toh(x) ___my_swab32 (x)
+
+#define htobe64(x) (x)
+#define htole64(x) ___my_swab64 (x)
+#define be64toh(x) (x)
+#define le64toh(x) ___my_swab64 (x)
#endif /*
*/
#endif /*
*/
-
+
#endif /*
*/
-
- /*
- * Cygwin
- */
-#if defined(__CYGWIN32__)
-#include <asm/byteorder.h>
-#include <unistd.h>
-
-#define __be64_to_cpu(x) ___my_swab64(x)
-#define __be32_to_cpu(x) ___my_swab32(x)
-#define __be16_to_cpu(x) ___my_swab16(x)
-#define __cpu_to_be64(x) ___my_swab64(x)
-#define __cpu_to_be32(x) ___my_swab32(x)
-#define __cpu_to_be16(x) ___my_swab16(x)
-#define __le64_to_cpu(x) (x)
-#define __le32_to_cpu(x) (x)
-#define __le16_to_cpu(x) (x)
-#define __cpu_to_le64(x) (x)
-#define __cpu_to_le32(x) (x)
-#define __cpu_to_le16(x) (x)
-
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED
-
+
+ /*
+ * Cygwin
+ */
+#if defined(__CYGWIN32__)
+#include <asm/byteorder.h>
+#include <unistd.h>
+
+#define __be64_to_cpu(x) ___my_swab64(x)
+#define __be32_to_cpu(x) ___my_swab32(x)
+#define __be16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_be64(x) ___my_swab64(x)
+#define __cpu_to_be32(x) ___my_swab32(x)
+#define __cpu_to_be16(x) ___my_swab16(x)
+#define __le64_to_cpu(x) (x)
+#define __le32_to_cpu(x) (x)
+#define __le16_to_cpu(x) (x)
+#define __cpu_to_le64(x) (x)
+#define __cpu_to_le32(x) (x)
+#define __cpu_to_le16(x) (x)
+
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+
#endif /*
*/
-
- /*
- * Windows (DDK)
- */
-#if defined(__WIN__)
-
-#include <io.h>
-
-#define __be64_to_cpu(x) ___my_swab64(x)
-#define __be32_to_cpu(x) ___my_swab32(x)
-#define __be16_to_cpu(x) ___my_swab16(x)
-#define __cpu_to_be64(x) ___my_swab64(x)
-#define __cpu_to_be32(x) ___my_swab32(x)
-#define __cpu_to_be16(x) ___my_swab16(x)
-#define __le64_to_cpu(x) (x)
-#define __le32_to_cpu(x) (x)
-#define __le16_to_cpu(x) (x)
-#define __cpu_to_le64(x) (x)
-#define __cpu_to_le32(x) (x)
-#define __cpu_to_le16(x) (x)
-
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED
-
+
+ /*
+ * Windows (DDK)
+ */
+#if defined(__WIN__)
+
+#include <io.h>
+
+#define __be64_to_cpu(x) ___my_swab64(x)
+#define __be32_to_cpu(x) ___my_swab32(x)
+#define __be16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_be64(x) ___my_swab64(x)
+#define __cpu_to_be32(x) ___my_swab32(x)
+#define __cpu_to_be16(x) ___my_swab16(x)
+#define __le64_to_cpu(x) (x)
+#define __le32_to_cpu(x) (x)
+#define __le16_to_cpu(x) (x)
+#define __cpu_to_le64(x) (x)
+#define __cpu_to_le32(x) (x)
+#define __cpu_to_le16(x) (x)
+
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+
#endif /*
*/
-
- /*
- * MAC (Darwin)
- */
-#if defined(__APPLE_CC__)
-#if defined(__x86_64__) && defined(__APPLE__)
-
-#include <libkern/OSByteOrder.h>
-
-#define __swab64(x) (unsigned long long) OSSwapInt64((uint64_t)x)
-#define __swab32(x) (unsigned long) OSSwapInt32((uint32_t)x)
-#define __swab16(x) (unsigned short) OSSwapInt16((uint16_t)x)
-#define __be64_to_cpu(x) (unsigned long long) OSSwapBigToHostInt64((uint64_t)x)
-#define __be32_to_cpu(x) (unsigned long) OSSwapBigToHostInt32((uint32_t)x)
-#define __be16_to_cpu(x) (unsigned short) OSSwapBigToHostInt16((uint16_t)x)
-#define __le64_to_cpu(x) (unsigned long long)
OSSwapLittleToHostInt64((uint64_t)x)
-#define __le32_to_cpu(x) (unsigned long) OSSwapLittleToHostInt32((uint32_t)x)
-#define __le16_to_cpu(x) (unsigned short) OSSwapLittleToHostInt16((uint16_t)x)
-#define __cpu_to_be64(x) (unsigned long long) OSSwapHostToBigInt64((uint64_t)x)
-#define __cpu_to_be32(x) (unsigned long) OSSwapHostToBigInt32((uint32_t)x)
-#define __cpu_to_be16(x) (unsigned short) OSSwapHostToBigInt16((uint16_t)x)
-#define __cpu_to_le64(x) (unsigned long long)
OSSwapHostToLittleInt64((uint64_t)x)
-#define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x)
-#define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x)
-
+
+ /*
+ * MAC (Darwin)
+ */
+#if defined(__APPLE_CC__)
+#if defined(__x86_64__) && defined(__APPLE__)
+
+#include <libkern/OSByteOrder.h>
+
+#define __swab64(x) (unsigned long long) OSSwapInt64((uint64_t)x)
+#define __swab32(x) (unsigned long) OSSwapInt32((uint32_t)x)
+#define __swab16(x) (unsigned short) OSSwapInt16((uint16_t)x)
+#define __be64_to_cpu(x) (unsigned long long) OSSwapBigToHostInt64((uint64_t)x)
+#define __be32_to_cpu(x) (unsigned long) OSSwapBigToHostInt32((uint32_t)x)
+#define __be16_to_cpu(x) (unsigned short) OSSwapBigToHostInt16((uint16_t)x)
+#define __le64_to_cpu(x) (unsigned long long)
OSSwapLittleToHostInt64((uint64_t)x)
+#define __le32_to_cpu(x) (unsigned long) OSSwapLittleToHostInt32((uint32_t)x)
+#define __le16_to_cpu(x) (unsigned short) OSSwapLittleToHostInt16((uint16_t)x)
+#define __cpu_to_be64(x) (unsigned long long) OSSwapHostToBigInt64((uint64_t)x)
+#define __cpu_to_be32(x) (unsigned long) OSSwapHostToBigInt32((uint32_t)x)
+#define __cpu_to_be16(x) (unsigned short) OSSwapHostToBigInt16((uint16_t)x)
+#define __cpu_to_le64(x) (unsigned long long)
OSSwapHostToLittleInt64((uint64_t)x)
+#define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x)
+#define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x)
+
#else /*
*/
-
-#include <architecture/byte_order.h>
-
-#define __swab64(x) NXSwapLongLong(x)
-#define __swab32(x) NXSwapLong(x)
-#define __swab16(x) NXSwapShort(x)
-#define __be64_to_cpu(x) NXSwapBigLongLongToHost(x)
-#define __be32_to_cpu(x) NXSwapBigLongToHost(x)
-#define __be16_to_cpu(x) NXSwapBigShortToHost(x)
-#define __le64_to_cpu(x) NXSwapLittleLongLongToHost(x)
-#define __le32_to_cpu(x) NXSwapLittleLongToHost(x)
-#define __le16_to_cpu(x) NXSwapLittleShortToHost(x)
-#define __cpu_to_be64(x) NXSwapHostLongLongToBig(x)
-#define __cpu_to_be32(x) NXSwapHostLongToBig(x)
-#define __cpu_to_be16(x) NXSwapHostShortToBig(x)
-#define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x)
-#define __cpu_to_le32(x) NXSwapHostLongToLittle(x)
-#define __cpu_to_le16(x) NXSwapHostShortToLittle(x)
-
+
+#include <architecture/byte_order.h>
+
+#define __swab64(x) NXSwapLongLong(x)
+#define __swab32(x) NXSwapLong(x)
+#define __swab16(x) NXSwapShort(x)
+#define __be64_to_cpu(x) NXSwapBigLongLongToHost(x)
+#define __be32_to_cpu(x) NXSwapBigLongToHost(x)
+#define __be16_to_cpu(x) NXSwapBigShortToHost(x)
+#define __le64_to_cpu(x) NXSwapLittleLongLongToHost(x)
+#define __le32_to_cpu(x) NXSwapLittleLongToHost(x)
+#define __le16_to_cpu(x) NXSwapLittleShortToHost(x)
+#define __cpu_to_be64(x) NXSwapHostLongLongToBig(x)
+#define __cpu_to_be32(x) NXSwapHostLongToBig(x)
+#define __cpu_to_be16(x) NXSwapHostShortToBig(x)
+#define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x)
+#define __cpu_to_le32(x) NXSwapHostLongToLittle(x)
+#define __cpu_to_le16(x) NXSwapHostShortToLittle(x)
+
#endif /*
*/
-
-#define __LITTLE_ENDIAN 1234
-#define __BIG_ENDIAN 4321
-#define __PDP_ENDIAN 3412
-#define __BYTE_ORDER __BIG_ENDIAN
-
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED
-
+
+#define __LITTLE_ENDIAN 1234
+#define __BIG_ENDIAN 4321
+#define __PDP_ENDIAN 3412
+#define __BYTE_ORDER __BIG_ENDIAN
+
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+
#endif /*
*/
-
- /*
- * Solaris
- * -------
- */
-#if defined(__sparc__) && defined(__sun__)
-#include <sys/byteorder.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#define __be64_to_cpu(x) (x)
-#define __be32_to_cpu(x) (x)
-#define __be16_to_cpu(x) (x)
-#define __cpu_to_be64(x) (x)
-#define __cpu_to_be32(x) (x)
-#define __cpu_to_be16(x) (x)
-#define __le64_to_cpu(x) ___my_swab64(x)
-#define __le32_to_cpu(x) ___my_swab32(x)
-#define __le16_to_cpu(x) ___my_swab16(x)
-#define __cpu_to_le64(x) ___my_swab64(x)
-#define __cpu_to_le32(x) ___my_swab32(x)
-#define __cpu_to_le16(x) ___my_swab16(x)
+
+ /*
+ * Solaris
+ * -------
+ */
+#if defined(__sparc__) && defined(__sun__)
+#include <sys/byteorder.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#define __be64_to_cpu(x) (x)
+#define __be32_to_cpu(x) (x)
+#define __be16_to_cpu(x) (x)
+#define __cpu_to_be64(x) (x)
+#define __cpu_to_be32(x) (x)
+#define __cpu_to_be16(x) (x)
+#define __le64_to_cpu(x) ___my_swab64(x)
+#define __le32_to_cpu(x) ___my_swab32(x)
+#define __le16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_le64(x) ___my_swab64(x)
+#define __cpu_to_le32(x) ___my_swab32(x)
+#define __cpu_to_le16(x) ___my_swab16(x)
typedef uint64_t u_int64_t;
@@ -263,249 +263,249 @@
typedef uint8_t u_int8_t;
-
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED
-
+
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+
#endif /*
*/
-
- /*
- * Custom stuff
- */
-#if defined(__MACH__) && !defined(__APPLE_CC__)
-#include <libkern/OSByteOrder.h>
-#define __cpu_to_be64(x) = OSSwapHostToBigInt64(x)
-#define __cpu_to_be32(x) = OSSwapHostToBigInt32(x)
-
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED
-
+
+ /*
+ * Custom stuff
+ */
+#if defined(__MACH__) && !defined(__APPLE_CC__)
+#include <libkern/OSByteOrder.h>
+#define __cpu_to_be64(x) = OSSwapHostToBigInt64(x)
+#define __cpu_to_be32(x) = OSSwapHostToBigInt32(x)
+
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+
#endif /*
*/
-
- // FreeBSD
-#ifdef __FreeBSD__
-#include <machine/endian.h>
+
+ // FreeBSD
+#ifdef __FreeBSD__
+#include <machine/endian.h>
#endif /*
*/
-
- // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...?
+
+ // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...?
-
- // XXX: Mac: Check
http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h
- //
http://developer.apple.com/DOCUMENTATION/CoreFoundation/Reference/CFByteOrderUtils/Reference/reference.html
- // Write to apple to ask what should be used.
-
-#if defined(LITTLE_ENDIAN)
-#define AIRCRACK_NG_LITTLE_ENDIAN LITTLE_ENDIAN
-#elif defined(__LITTLE_ENDIAN)
-#define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN
-#elif defined(_LITTLE_ENDIAN)
-#define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN
+
+ // XXX: Mac: Check
http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h
+ //
http://developer.apple.com/DOCUMENTATION/CoreFoundation/Reference/CFByteOrderUtils/Reference/reference.html
+ // Write to apple to ask what should be used.
+
+#if defined(LITTLE_ENDIAN)
+#define AIRCRACK_NG_LITTLE_ENDIAN LITTLE_ENDIAN
+#elif defined(__LITTLE_ENDIAN)
+#define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN
+#elif defined(_LITTLE_ENDIAN)
+#define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN
#endif /*
*/
-
-#if defined(BIG_ENDIAN)
-#define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN
-#elif defined(__BIG_ENDIAN)
-#define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN
-#elif defined(_BIG_ENDIAN)
-#define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN
+
+#if defined(BIG_ENDIAN)
+#define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN
+#elif defined(__BIG_ENDIAN)
+#define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN
+#elif defined(_BIG_ENDIAN)
+#define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN
#endif /*
*/
-
-#if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN)
-#error Impossible to determine endianness (Little or Big endian), please
contact the author.
+
+#if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN)
+#error Impossible to determine endianness (Little or Big endian), please
contact the author.
#endif /*
*/
-
-#if defined(BYTE_ORDER)
-#if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
-#elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
+
+#if defined(BYTE_ORDER)
+#if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
+#elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
#endif /*
*/
-#elif defined(__BYTE_ORDER)
-#if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
-#elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
+#elif defined(__BYTE_ORDER)
+#if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
+#elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
#endif /*
*/
-#elif defined(_BYTE_ORDER)
-#if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
-#elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
+#elif defined(_BYTE_ORDER)
+#if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
+#elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
#endif /*
*/
#endif /*
*/
-
-#ifndef AIRCRACK_NG_BYTE_ORDER
-#error Impossible to determine endianness (Little or Big endian), please
contact the author.
+
+#ifndef AIRCRACK_NG_BYTE_ORDER
+#error Impossible to determine endianness (Little or Big endian), please
contact the author.
#endif /*
*/
-
-#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
-
-#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
-#define __be64_to_cpu(x) ___my_swab64(x)
-#define __be32_to_cpu(x) ___my_swab32(x)
-#define __be16_to_cpu(x) ___my_swab16(x)
-#define __cpu_to_be64(x) ___my_swab64(x)
-#define __cpu_to_be32(x) ___my_swab32(x)
-#define __cpu_to_be16(x) ___my_swab16(x)
-#define __le64_to_cpu(x) (x)
-#define __le32_to_cpu(x) (x)
-#define __le16_to_cpu(x) (x)
-#define __cpu_to_le64(x) (x)
-#define __cpu_to_le32(x) (x)
-#define __cpu_to_le16(x) (x)
+
+#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
+
+#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
+#define __be64_to_cpu(x) ___my_swab64(x)
+#define __be32_to_cpu(x) ___my_swab32(x)
+#define __be16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_be64(x) ___my_swab64(x)
+#define __cpu_to_be32(x) ___my_swab32(x)
+#define __cpu_to_be16(x) ___my_swab16(x)
+#define __le64_to_cpu(x) (x)
+#define __le32_to_cpu(x) (x)
+#define __le16_to_cpu(x) (x)
+#define __cpu_to_le64(x) (x)
+#define __cpu_to_le32(x) (x)
+#define __cpu_to_le16(x) (x)
#endif /*
*/
-
-#ifndef htobe16
-#define htobe16 ___my_swab16
+
+#ifndef htobe16
+#define htobe16 ___my_swab16
#endif /*
*/
-#ifndef htobe32
-#define htobe32 ___my_swab32
+#ifndef htobe32
+#define htobe32 ___my_swab32
#endif /*
*/
-#ifndef betoh16
-#define betoh16 ___my_swab16
+#ifndef betoh16
+#define betoh16 ___my_swab16
#endif /*
*/
-#ifndef betoh32
-#define betoh32 ___my_swab32
+#ifndef betoh32
+#define betoh32 ___my_swab32
#endif /*
*/
-
-#ifndef htole16
-#define htole16(x) (x)
+
+#ifndef htole16
+#define htole16(x) (x)
#endif /*
*/
-#ifndef htole32
-#define htole32(x) (x)
+#ifndef htole32
+#define htole32(x) (x)
#endif /*
*/
-#ifndef letoh16
-#define letoh16(x) (x)
+#ifndef letoh16
+#define letoh16(x) (x)
#endif /*
*/
-#ifndef letoh32
-#define letoh32(x) (x)
+#ifndef letoh32
+#define letoh32(x) (x)
#endif /*
*/
-
+
#endif /*
*/
-
-#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
-
-#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
-#define __be64_to_cpu(x) (x)
-#define __be32_to_cpu(x) (x)
-#define __be16_to_cpu(x) (x)
-#define __cpu_to_be64(x) (x)
-#define __cpu_to_be32(x) (x)
-#define __cpu_to_be16(x) (x)
-#define __le64_to_cpu(x) ___my_swab64(x)
-#define __le32_to_cpu(x) ___my_swab32(x)
-#define __le16_to_cpu(x) ___my_swab16(x)
-#define __cpu_to_le64(x) ___my_swab64(x)
-#define __cpu_to_le32(x) ___my_swab32(x)
-#define __cpu_to_le16(x) ___my_swab16(x)
+
+#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
+
+#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
+#define __be64_to_cpu(x) (x)
+#define __be32_to_cpu(x) (x)
+#define __be16_to_cpu(x) (x)
+#define __cpu_to_be64(x) (x)
+#define __cpu_to_be32(x) (x)
+#define __cpu_to_be16(x) (x)
+#define __le64_to_cpu(x) ___my_swab64(x)
+#define __le32_to_cpu(x) ___my_swab32(x)
+#define __le16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_le64(x) ___my_swab64(x)
+#define __cpu_to_le32(x) ___my_swab32(x)
+#define __cpu_to_le16(x) ___my_swab16(x)
#endif /*
*/
-
-#ifndef htobe16
-#define htobe16(x) (x)
+
+#ifndef htobe16
+#define htobe16(x) (x)
#endif /*
*/
-#ifndef htobe32
-#define htobe32(x) (x)
+#ifndef htobe32
+#define htobe32(x) (x)
#endif /*
*/
-#ifndef betoh16
-#define betoh16(x) (x)
+#ifndef betoh16
+#define betoh16(x) (x)
#endif /*
*/
-#ifndef betoh32
-#define betoh32(x) (x)
+#ifndef betoh32
+#define betoh32(x) (x)
#endif /*
*/
-
-#ifndef htole16
-#define htole16 ___my_swab16
+
+#ifndef htole16
+#define htole16 ___my_swab16
#endif /*
*/
-#ifndef htole32
-#define htole32 ___my_swab32
+#ifndef htole32
+#define htole32 ___my_swab32
#endif /*
*/
-#ifndef letoh16
-#define letoh16 ___my_swab16
+#ifndef letoh16
+#define letoh16 ___my_swab16
#endif /*
*/
-#ifndef letoh32
-#define letoh32 ___my_swab32
+#ifndef letoh32
+#define letoh32 ___my_swab32
#endif /*
*/
-
+
#endif /*
*/
-
- // Common defines
-#define cpu_to_le64 __cpu_to_le64
-#define le64_to_cpu __le64_to_cpu
-#define cpu_to_le32 __cpu_to_le32
-#define le32_to_cpu __le32_to_cpu
-#define cpu_to_le16 __cpu_to_le16
-#define le16_to_cpu __le16_to_cpu
-#define cpu_to_be64 __cpu_to_be64
-#define be64_to_cpu __be64_to_cpu
-#define cpu_to_be32 __cpu_to_be32
-#define be32_to_cpu __be32_to_cpu
-#define cpu_to_be16 __cpu_to_be16
-#define be16_to_cpu __be16_to_cpu
-
-#ifndef le16toh
-#define le16toh le16_to_cpu
+
+ // Common defines
+#define cpu_to_le64 __cpu_to_le64
+#define le64_to_cpu __le64_to_cpu
+#define cpu_to_le32 __cpu_to_le32
+#define le32_to_cpu __le32_to_cpu
+#define cpu_to_le16 __cpu_to_le16
+#define le16_to_cpu __le16_to_cpu
+#define cpu_to_be64 __cpu_to_be64
+#define be64_to_cpu __be64_to_cpu
+#define cpu_to_be32 __cpu_to_be32
+#define be32_to_cpu __be32_to_cpu
+#define cpu_to_be16 __cpu_to_be16
+#define be16_to_cpu __be16_to_cpu
+
+#ifndef le16toh
+#define le16toh le16_to_cpu
#endif /*
*/
-#ifndef be16toh
-#define be16toh be16_to_cpu
+#ifndef be16toh
+#define be16toh be16_to_cpu
#endif /*
*/
-#ifndef le32toh
-#define le32toh le32_to_cpu
+#ifndef le32toh
+#define le32toh le32_to_cpu
#endif /*
*/
-#ifndef be32toh
-#define be32toh be32_to_cpu
+#ifndef be32toh
+#define be32toh be32_to_cpu
#endif /*
*/
-
-#ifndef htons
-#define htons be16_to_cpu
+
+#ifndef htons
+#define htons be16_to_cpu
#endif /*
*/
-#ifndef htonl
-#define htonl cpu_to_be16
+#ifndef htonl
+#define htonl cpu_to_be16
#endif /*
*/
-#ifndef ntohs
-#define ntohs cpu_to_be16
+#ifndef ntohs
+#define ntohs cpu_to_be16
#endif /*
*/
-#ifndef ntohl
-#define ntohl cpu_to_be32
+#ifndef ntohl
+#define ntohl cpu_to_be32
#endif /*
*/
-
+
#endif /*
*/
Modified: gnunet/src/transport/wlan/helper_common.h
===================================================================
--- gnunet/src/transport/wlan/helper_common.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/wlan/helper_common.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -8,8 +8,11 @@
#ifndef HELPER_COMMON_H_
#define HELPER_COMMON_H_
-int getFrequencyFromChannel (int channel);
-int getChannelFromFrequency (int frequency);
-int send_mac_to_plugin (char *buffer, uint8_t * mac);
+int
+getFrequencyFromChannel (int channel);
+int
+getChannelFromFrequency (int frequency);
+int
+send_mac_to_plugin (char *buffer, uint8_t * mac);
#endif /* HELPER_COMMON_H_ */
Modified: gnunet/src/transport/wlan/loopback_helper.h
===================================================================
--- gnunet/src/transport/wlan/loopback_helper.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/wlan/loopback_helper.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -14,6 +14,7 @@
//static void file_in_send(void *cls, void *client, const struct
GNUNET_MessageHeader *hdr);
-int testmode (int argc, char *argv[]);
+int
+testmode (int argc, char *argv[]);
#endif /* LOOPBACK_HELPER_H_ */
Modified: gnunet/src/transport/wlan/radiotap-parser.c
===================================================================
--- gnunet/src/transport/wlan/radiotap-parser.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/wlan/radiotap-parser.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -191,13 +191,13 @@
*/
if ((((void *) iterator->arg) -
- ((void *) iterator->
- rtheader)) & ((rt_sizes[iterator->arg_index] >> 4) - 1))
+ ((void *) iterator->rtheader)) & ((rt_sizes[iterator->arg_index] >> 4)
+ - 1))
iterator->arg_index +=
(rt_sizes[iterator->arg_index] >> 4) -
((((void *) iterator->arg) -
- ((void *) iterator->
- rtheader)) & ((rt_sizes[iterator->arg_index] >> 4) - 1));
+ ((void *) iterator->rtheader)) & ((rt_sizes[iterator->arg_index] >>
+ 4) - 1));
/*
* this is what we will return to user, but we need to
Modified: gnunet/src/transport/wlan/radiotap-parser.h
===================================================================
--- gnunet/src/transport/wlan/radiotap-parser.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/transport/wlan/radiotap-parser.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -70,10 +70,10 @@
u32 bitmap_shifter;
};
-int ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator
- *iterator,
- struct ieee80211_radiotap_header
- *radiotap_header, int max_length);
+int
+ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator *iterator,
+ struct ieee80211_radiotap_header
+ *radiotap_header, int max_length);
-int ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator
- *iterator);
+int
+ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator
*iterator);
Modified: gnunet/src/util/client.c
===================================================================
--- gnunet/src/util/client.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/client.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -452,8 +452,8 @@
{
if ((conn->received_pos >= sizeof (struct GNUNET_MessageHeader)) &&
(conn->received_pos >=
- ntohs (((const struct GNUNET_MessageHeader *) conn->
- received_buf)->size)))
+ ntohs (((const struct GNUNET_MessageHeader *) conn->received_buf)->
+ size)))
conn->msg_complete = GNUNET_YES;
}
@@ -679,8 +679,8 @@
msg->type = htons (GNUNET_MESSAGE_TYPE_TEST);
msg->size = htons (sizeof (struct GNUNET_MessageHeader));
GNUNET_CLIENT_receive (conn, &confirm_handler, conn,
- GNUNET_TIME_absolute_get_remaining (conn->
- test_deadline));
+ GNUNET_TIME_absolute_get_remaining
+ (conn->test_deadline));
return sizeof (struct GNUNET_MessageHeader);
}
@@ -902,7 +902,8 @@
* @param buf where to write them
* @return number of bytes written to buf
*/
-static size_t client_notify (void *cls, size_t size, void *buf);
+static size_t
+client_notify (void *cls, size_t size, void *buf);
/**
Modified: gnunet/src/util/connection.c
===================================================================
--- gnunet/src/util/connection.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/connection.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -506,8 +506,8 @@
* @param cls our connection handle
* @param tc task context describing why we are here
*/
-static void receive_again (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+receive_again (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -619,8 +619,8 @@
* @param cls our connection handle
* @param tc task context describing why we are here
*/
-static void transmit_ready (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
@@ -867,13 +867,13 @@
if (h->nth.notify_ready != NULL)
delay =
GNUNET_TIME_relative_min (delay,
- GNUNET_TIME_absolute_get_remaining (h->nth.
-
transmit_timeout));
+ GNUNET_TIME_absolute_get_remaining (h->
+
nth.transmit_timeout));
if (h->receiver != NULL)
delay =
GNUNET_TIME_relative_min (delay,
- GNUNET_TIME_absolute_get_remaining (h->
-
receive_timeout));
+ GNUNET_TIME_absolute_get_remaining
+ (h->receive_timeout));
ap->task =
GNUNET_SCHEDULER_add_write_net (delay, ap->sock,
&connect_probe_continuation, ap);
@@ -1152,9 +1152,8 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Receive from `%s' encounters error: time out by %llums...
(%p)\n",
GNUNET_a2s (sh->addr, sh->addrlen),
- GNUNET_TIME_absolute_get_duration (sh->
-
receive_timeout).rel_value,
- sh);
+ GNUNET_TIME_absolute_get_duration (sh->receive_timeout).
+ rel_value, sh);
#endif
signal_timeout (sh);
return;
Modified: gnunet/src/util/container_heap.c
===================================================================
--- gnunet/src/util/container_heap.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/container_heap.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -292,11 +292,8 @@
GNUNET_assert (node->parent == NULL);
while ((heap->order == GNUNET_CONTAINER_HEAP_ORDER_MAX) ? (pos->cost >=
- node->
- cost) : (pos->
- cost <=
- node->
- cost))
+ node->cost)
+ : (pos->cost <= node->cost))
{
/* node is descendent of pos */
pos->tree_size += (1 + node->tree_size);
Modified: gnunet/src/util/container_meta_data.c
===================================================================
--- gnunet/src/util/container_meta_data.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/util/container_meta_data.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -1165,9 +1165,9 @@
else
mime_type = &mdata[left];
GNUNET_CONTAINER_meta_data_insert (md, plugin_name,
- (enum EXTRACTOR_MetaType) ntohl (ent.
- type),
- format, mime_type, meta_data, dlen);
+ (enum EXTRACTOR_MetaType)
+ ntohl (ent.type), format, mime_type,
+ meta_data, dlen);
}
GNUNET_free_non_null (data);
return md;
Modified: gnunet/src/util/crypto_rsa.c
===================================================================
--- gnunet/src/util/crypto_rsa.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/crypto_rsa.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -218,9 +218,9 @@
size = GNUNET_CRYPTO_RSA_KEY_LENGTH - GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH;
GNUNET_assert (0 ==
gcry_mpi_print (GCRYMPI_FMT_USG,
- &pub->
- key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH],
- size, &size, skey[1]));
+ &pub->key
+ [GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH],
size,
+ &size, skey[1]));
adjust (&pub->key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], size,
GNUNET_CRYPTO_RSA_KEY_LENGTH -
GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH);
Modified: gnunet/src/util/disk.h
===================================================================
--- gnunet/src/util/disk.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/disk.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -37,7 +37,8 @@
* @param dst_len length of dst
* @return GNUNET_OK on success, GNUNET_SYSERR otherwise
*/
-int GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh,
- void *dst, size_t dst_len);
+int
+GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh,
+ void *dst, size_t dst_len);
#endif /* GNUNET_DISK_H_ */
Modified: gnunet/src/util/getopt.c
===================================================================
--- gnunet/src/util/getopt.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/getopt.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -194,7 +194,8 @@
/* Avoid depending on library functions or files
whose names are inconsistent. */
-char *getenv ();
+char *
+getenv ();
static char *
my_index (str, chr)
@@ -218,7 +219,8 @@
#if !defined (__STDC__) || !__STDC__
/* gcc with -traditional declares the built-in strlen to return int,
and has done so at least since version 2.4.5. -- rms. */
-extern int strlen (const char *);
+extern int
+strlen (const char *);
#endif /* not __STDC__ */
#endif /* __GNUC__ */
@@ -283,7 +285,8 @@
the new indices of the non-options in ARGV after they are moved. */
#if defined (__STDC__) && __STDC__
-static void exchange (char **);
+static void
+exchange (char **);
#endif
static void
@@ -370,7 +373,8 @@
/* Initialize the internal data when the first call is made. */
#if defined (__STDC__) && __STDC__
-static const char *_getopt_initialize (int, char *const *, const char *);
+static const char *
+_getopt_initialize (int, char *const *, const char *);
#endif
static const char *
_getopt_initialize (argc, argv, optstring)
Modified: gnunet/src/util/os_network.c
===================================================================
--- gnunet/src/util/os_network.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/os_network.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -135,8 +135,9 @@
pTable->table[dwIfIdx].dwPhysAddrLen);
snprintf (szEntry, 1000, "%s (%s - %I64u)",
- pszIfName ? pszIfName : (char *) pTable->table[dwIfIdx].
- bDescr, inet_ntop (AF_INET, &dwIP, dst, INET_ADDRSTRLEN),
+ pszIfName ? pszIfName : (char *) pTable->
+ table[dwIfIdx].bDescr, inet_ntop (AF_INET, &dwIP, dst,
+ INET_ADDRSTRLEN),
*((unsigned long long *) bPhysAddr));
szEntry[1000] = 0;
Modified: gnunet/src/util/os_priority.c
===================================================================
--- gnunet/src/util/os_priority.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/os_priority.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -63,10 +63,9 @@
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "`%s' invoked because of %d\n",
__FUNCTION__, tc->reason);
#endif
- if (tc->
- reason & (GNUNET_SCHEDULER_REASON_SHUTDOWN |
- GNUNET_SCHEDULER_REASON_TIMEOUT |
- GNUNET_SCHEDULER_REASON_PREREQ_DONE))
+ if (tc->reason &
+ (GNUNET_SCHEDULER_REASON_SHUTDOWN | GNUNET_SCHEDULER_REASON_TIMEOUT |
+ GNUNET_SCHEDULER_REASON_PREREQ_DONE))
{
GNUNET_DISK_npipe_close (control_pipe);
}
Modified: gnunet/src/util/peer.c
===================================================================
--- gnunet/src/util/peer.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/peer.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -181,8 +181,8 @@
{
GNUNET_break (GNUNET_OK ==
GNUNET_CONTAINER_multihashmap_remove (map,
- &table[id].id.
- hashPubKey,
+ &table[id].
+ id.hashPubKey,
(void *) (long) id));
table[id].pid = free_list_start;
free_list_start = id;
@@ -210,8 +210,8 @@
{
GNUNET_break (GNUNET_OK ==
GNUNET_CONTAINER_multihashmap_remove (map,
- &table[id].id.
- hashPubKey,
+ &table[id].
+ id.hashPubKey,
(void *) (long) id));
table[id].pid = free_list_start;
free_list_start = id;
Modified: gnunet/src/util/perf_crypto_hash.c
===================================================================
--- gnunet/src/util/perf_crypto_hash.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/perf_crypto_hash.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -58,12 +58,12 @@
start = GNUNET_TIME_absolute_get ();
perfHash ();
printf ("Hash perf took %llu ms\n",
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value);
GAUGER ("UTIL", "Cryptographic hashing",
1024 * 64 * 1024 / (1 +
- GNUNET_TIME_absolute_get_duration (start).
- rel_value), "kb/s");
+ GNUNET_TIME_absolute_get_duration
+ (start).rel_value), "kb/s");
return 0;
}
Modified: gnunet/src/util/resolver_api.c
===================================================================
--- gnunet/src/util/resolver_api.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/resolver_api.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -318,7 +318,8 @@
/**
* Adjust exponential back-off and reconnect to the service.
*/
-static void reconnect ();
+static void
+reconnect ();
/**
@@ -326,7 +327,8 @@
*
* @param h handle to the resolver
*/
-static void process_requests ();
+static void
+process_requests ();
/**
Modified: gnunet/src/util/scheduler.c
===================================================================
--- gnunet/src/util/scheduler.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/scheduler.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -656,9 +656,9 @@
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Task %llu took %llums to be scheduled\n", pos->id,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (pos->
-
start_time).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration
+ (pos->start_time).rel_value);
}
#endif
tc.reason = pos->reason;
Modified: gnunet/src/util/server.c
===================================================================
--- gnunet/src/util/server.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/server.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -611,9 +611,9 @@
_
("Processing code for message of type %u did not call
GNUNET_SERVER_receive_done after %llums\n"),
(unsigned int) client->warn_type,
- (unsigned long long) GNUNET_TIME_absolute_get_duration
(client->
-
warn_start).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration
+ (client->warn_start).rel_value);
}
@@ -730,9 +730,9 @@
* @param addrlen length of addr
* @param errCode code indicating errors receiving, 0 for success
*/
-static void process_incoming (void *cls, const void *buf, size_t available,
- const struct sockaddr *addr, socklen_t addrlen,
- int errCode);
+static void
+process_incoming (void *cls, const void *buf, size_t available,
+ const struct sockaddr *addr, socklen_t addrlen, int errCode);
/**
Modified: gnunet/src/util/server_nc.c
===================================================================
--- gnunet/src/util/server_nc.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/server_nc.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -381,8 +381,8 @@
if (client->th == NULL)
client->th =
GNUNET_SERVER_notify_transmit_ready (client->client,
- ntohs (client->pending_head->msg->
- size),
+ ntohs (client->pending_head->
+ msg->size),
GNUNET_TIME_UNIT_FOREVER_REL,
&transmit_message, client);
}
Modified: gnunet/src/util/test_crypto_ksk.c
===================================================================
--- gnunet/src/util/test_crypto_ksk.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/test_crypto_ksk.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -168,8 +168,8 @@
}
}
printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", ITER,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value, ok);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value, ok);
if (ok == 0)
return GNUNET_OK;
else
@@ -218,8 +218,8 @@
}
}
printf ("%d RSA sign/verify operations %llums\n", ITER,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value);
return ok;
}
Modified: gnunet/src/util/test_crypto_rsa.c
===================================================================
--- gnunet/src/util/test_crypto_rsa.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/test_crypto_rsa.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -82,8 +82,8 @@
}
}
printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", ITER,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value, ok);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value, ok);
GNUNET_CRYPTO_rsa_key_free (hostkey);
if (ok == 0)
return GNUNET_OK;
@@ -121,8 +121,8 @@
}
}
printf ("%d RSA encrypt operations %llu ms (%d failures)\n", ITER,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value, ok);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value, ok);
GNUNET_CRYPTO_rsa_key_free (hostkey);
if (ok != 0)
return GNUNET_SYSERR;
@@ -178,8 +178,8 @@
}
}
printf ("%d RSA encrypt/decrypt SK operations %llums (%d failures)\n", ITER,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value, ok);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value, ok);
GNUNET_CRYPTO_rsa_key_free (hostkey);
if (ok != 0)
return GNUNET_SYSERR;
@@ -232,8 +232,8 @@
}
}
printf ("%d RSA sign/verify operations %llums\n", ITER,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value);
GNUNET_CRYPTO_rsa_key_free (hostkey);
return ok;
}
@@ -268,8 +268,8 @@
}
}
printf ("%d RSA sign operations %llu ms\n", ITER,
- (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
- rel_value);
+ (unsigned long long)
+ GNUNET_TIME_absolute_get_duration (start).rel_value);
GNUNET_CRYPTO_rsa_key_free (hostkey);
return ok;
}
Modified: gnunet/src/util/test_os_network.c
===================================================================
--- gnunet/src/util/test_os_network.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/test_os_network.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -45,9 +45,9 @@
inet_ntop (addr->sa_family,
(addr->sa_family ==
- AF_INET) ? (void *) &((struct sockaddr_in *) addr)->
- sin_addr : (void *) &((struct sockaddr_in6 *) addr)->sin6_addr,
- buf, sizeof (buf));
+ AF_INET) ? (void *) &((struct sockaddr_in *) addr)->sin_addr
+ : (void *) &((struct sockaddr_in6 *) addr)->sin6_addr, buf,
+ sizeof (buf));
if ((0 == strcmp ("::1", buf)) || (0 == strcmp ("127.0.0.1", buf)))
*ok = 0;
return GNUNET_OK;
Modified: gnunet/src/util/test_time.c
===================================================================
--- gnunet/src/util/test_time.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/util/test_time.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -108,8 +108,8 @@
GNUNET_assert (GNUNET_TIME_absolute_get_difference (future, now).rel_value ==
0);
- GNUNET_assert (GNUNET_TIME_absolute_get_difference (zero, forever).
- rel_value == forever.abs_value);
+ GNUNET_assert (GNUNET_TIME_absolute_get_difference (zero, forever).rel_value
+ == forever.abs_value);
past.abs_value = now.abs_value - 1000000;
rel = GNUNET_TIME_absolute_get_duration (future);
@@ -153,8 +153,7 @@
GNUNET_assert (forever.abs_value ==
GNUNET_TIME_absolute_subtract (forever,
- GNUNET_TIME_UNIT_MINUTES).
- abs_value);
+
GNUNET_TIME_UNIT_MINUTES).abs_value);
/*check absolute subtract */
now.abs_value = 50000;
rel.rel_value = 100000;
Modified: gnunet/src/vpn/gnunet-daemon-vpn-dns.h
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-dns.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/vpn/gnunet-daemon-vpn-dns.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -40,19 +40,22 @@
* Callback called by notify_transmit_ready; sends dns-queries or
rehijack-messages
* to the service-dns
*/
-size_t send_query (void *cls, size_t size, void *buf);
+size_t
+send_query (void *cls, size_t size, void *buf);
/**
* Connect to the service-dns
*/
-void connect_to_service_dns (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+connect_to_service_dns (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* This receives packets from the service-dns and schedules process_answer to
* handle it
*/
-void dns_answer_handler (void *cls, const struct GNUNET_MessageHeader *msg);
+void
+dns_answer_handler (void *cls, const struct GNUNET_MessageHeader *msg);
/**
* The connection to the service-dns
Modified: gnunet/src/vpn/gnunet-daemon-vpn-helper.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-helper.c 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/vpn/gnunet-daemon-vpn-helper.c 2011-08-16 16:03:20 UTC (rev
16587)
@@ -497,9 +497,9 @@
}
else if (0x06 == pkt->ip_hdr.proto &&
- (me->desc.
- service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP)) &&
- (port_in_ports (me->desc.ports, pkt_tcp->tcp_hdr.dpt)))
+ (me->
+ desc.service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP))
+ && (port_in_ports (me->desc.ports, pkt_tcp->tcp_hdr.dpt)))
{
hdr->type = ntohs (GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP);
Modified: gnunet/src/vpn/gnunet-daemon-vpn-helper.h
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-helper.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/vpn/gnunet-daemon-vpn-helper.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -38,35 +38,39 @@
/**
* Start the helper-process
*/
-void start_helper_and_schedule (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+start_helper_and_schedule (void *cls,
+ const struct GNUNET_SCHEDULER_TaskContext *tc);
/**
* Restart the helper-process
*/
-void restart_helper (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tskctx);
+void
+restart_helper (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tskctx);
/**
* Read from the helper-process
*/
-void helper_read (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tsdkctx);
+void
+helper_read (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tsdkctx);
/**
* Send an dns-answer-packet to the helper
*/
-void helper_write (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tsdkctx);
+void
+helper_write (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tsdkctx);
/**
* Receive packets from the helper-process
*/
-void message_token (void *cls, void *client,
- const struct GNUNET_MessageHeader *message);
+void
+message_token (void *cls, void *client,
+ const struct GNUNET_MessageHeader *message);
-void write_to_helper (void *buf, size_t len);
+void
+write_to_helper (void *buf, size_t len);
-void schedule_helper_write (struct GNUNET_TIME_Relative, void *cls);
+void
+schedule_helper_write (struct GNUNET_TIME_Relative, void *cls);
#endif /* end of include guard: GNUNET-DAEMON-VPN-HELPER_H */
Modified: gnunet/src/vpn/gnunet-daemon-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/vpn/gnunet-daemon-vpn.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -931,8 +931,8 @@
GNUNET_assert (me != NULL);
if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK)
{
- GNUNET_assert (me->
- desc.service_type & htonl (GNUNET_DNS_SERVICE_TYPE_UDP));
+ GNUNET_assert (me->desc.
+ service_type & htonl (GNUNET_DNS_SERVICE_TYPE_UDP));
if (!port_in_ports (me->desc.ports, pkt6->udp_hdr.spt) &&
!testBit (me->additional_ports, ntohs (pkt6->udp_hdr.spt)))
{
@@ -1109,8 +1109,8 @@
GNUNET_assert (me != NULL);
if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK)
- GNUNET_assert (me->
- desc.service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP));
+ GNUNET_assert (me->desc.
+ service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP));
pkt6->tcp_hdr.crc = 0;
uint32_t sum = 0;
Modified: gnunet/src/vpn/gnunet-daemon-vpn.h
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/vpn/gnunet-daemon-vpn.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -35,23 +35,28 @@
* At the moment this means "inventing" and IPv6-Address for .gnunet-services
and
* doing nothing for "real" services.
*/
-void process_answer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+process_answer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
-void send_icmp6_response (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
-void send_icmp4_response (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+send_icmp6_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+send_icmp4_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
-size_t send_udp_service (void *cls, size_t size,
- void *buf);
+size_t
+send_udp_service (void *cls, size_t size, void *buf);
-GNUNET_HashCode *address6_mapping_exists (unsigned char addr[]);
-GNUNET_HashCode *address4_mapping_exists (uint32_t addr);
+GNUNET_HashCode *
+address6_mapping_exists (unsigned char addr[]);
+GNUNET_HashCode *
+address4_mapping_exists (uint32_t addr);
-unsigned int port_in_ports (uint64_t ports, uint16_t port);
+unsigned int
+port_in_ports (uint64_t ports, uint16_t port);
-void send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi);
+void
+send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi);
/**
* The configuration to use
@@ -94,7 +99,8 @@
* @param bitArray memory area to set the bit in
* @param bitIdx which bit to set
*/
-void setBit (char *bitArray, unsigned int bitIdx);
+void
+setBit (char *bitArray, unsigned int bitIdx);
/**
* Clears a bit from bitArray.
@@ -102,7 +108,8 @@
* @param bitArray memory area to set the bit in
* @param bitIdx which bit to unset
*/
-void clearBit (char *bitArray, unsigned int bitIdx);
+void
+clearBit (char *bitArray, unsigned int bitIdx);
/**
* Checks if a bit is active in the bitArray
@@ -111,7 +118,8 @@
* @param bitIdx which bit to test
* @return GNUNET_YES if the bit is set, GNUNET_NO if not.
*/
-int testBit (char *bitArray, unsigned int bitIdx);
+int
+testBit (char *bitArray, unsigned int bitIdx);
struct remote_addr
{
Modified: gnunet/src/vpn/gnunet-dns-parser.h
===================================================================
--- gnunet/src/vpn/gnunet-dns-parser.h 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/vpn/gnunet-dns-parser.h 2011-08-16 16:03:20 UTC (rev 16587)
@@ -4,8 +4,10 @@
#include "platform.h"
#include "gnunet-vpn-packet.h"
-struct dns_pkt_parsed *parse_dns_packet (struct dns_pkt *pkt);
+struct dns_pkt_parsed *
+parse_dns_packet (struct dns_pkt *pkt);
-void free_parsed_dns_packet (struct dns_pkt_parsed *ppkt);
+void
+free_parsed_dns_packet (struct dns_pkt_parsed *ppkt);
#endif
Modified: gnunet/src/vpn/gnunet-helper-vpn-api.h
===================================================================
--- gnunet/src/vpn/gnunet-helper-vpn-api.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/vpn/gnunet-helper-vpn-api.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -95,20 +95,16 @@
*
* @return A pointer to the new Handle, NULL on error
*/
-struct GNUNET_VPN_HELPER_Handle *start_helper (const char *ifname,
- const char *ipv6addr,
- const char *ipv6prefix,
- const char *ipv4addr,
- const char *ipv4mask,
- const char *process_name,
- GNUNET_SCHEDULER_Task
- restart_task,
-
GNUNET_SERVER_MessageTokenizerCallback
- cb, void *cb_cls);
+struct GNUNET_VPN_HELPER_Handle *
+start_helper (const char *ifname, const char *ipv6addr, const char *ipv6prefix,
+ const char *ipv4addr, const char *ipv4mask,
+ const char *process_name, GNUNET_SCHEDULER_Task restart_task,
+ GNUNET_SERVER_MessageTokenizerCallback cb, void *cb_cls);
/**
* @brief Kills the helper, closes the pipe and free()s the handle
*/
-void cleanup_helper (struct GNUNET_VPN_HELPER_Handle *);
+void
+cleanup_helper (struct GNUNET_VPN_HELPER_Handle *);
#endif /* end of include guard: GNUNET_HELPER_VPN_API_H */
Modified: gnunet/src/vpn/gnunet-service-dns.c
===================================================================
--- gnunet/src/vpn/gnunet-service-dns.c 2011-08-16 15:53:40 UTC (rev 16586)
+++ gnunet/src/vpn/gnunet-service-dns.c 2011-08-16 16:03:20 UTC (rev 16587)
@@ -927,8 +927,8 @@
GNUNET_SERVER_receive_done (client, GNUNET_OK);
}
-static void read_response (void *cls,
- const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+read_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
static int
open_port ()
Modified: gnunet/src/vpn/gnunet-vpn-checksum.h
===================================================================
--- gnunet/src/vpn/gnunet-vpn-checksum.h 2011-08-16 15:53:40 UTC (rev
16586)
+++ gnunet/src/vpn/gnunet-vpn-checksum.h 2011-08-16 16:03:20 UTC (rev
16587)
@@ -4,13 +4,16 @@
#include <platform.h>
-uint32_t calculate_checksum_update (uint32_t sum, uint16_t * hdr, short len);
+uint32_t
+calculate_checksum_update (uint32_t sum, uint16_t * hdr, short len);
-uint16_t calculate_checksum_end (uint32_t sum);
+uint16_t
+calculate_checksum_end (uint32_t sum);
/**
* Calculate the checksum of an IPv4-Header
*/
-uint16_t calculate_ip_checksum (uint16_t * hdr, short len);
+uint16_t
+calculate_ip_checksum (uint16_t * hdr, short len);
#endif /* end of include guard: GNUNET-VPN-CHECKSUM_H */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r16587 - in gnunet: . src/arm src/chat src/core src/datacache src/datastore src/dht src/dv src/fs src/hostlist src/include src/mesh src/nat src/nse src/peerinfo src/statistics src/testing src/topology src/transport src/transport/wlan src/util src/vpn,
gnunet <=