From 6fd3e715cae09fa6e657c96f1c6f9711ee51f42f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 15 Aug 2011 21:51:21 +0000 Subject: indentation --- .indent.pro | 4 +- src/arm/gnunet-service-arm.h | 4 +- src/dht/dhtlog.h | 36 +-- src/fs/fs.h | 65 ++---- src/fs/fs_test_lib.h | 61 +++-- src/fs/fs_tree.h | 8 +- src/fs/gnunet-service-fs_cp.h | 69 +++--- src/fs/gnunet-service-fs_indexing.h | 45 ++-- src/fs/gnunet-service-fs_lc.h | 9 +- src/fs/gnunet-service-fs_pe.h | 4 +- src/fs/gnunet-service-fs_pr.h | 38 ++- src/hostlist/hostlist-client.h | 11 +- src/hostlist/hostlist-server.h | 13 +- src/include/gnunet_arm_service.h | 18 +- src/include/gnunet_ats_service.h | 49 ++-- src/include/gnunet_bandwidth_lib.h | 80 +++---- src/include/gnunet_bio_lib.h | 24 +- src/include/gnunet_block_lib.h | 39 ++-- src/include/gnunet_block_plugin.h | 40 ++-- src/include/gnunet_chat_service.h | 16 +- src/include/gnunet_client_lib.h | 51 ++-- src/include/gnunet_common.h | 32 ++- src/include/gnunet_configuration_lib.h | 52 ++--- src/include/gnunet_connection_lib.h | 80 ++++--- src/include/gnunet_container_lib.h | 187 +++++---------- src/include/gnunet_core_service.h | 85 ++++--- src/include/gnunet_crypto_lib.h | 92 ++++---- src/include/gnunet_datacache_lib.h | 24 +- src/include/gnunet_datacache_plugin.h | 10 +- src/include/gnunet_datastore_plugin.h | 37 ++- src/include/gnunet_datastore_service.h | 3 +- src/include/gnunet_dht_service.h | 50 ++-- src/include/gnunet_disk_lib.h | 39 ++-- src/include/gnunet_dv_service.h | 9 +- src/include/gnunet_fragmentation_lib.h | 17 +- src/include/gnunet_fs_service.h | 256 +++++++++------------ src/include/gnunet_getopt_lib.h | 27 +-- src/include/gnunet_hello_lib.h | 72 +++--- src/include/gnunet_load_lib.h | 5 +- src/include/gnunet_mesh_service.h | 37 +-- src/include/gnunet_mesh_service_new.h | 51 ++-- src/include/gnunet_nat_lib.h | 17 +- src/include/gnunet_network_lib.h | 44 ++-- src/include/gnunet_os_lib.h | 11 +- src/include/gnunet_peerinfo_service.h | 19 +- src/include/gnunet_program_lib.h | 7 +- src/include/gnunet_pseudonym_lib.h | 13 +- src/include/gnunet_scheduler_lib.h | 127 ++++++---- src/include/gnunet_server_lib.h | 127 +++++----- src/include/gnunet_service_lib.h | 19 +- src/include/gnunet_statistics_service.h | 35 ++- src/include/gnunet_strings_lib.h | 11 +- src/include/gnunet_testing_lib.h | 204 ++++++++-------- src/include/gnunet_time_lib.h | 21 +- src/include/gnunet_transport_plugin.h | 74 +++--- src/include/gnunet_transport_service.h | 109 ++++----- src/include/gnunet_upnp_service.h | 7 +- src/include/plibc.h | 13 +- src/include/winproc.h | 10 +- src/transport/gnunet-service-transport_ats.h | 40 ++-- src/transport/gnunet-service-transport_blacklist.h | 17 +- src/transport/gnunet-service-transport_clients.h | 9 +- src/transport/gnunet-service-transport_hello.h | 18 +- .../gnunet-service-transport_neighbours.h | 53 +++-- src/transport/gnunet-service-transport_plugins.h | 11 +- .../gnunet-service-transport_validation.h | 24 +- src/transport/transport-testing.h | 9 +- src/transport/wlan/byteorder.h | 46 ++-- src/util/disk.h | 4 +- src/vpn/gnunet-daemon-vpn-helper.h | 4 +- src/vpn/gnunet-daemon-vpn.h | 10 +- 71 files changed, 1350 insertions(+), 1612 deletions(-) diff --git a/.indent.pro b/.indent.pro index 29c9900c3..7009a9140 100644 --- a/.indent.pro +++ b/.indent.pro @@ -449,8 +449,8 @@ // ((mask[0] == '0') || (mask[0] == '*'))))) // ------- // For now just keep ignoring. After everything settles down, we might want to start putting custom newlines where it is appropriate ---honour-newlines -//--ignore-newlines +// --honour-newlines +--ignore-newlines // // // diff --git a/src/arm/gnunet-service-arm.h b/src/arm/gnunet-service-arm.h index a9f72b512..bdb5d2c93 100644 --- a/src/arm/gnunet-service-arm.h +++ b/src/arm/gnunet-service-arm.h @@ -35,8 +35,8 @@ * @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. diff --git a/src/dht/dhtlog.h b/src/dht/dhtlog.h index 6a8a6f1bb..476a4039e 100644 --- a/src/dht/dhtlog.h +++ b/src/dht/dhtlog.h @@ -166,8 +166,7 @@ struct GNUNET_DHTLOG_Handle */ int (*insert_query) (unsigned long long *sqlqueryuid, unsigned long long queryid, DHTLOG_MESSAGE_TYPES type, - unsigned int hops, - int succeeded, + unsigned int hops, int succeeded, const struct GNUNET_PeerIdentity * node, const GNUNET_HashCode * key); @@ -203,16 +202,19 @@ struct GNUNET_DHTLOG_Handle * * @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); /* * Update dhttests.trials table with current server time as end time @@ -264,8 +266,8 @@ struct GNUNET_DHTLOG_Handle * @return GNUNET_OK on success, GNUNET_SYSERR on failure */ int (*add_generic_stat) (const struct GNUNET_PeerIdentity * peer, - const char *name, - const char *section, uint64_t value); + const char *name, const char *section, + uint64_t value); /* * Inserts the specified round into the dhttests.rounds table @@ -327,10 +329,8 @@ struct GNUNET_DHTLOG_Handle * @return GNUNET_OK on success, GNUNET_SYSERR on failure. */ int (*insert_route) (unsigned long long *sqlqueryuid, - unsigned long long queryid, - unsigned int type, - unsigned int hops, - int succeeded, + unsigned long long queryid, unsigned int type, + unsigned int hops, int succeeded, const struct GNUNET_PeerIdentity * node, const GNUNET_HashCode * key, const struct GNUNET_PeerIdentity * from_node, diff --git a/src/fs/fs.h b/src/fs/fs.h index 1d3fc6611..68bab5916 100644 --- a/src/fs/fs.h +++ b/src/fs/fs.h @@ -788,17 +788,9 @@ void GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh); * @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); /** @@ -827,10 +819,8 @@ void *GNUNET_FS_make_file_reader_context_ (const char *filename); * @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. @@ -858,9 +848,8 @@ void *GNUNET_FS_search_probe_progress_ (void *cls, * @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); /** @@ -870,8 +859,8 @@ GNUNET_FS_publish_main_ (void *cls, * @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); /** @@ -897,9 +886,8 @@ void *GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi, * @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); /** @@ -909,9 +897,9 @@ GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, * @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); @@ -923,10 +911,9 @@ GNUNET_FS_download_start_task_ (void *cls, * @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 @@ -961,8 +948,8 @@ int GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc); * * @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); /** @@ -979,9 +966,8 @@ void GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr); * @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); /** @@ -991,9 +977,8 @@ GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, * @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); /** @@ -1144,8 +1129,8 @@ struct TopLevelActivity *GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, * @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); diff --git a/src/fs/fs_test_lib.h b/src/fs/fs_test_lib.h index 2017b21ea..fa822e265 100644 --- a/src/fs/fs_test_lib.h +++ b/src/fs/fs_test_lib.h @@ -53,12 +53,11 @@ struct GNUNET_FS_TestDaemon; * '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); /** @@ -71,11 +70,11 @@ GNUNET_FS_TEST_daemons_start (const char *template_cfg_file, * @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); /** @@ -107,9 +106,8 @@ const struct GNUNET_CONFIGURATION_Handle * @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); /** @@ -118,9 +116,9 @@ GNUNET_FS_TEST_daemons_stop (unsigned int total, * @param cls closure (user defined) * @param uri a URI, NULL for errors */ -typedef void - (*GNUNET_FS_TEST_UriContinuation) (void *cls, - const struct GNUNET_FS_Uri * uri); +typedef void (*GNUNET_FS_TEST_UriContinuation) (void *cls, + const struct GNUNET_FS_Uri * + uri); /** @@ -138,15 +136,12 @@ typedef void * @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); /** @@ -162,14 +157,12 @@ GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon, * @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); diff --git a/src/fs/fs_tree.h b/src/fs/fs_tree.h index c2b7de48c..532c9e9aa 100644 --- a/src/fs/fs_tree.h +++ b/src/fs/fs_tree.h @@ -66,9 +66,8 @@ uint64_t GNUNET_FS_tree_compute_tree_size (unsigned int depth); * @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); /** @@ -111,8 +110,7 @@ typedef void (*GNUNET_FS_TreeBlockProcessor) (void *cls, * @param pt_size size of pt_block * @param depth depth of the block in the tree, 0 for DBLOCKS */ -typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, - uint64_t offset, +typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, uint64_t offset, const void *pt_block, size_t pt_size, unsigned int depth); diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h index c9485f23b..84165d8b7 100644 --- a/src/fs/gnunet-service-fs_cp.h +++ b/src/fs/gnunet-service-fs_cp.h @@ -140,8 +140,8 @@ typedef void (*GSF_ConnectedPeerIterator) (void *cls, * @param buf where to copy the message, NULL on error (peer disconnect) * @return number of bytes copied to 'buf', can be 0 (without indicating an error) */ -typedef size_t (*GSF_GetMessageCallback) (void *cls, - size_t buf_size, void *buf); +typedef size_t (*GSF_GetMessageCallback) (void *cls, size_t buf_size, + void *buf); /** @@ -225,10 +225,9 @@ void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth); * @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); /** @@ -238,9 +237,9 @@ GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, * @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); /** @@ -250,10 +249,9 @@ GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, * @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); /** @@ -267,13 +265,13 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, * 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); /** @@ -287,12 +285,11 @@ GSF_peer_status_handler_ (void *cls, * @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); /** @@ -331,9 +328,8 @@ struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct * @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); /** @@ -343,9 +339,8 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, * @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); /** @@ -366,9 +361,8 @@ void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc); * @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); /** @@ -377,9 +371,8 @@ GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, * @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); /** diff --git a/src/fs/gnunet-service-fs_indexing.h b/src/fs/gnunet-service-fs_indexing.h index c6ef53351..a5c8f6593 100644 --- a/src/fs/gnunet-service-fs_indexing.h +++ b/src/fs/gnunet-service-fs_indexing.h @@ -54,17 +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. @@ -73,10 +70,9 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, * @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); /** @@ -86,10 +82,10 @@ GNUNET_FS_handle_index_start (void *cls, * @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); /** @@ -99,10 +95,8 @@ GNUNET_FS_handle_index_list_get (void *cls, * @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); /** @@ -112,9 +106,8 @@ GNUNET_FS_handle_unindex (void *cls, * @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); /** diff --git a/src/fs/gnunet-service-fs_lc.h b/src/fs/gnunet-service-fs_lc.h index c9d8ce191..6b79690f1 100644 --- a/src/fs/gnunet-service-fs_lc.h +++ b/src/fs/gnunet-service-fs_lc.h @@ -66,9 +66,8 @@ struct GSF_PendingRequest *GSF_local_client_start_search_handler_ (struct * @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); /** @@ -77,8 +76,8 @@ GSF_local_client_transmit_ (struct GSF_LocalClient *lc, * @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 diff --git a/src/fs/gnunet-service-fs_pe.h b/src/fs/gnunet-service-fs_pe.h index 7fbf9fc4a..cfaeabe22 100644 --- a/src/fs/gnunet-service-fs_pe.h +++ b/src/fs/gnunet-service-fs_pe.h @@ -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); /** diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h index 2f89f6e73..f2e7bcf62 100644 --- a/src/fs/gnunet-service-fs_pr.h +++ b/src/fs/gnunet-service-fs_pr.h @@ -238,10 +238,9 @@ struct GSF_PendingRequest *GSF_pending_request_create_ (enum * @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); /** @@ -264,9 +263,8 @@ struct GSF_PendingRequestData *GSF_pending_request_get_data_ (struct * @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); /** @@ -278,15 +276,9 @@ GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra, * @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); /** @@ -295,8 +287,8 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr, * @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); /** @@ -335,9 +327,8 @@ void GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls); * 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); /** @@ -369,9 +360,8 @@ typedef void (*GSF_LocalLookupContinuation) (void *cls, * @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); /** diff --git a/src/hostlist/hostlist-client.h b/src/hostlist/hostlist-client.h index 80ead64bb..c6561c820 100644 --- a/src/hostlist/hostlist-client.h +++ b/src/hostlist/hostlist-client.h @@ -89,12 +89,11 @@ * @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); /** diff --git a/src/hostlist/hostlist-server.h b/src/hostlist/hostlist-server.h index 7b7e37a4d..b5960b39c 100644 --- a/src/hostlist/hostlist-server.h +++ b/src/hostlist/hostlist-server.h @@ -38,13 +38,12 @@ * * @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); /** diff --git a/src/include/gnunet_arm_service.h b/src/include/gnunet_arm_service.h index e0a0b83ad..76529ede4 100644 --- a/src/include/gnunet_arm_service.h +++ b/src/include/gnunet_arm_service.h @@ -104,11 +104,10 @@ void GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h); * @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); /** @@ -122,11 +121,10 @@ GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h, * @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); diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h index a6149ee5a..dd648dd75 100644 --- a/src/include/gnunet_ats_service.h +++ b/src/include/gnunet_ats_service.h @@ -156,8 +156,8 @@ struct GNUNET_ATS_SuggestionContext *GNUNET_ATS_suggest_address (struct * * @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,15 +174,12 @@ GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext *asc); * @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); /** @@ -193,9 +190,8 @@ GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc, * @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); /** @@ -205,10 +201,9 @@ GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc, * @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); /** @@ -229,16 +224,14 @@ GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc, * @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 diff --git a/src/include/gnunet_bandwidth_lib.h b/src/include/gnunet_bandwidth_lib.h index 059a6696c..e78d16552 100644 --- a/src/include/gnunet_bandwidth_lib.h +++ b/src/include/gnunet_bandwidth_lib.h @@ -89,8 +89,8 @@ struct GNUNET_BANDWIDTH_Tracker * @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,20 +107,12 @@ GNUNET_BANDWIDTH_value_init (uint32_t bytes_per_second); * @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); /** @@ -131,9 +123,11 @@ uint64_t * @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); @@ -144,9 +138,12 @@ GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps, * @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); /** @@ -163,10 +160,10 @@ GNUNET_BANDWIDTH_value_min (struct GNUNET_BANDWIDTH_Value32NBO b1, * @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); /** @@ -180,9 +177,8 @@ GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av, * @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); /** @@ -194,9 +190,10 @@ GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av, * @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); /** @@ -206,15 +203,9 @@ GNUNET_BANDWIDTH_tracker_get_delay (struct GNUNET_BANDWIDTH_Tracker *av, * @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); /** @@ -223,10 +214,9 @@ int64_t * @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 */ diff --git a/src/include/gnunet_bio_lib.h b/src/include/gnunet_bio_lib.h index f0b486fd2..74512ec40 100644 --- a/src/include/gnunet_bio_lib.h +++ b/src/include/gnunet_bio_lib.h @@ -72,8 +72,8 @@ int GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg); * @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 +86,8 @@ int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, * @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 +99,8 @@ int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, * @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); /** @@ -144,8 +144,8 @@ int GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, * @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 +166,8 @@ int GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, * @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); /** @@ -210,8 +210,8 @@ int GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h); * @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); /** diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h index ae6884869..51b8254d0 100644 --- a/src/include/gnunet_block_lib.h +++ b/src/include/gnunet_block_lib.h @@ -161,9 +161,8 @@ struct GNUNET_BLOCK_Context; * @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); /** @@ -203,15 +202,23 @@ void GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx); * @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); /** @@ -227,11 +234,9 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx, * 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 */ diff --git a/src/include/gnunet_block_plugin.h b/src/include/gnunet_block_plugin.h index 885842157..6d1f2f103 100644 --- a/src/include/gnunet_block_plugin.h +++ b/src/include/gnunet_block_plugin.h @@ -50,15 +50,27 @@ * @param reply_block_size number of bytes in reply block * @return characterization of result */ -typedef enum GNUNET_BLOCK_EvaluationResult - (*GNUNET_BLOCK_EvaluationFunction) (void *cls, - 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); +typedef enum + GNUNET_BLOCK_EvaluationResult (*GNUNET_BLOCK_EvaluationFunction) (void *cls, + 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); /** @@ -74,11 +86,11 @@ typedef enum GNUNET_BLOCK_EvaluationResult * GNUNET_SYSERR if type not supported * (or if extracting a key from a block of this type does not work) */ -typedef int - (*GNUNET_BLOCK_GetKeyFunction) (void *cls, - enum GNUNET_BLOCK_Type type, - const void *block, - size_t block_size, GNUNET_HashCode * key); +typedef int (*GNUNET_BLOCK_GetKeyFunction) (void *cls, + enum GNUNET_BLOCK_Type type, + const void *block, + size_t block_size, + GNUNET_HashCode * key); diff --git a/src/include/gnunet_chat_service.h b/src/include/gnunet_chat_service.h index 723c280e6..d9c3ec76f 100644 --- a/src/include/gnunet_chat_service.h +++ b/src/include/gnunet_chat_service.h @@ -213,12 +213,12 @@ struct GNUNET_CHAT_Room *GNUNET_CHAT_join_room (const struct * @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); /** @@ -234,8 +234,8 @@ void GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room); * * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration */ -typedef int (*GNUNET_CHAT_RoomIterator) (const char *room, - const char *topic, void *cls); +typedef int (*GNUNET_CHAT_RoomIterator) (const char *room, const char *topic, + void *cls); /** * List all of the (publically visible) chat rooms. diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h index 343960426..3fad01222 100644 --- a/src/include/gnunet_client_lib.h +++ b/src/include/gnunet_client_lib.h @@ -66,9 +66,8 @@ struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char * @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); @@ -98,8 +97,8 @@ void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock, * @param msg message received, NULL on timeout or fatal error */ typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls, - const struct - GNUNET_MessageHeader * msg); + const struct GNUNET_MessageHeader + * msg); /** * Type of a function to call when we have finished shutting @@ -153,13 +152,20 @@ struct GNUNET_CLIENT_TransmitHandle; * 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); /** @@ -167,9 +173,9 @@ struct GNUNET_CLIENT_TransmitHandle * * @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); /** @@ -193,13 +199,14 @@ GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle * @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); /** diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h index 036249e34..f884d9a24 100644 --- a/src/include/gnunet_common.h +++ b/src/include/gnunet_common.h @@ -157,10 +157,9 @@ enum GNUNET_ErrorType * @param date when was the message logged? * @param message what is the message */ -typedef void (*GNUNET_Logger) (void *cls, - enum GNUNET_ErrorType kind, - const char *component, - const char *date, const char *message); +typedef void (*GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind, + const char *component, const char *date, + const char *message); /** * Main log function. @@ -182,9 +181,8 @@ void GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...); * @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, ...); /** @@ -204,8 +202,8 @@ void GNUNET_log_skip (unsigned int n, int check_reset); * @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); /** @@ -528,15 +526,15 @@ void *GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename, * @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 @@ -585,11 +583,9 @@ char *GNUNET_xstrndup_ (const char *str, size_t len, const char *filename, * @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); diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h index 4ecb3539f..24705f0fb 100644 --- a/src/include/gnunet_configuration_lib.h +++ b/src/include/gnunet_configuration_lib.h @@ -113,11 +113,10 @@ int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg, * @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 @@ -138,8 +137,7 @@ int GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle * @param option name of the option * @param value value of the option */ -typedef void (*GNUNET_CONFIGURATION_Iterator) (void *cls, - const char *section, +typedef void (*GNUNET_CONFIGURATION_Iterator) (void *cls, const char *section, const char *option, const char *value); @@ -277,11 +275,10 @@ int GNUNET_CONFIGURATION_get_value_filename (const struct */ int GNUNET_CONFIGURATION_iterate_value_filenames (const struct GNUNET_CONFIGURATION_Handle - *cfg, - const char *section, + *cfg, const char *section, const char *option, - GNUNET_FileNameCallback - cb, void *cb_cls); + GNUNET_FileNameCallback cb, + void *cb_cls); /** * Iterate over values of a section in the configuration. @@ -291,12 +288,11 @@ int GNUNET_CONFIGURATION_iterate_value_filenames (const struct * @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 @@ -353,12 +349,10 @@ char *GNUNET_CONFIGURATION_expand_dollar (const struct * @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); /** @@ -369,11 +363,10 @@ GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle * @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 @@ -388,8 +381,7 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle */ int GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle - *cfg, - const char *section, + *cfg, const char *section, const char *option, const char *value); diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h index 00b97d903..af10c5966 100644 --- a/src/include/gnunet_connection_lib.h +++ b/src/include/gnunet_connection_lib.h @@ -99,8 +99,7 @@ typedef int (*GNUNET_CONNECTION_AccessCheck) (void *cls, * @param addrlen size of addr * @param errCode value of errno (on errors receiving) */ -typedef void (*GNUNET_CONNECTION_Receiver) (void *cls, - const void *buf, +typedef void (*GNUNET_CONNECTION_Receiver) (void *cls, const void *buf, size_t available, const struct sockaddr * addr, socklen_t addrlen, int errCode); @@ -136,9 +135,9 @@ int GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock); * @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); /** @@ -151,8 +150,8 @@ struct GNUNET_CONNECTION_Handle * @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, + *GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access, + void *access_cls, struct GNUNET_NETWORK_Handle *lsock); @@ -166,11 +165,15 @@ struct GNUNET_CONNECTION_Handle * @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); /** @@ -201,10 +204,14 @@ struct GNUNET_CONNECTION_Handle * @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). @@ -225,9 +232,8 @@ int GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock); * @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); /** @@ -243,9 +249,8 @@ int GNUNET_CONNECTION_get_address (struct * 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); /** @@ -261,12 +266,10 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock, * @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); /** @@ -291,8 +294,7 @@ void *GNUNET_CONNECTION_receive_cancel (struct GNUNET_CONNECTION_Handle *sock); * @param buf where the callee should write the message * @return number of bytes written to buf */ -typedef size_t (*GNUNET_CONNECTION_TransmitReadyNotify) (void *cls, - size_t size, +typedef size_t (*GNUNET_CONNECTION_TransmitReadyNotify) (void *cls, size_t size, void *buf); @@ -332,11 +334,9 @@ struct GNUNET_CONNECTION_TransmitHandle; * NULL if we are already going to notify someone else (busy) */ struct GNUNET_CONNECTION_TransmitHandle - *GNUNET_CONNECTION_notify_transmit_ready (struct - GNUNET_CONNECTION_Handle + *GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle *sock, size_t size, - struct - GNUNET_TIME_Relative + struct GNUNET_TIME_Relative timeout, GNUNET_CONNECTION_TransmitReadyNotify notify, void *notify_cls); @@ -348,10 +348,9 @@ struct GNUNET_CONNECTION_TransmitHandle * * @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); /** @@ -360,9 +359,8 @@ GNUNET_CONNECTION_notify_transmit_ready_cancel (struct * @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 */ diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index cfc7e0842..fde31ed34 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h @@ -115,8 +115,8 @@ struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_init (const * @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); + GNUNET_CONTAINER_BloomFilter *bf, + char *data, size_t size); /** @@ -134,8 +134,8 @@ int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter * @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); /** @@ -176,20 +176,9 @@ void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter * @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); /** @@ -223,10 +212,9 @@ int GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf, * @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 @@ -240,10 +228,9 @@ GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf, * @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); + *bf, GNUNET_HashCodeIterator iterator, + void *iterator_cls, size_t size, + unsigned int k); /* ****************** metadata ******************* */ @@ -287,11 +274,10 @@ void GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md); * @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); /** @@ -311,13 +297,12 @@ GNUNET_CONTAINER_meta_data_test_equal (const struct * @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); /** @@ -327,9 +312,9 @@ GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md, * @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); /** @@ -342,10 +327,9 @@ GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md, * @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); /** @@ -362,9 +346,9 @@ void GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md); * * @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); /** @@ -375,10 +359,9 @@ GNUNET_CONTAINER_meta_data_add_publication_date (struct * @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 @@ -419,10 +402,9 @@ char *GNUNET_CONTAINER_meta_data_get_first_by_types (const struct * 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); @@ -463,30 +445,9 @@ enum GNUNET_CONTAINER_MetaDataSerializationOptions * -1 on error (typically: not enough * space) */ -ssize_t - - - - - - - - - - - - - - - - - - - -GNUNET_CONTAINER_meta_data_serialize (const struct - GNUNET_CONTAINER_MetaData *md, - char **target, - size_t max, +ssize_t +GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData + *md, char **target, size_t max, enum GNUNET_CONTAINER_MetaDataSerializationOptions opt); @@ -498,26 +459,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct * @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); @@ -609,8 +551,8 @@ struct GNUNET_CONTAINER_MultiHashMap * * @param map the map */ -void GNUNET_CONTAINER_multihashmap_destroy (struct - GNUNET_CONTAINER_MultiHashMap *map); +void GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap + *map); /** @@ -667,8 +609,8 @@ int GNUNET_CONTAINER_multihashmap_remove_all (struct * GNUNET_NO if not */ int GNUNET_CONTAINER_multihashmap_contains (const struct - GNUNET_CONTAINER_MultiHashMap - *map, const GNUNET_HashCode * key); + GNUNET_CONTAINER_MultiHashMap *map, + const GNUNET_HashCode * key); /** @@ -703,8 +645,8 @@ int GNUNET_CONTAINER_multihashmap_contains_value (const struct int GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map, const GNUNET_HashCode * key, void *value, - enum - GNUNET_CONTAINER_MultiHashMapOption opt); + enum GNUNET_CONTAINER_MultiHashMapOption + opt); /** * Get the number of key-value pairs in the map. @@ -728,8 +670,8 @@ unsigned int GNUNET_CONTAINER_multihashmap_size (const struct */ int GNUNET_CONTAINER_multihashmap_iterate (const struct GNUNET_CONTAINER_MultiHashMap *map, - GNUNET_CONTAINER_HashMapIterator - it, void *it_cls); + GNUNET_CONTAINER_HashMapIterator it, + void *it_cls); /** @@ -951,8 +893,8 @@ void *GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap); * @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); /** @@ -961,9 +903,9 @@ GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap); * @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 @@ -989,10 +931,9 @@ typedef int (*GNUNET_CONTAINER_HeapIterator) (void *cls, * @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); /** @@ -1067,10 +1008,9 @@ void *GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode * @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 *************** */ @@ -1139,9 +1079,8 @@ void GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l, * @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); /** diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index 1bf82030d..94272a30a 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h @@ -116,12 +116,14 @@ typedef void (*GNUNET_CORE_DisconnectEventHandler) (void *cls, * @return GNUNET_OK to keep the connection open, * GNUNET_SYSERR to close it (signal serious error) */ -typedef int - (*GNUNET_CORE_MessageCallback) (void *cls, - const struct GNUNET_PeerIdentity * other, - const struct GNUNET_MessageHeader * message, - const struct - GNUNET_TRANSPORT_ATS_Information * atsi); +typedef int (*GNUNET_CORE_MessageCallback) (void *cls, + const struct GNUNET_PeerIdentity * + other, + const struct GNUNET_MessageHeader * + message, + const struct + GNUNET_TRANSPORT_ATS_Information * + atsi); /** @@ -162,14 +164,13 @@ struct GNUNET_CORE_MessageHandler * @param my_identity ID of this peer, NULL if we failed * @param publicKey public key of this peer, NULL if we failed */ -typedef void - (*GNUNET_CORE_StartupCallback) (void *cls, - struct GNUNET_CORE_Handle * server, - const struct GNUNET_PeerIdentity * - my_identity, - const struct - GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded * - publicKey); +typedef void (*GNUNET_CORE_StartupCallback) (void *cls, + struct GNUNET_CORE_Handle * server, + const struct GNUNET_PeerIdentity * + my_identity, + const struct + GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded + * publicKey); /** @@ -308,9 +309,9 @@ struct GNUNET_CORE_PeerRequestHandle *GNUNET_CORE_peer_request_connect (struct * * @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); /** @@ -325,16 +326,18 @@ GNUNET_CORE_peer_request_connect_cancel (struct GNUNET_CORE_PeerRequestHandle * long should the client wait until re-trying? * @param preference current traffic preference for the given peer */ -typedef void - (*GNUNET_CORE_PeerConfigurationInfoCallback) (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); +typedef void (*GNUNET_CORE_PeerConfigurationInfoCallback) (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); @@ -391,10 +394,9 @@ struct GNUNET_CORE_InformationRequestContext * * @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); /** @@ -405,10 +407,9 @@ GNUNET_CORE_peer_change_preference_cancel (struct * @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. @@ -423,11 +424,10 @@ GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, * * @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); /** @@ -490,9 +490,8 @@ struct GNUNET_CORE_TransmitHandle *GNUNET_CORE_notify_transmit_ready (struct * * @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 */ diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h index ec71a791b..30a7d9ee0 100644 --- a/src/include/gnunet_crypto_lib.h +++ b/src/include/gnunet_crypto_lib.h @@ -295,8 +295,7 @@ int GNUNET_CRYPTO_aes_check_session_key (const struct * for streams. * @return the size of the encrypted block, -1 for errors */ -ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block, - size_t len, +ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len, const struct GNUNET_CRYPTO_AesSessionKey *sessionkey, const struct @@ -314,8 +313,7 @@ ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block, * @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, +ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size, const struct GNUNET_CRYPTO_AesSessionKey *sessionkey, const struct @@ -331,10 +329,11 @@ ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block, * @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, + ...); /** @@ -345,10 +344,11 @@ GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector *iv, * @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); /** @@ -403,10 +403,9 @@ void GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret); * @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); /** @@ -511,8 +510,8 @@ void GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, */ void GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc, struct GNUNET_CRYPTO_AesSessionKey *skey, - struct - GNUNET_CRYPTO_AesInitializationVector *iv); + struct GNUNET_CRYPTO_AesInitializationVector + *iv); /** @@ -574,11 +573,10 @@ int GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1, * @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); /** @@ -589,10 +587,10 @@ GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key, * @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 @@ -606,12 +604,9 @@ GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key, * @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, ...); /** @@ -627,13 +622,9 @@ GNUNET_CRYPTO_hkdf (void *result, * @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); /** @@ -647,11 +638,9 @@ GNUNET_CRYPTO_hkdf_v (void *result, * @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); /** @@ -665,10 +654,8 @@ GNUNET_CRYPTO_kdf_v (void *result, * @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, ...); /** @@ -731,8 +718,8 @@ void GNUNET_CRYPTO_rsa_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey); * @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, +void GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey + *priv, struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *pub); @@ -748,8 +735,7 @@ void GNUNET_CRYPTO_rsa_key_get_public (const struct * @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, +int GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size, const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey, diff --git a/src/include/gnunet_datacache_lib.h b/src/include/gnunet_datacache_lib.h index a1712b809..46d22d5ec 100644 --- a/src/include/gnunet_datacache_lib.h +++ b/src/include/gnunet_datacache_lib.h @@ -84,8 +84,7 @@ void GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h); typedef int (*GNUNET_DATACACHE_Iterator) (void *cls, struct GNUNET_TIME_Absolute exp, const GNUNET_HashCode * key, - size_t size, - const char *data, + size_t size, const char *data, enum GNUNET_BLOCK_Type type); @@ -100,13 +99,10 @@ typedef int (*GNUNET_DATACACHE_Iterator) (void *cls, * @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); /** @@ -120,11 +116,11 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h, * @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 */ diff --git a/src/include/gnunet_datacache_plugin.h b/src/include/gnunet_datacache_plugin.h index c7ce0bef1..6868d6b76 100644 --- a/src/include/gnunet_datacache_plugin.h +++ b/src/include/gnunet_datacache_plugin.h @@ -109,11 +109,8 @@ struct GNUNET_DATACACHE_PluginFunctions * @param discard_time when to discard the value in any case * @return 0 on error, number of bytes used otherwise */ - size_t (*put) (void *cls, - const GNUNET_HashCode * key, - size_t size, - const char *data, - enum GNUNET_BLOCK_Type type, + size_t (*put) (void *cls, const GNUNET_HashCode * key, size_t size, + const char *data, enum GNUNET_BLOCK_Type type, struct GNUNET_TIME_Absolute discard_time); @@ -128,8 +125,7 @@ struct GNUNET_DATACACHE_PluginFunctions * @param iter_cls closure for iter * @return the number of results found */ - unsigned int (*get) (void *cls, - const GNUNET_HashCode * key, + unsigned int (*get) (void *cls, const GNUNET_HashCode * key, enum GNUNET_BLOCK_Type type, GNUNET_DATACACHE_Iterator iter, void *iter_cls); diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h index f33588bce..b0aa0c6c9 100644 --- a/src/include/gnunet_datastore_plugin.h +++ b/src/include/gnunet_datastore_plugin.h @@ -92,15 +92,12 @@ struct GNUNET_DATASTORE_PluginEnvironment * @return GNUNET_OK to keep the item * GNUNET_NO to delete the item */ -typedef int (*PluginDatumProcessor) (void *cls, - const GNUNET_HashCode * key, - uint32_t size, - const void *data, +typedef int (*PluginDatumProcessor) (void *cls, 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); + uint32_t priority, uint32_t anonymity, + struct GNUNET_TIME_Absolute expiration, + uint64_t uid); /** * Get an estimate of how much space the database is @@ -130,13 +127,9 @@ typedef unsigned long long (*PluginEstimateSize) (void *cls); * @return GNUNET_OK on success, * GNUNET_SYSERR on failure */ -typedef int (*PluginPut) (void *cls, - const GNUNET_HashCode * key, - uint32_t size, - const void *data, - enum GNUNET_BLOCK_Type type, - uint32_t priority, - uint32_t anonymity, +typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size, + const void *data, enum GNUNET_BLOCK_Type type, + uint32_t priority, uint32_t anonymity, uint32_t replication, struct GNUNET_TIME_Absolute expiration, char **msg); @@ -159,8 +152,7 @@ typedef int (*PluginPut) (void *cls, * proc should be called with NULL if there is no result * @param proc_cls closure for proc */ -typedef void (*PluginGetKey) (void *cls, - uint64_t offset, +typedef void (*PluginGetKey) (void *cls, uint64_t offset, const GNUNET_HashCode * key, const GNUNET_HashCode * vhash, enum GNUNET_BLOCK_Type type, @@ -178,8 +170,8 @@ typedef void (*PluginGetKey) (void *cls, * @param proc function to call the value (once only). * @param proc_cls closure for proc */ -typedef void (*PluginGetRandom) (void *cls, - PluginDatumProcessor proc, void *proc_cls); +typedef void (*PluginGetRandom) (void *cls, PluginDatumProcessor proc, + void *proc_cls); /** @@ -205,9 +197,7 @@ typedef void (*PluginGetRandom) (void *cls, * @param msg set to an error message (on error) * @return GNUNET_OK on success */ -typedef int (*PluginUpdate) (void *cls, - uint64_t uid, - int delta, +typedef int (*PluginUpdate) (void *cls, uint64_t uid, int delta, struct GNUNET_TIME_Absolute expire, char **msg); @@ -223,8 +213,7 @@ typedef int (*PluginUpdate) (void *cls, * @param proc function to call on the matching value * @param proc_cls closure for proc */ -typedef void (*PluginGetType) (void *cls, - uint64_t offset, +typedef void (*PluginGetType) (void *cls, uint64_t offset, enum GNUNET_BLOCK_Type type, PluginDatumProcessor proc, void *proc_cls); diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h index 58c730aba..584537f39 100644 --- a/src/include/gnunet_datastore_service.h +++ b/src/include/gnunet_datastore_service.h @@ -313,8 +313,7 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_remove (struct */ typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls, const GNUNET_HashCode * key, - size_t size, - const void *data, + size_t size, const void *data, enum GNUNET_BLOCK_Type type, uint32_t priority, uint32_t anonymity, diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h index 7c7f646e6..46929c366 100644 --- a/src/include/gnunet_dht_service.h +++ b/src/include/gnunet_dht_service.h @@ -154,17 +154,14 @@ void GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle); * @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); /** @@ -292,8 +289,8 @@ struct GNUNET_DHT_FindPeerHandle *GNUNET_DHT_find_peer_start (struct * * @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); @@ -384,9 +381,8 @@ void GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle); * @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 ******* */ @@ -406,9 +402,9 @@ GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle, * @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); /** @@ -420,10 +416,10 @@ GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle, * @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); /** @@ -435,10 +431,10 @@ GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle, * @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 diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h index 5732a27d6..f5fae80c9 100644 --- a/src/include/gnunet_disk_lib.h +++ b/src/include/gnunet_disk_lib.h @@ -292,9 +292,8 @@ int GNUNET_DISK_file_test (const char *fil); * @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); /** @@ -309,8 +308,8 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, * 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); /** @@ -328,8 +327,8 @@ int GNUNET_DISK_file_size (const char *filename, * @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); /** @@ -372,8 +371,7 @@ struct GNUNET_DISK_FileHandle *GNUNET_DISK_file_open (const char *fn, * @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, +struct GNUNET_DISK_PipeHandle *GNUNET_DISK_pipe (int blocking, int inherit_read, int inherit_write); @@ -391,9 +389,8 @@ int GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p); * @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. @@ -462,9 +459,7 @@ ssize_t GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h, * @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, +ssize_t GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n, enum GNUNET_DISK_AccessPermissions mode); @@ -541,8 +536,8 @@ int GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator * @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, +void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio, + const char *dirName, GNUNET_DISK_DirectoryIteratorCallback callback, void *callback_cls); @@ -599,9 +594,8 @@ int GNUNET_DISK_directory_create (const char *dir); * @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); /** @@ -611,9 +605,8 @@ GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart, * @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); /** diff --git a/src/include/gnunet_dv_service.h b/src/include/gnunet_dv_service.h index 0da76c56c..2bb2319b9 100644 --- a/src/include/gnunet_dv_service.h +++ b/src/include/gnunet_dv_service.h @@ -70,12 +70,9 @@ struct GNUNET_DV_Handle; */ 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, + 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); diff --git a/src/include/gnunet_fragmentation_lib.h b/src/include/gnunet_fragmentation_lib.h index da236478c..1f1f85321 100644 --- a/src/include/gnunet_fragmentation_lib.h +++ b/src/include/gnunet_fragmentation_lib.h @@ -105,8 +105,8 @@ struct GNUNET_FRAGMENT_Context *GNUNET_FRAGMENT_context_create (struct * * @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); /** @@ -132,8 +132,9 @@ int GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc, * @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); /** @@ -152,8 +153,7 @@ struct GNUNET_DEFRAGMENT_Context; * @param id unique message ID (modulo collisions) * @param msg the message that was created */ -typedef void (*GNUNET_DEFRAGMENT_AckProcessor) (void *cls, - uint32_t id, +typedef void (*GNUNET_DEFRAGMENT_AckProcessor) (void *cls, uint32_t id, const struct GNUNET_MessageHeader * msg); @@ -200,9 +200,8 @@ void GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc); * @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 */ diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h index b6eb83609..2962a9cf2 100644 --- a/src/include/gnunet_fs_service.h +++ b/src/include/gnunet_fs_service.h @@ -79,8 +79,7 @@ struct GNUNET_FS_Uri; * @param is_mandatory is the keyword mandatory (in a search) * @return GNUNET_OK to continue to iterate, GNUNET_SYSERR to abort */ -typedef int (*GNUNET_FS_KeywordIterator) (void *cls, - const char *keyword, +typedef int (*GNUNET_FS_KeywordIterator) (void *cls, const char *keyword, int is_mandatory); /** @@ -90,8 +89,8 @@ typedef int (*GNUNET_FS_KeywordIterator) (void *cls, * @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. @@ -119,9 +118,8 @@ char *GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri); * @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); /** @@ -131,9 +129,8 @@ GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri, * @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); /** @@ -159,8 +156,8 @@ void GNUNET_FS_uri_destroy (struct GNUNET_FS_Uri *uri); * @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); /** @@ -172,10 +169,9 @@ GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri *uri); * @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); /** @@ -185,9 +181,8 @@ GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri, * @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); /** @@ -206,8 +201,9 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri * @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); /** @@ -310,9 +306,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, * @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); /** @@ -361,9 +356,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * * @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); /** @@ -451,10 +445,10 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_meta_data (const struct * @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); /** @@ -469,10 +463,10 @@ GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext * @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); @@ -1522,8 +1516,9 @@ struct GNUNET_FS_ProgressInfo * will be passed to future callbacks in the respective * field in the GNUNET_FS_ProgressInfo struct. */ -typedef void *(*GNUNET_FS_ProgressCallback) - (void *cls, const struct GNUNET_FS_ProgressInfo * info); +typedef void *(*GNUNET_FS_ProgressCallback) (void *cls, + const struct GNUNET_FS_ProgressInfo + * info); /** @@ -1682,11 +1677,10 @@ void GNUNET_FS_stop (struct GNUNET_FS_Handle *h); * @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); /** @@ -1804,9 +1798,8 @@ struct GNUNET_FS_FileInformation * @param emsg location for the reader to store an error message * @return number of bytes written, usually "max", 0 on error */ -typedef size_t (*GNUNET_FS_DataReader) (void *cls, - uint64_t offset, - size_t max, void *buf, char **emsg); +typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max, + void *buf, char **emsg); /** @@ -1850,8 +1843,7 @@ struct GNUNET_FS_FileInformation * @param fi information about the file (should not be * used henceforth by the caller) */ -typedef void (*GNUNET_FS_FileProcessor) (void *cls, - const char *filename, +typedef void (*GNUNET_FS_FileProcessor) (void *cls, const char *filename, struct GNUNET_FS_FileInformation * fi); @@ -1870,8 +1862,7 @@ typedef void (*GNUNET_FS_FileProcessor) (void *cls, */ typedef int (*GNUNET_FS_DirectoryScanner) (void *cls, struct GNUNET_FS_Handle * h, - const char *dirname, - int do_index, + const char *dirname, int do_index, const struct GNUNET_FS_BlockOptions * bo, GNUNET_FS_FileProcessor proc, void *proc_cls, char **emsg); @@ -1899,14 +1890,11 @@ typedef int (*GNUNET_FS_DirectoryScanner) (void *cls, * @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); /** @@ -1975,9 +1963,8 @@ struct GNUNET_FS_FileInformation * @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); /** @@ -1991,9 +1978,8 @@ GNUNET_FS_file_information_is_directory (const struct GNUNET_FS_FileInformation * 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); /** @@ -2010,10 +1996,9 @@ GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir, * @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); /** @@ -2026,10 +2011,9 @@ GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir, * 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); /** @@ -2114,14 +2098,13 @@ typedef void (*GNUNET_FS_PublishContinuation) (void *cls, * @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); /** @@ -2138,16 +2121,14 @@ GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h, * @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); /** @@ -2158,8 +2139,7 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, * @param file_id hash of the contents of the indexed file * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort */ -typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, - const char *filename, +typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, const char *filename, const GNUNET_HashCode * file_id); @@ -2174,11 +2154,10 @@ typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, * 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); /** @@ -2215,15 +2194,15 @@ void GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc); * @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); /** @@ -2249,8 +2228,8 @@ struct GNUNET_FS_Namespace *GNUNET_FS_namespace_create (struct GNUNET_FS_Handle * * @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); /** @@ -2262,8 +2241,7 @@ GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, int freeze); * @param name human-readable identifier of the namespace * @param id hash identifier for the namespace */ -typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, - const char *name, +typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, const char *name, const GNUNET_HashCode * id); @@ -2276,9 +2254,9 @@ typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, * @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); /** @@ -2290,12 +2268,12 @@ GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h, * @param last_meta metadata associated with last_uri * @param next_id identifier that should be used for updates */ -typedef void - (*GNUNET_FS_IdentifierProcessor) (void *cls, - const char *last_id, - const struct GNUNET_FS_Uri * last_uri, - const struct GNUNET_CONTAINER_MetaData * - last_meta, const char *next_id); +typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls, const char *last_id, + const struct GNUNET_FS_Uri * + last_uri, + const struct + GNUNET_CONTAINER_MetaData * + last_meta, const char *next_id); /** @@ -2318,11 +2296,10 @@ typedef void * @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); /** @@ -2547,8 +2524,8 @@ struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start_from_search (struct * @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); @@ -2566,9 +2543,8 @@ GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete); * @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); /** @@ -2634,12 +2610,10 @@ typedef void (*GNUNET_FS_DirectoryEntryProcessor) (void *cls, * 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); /** @@ -2668,11 +2642,10 @@ struct GNUNET_FS_DirectoryBuilder *GNUNET_FS_directory_builder_create (const * 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); /** @@ -2685,9 +2658,8 @@ GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld, * @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 */ diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h index 9c34810b2..0fb7ec84e 100644 --- a/src/include/gnunet_getopt_lib.h +++ b/src/include/gnunet_getopt_lib.h @@ -85,12 +85,11 @@ struct GNUNET_GETOPT_CommandLineProcessorContext * @param value argument, NULL if none was given * @return GNUNET_OK to continue processing other options, GNUNET_SYSERR to abort */ -typedef - int (*GNUNET_GETOPT_CommandLineOptionProcessor) (struct - GNUNET_GETOPT_CommandLineProcessorContext - * ctx, void *scls, - const char *option, - const char *value); +typedef int (*GNUNET_GETOPT_CommandLineOptionProcessor) (struct + GNUNET_GETOPT_CommandLineProcessorContext + * ctx, void *scls, + const char *option, + const char *value); /** * @brief Definition of a command line option. @@ -209,8 +208,8 @@ struct GNUNET_GETOPT_CommandLineOption * 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); + const struct GNUNET_GETOPT_CommandLineOption *allOptions, + unsigned int argc, char *const *argv); /** @@ -300,11 +299,10 @@ int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext * @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! ************* */ @@ -318,8 +316,7 @@ GNUNET_GETOPT_increment_value (struct * @param value not used (NULL) * @return GNUNET_SYSERR (do not continue) */ -int GNUNET_GETOPT_format_help_ (struct - GNUNET_GETOPT_CommandLineProcessorContext +int GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx, void *scls, const char *option, const char *value); diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h index a3e4ba0f0..3c44b5048 100644 --- a/src/include/gnunet_hello_lib.h +++ b/src/include/gnunet_hello_lib.h @@ -60,18 +60,11 @@ struct GNUNET_HELLO_Message; * @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); /** @@ -85,9 +78,9 @@ GNUNET_HELLO_add_address (const char *tname, * @return number of bytes written, 0 to signal the * end of the iteration. */ -typedef size_t - (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls, - size_t max, void *buf); +typedef size_t (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls, + size_t max, + void *buf); /** @@ -143,11 +136,12 @@ struct GNUNET_HELLO_Message *GNUNET_HELLO_merge (const struct * 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); /** @@ -162,11 +156,10 @@ GNUNET_HELLO_equals (const struct * GNUNET_NO to delete it from the HELLO * GNUNET_SYSERR to stop iterating (but keep current address) */ -typedef int - (*GNUNET_HELLO_AddressIterator) (void *cls, - const char *tname, - struct GNUNET_TIME_Absolute expiration, - const void *addr, uint16_t addrlen); +typedef int (*GNUNET_HELLO_AddressIterator) (void *cls, const char *tname, + struct GNUNET_TIME_Absolute + expiration, const void *addr, + uint16_t addrlen); /** @@ -201,15 +194,14 @@ struct GNUNET_HELLO_Message *GNUNET_HELLO_iterate_addresses (const struct * @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); /** @@ -219,10 +211,9 @@ GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message * @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); /** @@ -232,9 +223,8 @@ GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello, * @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); /** diff --git a/src/include/gnunet_load_lib.h b/src/include/gnunet_load_lib.h index 40323e709..d56522d40 100644 --- a/src/include/gnunet_load_lib.h +++ b/src/include/gnunet_load_lib.h @@ -61,9 +61,8 @@ struct GNUNET_LOAD_Value *GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative * @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); /** diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h index 7e332c749..507b766d1 100644 --- a/src/include/gnunet_mesh_service.h +++ b/src/include/gnunet_mesh_service.h @@ -67,14 +67,16 @@ struct GNUNET_MESH_Tunnel; * @return GNUNET_OK to keep the connection open, * GNUNET_SYSERR to close it (signal serious error) */ -typedef int - (*GNUNET_MESH_MessageCallback) (void *cls, - struct GNUNET_MESH_Tunnel * tunnel, - void **tunnel_ctx, - const struct GNUNET_PeerIdentity * sender, - const struct GNUNET_MessageHeader * message, - const struct - GNUNET_TRANSPORT_ATS_Information * atsi); +typedef int (*GNUNET_MESH_MessageCallback) (void *cls, + struct GNUNET_MESH_Tunnel * tunnel, + void **tunnel_ctx, + const struct GNUNET_PeerIdentity * + sender, + const struct GNUNET_MessageHeader * + message, + const struct + GNUNET_TRANSPORT_ATS_Information * + atsi); /** @@ -281,10 +283,10 @@ struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_all (struct * @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); /** @@ -294,9 +296,9 @@ GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel, * @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); /** @@ -394,9 +396,8 @@ struct GNUNET_MESH_TransmitHandle *GNUNET_MESH_notify_transmit_ready (struct * * @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); diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h index 7146faa75..89b1c881e 100644 --- a/src/include/gnunet_mesh_service_new.h +++ b/src/include/gnunet_mesh_service_new.h @@ -67,14 +67,16 @@ struct GNUNET_MESH_Tunnel; * @return GNUNET_OK to keep the connection open, * GNUNET_SYSERR to close it (signal serious error) */ -typedef int - (*GNUNET_MESH_MessageCallback) (void *cls, - struct GNUNET_MESH_Tunnel * tunnel, - void **tunnel_ctx, - const struct GNUNET_PeerIdentity * sender, - const struct GNUNET_MessageHeader * message, - const struct - GNUNET_TRANSPORT_ATS_Information * atsi); +typedef int (*GNUNET_MESH_MessageCallback) (void *cls, + struct GNUNET_MESH_Tunnel * tunnel, + void **tunnel_ctx, + const struct GNUNET_PeerIdentity * + sender, + const struct GNUNET_MessageHeader * + message, + const struct + GNUNET_TRANSPORT_ATS_Information * + atsi); /** @@ -113,8 +115,8 @@ struct GNUNET_MESH_MessageHandler * with the tunnel is stored */ typedef void (GNUNET_MESH_TunnelEndHandler) (void *cls, - const struct GNUNET_MESH_Tunnel - * tunnel, void **tunnel_ctx); + const struct GNUNET_MESH_Tunnel * + tunnel, void **tunnel_ctx); /** @@ -220,10 +222,10 @@ void GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun); * @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); /** @@ -233,9 +235,9 @@ GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel, * @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); /** @@ -247,10 +249,12 @@ GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel, * @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); /** @@ -305,9 +309,8 @@ struct GNUNET_MESH_TransmitHandle *GNUNET_MESH_notify_transmit_ready (struct * * @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 */ diff --git a/src/include/gnunet_nat_lib.h b/src/include/gnunet_nat_lib.h index a84f684a7..30eb50dd8 100644 --- a/src/include/gnunet_nat_lib.h +++ b/src/include/gnunet_nat_lib.h @@ -41,8 +41,7 @@ * @param addr either the previous or the new public IP address * @param addrlen actual lenght of the address */ -typedef void (*GNUNET_NAT_AddressCallback) (void *cls, - int add_remove, +typedef void (*GNUNET_NAT_AddressCallback) (void *cls, int add_remove, const struct sockaddr * addr, socklen_t addrlen); @@ -110,9 +109,8 @@ struct GNUNET_NAT_Handle *GNUNET_NAT_register (const struct * 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); /** @@ -123,9 +121,8 @@ GNUNET_NAT_test_address (struct GNUNET_NAT_Handle *h, * @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); @@ -220,8 +217,8 @@ struct GNUNET_NAT_ExternalHandle *GNUNET_NAT_mini_get_external_ipv4 (struct * * @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); /** diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h index ecc4adf41..0f38b855f 100644 --- a/src/include/gnunet_network_lib.h +++ b/src/include/gnunet_network_lib.h @@ -145,9 +145,9 @@ int GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc, * @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); /** @@ -165,9 +165,8 @@ int GNUNET_NETWORK_socket_listen (const struct GNUNET_NETWORK_Handle *desc, * 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); /** @@ -179,17 +178,12 @@ GNUNET_NETWORK_socket_recvfrom_amount (const struct GNUNET_NETWORK_Handle * 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); /** @@ -241,9 +235,8 @@ ssize_t GNUNET_NETWORK_socket_send (const struct GNUNET_NETWORK_Handle *desc, * @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, +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); @@ -326,9 +319,9 @@ void GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds, * @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 @@ -395,9 +388,8 @@ void GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to, int nfd); * @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); /** diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index b285e3b60..d2474d2d8 100644 --- a/src/include/gnunet_os_lib.h +++ b/src/include/gnunet_os_lib.h @@ -149,8 +149,7 @@ char *GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind * @param addrlen length of the address * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort */ -typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls, - const char *name, +typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls, const char *name, int isDefault, const struct sockaddr * addr, socklen_t addrlen); @@ -342,10 +341,10 @@ 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); /** diff --git a/src/include/gnunet_peerinfo_service.h b/src/include/gnunet_peerinfo_service.h index 04c63cbb1..2013eb60f 100644 --- a/src/include/gnunet_peerinfo_service.h +++ b/src/include/gnunet_peerinfo_service.h @@ -83,9 +83,8 @@ void GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h); * @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); /** @@ -97,11 +96,11 @@ GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h, * @param hello hello message for the peer (can be NULL) * @param error message */ -typedef void - (*GNUNET_PEERINFO_Processor) (void *cls, - const struct GNUNET_PeerIdentity * peer, - const struct GNUNET_HELLO_Message * hello, - const char *err_msg); +typedef void (*GNUNET_PEERINFO_Processor) (void *cls, + const struct GNUNET_PeerIdentity * + peer, + const struct GNUNET_HELLO_Message * + hello, const char *err_msg); /** @@ -148,8 +147,8 @@ struct GNUNET_PEERINFO_IteratorContext *GNUNET_PEERINFO_iterate (struct * * @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); diff --git a/src/include/gnunet_program_lib.h b/src/include/gnunet_program_lib.h index b01703f05..8881bfa9d 100644 --- a/src/include/gnunet_program_lib.h +++ b/src/include/gnunet_program_lib.h @@ -47,8 +47,7 @@ extern "C" * @param cfgfile name of the configuration file used (for saving, can be NULL!) * @param cfg configuration */ -typedef void (*GNUNET_PROGRAM_Main) (void *cls, - char *const *args, +typedef void (*GNUNET_PROGRAM_Main) (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle * cfg); @@ -67,9 +66,7 @@ typedef void (*GNUNET_PROGRAM_Main) (void *cls, * @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, +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); diff --git a/src/include/gnunet_pseudonym_lib.h b/src/include/gnunet_pseudonym_lib.h index a0f202a3c..7a9373cc4 100644 --- a/src/include/gnunet_pseudonym_lib.h +++ b/src/include/gnunet_pseudonym_lib.h @@ -49,11 +49,9 @@ extern "C" * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort */ typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls, - const GNUNET_HashCode * - pseudonym, - const struct - GNUNET_CONTAINER_MetaData * md, - int rating); + const GNUNET_HashCode * pseudonym, + const struct GNUNET_CONTAINER_MetaData + * md, int rating); /** * Change the ranking of a pseudonym. @@ -105,9 +103,8 @@ int GNUNET_PSEUDONYM_discovery_callback_register (const struct /** * 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. diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index c09153e31..9ab3a3a84 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h @@ -190,8 +190,8 @@ struct GNUNET_SCHEDULER_TaskContext * @param tc context information (why was this task triggered now) */ typedef void (*GNUNET_SCHEDULER_Task) (void *cls, - const struct - GNUNET_SCHEDULER_TaskContext * tc); + const struct GNUNET_SCHEDULER_TaskContext + * tc); /** @@ -280,10 +280,9 @@ void *GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task); * @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); /** @@ -316,9 +315,13 @@ GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_TaskIdentifier prerequisite_task, * @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); /** @@ -330,8 +333,8 @@ GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, * @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); /** @@ -348,10 +351,12 @@ GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls); * @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); /** @@ -366,9 +371,12 @@ GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, * @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); /** @@ -387,10 +395,15 @@ GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, * @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); /** @@ -409,10 +422,15 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, * @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); /** @@ -431,10 +449,15 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, * @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); /** @@ -453,10 +476,16 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, * @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); /** @@ -491,14 +520,23 @@ GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay, * @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). @@ -506,9 +544,8 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio, * @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 */ diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h index e4b856db0..d9663ac82 100644 --- a/src/include/gnunet_server_lib.h +++ b/src/include/gnunet_server_lib.h @@ -73,8 +73,8 @@ struct GNUNET_SERVER_Client; typedef void (*GNUNET_SERVER_MessageCallback) (void *cls, struct GNUNET_SERVER_Client * client, - const struct - GNUNET_MessageHeader * message); + const struct GNUNET_MessageHeader + * message); @@ -173,10 +173,9 @@ void GNUNET_SERVER_destroy (struct GNUNET_SERVER_Handle *s); * 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); /** @@ -222,8 +221,8 @@ void GNUNET_SERVER_client_persist_ (struct GNUNET_SERVER_Client *client); * 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); /** @@ -234,9 +233,8 @@ GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client, int success); * @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); /** @@ -246,9 +244,8 @@ GNUNET_SERVER_client_set_timeout (struct GNUNET_SERVER_Client *client, * * @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); /** @@ -266,10 +263,9 @@ GNUNET_SERVER_disable_receive_done_warning (struct GNUNET_SERVER_Client * 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); /** @@ -334,8 +330,8 @@ int GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client, * for the last call when the server is destroyed */ typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls, - struct GNUNET_SERVER_Client - * client); + struct GNUNET_SERVER_Client * + client); /** @@ -353,8 +349,8 @@ typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls, * @param callback_cls closure for callback */ void GNUNET_SERVER_disconnect_notify (struct GNUNET_SERVER_Handle *server, - GNUNET_SERVER_DisconnectCallback - callback, void *callback_cls); + GNUNET_SERVER_DisconnectCallback callback, + void *callback_cls); /** @@ -392,8 +388,8 @@ void GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client); * @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); @@ -438,10 +434,10 @@ struct GNUNET_SERVER_TransmitContext * @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); /** @@ -452,12 +448,11 @@ GNUNET_SERVER_transmit_context_append_data (struct GNUNET_SERVER_TransmitContext * @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); /** @@ -469,9 +464,9 @@ GNUNET_SERVER_transmit_context_append_message (struct * @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); @@ -506,10 +501,9 @@ struct GNUNET_SERVER_NotificationContext * * @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); /** @@ -518,10 +512,11 @@ GNUNET_SERVER_notification_context_destroy (struct * @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); /** @@ -533,13 +528,14 @@ GNUNET_SERVER_notification_context_add (struct GNUNET_SERVER_NotificationContext * @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); /** @@ -549,12 +545,12 @@ GNUNET_SERVER_notification_context_unicast (struct * @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); @@ -571,8 +567,7 @@ struct GNUNET_SERVER_MessageStreamTokenizer; * @param client identification of the client * @param message the actual message */ -typedef void (*GNUNET_SERVER_MessageTokenizerCallback) (void *cls, - void *client, +typedef void (*GNUNET_SERVER_MessageTokenizerCallback) (void *cls, void *client, const struct GNUNET_MessageHeader * message); @@ -606,11 +601,9 @@ struct GNUNET_SERVER_MessageStreamTokenizer * 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); /** @@ -618,8 +611,8 @@ GNUNET_SERVER_mst_receive (struct GNUNET_SERVER_MessageStreamTokenizer *mst, * * @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 */ diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h index fca2ff329..79453cbf6 100644 --- a/src/include/gnunet_service_lib.h +++ b/src/include/gnunet_service_lib.h @@ -59,11 +59,11 @@ extern "C" * 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,12 +111,9 @@ enum GNUNET_SERVICE_Options * @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; diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h index 1807d3de0..90cc612df 100644 --- a/src/include/gnunet_statistics_service.h +++ b/src/include/gnunet_statistics_service.h @@ -61,10 +61,9 @@ struct GNUNET_STATISTICS_Handle; * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration */ -typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, - const char *subsystem, - const char *name, - uint64_t value, int is_persistent); +typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, const char *subsystem, + const char *name, uint64_t value, + int is_persistent); /** * Get handle for the statistics service. @@ -73,9 +72,11 @@ typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, * @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); /** @@ -102,11 +103,9 @@ void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, * @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); /** @@ -169,9 +168,9 @@ void GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh); * @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 @@ -182,9 +181,9 @@ GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, * @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); diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h index 3e15a24c8..dd78aee35 100644 --- a/src/include/gnunet_strings_lib.h +++ b/src/include/gnunet_strings_lib.h @@ -69,8 +69,8 @@ char *GNUNET_STRINGS_byte_size_fancy (unsigned long long size); * @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); /** @@ -104,8 +104,8 @@ char *GNUNET_STRINGS_filename_expand (const char *fil); * @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 +122,7 @@ size_t GNUNET_STRINGS_buffer_fill (char *buffer, * @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 GNUNET_STRINGS_buffer_tokenize (const char *buffer, size_t size, unsigned int count, ...); diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h index 1111f576c..cd673a082 100644 --- a/src/include/gnunet_testing_lib.h +++ b/src/include/gnunet_testing_lib.h @@ -490,8 +490,8 @@ struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_start (const struct * * @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. @@ -510,10 +510,9 @@ int GNUNET_TESTING_daemon_running (struct GNUNET_TESTING_Daemon *daemon); * @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 @@ -524,11 +523,10 @@ GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d, * @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. @@ -539,12 +537,11 @@ GNUNET_TESTING_daemon_start_stopped (struct GNUNET_TESTING_Daemon *daemon, * @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. @@ -555,13 +552,12 @@ GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d, * @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. @@ -603,11 +599,11 @@ struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_get_by_id (struct * @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); /** @@ -635,12 +631,11 @@ void GNUNET_TESTING_daemon_reconfigure (struct GNUNET_TESTING_Daemon *d, * @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. @@ -715,8 +710,8 @@ struct GNUNET_TESTING_PeerGroup *GNUNET_TESTING_daemons_start (const struct * * @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); /** @@ -733,14 +728,13 @@ GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup *pg); * @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); /** @@ -750,10 +744,9 @@ GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, * @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); /** @@ -764,10 +757,10 @@ GNUNET_TESTING_daemons_restart (struct GNUNET_TESTING_PeerGroup *pg, * @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); /** @@ -777,8 +770,8 @@ GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg, * * @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 @@ -803,13 +796,12 @@ GNUNET_TESTING_daemons_running (struct GNUNET_TESTING_PeerGroup *pg); * @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. * @@ -821,12 +813,11 @@ GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg, * @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. @@ -856,11 +847,10 @@ typedef int (*GNUNET_TESTING_STATISTICS_Iterator) (void *cls, * @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. @@ -975,9 +965,8 @@ enum GNUNET_TESTING_TopologyOption * @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. @@ -988,10 +977,9 @@ GNUNET_TESTING_topology_get (enum GNUNET_TESTING_Topology *topology, * @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); /** @@ -1030,11 +1018,13 @@ GNUNET_TESTING_topology_option_get (enum GNUNET_TESTING_TopologyOption * @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 @@ -1044,9 +1034,8 @@ GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg, * @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. @@ -1084,15 +1073,15 @@ void GNUNET_TESTING_resume_connections (struct GNUNET_TESTING_PeerGroup *pg); * * @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. @@ -1104,12 +1093,11 @@ GNUNET_TESTING_connect_topology (struct GNUNET_TESTING_PeerGroup *pg, * @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 @@ -1155,11 +1143,11 @@ struct GNUNET_TESTING_PeerGroup *GNUNET_TESTING_peergroup_start (const struct * @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 */ diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h index be35ff131..ffae1ce51 100644 --- a/src/include/gnunet_time_lib.h +++ b/src/include/gnunet_time_lib.h @@ -199,8 +199,7 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute (struct * @return timestamp that is smaller */ struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct - GNUNET_TIME_Relative - t1, + GNUNET_TIME_Relative t1, struct GNUNET_TIME_Relative t2); @@ -213,8 +212,7 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct * @return timestamp that is larger */ struct GNUNET_TIME_Relative GNUNET_TIME_relative_max (struct - GNUNET_TIME_Relative - t1, + GNUNET_TIME_Relative t1, struct GNUNET_TIME_Relative t2); @@ -226,8 +224,7 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_max (struct * @return timestamp that is smaller */ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct - GNUNET_TIME_Absolute - t1, + GNUNET_TIME_Absolute t1, struct GNUNET_TIME_Absolute t2); @@ -239,8 +236,7 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct * @return timestamp that is smaller */ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_max (struct - GNUNET_TIME_Absolute - t1, + GNUNET_TIME_Absolute t1, struct GNUNET_TIME_Absolute t2); @@ -374,9 +370,12 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_add (struct * @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); /** diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h index b90f3f1cf..d7ca62219 100644 --- a/src/include/gnunet_transport_plugin.h +++ b/src/include/gnunet_transport_plugin.h @@ -138,8 +138,7 @@ typedef struct * the specific address format depends on the transport * @param addrlen length of the address */ -typedef void (*GNUNET_TRANSPORT_AddressNotification) (void *cls, - int add_remove, +typedef void (*GNUNET_TRANSPORT_AddressNotification) (void *cls, int add_remove, const void *addr, size_t addrlen); @@ -254,10 +253,10 @@ struct GNUNET_TRANSPORT_PluginEnvironment * disconnect will ALSO be signalled using * the ReceiveCallback. */ -typedef void - (*GNUNET_TRANSPORT_TransmitContinuation) (void *cls, - const struct GNUNET_PeerIdentity * - target, int result); +typedef void (*GNUNET_TRANSPORT_TransmitContinuation) (void *cls, + const struct + GNUNET_PeerIdentity * + target, int result); /** @@ -296,20 +295,22 @@ typedef void * -1 on hard errors (i.e. address invalid); 0 is a legal value * and does NOT mean that the message was not transmitted (DV) */ -typedef ssize_t - (*GNUNET_TRANSPORT_TransmitFunction) (void *cls, - const struct GNUNET_PeerIdentity * - target, - const char *msgbuf, - size_t msgbuf_size, - uint32_t priority, - struct GNUNET_TIME_Relative timeout, - struct Session * session, - const void *addr, - size_t addrlen, - int force_address, - GNUNET_TRANSPORT_TransmitContinuation - cont, void *cont_cls); +typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls, + const struct + GNUNET_PeerIdentity * + target, + const char *msgbuf, + size_t msgbuf_size, + uint32_t priority, + struct + GNUNET_TIME_Relative + timeout, + struct Session * session, + const void *addr, + size_t addrlen, + int force_address, + GNUNET_TRANSPORT_TransmitContinuation + cont, void *cont_cls); /** @@ -328,10 +329,10 @@ typedef ssize_t * @param target peer for which the last transmission is * to be cancelled */ -typedef void - (*GNUNET_TRANSPORT_DisconnectFunction) (void *cls, - const struct GNUNET_PeerIdentity * - target); +typedef void (*GNUNET_TRANSPORT_DisconnectFunction) (void *cls, + const struct + GNUNET_PeerIdentity * + target); /** @@ -360,16 +361,16 @@ typedef void (*GNUNET_TRANSPORT_AddressStringCallback) (void *cls, * @param asc function to call on each string * @param asc_cls closure for asc */ -typedef void - (*GNUNET_TRANSPORT_AddressPrettyPrinter) (void *cls, - const char *type, - const void *addr, - size_t addrlen, - int numeric, - struct GNUNET_TIME_Relative - timeout, - GNUNET_TRANSPORT_AddressStringCallback - asc, void *asc_cls); +typedef void (*GNUNET_TRANSPORT_AddressPrettyPrinter) (void *cls, + const char *type, + const void *addr, + size_t addrlen, + int numeric, + struct + GNUNET_TIME_Relative + timeout, + GNUNET_TRANSPORT_AddressStringCallback + asc, void *asc_cls); /** @@ -386,9 +387,8 @@ typedef void * @return GNUNET_OK if this is a plausible address for this peer * and transport, GNUNET_SYSERR if not */ -typedef int - (*GNUNET_TRANSPORT_CheckAddress) (void *cls, - const void *addr, size_t addrlen); +typedef int (*GNUNET_TRANSPORT_CheckAddress) (void *cls, const void *addr, + size_t addrlen); /** diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index f4cc88e55..7e0656956 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h @@ -426,12 +426,12 @@ struct GNUNET_TRANSPORT_Handle; * @param ats performance data * @param ats_count number of entries in ats (excluding 0-termination) */ -typedef void - (*GNUNET_TRANSPORT_NotifyConnect) (void *cls, - const struct GNUNET_PeerIdentity * peer, - const struct - GNUNET_TRANSPORT_ATS_Information * ats, - uint32_t ats_count); +typedef void (*GNUNET_TRANSPORT_NotifyConnect) (void *cls, + const struct GNUNET_PeerIdentity + * peer, + const struct + GNUNET_TRANSPORT_ATS_Information + * ats, uint32_t ats_count); /** * Function called to notify transport users that another @@ -440,10 +440,9 @@ typedef void * @param cls closure * @param peer the peer that disconnected */ -typedef void - (*GNUNET_TRANSPORT_NotifyDisconnect) (void *cls, - const struct GNUNET_PeerIdentity * - peer); +typedef void (*GNUNET_TRANSPORT_NotifyDisconnect) (void *cls, + const struct + GNUNET_PeerIdentity * peer); /** @@ -452,8 +451,8 @@ typedef void * @param cls closure * @param address NULL on error, otherwise 0-terminated printable UTF-8 string */ -typedef void - (*GNUNET_TRANSPORT_AddressLookUpCallback) (void *cls, const char *address); +typedef void (*GNUNET_TRANSPORT_AddressLookUpCallback) (void *cls, + const char *address); /** @@ -498,9 +497,8 @@ void GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle); * @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); /** @@ -512,11 +510,10 @@ GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle, * @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); /** @@ -561,10 +558,9 @@ struct GNUNET_TRANSPORT_TransmitHandle * * @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); @@ -588,10 +584,9 @@ typedef void (*GNUNET_TRANSPORT_HelloUpdateCallback) (void *cls, * @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); /** @@ -601,10 +596,9 @@ GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle, * @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); /** @@ -618,10 +612,9 @@ GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle, * @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); /** @@ -637,15 +630,13 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, * @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); /** @@ -658,14 +649,14 @@ GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, * @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); /** @@ -677,12 +668,12 @@ GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle * @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); /** diff --git a/src/include/gnunet_upnp_service.h b/src/include/gnunet_upnp_service.h index 7e6ea5180..70e50b354 100644 --- a/src/include/gnunet_upnp_service.h +++ b/src/include/gnunet_upnp_service.h @@ -54,11 +54,8 @@ extern "C" * 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, +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); diff --git a/src/include/plibc.h b/src/include/plibc.h index 82079faf1..8314f2146 100644 --- a/src/include/plibc.h +++ b/src/include/plibc.h @@ -770,8 +770,7 @@ extern "C" PLIBC_SEARCH__compar_fn_t __compar); /* Remove the element matching KEY from the tree pointed to by *ROOTP. */ - void *_win_tdelete (__const void *__restrict __key, - void **__restrict __rootp, + void *_win_tdelete (__const void *__restrict __key, void **__restrict __rootp, PLIBC_SEARCH__compar_fn_t __compar); typedef void (*PLIBC_SEARCH__action_fn_t) (__const void *__nodep, @@ -792,15 +791,13 @@ extern "C" /* Perform linear search for KEY by comparing by COMPAR in an array [BASE,BASE+NMEMB*SIZE). */ - void *_win_lfind (__const void *__key, __const void *__base, - size_t * __nmemb, size_t __size, - PLIBC_SEARCH__compar_fn_t __compar); + void *_win_lfind (__const void *__key, __const void *__base, size_t * __nmemb, + size_t __size, PLIBC_SEARCH__compar_fn_t __compar); /* Perform linear search for KEY by comparing by COMPAR function in array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */ - void *_win_lsearch (__const void *__key, void *__base, - size_t * __nmemb, size_t __size, - PLIBC_SEARCH__compar_fn_t __compar); + void *_win_lsearch (__const void *__key, void *__base, size_t * __nmemb, + size_t __size, PLIBC_SEARCH__compar_fn_t __compar); #ifdef __cplusplus diff --git a/src/include/winproc.h b/src/include/winproc.h index 1c7703799..05c4ac1bf 100644 --- a/src/include/winproc.h +++ b/src/include/winproc.h @@ -109,12 +109,11 @@ extern "C" DWORD level, LPBYTE buf, LPDWORD parm_err); typedef NTSTATUS NTAPI (*TLsaOpenPolicy) (PLSA_UNICODE_STRING, - PLSA_OBJECT_ATTRIBUTES, - ACCESS_MASK, PLSA_HANDLE); + PLSA_OBJECT_ATTRIBUTES, ACCESS_MASK, + PLSA_HANDLE); typedef NTSTATUS NTAPI (*TLsaAddAccountRights) (LSA_HANDLE, PSID, PLSA_UNICODE_STRING, ULONG); - typedef NTSTATUS NTAPI (*TLsaRemoveAccountRights) (LSA_HANDLE, PSID, - BOOLEAN, + typedef NTSTATUS NTAPI (*TLsaRemoveAccountRights) (LSA_HANDLE, PSID, BOOLEAN, PLSA_UNICODE_STRING, ULONG); typedef NTSTATUS NTAPI (*TLsaClose) (LSA_HANDLE); @@ -139,8 +138,7 @@ extern "C" LPBOOL lpbDaclPresent, PACL * pDacl, LPBOOL lpbDaclDefaulted); - typedef BOOL WINAPI (*TGetAclInformation) (PACL pAcl, - LPVOID pAclInformation, + typedef BOOL WINAPI (*TGetAclInformation) (PACL pAcl, LPVOID pAclInformation, DWORD nAclInformationLength, ACL_INFORMATION_CLASS dwAclInformationClass); diff --git a/src/transport/gnunet-service-transport_ats.h b/src/transport/gnunet-service-transport_ats.h index d1d789b5f..88e4b4bbf 100644 --- a/src/transport/gnunet-service-transport_ats.h +++ b/src/transport/gnunet-service-transport_ats.h @@ -67,9 +67,11 @@ struct ATS_mechanism; struct ATS_peer; -typedef void (*GNUNET_TRANSPORT_ATS_AddressNotification) - (struct ATS_peer ** peers, - int *c_p, struct ATS_mechanism ** mechanisms, int *c_m); +typedef void (*GNUNET_TRANSPORT_ATS_AddressNotification) (struct ATS_peer ** + peers, int *c_p, + struct ATS_mechanism + ** mechanisms, + int *c_m); typedef void (*GNUNET_TRANSPORT_ATS_ResultCallback) (void); @@ -447,12 +449,8 @@ static struct ATS_quality_metric qm[] = { /* * 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 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, @@ -462,23 +460,18 @@ void ats_shutdown (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_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); @@ -487,10 +480,9 @@ void ats_update_problem_qm (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 */ diff --git a/src/transport/gnunet-service-transport_blacklist.h b/src/transport/gnunet-service-transport_blacklist.h index 4823d055d..7e88b3961 100644 --- a/src/transport/gnunet-service-transport_blacklist.h +++ b/src/transport/gnunet-service-transport_blacklist.h @@ -52,10 +52,8 @@ void GST_blacklist_stop (void); * @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. @@ -64,10 +62,8 @@ GST_blacklist_handle_init (void *cls, * @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). @@ -75,9 +71,8 @@ GST_blacklist_handle_reply (void *cls, * @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); /** diff --git a/src/transport/gnunet-service-transport_clients.h b/src/transport/gnunet-service-transport_clients.h index 7c79eec15..6bcc18cd3 100644 --- a/src/transport/gnunet-service-transport_clients.h +++ b/src/transport/gnunet-service-transport_clients.h @@ -50,8 +50,8 @@ void GST_clients_stop (void); * @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,9 +61,8 @@ GST_clients_broadcast (const struct GNUNET_MessageHeader *msg, int may_drop); * @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); diff --git a/src/transport/gnunet-service-transport_hello.h b/src/transport/gnunet-service-transport_hello.h index 8aac2838a..ff817814b 100644 --- a/src/transport/gnunet-service-transport_hello.h +++ b/src/transport/gnunet-service-transport_hello.h @@ -80,11 +80,9 @@ const struct GNUNET_MessageHeader *GST_hello_get (void); * @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); /** @@ -99,12 +97,10 @@ GST_hello_modify_addresses (int addremove, * @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 diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h index c263c33d9..c0cee01a6 100644 --- a/src/transport/gnunet-service-transport_neighbours.h +++ b/src/transport/gnunet-service-transport_neighbours.h @@ -43,10 +43,8 @@ * @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); /** @@ -91,12 +89,10 @@ typedef void (*GST_NeighbourSendContinuation) (void *cls, int success); * @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); /** @@ -110,9 +106,13 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target, * 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); /** @@ -130,9 +130,10 @@ void GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour); * @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); /** @@ -174,9 +175,8 @@ void GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls); * @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,14 +192,13 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, * @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 diff --git a/src/transport/gnunet-service-transport_plugins.h b/src/transport/gnunet-service-transport_plugins.h index f3f46e342..ebc8fa451 100644 --- a/src/transport/gnunet-service-transport_plugins.h +++ b/src/transport/gnunet-service-transport_plugins.h @@ -42,10 +42,9 @@ * @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); /** @@ -72,8 +71,8 @@ struct GNUNET_TRANSPORT_PluginFunctions *GST_plugins_find (const char *name); * @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 diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h index bdf8bd9ed..86ede1576 100644 --- a/src/transport/gnunet-service-transport_validation.h +++ b/src/transport/gnunet-service-transport_validation.h @@ -54,13 +54,12 @@ void GST_validation_stop (void); * 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); /** @@ -70,9 +69,8 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender, * @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); /** @@ -124,9 +122,9 @@ typedef void (*GST_ValidationAddressCallback) (void *cls, * @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 diff --git a/src/transport/transport-testing.h b/src/transport/transport-testing.h index a867df4c1..a21ccc11f 100644 --- a/src/transport/transport-testing.h +++ b/src/transport/transport-testing.h @@ -102,10 +102,9 @@ void GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext *pc); * @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 */ diff --git a/src/transport/wlan/byteorder.h b/src/transport/wlan/byteorder.h index e065e24d6..b09328320 100644 --- a/src/transport/wlan/byteorder.h +++ b/src/transport/wlan/byteorder.h @@ -22,33 +22,29 @@ #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))) + ((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_int32_t) (\ - (((u_int32_t) (x) & (u_int32_t) 0x000000ffUL) << 24) | \ - (((u_int32_t) (x) & (u_int32_t) 0x0000ff00UL) << 8) | \ - (((u_int32_t) (x) & (u_int32_t) 0x00ff0000UL) >> 8) | \ - (((u_int32_t) (x) & (u_int32_t) 0xff000000UL) >> 24))) + ((u_int32_t) + (\ (((u_int32_t) (x) & (u_int32_t) 0x000000ffUL) << 24) | + \ (((u_int32_t) (x) & (u_int32_t) 0x0000ff00UL) << 8) | + \ (((u_int32_t) (x) & (u_int32_t) 0x00ff0000UL) >> 8) | + \ (((u_int32_t) (x) & (u_int32_t) 0xff000000UL) >> 24))) #define ___my_swab64(x) \ - ((u_int64_t) (\ - (u_int64_t) (((u_int64_t) (x) & (u_int64_t) - 0x00000000000000ffULL) << 56) | - \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) - 0x000000000000ff00ULL) << 40) | - \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) - 0x0000000000ff0000ULL) << 24) | - \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) - 0x00000000ff000000ULL) << 8) | - \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) - 0x000000ff00000000ULL) >> 8) | - \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) - 0x0000ff0000000000ULL) >> 24) | - \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) - 0x00ff000000000000ULL) >> 40) | - \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) - 0xff00000000000000ULL) >> 56))) + ((u_int64_t) + (\ (u_int64_t) + (((u_int64_t) (x) & (u_int64_t) 0x00000000000000ffULL) << 56) | + \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 0x000000000000ff00ULL) << + 40) | \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) + 0x0000000000ff0000ULL) << 24) | + \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 0x00000000ff000000ULL) << 8) + | \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 0x000000ff00000000ULL) >> + 8) | \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) + 0x0000ff0000000000ULL) >> 24) | + \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 0x00ff000000000000ULL) >> + 40) | \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) + 0xff00000000000000ULL) >> 56))) /* * Linux */ diff --git a/src/util/disk.h b/src/util/disk.h index 8c48b85ca..b60150f3a 100644 --- a/src/util/disk.h +++ b/src/util/disk.h @@ -37,7 +37,7 @@ * @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_ */ diff --git a/src/vpn/gnunet-daemon-vpn-helper.h b/src/vpn/gnunet-daemon-vpn-helper.h index 963fafd09..8e0ee5a0f 100644 --- a/src/vpn/gnunet-daemon-vpn-helper.h +++ b/src/vpn/gnunet-daemon-vpn-helper.h @@ -62,8 +62,8 @@ void helper_write (void *cls, /** * 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); diff --git a/src/vpn/gnunet-daemon-vpn.h b/src/vpn/gnunet-daemon-vpn.h index ac6e50c72..4f4cf5a0f 100644 --- a/src/vpn/gnunet-daemon-vpn.h +++ b/src/vpn/gnunet-daemon-vpn.h @@ -42,18 +42,16 @@ void send_icmp6_response (void *cls, 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); 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 -- cgit v1.2.3