even nicer indentation, thanks to LRN's indent patch
authorChristian Grothoff <christian@grothoff.org>
Tue, 16 Aug 2011 16:03:20 +0000 (16:03 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 16 Aug 2011 16:03:20 +0000 (16:03 +0000)
197 files changed:
.indent.pro
pre-commit
src/arm/gnunet-arm.c
src/arm/gnunet-service-arm.c
src/arm/gnunet-service-arm.h
src/arm/gnunet-service-arm_interceptor.c
src/arm/test_exponential_backoff.c
src/chat/chat.c
src/chat/gnunet-chat.c
src/core/core_api.c
src/core/gnunet-service-core.c
src/core/test_core_api_preferences.c
src/core/test_core_api_reliability.c
src/core/test_core_quota_compliance.c
src/datacache/perf_datacache.c
src/datastore/datastore_api.c
src/datastore/gnunet-service-datastore.c
src/datastore/perf_datastore_api.c
src/datastore/perf_plugin_datastore.c
src/datastore/plugin_datastore_mysql.c
src/datastore/test_datastore_api.c
src/datastore/test_datastore_api_management.c
src/datastore/test_plugin_datastore.c
src/dht/dht_api.c
src/dht/dhtlog.h
src/dht/gnunet-dht-driver.c
src/dht/gnunet-service-dht.c
src/dht/plugin_dhtlog_dummy.c
src/dht/test_dht_api.c
src/dht/test_dht_twopeer.c
src/dv/dv.h
src/dv/dv_api.c
src/dv/gnunet-service-dv.c
src/dv/test_transport_api_dv.c
src/fs/fs.c
src/fs/fs.h
src/fs/fs_download.c
src/fs/fs_file_information.c
src/fs/fs_publish.c
src/fs/fs_search.c
src/fs/fs_test_lib.h
src/fs/fs_tree.c
src/fs/fs_tree.h
src/fs/fs_uri.c
src/fs/gnunet-download.c
src/fs/gnunet-publish.c
src/fs/gnunet-search.c
src/fs/gnunet-service-fs.h
src/fs/gnunet-service-fs_cp.c
src/fs/gnunet-service-fs_cp.h
src/fs/gnunet-service-fs_indexing.c
src/fs/gnunet-service-fs_indexing.h
src/fs/gnunet-service-fs_lc.h
src/fs/gnunet-service-fs_pe.c
src/fs/gnunet-service-fs_pe.h
src/fs/gnunet-service-fs_pr.c
src/fs/gnunet-service-fs_pr.h
src/fs/gnunet-service-fs_push.c
src/fs/gnunet-service-fs_push.h
src/fs/gnunet-service-fs_put.c
src/fs/gnunet-service-fs_put.h
src/fs/perf_gnunet_service_fs_p2p.c
src/fs/perf_gnunet_service_fs_p2p_trust.c
src/fs/test_fs_download.c
src/fs/test_fs_download_indexed.c
src/fs/test_fs_download_persistence.c
src/fs/test_fs_list_indexed.c
src/fs/test_fs_publish.c
src/fs/test_fs_publish_persistence.c
src/fs/test_fs_search.c
src/fs/test_fs_search_persistence.c
src/fs/test_fs_unindex.c
src/fs/test_fs_unindex_persistence.c
src/hostlist/hostlist-client.c
src/hostlist/hostlist-client.h
src/hostlist/hostlist-server.c
src/hostlist/hostlist-server.h
src/include/gnunet_arm_service.h
src/include/gnunet_ats_service.h
src/include/gnunet_bandwidth_lib.h
src/include/gnunet_bio_lib.h
src/include/gnunet_block_lib.h
src/include/gnunet_chat_service.h
src/include/gnunet_client_lib.h
src/include/gnunet_common.h
src/include/gnunet_configuration_lib.h
src/include/gnunet_connection_lib.h
src/include/gnunet_container_lib.h
src/include/gnunet_core_service.h
src/include/gnunet_crypto_lib.h
src/include/gnunet_datacache_lib.h
src/include/gnunet_datastore_service.h
src/include/gnunet_dht_service.h
src/include/gnunet_disk_lib.h
src/include/gnunet_dv_service.h
src/include/gnunet_fragmentation_lib.h
src/include/gnunet_fs_service.h
src/include/gnunet_getopt_lib.h
src/include/gnunet_hello_lib.h
src/include/gnunet_load_lib.h
src/include/gnunet_mesh_service.h
src/include/gnunet_mesh_service_new.h
src/include/gnunet_nat_lib.h
src/include/gnunet_network_lib.h
src/include/gnunet_nse_service.h
src/include/gnunet_os_lib.h
src/include/gnunet_peer_lib.h
src/include/gnunet_peerinfo_service.h
src/include/gnunet_plugin_lib.h
src/include/gnunet_program_lib.h
src/include/gnunet_pseudonym_lib.h
src/include/gnunet_resolver_service.h
src/include/gnunet_scheduler_lib.h
src/include/gnunet_server_lib.h
src/include/gnunet_service_lib.h
src/include/gnunet_signal_lib.h
src/include/gnunet_statistics_service.h
src/include/gnunet_strings_lib.h
src/include/gnunet_testing_lib.h
src/include/gnunet_time_lib.h
src/include/gnunet_transport_service.h
src/include/gnunet_upnp_service.h
src/include/platform.h
src/mesh/test_mesh_small.c
src/nat/nat.c
src/nat/nat_mini.c
src/nse/gnunet-nse-profiler.c
src/nse/gnunet-service-nse.c
src/nse/nse_api.c
src/peerinfo/peerinfo_api.c
src/peerinfo/peerinfo_api_notify.c
src/statistics/statistics_api.c
src/testing/test_testing_reconnect.c
src/testing/testing.c
src/testing/testing_group.c
src/testing/testing_peergroup.c
src/topology/gnunet-daemon-topology.c
src/transport/gnunet-service-transport-new.c
src/transport/gnunet-service-transport.c
src/transport/gnunet-service-transport_ats.c
src/transport/gnunet-service-transport_ats.h
src/transport/gnunet-service-transport_blacklist.c
src/transport/gnunet-service-transport_blacklist.h
src/transport/gnunet-service-transport_clients.h
src/transport/gnunet-service-transport_hello.h
src/transport/gnunet-service-transport_neighbours.c
src/transport/gnunet-service-transport_neighbours.h
src/transport/gnunet-service-transport_plugins.h
src/transport/gnunet-service-transport_validation.h
src/transport/gnunet-transport-wlan-helper.c
src/transport/plugin_transport_http.c
src/transport/plugin_transport_smtp.c
src/transport/plugin_transport_tcp.c
src/transport/plugin_transport_udp.c
src/transport/plugin_transport_unix.c
src/transport/plugin_transport_wlan.c
src/transport/test_plugin_transport_http.c
src/transport/test_plugin_transport_https.c
src/transport/test_quota_compliance.c
src/transport/test_transport_api_disconnect.c
src/transport/transport-testing.c
src/transport/transport-testing.h
src/transport/transport_api.c
src/transport/transport_api_blacklist.c
src/transport/wlan/byteorder.h
src/transport/wlan/helper_common.h
src/transport/wlan/loopback_helper.h
src/transport/wlan/radiotap-parser.c
src/transport/wlan/radiotap-parser.h
src/util/client.c
src/util/connection.c
src/util/container_heap.c
src/util/container_meta_data.c
src/util/crypto_rsa.c
src/util/disk.h
src/util/getopt.c
src/util/os_network.c
src/util/os_priority.c
src/util/peer.c
src/util/perf_crypto_hash.c
src/util/resolver_api.c
src/util/scheduler.c
src/util/server.c
src/util/server_nc.c
src/util/test_crypto_ksk.c
src/util/test_crypto_rsa.c
src/util/test_os_network.c
src/util/test_time.c
src/vpn/gnunet-daemon-vpn-dns.h
src/vpn/gnunet-daemon-vpn-helper.c
src/vpn/gnunet-daemon-vpn-helper.h
src/vpn/gnunet-daemon-vpn.c
src/vpn/gnunet-daemon-vpn.h
src/vpn/gnunet-dns-parser.h
src/vpn/gnunet-helper-vpn-api.h
src/vpn/gnunet-service-dns.c
src/vpn/gnunet-vpn-checksum.h

index 7009a91403d7875f39bb17c5cab52b7a3b7fc07c..89b4984ad6158ef2ebed0d5a915b70507990db1b 100644 (file)
@@ -1,3 +1,5 @@
+//LRN extension for return values for prototypes
+-nddd
 //GNU (default) style:         
 //
 //-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
index 2fc554236d70d8352596bfe18ce68fc32f308d24..da86ca59cc4c971e85cf1f40becabc6c699dd096 100755 (executable)
@@ -1,8 +1,8 @@
 #!/bin/sh
 find src/ -name "*.c" -exec indent {} \;
-find src/ -name "*.c" -exec indent {} \;
+find src/ -name "*.h" -exec indent {} \;
 if test -x "`which 'dos2unix'`"
 then
   find src/ -name "*.c" -exec dos2unix {} \;
-  find src/ -name "*.c" -exec dos2unix {} \;
+  find src/ -name "*.h" -exec dos2unix {} \;
 fi
index cf5e1592aa7a0bdc045536cc50e6f35e160aecc9..7e108cb41d8db9315dca4e0f1099bf12f44b3a0a 100644 (file)
@@ -138,7 +138,8 @@ static struct GNUNET_TIME_Relative timeout;
  * @param cls closure, unused
  * @param tc context, unused
  */
-static void cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -305,9 +306,8 @@ cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       {
         GNUNET_ARM_stop_service (h, "arm",
                                  (0 ==
-                                  timeout.
-                                  rel_value) ? STOP_TIMEOUT_ARM : timeout,
-                                 &confirm_cb, "arm");
+                                  timeout.rel_value) ? STOP_TIMEOUT_ARM :
+                                 timeout, &confirm_cb, "arm");
         return;
       }
       break;
@@ -336,9 +336,8 @@ cps_loop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       {
         GNUNET_CLIENT_service_test (test, cfg,
                                     (0 ==
-                                     timeout.
-                                     rel_value) ? TEST_TIMEOUT : timeout,
-                                    &confirm_task, test);
+                                     timeout.rel_value) ? TEST_TIMEOUT :
+                                    timeout, &confirm_task, test);
         return;
       }
       break;
index ddccb7fa0cc01f226edbf1e172952cce2fa89167..e85b2eb129bb51a7a24c20fa1138e67405c73966 100644 (file)
@@ -722,8 +722,8 @@ delayed_restart_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       {
         lowestRestartDelay =
             GNUNET_TIME_relative_min (lowestRestartDelay,
-                                      GNUNET_TIME_absolute_get_remaining (pos->
-                                                                          restartAt));
+                                      GNUNET_TIME_absolute_get_remaining
+                                      (pos->restartAt));
       }
     }
     pos = pos->next;
index bdb5d2c9323126b8de30f5a0b9bbe574d7406fd2..e8d125b926ba0122affde6c383525b5dbcb61dcb 100644 (file)
@@ -35,8 +35,9 @@
  * @param lsocks -1 terminated list of listen sockets to pass (systemd style), or NULL
  * @return GNUNET_OK on success
  */
-int start_service (struct GNUNET_SERVER_Client *client, const char *servicename,
-                   const int *lsocks);
+int
+start_service (struct GNUNET_SERVER_Client *client, const char *servicename,
+               const int *lsocks);
 
 /**
  * Stop listening for connections to a service.
@@ -45,9 +46,10 @@ int start_service (struct GNUNET_SERVER_Client *client, const char *servicename,
  * @return GNUNET_OK if we stopped to listen, GNUNET_NO if we were
  *         not listening
  */
-int stop_listening (const char *serviceName);
+int
+stop_listening (const char *serviceName);
 
-void prepareServices (const struct GNUNET_CONFIGURATION_Handle
-                      *configurationHandle);
+void
+prepareServices (const struct GNUNET_CONFIGURATION_Handle *configurationHandle);
 
 #endif
index 6d417ba37536fed0cbf3ded54a3faba462073cf8..59f8ac30b2ec35b3bef4d7ce0a0d5bc04771c20f 100644 (file)
@@ -356,8 +356,8 @@ closeClientAndServiceSockets (struct ForwardedConnection *fc, int reason)
  * @param cls callback data,   struct ForwardedConnection for the communication between client and service
  * @param tc context 
  */
-static void receiveFromClient (void *cls,
-                               const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+receiveFromClient (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -366,15 +366,15 @@ static void receiveFromClient (void *cls,
  * @param cls callback data, struct ForwardedConnection for the communication between client and service
  * @param tc scheduler context
  */
-static void receiveFromService (void *cls,
-                                const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+receiveFromService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
  *
  */
-static void start_forwarding (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+start_forwarding (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 
@@ -497,8 +497,7 @@ receiveFromService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                   GNUNET_a2s (fc->listen_info->service_addr,
                               fc->listen_info->service_addr_len),
                   (unsigned long long) GNUNET_TIME_relative_min (fc->back_off,
-                                                                 rem).
-                  rel_value);
+                                                                 rem).rel_value);
 #endif
       rem = GNUNET_TIME_absolute_get_remaining (fc->timeout);
       GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task);
@@ -584,8 +583,7 @@ forwardToService (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                   GNUNET_a2s (fc->listen_info->service_addr,
                               fc->listen_info->service_addr_len),
                   (unsigned long long) GNUNET_TIME_relative_min (fc->back_off,
-                                                                 rem).
-                  rel_value);
+                                                                 rem).rel_value);
 #endif
       rem = GNUNET_TIME_absolute_get_remaining (fc->timeout);
       GNUNET_assert (GNUNET_SCHEDULER_NO_TASK == fc->start_task);
@@ -913,8 +911,8 @@ stop_listening (const char *serviceName)
  * @param cls callback data, struct ServiceListeningInfo describing a listen socket
  * @param tc context 
  */
-static void acceptConnection (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+acceptConnection (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void
@@ -948,8 +946,8 @@ accept_and_forward (struct ServiceListeningInfo *serviceListeningInfo)
     return;
   }
   GNUNET_break (GNUNET_OK ==
-                GNUNET_NETWORK_socket_close (serviceListeningInfo->
-                                             listeningSocket));
+                GNUNET_NETWORK_socket_close
+                (serviceListeningInfo->listeningSocket));
   start_service (NULL, serviceListeningInfo->serviceName, NULL);
   GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Service `%s' started\n"),
               fc->listen_info->serviceName);
index 04c52d0ebfbc399156aa14c9989fd90cdf5c65f2..3b68039b1c25bf5370efd8c4bb76a7320bac2c1a 100644 (file)
@@ -251,8 +251,8 @@ arm_notify_stop (void *cls, int success)
 }
 
 
-static void kill_task (void *cbData,
-                       const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void
@@ -273,8 +273,8 @@ arm_notify (void *cls, int success)
 }
 
 
-static void kill_task (void *cbData,
-                       const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+kill_task (void *cbData, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void
index 74dde678c6b59bd6ea09ad669fd09033150434ee..fb47b6c157269058c909cf2bc74504fe91796f00 100644 (file)
@@ -148,7 +148,8 @@ struct GNUNET_CHAT_SendReceiptContext
 /**
  * Ask client to send a join request.
  */
-static int rejoin_room (struct GNUNET_CHAT_Room *chat_room);
+static int
+rejoin_room (struct GNUNET_CHAT_Room *chat_room);
 
 
 /**
@@ -404,9 +405,8 @@ process_result (struct GNUNET_CHAT_Room *room,
     if (NULL != room->confirmation_callback)
       room->confirmation_callback (room->confirmation_cls, room,
                                    ntohl (receipt->sequence_number),
-                                   GNUNET_TIME_absolute_ntoh (receipt->
-                                                              timestamp),
-                                   &receipt->target);
+                                   GNUNET_TIME_absolute_ntoh
+                                   (receipt->timestamp), &receipt->target);
     break;
   default:
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, _("Unknown message type: '%u'\n"),
index c656d1cad2d6e8706377640f4c7d6554e115c3d9..53884a2990d04a955fd59b26aa8a4c503232c8ee 100644 (file)
@@ -76,7 +76,8 @@ free_user_list ()
   }
 }
 
-static int do_help (const char *args, const void *xtra);
+static int
+do_help (const char *args, const void *xtra);
 
 
 /**
index 5ec48d68ca6d85dbc711cf1b173a47183289163f..27754010a022d330fd9b90eb9d4ff495fa91895c 100644 (file)
@@ -371,7 +371,8 @@ struct GNUNET_CORE_TransmitHandle
  *
  * @param h our handle to the core service
  */
-static void reconnect (struct GNUNET_CORE_Handle *h);
+static void
+reconnect (struct GNUNET_CORE_Handle *h);
 
 
 /**
@@ -515,8 +516,8 @@ reconnect_later (struct GNUNET_CORE_Handle *h)
  * @param h core handle
  * @param ignore_currently_down transmit message even if not initialized?
  */
-static void trigger_next_request (struct GNUNET_CORE_Handle *h,
-                                  int ignore_currently_down);
+static void
+trigger_next_request (struct GNUNET_CORE_Handle *h, int ignore_currently_down);
 
 
 /**
@@ -526,9 +527,8 @@ static void trigger_next_request (struct GNUNET_CORE_Handle *h,
  * @param cls the transmit handle of the request that timed out
  * @param tc context, can be NULL (!)
  */
-static void transmission_timeout (void *cls,
-                                  const struct GNUNET_SCHEDULER_TaskContext
-                                  *tc);
+static void
+transmission_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -776,8 +776,8 @@ trigger_next_request (struct GNUNET_CORE_Handle *h, int ignore_currently_down)
   }
   if (h->control_pending_head != NULL)
     msize =
-        ntohs (((struct GNUNET_MessageHeader *) &h->control_pending_head[1])->
-               size);
+        ntohs (((struct GNUNET_MessageHeader *) &h->
+                control_pending_head[1])->size);
   else if (h->ready_peer_head != NULL)
     msize =
         h->ready_peer_head->pending_head->msize + sizeof (struct SendMessage);
index e97e9fe46e85767e51827520e07f68f979f3bd3c..7385991a2204278ffb096562ce9a51a9965fcd9a 100644 (file)
@@ -1807,7 +1807,8 @@ free_neighbour (struct Neighbour *n)
  *
  * @param n neighbour to check.
  */
-static void process_encrypted_neighbour_queue (struct Neighbour *n);
+static void
+process_encrypted_neighbour_queue (struct Neighbour *n);
 
 
 /**
@@ -1854,7 +1855,8 @@ do_encrypt (struct Neighbour *n,
  *
  * @param n neighbour to consider discarding
  */
-static void consider_free_neighbour (struct Neighbour *n);
+static void
+consider_free_neighbour (struct Neighbour *n);
 
 
 /**
@@ -2006,9 +2008,9 @@ notify_encrypted_transmit_ready (void *cls, size_t size, void *buf)
 #if DEBUG_CORE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Copied message of type %u and size %u into transport buffer for `%4s'\n",
-                (unsigned int) ntohs (((struct GNUNET_MessageHeader *) &m[1])->
-                                      type), (unsigned int) ret,
-                GNUNET_i2s (&n->peer));
+                (unsigned int)
+                ntohs (((struct GNUNET_MessageHeader *) &m[1])->type),
+                (unsigned int) ret, GNUNET_i2s (&n->peer));
 #endif
     process_encrypted_neighbour_queue (n);
   }
@@ -2017,8 +2019,9 @@ notify_encrypted_transmit_ready (void *cls, size_t size, void *buf)
 #if DEBUG_CORE
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Transmission of message of type %u and size %u failed\n",
-                (unsigned int) ntohs (((struct GNUNET_MessageHeader *) &m[1])->
-                                      type), (unsigned int) m->size);
+                (unsigned int)
+                ntohs (((struct GNUNET_MessageHeader *) &m[1])->type),
+                (unsigned int) m->size);
 #endif
   }
   GNUNET_free (m);
@@ -2038,7 +2041,8 @@ notify_encrypted_transmit_ready (void *cls, size_t size, void *buf)
  *
  * @param n neighbour to check.
  */
-static void process_plaintext_neighbour_queue (struct Neighbour *n);
+static void
+process_plaintext_neighbour_queue (struct Neighbour *n);
 
 
 /**
@@ -2071,9 +2075,8 @@ process_encrypted_neighbour_queue (struct Neighbour *n)
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Asking transport for transmission of %u bytes to `%4s' in next %llu ms\n",
               (unsigned int) m->size, GNUNET_i2s (&n->peer),
-              (unsigned long long) GNUNET_TIME_absolute_get_remaining (m->
-                                                                       deadline).
-              rel_value);
+              (unsigned long long)
+              GNUNET_TIME_absolute_get_remaining (m->deadline).rel_value);
 #endif
   n->th =
       GNUNET_TRANSPORT_notify_transmit_ready (transport, &n->peer, m->size,
@@ -2436,8 +2439,8 @@ batch_message (struct Neighbour *n, char *buf, size_t size,
                   (unsigned int)
                   ntohs (((const struct GNUNET_MessageHeader *) &pos[1])->type),
                   (unsigned int)
-                  ntohs (((const struct GNUNET_MessageHeader *) &pos[1])->
-                         size));
+                  ntohs (((const struct GNUNET_MessageHeader *)
+                          &pos[1])->size));
 #endif
       /* copy for encrypted transmission */
       memcpy (&buf[ret], &pos[1], pos->size);
@@ -2448,9 +2451,8 @@ batch_message (struct Neighbour *n, char *buf, size_t size,
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Adding plaintext message of size %u with deadline %llu ms to batch\n",
                   (unsigned int) pos->size,
-                  (unsigned long long) GNUNET_TIME_absolute_get_remaining (pos->
-                                                                           deadline).
-                  rel_value);
+                  (unsigned long long)
+                  GNUNET_TIME_absolute_get_remaining (pos->deadline).rel_value);
 #endif
       deadline->abs_value =
           GNUNET_MIN (deadline->abs_value, pos->deadline.abs_value);
@@ -2548,7 +2550,8 @@ retry_plaintext_processing (void *cls,
  *
  * @param n the other peer
  */
-static void send_key (struct Neighbour *n);
+static void
+send_key (struct Neighbour *n);
 
 /**
  * Task that will retry "send_key" if our previous attempt failed
@@ -2734,9 +2737,9 @@ process_plaintext_neighbour_queue (struct Neighbour *n)
  * @param cls neighbour for the quota update
  * @param tc context
  */
-static void neighbour_quota_update (void *cls,
-                                    const struct GNUNET_SCHEDULER_TaskContext
-                                    *tc);
+static void
+neighbour_quota_update (void *cls,
+                        const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -3269,9 +3272,9 @@ send_key (struct Neighbour *n)
 #if DEBUG_CORE
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Have %llu ms left for `%s' transmission.\n",
-              (unsigned long long) GNUNET_TIME_absolute_get_remaining (me->
-                                                                       deadline).
-              rel_value, "SET_KEY");
+              (unsigned long long)
+              GNUNET_TIME_absolute_get_remaining (me->deadline).rel_value,
+              "SET_KEY");
 #endif
 trigger_processing:
   /* trigger queue processing */
@@ -3293,9 +3296,10 @@ trigger_processing:
  * @param ats performance data
  * @param ats_count number of entries in ats (excluding 0-termination)
  */
-static void handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m,
-                            const struct GNUNET_TRANSPORT_ATS_Information *ats,
-                            uint32_t ats_count);
+static void
+handle_set_key (struct Neighbour *n, const struct SetKeyMessage *m,
+                const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                uint32_t ats_count);
 
 
 
@@ -3843,8 +3847,8 @@ send_p2p_message_to_client (struct Neighbour *sender, struct Client *client,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Core service passes message from `%4s' of type %u to client.\n",
               GNUNET_i2s (&sender->peer),
-              (unsigned int) ntohs (((const struct GNUNET_MessageHeader *) m)->
-                                    type));
+              (unsigned int)
+              ntohs (((const struct GNUNET_MessageHeader *) m)->type));
 #endif
   ntm = (struct NotifyTrafficMessage *) buf;
   ntm->header.size = htons (size);
index e5d5deb1b31baad43de7ec82ba10adaf49ba8a93..8bc977df22f2b37acae4905eed4cfa4268900046 100644 (file)
@@ -75,8 +75,8 @@ static GNUNET_SCHEDULER_TaskIdentifier ask_task;
 static unsigned int total_reserve = 5;
 
 
-static void process_hello (void *cls,
-                           const struct GNUNET_MessageHeader *message);
+static void
+process_hello (void *cls, const struct GNUNET_MessageHeader *message);
 
 static void
 terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -151,11 +151,10 @@ transmit_ready (void *cls, size_t size, void *buf)
   return sizeof (struct GNUNET_MessageHeader);
 }
 
-static void preference_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
-                           struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
-                           int32_t amount,
-                           struct GNUNET_TIME_Relative res_delay,
-                           uint64_t preference);
+static void
+preference_cb (void *cls, const struct GNUNET_PeerIdentity *peer,
+               struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, int32_t amount,
+               struct GNUNET_TIME_Relative res_delay, uint64_t preference);
 
 static void
 do_reserve (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
index afe6ad2699286389e92b17d2f5d98f83a924368c..47d1ae8ac60995e864667bd2cccc0082b9560c8b 100644 (file)
@@ -113,8 +113,8 @@ get_size (unsigned int iter)
   return sizeof (struct TestMessage) + (ret % 60000);
 }
 
-static void process_hello (void *cls,
-                           const struct GNUNET_MessageHeader *message);
+static void
+process_hello (void *cls, const struct GNUNET_MessageHeader *message);
 
 static void
 terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -296,7 +296,8 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 }
 
 
-static size_t transmit_ready (void *cls, size_t size, void *buf);
+static size_t
+transmit_ready (void *cls, size_t size, void *buf);
 
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
index 88ba2c0f205754a50206f201fd0ca6cf0e430997..41d156c6bc2d6fa028990ff0e0e3cd404afa87a9 100644 (file)
@@ -114,8 +114,8 @@ struct TestMessage
   uint32_t num;
 };
 
-static void process_hello (void *cls,
-                           const struct GNUNET_MessageHeader *message);
+static void
+process_hello (void *cls, const struct GNUNET_MessageHeader *message);
 
 static void
 terminate_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
@@ -424,7 +424,8 @@ outbound_notify (void *cls, const struct GNUNET_PeerIdentity *other,
 }
 
 
-static size_t transmit_ready (void *cls, size_t size, void *buf);
+static size_t
+transmit_ready (void *cls, size_t size, void *buf);
 
 static int
 process_mtype (void *cls, const struct GNUNET_PeerIdentity *peer,
index a5dc0236205205019bf60d8828124c107bef1f5a..131ca4b82dcddefc4eedcf0f327c2b3a3c44963c 100644 (file)
@@ -91,8 +91,8 @@ run (void *cls, char *const *args, const char *cfgfile,
   }
   fprintf (stderr, "\n");
   fprintf (stdout, "Stored %u items in %llums\n", ITERATIONS,
-           (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-           rel_value);
+           (unsigned long long)
+           GNUNET_TIME_absolute_get_duration (start).rel_value);
   GNUNET_snprintf (gstr, sizeof (gstr), "DATACACHE-%s", plugin_name);
   GAUGER (gstr, "Time to PUT item in datacache",
           GNUNET_TIME_absolute_get_duration (start).rel_value / ITERATIONS,
@@ -111,8 +111,9 @@ run (void *cls, char *const *args, const char *cfgfile,
   fprintf (stdout,
            "Found %u/%u items in %llums (%u were deleted during storage processing)\n",
            found, ITERATIONS,
-           (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-           rel_value, ITERATIONS - found);
+           (unsigned long long)
+           GNUNET_TIME_absolute_get_duration (start).rel_value,
+           ITERATIONS - found);
   if (found > 0)
     GAUGER (gstr, "Time to GET item from datacache",
             GNUNET_TIME_absolute_get_duration (start).rel_value / found,
index ff49c106e5a944c5548d9b7753e1c67ed574e9b6..8a8f64eb392548210d7c37d7ac8846f063cfaada 100644 (file)
@@ -480,7 +480,8 @@ make_queue_entry (struct GNUNET_DATASTORE_Handle *h, size_t msize,
  * 
  * @param h handle to the datastore
  */
-static void process_queue (struct GNUNET_DATASTORE_Handle *h);
+static void
+process_queue (struct GNUNET_DATASTORE_Handle *h);
 
 
 /**
index 8efb706c1363f4cbfa9a34808ea6a91ee34151ba..d6a0b3c8167b4080b468948b117f70c072c42715 100644 (file)
@@ -276,8 +276,8 @@ static struct GNUNET_STATISTICS_GetHandle *stat_get;
  * @param cls not used
  * @param tc task context
  */
-static void delete_expired (void *cls,
-                            const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+delete_expired (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index cf9911329eb1d0607317aa45c8163b99e72cec59..07df6a691b22128446c0b0daa71c7a448487740d 100644 (file)
@@ -104,8 +104,8 @@ struct CpsRunContext
 
 
 
-static void run_continuation (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 
index 1e2a29f14214b3532fd7b152788ea62d9276e6bf..36dc84656091403914dca29586021170ff35ed73 100644 (file)
@@ -145,7 +145,8 @@ putValue (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
   stored_entries++;
 }
 
-static void test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static int
index 63b065b0c1e7ad9d1e6a9bfe936fa80bb23eb180..d6b6d6c623304ff9cbb98629e249121328e638e3 100644 (file)
@@ -1068,12 +1068,12 @@ mysql_plugin_get_key (void *cls, uint64_t offset, const GNUNET_HashCode * key,
     {
       ret =
           prepared_statement_run_select (plugin,
-                                         plugin->count_entry_by_hash_vhash_and_type,
-                                         1, cbind, MYSQL_TYPE_BLOB, key,
-                                         hashSize, &hashSize, MYSQL_TYPE_BLOB,
-                                         vhash, hashSize2, &hashSize2,
-                                         MYSQL_TYPE_LONG, &type, GNUNET_YES,
-                                         -1);
+                                         plugin->
+                                         count_entry_by_hash_vhash_and_type, 1,
+                                         cbind, MYSQL_TYPE_BLOB, key, hashSize,
+                                         &hashSize, MYSQL_TYPE_BLOB, vhash,
+                                         hashSize2, &hashSize2, MYSQL_TYPE_LONG,
+                                         &type, GNUNET_YES, -1);
     }
     else
     {
index 3dff4a58885ef0d47460c7499206d7cc524011f2..91350f2033c2c2660f8e0b2cb914dd2550ead91b 100644 (file)
@@ -134,8 +134,8 @@ struct CpsRunContext
 };
 
 
-static void run_continuation (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void
index 230b7eb67cc1c1dac6c626dea96ac109fa43ab0b..72348e28cb762bafb593176700f4fcd35bd55955 100644 (file)
@@ -117,8 +117,8 @@ struct CpsRunContext
 };
 
 
-static void run_continuation (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+run_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static void
index a34c4e38a1d67d22abdf39739ce88bc3155cc7e2..3a924c7b6b8cf551ae328a4645819c4efa142feb 100644 (file)
@@ -141,7 +141,8 @@ put_value (struct GNUNET_DATASTORE_PluginFunctions *api, int i, int k)
 }
 
 
-static void test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+test (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 static uint64_t guid;
index eded50efcde080001fc6fb5d76faf30f86220e5d..9c378dca135a89eafe204f776aeb3cdefadb930e 100644 (file)
@@ -203,7 +203,8 @@ struct GNUNET_DHT_Handle
 /**
  * Transmit the next pending message, called by notify_transmit_ready
  */
-static size_t transmit_pending (void *cls, size_t size, void *buf);
+static size_t
+transmit_pending (void *cls, size_t size, void *buf);
 
 
 /**
@@ -211,8 +212,8 @@ static size_t transmit_pending (void *cls, size_t size, void *buf);
  * a demultiplexer which handles numerous message types
  *
  */
-static void service_message_handler (void *cls,
-                                     const struct GNUNET_MessageHeader *msg);
+static void
+service_message_handler (void *cls, const struct GNUNET_MessageHeader *msg);
 
 
 
@@ -273,7 +274,8 @@ add_request_to_pending (void *cls, const GNUNET_HashCode * key, void *value)
  * Try to send messages from list of messages to send
  * @param handle DHT_Handle
  */
-static void process_pending_messages (struct GNUNET_DHT_Handle *handle);
+static void
+process_pending_messages (struct GNUNET_DHT_Handle *handle);
 
 
 /**
@@ -760,11 +762,9 @@ GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle)
                                  route_handle->message);
   }
   GNUNET_assert (GNUNET_YES ==
-                 GNUNET_CONTAINER_multihashmap_remove (route_handle->
-                                                       dht_handle->
-                                                       active_requests,
-                                                       &route_handle->key,
-                                                       route_handle));
+                 GNUNET_CONTAINER_multihashmap_remove
+                 (route_handle->dht_handle->active_requests, &route_handle->key,
+                  route_handle));
   GNUNET_free (route_handle->message);
   GNUNET_free (route_handle);
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "DHT route stop request processed\n");
index 476a4039eb158c9d826642c1a951943248c06647..cdab36305e0cb2231cc6d6cd8f04933017dd3e88 100644 (file)
@@ -373,14 +373,14 @@ struct GNUNET_DHTLOG_Plugin
  *
  * @param c a configuration to use
  */
-struct GNUNET_DHTLOG_Handle *GNUNET_DHTLOG_connect (const struct
-                                                    GNUNET_CONFIGURATION_Handle
-                                                    *c);
+struct GNUNET_DHTLOG_Handle *
+GNUNET_DHTLOG_connect (const struct GNUNET_CONFIGURATION_Handle *c);
 
 /**
  * Shutdown the module.
  */
-void GNUNET_DHTLOG_disconnect (struct GNUNET_DHTLOG_Handle *api);
+void
+GNUNET_DHTLOG_disconnect (struct GNUNET_DHTLOG_Handle *api);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index d58e49e3b3bd1cf3a0c68e092c1f8668193bb578..4f411f4a9e383f140d31889a2e2ddd91c3b5c1f3 100644 (file)
@@ -1244,12 +1244,14 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 /**
  * Forward declaration.
  */
-static void do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Forward declaration.
  */
-static void do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Iterator over hash map entries.
@@ -1465,8 +1467,8 @@ iterate_min_heap_peers (void *cls, struct GNUNET_CONTAINER_HeapNode *node,
     GNUNET_TESTING_daemons_connect (d1, d2, timeout, DEFAULT_RECONNECT_ATTEMPTS,
                                     GNUNET_YES, NULL, NULL);
   }
-  if (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
-      rel_value > 0)
+  if (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).rel_value
+      > 0)
     return GNUNET_YES;
   else
     return GNUNET_NO;
@@ -1475,10 +1477,10 @@ iterate_min_heap_peers (void *cls, struct GNUNET_CONTAINER_HeapNode *node,
 /**
  * Forward declaration.
  */
-static void schedule_churn_find_peer_requests (void *cls,
-                                               const struct
-                                               GNUNET_SCHEDULER_TaskContext
-                                               *tc);
+static void
+schedule_churn_find_peer_requests (void *cls,
+                                   const struct GNUNET_SCHEDULER_TaskContext
+                                   *tc);
 
 /**
  * Callback for iterating over all the peer connections of a peer group.
@@ -1555,12 +1557,11 @@ count_peers_churn_cb (void *cls, const struct GNUNET_PeerIdentity *first,
        */
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Out of %u peers, fewest connections is %d\n",
-                GNUNET_CONTAINER_heap_get_size (find_peer_context->
-                                                peer_min_heap),
-                peer_count->count);
+                GNUNET_CONTAINER_heap_get_size
+                (find_peer_context->peer_min_heap), peer_count->count);
     if ((peer_count->count == 0) &&
-        (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
-         rel_value > 0))
+        (GNUNET_TIME_absolute_get_remaining
+         (find_peer_context->endtime).rel_value > 0))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   "Found peer with no connections, will choose some peer(s) at random to connect to!\n");
@@ -1570,8 +1571,9 @@ count_peers_churn_cb (void *cls, const struct GNUNET_PeerIdentity *first,
       GNUNET_SCHEDULER_add_now (&schedule_churn_find_peer_requests,
                                 find_peer_context);
     }
-    else if ((GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
-              rel_value > 0) && (find_peer_context->last_sent != 0))
+    else if ((GNUNET_TIME_absolute_get_remaining
+              (find_peer_context->endtime).rel_value > 0) &&
+             (find_peer_context->last_sent != 0))
     {
       GNUNET_SCHEDULER_add_now (&schedule_churn_find_peer_requests,
                                 find_peer_context);
@@ -1772,8 +1774,8 @@ churn_complete (void *cls, const char *emsg)
     }
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Added %d peers to heap, total size %d\n", count_added,
-                GNUNET_CONTAINER_heap_get_size (find_peer_context->
-                                                peer_min_heap));
+                GNUNET_CONTAINER_heap_get_size
+                (find_peer_context->peer_min_heap));
     GNUNET_SCHEDULER_add_delayed (DEFAULT_PEER_DISCONNECT_TIMEOUT,
                                   &schedule_churn_get_topology,
                                   find_peer_context);
@@ -2262,14 +2264,14 @@ do_put (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                 test_put->next);
 }
 
-static void schedule_find_peer_requests (void *cls,
-                                         const struct
-                                         GNUNET_SCHEDULER_TaskContext *tc);
+static void
+schedule_find_peer_requests (void *cls,
+                             const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 #if HAVE_MALICIOUS
-static void setup_malicious_peers (void *cls,
-                                   const struct GNUNET_SCHEDULER_TaskContext
-                                   *tc);
+static void
+setup_malicious_peers (void *cls,
+                       const struct GNUNET_SCHEDULER_TaskContext *tc);
 #endif
 
 /**
@@ -2322,8 +2324,8 @@ count_peers_cb (void *cls, const struct GNUNET_PeerIdentity *first,
     if ((find_peer_context->last_sent < 8) ||
         ((find_peer_context->current_peers <
           2 * connection_estimate (num_peers, DEFAULT_BUCKET_SIZE)) &&
-         (GNUNET_TIME_absolute_get_remaining (find_peer_context->endtime).
-          rel_value > 0) &&
+         (GNUNET_TIME_absolute_get_remaining
+          (find_peer_context->endtime).rel_value > 0) &&
          (find_peer_context->current_peers < target_total_connections)))
     {
       GNUNET_SCHEDULER_add_now (&schedule_find_peer_requests,
@@ -2424,11 +2426,9 @@ schedule_find_peer_requests (void *cls,
       peer_count =
           GNUNET_CONTAINER_heap_remove_root (find_peer_ctx->peer_min_heap);
       GNUNET_assert (GNUNET_YES ==
-                     GNUNET_CONTAINER_multihashmap_remove (find_peer_ctx->
-                                                           peer_hash,
-                                                           &peer_count->peer_id.
-                                                           hashPubKey,
-                                                           peer_count));
+                     GNUNET_CONTAINER_multihashmap_remove
+                     (find_peer_ctx->peer_hash, &peer_count->peer_id.hashPubKey,
+                      peer_count));
       test_find_peer->daemon =
           GNUNET_TESTING_daemon_get_by_id (pg, &peer_count->peer_id);
       GNUNET_assert (test_find_peer->daemon != NULL);
@@ -2879,17 +2879,14 @@ setup_malicious_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
 #if ONLY_TESTING
 /* Forward declaration */
-static void topology_callback (void *cls,
-                               const struct GNUNET_PeerIdentity *first,
-                               const struct GNUNET_PeerIdentity *second,
-                               uint32_t distance,
-                               const struct GNUNET_CONFIGURATION_Handle
-                               *first_cfg,
-                               const struct GNUNET_CONFIGURATION_Handle
-                               *second_cfg,
-                               struct GNUNET_TESTING_Daemon *first_daemon,
-                               struct GNUNET_TESTING_Daemon *second_daemon,
-                               const char *emsg);
+static void
+topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
+                   const struct GNUNET_PeerIdentity *second, uint32_t distance,
+                   const struct GNUNET_CONFIGURATION_Handle *first_cfg,
+                   const struct GNUNET_CONFIGURATION_Handle *second_cfg,
+                   struct GNUNET_TESTING_Daemon *first_daemon,
+                   struct GNUNET_TESTING_Daemon *second_daemon,
+                   const char *emsg);
 
 /**
  * Retry connecting two specific peers until they connect,
@@ -2993,12 +2990,12 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
     /* Get duration in seconds */
     duration =
         GNUNET_TIME_absolute_get_difference (connect_last_time,
-                                             GNUNET_TIME_absolute_get ()).
-        rel_value / 1000;
+                                             GNUNET_TIME_absolute_get
+                                             ()).rel_value / 1000;
     total_duration =
         GNUNET_TIME_absolute_get_difference (connect_start_time,
-                                             GNUNET_TIME_absolute_get ()).
-        rel_value / 1000;
+                                             GNUNET_TIME_absolute_get
+                                             ()).rel_value / 1000;
 
     failed_conns_per_sec_recent =
         (double) new_failed_connections / (double) duration;
@@ -3086,8 +3083,8 @@ topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
 
     total_duration =
         GNUNET_TIME_absolute_get_difference (connect_start_time,
-                                             GNUNET_TIME_absolute_get ()).
-        rel_value / 1000;
+                                             GNUNET_TIME_absolute_get
+                                             ()).rel_value / 1000;
     failed_conns_per_sec_total =
         (long double) failed_connections / total_duration;
     conns_per_sec_total = (long double) total_connections / total_duration;
@@ -3299,14 +3296,16 @@ hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id,
           GNUNET_CONFIGURATION_have_value (config, "TESTING", "HOSTKEYSFILE"))
       {
         GAUGER_ID ("DHT_TESTING", "HOSTKEY_GENERATION",
-                   GNUNET_TIME_absolute_get_duration (hostkey_start_time).
-                   rel_value / (double) num_peers, "ms/hostkey", revision_str);
+                   GNUNET_TIME_absolute_get_duration
+                   (hostkey_start_time).rel_value / (double) num_peers,
+                   "ms/hostkey", revision_str);
       }
       else
       {
         GAUGER_ID ("DHT_TESTING", "HOSTKEY_GENERATION_REAL",
-                   GNUNET_TIME_absolute_get_duration (hostkey_start_time).
-                   rel_value / (double) num_peers, "ms/hostkey", revision_str);
+                   GNUNET_TIME_absolute_get_duration
+                   (hostkey_start_time).rel_value / (double) num_peers,
+                   "ms/hostkey", revision_str);
       }
     }
 
index 1721e73af5af6c63720653a11e83b835236911ad..43a6c9bea0187f97b1b2391f99db3126ab42346d 100644 (file)
@@ -934,11 +934,13 @@ static struct GNUNET_BLOCK_Context *block_context;
 /**
  * Forward declaration.
  */
-static size_t send_generic_reply (void *cls, size_t size, void *buf);
+static size_t
+send_generic_reply (void *cls, size_t size, void *buf);
 
 
 /** Declare here so retry_core_send is aware of it */
-static size_t core_transmit_notify (void *cls, size_t size, void *buf);
+static size_t
+core_transmit_notify (void *cls, size_t size, void *buf);
 
 /**
  * Convert unique ID to hash code.
@@ -1160,7 +1162,8 @@ forward_result_message (const struct GNUNET_MessageHeader *msg,
   result_message->hop_count = htonl (msg_ctx->hop_count + 1);
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONTAINER_bloomfilter_get_raw_data (msg_ctx->bloom,
-                                                            result_message->bloomfilter,
+                                                            result_message->
+                                                            bloomfilter,
                                                             DHT_BLOOM_SIZE));
   result_message->unique_id = GNUNET_htonll (msg_ctx->unique_id);
   memcpy (&result_message->key, &msg_ctx->key, sizeof (GNUNET_HashCode));
@@ -1474,9 +1477,9 @@ find_peer_by_id (const struct GNUNET_PeerIdentity *peer)
 }
 
 /* Forward declaration */
-static void update_core_preference (void *cls,
-                                    const struct GNUNET_SCHEDULER_TaskContext
-                                    *tc);
+static void
+update_core_preference (void *cls,
+                        const struct GNUNET_SCHEDULER_TaskContext *tc);
 /**
  * Function called with statistics about the given peer.
  *
@@ -1776,7 +1779,8 @@ forward_message (const struct GNUNET_MessageHeader *msg, struct PeerInfo *peer,
   if (msg_ctx->bloom != NULL)
     GNUNET_assert (GNUNET_OK ==
                    GNUNET_CONTAINER_bloomfilter_get_raw_data (msg_ctx->bloom,
-                                                              route_message->bloomfilter,
+                                                              route_message->
+                                                              bloomfilter,
                                                               DHT_BLOOM_SIZE));
   memcpy (&route_message->key, &msg_ctx->key, sizeof (GNUNET_HashCode));
   memcpy (&route_message[1], msg, ntohs (msg->size));
@@ -1885,8 +1889,8 @@ process_pending_messages (struct ClientList *client)
 
   client->transmit_handle =
       GNUNET_SERVER_notify_transmit_ready (client->client_handle,
-                                           ntohs (client->pending_head->msg->
-                                                  size),
+                                           ntohs (client->pending_head->
+                                                  msg->size),
                                            GNUNET_TIME_UNIT_FOREVER_REL,
                                            &send_generic_reply, client);
 }
@@ -2457,8 +2461,9 @@ datacache_get_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
  * @param msg the message to be routed
  * @param msg_ctx the context containing all pertinent information about the message
  */
-static void route_message (const struct GNUNET_MessageHeader *msg,
-                           struct DHT_MessageContext *msg_ctx);
+static void
+route_message (const struct GNUNET_MessageHeader *msg,
+               struct DHT_MessageContext *msg_ctx);
 
 
 /**
@@ -2815,8 +2820,8 @@ handle_dht_find_peer (const struct GNUNET_MessageHeader *find_msg,
  * @param cls closure (a struct RepublishContext)
  * @param tc runtime context for this task
  */
-static void republish_content (void *cls,
-                               const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+republish_content (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Server handler for initiating local dht put requests
@@ -3509,10 +3514,10 @@ select_peer (const GNUNET_HashCode * target,
       break;                    /* overflow case */
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Choose %d matching bits (%d bits match me) (%.2f percent) converge ret %llu\n",
-                GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->
-                                                  id.hashPubKey, target),
-                GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->
-                                                  id.hashPubKey,
+                GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->id.
+                                                  hashPubKey, target),
+                GNUNET_CRYPTO_hash_matching_bits (&sorted_closest[i]->id.
+                                                  hashPubKey,
                                                   &my_identity.hashPubKey),
                 (temp_converge_distance / (double) total_distance) * 100,
                 temp_converge_distance);
@@ -4473,7 +4478,8 @@ send_find_peer_message (void *cls,
                                          temp_bloom);
   GNUNET_assert (GNUNET_OK ==
                  GNUNET_CONTAINER_bloomfilter_get_raw_data (temp_bloom,
-                                                            find_peer_msg->bloomfilter,
+                                                            find_peer_msg->
+                                                            bloomfilter,
                                                             DHT_BLOOM_SIZE));
   GNUNET_CONTAINER_bloomfilter_free (temp_bloom);
   memset (&msg_ctx, 0, sizeof (struct DHT_MessageContext));
index a411c59348b8bbcc7f791acc90ef1637806858cc..563d97e461e1028ecd34abb40fae75ac6d92bc31 100644 (file)
@@ -281,18 +281,18 @@ set_malicious (struct GNUNET_PeerIdentity *peer)
  *
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int insert_stat (const struct GNUNET_PeerIdentity *peer,
-                 unsigned int route_requests, unsigned int route_forwards,
-                 unsigned int result_requests, unsigned int client_requests,
-                 unsigned int result_forwards, unsigned int gets,
-                 unsigned int puts, unsigned int data_inserts,
-                 unsigned int find_peer_requests,
-                 unsigned int find_peers_started, unsigned int gets_started,
-                 unsigned int puts_started,
-                 unsigned int find_peer_responses_received,
-                 unsigned int get_responses_received,
-                 unsigned int find_peer_responses_sent,
-                 unsigned int get_responses_sent)
+int
+insert_stat (const struct GNUNET_PeerIdentity *peer,
+             unsigned int route_requests, unsigned int route_forwards,
+             unsigned int result_requests, unsigned int client_requests,
+             unsigned int result_forwards, unsigned int gets, unsigned int puts,
+             unsigned int data_inserts, unsigned int find_peer_requests,
+             unsigned int find_peers_started, unsigned int gets_started,
+             unsigned int puts_started,
+             unsigned int find_peer_responses_received,
+             unsigned int get_responses_received,
+             unsigned int find_peer_responses_sent,
+             unsigned int get_responses_sent)
 {
   return GNUNET_OK;
 }
index 9fc5c2d7ac45fa4949d37348422e4422218fd772..f5bb05d8badcbae3372b4ac6b9f46e9fceef96ba 100644 (file)
@@ -237,8 +237,8 @@ test_find_peer_processor (void *cls, const struct GNUNET_HELLO_Message *hello)
  * @param cls closure
  * @param tc context information (why was this task triggered now?)
  */
-void retry_find_peer_stop (void *cls,
-                           const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+retry_find_peer_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Retry the find_peer task on timeout.
index 50a27a093dd201dacc94db689b18ef2df3407f10..63f200e7df03e0986166555989f67103d247cfbf 100644 (file)
@@ -141,7 +141,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 /* Forward declaration */
-static void do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Iterator called on each result obtained for a DHT
@@ -199,8 +200,8 @@ get_result_iterator (void *cls, struct GNUNET_TIME_Absolute exp,
 
 }
 
-static void stop_retry_get (void *cls,
-                            const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+stop_retry_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 static void
 get_stop_finished (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
index 3c62a22bcfa460bb7a08033cf67b20b8accb1bd8..1d4912f84c8d5eaec58286ff3fde13ed868a2ab6 100644 (file)
@@ -257,17 +257,17 @@ typedef struct
 } p2p_dv_MESSAGE_Disconnect;
 
 
-struct GNUNET_DV_Handle *GNUNET_DV_connect (const struct
-                                            GNUNET_CONFIGURATION_Handle *cfg,
-                                            GNUNET_DV_MessageReceivedHandler
-                                            receive_handler,
-                                            void *receive_handler_cls);
+struct GNUNET_DV_Handle *
+GNUNET_DV_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                   GNUNET_DV_MessageReceivedHandler receive_handler,
+                   void *receive_handler_cls);
 
 /**
  * Disconnect from the DV service
  *
  * @param handle the current handle to the service to disconnect
  */
-void GNUNET_DV_disconnect (struct GNUNET_DV_Handle *handle);
+void
+GNUNET_DV_disconnect (struct GNUNET_DV_Handle *handle);
 
 #endif
index 3450e584439e1e7ac32e9aa637fd4b5077049fda..d4c07ecdcf9b7a0ea1fe7b6e4ee2d8b3dc03bfdf 100644 (file)
@@ -180,7 +180,8 @@ try_connect (struct GNUNET_DV_Handle *ret)
   return GNUNET_NO;
 }
 
-static void process_pending_message (struct GNUNET_DV_Handle *handle);
+static void
+process_pending_message (struct GNUNET_DV_Handle *handle);
 
 /**
  * Send complete, schedule next
@@ -284,8 +285,8 @@ process_pending_message (struct GNUNET_DV_Handle *handle)
   if (NULL ==
       (handle->th =
        GNUNET_CLIENT_notify_transmit_ready (handle->client,
-                                            ntohs (handle->current->msg->header.
-                                                   size),
+                                            ntohs (handle->current->msg->
+                                                   header.size),
                                             handle->current->msg->timeout,
                                             GNUNET_YES, &transmit_pending,
                                             handle)))
index 876d056ac6ee4b28a2fa11f71c54fc3ef0f566ea..6699fef1128e3edae2ce5525a4c1ab96e8a5e10b 100644 (file)
@@ -761,8 +761,8 @@ transmit_to_plugin (void *cls, size_t size, void *buf)
   if (plugin_pending_head != NULL)
     plugin_transmit_handle =
         GNUNET_SERVER_notify_transmit_ready (client_handle,
-                                             ntohs (plugin_pending_head->
-                                                    msg->size),
+                                             ntohs (plugin_pending_head->msg->
+                                                    size),
                                              GNUNET_TIME_UNIT_FOREVER_REL,
                                              &transmit_to_plugin, NULL);
 
@@ -858,7 +858,8 @@ send_to_plugin (const struct GNUNET_PeerIdentity *sender,
 }
 
 /* Declare here so retry_core_send is aware of it */
-size_t core_transmit_notify (void *cls, size_t size, void *buf);
+size_t
+core_transmit_notify (void *cls, size_t size, void *buf);
 
 /**
  *  Try to send another message from our core sending list
@@ -999,9 +1000,9 @@ send_message_via (const struct GNUNET_PeerIdentity *sender,
   find_context.via = recipient;
   find_context.tid = 0;
   GNUNET_CONTAINER_multihashmap_get_multiple (extended_neighbors,
-                                              &send_context->distant_peer->
-                                              hashPubKey, &find_specific_id,
-                                              &find_context);
+                                              &send_context->
+                                              distant_peer->hashPubKey,
+                                              &find_specific_id, &find_context);
 
   if (find_context.tid == 0)
   {
@@ -2071,19 +2072,16 @@ handle_dv_send_message (void *cls, struct GNUNET_SERVER_Client *client,
 }
 
 /** Forward declarations **/
-static int handle_dv_gossip_message (void *cls,
-                                     const struct GNUNET_PeerIdentity *peer,
-                                     const struct GNUNET_MessageHeader *message,
-                                     const struct
-                                     GNUNET_TRANSPORT_ATS_Information *atsi);
-
-static int handle_dv_disconnect_message (void *cls,
-                                         const struct GNUNET_PeerIdentity *peer,
-                                         const struct GNUNET_MessageHeader
-                                         *message,
-                                         const struct
-                                         GNUNET_TRANSPORT_ATS_Information
-                                         *atsi);
+static int
+handle_dv_gossip_message (void *cls, const struct GNUNET_PeerIdentity *peer,
+                          const struct GNUNET_MessageHeader *message,
+                          const struct GNUNET_TRANSPORT_ATS_Information *atsi);
+
+static int
+handle_dv_disconnect_message (void *cls, const struct GNUNET_PeerIdentity *peer,
+                              const struct GNUNET_MessageHeader *message,
+                              const struct GNUNET_TRANSPORT_ATS_Information
+                              *atsi);
 /** End forward declarations **/
 
 
@@ -2658,8 +2656,8 @@ addUpdateNeighbor (const struct GNUNET_PeerIdentity *peer,
           atsi[0].value = htonl (referrer->pending_messages[i].distance);
           atsi[1].type = htonl (GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
           atsi[1].value =
-              htonl ((uint32_t) referrer->pending_messages[i].latency.
-                     rel_value);
+              htonl ((uint32_t) referrer->pending_messages[i].
+                     latency.rel_value);
           atsi[2].type = htonl (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR);
           atsi[2].value = htonl (0);
           handle_dv_data_message (NULL, &referrer->pending_messages[i].sender,
index fee8eea81b95beb34e07c2ba87f2b852969b6f90..e66caa4f6bf9a69a9a3f9d514f8eead90cded41f 100644 (file)
@@ -382,8 +382,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   }
 }
 
-static void send_other_messages (void *cls,
-                                 const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+send_other_messages (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Get distance information from 'atsi'.
index e26a01996d83cc830543b57c2b5523063ba2b96d..fc1388a04f5d1f85071bc9780d3a115ba3bfb5ff 100644 (file)
@@ -72,8 +72,8 @@ stop_job (struct GNUNET_FS_QueueEntry *qe)
   qe->h->active_blocks -= qe->blocks;
   qe->run_time =
       GNUNET_TIME_relative_add (qe->run_time,
-                                GNUNET_TIME_absolute_get_duration (qe->
-                                                                   start_time));
+                                GNUNET_TIME_absolute_get_duration
+                                (qe->start_time));
   GNUNET_CONTAINER_DLL_remove (qe->h->running_head, qe->h->running_tail, qe);
   GNUNET_CONTAINER_DLL_insert_after (qe->h->pending_head, qe->h->pending_tail,
                                      qe->h->pending_tail, qe);
@@ -638,12 +638,8 @@ read_start_time (struct GNUNET_BIO_ReadHandle *rh,
  *        the infromation
  * @return NULL on error
  */
-static struct GNUNET_FS_FileInformation *deserialize_file_information (struct
-                                                                       GNUNET_FS_Handle
-                                                                       *h,
-                                                                       const
-                                                                       char
-                                                                       *filename);
+static struct GNUNET_FS_FileInformation *
+deserialize_file_information (struct GNUNET_FS_Handle *h, const char *filename);
 
 
 /**
@@ -1152,8 +1148,8 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
         (GNUNET_OK !=
          GNUNET_BIO_write_string (wh,
                                   (fi->data.dir.entries ==
-                                   NULL) ? NULL : fi->data.dir.entries->
-                                  serialization)))
+                                   NULL) ? NULL : fi->data.dir.
+                                  entries->serialization)))
     {
       GNUNET_break (0);
       goto cleanup;
@@ -1566,9 +1562,9 @@ read_download_request (struct GNUNET_BIO_ReadHandle *rh)
       (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->num_children)) ||
       (dr->num_children > CHK_PER_INODE) ||
       (GNUNET_OK != GNUNET_BIO_read_int32 (rh, &dr->depth)) || ((dr->depth == 0)
-                                                                && (dr->
-                                                                    num_children
-                                                                    > 0)) ||
+                                                                &&
+                                                                (dr->num_children
+                                                                 > 0)) ||
       ((dr->depth > 0) && (dr->num_children == 0)))
   {
     GNUNET_break (0);
@@ -2017,11 +2013,12 @@ cleanup:
  * @param search associated search
  * @param serialization name under which the search was serialized
  */
-static void deserialize_download (struct GNUNET_FS_Handle *h,
-                                  struct GNUNET_BIO_ReadHandle *rh,
-                                  struct GNUNET_FS_DownloadContext *parent,
-                                  struct GNUNET_FS_SearchResult *search,
-                                  const char *serialization);
+static void
+deserialize_download (struct GNUNET_FS_Handle *h,
+                      struct GNUNET_BIO_ReadHandle *rh,
+                      struct GNUNET_FS_DownloadContext *parent,
+                      struct GNUNET_FS_SearchResult *search,
+                      const char *serialization);
 
 
 /**
@@ -2032,16 +2029,11 @@ static void deserialize_download (struct GNUNET_FS_Handle *h,
  * @param psearch_result parent search result
  * @param serialization name under which the search was serialized
  */
-static struct GNUNET_FS_SearchContext *deserialize_search (struct
-                                                           GNUNET_FS_Handle *h,
-                                                           struct
-                                                           GNUNET_BIO_ReadHandle
-                                                           *rh,
-                                                           struct
-                                                           GNUNET_FS_SearchResult
-                                                           *psearch_result,
-                                                           const char
-                                                           *serialization);
+static struct GNUNET_FS_SearchContext *
+deserialize_search (struct GNUNET_FS_Handle *h,
+                    struct GNUNET_BIO_ReadHandle *rh,
+                    struct GNUNET_FS_SearchResult *psearch_result,
+                    const char *serialization);
 
 
 /**
@@ -2203,7 +2195,8 @@ signal_download_resume (struct GNUNET_FS_DownloadContext *dc)
  *
  * @param sc search being resumed
  */
-static void signal_search_resume (struct GNUNET_FS_SearchContext *sc);
+static void
+signal_search_resume (struct GNUNET_FS_SearchContext *sc);
 
 
 /**
@@ -2255,7 +2248,8 @@ signal_result_resume (void *cls, const GNUNET_HashCode * key, void *value)
  *
  * @param sc search context to free
  */
-static void free_search_context (struct GNUNET_FS_SearchContext *sc);
+static void
+free_search_context (struct GNUNET_FS_SearchContext *sc);
 
 
 /**
index 68bab59166414d659d30668469211ee2bf7fccb8..11cfc755ef8cafab77c90d4911d499ed32e90f8b 100644 (file)
@@ -759,17 +759,17 @@ struct GNUNET_FS_SearchResult
  * @param blocks number of blocks this download has
  * @return queue handle
  */
-struct GNUNET_FS_QueueEntry *GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h,
-                                               GNUNET_FS_QueueStart start,
-                                               GNUNET_FS_QueueStop stop,
-                                               void *cls, unsigned int blocks);
+struct GNUNET_FS_QueueEntry *
+GNUNET_FS_queue_ (struct GNUNET_FS_Handle *h, GNUNET_FS_QueueStart start,
+                  GNUNET_FS_QueueStop stop, void *cls, unsigned int blocks);
 
 
 /**
  * Dequeue a job from the queue.
  * @param qh handle for the job
  */
-void GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh);
+void
+GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh);
 
 
 /**
@@ -788,9 +788,9 @@ 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);
 
 
 /**
@@ -799,7 +799,8 @@ size_t               GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset,
  * @param filename file to read
  * @return closure to use
  */
-void *GNUNET_FS_make_file_reader_context_ (const char *filename);
+void *
+GNUNET_FS_make_file_reader_context_ (const char *filename);
 
 
 
@@ -819,8 +820,9 @@ 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.
@@ -837,9 +839,9 @@ size_t GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max,
  *         will be passed to future callbacks in the respective
  *         field in the GNUNET_FS_ProgressInfo struct.
  */
-void *GNUNET_FS_search_probe_progress_ (void *cls,
-                                        const struct GNUNET_FS_ProgressInfo
-                                        *info);
+void *
+GNUNET_FS_search_probe_progress_ (void *cls,
+                                  const struct GNUNET_FS_ProgressInfo *info);
 
 
 /**
@@ -848,8 +850,9 @@ 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);
 
 
 /**
@@ -859,8 +862,8 @@ void 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);
 
 
 /**
@@ -873,10 +876,11 @@ void GNUNET_FS_unindex_process_hash_ (void *cls,
  * @param offset where in the file are we so far
  * @return value returned from callback
  */
-void *GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
-                                      struct GNUNET_FS_PublishContext *sc,
-                                      const struct GNUNET_FS_FileInformation *p,
-                                      uint64_t offset);
+void *
+GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+                                struct GNUNET_FS_PublishContext *sc,
+                                const struct GNUNET_FS_FileInformation *p,
+                                uint64_t offset);
 
 
 /**
@@ -886,8 +890,9 @@ 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);
 
 
 /**
@@ -897,9 +902,9 @@ void 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);
 
 
 
@@ -911,9 +916,10 @@ void 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
@@ -923,8 +929,9 @@ void GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
  * @param sc overall search context
  * @return value returned by the callback
  */
-void *GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
-                                     struct GNUNET_FS_SearchContext *sc);
+void *
+GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
+                               struct GNUNET_FS_SearchContext *sc);
 
 
 /**
@@ -932,7 +939,8 @@ void *GNUNET_FS_search_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
  *
  * @param uc context for the unindex operation.
  */
-void GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc);
+void
+GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc);
 
 /**
  * Build the request and actually initiate the search using the
@@ -941,15 +949,16 @@ void GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc);
  * @param sc search context
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc);
+int
+GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc);
 
 /**
  * Start the downloading process (by entering the queue).
  *
  * @param dc our download context
  */
-void GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext
-                                            *dc);
+void
+GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc);
 
 
 /**
@@ -957,7 +966,8 @@ void GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext
  *
  * @param sr the search result
  */
-void GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr);
+void
+GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr);
 
 /**
  * Remove serialization/deserialization file from disk.
@@ -966,8 +976,9 @@ 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);
 
 
 /**
@@ -977,8 +988,9 @@ void GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext,
  * @param ext component of the path 
  * @param uni unique name of parent 
  */
-void GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
-                                 const char *uni);
+void
+GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
+                            const char *uni);
 
 
 /**
@@ -989,7 +1001,8 @@ void GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
  * 
  * @param fi the struct to sync
  */
-void GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f);
+void
+GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f);
 
 /**
  * Synchronize this publishing struct with its mirror
@@ -999,7 +1012,8 @@ void GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *f);
  * 
  * @param pc the struct to sync
  */
-void GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc);
+void
+GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc);
 
 /**
  * Synchronize this unindex struct with its mirror
@@ -1009,7 +1023,8 @@ void GNUNET_FS_publish_sync_ (struct GNUNET_FS_PublishContext *pc);
  * 
  * @param uc the struct to sync
  */
-void GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc);
+void
+GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc);
 
 /**
  * Synchronize this search struct with its mirror
@@ -1019,7 +1034,8 @@ void GNUNET_FS_unindex_sync_ (struct GNUNET_FS_UnindexContext *uc);
  * 
  * @param sc the struct to sync
  */
-void GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc);
+void
+GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc);
 
 /**
  * Synchronize this search result with its mirror
@@ -1029,7 +1045,8 @@ void GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc);
  * 
  * @param sr the struct to sync
  */
-void GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr);
+void
+GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr);
 
 /**
  * Synchronize this download struct with its mirror
@@ -1039,7 +1056,8 @@ void GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr);
  * 
  * @param dc the struct to sync
  */
-void GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc);
+void
+GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc);
 
 /**
  * Create SUSPEND event for the given publish operation
@@ -1047,7 +1065,8 @@ void GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc);
  *
  * @param cls the 'struct GNUNET_FS_PublishContext' to signal for
  */
-void GNUNET_FS_publish_signal_suspend_ (void *cls);
+void
+GNUNET_FS_publish_signal_suspend_ (void *cls);
 
 /**
  * Create SUSPEND event for the given search operation
@@ -1055,7 +1074,8 @@ void GNUNET_FS_publish_signal_suspend_ (void *cls);
  *
  * @param cls the 'struct GNUNET_FS_SearchContext' to signal for
  */
-void GNUNET_FS_search_signal_suspend_ (void *cls);
+void
+GNUNET_FS_search_signal_suspend_ (void *cls);
 
 /**
  * Create SUSPEND event for the given download operation
@@ -1063,7 +1083,8 @@ void GNUNET_FS_search_signal_suspend_ (void *cls);
  *
  * @param cls the 'struct GNUNET_FS_DownloadContext' to signal for
  */
-void GNUNET_FS_download_signal_suspend_ (void *cls);
+void
+GNUNET_FS_download_signal_suspend_ (void *cls);
 
 /**
  * Create SUSPEND event for the given unindex operation
@@ -1071,7 +1092,8 @@ void GNUNET_FS_download_signal_suspend_ (void *cls);
  *
  * @param cls the 'struct GNUNET_FS_UnindexContext' to signal for
  */
-void GNUNET_FS_unindex_signal_suspend_ (void *cls);
+void
+GNUNET_FS_unindex_signal_suspend_ (void *cls);
 
 /**
  * Function signature of the functions that can be called
@@ -1118,9 +1140,9 @@ struct TopLevelActivity
  * @param ssf_cls closure for ssf
  * @return fresh top-level activity handle
  */
-struct TopLevelActivity *GNUNET_FS_make_top (struct GNUNET_FS_Handle *h,
-                                             SuspendSignalFunction ssf,
-                                             void *ssf_cls);
+struct TopLevelActivity *
+GNUNET_FS_make_top (struct GNUNET_FS_Handle *h, SuspendSignalFunction ssf,
+                    void *ssf_cls);
 
 
 /**
@@ -1129,8 +1151,8 @@ 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);
 
 
 
@@ -1736,7 +1758,8 @@ struct DownloadRequest
  *
  * @param dr request to free
  */
-void GNUNET_FS_free_download_request_ (struct DownloadRequest *dr);
+void
+GNUNET_FS_free_download_request_ (struct DownloadRequest *dr);
 
 
 /**
index a3c5b9b62819c4ba3004e3ec8260f34665414cba..89de277da6043f56b2278d9be880e99c125c1fdc 100644 (file)
@@ -143,7 +143,8 @@ GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
  * @param buf where the callee should write the message
  * @return number of bytes written to buf
  */
-static size_t transmit_download_request (void *cls, size_t size, void *buf);
+static size_t
+transmit_download_request (void *cls, size_t size, void *buf);
 
 
 /**
@@ -194,8 +195,9 @@ struct ProcessResultClosure
  * @param value value in the hash map (a 'struct DownloadRequest')
  * @return GNUNET_YES (we should continue to iterate); unless serious error
  */
-static int process_result_with_request (void *cls, const GNUNET_HashCode * key,
-                                        void *value);
+static int
+process_result_with_request (void *cls, const GNUNET_HashCode * key,
+                             void *value);
 
 
 /**
@@ -261,7 +263,8 @@ encrypt_existing_match (struct GNUNET_FS_DownloadContext *dc,
  *
  * @param dc download context that is having trouble
  */
-static void try_reconnect (struct GNUNET_FS_DownloadContext *dc);
+static void
+try_reconnect (struct GNUNET_FS_DownloadContext *dc);
 
 
 /**
@@ -275,10 +278,11 @@ static void try_reconnect (struct GNUNET_FS_DownloadContext *dc);
  * @param length number of bytes in data
  * @param data contents of the file (or NULL if they were not inlined)
  */
-static void trigger_recursive_download (void *cls, const char *filename,
-                                        const struct GNUNET_FS_Uri *uri,
-                                        const struct GNUNET_CONTAINER_MetaData
-                                        *meta, size_t length, const void *data);
+static void
+trigger_recursive_download (void *cls, const char *filename,
+                            const struct GNUNET_FS_Uri *uri,
+                            const struct GNUNET_CONTAINER_MetaData *meta,
+                            size_t length, const void *data);
 
 
 /**
@@ -940,8 +944,8 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "Received block `%s' matching pending request at depth %u and offset %llu/%llu\n",
               GNUNET_h2s (key), dr->depth, (unsigned long long) dr->offset,
-              (unsigned long long) GNUNET_ntohll (dc->uri->data.chk.
-                                                  file_length));
+              (unsigned long long) GNUNET_ntohll (dc->uri->data.
+                                                  chk.file_length));
 
 #endif
   bs = GNUNET_FS_tree_calculate_block_size (GNUNET_ntohll
@@ -953,8 +957,8 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key,
                      _
                      ("Internal error or bogus download URI (expected %u bytes at depth %u and offset %llu/%llu, got %u bytes)\n"),
                      bs, dr->depth, (unsigned long long) dr->offset,
-                     (unsigned long long) GNUNET_ntohll (dc->uri->data.chk.
-                                                         file_length),
+                     (unsigned long long) GNUNET_ntohll (dc->uri->data.
+                                                         chk.file_length),
                      prc->size);
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "%s", dc->emsg);
     while (dr->parent != NULL)
@@ -1077,8 +1081,8 @@ process_result_with_request (void *cls, const GNUNET_HashCode * key,
 #if DEBUG_DOWNLOAD
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Download completed, truncating file to desired length %llu\n",
-                (unsigned long long) GNUNET_ntohll (dc->uri->data.chk.
-                                                    file_length));
+                (unsigned long long) GNUNET_ntohll (dc->uri->data.
+                                                    chk.file_length));
 #endif
     /* truncate file to size (since we store IBlocks at the end) */
     if (dc->filename != NULL)
@@ -1757,8 +1761,7 @@ GNUNET_FS_download_start_task_ (void *cls,
                                   GNUNET_DISK_OPEN_READWRITE |
                                   GNUNET_DISK_OPEN_CREATE |
                                   ((0 ==
-                                    GNUNET_FS_uri_chk_get_file_size (dc->
-                                                                     uri)) ?
+                                    GNUNET_FS_uri_chk_get_file_size (dc->uri)) ?
                                    GNUNET_DISK_OPEN_TRUNCATE : 0),
                                   GNUNET_DISK_PERM_USER_READ |
                                   GNUNET_DISK_PERM_USER_WRITE |
index 6809e305558721554722330875a1b5170f5c6f55..a67b22036c0fad9c7bef896c523b1dc8d441ed0d 100644 (file)
@@ -638,8 +638,8 @@ GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
   no = GNUNET_NO;
   if (GNUNET_OK !=
       proc (proc_cls, dir,
-            (dir->is_directory) ? dir->data.dir.dir_size : dir->data.file.
-            file_size, dir->meta, &dir->keywords, &dir->bo,
+            (dir->is_directory) ? dir->data.dir.dir_size : dir->data.
+            file.file_size, dir->meta, &dir->keywords, &dir->bo,
             (dir->is_directory) ? &no : &dir->data.file.do_index,
             &dir->client_info))
     return;
@@ -651,8 +651,8 @@ GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
     no = GNUNET_NO;
     if (GNUNET_OK !=
         proc (proc_cls, pos,
-              (pos->is_directory) ? pos->data.dir.dir_size : pos->data.file.
-              file_size, pos->meta, &pos->keywords, &pos->bo,
+              (pos->is_directory) ? pos->data.dir.dir_size : pos->data.
+              file.file_size, pos->meta, &pos->keywords, &pos->bo,
               (dir->is_directory) ? &no : &dir->data.file.do_index,
               &pos->client_info))
       break;
index 746f4f0994b173177971f8cda81ea305d849f21f..94641e9349a527512b8ec8ba78c6ecd6d54b922e 100644 (file)
@@ -179,8 +179,8 @@ signal_publish_completion (struct GNUNET_FS_FileInformation *p,
   pi.value.publish.specifics.completed.chk_uri = p->chk_uri;
   p->client_info =
       GNUNET_FS_publish_make_status_ (&pi, pc, p,
-                                      GNUNET_ntohll (p->chk_uri->data.chk.
-                                                     file_length));
+                                      GNUNET_ntohll (p->chk_uri->data.
+                                                     chk.file_length));
 }
 
 
@@ -1333,8 +1333,8 @@ struct PublishKskContext
  * @param cls closure of type "struct PublishKskContext*"
  * @param tc unused
  */
-static void publish_ksk_cont (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+publish_ksk_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index 89a8c558205a48677c93bc222e871eb4e45016dd..0c47eb1738438c95134f0e290258673418f26746 100644 (file)
@@ -440,15 +440,10 @@ process_ksk_result (struct GNUNET_FS_SearchContext *sc,
  * @param psearch parent search result (for namespace update searches)
  * @return context that can be used to control the search
  */
-static struct GNUNET_FS_SearchContext *search_start (struct GNUNET_FS_Handle *h,
-                                                     const struct GNUNET_FS_Uri
-                                                     *uri, uint32_t anonymity,
-                                                     enum
-                                                     GNUNET_FS_SearchOptions
-                                                     options, void *cctx,
-                                                     struct
-                                                     GNUNET_FS_SearchResult
-                                                     *psearch);
+static struct GNUNET_FS_SearchContext *
+search_start (struct GNUNET_FS_Handle *h, const struct GNUNET_FS_Uri *uri,
+              uint32_t anonymity, enum GNUNET_FS_SearchOptions options,
+              void *cctx, struct GNUNET_FS_SearchResult *psearch);
 
 
 /**
@@ -813,7 +808,8 @@ process_result (struct GNUNET_FS_SearchContext *sc, enum GNUNET_BLOCK_Type type,
  *
  * @param sc the search to reconnec
  */
-static void try_reconnect (struct GNUNET_FS_SearchContext *sc);
+static void
+try_reconnect (struct GNUNET_FS_SearchContext *sc);
 
 
 /**
@@ -855,8 +851,8 @@ receive_results (void *cls, const struct GNUNET_MessageHeader *msg)
  *
  * @param sc context for the search
  */
-static void schedule_transmit_search_request (struct GNUNET_FS_SearchContext
-                                              *sc);
+static void
+schedule_transmit_search_request (struct GNUNET_FS_SearchContext *sc);
 
 
 /**
index fa822e2650e04085a1d8ea9be4c01ac7460cf4fb..ad1d96bf085a706d5959c7370baba7a0f92a4ca5 100644 (file)
@@ -53,11 +53,12 @@ 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);
 
 
 /**
@@ -70,11 +71,11 @@ void 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);
 
 
 /**
@@ -83,9 +84,8 @@ void GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1,
  * @param daemons array with the daemons (must contain at least one)
  * @return peer group
  */
-struct GNUNET_TESTING_PeerGroup *GNUNET_FS_TEST_get_group (struct
-                                                           GNUNET_FS_TestDaemon
-                                                           **daemons);
+struct GNUNET_TESTING_PeerGroup *
+GNUNET_FS_TEST_get_group (struct GNUNET_FS_TestDaemon **daemons);
 
 
 
@@ -96,9 +96,9 @@ struct GNUNET_TESTING_PeerGroup *GNUNET_FS_TEST_get_group (struct
  * @param off which configuration to get
  * @return peer configuration
  */
-const struct GNUNET_CONFIGURATION_Handle
-    *GNUNET_FS_TEST_get_configuration (struct GNUNET_FS_TestDaemon **daemons,
-                                       unsigned int off);
+const struct GNUNET_CONFIGURATION_Handle *
+GNUNET_FS_TEST_get_configuration (struct GNUNET_FS_TestDaemon **daemons,
+                                  unsigned int off);
 
 /**
  * Stop daemons used for testing.
@@ -106,8 +106,9 @@ 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);
 
 
 /**
@@ -136,12 +137,12 @@ typedef void (*GNUNET_FS_TEST_UriContinuation) (void *cls,
  * @param cont function to call when done
  * @param cont_cls closure for cont
  */
-void GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon,
-                             struct GNUNET_TIME_Relative timeout,
-                             uint32_t anonymity, int do_index, uint64_t size,
-                             uint32_t seed, unsigned int verbose,
-                             GNUNET_FS_TEST_UriContinuation cont,
-                             void *cont_cls);
+void
+GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon,
+                        struct GNUNET_TIME_Relative timeout, uint32_t anonymity,
+                        int do_index, uint64_t size, uint32_t seed,
+                        unsigned int verbose,
+                        GNUNET_FS_TEST_UriContinuation cont, void *cont_cls);
 
 
 /**
@@ -157,12 +158,12 @@ void 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);
 
 
 
index 0a0db7a103c3e83c95741a7f68b20eae287df26a..58d0f012738b883f02814908b7375947a54e46ac 100644 (file)
@@ -395,8 +395,7 @@ GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te)
   if (NULL != te->proc)
     te->proc (te->cls, mychk, te->publish_offset, te->current_depth,
               (0 ==
-               te->
-               current_depth) ? GNUNET_BLOCK_TYPE_FS_DBLOCK :
+               te->current_depth) ? GNUNET_BLOCK_TYPE_FS_DBLOCK :
               GNUNET_BLOCK_TYPE_FS_IBLOCK, enc, pt_size);
   if (NULL != te->progress)
     te->progress (te->cls, te->publish_offset, pt_block, pt_size,
index 532c9e9aa2065568bcb7622c6935174521353538..b39a47cd31f8361a00303e979f92e406121358ba 100644 (file)
@@ -40,7 +40,8 @@
  * @param flen file length for which to compute the depth
  * @return depth of the tree, always > 0.  A depth of 1 means only a DBLOCK.
  */
-unsigned int GNUNET_FS_compute_depth (uint64_t flen);
+unsigned int
+GNUNET_FS_compute_depth (uint64_t flen);
 
 
 /**
@@ -52,7 +53,8 @@ unsigned int GNUNET_FS_compute_depth (uint64_t flen);
  * @param depth depth of the block.  depth==0 is a DBLOCK.
  * @return number of bytes of payload a subtree of this depth may correspond to
  */
-uint64_t GNUNET_FS_tree_compute_tree_size (unsigned int depth);
+uint64_t
+GNUNET_FS_tree_compute_tree_size (unsigned int depth);
 
 
 /**
@@ -66,8 +68,9 @@ 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);
 
 
 /**
@@ -134,18 +137,12 @@ typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, uint64_t offset,
  * @param cont function to call when done
  * @return tree encoder context
  */
-struct GNUNET_FS_TreeEncoder *GNUNET_FS_tree_encoder_create (struct
-                                                             GNUNET_FS_Handle
-                                                             *h, uint64_t size,
-                                                             void *cls,
-                                                             GNUNET_FS_DataReader
-                                                             reader,
-                                                             GNUNET_FS_TreeBlockProcessor
-                                                             proc,
-                                                             GNUNET_FS_TreeProgressCallback
-                                                             progress,
-                                                             GNUNET_SCHEDULER_Task
-                                                             cont);
+struct GNUNET_FS_TreeEncoder *
+GNUNET_FS_tree_encoder_create (struct GNUNET_FS_Handle *h, uint64_t size,
+                               void *cls, GNUNET_FS_DataReader reader,
+                               GNUNET_FS_TreeBlockProcessor proc,
+                               GNUNET_FS_TreeProgressCallback progress,
+                               GNUNET_SCHEDULER_Task cont);
 
 
 /**
@@ -156,7 +153,8 @@ struct GNUNET_FS_TreeEncoder *GNUNET_FS_tree_encoder_create (struct
  *
  * @param te tree encoder to use
  */
-void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
+void
+GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
 
 
 /**
@@ -170,8 +168,9 @@ void GNUNET_FS_tree_encoder_next (struct GNUNET_FS_TreeEncoder *te);
  *        prior to completion and prior to an internal error,
  *        both "*uri" and "*emsg" will be set to NULL).
  */
-void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
-                                    struct GNUNET_FS_Uri **uri, char **emsg);
+void
+GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
+                               struct GNUNET_FS_Uri **uri, char **emsg);
 
 
 #if 0
@@ -185,8 +184,9 @@ void GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
  * @param data set to the resume data
  * @param size set to the size of the resume data
  */
-void GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder
-                                             *te, void **data, size_t * size);
+void
+GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder *te,
+                                        void **data, size_t * size);
 
 
 /**
@@ -197,8 +197,9 @@ void GNUNET_FS_tree_encoder_resume_get_data (const struct GNUNET_FS_TreeEncoder
  * @param data the resume data
  * @param size the size of the resume data
  */
-void GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
-                                    const void *data, size_t size);
+void
+GNUNET_FS_tree_encoder_resume (struct GNUNET_FS_TreeEncoder *te,
+                               const void *data, size_t size);
 #endif
 
 #endif
index 22dab495568563aec992d7b4c9c3a291682453e4..206a8adca82f5e22de6aa196beff094969fa6c9b 100644 (file)
@@ -1834,8 +1834,8 @@ uri_loc_to_string (const struct GNUNET_FS_Uri *uri)
   GNUNET_asprintf (&ret, "%s%s%s.%s.%llu.%s.%s.%llu", GNUNET_FS_URI_PREFIX,
                    GNUNET_FS_URI_LOC_INFIX, (const char *) &keyhash,
                    (const char *) &queryhash,
-                   (unsigned long long) GNUNET_ntohll (uri->data.loc.fi.
-                                                       file_length), peerId,
+                   (unsigned long long) GNUNET_ntohll (uri->data.loc.
+                                                       fi.file_length), peerId,
                    peerSig,
                    (unsigned long long) uri->data.loc.expirationTime.abs_value);
   GNUNET_free (peerSig);
index 9f18cb99c397c58e22caa7e3663681603ec81f31..748a8f09cba762de196d068b8a20a93fb5a270b0 100644 (file)
@@ -106,8 +106,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
       s = GNUNET_STRINGS_relative_time_to_string (info->value.download.eta);
       t = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed *
                                           1000LL /
-                                          (info->value.download.duration.
-                                           rel_value + 1));
+                                          (info->value.download.
+                                           duration.rel_value + 1));
       fprintf (stdout,
                _("Downloading `%s' at %llu/%llu (%s remaining, %s/s)\n"),
                info->value.download.filename,
@@ -124,8 +124,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     s = GNUNET_STRINGS_byte_size_fancy (info->value.download.completed * 1000 /
-                                        (info->value.download.duration.
-                                         rel_value + 1));
+                                        (info->value.download.
+                                         duration.rel_value + 1));
     fprintf (stdout, _("Downloading `%s' done (%s/s).\n"),
              info->value.download.filename, s);
     GNUNET_free (s);
index a67886f7d67e505b4928079e3aa2e7dbf35e5ac2..7edad6979f0c23b42af7ead690f14dff4f76cd8b 100644 (file)
@@ -133,8 +133,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     fprintf (stdout, _("Publishing `%s' done.\n"),
              info->value.publish.filename);
-    s = GNUNET_FS_uri_to_string (info->value.publish.specifics.completed.
-                                 chk_uri);
+    s = GNUNET_FS_uri_to_string (info->value.publish.specifics.
+                                 completed.chk_uri);
     fprintf (stdout, _("URI is `%s'.\n"), s);
     GNUNET_free (s);
     if (info->value.publish.pctx == NULL)
index c82a0794c5d7501858c1d853e3ae9fdd8f5ad2c0..eb534583348dbf88fb40a771dbf235624efacc6f 100644 (file)
@@ -150,8 +150,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     uri = GNUNET_FS_uri_to_string (info->value.search.specifics.result.uri);
     printf ("#%u:\n", cnt++);
     filename =
-        GNUNET_CONTAINER_meta_data_get_by_type (info->value.search.specifics.
-                                                result.meta,
+        GNUNET_CONTAINER_meta_data_get_by_type (info->value.search.
+                                                specifics.result.meta,
                                                 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME);
     if (filename != NULL)
     {
@@ -162,8 +162,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
     else
       printf ("gnunet-download %s\n", uri);
     if (verbose)
-      GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.result.
-                                          meta, &item_printer, NULL);
+      GNUNET_CONTAINER_meta_data_iterate (info->value.search.specifics.
+                                          result.meta, &item_printer, NULL);
     printf ("\n");
     fflush (stdout);
     GNUNET_free_non_null (filename);
index 56604185f48eee3f94c1887f328607a3bb251e6c..bee81431863edb6208a72058a56935fd7a2452fd 100644 (file)
@@ -167,7 +167,8 @@ extern int GSF_enable_randomized_delays;
  *         GNUNET_NO to process normally (load normal)
  *         GNUNET_SYSERR to process for free (load low)
  */
-int GSF_test_get_load_too_high_ (uint32_t priority);
+int
+GSF_test_get_load_too_high_ (uint32_t priority);
 
 
 /**
@@ -176,7 +177,8 @@ int GSF_test_get_load_too_high_ (uint32_t priority);
  *
  * @param start time when the datastore request was issued
  */
-void GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start);
+void
+GSF_update_datastore_delay_ (struct GNUNET_TIME_Absolute start);
 
 
 
index 1e93a475eb682622d5a301f7800435891c540dfb..96d906c5b7683916dc834fa09c4c7cb147f21f6b 100644 (file)
@@ -383,7 +383,8 @@ GSF_get_peer_performance_data_ (struct GSF_ConnectedPeer *cp)
  * @param buf where to copy the message
  * @return number of bytes copied to buf
  */
-static size_t peer_transmit_ready_cb (void *cls, size_t size, void *buf);
+static size_t
+peer_transmit_ready_cb (void *cls, size_t size, void *buf);
 
 
 
@@ -400,12 +401,11 @@ static size_t peer_transmit_ready_cb (void *cls, size_t size, void *buf);
  *        long should the client wait until re-trying?
  * @param preference current traffic preference for the given peer
  */
-static void core_reserve_callback (void *cls,
-                                   const struct GNUNET_PeerIdentity *peer,
-                                   struct GNUNET_BANDWIDTH_Value32NBO
-                                   bandwidth_out, int32_t amount,
-                                   struct GNUNET_TIME_Relative res_delay,
-                                   uint64_t preference);
+static void
+core_reserve_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
+                       struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
+                       int32_t amount, struct GNUNET_TIME_Relative res_delay,
+                       uint64_t preference);
 
 
 /**
@@ -491,9 +491,8 @@ peer_transmit_ready_cb (void *cls, size_t size, void *buf)
     GNUNET_assert (0 < cp->ppd.pending_replies--);
   }
   GNUNET_LOAD_update (cp->ppd.transmission_delay,
-                      GNUNET_TIME_absolute_get_duration (pth->
-                                                         transmission_request_start_time).
-                      rel_value);
+                      GNUNET_TIME_absolute_get_duration
+                      (pth->transmission_request_start_time).rel_value);
   ret = pth->gmc (pth->gmc_cls, size, buf);
   GNUNET_assert (NULL == pth->cth);
   for (pos = cp->pth_head; pos != NULL; pos = pos->next)
@@ -1732,9 +1731,9 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
 #if DEBUG_FS && 0
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Migration already blocked for another %llu ms\n",
-                (unsigned long long) GNUNET_TIME_absolute_get_remaining (cp->
-                                                                         last_migration_block).
-                rel_value);
+                (unsigned long long)
+                GNUNET_TIME_absolute_get_remaining
+                (cp->last_migration_block).rel_value);
 #endif
     return;                     /* already blocked */
   }
index 84165d8b769bfed98a9093df547c0cf6724cb914..3f25363f190ce4e926c405c9c79cc239428a4ba6 100644 (file)
@@ -170,11 +170,9 @@ struct GSF_PeerTransmitHandle;
  * @param atsi performance data for the connection
  * @return handle to connected peer entry
  */
-struct GSF_ConnectedPeer *GSF_peer_connect_handler_ (const struct
-                                                     GNUNET_PeerIdentity *peer,
-                                                     const struct
-                                                     GNUNET_TRANSPORT_ATS_Information
-                                                     *atsi);
+struct GSF_ConnectedPeer *
+GSF_peer_connect_handler_ (const struct GNUNET_PeerIdentity *peer,
+                           const struct GNUNET_TRANSPORT_ATS_Information *atsi);
 
 
 /**
@@ -183,8 +181,8 @@ struct GSF_ConnectedPeer *GSF_peer_connect_handler_ (const struct
  * @param peer peer's identity
  * @return NULL if this peer is not currently connected
  */
-struct GSF_ConnectedPeer *GSF_peer_get_ (const struct GNUNET_PeerIdentity
-                                         *peer);
+struct GSF_ConnectedPeer *
+GSF_peer_get_ (const struct GNUNET_PeerIdentity *peer);
 
 
 /**
@@ -201,13 +199,10 @@ struct GSF_ConnectedPeer *GSF_peer_get_ (const struct GNUNET_PeerIdentity
  * @param gmc_cls closure for gmc
  * @return handle to cancel request
  */
-struct GSF_PeerTransmitHandle *GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp,
-                                                   int is_query,
-                                                   uint32_t priority,
-                                                   struct GNUNET_TIME_Relative
-                                                   timeout, size_t size,
-                                                   GSF_GetMessageCallback gmc,
-                                                   void *gmc_cls);
+struct GSF_PeerTransmitHandle *
+GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp, int is_query,
+                    uint32_t priority, struct GNUNET_TIME_Relative timeout,
+                    size_t size, GSF_GetMessageCallback gmc, void *gmc_cls);
 
 
 /**
@@ -215,7 +210,8 @@ struct GSF_PeerTransmitHandle *GSF_peer_transmit_ (struct GSF_ConnectedPeer *cp,
  *
  * @param pth request to cancel
  */
-void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth);
+void
+GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth);
 
 
 /**
@@ -225,9 +221,10 @@ 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);
 
 
 /**
@@ -237,9 +234,9 @@ void 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);
 
 
 /**
@@ -249,9 +246,10 @@ void 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);
 
 
 /**
@@ -265,13 +263,12 @@ void 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);
 
 
 /**
@@ -285,11 +282,12 @@ void 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);
 
 
 /**
@@ -303,11 +301,9 @@ int GSF_handle_p2p_migration_stop_ (void *cls,
  * @param message the actual message
  * @return pending request handle, NULL on error
  */
-struct GSF_PendingRequest *GSF_handle_p2p_query_ (const struct
-                                                  GNUNET_PeerIdentity *other,
-                                                  const struct
-                                                  GNUNET_MessageHeader
-                                                  *message);
+struct GSF_PendingRequest *
+GSF_handle_p2p_query_ (const struct GNUNET_PeerIdentity *other,
+                       const struct GNUNET_MessageHeader *message);
 
 
 /**
@@ -316,9 +312,8 @@ struct GSF_PendingRequest *GSF_handle_p2p_query_ (const struct
  * @param cp peer to query
  * @return performance data record for the peer
  */
-struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct
-                                                                GSF_ConnectedPeer
-                                                                *cp);
+struct GSF_PeerPerformanceData *
+GSF_get_peer_performance_data_ (struct GSF_ConnectedPeer *cp);
 
 
 /**
@@ -328,8 +323,9 @@ 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);
 
 
 /**
@@ -339,8 +335,9 @@ void 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);
 
 
 /**
@@ -349,7 +346,8 @@ void GSF_peer_disconnect_handler_ (void *cls,
  *
  * @param lc handle to the local client (henceforth invalid)
  */
-void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc);
+void
+GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc);
 
 
 /**
@@ -361,8 +359,9 @@ 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);
 
 
 /**
@@ -371,8 +370,9 @@ void 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);
 
 
 /**
@@ -381,19 +381,22 @@ void GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp,
  * @param it function to call for each peer
  * @param it_cls closure for it
  */
-void GSF_iterate_connected_peers_ (GSF_ConnectedPeerIterator it, void *it_cls);
+void
+GSF_iterate_connected_peers_ (GSF_ConnectedPeerIterator it, void *it_cls);
 
 
 /**
  * Initialize peer management subsystem.
  */
-void GSF_connected_peer_init_ (void);
+void
+GSF_connected_peer_init_ (void);
 
 
 /**
  * Shutdown peer management subsystem.
  */
-void GSF_connected_peer_done_ (void);
+void
+GSF_connected_peer_done_ (void);
 
 
 #endif
index c7bff3a9d016c0a5cfb64f3d8cd67b6cbf605781..ab3f77abee701cd67598f4fc7c3af7205a893230 100644 (file)
@@ -228,8 +228,7 @@ signal_index_ok (struct IndexInfo *ii)
                 ("Index request received for file `%s' is already indexed as `%s'.  Permitting anyway.\n"),
                 ii->filename,
                 (const char *) GNUNET_CONTAINER_multihashmap_get (ifm,
-                                                                  &ii->
-                                                                  file_id));
+                                                                  &ii->file_id));
     GNUNET_SERVER_transmit_context_append_data (ii->tc, NULL, 0,
                                                 GNUNET_MESSAGE_TYPE_FS_INDEX_START_OK);
     GNUNET_SERVER_transmit_context_run (ii->tc, GNUNET_TIME_UNIT_MINUTES);
@@ -447,8 +446,8 @@ GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
         prev->next = next;
       GNUNET_break (GNUNET_OK ==
                     GNUNET_CONTAINER_multihashmap_remove (ifm, &pos->file_id,
-                                                          (void *) pos->
-                                                          filename));
+                                                          (void *)
+                                                          pos->filename));
       GNUNET_free (pos);
       found = GNUNET_YES;
     }
index a5c8f659338badc5c7f2e1225adae2635e1aae8d..4295b201124105bb78329f899c32aab55ffedb59 100644 (file)
  * @param cont_cls closure for cont
  * @return GNUNET_OK on success
  */
-int GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
-                                      uint32_t size, const void *data,
-                                      enum GNUNET_BLOCK_Type type,
-                                      uint32_t priority, uint32_t anonymity,
-                                      struct GNUNET_TIME_Absolute expiration,
-                                      uint64_t uid,
-                                      GNUNET_DATASTORE_DatumProcessor cont,
-                                      void *cont_cls);
+int
+GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, uint32_t size,
+                                  const void *data, enum GNUNET_BLOCK_Type type,
+                                  uint32_t priority, uint32_t anonymity,
+                                  struct GNUNET_TIME_Absolute expiration,
+                                  uint64_t uid,
+                                  GNUNET_DATASTORE_DatumProcessor cont,
+                                  void *cont_cls);
 
 /**
  * Handle INDEX_START-message.
@@ -70,9 +70,9 @@ int 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);
 
 
 /**
@@ -82,10 +82,9 @@ void 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);
 
 
 /**
@@ -95,8 +94,9 @@ void 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);
 
 
 /**
@@ -106,14 +106,16 @@ void GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
  * @param d datastore to use
  * @return GNUNET_OK on success
  */
-int GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c,
-                             struct GNUNET_DATASTORE_Handle *d);
+int
+GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c,
+                         struct GNUNET_DATASTORE_Handle *d);
 
 
 /**
  * Shutdown the module.
  */
-void GNUNET_FS_indexing_done (void);
+void
+GNUNET_FS_indexing_done (void);
 
 
 #endif
index 6b79690f1583da4da76930d8f63db1565d294a1e..c625edf0b16b968e956a2e222892759c48e32042 100644 (file)
@@ -36,8 +36,8 @@
  * @param client handle of the client
  * @return handle to local client entry
  */
-struct GSF_LocalClient *GSF_local_client_lookup_ (struct GNUNET_SERVER_Client
-                                                  *client);
+struct GSF_LocalClient *
+GSF_local_client_lookup_ (struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -50,12 +50,10 @@ struct GSF_LocalClient *GSF_local_client_lookup_ (struct GNUNET_SERVER_Client
  * @param message the actual message
  * @return pending request handle for the request, NULL on error
  */
-struct GSF_PendingRequest *GSF_local_client_start_search_handler_ (struct
-                                                                   GNUNET_SERVER_Client
-                                                                   *client,
-                                                                   const struct
-                                                                   GNUNET_MessageHeader
-                                                                   *message);
+struct GSF_PendingRequest *
+GSF_local_client_start_search_handler_ (struct GNUNET_SERVER_Client *client,
+                                        const struct GNUNET_MessageHeader
+                                        *message);
 
 
 /**
@@ -66,8 +64,9 @@ 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);
 
 
 /**
@@ -76,8 +75,8 @@ void 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
index 58fb11cee6153d9d5a07f42ab5ae4f4aac50fc62..d1a8a11632b4ce3f43b0741eb4e344730911bc59 100644 (file)
@@ -207,9 +207,9 @@ static unsigned long long plan_count;
  * @param cls the 'struct GSF_ConnectedPeer' for transmission
  * @param tc scheduler context
  */
-static void schedule_peer_transmission (void *cls,
-                                        const struct
-                                        GNUNET_SCHEDULER_TaskContext *tc);
+static void
+schedule_peer_transmission (void *cls,
+                            const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -243,8 +243,8 @@ plan (struct PeerPlan *pp, struct GSF_RequestPlan *rp)
 #endif
 
   GNUNET_assert (rp->hn == NULL);
-  if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).
-      rel_value == 0)
+  if (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).rel_value
+      == 0)
     rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp, rp->priority);
   else
     rp->hn =
@@ -359,8 +359,8 @@ schedule_peer_transmission (void *cls,
   }
   /* move ready requests to priority queue */
   while ((NULL != (rp = GNUNET_CONTAINER_heap_peek (pp->delay_heap))) &&
-         (GNUNET_TIME_absolute_get_remaining (rp->earliest_transmission).
-          rel_value == 0))
+         (GNUNET_TIME_absolute_get_remaining
+          (rp->earliest_transmission).rel_value == 0))
   {
     GNUNET_assert (rp == GNUNET_CONTAINER_heap_remove_root (pp->delay_heap));
     rp->hn = GNUNET_CONTAINER_heap_insert (pp->priority_heap, rp, rp->priority);
@@ -380,9 +380,9 @@ schedule_peer_transmission (void *cls,
 #if DEBUG_FS
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Sleeping for %llu ms before retrying requests on plan %p.\n",
-                (unsigned long long) GNUNET_TIME_absolute_get_remaining (rp->
-                                                                         earliest_transmission).
-                rel_value, pp);
+                (unsigned long long)
+                GNUNET_TIME_absolute_get_remaining
+                (rp->earliest_transmission).rel_value, pp);
 #endif
     pp->task =
         GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_absolute_get_remaining
index cfaeabe224ae6e24c396f7ad491793e8b51cedda..23787908e50cb8ea58095d29e22ba4069ab12814 100644 (file)
@@ -35,8 +35,8 @@
  * @param cp peer with the entry
  * @param pr request with the entry
  */
-void GSF_plan_add_ (struct GSF_ConnectedPeer *cp,
-                    struct GSF_PendingRequest *pr);
+void
+GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr);
 
 
 /**
@@ -45,7 +45,8 @@ void GSF_plan_add_ (struct GSF_ConnectedPeer *cp,
  *
  * @param cp connected peer 
  */
-void GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp);
+void
+GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp);
 
 
 /**
@@ -54,19 +55,22 @@ void GSF_plan_notify_peer_disconnect_ (const struct GSF_ConnectedPeer *cp);
  *
  * @param pr request that is done
  */
-void GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr);
+void
+GSF_plan_notify_request_done_ (struct GSF_PendingRequest *pr);
 
 
 /**
  * Initialize plan subsystem.
  */
-void GSF_plan_init (void);
+void
+GSF_plan_init (void);
 
 
 /**
  * Shutdown plan subsystem.
  */
-void GSF_plan_done (void);
+void
+GSF_plan_done (void);
 
 
 #endif
index 7b6290bbba69e168037b3a7f24567327bca0828f..e5cb1f03c21420746045816640ccbfb96cd5b27d 100644 (file)
@@ -817,9 +817,8 @@ process_reply (void *cls, const GNUNET_HashCode * key, void *value)
     /* short cut: stop processing early, no BF-update, etc. */
     update_request_performance_data (prq, pr);
     GNUNET_LOAD_update (GSF_rt_entry_lifetime,
-                        GNUNET_TIME_absolute_get_duration (pr->public_data.
-                                                           start_time).
-                        rel_value);
+                        GNUNET_TIME_absolute_get_duration (pr->
+                                                           public_data.start_time).rel_value);
     /* pass on to other peers / local clients */
     pr->rh (pr->rh_cls, prq->eval, pr, prq->anonymity_level, prq->expiration,
             prq->type, prq->data, prq->size);
@@ -1101,9 +1100,8 @@ warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
               _("Datastore lookup already took %llu ms!\n"),
-              (unsigned long long) GNUNET_TIME_absolute_get_duration (pr->
-                                                                      qe_start).
-              rel_value);
+              (unsigned long long)
+              GNUNET_TIME_absolute_get_duration (pr->qe_start).rel_value);
   pr->warn_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES, &warn_delay_task,
                                     pr);
@@ -1123,9 +1121,8 @@ odc_warn_delay_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
   GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
               _("On-demand lookup already took %llu ms!\n"),
-              (unsigned long long) GNUNET_TIME_absolute_get_duration (pr->
-                                                                      qe_start).
-              rel_value);
+              (unsigned long long)
+              GNUNET_TIME_absolute_get_duration (pr->qe_start).rel_value);
   pr->warn_task =
       GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MINUTES,
                                     &odc_warn_delay_task, pr);
@@ -1257,12 +1254,12 @@ process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size,
                                   GNUNET_BLOCK_TYPE_FS_DBLOCK ?
                                   GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
                                   (0 !=
-                                   (GSF_PRO_PRIORITY_UNLIMITED & pr->
-                                    public_data.options)) ? UINT_MAX : 1
+                                   (GSF_PRO_PRIORITY_UNLIMITED &
+                                    pr->public_data.options)) ? UINT_MAX : 1
                                   /* queue priority */ ,
                                   (0 !=
-                                   (GSF_PRO_PRIORITY_UNLIMITED & pr->
-                                    public_data.options)) ? UINT_MAX : 1
+                                   (GSF_PRO_PRIORITY_UNLIMITED &
+                                    pr->public_data.options)) ? UINT_MAX : 1
                                   /* max queue size */ ,
                                   GNUNET_TIME_UNIT_FOREVER_REL,
                                   &process_local_reply, pr);
@@ -1298,12 +1295,12 @@ process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size,
                                   GNUNET_BLOCK_TYPE_FS_DBLOCK ?
                                   GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
                                   (0 !=
-                                   (GSF_PRO_PRIORITY_UNLIMITED & pr->
-                                    public_data.options)) ? UINT_MAX : 1
+                                   (GSF_PRO_PRIORITY_UNLIMITED &
+                                    pr->public_data.options)) ? UINT_MAX : 1
                                   /* queue priority */ ,
                                   (0 !=
-                                   (GSF_PRO_PRIORITY_UNLIMITED & pr->
-                                    public_data.options)) ? UINT_MAX : 1
+                                   (GSF_PRO_PRIORITY_UNLIMITED &
+                                    pr->public_data.options)) ? UINT_MAX : 1
                                   /* max queue size */ ,
                                   GNUNET_TIME_UNIT_FOREVER_REL,
                                   &process_local_reply, pr);
@@ -1357,12 +1354,12 @@ process_local_reply (void *cls, const GNUNET_HashCode * key, size_t size,
                                 GNUNET_BLOCK_TYPE_FS_DBLOCK ?
                                 GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
                                 (0 !=
-                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
-                                  options)) ? UINT_MAX : 1
+                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->
+                                  public_data.options)) ? UINT_MAX : 1
                                 /* queue priority */ ,
                                 (0 !=
-                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
-                                  options)) ? UINT_MAX : 1
+                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->
+                                  public_data.options)) ? UINT_MAX : 1
                                 /* max queue size */ ,
                                 GNUNET_TIME_UNIT_FOREVER_REL,
                                 &process_local_reply, pr);
@@ -1413,12 +1410,12 @@ GSF_local_lookup_ (struct GSF_PendingRequest *pr,
                                 GNUNET_BLOCK_TYPE_FS_DBLOCK ?
                                 GNUNET_BLOCK_TYPE_ANY : pr->public_data.type,
                                 (0 !=
-                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
-                                  options)) ? UINT_MAX : 1
+                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->
+                                  public_data.options)) ? UINT_MAX : 1
                                 /* queue priority */ ,
                                 (0 !=
-                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->public_data.
-                                  options)) ? UINT_MAX : 1
+                                 (GSF_PRO_PRIORITY_UNLIMITED & pr->
+                                  public_data.options)) ? UINT_MAX : 1
                                 /* max queue size */ ,
                                 GNUNET_TIME_UNIT_FOREVER_REL,
                                 &process_local_reply, pr);
index f2e7bcf6267a2f366d251b304b23c88763026840..b68989be7a22613e373312f25a2e62e44ece5999 100644 (file)
@@ -201,33 +201,19 @@ typedef void (*GSF_PendingRequestReplyHandler) (void *cls,
  * @param rh_cls closure for rh
  * @return handle for the new pending request
  */
-struct GSF_PendingRequest *GSF_pending_request_create_ (enum
-                                                        GSF_PendingRequestOptions
-                                                        options,
-                                                        enum GNUNET_BLOCK_Type
-                                                        type,
-                                                        const GNUNET_HashCode *
-                                                        query,
-                                                        const GNUNET_HashCode *
-                                                        namespace,
-                                                        const struct
-                                                        GNUNET_PeerIdentity
-                                                        *target,
-                                                        const char *bf_data,
-                                                        size_t bf_size,
-                                                        uint32_t mingle,
-                                                        uint32_t
-                                                        anonymity_level,
-                                                        uint32_t priority,
-                                                        int32_t ttl,
-                                                        GNUNET_PEER_Id
-                                                        sender_pid,
-                                                        const GNUNET_HashCode *
-                                                        replies_seen,
-                                                        unsigned int
-                                                        replies_seen_count,
-                                                        GSF_PendingRequestReplyHandler
-                                                        rh, void *rh_cls);
+struct GSF_PendingRequest *
+GSF_pending_request_create_ (enum GSF_PendingRequestOptions options,
+                             enum GNUNET_BLOCK_Type type,
+                             const GNUNET_HashCode * query,
+                             const GNUNET_HashCode * namespace,
+                             const struct GNUNET_PeerIdentity *target,
+                             const char *bf_data, size_t bf_size,
+                             uint32_t mingle, uint32_t anonymity_level,
+                             uint32_t priority, int32_t ttl,
+                             GNUNET_PEER_Id sender_pid,
+                             const GNUNET_HashCode * replies_seen,
+                             unsigned int replies_seen_count,
+                             GSF_PendingRequestReplyHandler rh, void *rh_cls);
 
 
 /**
@@ -238,9 +224,10 @@ 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);
 
 
 /**
@@ -249,9 +236,8 @@ void GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
  * @param pr pending request
  * @return associated public data
  */
-struct GSF_PendingRequestData *GSF_pending_request_get_data_ (struct
-                                                              GSF_PendingRequest
-                                                              *pr);
+struct GSF_PendingRequestData *
+GSF_pending_request_get_data_ (struct GSF_PendingRequest *pr);
 
 
 /**
@@ -263,8 +249,9 @@ 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);
 
 
 /**
@@ -276,9 +263,9 @@ int 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);
 
 
 /**
@@ -287,8 +274,8 @@ size_t             GSF_pending_request_get_message_ (struct GSF_PendingRequest
  * @param pr request to cancel
  * @param full_cleanup fully purge the request
  */
-void GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr,
-                                  int full_cleanup);
+void
+GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup);
 
 
 /**
@@ -311,7 +298,8 @@ typedef int (*GSF_PendingRequestIterator) (void *cls,
  * @param it function to call for each request
  * @param cls closure for it
  */
-void GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
+void
+GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
 
 
 /**
@@ -327,8 +315,9 @@ 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);
 
 
 /**
@@ -336,7 +325,8 @@ int GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
  *
  * @param pr the pending request to process
  */
-void GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
+void
+GSF_dht_lookup_ (struct GSF_PendingRequest *pr);
 
 
 /**
@@ -360,20 +350,23 @@ 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);
 
 
 /**
  * Setup the subsystem.
  */
-void GSF_pending_request_init_ (void);
+void
+GSF_pending_request_init_ (void);
 
 
 /**
  * Shutdown the subsystem.
  */
-void GSF_pending_request_done_ (void);
+void
+GSF_pending_request_done_ (void);
 
 
 #endif
index 6d8c05999fbd4d3e817b7839f1ddf8d93d2344f1..fb05366afe3e4c92e94d65cacc19e820d2bff058 100644 (file)
@@ -191,7 +191,8 @@ delete_migration_block (struct MigrationReadyBlock *mb)
 /**
  * Find content for migration to this peer.
  */
-static void find_content (struct MigrationReadyPeer *mrp);
+static void
+find_content (struct MigrationReadyPeer *mrp);
 
 
 /**
@@ -343,7 +344,8 @@ score_content (struct MigrationReadyPeer *peer,
  * If the migration task is not currently running, consider
  * (re)scheduling it with the appropriate delay.
  */
-static void consider_gathering (void);
+static void
+consider_gathering (void);
 
 
 /**
@@ -421,9 +423,9 @@ find_content (struct MigrationReadyPeer *mrp)
  * @param cls unused
  * @param tc scheduler context (also unused)
  */
-static void gather_migration_blocks (void *cls,
-                                     const struct GNUNET_SCHEDULER_TaskContext
-                                     *tc);
+static void
+gather_migration_blocks (void *cls,
+                         const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index 40e1252be0924d5b03ee93235cc8c331c69c8137..7967b04cdf211b0a72cdbb96a27dce6c83175d61 100644 (file)
 /**
  * Setup the module.
  */
-void GSF_push_init_ (void);
+void
+GSF_push_init_ (void);
 
 
 /**
  * Shutdown the module.
  */
-void GSF_push_done_ (void);
+void
+GSF_push_done_ (void);
 
 
 /**
@@ -47,7 +49,8 @@ void GSF_push_done_ (void);
  *
  * @param peer handle for the peer that connected
  */
-void GSF_push_start_ (struct GSF_ConnectedPeer *peer);
+void
+GSF_push_start_ (struct GSF_ConnectedPeer *peer);
 
 
 /**
@@ -56,7 +59,8 @@ void GSF_push_start_ (struct GSF_ConnectedPeer *peer);
  *
  * @param peer handle for the peer that disconnected
  */
-void GSF_push_stop_ (struct GSF_ConnectedPeer *peer);
+void
+GSF_push_stop_ (struct GSF_ConnectedPeer *peer);
 
 
 #endif
index ec2344b373d5a07ba158705dcd24d55600a474ce..4b4925d22f67519f18b1a14b0d152c86930cd3d1 100644 (file)
@@ -86,9 +86,9 @@ static struct PutOperator operators[] = {
  * @param cls type of blocks to gather
  * @param tc scheduler context (unused)
  */
-static void gather_dht_put_blocks (void *cls,
-                                   const struct GNUNET_SCHEDULER_TaskContext
-                                   *tc);
+static void
+gather_dht_put_blocks (void *cls,
+                       const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index 21c3c3bafede8d632a58d1c32052fc7de7db3562..59b1f83e3a97188466aeae07ae7617613d9cefe0 100644 (file)
 /**
  * Setup the module.
  */
-void GSF_put_init_ (void);
+void
+GSF_put_init_ (void);
 
 
 /**
  * Shutdown the module.
  */
-void GSF_put_done_ (void);
+void
+GSF_put_done_ (void);
 
 
 #endif
index 0737ea949632d12cdbcd68b181eb4b98c26a3cfd..0bf05d0cef28466ad62b34ca17edaaf52a6ed418 100644 (file)
@@ -129,7 +129,8 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
 /**
  * Function that gathers stats from all daemons.
  */
-static void stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -206,8 +207,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     sm->stat =
         GNUNET_STATISTICS_create ("<driver>",
                                   GNUNET_FS_TEST_get_configuration (daemons,
-                                                                    sm->
-                                                                    daemon));
+                                                                    sm->daemon));
     GNUNET_SCHEDULER_add_now (&stat_run, sm);
   }
   else
index 5a8d4242a7b8060930825c06becaef7fa965c9ad..3432714b386e5b9a16866c4347615afa127b0bbe 100644 (file)
@@ -162,7 +162,8 @@ print_stat (void *cls, const char *subsystem, const char *name, uint64_t value,
 /**
  * Function that gathers stats from all daemons.
  */
-static void stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+stat_run (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -244,8 +245,7 @@ do_report (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     sm->stat =
         GNUNET_STATISTICS_create ("<driver>",
                                   GNUNET_FS_TEST_get_configuration (daemons,
-                                                                    sm->
-                                                                    daemon));
+                                                                    sm->daemon));
     GNUNET_SCHEDULER_add_now (&stat_run, sm);
   }
   else
index 34625ff2ea496eb15ad51735a85015ca6df0ca5a..10f4c0ce404c792e14cc654484d9072da7c3c076 100644 (file)
@@ -140,42 +140,42 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kb/s.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GAUGER ("FS", "Publishing speed (insertion)",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL), "kb/s");
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL), "kb/s");
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     download =
         GNUNET_FS_download_start (fs,
-                                  event->value.publish.specifics.completed.
-                                  chk_uri, NULL, fn, NULL, 0, FILESIZE, 1,
-                                  GNUNET_FS_DOWNLOAD_OPTION_NONE, "download",
-                                  NULL);
+                                  event->value.publish.specifics.
+                                  completed.chk_uri, NULL, fn, NULL, 0,
+                                  FILESIZE, 1, GNUNET_FS_DOWNLOAD_OPTION_NONE,
+                                  "download", NULL);
     GNUNET_assert (download != NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     printf ("Download complete,  %llu kb/s.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GAUGER ("FS", "Local download speed (inserted)",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL), "kb/s");
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL), "kb/s");
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -185,8 +185,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.download.completed,
             (unsigned long long) event->value.download.size,
             event->value.download.specifics.progress.depth,
-            (unsigned long long) event->value.download.specifics.progress.
-            offset);
+            (unsigned long long) event->value.download.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
index 5b1752e63c64b2d54a2d6d411077f6a50679b4ec..1811b325ddc0a3b7be1ec661ebb8e6611921b7ef 100644 (file)
@@ -141,42 +141,42 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GAUGER ("FS", "Publishing speed (indexing)",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL), "kb/s");
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL), "kb/s");
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     download =
         GNUNET_FS_download_start (fs,
-                                  event->value.publish.specifics.completed.
-                                  chk_uri, NULL, fn, NULL, 0, FILESIZE, 1,
-                                  GNUNET_FS_DOWNLOAD_OPTION_NONE, "download",
-                                  NULL);
+                                  event->value.publish.specifics.
+                                  completed.chk_uri, NULL, fn, NULL, 0,
+                                  FILESIZE, 1, GNUNET_FS_DOWNLOAD_OPTION_NONE,
+                                  "download", NULL);
     GNUNET_assert (download != NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_COMPLETED:
     printf ("Download complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GAUGER ("FS", "Local download speed (indexed)",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL), "kb/s");
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL), "kb/s");
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -186,8 +186,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.download.completed,
             (unsigned long long) event->value.download.size,
             event->value.download.specifics.progress.depth,
-            (unsigned long long) event->value.download.specifics.progress.
-            offset);
+            (unsigned long long) event->value.download.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
index 5b2a53f801b093bc2b1fcc39b3df2487c382d144..c7a0a8b7cc38b1ee2c5c454e4a98c92ad5c67238 100644 (file)
@@ -123,8 +123,8 @@ abort_download_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void *progress_cb (void *cls,
-                          const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
 
 
 static void
@@ -171,16 +171,16 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     fn = GNUNET_DISK_mktemp ("gnunet-download-test-dst");
     start = GNUNET_TIME_absolute_get ();
     GNUNET_assert (download == NULL);
@@ -194,8 +194,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Download complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024LL));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024LL));
     GNUNET_SCHEDULER_add_now (&abort_download_task, NULL);
     break;
   case GNUNET_FS_STATUS_DOWNLOAD_PROGRESS:
@@ -206,8 +206,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.download.completed,
             (unsigned long long) event->value.download.size,
             event->value.download.specifics.progress.depth,
-            (unsigned long long) event->value.download.specifics.progress.
-            offset);
+            (unsigned long long) event->value.download.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
index 87afa12e15dc715594979865063077070c99a97d..b86506f8d7befca00bfe08ed3ba64b2bedf606d2 100644 (file)
@@ -110,8 +110,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Publish complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     if (0 == strcmp ("list_indexed-context-dir", event->value.publish.cctx))
       GNUNET_SCHEDULER_add_continuation (&list_indexed_task, NULL,
                                          GNUNET_SCHEDULER_REASON_PREREQ_DONE);
@@ -125,8 +125,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
index 797c4c9a8f94f470e2660839454c9d7ced17c5fd..3db0a7c62d1bebbfd275479bd501904cbf0cd778 100644 (file)
@@ -98,8 +98,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Publish complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     if (0 == strcmp ("publish-context-dir", event->value.publish.cctx))
       GNUNET_SCHEDULER_add_continuation (&abort_publish_task, NULL,
                                          GNUNET_SCHEDULER_REASON_PREREQ_DONE);
@@ -112,8 +112,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
index f69ac5d9a052ec644f00b96e28ba0ac36218cfd0..704c2a4c0491139977f4925f26e80419eb32a3c5 100644 (file)
@@ -97,8 +97,8 @@ abort_publish_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void *progress_cb (void *cls,
-                          const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
 
 
 static void
@@ -149,8 +149,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Publish complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000LL /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     if (0 == strcmp ("publish-context-dir", event->value.publish.cctx))
       GNUNET_SCHEDULER_add_now (&abort_publish_task, NULL);
     break;
@@ -163,8 +163,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_SUSPEND:
@@ -175,8 +175,9 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     if (NULL == publish)
     {
       GNUNET_assert (GNUNET_YES ==
-                     GNUNET_FS_file_information_is_directory (event->value.
-                                                              publish.fi));
+                     GNUNET_FS_file_information_is_directory (event->
+                                                              value.publish.
+                                                              fi));
       publish = event->value.publish.pc;
       return "publish-context-dir";
     }
index 3961017cf7b7159d936fdb4f0467742cccf2d053..d8e592b6fd15e4cf60e76bec2fe684674484cda8 100644 (file)
@@ -101,8 +101,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
index 5c5a6f140f9d56f98ef328301bda2bc87bd254d9..6eb18dafb2fddc64d959eb9a5952f23e3bdcdbe9 100644 (file)
@@ -86,8 +86,8 @@ abort_search_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void *progress_cb (void *cls,
-                          const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
 
 
 static void
@@ -140,8 +140,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
index 177b687ca541ec1b0643162d6b6bcb53101bdc3f..99913fbcfb30b5cff0bef677e35069009905525f 100644 (file)
@@ -100,16 +100,16 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     start = GNUNET_TIME_absolute_get ();
     unindex = GNUNET_FS_unindex_start (fs, fn, "unindex");
     GNUNET_assert (unindex != NULL);
@@ -118,8 +118,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Unindex complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
@@ -130,8 +130,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.unindex.completed,
             (unsigned long long) event->value.unindex.size,
             event->value.unindex.specifics.progress.depth,
-            (unsigned long long) event->value.unindex.specifics.progress.
-            offset);
+            (unsigned long long) event->value.unindex.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_ERROR:
index 4fcd1445f436d20fb97b9f5b174359fc9ef1b2dc..e814008174609a30a18072e3d4b291d8300b9ae2 100644 (file)
@@ -94,8 +94,8 @@ abort_unindex_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void *progress_cb (void *cls,
-                          const struct GNUNET_FS_ProgressInfo *event);
+static void *
+progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event);
 
 
 static void
@@ -141,16 +141,16 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.publish.completed,
             (unsigned long long) event->value.publish.size,
             event->value.publish.specifics.progress.depth,
-            (unsigned long long) event->value.publish.specifics.progress.
-            offset);
+            (unsigned long long) event->value.publish.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_COMPLETED:
     printf ("Publishing complete, %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     start = GNUNET_TIME_absolute_get ();
     unindex = GNUNET_FS_unindex_start (fs, fn, "unindex");
     GNUNET_assert (unindex != NULL);
@@ -159,8 +159,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
     printf ("Unindex complete,  %llu kbps.\n",
             (unsigned long long) (FILESIZE * 1000 /
                                   (1 +
-                                   GNUNET_TIME_absolute_get_duration (start).
-                                   rel_value) / 1024));
+                                   GNUNET_TIME_absolute_get_duration
+                                   (start).rel_value) / 1024));
     GNUNET_SCHEDULER_add_continuation (&abort_unindex_task, NULL,
                                        GNUNET_SCHEDULER_REASON_PREREQ_DONE);
     break;
@@ -172,8 +172,8 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *event)
             (unsigned long long) event->value.unindex.completed,
             (unsigned long long) event->value.unindex.size,
             event->value.unindex.specifics.progress.depth,
-            (unsigned long long) event->value.unindex.specifics.progress.
-            offset);
+            (unsigned long long) event->value.unindex.specifics.
+            progress.offset);
 #endif
     break;
   case GNUNET_FS_STATUS_PUBLISH_SUSPEND:
index c049dceea5ba897be11421dd27620b637ca57f43..f6a47f4d966823a2b16026df4dceda566580165f 100644 (file)
@@ -476,7 +476,8 @@ download_get_url ()
  * Method to save hostlist to a file during hostlist client shutdown
  * @param shutdown set if called because of shutdown, entries in linked list will be destroyed
  */
-static void save_hostlist_file (int shutdown);
+static void
+save_hostlist_file (int shutdown);
 
 
 /**
@@ -708,8 +709,8 @@ clean_up ()
  * @param cls closure, unused
  * @param tc task context, unused
  */
-static void task_download (void *cls,
-                           const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+task_download (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index c6561c82098da629cca3aebc20d2361443d06fba..3def865e4452eec9117a8e7f1be0cc4fd9879607 100644 (file)
  * @param learn set if client is learning new hostlists
  * @return GNUNET_OK on success
  */
-int GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
-                                  struct GNUNET_STATISTICS_Handle *st,
-                                  GNUNET_CORE_ConnectEventHandler *ch,
-                                  GNUNET_CORE_DisconnectEventHandler *dh,
-                                  GNUNET_CORE_MessageCallback *msgh, int learn);
+int
+GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
+                              struct GNUNET_STATISTICS_Handle *st,
+                              GNUNET_CORE_ConnectEventHandler *ch,
+                              GNUNET_CORE_DisconnectEventHandler *dh,
+                              GNUNET_CORE_MessageCallback *msgh, int learn);
 
 
 /**
  * Stop downloading hostlists from hostlist servers as necessary.
  */
-void GNUNET_HOSTLIST_client_stop (void);
+void
+GNUNET_HOSTLIST_client_stop (void);
 
 
 #endif
index e48b6a4acc4bf78bf3fd639af1883046cf391d66..bfe0b4b0ea9fc90d47f95e3f834604ba5ba0fd38 100644 (file)
@@ -448,8 +448,8 @@ process_notify (void *cls, const struct GNUNET_PeerIdentity *peer,
  * Function that queries MHD's select sets and
  * starts the task waiting for them.
  */
-static GNUNET_SCHEDULER_TaskIdentifier prepare_daemon (struct MHD_Daemon
-                                                       *daemon_handle);
+static GNUNET_SCHEDULER_TaskIdentifier
+prepare_daemon (struct MHD_Daemon *daemon_handle);
 
 
 /**
index b5960b39c112f6602b02665ef85fe8e57e2268f1..e0f8eb4a6f8b1eac5df76bff92ea5a971b97ad05 100644 (file)
  *
  * @return GNUNET_OK on success
  */
-int GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
-                                  struct GNUNET_STATISTICS_Handle *st,
-                                  struct GNUNET_CORE_Handle *core,
-                                  GNUNET_CORE_ConnectEventHandler *server_ch,
-                                  GNUNET_CORE_DisconnectEventHandler *server_dh,
-                                  int advertise);
+int
+GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
+                              struct GNUNET_STATISTICS_Handle *st,
+                              struct GNUNET_CORE_Handle *core,
+                              GNUNET_CORE_ConnectEventHandler *server_ch,
+                              GNUNET_CORE_DisconnectEventHandler *server_dh,
+                              int advertise);
 
 
 /**
  * Stop server offering our hostlist.
  */
-void GNUNET_HOSTLIST_server_stop (void);
+void
+GNUNET_HOSTLIST_server_stop (void);
 
 
 #endif
index 76529ede47c2612402fa26df10845bdada0909ef..6d52773deb8f87184956554d29dc21dce51fa577 100644 (file)
@@ -73,9 +73,9 @@ struct GNUNET_ARM_Handle;
  * @param service service that *this* process is implementing/providing, can be NULL
  * @return context to use for further ARM operations, NULL on error
  */
-struct GNUNET_ARM_Handle *GNUNET_ARM_connect (const struct
-                                              GNUNET_CONFIGURATION_Handle *cfg,
-                                              const char *service);
+struct GNUNET_ARM_Handle *
+GNUNET_ARM_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                    const char *service);
 
 
 /**
@@ -83,7 +83,8 @@ struct GNUNET_ARM_Handle *GNUNET_ARM_connect (const struct
  *
  * @param h the handle that was being used
  */
-void GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
+void
+GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
 
 
 /**
@@ -104,10 +105,10 @@ 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);
 
 
 /**
@@ -121,10 +122,10 @@ void 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);
 
 
 
index dd648dd754689476a6df5aec1f6cd8014b3a52c7..1de3d104193f59d2d757980d8e7c9ef2c390ab06 100644 (file)
@@ -83,10 +83,10 @@ typedef void (*GNUNET_TRANSPORT_ATS_AllocationNotification) (void *cls,
  * @param alloc_cb_cls closure for 'alloc_cb'
  * @return ats context
  */
-struct GNUNET_ATS_Handle *GNUNET_ATS_init (const struct
-                                           GNUNET_CONFIGURATION_Handle *cfg,
-                                           GNUNET_TRANSPORT_ATS_AllocationNotification
-                                           alloc_cb, void *alloc_cb_cls);
+struct GNUNET_ATS_Handle *
+GNUNET_ATS_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                 GNUNET_TRANSPORT_ATS_AllocationNotification alloc_cb,
+                 void *alloc_cb_cls);
 
 
 /**
@@ -94,7 +94,8 @@ struct GNUNET_ATS_Handle *GNUNET_ATS_init (const struct
  *
  * @param atc handle
  */
-void GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc);
+void
+GNUNET_ATS_shutdown (struct GNUNET_ATS_Handle *atc);
 
 
 /**
@@ -140,15 +141,11 @@ struct GNUNET_ATS_SuggestionContext;
  * @param cb function to call with the address
  * @param cb_cls closure for cb
  */
-struct GNUNET_ATS_SuggestionContext *GNUNET_ATS_suggest_address (struct
-                                                                 GNUNET_ATS_Handle
-                                                                 *atc,
-                                                                 const struct
-                                                                 GNUNET_PeerIdentity
-                                                                 *peer,
-                                                                 GNUNET_ATS_AddressSuggestionCallback
-                                                                 cb,
-                                                                 void *cb_cls);
+struct GNUNET_ATS_SuggestionContext *
+GNUNET_ATS_suggest_address (struct GNUNET_ATS_Handle *atc,
+                            const struct GNUNET_PeerIdentity *peer,
+                            GNUNET_ATS_AddressSuggestionCallback cb,
+                            void *cb_cls);
 
 
 /**
@@ -156,8 +153,8 @@ 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,12 +171,13 @@ void GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext
  * @param ats performance data for the connection
  * @param ats_count number of performance records in 'ats'
  */
-void GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
-                              const struct GNUNET_PeerIdentity *peer,
-                              const char *plugin_name, struct Session *session,
-                              const void *plugin_addr, size_t plugin_addr_len,
-                              const struct GNUNET_TRANSPORT_ATS_Information
-                              *ats, uint32_t ats_count);
+void
+GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
+                         const struct GNUNET_PeerIdentity *peer,
+                         const char *plugin_name, struct Session *session,
+                         const void *plugin_addr, size_t plugin_addr_len,
+                         const struct GNUNET_TRANSPORT_ATS_Information *ats,
+                         uint32_t ats_count);
 
 
 /**
@@ -190,8 +188,9 @@ void 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);
 
 
 /**
@@ -201,9 +200,10 @@ void 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);
 
 
 /**
@@ -224,14 +224,14 @@ void 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
index e78d16552985d1f2deee7a391a62907ccd520794..75f71b32c9b7111b7eb32fd2d0cef17549635345 100644 (file)
@@ -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,12 +107,11 @@ struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_init (uint32_t
  * @param deadline when is the deadline
  * @return number of bytes available at bps until deadline
  */
-uint64_t                    GNUNET_BANDWIDTH_value_get_available_until (struct
-                                                                        GNUNET_BANDWIDTH_Value32NBO
-                                                                        bps,
-                                                                        struct
-                                                                        GNUNET_TIME_Relative
-                                                                        deadline);
+uint64_t
+GNUNET_BANDWIDTH_value_get_available_until (struct GNUNET_BANDWIDTH_Value32NBO
+                                            bps,
+                                            struct GNUNET_TIME_Relative
+                                            deadline);
 
 
 /**
@@ -123,11 +122,9 @@ uint64_t                    GNUNET_BANDWIDTH_value_get_available_until (struct
  * @param size number of bytes we want to have available
  * @return how long it would take
  */
-struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_value_get_delay_for (struct
-                                                                  GNUNET_BANDWIDTH_Value32NBO
-                                                                  bps,
-                                                                  uint64_t
-                                                                  size);
+struct GNUNET_TIME_Relative
+GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps,
+                                      uint64_t size);
 
 
 
@@ -138,12 +135,9 @@ struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_value_get_delay_for (struct
  * @param b2 second value
  * @return the min of b1 and b2
  */
-struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_min (struct
-                                                               GNUNET_BANDWIDTH_Value32NBO
-                                                               b1,
-                                                               struct
-                                                               GNUNET_BANDWIDTH_Value32NBO
-                                                               b2);
+struct GNUNET_BANDWIDTH_Value32NBO
+GNUNET_BANDWIDTH_value_min (struct GNUNET_BANDWIDTH_Value32NBO b1,
+                            struct GNUNET_BANDWIDTH_Value32NBO b2);
 
 
 /**
@@ -160,10 +154,10 @@ struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_min (struct
  * @param max_carry_s maximum number of seconds unused bandwidth
  *        may accumulate before it expires
  */
-void GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
-                                    struct GNUNET_BANDWIDTH_Value32NBO
-                                    bytes_per_second_limit,
-                                    uint32_t max_carry_s);
+void
+GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
+                               struct GNUNET_BANDWIDTH_Value32NBO
+                               bytes_per_second_limit, uint32_t max_carry_s);
 
 
 /**
@@ -177,8 +171,9 @@ void 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);
 
 
 /**
@@ -190,10 +185,9 @@ int 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);
 
 
 /**
@@ -203,9 +197,8 @@ struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_tracker_get_delay (struct
  * @param av tracker to query
  * @return number of bytes available for consumption right now
  */
-int64_t                  GNUNET_BANDWIDTH_tracker_get_available (struct
-                                                                 GNUNET_BANDWIDTH_Tracker
-                                                                 *av);
+int64_t
+GNUNET_BANDWIDTH_tracker_get_available (struct GNUNET_BANDWIDTH_Tracker *av);
 
 
 /**
@@ -214,9 +207,10 @@ int64_t                  GNUNET_BANDWIDTH_tracker_get_available (struct
  * @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 */
index 74512ec40dcdd04d371be53bc01af3208e42e8ce..de356d1e582b7e000d3bf7be4a7b247b89bc5c4c 100644 (file)
@@ -49,7 +49,8 @@ struct GNUNET_BIO_ReadHandle;
  * @param fn file name to be opened
  * @return IO handle on success, NULL on error
  */
-struct GNUNET_BIO_ReadHandle *GNUNET_BIO_read_open (const char *fn);
+struct GNUNET_BIO_ReadHandle *
+GNUNET_BIO_read_open (const char *fn);
 
 
 /**
@@ -60,7 +61,8 @@ struct GNUNET_BIO_ReadHandle *GNUNET_BIO_read_open (const char *fn);
  * @param emsg set to the error message
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
+int
+GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
 
 
 /**
@@ -72,8 +74,9 @@ 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 +89,9 @@ int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
  * @param len the number of bytes to read
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file,
-                        int line, void *result, size_t len);
+int
+GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file, int line,
+                    void *result, size_t len);
 
 /**
  * Read 0-terminated string from a file.
@@ -99,8 +103,9 @@ int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file,
  * @param maxLen maximum allowed length for the string
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
-                            char **result, size_t maxLen);
+int
+GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
+                        char **result, size_t maxLen);
 
 
 /**
@@ -111,9 +116,9 @@ int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
  * @param result the buffer to store a pointer to the (allocated) metadata
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h,
-                               const char *what,
-                               struct GNUNET_CONTAINER_MetaData **result);
+int
+GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h, const char *what,
+                           struct GNUNET_CONTAINER_MetaData **result);
 
 
 /**
@@ -144,8 +149,9 @@ 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 +172,9 @@ int GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
  * @param i address of 64-bit integer to read
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
-                             int line, int64_t * i);
+int
+GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
+                         int line, int64_t * i);
 
 
 /**
@@ -190,7 +197,8 @@ struct GNUNET_BIO_WriteHandle;
  * @param fn file name to be opened
  * @return IO handle on success, NULL on error
  */
-struct GNUNET_BIO_WriteHandle *GNUNET_BIO_write_open (const char *fn);
+struct GNUNET_BIO_WriteHandle *
+GNUNET_BIO_write_open (const char *fn);
 
 
 /**
@@ -199,7 +207,8 @@ struct GNUNET_BIO_WriteHandle *GNUNET_BIO_write_open (const char *fn);
  * @param h file handle
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
+int
+GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
 
 
 /**
@@ -210,8 +219,9 @@ 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);
 
 
 /**
@@ -221,7 +231,8 @@ int GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
  * @param s string to write (can be NULL)
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
+int
+GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
 
 
 
@@ -233,8 +244,9 @@ int GNUNET_BIO_write_string (struct GNUNET_BIO_WriteHandle *h, const char *s);
  * @param m metadata to write
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
-                                const struct GNUNET_CONTAINER_MetaData *m);
+int
+GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
+                            const struct GNUNET_CONTAINER_MetaData *m);
 
 
 
@@ -264,7 +276,8 @@ int GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
  * @param i address of 32-bit integer to write
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
+int
+GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
 
 
 /**
@@ -274,7 +287,8 @@ int GNUNET_BIO_write_int32 (struct GNUNET_BIO_WriteHandle *h, int32_t i);
  * @param i address of 64-bit integer to write
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i);
+int
+GNUNET_BIO_write_int64 (struct GNUNET_BIO_WriteHandle *h, int64_t i);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 51b8254d032ef1fb790ad516ae934ad7d853e11e..66b2490c0f8f31739c32d6baad54f94eb35df5d3 100644 (file)
@@ -161,8 +161,9 @@ 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);
 
 
 /**
@@ -171,9 +172,8 @@ void GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in,
  * @param cfg configuration to use
  * @return NULL on error
  */
-struct GNUNET_BLOCK_Context *GNUNET_BLOCK_context_create (const struct
-                                                          GNUNET_CONFIGURATION_Handle
-                                                          *cfg);
+struct GNUNET_BLOCK_Context *
+GNUNET_BLOCK_context_create (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -181,7 +181,8 @@ struct GNUNET_BLOCK_Context *GNUNET_BLOCK_context_create (const struct
  *
  * @param ctx context to destroy
  */
-void GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
+void
+GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
 
 
 /**
@@ -202,23 +203,14 @@ 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);
 
 
 /**
@@ -234,9 +226,10 @@ enum GNUNET_BLOCK_EvaluationResult GNUNET_BLOCK_evaluate (struct
  *         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 */
index d9c3ec76f07c380a6500f2cec4c79e5696541269..5eb0daf3f9d9ea43478fe3b01098834edc656b11 100644 (file)
@@ -183,26 +183,19 @@ typedef int (*GNUNET_CHAT_MessageConfirmation) (void *cls,
  * @param me member ID (pseudonym)
  * @return NULL on error
  */
-struct GNUNET_CHAT_Room *GNUNET_CHAT_join_room (const struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, const char *nick_name,
-                                                struct GNUNET_CONTAINER_MetaData
-                                                *member_info,
-                                                const char *room_name,
-                                                enum GNUNET_CHAT_MsgOptions
-                                                msg_options,
-                                                GNUNET_CHAT_JoinCallback
-                                                joinCallback, void *join_cls,
-                                                GNUNET_CHAT_MessageCallback
-                                                messageCallback,
-                                                void *message_cls,
-                                                GNUNET_CHAT_MemberListCallback
-                                                memberCallback,
-                                                void *member_cls,
-                                                GNUNET_CHAT_MessageConfirmation
-                                                confirmationCallback,
-                                                void *confirmation_cls,
-                                                GNUNET_HashCode * me);
+struct GNUNET_CHAT_Room *
+GNUNET_CHAT_join_room (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                       const char *nick_name,
+                       struct GNUNET_CONTAINER_MetaData *member_info,
+                       const char *room_name,
+                       enum GNUNET_CHAT_MsgOptions msg_options,
+                       GNUNET_CHAT_JoinCallback joinCallback, void *join_cls,
+                       GNUNET_CHAT_MessageCallback messageCallback,
+                       void *message_cls,
+                       GNUNET_CHAT_MemberListCallback memberCallback,
+                       void *member_cls,
+                       GNUNET_CHAT_MessageConfirmation confirmationCallback,
+                       void *confirmation_cls, GNUNET_HashCode * me);
 
 /**
  * Send a message.
@@ -213,18 +206,18 @@ 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);
 
 
 /**
  * Leave a chat room.
  */
-void GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room);
+void
+GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room);
 
 
 #if 0
@@ -241,9 +234,10 @@ typedef int (*GNUNET_CHAT_RoomIterator) (const char *room, const char *topic,
  * List all of the (publically visible) chat rooms.
  * @return number of rooms on success, GNUNET_SYSERR if iterator aborted
  */
-int GNUNET_CHAT_list_rooms (struct GNUNET_GE_Context *ectx,
-                            struct GNUNET_GC_Configuration *cfg,
-                            GNUNET_CHAT_RoomIterator it, void *cls);
+int
+GNUNET_CHAT_list_rooms (struct GNUNET_GE_Context *ectx,
+                        struct GNUNET_GC_Configuration *cfg,
+                        GNUNET_CHAT_RoomIterator it, void *cls);
 #endif
 
 
index 3fad012226c2c19db5934fc790e6cf9e0b56d118..ed033d0311461a9d7b4f8c5dda8aacadead4a39a 100644 (file)
@@ -53,11 +53,9 @@ struct GNUNET_CLIENT_Connection;
  * @param cfg configuration to use
  * @return NULL on error (service unknown to configuration)
  */
-struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char
-                                                        *service_name,
-                                                        const struct
-                                                        GNUNET_CONFIGURATION_Handle
-                                                        *cfg);
+struct GNUNET_CLIENT_Connection *
+GNUNET_CLIENT_connect (const char *service_name,
+                       const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -66,8 +64,9 @@ 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);
 
 
 
@@ -86,8 +85,9 @@ void GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
  * @param finish_pending_write should a transmission already passed to the
  *          handle be completed?
  */
-void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
-                               int finish_pending_write);
+void
+GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
+                          int finish_pending_write);
 
 /**
  * Type of a function to call when we receive a message
@@ -120,10 +120,10 @@ typedef void (*GNUNET_CLIENT_ShutdownTask) (void *cls, int reason);
  * @param handler_cls closure for handler
  * @param timeout how long to wait until timing out
  */
-void GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
-                            GNUNET_CLIENT_MessageHandler handler,
-                            void *handler_cls,
-                            struct GNUNET_TIME_Relative timeout);
+void
+GNUNET_CLIENT_receive (struct GNUNET_CLIENT_Connection *sock,
+                       GNUNET_CLIENT_MessageHandler handler, void *handler_cls,
+                       struct GNUNET_TIME_Relative timeout);
 
 
 /**
@@ -152,20 +152,13 @@ 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);
 
 
 /**
@@ -173,9 +166,9 @@ struct GNUNET_CLIENT_TransmitHandle *GNUNET_CLIENT_notify_transmit_ready (struct
  * 
  * @param th handle from the original request.
  */
-void GNUNET_CLIENT_notify_transmit_ready_cancel (struct
-                                                 GNUNET_CLIENT_TransmitHandle
-                                                 *th);
+void
+GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle
+                                            *th);
 
 
 /**
@@ -199,14 +192,13 @@ void GNUNET_CLIENT_notify_transmit_ready_cancel (struct
  * @return GNUNET_OK on success, GNUNET_SYSERR if a request
  *         is already pending
  */
-int GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection
-                                             *sock,
-                                             const struct GNUNET_MessageHeader
-                                             *hdr,
-                                             struct GNUNET_TIME_Relative
-                                             timeout, int auto_retry,
-                                             GNUNET_CLIENT_MessageHandler rn,
-                                             void *rn_cls);
+int
+GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection *sock,
+                                         const struct GNUNET_MessageHeader *hdr,
+                                         struct GNUNET_TIME_Relative timeout,
+                                         int auto_retry,
+                                         GNUNET_CLIENT_MessageHandler rn,
+                                         void *rn_cls);
 
 
 /**
@@ -220,10 +212,11 @@ int GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection
  *         or "TIMEOUT" (service not known to be running))
  * @param task_cls closure for task
  */
-void GNUNET_CLIENT_service_test (const char *service,
-                                 const struct GNUNET_CONFIGURATION_Handle *cfg,
-                                 struct GNUNET_TIME_Relative timeout,
-                                 GNUNET_SCHEDULER_Task task, void *task_cls);
+void
+GNUNET_CLIENT_service_test (const char *service,
+                            const struct GNUNET_CONFIGURATION_Handle *cfg,
+                            struct GNUNET_TIME_Relative timeout,
+                            GNUNET_SCHEDULER_Task task, void *task_cls);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index f884d9a2443a9f4ad0e039ed63f5dda195948c7b..2636824d319fd3f5153e22b66d1062316d2c5a0b 100644 (file)
@@ -168,7 +168,8 @@ typedef void (*GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind,
  * @param message what is the message (format string)
  * @param ... arguments for format string
  */
-void GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
+void
+GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
 
 
 
@@ -181,8 +182,9 @@ 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, ...);
 
 
 /**
@@ -191,7 +193,8 @@ void GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
  * @param n number of log calls to ignore
  * @param check_reset GNUNET_YES to assert that the log skip counter is currently zero
  */
-void GNUNET_log_skip (unsigned int n, int check_reset);
+void
+GNUNET_log_skip (unsigned int n, int check_reset);
 
 
 /**
@@ -202,8 +205,8 @@ 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);
 
 
 /**
@@ -212,7 +215,8 @@ int GNUNET_log_setup (const char *comp, const char *loglevel,
  * @param logger log function
  * @param logger_cls closure for logger
  */
-void GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls);
+void
+GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls);
 
 
 /**
@@ -221,7 +225,8 @@ void GNUNET_logger_add (GNUNET_Logger logger, void *logger_cls);
  * @param logger log function
  * @param logger_cls closure for logger
  */
-void GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
+void
+GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
 
 
 /**
@@ -232,7 +237,8 @@ void GNUNET_logger_remove (GNUNET_Logger logger, void *logger_cls);
  * @param hc the hash code
  * @return string 
  */
-const char *GNUNET_h2s (const GNUNET_HashCode * hc);
+const char *
+GNUNET_h2s (const GNUNET_HashCode * hc);
 
 
 /**
@@ -244,7 +250,8 @@ const char *GNUNET_h2s (const GNUNET_HashCode * hc);
  * @param hc the hash code
  * @return string
  */
-const char *GNUNET_h2s_full (const GNUNET_HashCode * hc);
+const char *
+GNUNET_h2s_full (const GNUNET_HashCode * hc);
 
 
 /**
@@ -256,7 +263,8 @@ const char *GNUNET_h2s_full (const GNUNET_HashCode * hc);
  * @return string form of the pid; will be overwritten by next
  *         call to GNUNET_i2s.
  */
-const char *GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
+const char *
+GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
 
 
 /**
@@ -269,7 +277,8 @@ const char *GNUNET_i2s (const struct GNUNET_PeerIdentity *pid);
  * @return nicely formatted string for the address
  *  will be overwritten by next call to GNUNET_a2s.
  */
-const char *GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen);
+const char *
+GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen);
 
 /**
  * Convert error type to string.
@@ -277,7 +286,8 @@ const char *GNUNET_a2s (const struct sockaddr *addr, socklen_t addrlen);
  * @param kind type to convert
  * @return string corresponding to the type
  */
-const char *GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
+const char *
+GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
 
 
 /**
@@ -327,14 +337,16 @@ const char *GNUNET_error_type_to_string (enum GNUNET_ErrorType kind);
  * @param n the value in network byte order
  * @return the same value in host byte order
  */
-unsigned long long GNUNET_ntohll (unsigned long long n);
+unsigned long long
+GNUNET_ntohll (unsigned long long n);
 
 /**
  * Convert a long long to network-byte-order.
  * @param n the value in host byte order
  * @return the same value in network byte order
  */
-unsigned long long GNUNET_htonll (unsigned long long n);
+unsigned long long
+GNUNET_htonll (unsigned long long n);
 
 
 /* ************************* allocation functions ****************** */
@@ -468,7 +480,8 @@ unsigned long long GNUNET_htonll (unsigned long long n);
  * @param ... data for format string
  * @return number of bytes written to buf or negative value on error
  */
-int GNUNET_snprintf (char *buf, size_t size, const char *format, ...);
+int
+GNUNET_snprintf (char *buf, size_t size, const char *format, ...);
 
 
 /**
@@ -479,7 +492,8 @@ int GNUNET_snprintf (char *buf, size_t size, const char *format, ...);
  * @param ... data for format string
  * @return number of bytes in "*buf" excluding 0-termination
  */
-int GNUNET_asprintf (char **buf, const char *format, ...);
+int
+GNUNET_asprintf (char **buf, const char *format, ...);
 
 
 /* ************** internal implementations, use macros above! ************** */
@@ -495,7 +509,8 @@ int GNUNET_asprintf (char **buf, const char *format, ...);
  * @param linenumber line where this call is being made (for debugging)
  * @return allocated memory, never NULL
  */
-void *GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber);
+void *
+GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber);
 
 
 
@@ -510,8 +525,9 @@ void *GNUNET_xmalloc_ (size_t size, const char *filename, int linenumber);
  * @param linenumber line where this call is being made (for debugging)
  * @return allocated memory, never NULL
  */
-void *GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
-                       int linenumber);
+void *
+GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
+                 int linenumber);
 
 
 /**
@@ -526,15 +542,15 @@ 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
@@ -545,7 +561,8 @@ void *GNUNET_xrealloc_ (void *ptr, size_t n, 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_xfree_ (void *ptr, const char *filename, int linenumber);
+void
+GNUNET_xfree_ (void *ptr, const char *filename, int linenumber);
 
 
 /**
@@ -555,7 +572,8 @@ void GNUNET_xfree_ (void *ptr, const char *filename, int linenumber);
  * @param linenumber line where this call is being made (for debugging)
  * @return the duplicated string
  */
-char *GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber);
+char *
+GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber);
 
 /**
  * Dup partially a string. Don't call GNUNET_xstrndup_ directly. Use the GNUNET_strndup macro.
@@ -565,8 +583,9 @@ char *GNUNET_xstrdup_ (const char *str, const char *filename, int linenumber);
  * @param linenumber line where this call is being made (for debugging)
  * @return the duplicated string
  */
-char *GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
-                        int linenumber);
+char *
+GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
+                  int linenumber);
 
 /**
  * Grow an array, the new elements are zeroed out.
@@ -583,9 +602,9 @@ 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);
 
 
 
index 24705f0fb68f102bc133a0159ac9f0d5db99f1db..7167d8bd6c6c5f400a4b9c06f3f90f62623dbacc 100644 (file)
@@ -49,7 +49,8 @@ struct GNUNET_CONFIGURATION_Handle;
  * Create a new configuration object.
  * @return fresh configuration object
  */
-struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_create (void);
+struct GNUNET_CONFIGURATION_Handle *
+GNUNET_CONFIGURATION_create (void);
 
 
 /**
@@ -58,9 +59,8 @@ struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_create (void);
  * @param cfg configuration to duplicate
  * @return duplicate configuration
  */
-struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_dup (const struct
-                                                              GNUNET_CONFIGURATION_Handle
-                                                              *cfg);
+struct GNUNET_CONFIGURATION_Handle *
+GNUNET_CONFIGURATION_dup (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -68,7 +68,8 @@ struct GNUNET_CONFIGURATION_Handle *GNUNET_CONFIGURATION_dup (const struct
  *
  * @param cfg configuration to destroy
  */
-void GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg);
+void
+GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -80,8 +81,9 @@ void GNUNET_CONFIGURATION_destroy (struct GNUNET_CONFIGURATION_Handle *cfg);
  * @param filename name of the configuration file, NULL to load defaults
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
-                               const char *filename);
+int
+GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
+                           const char *filename);
 
 
 /**
@@ -92,8 +94,9 @@ int GNUNET_CONFIGURATION_load (struct GNUNET_CONFIGURATION_Handle *cfg,
  * @param filename name of the configuration file
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
-                                const char *filename);
+int
+GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
+                            const char *filename);
 
 
 /**
@@ -103,8 +106,9 @@ int GNUNET_CONFIGURATION_parse (struct GNUNET_CONFIGURATION_Handle *cfg,
  * @param filename where to write the configuration
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
-                                const char *filename);
+int
+GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
+                            const char *filename);
 
 /**
  * Write only configuration entries that have been changed to configuration file
@@ -113,10 +117,11 @@ 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
@@ -125,8 +130,8 @@ int GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle
  * @param cfg configuration to inspect
  * @return GNUNET_NO if clean, GNUNET_YES if dirty, GNUNET_SYSERR on error (i.e. last save failed)
  */
-int GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle
-                                   *cfg);
+int
+GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -159,9 +164,10 @@ typedef void (*GNUNET_CONFIGURATION_Section_Iterator) (void *cls,
  * @param iter function to call on each option
  * @param iter_cls closure for iter
  */
-void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle
-                                   *cfg, GNUNET_CONFIGURATION_Iterator iter,
-                                   void *iter_cls);
+void
+GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                              GNUNET_CONFIGURATION_Iterator iter,
+                              void *iter_cls);
 
 
 /**
@@ -171,10 +177,11 @@ void GNUNET_CONFIGURATION_iterate (const struct GNUNET_CONFIGURATION_Handle
  * @param iter function to call on each section
  * @param iter_cls closure for iter
  */
-void GNUNET_CONFIGURATION_iterate_sections (const struct
-                                            GNUNET_CONFIGURATION_Handle *cfg,
-                                            GNUNET_CONFIGURATION_Section_Iterator
-                                            iter, void *iter_cls);
+void
+GNUNET_CONFIGURATION_iterate_sections (const struct GNUNET_CONFIGURATION_Handle
+                                       *cfg,
+                                       GNUNET_CONFIGURATION_Section_Iterator
+                                       iter, void *iter_cls);
 
 
 /**
@@ -183,8 +190,9 @@ void GNUNET_CONFIGURATION_iterate_sections (const struct
  * @param cfg configuration to inspect
  * @param section name of the section to remove
  */
-void GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle
-                                          *cfg, const char *section);
+void
+GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg,
+                                     const char *section);
 
 /**
  * Get a configuration value that should be a number.
@@ -195,11 +203,11 @@ void GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle
  * @param number where to store the numeric value of the option
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_number (const struct
-                                           GNUNET_CONFIGURATION_Handle *cfg,
-                                           const char *section,
-                                           const char *option,
-                                           unsigned long long *number);
+int
+GNUNET_CONFIGURATION_get_value_number (const struct GNUNET_CONFIGURATION_Handle
+                                       *cfg, const char *section,
+                                       const char *option,
+                                       unsigned long long *number);
 
 
 /**
@@ -211,11 +219,11 @@ int GNUNET_CONFIGURATION_get_value_number (const struct
  * @param time set to the time value stored in the configuration
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_time (const struct
-                                         GNUNET_CONFIGURATION_Handle *cfg,
-                                         const char *section,
-                                         const char *option,
-                                         struct GNUNET_TIME_Relative *time);
+int
+GNUNET_CONFIGURATION_get_value_time (const struct GNUNET_CONFIGURATION_Handle
+                                     *cfg, const char *section,
+                                     const char *option,
+                                     struct GNUNET_TIME_Relative *time);
 
 
 /**
@@ -226,9 +234,9 @@ int GNUNET_CONFIGURATION_get_value_time (const struct
  * @param option option of interest
  * @return GNUNET_YES if so, GNUNET_NO if not.
  */
-int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle
-                                     *cfg, const char *section,
-                                     const char *option);
+int
+GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                                 const char *section, const char *option);
 
 
 /**
@@ -241,10 +249,10 @@ int GNUNET_CONFIGURATION_have_value (const struct GNUNET_CONFIGURATION_Handle
  *        value, or NULL if option is not specified
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_string (const struct
-                                           GNUNET_CONFIGURATION_Handle *cfg,
-                                           const char *section,
-                                           const char *option, char **value);
+int
+GNUNET_CONFIGURATION_get_value_string (const struct GNUNET_CONFIGURATION_Handle
+                                       *cfg, const char *section,
+                                       const char *option, char **value);
 
 
 /**
@@ -258,10 +266,11 @@ int GNUNET_CONFIGURATION_get_value_string (const struct
  *        value, or NULL if option is not specified
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_filename (const struct
-                                             GNUNET_CONFIGURATION_Handle *cfg,
-                                             const char *section,
-                                             const char *option, char **value);
+int
+GNUNET_CONFIGURATION_get_value_filename (const struct
+                                         GNUNET_CONFIGURATION_Handle *cfg,
+                                         const char *section,
+                                         const char *option, char **value);
 
 /**
  * Iterate over the set of filenames stored in a configuration value.
@@ -273,12 +282,13 @@ int GNUNET_CONFIGURATION_get_value_filename (const struct
  * @param cb_cls closure for cb
  * @return number of filenames iterated over, -1 on error
  */
-int GNUNET_CONFIGURATION_iterate_value_filenames (const struct
-                                                  GNUNET_CONFIGURATION_Handle
-                                                  *cfg, const char *section,
-                                                  const char *option,
-                                                  GNUNET_FileNameCallback cb,
-                                                  void *cb_cls);
+int
+GNUNET_CONFIGURATION_iterate_value_filenames (const struct
+                                              GNUNET_CONFIGURATION_Handle *cfg,
+                                              const char *section,
+                                              const char *option,
+                                              GNUNET_FileNameCallback cb,
+                                              void *cb_cls);
 
 /**
  * Iterate over values of a section in the configuration.
@@ -288,11 +298,12 @@ 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
@@ -306,12 +317,11 @@ void GNUNET_CONFIGURATION_iterate_section_values (const struct
  *        or NULL if option is not specified and no default given
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_CONFIGURATION_get_value_choice (const struct
-                                           GNUNET_CONFIGURATION_Handle *cfg,
-                                           const char *section,
-                                           const char *option,
-                                           const char **choices,
-                                           const char **value);
+int
+GNUNET_CONFIGURATION_get_value_choice (const struct GNUNET_CONFIGURATION_Handle
+                                       *cfg, const char *section,
+                                       const char *option, const char **choices,
+                                       const char **value);
 
 /**
  * Get a configuration value that should be in a set of
@@ -322,10 +332,10 @@ int GNUNET_CONFIGURATION_get_value_choice (const struct
  * @param option option of interest
  * @return GNUNET_YES, GNUNET_NO or if option has no valid value, GNUNET_SYSERR
  */
-int GNUNET_CONFIGURATION_get_value_yesno (const struct
-                                          GNUNET_CONFIGURATION_Handle *cfg,
-                                          const char *section,
-                                          const char *option);
+int
+GNUNET_CONFIGURATION_get_value_yesno (const struct GNUNET_CONFIGURATION_Handle
+                                      *cfg, const char *section,
+                                      const char *option);
 
 /**
  * Expand an expression of the form "$FOO/BAR" to "DIRECTORY/BAR"
@@ -336,9 +346,9 @@ int GNUNET_CONFIGURATION_get_value_yesno (const struct
  * @param orig string to $-expand (will be freed!)
  * @return $-expanded string
  */
-char *GNUNET_CONFIGURATION_expand_dollar (const struct
-                                          GNUNET_CONFIGURATION_Handle *cfg,
-                                          char *orig);
+char *
+GNUNET_CONFIGURATION_expand_dollar (const struct GNUNET_CONFIGURATION_Handle
+                                    *cfg, char *orig);
 
 
 /**
@@ -349,10 +359,10 @@ 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);
 
 
 /**
@@ -363,10 +373,10 @@ void 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
@@ -379,11 +389,11 @@ void GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle
  * @return GNUNET_OK on success,
  *         GNUNET_SYSERR if the filename is not in the list
  */
-int GNUNET_CONFIGURATION_remove_value_filename (struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, const char *section,
-                                                const char *option,
-                                                const char *value);
+int
+GNUNET_CONFIGURATION_remove_value_filename (struct GNUNET_CONFIGURATION_Handle
+                                            *cfg, const char *section,
+                                            const char *option,
+                                            const char *value);
 
 /**
  * Append a filename to a configuration value that
@@ -396,11 +406,11 @@ int GNUNET_CONFIGURATION_remove_value_filename (struct
  * @return GNUNET_OK on success,
  *         GNUNET_SYSERR if the filename already in the list
  */
-int GNUNET_CONFIGURATION_append_value_filename (struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, const char *section,
-                                                const char *option,
-                                                const char *value);
+int
+GNUNET_CONFIGURATION_append_value_filename (struct GNUNET_CONFIGURATION_Handle
+                                            *cfg, const char *section,
+                                            const char *option,
+                                            const char *value);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index af10c59664fff332d9ea90bf6aef0ebdab24e5f7..f7a6e5078ba37e4d51daa99d88d9100667537a44 100644 (file)
@@ -111,7 +111,8 @@ typedef void (*GNUNET_CONNECTION_Receiver) (void *cls, const void *buf,
  *
  * @param sock the connection to set persistent
  */
-void GNUNET_CONNECTION_persist_ (struct GNUNET_CONNECTION_Handle *sock);
+void
+GNUNET_CONNECTION_persist_ (struct GNUNET_CONNECTION_Handle *sock);
 
 /**
  * Disable the "CORK" feature for communication with the given socket,
@@ -124,7 +125,8 @@ void GNUNET_CONNECTION_persist_ (struct GNUNET_CONNECTION_Handle *sock);
  * @param sock the connection to make flushing and blocking
  * @return GNUNET_OK on success
  */
-int GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock);
+int
+GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock);
 
 
 /**
@@ -135,9 +137,8 @@ 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);
 
 
 /**
@@ -149,10 +150,10 @@ struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_existing (struct
  * @param lsock listen socket
  * @return the socket handle, NULL on error (for example, access refused)
  */
-struct GNUNET_CONNECTION_Handle
-    *GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access,
-                                           void *access_cls,
-                                           struct GNUNET_NETWORK_Handle *lsock);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access,
+                                      void *access_cls,
+                                      struct GNUNET_NETWORK_Handle *lsock);
 
 
 /**
@@ -165,15 +166,10 @@ 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);
 
 
 /**
@@ -185,11 +181,10 @@ struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_connect (const
  * @param unixpath path to connect to)
  * @return the socket handle, NULL on systems without UNIX support
  */
-struct GNUNET_CONNECTION_Handle
-    *GNUNET_CONNECTION_create_from_connect_to_unixpath (const struct
-                                                        GNUNET_CONFIGURATION_Handle
-                                                        *cfg,
-                                                        const char *unixpath);
+struct GNUNET_CONNECTION_Handle *
+GNUNET_CONNECTION_create_from_connect_to_unixpath (const struct
+                                                   GNUNET_CONFIGURATION_Handle
+                                                   *cfg, const char *unixpath);
 
 
 
@@ -204,14 +199,10 @@ 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).
@@ -221,7 +212,8 @@ struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_sockaddr (int
  * @param sock socket to check
  * @return GNUNET_YES if valid, GNUNET_NO otherwise
  */
-int GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock);
+int
+GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock);
 
 
 /**
@@ -232,8 +224,9 @@ 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);
 
 
 /**
@@ -249,8 +242,9 @@ int GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock,
  *        read from the application; all other transmissions should be
  *        aborted using 'GNUNET_CONNECTION_notify_transmit_ready_cancel').
  */
-void GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
-                                int finish_pending_write);
+void
+GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
+                           int finish_pending_write);
 
 
 /**
@@ -266,10 +260,11 @@ void 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);
 
 
 /**
@@ -280,7 +275,8 @@ void GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *sock,
  * @param sock socket handle
  * @return closure of the original receiver callback closure
  */
-void *GNUNET_CONNECTION_receive_cancel (struct GNUNET_CONNECTION_Handle *sock);
+void *
+GNUNET_CONNECTION_receive_cancel (struct GNUNET_CONNECTION_Handle *sock);
 
 
 /**
@@ -333,13 +329,12 @@ struct GNUNET_CONNECTION_TransmitHandle;
  * @return non-NULL if the notify callback was queued,
  *         NULL if we are already going to notify someone else (busy)
  */
-struct GNUNET_CONNECTION_TransmitHandle
-    *GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle
-                                              *sock, size_t size,
-                                              struct GNUNET_TIME_Relative
-                                              timeout,
-                                              GNUNET_CONNECTION_TransmitReadyNotify
-                                              notify, void *notify_cls);
+struct GNUNET_CONNECTION_TransmitHandle *
+GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle *sock,
+                                         size_t size,
+                                         struct GNUNET_TIME_Relative timeout,
+                                         GNUNET_CONNECTION_TransmitReadyNotify
+                                         notify, void *notify_cls);
 
 
 /**
@@ -348,9 +343,10 @@ 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);
 
 
 /**
@@ -359,8 +355,9 @@ void 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 */
index fde31ed34a83ed3742bc3af58822c7dd52ad9ea3..cad85d016b5299f7b5f3ae5636b1e961e43923c5 100644 (file)
@@ -75,13 +75,9 @@ typedef int (*GNUNET_HashCodeIterator) (void *cls, GNUNET_HashCode * next);
  *        element (number of bits set per element in the set)
  * @return the bloomfilter
  */
-struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_load (const
-                                                                        char
-                                                                        *filename,
-                                                                        size_t
-                                                                        size,
-                                                                        unsigned
-                                                                        int k);
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_load (const char *filename, size_t size,
+                                   unsigned int k);
 
 
 /**
@@ -97,13 +93,9 @@ struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_load (const
  *        element (number of bits set per element in the set)
  * @return the bloomfilter
  */
-struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_init (const
-                                                                        char
-                                                                        *data,
-                                                                        size_t
-                                                                        size,
-                                                                        unsigned
-                                                                        int k);
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_init (const char *data, size_t size,
+                                   unsigned int k);
 
 
 /**
@@ -114,9 +106,10 @@ struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_init (const
  * @param size the size of the given data array
  * @return GNUNET_SYSERR if the data array of the wrong size
  */
-int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
-                                               GNUNET_CONTAINER_BloomFilter *bf,
-                                               char *data, size_t size);
+int
+GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
+                                           GNUNET_CONTAINER_BloomFilter *bf,
+                                           char *data, size_t size);
 
 
 /**
@@ -125,8 +118,9 @@ int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
  * @param bf the filter
  * @return GNUNET_YES if the element is in the filter, GNUNET_NO if not
  */
-int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
-                                       *bf, const GNUNET_HashCode * e);
+int
+GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
+                                   *bf, const GNUNET_HashCode * e);
 
 
 /**
@@ -134,8 +128,9 @@ 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);
 
 
 /**
@@ -143,8 +138,9 @@ void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
  * @param bf the filter
  * @param e the element to remove
  */
-void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter
-                                          *bf, const GNUNET_HashCode * e);
+void
+GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter *bf,
+                                     const GNUNET_HashCode * e);
 
 
 /**
@@ -153,10 +149,9 @@ void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter
  * @param bf the filter
  * @return copy of bf
  */
-struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_copy (const
-                                                                        struct
-                                                                        GNUNET_CONTAINER_BloomFilter
-                                                                        *bf);
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_copy (const struct GNUNET_CONTAINER_BloomFilter
+                                   *bf);
 
 
 
@@ -166,8 +161,8 @@ struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_copy (const
  * free the space on the drive)
  * @param bf the filter
  */
-void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter
-                                        *bf);
+void
+GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter *bf);
 
 
 /**
@@ -176,17 +171,17 @@ 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);
 
 
 /**
  * Reset a bloom filter to empty.
  * @param bf the filter
  */
-void GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter
-                                         *bf);
+void
+GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter *bf);
 
 /**
  * Or the entries of the given raw data array with the
@@ -199,8 +194,9 @@ void GNUNET_CONTAINER_bloomfilter_clear (struct GNUNET_CONTAINER_BloomFilter
  * @param size size of data
  * @return GNUNET_OK on success
  */
-int GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf,
-                                     const char *data, size_t size);
+int
+GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf,
+                                 const char *data, size_t size);
 
 /**
  * Or the entries of the given raw data array with the
@@ -212,9 +208,10 @@ 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
@@ -227,10 +224,11 @@ int GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
  * @param size the new size for the filter
  * @param k the new number of GNUNET_CRYPTO_hash-function to apply per element
  */
-void GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter
-                                          *bf, GNUNET_HashCodeIterator iterator,
-                                          void *iterator_cls, size_t size,
-                                          unsigned int k);
+void
+GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter *bf,
+                                     GNUNET_HashCodeIterator iterator,
+                                     void *iterator_cls, size_t size,
+                                     unsigned int k);
 
 /* ****************** metadata ******************* */
 
@@ -244,7 +242,8 @@ struct GNUNET_CONTAINER_MetaData;
  * 
  * @return empty meta-data container
  */
-struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_create (void);
+struct GNUNET_CONTAINER_MetaData *
+GNUNET_CONTAINER_meta_data_create (void);
 
 /**
  * Duplicate a MetaData token.
@@ -252,17 +251,17 @@ struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_create (void);
  * @param md what to duplicate
  * @return duplicate meta-data container
  */
-struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_duplicate (const
-                                                                        struct
-                                                                        GNUNET_CONTAINER_MetaData
-                                                                        *md);
+struct GNUNET_CONTAINER_MetaData *
+GNUNET_CONTAINER_meta_data_duplicate (const struct GNUNET_CONTAINER_MetaData
+                                      *md);
 
 /**
  * Free meta data.
  *
  * @param md what to free
  */
-void GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md);
+void
+GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md);
 
 /**
  * Test if two MDs are equal. We consider them equal if
@@ -274,10 +273,11 @@ 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);
 
 
 /**
@@ -297,12 +297,13 @@ int 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);
 
 
 /**
@@ -312,9 +313,9 @@ int 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);
 
 
 /**
@@ -327,9 +328,10 @@ void 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);
 
 
 /**
@@ -337,7 +339,8 @@ int GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md,
  *
  * @param md metadata to manipulate
  */
-void GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md);
+void
+GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md);
 
 
 /**
@@ -346,9 +349,9 @@ 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);
 
 
 /**
@@ -359,9 +362,10 @@ void 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
@@ -373,9 +377,9 @@ int GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData
  * @param type type to look for
  * @return NULL if no entry was found
  */
-char *GNUNET_CONTAINER_meta_data_get_by_type (const struct
-                                              GNUNET_CONTAINER_MetaData *md,
-                                              enum EXTRACTOR_MetaType type);
+char *
+GNUNET_CONTAINER_meta_data_get_by_type (const struct GNUNET_CONTAINER_MetaData
+                                        *md, enum EXTRACTOR_MetaType type);
 
 
 /**
@@ -389,9 +393,10 @@ char *GNUNET_CONTAINER_meta_data_get_by_type (const struct
  * @return NULL if we do not have any such entry,
  *  otherwise client is responsible for freeing the value!
  */
-char *GNUNET_CONTAINER_meta_data_get_first_by_types (const struct
-                                                     GNUNET_CONTAINER_MetaData
-                                                     *md, ...);
+char *
+GNUNET_CONTAINER_meta_data_get_first_by_types (const struct
+                                               GNUNET_CONTAINER_MetaData *md,
+                                               ...);
 
 /**
  * Get a thumbnail from the meta-data (if present).  Only matches meta
@@ -402,9 +407,9 @@ 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);
 
 
 
@@ -445,7 +450,7 @@ enum GNUNET_CONTAINER_MetaDataSerializationOptions
  *         -1 on error (typically: not enough
  *         space)
  */
-ssize_t                                      
+ssize_t
 GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
                                       *md, char **target, size_t max,
                                       enum
@@ -459,7 +464,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
  * @param md metadata to inspect
  * @return number of bytes needed for serialization, -1 on error
  */
-ssize_t                                      
+ssize_t
 GNUNET_CONTAINER_meta_data_get_serialized_size (const struct
                                                 GNUNET_CONTAINER_MetaData *md);
 
@@ -472,11 +477,8 @@ GNUNET_CONTAINER_meta_data_get_serialized_size (const struct
  * @return MD on success, NULL on error (i.e.
  *         bad format)
  */
-struct GNUNET_CONTAINER_MetaData *GNUNET_CONTAINER_meta_data_deserialize (const
-                                                                          char
-                                                                          *input,
-                                                                          size_t
-                                                                          size);
+struct GNUNET_CONTAINER_MetaData *
+GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size);
 
 
 /* ******************************* HashMap **************************** */
@@ -541,8 +543,8 @@ typedef int (*GNUNET_CONTAINER_HashMapIterator) (void *cls,
  * @param len initial size (map will grow as needed)
  * @return NULL on error
  */
-struct GNUNET_CONTAINER_MultiHashMap
-    *GNUNET_CONTAINER_multihashmap_create (unsigned int len);
+struct GNUNET_CONTAINER_MultiHashMap *
+GNUNET_CONTAINER_multihashmap_create (unsigned int len);
 
 
 /**
@@ -551,8 +553,9 @@ 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);
 
 
 /**
@@ -565,9 +568,9 @@ void GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
  *   happen to be NULL; use "contains" to test for
  *   key-value pairs with value NULL
  */
-void *GNUNET_CONTAINER_multihashmap_get (const struct
-                                         GNUNET_CONTAINER_MultiHashMap *map,
-                                         const GNUNET_HashCode * key);
+void *
+GNUNET_CONTAINER_multihashmap_get (const struct GNUNET_CONTAINER_MultiHashMap
+                                   *map, const GNUNET_HashCode * key);
 
 
 /**
@@ -581,9 +584,9 @@ void *GNUNET_CONTAINER_multihashmap_get (const struct
  * @return GNUNET_YES on success, GNUNET_NO if the key-value pair
  *  is not in the map
  */
-int GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap
-                                          *map, const GNUNET_HashCode * key,
-                                          void *value);
+int
+GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap *map,
+                                      const GNUNET_HashCode * key, void *value);
 
 /**
  * Remove all entries for the given key from the map.
@@ -593,10 +596,9 @@ int GNUNET_CONTAINER_multihashmap_remove (struct GNUNET_CONTAINER_MultiHashMap
  * @param key identifies values to be removed
  * @return number of values removed
  */
-int GNUNET_CONTAINER_multihashmap_remove_all (struct
-                                              GNUNET_CONTAINER_MultiHashMap
-                                              *map,
-                                              const GNUNET_HashCode * key);
+int
+GNUNET_CONTAINER_multihashmap_remove_all (struct GNUNET_CONTAINER_MultiHashMap
+                                          *map, const GNUNET_HashCode * key);
 
 
 /**
@@ -608,9 +610,10 @@ int GNUNET_CONTAINER_multihashmap_remove_all (struct
  * @return GNUNET_YES if such a value exists,
  *         GNUNET_NO if not
  */
-int GNUNET_CONTAINER_multihashmap_contains (const struct
-                                            GNUNET_CONTAINER_MultiHashMap *map,
-                                            const GNUNET_HashCode * key);
+int
+GNUNET_CONTAINER_multihashmap_contains (const struct
+                                        GNUNET_CONTAINER_MultiHashMap *map,
+                                        const GNUNET_HashCode * key);
 
 
 /**
@@ -623,11 +626,11 @@ int GNUNET_CONTAINER_multihashmap_contains (const struct
  * @return GNUNET_YES if such a value exists,
  *         GNUNET_NO if not
  */
-int GNUNET_CONTAINER_multihashmap_contains_value (const struct
-                                                  GNUNET_CONTAINER_MultiHashMap
-                                                  *map,
-                                                  const GNUNET_HashCode * key,
-                                                  const void *value);
+int
+GNUNET_CONTAINER_multihashmap_contains_value (const struct
+                                              GNUNET_CONTAINER_MultiHashMap
+                                              *map, const GNUNET_HashCode * key,
+                                              const void *value);
 
 
 /**
@@ -642,11 +645,11 @@ int GNUNET_CONTAINER_multihashmap_contains_value (const struct
  *         GNUNET_SYSERR if UNIQUE_ONLY was the option and the
  *                       value already exists
  */
-int GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap
-                                       *map, const GNUNET_HashCode * key,
-                                       void *value,
-                                       enum GNUNET_CONTAINER_MultiHashMapOption
-                                       opt);
+int
+GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
+                                   const GNUNET_HashCode * key, void *value,
+                                   enum GNUNET_CONTAINER_MultiHashMapOption
+                                   opt);
 
 /**
  * Get the number of key-value pairs in the map.
@@ -654,9 +657,9 @@ int GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap
  * @param map the map
  * @return the number of key value pairs
  */
-unsigned int GNUNET_CONTAINER_multihashmap_size (const struct
-                                                 GNUNET_CONTAINER_MultiHashMap
-                                                 *map);
+unsigned int
+GNUNET_CONTAINER_multihashmap_size (const struct GNUNET_CONTAINER_MultiHashMap
+                                    *map);
 
 
 /**
@@ -668,10 +671,11 @@ unsigned int GNUNET_CONTAINER_multihashmap_size (const struct
  * @return the number of key value pairs processed,
  *         GNUNET_SYSERR if it aborted iteration
  */
-int GNUNET_CONTAINER_multihashmap_iterate (const struct
-                                           GNUNET_CONTAINER_MultiHashMap *map,
-                                           GNUNET_CONTAINER_HashMapIterator it,
-                                           void *it_cls);
+int
+GNUNET_CONTAINER_multihashmap_iterate (const struct
+                                       GNUNET_CONTAINER_MultiHashMap *map,
+                                       GNUNET_CONTAINER_HashMapIterator it,
+                                       void *it_cls);
 
 
 /**
@@ -684,12 +688,12 @@ int GNUNET_CONTAINER_multihashmap_iterate (const struct
  * @return the number of key value pairs processed,
  *         GNUNET_SYSERR if it aborted iteration
  */
-int GNUNET_CONTAINER_multihashmap_get_multiple (const struct
-                                                GNUNET_CONTAINER_MultiHashMap
-                                                *map,
-                                                const GNUNET_HashCode * key,
-                                                GNUNET_CONTAINER_HashMapIterator
-                                                it, void *it_cls);
+int
+GNUNET_CONTAINER_multihashmap_get_multiple (const struct
+                                            GNUNET_CONTAINER_MultiHashMap *map,
+                                            const GNUNET_HashCode * key,
+                                            GNUNET_CONTAINER_HashMapIterator it,
+                                            void *it_cls);
 
 
 /* ******************** doubly-linked list *************** */
@@ -864,9 +868,8 @@ struct GNUNET_CONTAINER_HeapNode;
  * @param order how should the heap be sorted?
  * @return handle to the heap
  */
-struct GNUNET_CONTAINER_Heap *GNUNET_CONTAINER_heap_create (enum
-                                                            GNUNET_CONTAINER_HeapOrder
-                                                            order);
+struct GNUNET_CONTAINER_Heap *
+GNUNET_CONTAINER_heap_create (enum GNUNET_CONTAINER_HeapOrder order);
 
 
 /**
@@ -875,7 +878,8 @@ struct GNUNET_CONTAINER_Heap *GNUNET_CONTAINER_heap_create (enum
  *
  * @param heap heap to destroy
  */
-void GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap);
+void
+GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap);
 
 
 /**
@@ -884,7 +888,8 @@ void GNUNET_CONTAINER_heap_destroy (struct GNUNET_CONTAINER_Heap *heap);
  * @param heap heap to inspect
  * @return NULL if heap is empty
  */
-void *GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap);
+void *
+GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap);
 
 
 /**
@@ -893,8 +898,8 @@ 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);
 
 
 /**
@@ -903,9 +908,9 @@ unsigned int GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_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
@@ -931,9 +936,10 @@ 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);
 
 
 /**
@@ -948,8 +954,9 @@ void GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap,
  *         NULL if the heap is empty.
  *
  */
-void *GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap,
-                                        uint32_t max);
+void *
+GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap,
+                                  uint32_t max);
 
 
 /**
@@ -963,7 +970,8 @@ void *GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap,
  * @return data stored at the next random node in the walk;
  *         NULL if the tree is empty.
  */
-void *GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap);
+void *
+GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap);
 
 
 /**
@@ -974,12 +982,9 @@ void *GNUNET_CONTAINER_heap_walk_get_next (struct GNUNET_CONTAINER_Heap *heap);
  * @param cost cost for the element
  * @return node for the new element
  */
-struct GNUNET_CONTAINER_HeapNode *GNUNET_CONTAINER_heap_insert (struct
-                                                                GNUNET_CONTAINER_Heap
-                                                                *heap,
-                                                                void *element,
-                                                                GNUNET_CONTAINER_HeapCostType
-                                                                cost);
+struct GNUNET_CONTAINER_HeapNode *
+GNUNET_CONTAINER_heap_insert (struct GNUNET_CONTAINER_Heap *heap, void *element,
+                              GNUNET_CONTAINER_HeapCostType cost);
 
 
 /**
@@ -988,7 +993,8 @@ struct GNUNET_CONTAINER_HeapNode *GNUNET_CONTAINER_heap_insert (struct
  * @param heap heap to modify
  * @return element data stored at the root node
  */
-void *GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
+void *
+GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
 
 
 /**
@@ -997,8 +1003,8 @@ void *GNUNET_CONTAINER_heap_remove_root (struct GNUNET_CONTAINER_Heap *heap);
  * @param node node to remove
  * @return element data stored at the node, NULL if heap is empty
  */
-void *GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode
-                                         *node);
+void *
+GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode *node);
 
 
 /**
@@ -1008,9 +1014,10 @@ 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 *************** */
@@ -1057,9 +1064,10 @@ struct GNUNET_CONTAINER_SList_Iterator;
  * @param buf payload buffer
  * @param len length of the buffer
  */
-void GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
-                                 enum GNUNET_CONTAINER_SListDisposition disp,
-                                 const void *buf, size_t len);
+void
+GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
+                            enum GNUNET_CONTAINER_SListDisposition disp,
+                            const void *buf, size_t len);
 
 
 /**
@@ -1069,9 +1077,10 @@ void GNUNET_CONTAINER_slist_add (struct GNUNET_CONTAINER_SList *l,
  * @param buf payload buffer
  * @param len length of the buffer
  */
-void GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
-                                     enum GNUNET_CONTAINER_SListDisposition
-                                     disp, const void *buf, size_t len);
+void
+GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
+                                enum GNUNET_CONTAINER_SListDisposition disp,
+                                const void *buf, size_t len);
 
 
 /**
@@ -1079,22 +1088,25 @@ 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);
 
 
 /**
  * Create a new singly linked list
  * @return the new list
  */
-struct GNUNET_CONTAINER_SList *GNUNET_CONTAINER_slist_create (void);
+struct GNUNET_CONTAINER_SList *
+GNUNET_CONTAINER_slist_create (void);
 
 
 /**
  * Destroy a singly linked list
  * @param l the list to be destroyed
  */
-void GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
+void
+GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
 
 
 /**
@@ -1103,9 +1115,8 @@ void GNUNET_CONTAINER_slist_destroy (struct GNUNET_CONTAINER_SList *l);
  * @param l list
  * @return iterator pointing to the beginning, free using "GNUNET_free"
  */
-struct GNUNET_CONTAINER_SList_Iterator *GNUNET_CONTAINER_slist_begin (struct
-                                                                      GNUNET_CONTAINER_SList
-                                                                      *l);
+struct GNUNET_CONTAINER_SList_Iterator *
+GNUNET_CONTAINER_slist_begin (struct GNUNET_CONTAINER_SList *l);
 
 
 /**
@@ -1113,7 +1124,8 @@ struct GNUNET_CONTAINER_SList_Iterator *GNUNET_CONTAINER_slist_begin (struct
  *
  * @param l list
  */
-void GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
+void
+GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
 
 
 /**
@@ -1122,8 +1134,9 @@ void GNUNET_CONTAINER_slist_clear (struct GNUNET_CONTAINER_SList *l);
  * @param buf payload buffer to find
  * @param len length of the payload (number of bytes in buf)
  */
-int GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
-                                     const void *buf, size_t len);
+int
+GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
+                                 const void *buf, size_t len);
 
 
 /**
@@ -1131,14 +1144,16 @@ int GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l,
  * @param l list
  * @return number of elements in the list
  */
-int GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l);
+int
+GNUNET_CONTAINER_slist_count (const struct GNUNET_CONTAINER_SList *l);
 
 
 /**
  * Remove an element from the list
  * @param i iterator that points to the element to be removed
  */
-void GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
+void
+GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
 
 
 /**
@@ -1148,10 +1163,10 @@ void GNUNET_CONTAINER_slist_erase (struct GNUNET_CONTAINER_SList_Iterator *i);
  * @param buf payload buffer
  * @param len length of the payload
  */
-void GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator
-                                    *before,
-                                    enum GNUNET_CONTAINER_SListDisposition disp,
-                                    const void *buf, size_t len);
+void
+GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator *before,
+                               enum GNUNET_CONTAINER_SListDisposition disp,
+                               const void *buf, size_t len);
 
 
 /**
@@ -1159,7 +1174,8 @@ void GNUNET_CONTAINER_slist_insert (struct GNUNET_CONTAINER_SList_Iterator
  * @param i iterator
  * @return GNUNET_YES on success, GNUNET_NO if the end has been reached
  */
-int GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
+int
+GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
 
 
 /**
@@ -1168,7 +1184,8 @@ int GNUNET_CONTAINER_slist_next (struct GNUNET_CONTAINER_SList_Iterator *i);
  * @return GNUNET_YES if the end has been reached, GNUNET_NO if the iterator
  *         points to a valid element
  */
-int GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
+int
+GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
 
 
 /**
@@ -1178,16 +1195,17 @@ int GNUNET_CONTAINER_slist_end (struct GNUNET_CONTAINER_SList_Iterator *i);
  * @param len set to the payload length
  * @return payload
  */
-void *GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator
-                                  *i, size_t * len);
+void *
+GNUNET_CONTAINER_slist_get (const struct GNUNET_CONTAINER_SList_Iterator *i,
+                            size_t * len);
 
 
 /**
  * Release an iterator
  * @param i iterator
  */
-void GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator
-                                          *i);
+void
+GNUNET_CONTAINER_slist_iter_destroy (struct GNUNET_CONTAINER_SList_Iterator *i);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 94272a30a8791b900a3fc33898f1a3be9bf29678..083276804c9762f690f8c1f29da3a37ea4635e42 100644 (file)
@@ -219,27 +219,18 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls,
  * @return handle to the core service (only useful for disconnect until 'init' is called),
  *           NULL on error (in this case, init is never called)
  */
-struct GNUNET_CORE_Handle *GNUNET_CORE_connect (const struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, unsigned int queue_size,
-                                                void *cls,
-                                                GNUNET_CORE_StartupCallback
-                                                init,
-                                                GNUNET_CORE_ConnectEventHandler
-                                                connects,
-                                                GNUNET_CORE_DisconnectEventHandler
-                                                disconnects,
-                                                GNUNET_CORE_PeerStatusEventHandler
-                                                status_events,
-                                                GNUNET_CORE_MessageCallback
-                                                inbound_notify,
-                                                int inbound_hdr_only,
-                                                GNUNET_CORE_MessageCallback
-                                                outbound_notify,
-                                                int outbound_hdr_only,
-                                                const struct
-                                                GNUNET_CORE_MessageHandler
-                                                *handlers);
+struct GNUNET_CORE_Handle *
+GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                     unsigned int queue_size, void *cls,
+                     GNUNET_CORE_StartupCallback init,
+                     GNUNET_CORE_ConnectEventHandler connects,
+                     GNUNET_CORE_DisconnectEventHandler disconnects,
+                     GNUNET_CORE_PeerStatusEventHandler status_events,
+                     GNUNET_CORE_MessageCallback inbound_notify,
+                     int inbound_hdr_only,
+                     GNUNET_CORE_MessageCallback outbound_notify,
+                     int outbound_hdr_only,
+                     const struct GNUNET_CORE_MessageHandler *handlers);
 
 
 /**
@@ -249,7 +240,8 @@ struct GNUNET_CORE_Handle *GNUNET_CORE_connect (const struct
  *
  * @param handle connection to core to disconnect
  */
-void GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle);
+void
+GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle);
 
 
 /**
@@ -290,17 +282,11 @@ typedef void (*GNUNET_CORE_ControlContinuation) (void *cls, int success);
  * @param cont_cls closure for cont
  * @return NULL on error (cont will not be called), otherwise handle for cancellation
  */
-struct GNUNET_CORE_PeerRequestHandle *GNUNET_CORE_peer_request_connect (struct
-                                                                        GNUNET_CORE_Handle
-                                                                        *h,
-                                                                        const
-                                                                        struct
-                                                                        GNUNET_PeerIdentity
-                                                                        *peer,
-                                                                        GNUNET_CORE_ControlContinuation
-                                                                        cont,
-                                                                        void
-                                                                        *cont_cls);
+struct GNUNET_CORE_PeerRequestHandle *
+GNUNET_CORE_peer_request_connect (struct GNUNET_CORE_Handle *h,
+                                  const struct GNUNET_PeerIdentity *peer,
+                                  GNUNET_CORE_ControlContinuation cont,
+                                  void *cont_cls);
 
 
 /**
@@ -309,9 +295,9 @@ 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);
 
 
 /**
@@ -372,15 +358,14 @@ struct GNUNET_CORE_InformationRequestContext;
  * @param info_cls closure for info
  * @return NULL on error
  */
-struct GNUNET_CORE_InformationRequestContext
-    *GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h,
-                                         const struct GNUNET_PeerIdentity *peer,
-                                         struct GNUNET_TIME_Relative timeout,
-                                         struct GNUNET_BANDWIDTH_Value32NBO
-                                         bw_out, int32_t amount,
-                                         uint64_t preference,
-                                         GNUNET_CORE_PeerConfigurationInfoCallback
-                                         info, void *info_cls);
+struct GNUNET_CORE_InformationRequestContext *
+GNUNET_CORE_peer_change_preference (struct GNUNET_CORE_Handle *h,
+                                    const struct GNUNET_PeerIdentity *peer,
+                                    struct GNUNET_TIME_Relative timeout,
+                                    struct GNUNET_BANDWIDTH_Value32NBO bw_out,
+                                    int32_t amount, uint64_t preference,
+                                    GNUNET_CORE_PeerConfigurationInfoCallback
+                                    info, void *info_cls);
 
 
 /**
@@ -394,9 +379,10 @@ 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);
 
 
 /**
@@ -407,9 +393,10 @@ void 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.
@@ -424,10 +411,11 @@ int 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);
 
 
 /**
@@ -464,25 +452,14 @@ struct GNUNET_CORE_TransmitHandle;
  *         NULL if we can not even queue the request (insufficient
  *         memory); if NULL is returned, "notify" will NOT be called.
  */
-struct GNUNET_CORE_TransmitHandle *GNUNET_CORE_notify_transmit_ready (struct
-                                                                      GNUNET_CORE_Handle
-                                                                      *handle,
-                                                                      int cork,
-                                                                      uint32_t
-                                                                      priority,
-                                                                      struct
-                                                                      GNUNET_TIME_Relative
-                                                                      maxdelay,
-                                                                      const
-                                                                      struct
-                                                                      GNUNET_PeerIdentity
-                                                                      *target,
-                                                                      size_t
-                                                                      notify_size,
-                                                                      GNUNET_CONNECTION_TransmitReadyNotify
-                                                                      notify,
-                                                                      void
-                                                                      *notify_cls);
+struct GNUNET_CORE_TransmitHandle *
+GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle, int cork,
+                                   uint32_t priority,
+                                   struct GNUNET_TIME_Relative maxdelay,
+                                   const struct GNUNET_PeerIdentity *target,
+                                   size_t notify_size,
+                                   GNUNET_CONNECTION_TransmitReadyNotify notify,
+                                   void *notify_cls);
 
 
 /**
@@ -490,8 +467,9 @@ 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 */
index 30a7d9ee0fae63b2fbaf19970370b43836014e78..d5a1685d15abe954f4bc18fdd1ed64391038e39d 100644 (file)
@@ -231,7 +231,8 @@ struct GNUNET_CRYPTO_AuthKey
  * @param len the length of the buffer in bytes
  * @return the resulting CRC32 checksum
  */
-int32_t GNUNET_CRYPTO_crc32_n (const void *buf, size_t len);
+int32_t
+GNUNET_CRYPTO_crc32_n (const void *buf, size_t len);
 
 
 /**
@@ -241,7 +242,8 @@ int32_t GNUNET_CRYPTO_crc32_n (const void *buf, size_t len);
  * @param i the upper limit (exclusive) for the random number
  * @return a random value in the interval [0,i) (exclusive).
  */
-uint32_t GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i);
+uint32_t
+GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i);
 
 
 /**
@@ -251,8 +253,8 @@ uint32_t GNUNET_CRYPTO_random_u32 (enum GNUNET_CRYPTO_Quality mode, uint32_t i);
  * @param max value returned will be in range [0,max) (exclusive)
  * @return random 64-bit number
  */
-uint64_t GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode,
-                                   uint64_t max);
+uint64_t
+GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode, uint64_t max);
 
 
 /**
@@ -262,8 +264,8 @@ uint64_t GNUNET_CRYPTO_random_u64 (enum GNUNET_CRYPTO_Quality mode,
  * @param n the size of the array
  * @return the permutation array (allocated from heap)
  */
-unsigned int *GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode,
-                                            unsigned int n);
+unsigned int *
+GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode, unsigned int n);
 
 
 /**
@@ -271,8 +273,8 @@ unsigned int *GNUNET_CRYPTO_random_permute (enum GNUNET_CRYPTO_Quality mode,
  *
  * @param key key to initialize
  */
-void GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey
-                                           *key);
+void
+GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey *key);
 
 /**
  * Check that a new session key is well-formed.
@@ -280,8 +282,9 @@ void GNUNET_CRYPTO_aes_create_session_key (struct GNUNET_CRYPTO_AesSessionKey
  * @param key key to check
  * @return GNUNET_OK if the key is valid
  */
-int GNUNET_CRYPTO_aes_check_session_key (const struct
-                                         GNUNET_CRYPTO_AesSessionKey *key);
+int
+GNUNET_CRYPTO_aes_check_session_key (const struct GNUNET_CRYPTO_AesSessionKey
+                                     *key);
 
 
 /**
@@ -295,12 +298,11 @@ 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,
-                                   const struct GNUNET_CRYPTO_AesSessionKey
-                                   *sessionkey,
-                                   const struct
-                                   GNUNET_CRYPTO_AesInitializationVector *iv,
-                                   void *result);
+ssize_t
+GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len,
+                           const struct GNUNET_CRYPTO_AesSessionKey *sessionkey,
+                           const struct GNUNET_CRYPTO_AesInitializationVector
+                           *iv, void *result);
 
 
 /**
@@ -313,12 +315,11 @@ ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len,
  * @param result address to store the result at
  * @return -1 on failure, size of decrypted block on success
  */
-ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size,
-                                   const struct GNUNET_CRYPTO_AesSessionKey
-                                   *sessionkey,
-                                   const struct
-                                   GNUNET_CRYPTO_AesInitializationVector *iv,
-                                   void *result);
+ssize_t
+GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size,
+                           const struct GNUNET_CRYPTO_AesSessionKey *sessionkey,
+                           const struct GNUNET_CRYPTO_AesInitializationVector
+                           *iv, void *result);
 
 
 /**
@@ -329,11 +330,10 @@ ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size,
  * @param salt_len size of the salt
  * @param ... pairs of void * & size_t for context chunks, terminated by NULL
  */
-void GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector
-                                  *iv,
-                                  const struct GNUNET_CRYPTO_AesSessionKey
-                                  *skey, const void *salt, size_t salt_len,
-                                  ...);
+void
+GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector *iv,
+                             const struct GNUNET_CRYPTO_AesSessionKey *skey,
+                             const void *salt, size_t salt_len, ...);
 
 
 /**
@@ -344,11 +344,10 @@ void GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector
  * @param salt_len size of the salt
  * @param argp pairs of void * & size_t for context chunks, terminated by NULL
  */
-void GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector
-                                    *iv,
-                                    const struct GNUNET_CRYPTO_AesSessionKey
-                                    *skey, const void *salt, size_t salt_len,
-                                    va_list argp);
+void
+GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector *iv,
+                               const struct GNUNET_CRYPTO_AesSessionKey *skey,
+                               const void *salt, size_t salt_len, va_list argp);
 
 
 /**
@@ -357,8 +356,9 @@ void GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector
  * @param result where to store the encoding (struct GNUNET_CRYPTO_HashAsciiEncoded can be
  *  safely cast to char*, a '\\0' termination is set).
  */
-void GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
-                                struct GNUNET_CRYPTO_HashAsciiEncoded *result);
+void
+GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
+                           struct GNUNET_CRYPTO_HashAsciiEncoded *result);
 
 
 /**
@@ -367,7 +367,8 @@ void GNUNET_CRYPTO_hash_to_enc (const GNUNET_HashCode * block,
  * @param result where to store the GNUNET_CRYPTO_hash code
  * @return GNUNET_OK on success, GNUNET_SYSERR if result has the wrong encoding
  */
-int GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result);
+int
+GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result);
 
 
 /**
@@ -381,8 +382,9 @@ int GNUNET_CRYPTO_hash_from_string (const char *enc, GNUNET_HashCode * result);
  * @param b some hash code
  * @return number between 0 and UINT32_MAX
  */
-uint32_t GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
-                                          const GNUNET_HashCode * b);
+uint32_t
+GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
+                                 const GNUNET_HashCode * b);
 
 
 /**
@@ -392,7 +394,8 @@ uint32_t GNUNET_CRYPTO_hash_distance_u32 (const GNUNET_HashCode * a,
  * @param size size of the block
  * @param ret pointer to where to write the hashcode
  */
-void GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret);
+void
+GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret);
 
 
 /**
@@ -403,9 +406,10 @@ 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);
 
 
 /**
@@ -435,16 +439,11 @@ struct GNUNET_CRYPTO_FileHashContext;
  * @param callback_cls closure for callback
  * @return NULL on (immediate) errror
  */
-struct GNUNET_CRYPTO_FileHashContext *GNUNET_CRYPTO_hash_file (enum
-                                                               GNUNET_SCHEDULER_Priority
-                                                               priority,
-                                                               const char
-                                                               *filename,
-                                                               size_t blocksize,
-                                                               GNUNET_CRYPTO_HashCompletedCallback
-                                                               callback,
-                                                               void
-                                                               *callback_cls);
+struct GNUNET_CRYPTO_FileHashContext *
+GNUNET_CRYPTO_hash_file (enum GNUNET_SCHEDULER_Priority priority,
+                         const char *filename, size_t blocksize,
+                         GNUNET_CRYPTO_HashCompletedCallback callback,
+                         void *callback_cls);
 
 
 /**
@@ -452,7 +451,8 @@ struct GNUNET_CRYPTO_FileHashContext *GNUNET_CRYPTO_hash_file (enum
  *
  * @param fhc operation to cancel (callback must not yet have been invoked)
  */
-void GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc);
+void
+GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc);
 
 
 /**
@@ -461,8 +461,9 @@ void GNUNET_CRYPTO_hash_file_cancel (struct GNUNET_CRYPTO_FileHashContext *fhc);
  * @param mode desired quality level
  * @param result hash code that is randomized
  */
-void GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
-                                       GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
+                                  GNUNET_HashCode * result);
 
 
 /**
@@ -472,9 +473,10 @@ void GNUNET_CRYPTO_hash_create_random (enum GNUNET_CRYPTO_Quality mode,
  * @param b some hash code
  * @param result set to b - a 
  */
-void GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
-                                    const GNUNET_HashCode * b,
-                                    GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
+                               const GNUNET_HashCode * b,
+                               GNUNET_HashCode * result);
 
 
 /**
@@ -484,9 +486,10 @@ void GNUNET_CRYPTO_hash_difference (const GNUNET_HashCode * a,
  * @param delta some hash code
  * @param result set to a + delta
  */
-void GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
-                             const GNUNET_HashCode * delta,
-                             GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
+                        const GNUNET_HashCode * delta,
+                        GNUNET_HashCode * result);
 
 
 /**
@@ -496,9 +499,9 @@ void GNUNET_CRYPTO_hash_sum (const GNUNET_HashCode * a,
  * @param b some hash code
  * @param result set to a ^ b 
  */
-void GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a,
-                             const GNUNET_HashCode * b,
-                             GNUNET_HashCode * result);
+void
+GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a, const GNUNET_HashCode * b,
+                        GNUNET_HashCode * result);
 
 
 /**
@@ -508,10 +511,11 @@ void GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a,
  * @param skey set to a valid session key
  * @param iv set to a valid initialization vector
  */
-void GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
-                                    struct GNUNET_CRYPTO_AesSessionKey *skey,
-                                    struct GNUNET_CRYPTO_AesInitializationVector
-                                    *iv);
+void
+GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
+                               struct GNUNET_CRYPTO_AesSessionKey *skey,
+                               struct GNUNET_CRYPTO_AesInitializationVector
+                               *iv);
 
 
 /**
@@ -521,7 +525,8 @@ void GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
  * @param bit index into the hashcode, [0...159]
  * @return Bit \a bit from hashcode \a code, -1 for invalid index
  */
-int GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
+int
+GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
 
 /**
  * Determine how many low order bits match in two
@@ -535,8 +540,9 @@ int GNUNET_CRYPTO_hash_get_bit (const GNUNET_HashCode * code, unsigned int bit);
  *
  * @return the number of bits that match
  */
-unsigned int GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
-                                               const GNUNET_HashCode * second);
+unsigned int
+GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
+                                  const GNUNET_HashCode * second);
 
 
 /**
@@ -547,8 +553,8 @@ unsigned int GNUNET_CRYPTO_hash_matching_bits (const GNUNET_HashCode * first,
  * @param h2 some hash code
  * @return 1 if h1 > h2, -1 if h1 < h2 and 0 if h1 == h2.
  */
-int GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1,
-                            const GNUNET_HashCode * h2);
+int
+GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1, const GNUNET_HashCode * h2);
 
 
 /**
@@ -560,9 +566,10 @@ int GNUNET_CRYPTO_hash_cmp (const GNUNET_HashCode * h1,
  * @param target some hash code
  * @return -1 if h1 is closer, 1 if h2 is closer and 0 if h1==h2.
  */
-int GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
-                               const GNUNET_HashCode * h2,
-                               const GNUNET_HashCode * target);
+int
+GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
+                           const GNUNET_HashCode * h2,
+                           const GNUNET_HashCode * target);
 
 
 /**
@@ -573,10 +580,11 @@ 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);
 
 
 /**
@@ -587,10 +595,10 @@ void 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
@@ -604,9 +612,10 @@ void 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, ...);
 
 
 /**
@@ -622,9 +631,10 @@ int GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo,
  * @param argp va_list of void * & size_t pairs for context chunks
  * @return GNUNET_YES on success
  */
-int GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo,
-                          int prf_algo, const void *xts, size_t xts_len,
-                          const void *skm, size_t skm_len, va_list argp);
+int
+GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo, int prf_algo,
+                      const void *xts, size_t xts_len, const void *skm,
+                      size_t skm_len, va_list argp);
 
 
 /**
@@ -638,9 +648,10 @@ int GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo,
  * @param argp va_list of void * & size_t pairs for context chunks
  * @return GNUNET_YES on success
  */
-int GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
-                         size_t xts_len, const void *skm, size_t skm_len,
-                         va_list argp);
+int
+GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
+                     size_t xts_len, const void *skm, size_t skm_len,
+                     va_list argp);
 
 
 /**
@@ -654,8 +665,9 @@ int GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
  * @param ... void * & size_t pairs for context chunks
  * @return GNUNET_YES on success
  */
-int GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
-                       size_t xts_len, const void *skm, size_t skm_len, ...);
+int
+GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
+                   size_t xts_len, const void *skm, size_t skm_len, ...);
 
 
 /**
@@ -663,7 +675,8 @@ int GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
  *
  * @return fresh private key
  */
-struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_key_create (void);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_key_create (void);
 
 /**
  * Decode the private key from the data-format back
@@ -672,9 +685,8 @@ struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_key_create (void);
  * @param buf the buffer where the private key data is stored
  * @param len the length of the data in 'buffer'
  */
-struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_decode_key (const char
-                                                                  *buf,
-                                                                  uint16_t len);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_decode_key (const char *buf, uint16_t len);
 
 /**
  * Create a new private key by reading it from a file.  If the
@@ -690,8 +702,8 @@ struct GNUNET_CRYPTO_RsaPrivateKey *GNUNET_CRYPTO_rsa_decode_key (const char
  * @return new private key, NULL on error (for example,
  *   permission denied)
  */
-struct GNUNET_CRYPTO_RsaPrivateKey
-    *GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_key_create_from_file (const char *filename);
 
 
 /**
@@ -701,15 +713,16 @@ struct GNUNET_CRYPTO_RsaPrivateKey
  * @param hc "random" input to PRNG
  * @return some private key purely dependent on input
  */
-struct GNUNET_CRYPTO_RsaPrivateKey
-    *GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc);
+struct GNUNET_CRYPTO_RsaPrivateKey *
+GNUNET_CRYPTO_rsa_key_create_from_hash (const GNUNET_HashCode * hc);
 
 
 /**
  * Free memory occupied by the private key.
  * @param hostkey pointer to the memory to free
  */
-void GNUNET_CRYPTO_rsa_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey);
+void
+GNUNET_CRYPTO_rsa_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey);
 
 
 /**
@@ -718,11 +731,11 @@ 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,
-                                       struct
-                                       GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                                       *pub);
+void
+GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey
+                                  *priv,
+                                  struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                                  *pub);
 
 
 /**
@@ -735,11 +748,11 @@ void GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey
  * @param target where to store the encrypted block
  * @return GNUNET_SYSERR on error, GNUNET_OK if ok
  */
-int GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
-                               const struct
-                               GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                               *publicKey,
-                               struct GNUNET_CRYPTO_RsaEncryptedData *target);
+int
+GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
+                           const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                           *publicKey,
+                           struct GNUNET_CRYPTO_RsaEncryptedData *target);
 
 
 /**
@@ -751,10 +764,10 @@ int GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
  * @param max how many bytes of a result are expected? Must be exact.
  * @return the size of the decrypted block (that is, size) or -1 on error
  */
-ssize_t GNUNET_CRYPTO_rsa_decrypt (const struct GNUNET_CRYPTO_RsaPrivateKey
-                                   *key,
-                                   const struct GNUNET_CRYPTO_RsaEncryptedData
-                                   *block, void *result, size_t max);
+ssize_t
+GNUNET_CRYPTO_rsa_decrypt (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
+                           const struct GNUNET_CRYPTO_RsaEncryptedData *block,
+                           void *result, size_t max);
 
 
 /**
@@ -765,9 +778,10 @@ ssize_t GNUNET_CRYPTO_rsa_decrypt (const struct GNUNET_CRYPTO_RsaPrivateKey
  * @param sig where to write the signature
  * @return GNUNET_SYSERR on error, GNUNET_OK on success
  */
-int GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
-                            const struct GNUNET_CRYPTO_RsaSignaturePurpose
-                            *purpose, struct GNUNET_CRYPTO_RsaSignature *sig);
+int
+GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
+                        const struct GNUNET_CRYPTO_RsaSignaturePurpose *purpose,
+                        struct GNUNET_CRYPTO_RsaSignature *sig);
 
 
 /**
@@ -780,13 +794,13 @@ int GNUNET_CRYPTO_rsa_sign (const struct GNUNET_CRYPTO_RsaPrivateKey *key,
  * @param publicKey public key of the signer
  * @return GNUNET_OK if ok, GNUNET_SYSERR if invalid
  */
-int GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
-                              const struct GNUNET_CRYPTO_RsaSignaturePurpose
-                              *validate,
-                              const struct GNUNET_CRYPTO_RsaSignature *sig,
-                              const struct
-                              GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                              *publicKey);
+int
+GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
+                          const struct GNUNET_CRYPTO_RsaSignaturePurpose
+                          *validate,
+                          const struct GNUNET_CRYPTO_RsaSignature *sig,
+                          const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                          *publicKey);
 
 
 
@@ -795,7 +809,8 @@ int GNUNET_CRYPTO_rsa_verify (uint32_t purpose,
  * where strong entropy gathering is not desired
  * (for example, for hostkey generation). 
  */
-void GNUNET_CRYPTO_random_disable_entropy_gathering (void);
+void
+GNUNET_CRYPTO_random_disable_entropy_gathering (void);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
index 46d22d5eca8dd220adaaf5bfbaaf7a3b6d2d403f..84cb4d600ac95f524286581fe0737eb56df033bd 100644 (file)
@@ -56,10 +56,9 @@ struct GNUNET_DATACACHE_Handle;
  * @param section section in the configuration that contains our options
  * @return handle to use to access the service
  */
-struct GNUNET_DATACACHE_Handle *GNUNET_DATACACHE_create (const struct
-                                                         GNUNET_CONFIGURATION_Handle
-                                                         *cfg,
-                                                         const char *section);
+struct GNUNET_DATACACHE_Handle *
+GNUNET_DATACACHE_create (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                         const char *section);
 
 
 /**
@@ -67,7 +66,8 @@ struct GNUNET_DATACACHE_Handle *GNUNET_DATACACHE_create (const struct
  *
  * @param h handle to the datastore
  */
-void GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h);
+void
+GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h);
 
 
 /**
@@ -99,10 +99,11 @@ 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);
 
 
 /**
@@ -116,11 +117,10 @@ int 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 */
index 584537f39cc9ffadea4ca5f10568eae741aab156..3d2cc35c981bda8c819a182787b4e20ccfb89c00 100644 (file)
@@ -63,9 +63,8 @@ struct GNUNET_DATASTORE_Handle;
  * @param cfg configuration to use
  * @return handle to use to access the service
  */
-struct GNUNET_DATASTORE_Handle *GNUNET_DATASTORE_connect (const struct
-                                                          GNUNET_CONFIGURATION_Handle
-                                                          *cfg);
+struct GNUNET_DATASTORE_Handle *
+GNUNET_DATASTORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -75,7 +74,8 @@ struct GNUNET_DATASTORE_Handle *GNUNET_DATASTORE_connect (const struct
  * @param h handle to the datastore
  * @param drop set to GNUNET_YES to delete all data in datastore (!)
  */
-void GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop);
+void
+GNUNET_DATASTORE_disconnect (struct GNUNET_DATASTORE_Handle *h, int drop);
 
 
 /**
@@ -112,21 +112,13 @@ typedef void (*GNUNET_DATASTORE_ContinuationWithStatus) (void *cls,
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_reserve (struct
-                                                              GNUNET_DATASTORE_Handle
-                                                              *h,
-                                                              uint64_t amount,
-                                                              uint32_t entries,
-                                                              unsigned int
-                                                              queue_priority,
-                                                              unsigned int
-                                                              max_queue_size,
-                                                              struct
-                                                              GNUNET_TIME_Relative
-                                                              timeout,
-                                                              GNUNET_DATASTORE_ContinuationWithStatus
-                                                              cont,
-                                                              void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_reserve (struct GNUNET_DATASTORE_Handle *h, uint64_t amount,
+                          uint32_t entries, unsigned int queue_priority,
+                          unsigned int max_queue_size,
+                          struct GNUNET_TIME_Relative timeout,
+                          GNUNET_DATASTORE_ContinuationWithStatus cont,
+                          void *cont_cls);
 
 
 /**
@@ -155,29 +147,17 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_reserve (struct
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_put (struct
-                                                          GNUNET_DATASTORE_Handle
-                                                          *h, uint32_t rid,
-                                                          const GNUNET_HashCode
-                                                          * key, size_t size,
-                                                          const void *data,
-                                                          enum GNUNET_BLOCK_Type
-                                                          type,
-                                                          uint32_t priority,
-                                                          uint32_t anonymity,
-                                                          uint32_t replication,
-                                                          struct
-                                                          GNUNET_TIME_Absolute
-                                                          expiration,
-                                                          unsigned int
-                                                          queue_priority,
-                                                          unsigned int
-                                                          max_queue_size,
-                                                          struct
-                                                          GNUNET_TIME_Relative
-                                                          timeout,
-                                                          GNUNET_DATASTORE_ContinuationWithStatus
-                                                          cont, void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_put (struct GNUNET_DATASTORE_Handle *h, uint32_t rid,
+                      const GNUNET_HashCode * key, size_t size,
+                      const void *data, enum GNUNET_BLOCK_Type type,
+                      uint32_t priority, uint32_t anonymity,
+                      uint32_t replication,
+                      struct GNUNET_TIME_Absolute expiration,
+                      unsigned int queue_priority, unsigned int max_queue_size,
+                      struct GNUNET_TIME_Relative timeout,
+                      GNUNET_DATASTORE_ContinuationWithStatus cont,
+                      void *cont_cls);
 
 
 /**
@@ -201,24 +181,13 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_put (struct
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_release_reserve (struct
-                                                                      GNUNET_DATASTORE_Handle
-                                                                      *h,
-                                                                      uint32_t
-                                                                      rid,
-                                                                      unsigned
-                                                                      int
-                                                                      queue_priority,
-                                                                      unsigned
-                                                                      int
-                                                                      max_queue_size,
-                                                                      struct
-                                                                      GNUNET_TIME_Relative
-                                                                      timeout,
-                                                                      GNUNET_DATASTORE_ContinuationWithStatus
-                                                                      cont,
-                                                                      void
-                                                                      *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_release_reserve (struct GNUNET_DATASTORE_Handle *h,
+                                  uint32_t rid, unsigned int queue_priority,
+                                  unsigned int max_queue_size,
+                                  struct GNUNET_TIME_Relative timeout,
+                                  GNUNET_DATASTORE_ContinuationWithStatus cont,
+                                  void *cont_cls);
 
 
 /**
@@ -238,23 +207,15 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_release_reserve (struct
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_update (struct
-                                                             GNUNET_DATASTORE_Handle
-                                                             *h, uint64_t uid,
-                                                             uint32_t priority,
-                                                             struct
-                                                             GNUNET_TIME_Absolute
-                                                             expiration,
-                                                             unsigned int
-                                                             queue_priority,
-                                                             unsigned int
-                                                             max_queue_size,
-                                                             struct
-                                                             GNUNET_TIME_Relative
-                                                             timeout,
-                                                             GNUNET_DATASTORE_ContinuationWithStatus
-                                                             cont,
-                                                             void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_update (struct GNUNET_DATASTORE_Handle *h, uint64_t uid,
+                         uint32_t priority,
+                         struct GNUNET_TIME_Absolute expiration,
+                         unsigned int queue_priority,
+                         unsigned int max_queue_size,
+                         struct GNUNET_TIME_Relative timeout,
+                         GNUNET_DATASTORE_ContinuationWithStatus cont,
+                         void *cont_cls);
 
 
 /**
@@ -278,23 +239,14 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_update (struct
  *         cancel; note that even if NULL is returned, the callback will be invoked
  *         (or rather, will already have been invoked)
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_remove (struct
-                                                             GNUNET_DATASTORE_Handle
-                                                             *h,
-                                                             const
-                                                             GNUNET_HashCode *
-                                                             key, size_t size,
-                                                             const void *data,
-                                                             unsigned int
-                                                             queue_priority,
-                                                             unsigned int
-                                                             max_queue_size,
-                                                             struct
-                                                             GNUNET_TIME_Relative
-                                                             timeout,
-                                                             GNUNET_DATASTORE_ContinuationWithStatus
-                                                             cont,
-                                                             void *cont_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_remove (struct GNUNET_DATASTORE_Handle *h,
+                         const GNUNET_HashCode * key, size_t size,
+                         const void *data, unsigned int queue_priority,
+                         unsigned int max_queue_size,
+                         struct GNUNET_TIME_Relative timeout,
+                         GNUNET_DATASTORE_ContinuationWithStatus cont,
+                         void *cont_cls);
 
 
 /**
@@ -342,26 +294,14 @@ typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls,
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_key (struct
-                                                              GNUNET_DATASTORE_Handle
-                                                              *h,
-                                                              uint64_t offset,
-                                                              const
-                                                              GNUNET_HashCode *
-                                                              key,
-                                                              enum
-                                                              GNUNET_BLOCK_Type
-                                                              type,
-                                                              unsigned int
-                                                              queue_priority,
-                                                              unsigned int
-                                                              max_queue_size,
-                                                              struct
-                                                              GNUNET_TIME_Relative
-                                                              timeout,
-                                                              GNUNET_DATASTORE_DatumProcessor
-                                                              proc,
-                                                              void *proc_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h, uint64_t offset,
+                          const GNUNET_HashCode * key,
+                          enum GNUNET_BLOCK_Type type,
+                          unsigned int queue_priority,
+                          unsigned int max_queue_size,
+                          struct GNUNET_TIME_Relative timeout,
+                          GNUNET_DATASTORE_DatumProcessor proc, void *proc_cls);
 
 
 /**
@@ -388,27 +328,15 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_key (struct
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_zero_anonymity (struct
-                                                                         GNUNET_DATASTORE_Handle
-                                                                         *h,
-                                                                         uint64_t
-                                                                         offset,
-                                                                         unsigned
-                                                                         int
-                                                                         queue_priority,
-                                                                         unsigned
-                                                                         int
-                                                                         max_queue_size,
-                                                                         struct
-                                                                         GNUNET_TIME_Relative
-                                                                         timeout,
-                                                                         enum
-                                                                         GNUNET_BLOCK_Type
-                                                                         type,
-                                                                         GNUNET_DATASTORE_DatumProcessor
-                                                                         proc,
-                                                                         void
-                                                                         *proc_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_get_zero_anonymity (struct GNUNET_DATASTORE_Handle *h,
+                                     uint64_t offset,
+                                     unsigned int queue_priority,
+                                     unsigned int max_queue_size,
+                                     struct GNUNET_TIME_Relative timeout,
+                                     enum GNUNET_BLOCK_Type type,
+                                     GNUNET_DATASTORE_DatumProcessor proc,
+                                     void *proc_cls);
 
 
 /**
@@ -430,22 +358,13 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_zero_anonymity (struct
  * @return NULL if the entry was not queued, otherwise a handle that can be used to
  *         cancel
  */
-struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_for_replication (struct
-                                                                          GNUNET_DATASTORE_Handle
-                                                                          *h,
-                                                                          unsigned
-                                                                          int
-                                                                          queue_priority,
-                                                                          unsigned
-                                                                          int
-                                                                          max_queue_size,
-                                                                          struct
-                                                                          GNUNET_TIME_Relative
-                                                                          timeout,
-                                                                          GNUNET_DATASTORE_DatumProcessor
-                                                                          proc,
-                                                                          void
-                                                                          *proc_cls);
+struct GNUNET_DATASTORE_QueueEntry *
+GNUNET_DATASTORE_get_for_replication (struct GNUNET_DATASTORE_Handle *h,
+                                      unsigned int queue_priority,
+                                      unsigned int max_queue_size,
+                                      struct GNUNET_TIME_Relative timeout,
+                                      GNUNET_DATASTORE_DatumProcessor proc,
+                                      void *proc_cls);
 
 
 
@@ -455,7 +374,8 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_get_for_replication (struct
  * 
  * @param qe operation to cancel
  */
-void GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe);
+void
+GNUNET_DATASTORE_cancel (struct GNUNET_DATASTORE_QueueEntry *qe);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 46929c36636d84dcfcdabcfbe298087e57e1cf7a..55038d99ae2dff25127357ae001e1a5f6e4e4bf1 100644 (file)
@@ -123,9 +123,9 @@ enum GNUNET_DHT_RouteOption
  *               processing multiple GET/FIND requests in parallel
  * @return NULL on error
  */
-struct GNUNET_DHT_Handle *GNUNET_DHT_connect (const struct
-                                              GNUNET_CONFIGURATION_Handle *cfg,
-                                              unsigned int ht_len);
+struct GNUNET_DHT_Handle *
+GNUNET_DHT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                    unsigned int ht_len);
 
 
 /**
@@ -133,7 +133,8 @@ struct GNUNET_DHT_Handle *GNUNET_DHT_connect (const struct
  *
  * @param handle connection to shut down
  */
-void GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle);
+void
+GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle);
 
 
 /* *************** Standard API: get and put ******************* */
@@ -154,14 +155,14 @@ 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);
 
 
 /**
@@ -211,23 +212,16 @@ typedef void (*GNUNET_DHT_GetIterator) (void *cls,
  *
  * @return handle to stop the async get
  */
-struct GNUNET_DHT_GetHandle *GNUNET_DHT_get_start (struct GNUNET_DHT_Handle
-                                                   *handle,
-                                                   struct GNUNET_TIME_Relative
-                                                   timeout,
-                                                   enum GNUNET_BLOCK_Type type,
-                                                   const GNUNET_HashCode * key,
-                                                   uint32_t
-                                                   desired_replication_level,
-                                                   enum GNUNET_DHT_RouteOption
-                                                   options,
-                                                   const struct
-                                                   GNUNET_CONTAINER_BloomFilter
-                                                   *bf, int32_t bf_mutator,
-                                                   const void *xquery,
-                                                   size_t xquery_size,
-                                                   GNUNET_DHT_GetIterator iter,
-                                                   void *iter_cls);
+struct GNUNET_DHT_GetHandle *
+GNUNET_DHT_get_start (struct GNUNET_DHT_Handle *handle,
+                      struct GNUNET_TIME_Relative timeout,
+                      enum GNUNET_BLOCK_Type type, const GNUNET_HashCode * key,
+                      uint32_t desired_replication_level,
+                      enum GNUNET_DHT_RouteOption options,
+                      const struct GNUNET_CONTAINER_BloomFilter *bf,
+                      int32_t bf_mutator, const void *xquery,
+                      size_t xquery_size, GNUNET_DHT_GetIterator iter,
+                      void *iter_cls);
 
 
 /**
@@ -238,7 +232,8 @@ struct GNUNET_DHT_GetHandle *GNUNET_DHT_get_start (struct GNUNET_DHT_Handle
  * On return get_handle will no longer be valid, caller
  * must not use again!!!
  */
-void GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle);
+void
+GNUNET_DHT_get_stop (struct GNUNET_DHT_GetHandle *get_handle);
 
 
 /* ******** Special high-level API for finding peers *********** */
@@ -267,21 +262,12 @@ typedef void (*GNUNET_DHT_FindPeerProcessor) (void *cls,
  * @param proc_cls closure for proc
  * @return handle to stop the async get, NULL on error
  */
-struct GNUNET_DHT_FindPeerHandle *GNUNET_DHT_find_peer_start (struct
-                                                              GNUNET_DHT_Handle
-                                                              *handle,
-                                                              struct
-                                                              GNUNET_TIME_Relative
-                                                              timeout,
-                                                              const
-                                                              GNUNET_HashCode *
-                                                              key,
-                                                              enum
-                                                              GNUNET_DHT_RouteOption
-                                                              options,
-                                                              GNUNET_DHT_FindPeerProcessor
-                                                              proc,
-                                                              void *proc_cls);
+struct GNUNET_DHT_FindPeerHandle *
+GNUNET_DHT_find_peer_start (struct GNUNET_DHT_Handle *handle,
+                            struct GNUNET_TIME_Relative timeout,
+                            const GNUNET_HashCode * key,
+                            enum GNUNET_DHT_RouteOption options,
+                            GNUNET_DHT_FindPeerProcessor proc, void *proc_cls);
 
 
 /**
@@ -289,8 +275,8 @@ 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);
 
 
 
@@ -337,25 +323,15 @@ typedef void (*GNUNET_DHT_ReplyProcessor) (void *cls,
  * @param cont_cls closure for cont
  * @return handle to stop the request, NULL if the request is "fire and forget"
  */
-struct GNUNET_DHT_RouteHandle *GNUNET_DHT_route_start (struct GNUNET_DHT_Handle
-                                                       *handle,
-                                                       const GNUNET_HashCode *
-                                                       key,
-                                                       uint32_t
-                                                       desired_replication_level,
-                                                       enum
-                                                       GNUNET_DHT_RouteOption
-                                                       options,
-                                                       const struct
-                                                       GNUNET_MessageHeader
-                                                       *enc,
-                                                       struct
-                                                       GNUNET_TIME_Relative
-                                                       timeout,
-                                                       GNUNET_DHT_ReplyProcessor
-                                                       iter, void *iter_cls,
-                                                       GNUNET_SCHEDULER_Task
-                                                       cont, void *cont_cls);
+struct GNUNET_DHT_RouteHandle *
+GNUNET_DHT_route_start (struct GNUNET_DHT_Handle *handle,
+                        const GNUNET_HashCode * key,
+                        uint32_t desired_replication_level,
+                        enum GNUNET_DHT_RouteOption options,
+                        const struct GNUNET_MessageHeader *enc,
+                        struct GNUNET_TIME_Relative timeout,
+                        GNUNET_DHT_ReplyProcessor iter, void *iter_cls,
+                        GNUNET_SCHEDULER_Task cont, void *cont_cls);
 
 
 
@@ -364,7 +340,8 @@ struct GNUNET_DHT_RouteHandle *GNUNET_DHT_route_start (struct GNUNET_DHT_Handle
  *
  * @param route_handle  operation to stop.
  */
-void GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle);
+void
+GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle);
 
 
 /* ***** Special API for controlling DHT routing maintenance ******* */
@@ -381,8 +358,9 @@ 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 ******* */
 
@@ -402,9 +380,9 @@ void 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);
 
 
 /**
@@ -416,10 +394,10 @@ void 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);
 
 
 /**
@@ -431,10 +409,10 @@ void 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
index f5fae80c95773ded35e7d1afc557b830c9ab6b6a..abca17370ba9c6ecdedb4a747bec236363ab03d8 100644 (file)
@@ -262,7 +262,8 @@ enum GNUNET_DISK_PipeEnd
  * @param part a file on the partition to check
  * @return -1 on errors, otherwise the number of free blocks
  */
-long GNUNET_DISK_get_blocks_available (const char *part);
+long
+GNUNET_DISK_get_blocks_available (const char *part);
 
 
 /**
@@ -271,7 +272,8 @@ long GNUNET_DISK_get_blocks_available (const char *part);
  * @param h handle to check
  * @return GNUNET_YES if invalid, GNUNET_NO if valid
  */
-int GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
 
 
 /**
@@ -282,7 +284,8 @@ int GNUNET_DISK_handle_invalid (const struct GNUNET_DISK_FileHandle *h);
  * @return GNUNET_YES if yes, GNUNET_NO if not a file, GNUNET_SYSERR if something
  * else (will print an error message in that case, too).
  */
-int GNUNET_DISK_file_test (const char *fil);
+int
+GNUNET_DISK_file_test (const char *fil);
 
 
 /**
@@ -292,8 +295,9 @@ 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);
 
 
 /**
@@ -308,8 +312,9 @@ off_t 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);
 
 
 /**
@@ -327,8 +332,9 @@ int GNUNET_DISK_file_size (const char *filename, uint64_t * size,
  * @param ino set to the inode ID
  * @return GNUNET_OK on success
  */
-int GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
-                                      uint64_t * ino);
+int
+GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
+                                  uint64_t * ino);
 
 
 /**
@@ -342,7 +348,8 @@ int GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
  * @return NULL on error, otherwise name of fresh
  *         file on disk in directory for temporary files
  */
-char *GNUNET_DISK_mktemp (const char *t);
+char *
+GNUNET_DISK_mktemp (const char *t);
 
 
 /**
@@ -357,12 +364,9 @@ char *GNUNET_DISK_mktemp (const char *t);
  *             call (because of flags)
  * @return IO handle on success, NULL on error
  */
-struct GNUNET_DISK_FileHandle *GNUNET_DISK_file_open (const char *fn,
-                                                      enum GNUNET_DISK_OpenFlags
-                                                      flags,
-                                                      enum
-                                                      GNUNET_DISK_AccessPermissions
-                                                      perm);
+struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_file_open (const char *fn, enum GNUNET_DISK_OpenFlags flags,
+                       enum GNUNET_DISK_AccessPermissions perm);
 
 /**
  * Creates an interprocess channel
@@ -371,8 +375,8 @@ 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,
-                                                 int inherit_write);
+struct GNUNET_DISK_PipeHandle *
+GNUNET_DISK_pipe (int blocking, int inherit_read, int inherit_write);
 
 
 /**
@@ -380,7 +384,8 @@ struct GNUNET_DISK_PipeHandle *GNUNET_DISK_pipe (int blocking, int inherit_read,
  * @param p pipe
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
+int
+GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
 
 /**
  * Closes one half of an interprocess channel
@@ -389,8 +394,9 @@ 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.
@@ -398,7 +404,8 @@ int GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p,
  * @param h file handle
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
 
 
 /**
@@ -408,12 +415,9 @@ int GNUNET_DISK_file_close (struct GNUNET_DISK_FileHandle *h);
  * @param n end to access
  * @return handle for the respective end
  */
-const struct GNUNET_DISK_FileHandle *GNUNET_DISK_pipe_handle (const struct
-                                                              GNUNET_DISK_PipeHandle
-                                                              *p,
-                                                              enum
-                                                              GNUNET_DISK_PipeEnd
-                                                              n);
+const struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_pipe_handle (const struct GNUNET_DISK_PipeHandle *p,
+                         enum GNUNET_DISK_PipeEnd n);
 
 /**
  * Read the contents of a binary file into a buffer.
@@ -422,8 +426,9 @@ const struct GNUNET_DISK_FileHandle *GNUNET_DISK_pipe_handle (const struct
  * @param len the maximum number of bytes to read
  * @return the number of bytes read on success, GNUNET_SYSERR on failure
  */
-ssize_t GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
-                               void *result, size_t len);
+ssize_t
+GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h, void *result,
+                       size_t len);
 
 
 /**
@@ -434,7 +439,8 @@ ssize_t GNUNET_DISK_file_read (const struct GNUNET_DISK_FileHandle *h,
  * @param len the maximum number of bytes to read
  * @return number of bytes read, GNUNET_SYSERR on failure
  */
-ssize_t GNUNET_DISK_fn_read (const char *fn, void *result, size_t len);
+ssize_t
+GNUNET_DISK_fn_read (const char *fn, void *result, size_t len);
 
 
 /**
@@ -445,8 +451,9 @@ ssize_t GNUNET_DISK_fn_read (const char *fn, void *result, size_t len);
  * @param n number of bytes to write
  * @return number of bytes written on success, GNUNET_SYSERR on error
  */
-ssize_t GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
-                                const void *buffer, size_t n);
+ssize_t
+GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
+                        const void *buffer, size_t n);
 
 
 /**
@@ -459,8 +466,9 @@ 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,
-                              enum GNUNET_DISK_AccessPermissions mode);
+ssize_t
+GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n,
+                      enum GNUNET_DISK_AccessPermissions mode);
 
 
 /**
@@ -470,7 +478,8 @@ ssize_t GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n,
  * @param dst destination file name
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_DISK_file_copy (const char *src, const char *dst);
+int
+GNUNET_DISK_file_copy (const char *src, const char *dst);
 
 
 /**
@@ -481,9 +490,10 @@ int GNUNET_DISK_file_copy (const char *src, const char *dst);
  * @param callback_cls closure for callback
  * @return the number of files found, -1 on error
  */
-int GNUNET_DISK_directory_scan (const char *dirName,
-                                GNUNET_FileNameCallback callback,
-                                void *callback_cls);
+int
+GNUNET_DISK_directory_scan (const char *dirName,
+                            GNUNET_FileNameCallback callback,
+                            void *callback_cls);
 
 
 /**
@@ -521,8 +531,9 @@ typedef void (*GNUNET_DISK_DirectoryIteratorCallback) (void *cls,
  *         GNUNET_NO if this was the last entry (and iteration is complete),
  *         GNUNET_SYSERR if "can" was YES
  */
-int GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator
-                                         *iter, int can);
+int
+GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator *iter,
+                                     int can);
 
 
 /**
@@ -536,10 +547,11 @@ 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,
-                                           GNUNET_DISK_DirectoryIteratorCallback
-                                           callback, void *callback_cls);
+void
+GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio,
+                                      const char *dirName,
+                                      GNUNET_DISK_DirectoryIteratorCallback
+                                      callback, void *callback_cls);
 
 
 /**
@@ -550,7 +562,8 @@ void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio,
  * @returns GNUNET_OK on success, GNUNET_SYSERR on failure,
  *          GNUNET_NO if directory exists but is not writeable
  */
-int GNUNET_DISK_directory_create_for_file (const char *filename);
+int
+GNUNET_DISK_directory_create_for_file (const char *filename);
 
 
 /**
@@ -563,7 +576,8 @@ int GNUNET_DISK_directory_create_for_file (const char *filename);
  * @return GNUNET_YES if yes, GNUNET_NO if does not exist, GNUNET_SYSERR
  *   on any error and if exists but not directory
  */
-int GNUNET_DISK_directory_test (const char *fil);
+int
+GNUNET_DISK_directory_test (const char *fil);
 
 
 /**
@@ -573,7 +587,8 @@ int GNUNET_DISK_directory_test (const char *fil);
  * @param fileName the file to remove
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_DISK_directory_remove (const char *fileName);
+int
+GNUNET_DISK_directory_remove (const char *fileName);
 
 
 /**
@@ -582,7 +597,8 @@ int GNUNET_DISK_directory_remove (const char *fileName);
  * @param dir the directory to create
  * @returns GNUNET_SYSERR on failure, GNUNET_OK otherwise
  */
-int GNUNET_DISK_directory_create (const char *dir);
+int
+GNUNET_DISK_directory_create (const char *dir);
 
 
 /**
@@ -594,8 +610,9 @@ 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);
 
 
 /**
@@ -605,15 +622,17 @@ int 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);
 
 
 /**
  * @brief Removes special characters as ':' from a filename.
  * @param fn the filename to canonicalize
  */
-void GNUNET_DISK_filename_canonicalize (char *fn);
+void
+GNUNET_DISK_filename_canonicalize (char *fn);
 
 
 /**
@@ -622,7 +641,8 @@ void GNUNET_DISK_filename_canonicalize (char *fn);
  * @param user new owner of the file
  * @return GNUNET_OK on success, GNUNET_SYSERR on failure
  */
-int GNUNET_DISK_file_change_owner (const char *filename, const char *user);
+int
+GNUNET_DISK_file_change_owner (const char *filename, const char *user);
 
 
 /**
@@ -639,8 +659,9 @@ int GNUNET_DISK_file_change_owner (const char *filename, const char *user);
  *                private directory name.
  * @return the constructed filename
  */
-char *GNUNET_DISK_get_home_filename (const struct GNUNET_CONFIGURATION_Handle
-                                     *cfg, const char *serviceName, ...);
+char *
+GNUNET_DISK_get_home_filename (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                               const char *serviceName, ...);
 
 
 /**
@@ -656,9 +677,10 @@ struct GNUNET_DISK_MapHandle;
  * @param len size of the mapping
  * @return pointer to the mapped memory region, NULL on failure
  */
-void *GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h,
-                            struct GNUNET_DISK_MapHandle **m,
-                            enum GNUNET_DISK_MapType access, size_t len);
+void *
+GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h,
+                      struct GNUNET_DISK_MapHandle **m,
+                      enum GNUNET_DISK_MapType access, size_t len);
 
 /**
  * Unmap a file
@@ -666,14 +688,16 @@ void *GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h,
  * @param h mapping handle
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h);
+int
+GNUNET_DISK_file_unmap (struct GNUNET_DISK_MapHandle *h);
 
 /**
  * Write file changes to disk
  * @param h handle to an open file
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h);
 
 /**
  * Creates a named pipe/FIFO and opens it
@@ -682,13 +706,9 @@ int GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h);
  * @param perm access permissions
  * @return pipe handle on success, NULL on error
  */
-struct GNUNET_DISK_FileHandle *GNUNET_DISK_npipe_create (char **fn,
-                                                         enum
-                                                         GNUNET_DISK_OpenFlags
-                                                         flags,
-                                                         enum
-                                                         GNUNET_DISK_AccessPermissions
-                                                         perm);
+struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_npipe_create (char **fn, enum GNUNET_DISK_OpenFlags flags,
+                          enum GNUNET_DISK_AccessPermissions perm);
 
 /**
  * Opens already existing named pipe/FIFO
@@ -698,20 +718,17 @@ struct GNUNET_DISK_FileHandle *GNUNET_DISK_npipe_create (char **fn,
  * @param perm access permissions
  * @return pipe handle on success, NULL on error
  */
-struct GNUNET_DISK_FileHandle *GNUNET_DISK_npipe_open (const char *fn,
-                                                       enum
-                                                       GNUNET_DISK_OpenFlags
-                                                       flags,
-                                                       enum
-                                                       GNUNET_DISK_AccessPermissions
-                                                       perm);
+struct GNUNET_DISK_FileHandle *
+GNUNET_DISK_npipe_open (const char *fn, enum GNUNET_DISK_OpenFlags flags,
+                        enum GNUNET_DISK_AccessPermissions perm);
 
 /**
  * Closes a named pipe/FIFO
  * @param pipe named pipe
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_npipe_close (struct GNUNET_DISK_FileHandle *pipe);
+int
+GNUNET_DISK_npipe_close (struct GNUNET_DISK_FileHandle *pipe);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
index 2bb2319b965dd8deedda1d4625c83856b20f69cb..3454ebc24bed0f5603946d751bf660ca47b35f2b 100644 (file)
@@ -68,12 +68,13 @@ struct GNUNET_DV_Handle;
  * @param cont_cls closure for continuation
  *
  */
-int GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle,
-                    const struct GNUNET_PeerIdentity *target,
-                    const char *msgbuf, size_t msgbuf_size,
-                    unsigned int priority, struct GNUNET_TIME_Relative timeout,
-                    const void *addr, size_t addrlen,
-                    GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls);
+int
+GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle,
+                const struct GNUNET_PeerIdentity *target, const char *msgbuf,
+                size_t msgbuf_size, unsigned int priority,
+                struct GNUNET_TIME_Relative timeout, const void *addr,
+                size_t addrlen, GNUNET_TRANSPORT_TransmitContinuation cont,
+                void *cont_cls);
 
 
 
index 1f1f8532161a81d81205f7580477f44962cd8960..06022e093d2e5b11d1de3e01302c2c6dad3049de 100644 (file)
@@ -80,22 +80,14 @@ typedef void (*GNUNET_FRAGMENT_MessageProcessor) (void *cls,
  * @param proc_cls closure for proc
  * @return the fragmentation context
  */
-struct GNUNET_FRAGMENT_Context *GNUNET_FRAGMENT_context_create (struct
-                                                                GNUNET_STATISTICS_Handle
-                                                                *stats,
-                                                                uint16_t mtu,
-                                                                struct
-                                                                GNUNET_BANDWIDTH_Tracker
-                                                                *tracker,
-                                                                struct
-                                                                GNUNET_TIME_Relative
-                                                                delay,
-                                                                const struct
-                                                                GNUNET_MessageHeader
-                                                                *msg,
-                                                                GNUNET_FRAGMENT_MessageProcessor
-                                                                proc,
-                                                                void *proc_cls);
+struct GNUNET_FRAGMENT_Context *
+GNUNET_FRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
+                                uint16_t mtu,
+                                struct GNUNET_BANDWIDTH_Tracker *tracker,
+                                struct GNUNET_TIME_Relative delay,
+                                const struct GNUNET_MessageHeader *msg,
+                                GNUNET_FRAGMENT_MessageProcessor proc,
+                                void *proc_cls);
 
 
 /**
@@ -105,8 +97,8 @@ 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);
 
 
 /**
@@ -120,8 +112,9 @@ void GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context
  *         GNUNET_NO if more messages are pending
  *         GNUNET_SYSERR if this ack is not valid for this fc
  */
-int GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
-                                 const struct GNUNET_MessageHeader *msg);
+int
+GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
+                             const struct GNUNET_MessageHeader *msg);
 
 
 /**
@@ -132,9 +125,8 @@ 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);
 
 
 /**
@@ -171,18 +163,12 @@ typedef void (*GNUNET_DEFRAGMENT_AckProcessor) (void *cls, uint32_t id,
  *             back to the other side)
  * @return the defragmentation context
  */
-struct GNUNET_DEFRAGMENT_Context *GNUNET_DEFRAGMENT_context_create (struct
-                                                                    GNUNET_STATISTICS_Handle
-                                                                    *stats,
-                                                                    uint16_t
-                                                                    mtu,
-                                                                    unsigned int
-                                                                    num_msgs,
-                                                                    void *cls,
-                                                                    GNUNET_FRAGMENT_MessageProcessor
-                                                                    proc,
-                                                                    GNUNET_DEFRAGMENT_AckProcessor
-                                                                    ackp);
+struct GNUNET_DEFRAGMENT_Context *
+GNUNET_DEFRAGMENT_context_create (struct GNUNET_STATISTICS_Handle *stats,
+                                  uint16_t mtu, unsigned int num_msgs,
+                                  void *cls,
+                                  GNUNET_FRAGMENT_MessageProcessor proc,
+                                  GNUNET_DEFRAGMENT_AckProcessor ackp);
 
 
 /**
@@ -190,7 +176,8 @@ struct GNUNET_DEFRAGMENT_Context *GNUNET_DEFRAGMENT_context_create (struct
  *
  * @param dc defragmentation context
  */
-void GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
+void
+GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
 
 
 /**
@@ -200,8 +187,9 @@ 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 */
index 2962a9cf2f855b85cdc218e4144f0176e6c887ed..e8026a66f60e696399c0dcd086023363704d9029 100644 (file)
@@ -89,8 +89,8 @@ typedef int (*GNUNET_FS_KeywordIterator) (void *cls, const char *keyword,
  * @param uri uri to convert to a unique key
  * @param key wherer to store the unique key
  */
-void GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
-                           GNUNET_HashCode * key);
+void
+GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key);
 
 /**
  * Convert a URI to a UTF-8 String.
@@ -98,7 +98,8 @@ void GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
  * @param uri uri to convert to a string
  * @return the UTF-8 string
  */
-char *GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri);
+char *
+GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri);
 
 /**
  * Convert keyword URI to a human readable format
@@ -107,7 +108,8 @@ char *GNUNET_FS_uri_to_string (const struct GNUNET_FS_Uri *uri);
  * @param uri ksk uri to convert to a string 
  * @return string with the keywords
  */
-char *GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri);
+char *
+GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -118,8 +120,9 @@ 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);
 
 
 /**
@@ -129,8 +132,9 @@ void 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);
 
 
 /**
@@ -140,14 +144,16 @@ void GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri,
  * @param emsg where to store the parser error message (if any)
  * @return NULL on error
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_parse (const char *uri, char **emsg);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_parse (const char *uri, char **emsg);
 
 /**
  * Free URI.
  *
  * @param uri uri to free
  */
-void GNUNET_FS_uri_destroy (struct GNUNET_FS_Uri *uri);
+void
+GNUNET_FS_uri_destroy (struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -156,8 +162,8 @@ 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);
 
 
 /**
@@ -169,9 +175,10 @@ unsigned int GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_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);
 
 
 /**
@@ -181,8 +188,9 @@ int 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);
 
 
 /**
@@ -191,8 +199,8 @@ int GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri,
  * @param uri location URI to get the content URI from
  * @return NULL if argument is not a location URI
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri
-                                                 *uri);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -201,9 +209,8 @@ 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);
 
 
 /**
@@ -214,13 +221,10 @@ struct GNUNET_TIME_Absolute GNUNET_FS_uri_loc_get_expiration (const struct
  * @param expiration_time how long will the content be offered?
  * @return the location URI, NULL on error
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri
-                                                *baseUri,
-                                                const struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg,
-                                                struct GNUNET_TIME_Absolute
-                                                expiration_time);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri *baseUri,
+                          const struct GNUNET_CONFIGURATION_Handle *cfg,
+                          struct GNUNET_TIME_Absolute expiration_time);
 
 
 /**
@@ -231,8 +235,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_create (const struct GNUNET_FS_Uri
  * @param uri the URI to canonicalize 
  * @return canonicalized version of the URI, NULL on error
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_canonicalize (const struct GNUNET_FS_Uri
-                                                      *uri);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_canonicalize (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -244,8 +248,9 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_canonicalize (const struct GNUNET_FS_Uri
  * @param u2 second uri
  * @return merged URI, NULL on error
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_merge (const struct GNUNET_FS_Uri *u1,
-                                               const struct GNUNET_FS_Uri *u2);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_merge (const struct GNUNET_FS_Uri *u1,
+                         const struct GNUNET_FS_Uri *u2);
 
 
 /**
@@ -254,7 +259,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_merge (const struct GNUNET_FS_Uri *u1,
  * @param uri the URI to duplicate
  * @return copy of the URI
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -274,8 +280,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_dup (const struct GNUNET_FS_Uri *uri);
  * @return an FS URI for the given keywords, NULL
  *  if keywords is not legal (i.e. empty).
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create (const char *keywords,
-                                                char **emsg);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_create (const char *keywords, char **emsg);
 
 
 /**
@@ -295,8 +301,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create (const char *keywords,
  * @return an FS URI for the given keywords, NULL
  *  if keywords is not legal (i.e. empty).
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_args (unsigned int argc,
-                                                          const char **argv);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, const char **argv);
 
 
 /**
@@ -306,8 +312,9 @@ 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);
 
 
 /**
@@ -316,7 +323,8 @@ int GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
  * @param uri the uri to check
  * @return GNUNET_YES if this is an SKS uri
  */
-int GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri);
+int
+GNUNET_FS_uri_test_sks (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -333,8 +341,9 @@ struct GNUNET_FS_Namespace;
  * @param emsg where to store an error message
  * @return an FS URI for the given namespace and identifier
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns,
-                                                const char *id, char **emsg);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns, const char *id,
+                          char **emsg);
 
 
 /**
@@ -344,8 +353,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create (struct GNUNET_FS_Namespace *ns,
  * @param id identifier
  * @return an FS URI for the given namespace and identifier
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode *
-                                                          nsid, const char *id);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode * nsid, const char *id);
 
 
 /**
@@ -356,8 +365,9 @@ 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);
 
 
 /**
@@ -366,7 +376,8 @@ int GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
  * @param uri the sks uri
  * @return NULL on error (not a valid SKS URI)
  */
-char *GNUNET_FS_uri_sks_get_content_id (const struct GNUNET_FS_Uri *uri);
+char *
+GNUNET_FS_uri_sks_get_content_id (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -377,8 +388,9 @@ char *GNUNET_FS_uri_sks_get_content_id (const struct GNUNET_FS_Uri *uri);
  * @param uri SKS uri to convert
  * @return NULL on error (not an SKS URI)
  */
-char *GNUNET_FS_uri_sks_to_string_fancy (struct GNUNET_CONFIGURATION_Handle
-                                         *cfg, const struct GNUNET_FS_Uri *uri);
+char *
+GNUNET_FS_uri_sks_to_string_fancy (struct GNUNET_CONFIGURATION_Handle *cfg,
+                                   const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -387,7 +399,8 @@ char *GNUNET_FS_uri_sks_to_string_fancy (struct GNUNET_CONFIGURATION_Handle
  * @param uri the uri
  * @return GNUNET_YES if this is a KSK uri
  */
-int GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri);
+int
+GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -396,7 +409,8 @@ int GNUNET_FS_uri_test_ksk (const struct GNUNET_FS_Uri *uri);
  * @param uri the uri to check
  * @return GNUNET_YES if this is a CHK uri
  */
-int GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri);
+int
+GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -406,7 +420,8 @@ int GNUNET_FS_uri_test_chk (const struct GNUNET_FS_Uri *uri);
  * @param uri the CHK (or LOC) URI to inspect
  * @return size of the file as specified in the CHK URI
  */
-uint64_t GNUNET_FS_uri_chk_get_file_size (const struct GNUNET_FS_Uri *uri);
+uint64_t
+GNUNET_FS_uri_chk_get_file_size (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -415,7 +430,8 @@ uint64_t GNUNET_FS_uri_chk_get_file_size (const struct GNUNET_FS_Uri *uri);
  * @param uri the uri to check
  * @return GNUNET_YES if this is a LOC uri
  */
-int GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri);
+int
+GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri);
 
 
 /**
@@ -426,9 +442,9 @@ int GNUNET_FS_uri_test_loc (const struct GNUNET_FS_Uri *uri);
  * @param md metadata to use
  * @return NULL on error, otherwise a KSK URI
  */
-struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_meta_data (const struct
-                                                               GNUNET_CONTAINER_MetaData
-                                                               *md);
+struct GNUNET_FS_Uri *
+GNUNET_FS_uri_ksk_create_from_meta_data (const struct GNUNET_CONTAINER_MetaData
+                                         *md);
 
 
 /* ******************** command-line option parsing API *********************** */
@@ -445,10 +461,10 @@ 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);
 
 
 /**
@@ -463,10 +479,10 @@ int GNUNET_FS_getopt_set_keywords (struct
  * @param value command line argument given
  * @return GNUNET_OK on success
  */
-int GNUNET_FS_getopt_set_metadata (struct
-                                   GNUNET_GETOPT_CommandLineProcessorContext
-                                   *ctx, void *scls, const char *option,
-                                   const char *value);
+int
+GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
+                               *ctx, void *scls, const char *option,
+                               const char *value);
 
 
 
@@ -1621,7 +1637,8 @@ struct GNUNET_FS_BlockOptions
 /**
  * Return the current year (i.e. '2011').
  */
-unsigned int GNUNET_FS_get_current_year (void);
+unsigned int
+GNUNET_FS_get_current_year (void);
 
 
 /**
@@ -1630,7 +1647,8 @@ unsigned int GNUNET_FS_get_current_year (void);
  * @param year a year (after 1970, please ;-)).
  * @return absolute time for January 1st of that year.
  */
-struct GNUNET_TIME_Absolute GNUNET_FS_year_to_time (unsigned int year);
+struct GNUNET_TIME_Absolute
+GNUNET_FS_year_to_time (unsigned int year);
 
 
 /**
@@ -1650,12 +1668,10 @@ struct GNUNET_FS_Handle;
  * @param ... list of optional options, terminated with GNUNET_FS_OPTIONS_END
  * @return NULL on error
  */
-struct GNUNET_FS_Handle *GNUNET_FS_start (const struct
-                                          GNUNET_CONFIGURATION_Handle *cfg,
-                                          const char *client_name,
-                                          GNUNET_FS_ProgressCallback upcb,
-                                          void *upcb_cls,
-                                          enum GNUNET_FS_Flags flags, ...);
+struct GNUNET_FS_Handle *
+GNUNET_FS_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                 const char *client_name, GNUNET_FS_ProgressCallback upcb,
+                 void *upcb_cls, enum GNUNET_FS_Flags flags, ...);
 
 
 /**
@@ -1665,7 +1681,8 @@ struct GNUNET_FS_Handle *GNUNET_FS_start (const struct
  *
  * @param h handle that was returned from GNUNET_FS_start
  */
-void GNUNET_FS_stop (struct GNUNET_FS_Handle *h);
+void
+GNUNET_FS_stop (struct GNUNET_FS_Handle *h);
 
 
 /**
@@ -1677,10 +1694,10 @@ 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);
 
 
 /**
@@ -1721,8 +1738,8 @@ typedef int (*GNUNET_FS_FileInformationProcessor) (void *cls,
  *         can be passed to "GNUNET_FS_file_information_recover"
  *         to read this fi-struct from disk.
  */
-const char *GNUNET_FS_file_information_get_id (struct GNUNET_FS_FileInformation
-                                               *s);
+const char *
+GNUNET_FS_file_information_get_id (struct GNUNET_FS_FileInformation *s);
 
 
 
@@ -1740,17 +1757,17 @@ const char *GNUNET_FS_file_information_get_id (struct GNUNET_FS_FileInformation
  * @param bo block options
  * @return publish structure entry for the file
  */
-struct GNUNET_FS_FileInformation
-    *GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h,
-                                                  void *client_info,
-                                                  const char *filename,
-                                                  const struct GNUNET_FS_Uri
-                                                  *keywords,
-                                                  const struct
-                                                  GNUNET_CONTAINER_MetaData
-                                                  *meta, int do_index,
-                                                  const struct
-                                                  GNUNET_FS_BlockOptions *bo);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_from_file (struct GNUNET_FS_Handle *h,
+                                             void *client_info,
+                                             const char *filename,
+                                             const struct GNUNET_FS_Uri
+                                             *keywords,
+                                             const struct
+                                             GNUNET_CONTAINER_MetaData *meta,
+                                             int do_index,
+                                             const struct GNUNET_FS_BlockOptions
+                                             *bo);
 
 
 /**
@@ -1769,17 +1786,17 @@ struct GNUNET_FS_FileInformation
  * @param bo block options
  * @return publish structure entry for the file
  */
-struct GNUNET_FS_FileInformation
-    *GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h,
-                                                  void *client_info,
-                                                  uint64_t length, void *data,
-                                                  const struct GNUNET_FS_Uri
-                                                  *keywords,
-                                                  const struct
-                                                  GNUNET_CONTAINER_MetaData
-                                                  *meta, int do_index,
-                                                  const struct
-                                                  GNUNET_FS_BlockOptions *bo);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_from_data (struct GNUNET_FS_Handle *h,
+                                             void *client_info, uint64_t length,
+                                             void *data,
+                                             const struct GNUNET_FS_Uri
+                                             *keywords,
+                                             const struct
+                                             GNUNET_CONTAINER_MetaData *meta,
+                                             int do_index,
+                                             const struct GNUNET_FS_BlockOptions
+                                             *bo);
 
 
 /**
@@ -1818,19 +1835,19 @@ typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max,
  * @param bo block options
  * @return publish structure entry for the file
  */
-struct GNUNET_FS_FileInformation
-    *GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h,
-                                                    void *client_info,
-                                                    uint64_t length,
-                                                    GNUNET_FS_DataReader reader,
-                                                    void *reader_cls,
-                                                    const struct GNUNET_FS_Uri
-                                                    *keywords,
-                                                    const struct
-                                                    GNUNET_CONTAINER_MetaData
-                                                    *meta, int do_index,
-                                                    const struct
-                                                    GNUNET_FS_BlockOptions *bo);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_from_reader (struct GNUNET_FS_Handle *h,
+                                               void *client_info,
+                                               uint64_t length,
+                                               GNUNET_FS_DataReader reader,
+                                               void *reader_cls,
+                                               const struct GNUNET_FS_Uri
+                                               *keywords,
+                                               const struct
+                                               GNUNET_CONTAINER_MetaData *meta,
+                                               int do_index,
+                                               const struct
+                                               GNUNET_FS_BlockOptions *bo);
 
 
 /**
@@ -1890,11 +1907,12 @@ 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);
 
 
 /**
@@ -1917,17 +1935,16 @@ int GNUNET_FS_directory_scanner_default (void *cls, struct GNUNET_FS_Handle *h,
  * @param emsg where to store an error message
  * @return publish structure entry for the directory, NULL on error
  */
-struct GNUNET_FS_FileInformation
-    *GNUNET_FS_file_information_create_from_directory (struct GNUNET_FS_Handle
-                                                       *h, void *client_info,
-                                                       const char *filename,
-                                                       GNUNET_FS_DirectoryScanner
-                                                       scanner,
-                                                       void *scanner_cls,
-                                                       int do_index,
-                                                       const struct
-                                                       GNUNET_FS_BlockOptions
-                                                       *bo, char **emsg);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_from_directory (struct GNUNET_FS_Handle *h,
+                                                  void *client_info,
+                                                  const char *filename,
+                                                  GNUNET_FS_DirectoryScanner
+                                                  scanner, void *scanner_cls,
+                                                  int do_index,
+                                                  const struct
+                                                  GNUNET_FS_BlockOptions *bo,
+                                                  char **emsg);
 
 
 /**
@@ -1944,17 +1961,16 @@ struct GNUNET_FS_FileInformation
  * @param bo block options
  * @return publish structure entry for the directory , NULL on error
  */
-struct GNUNET_FS_FileInformation
-    *GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle
-                                                        *h, void *client_info,
-                                                        const struct
-                                                        GNUNET_FS_Uri *keywords,
-                                                        const struct
-                                                        GNUNET_CONTAINER_MetaData
-                                                        *meta,
-                                                        const struct
-                                                        GNUNET_FS_BlockOptions
-                                                        *bo);
+struct GNUNET_FS_FileInformation *
+GNUNET_FS_file_information_create_empty_directory (struct GNUNET_FS_Handle *h,
+                                                   void *client_info,
+                                                   const struct GNUNET_FS_Uri
+                                                   *keywords,
+                                                   const struct
+                                                   GNUNET_CONTAINER_MetaData
+                                                   *meta,
+                                                   const struct
+                                                   GNUNET_FS_BlockOptions *bo);
 
 
 /**
@@ -1963,8 +1979,9 @@ 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);
 
 
 /**
@@ -1978,8 +1995,9 @@ int GNUNET_FS_file_information_is_directory (const struct
  *            must not include "dir" in its structure
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir,
-                                    struct GNUNET_FS_FileInformation *ent);
+int
+GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir,
+                                struct GNUNET_FS_FileInformation *ent);
 
 
 /**
@@ -1996,9 +2014,10 @@ int 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);
 
 
 /**
@@ -2011,9 +2030,10 @@ void 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);
 
 
 /**
@@ -2047,19 +2067,12 @@ enum GNUNET_FS_PublishOptions
  * @param options options for the publication 
  * @return context that can be used to control the publish operation
  */
-struct GNUNET_FS_PublishContext *GNUNET_FS_publish_start (struct
-                                                          GNUNET_FS_Handle *h,
-                                                          struct
-                                                          GNUNET_FS_FileInformation
-                                                          *fi,
-                                                          struct
-                                                          GNUNET_FS_Namespace
-                                                          *namespace,
-                                                          const char *nid,
-                                                          const char *nuid,
-                                                          enum
-                                                          GNUNET_FS_PublishOptions
-                                                          options);
+struct GNUNET_FS_PublishContext *
+GNUNET_FS_publish_start (struct GNUNET_FS_Handle *h,
+                         struct GNUNET_FS_FileInformation *fi,
+                         struct GNUNET_FS_Namespace *namespace, const char *nid,
+                         const char *nuid,
+                         enum GNUNET_FS_PublishOptions options);
 
 
 /**
@@ -2070,7 +2083,8 @@ struct GNUNET_FS_PublishContext *GNUNET_FS_publish_start (struct
  *
  * @param pc context for the publication to stop
  */
-void GNUNET_FS_publish_stop (struct GNUNET_FS_PublishContext *pc);
+void
+GNUNET_FS_publish_stop (struct GNUNET_FS_PublishContext *pc);
 
 
 /**
@@ -2098,13 +2112,14 @@ 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);
 
 
 /**
@@ -2121,14 +2136,15 @@ void 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);
 
 
 /**
@@ -2154,10 +2170,11 @@ typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, const char *filename,
  *             error) or  "PREREQ_DONE" (on success)
  * @param cont_cls closure for cont
  */
-void GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
-                                  GNUNET_FS_IndexedFileProcessor iterator,
-                                  void *iterator_cls,
-                                  GNUNET_SCHEDULER_Task cont, void *cont_cls);
+void
+GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
+                             GNUNET_FS_IndexedFileProcessor iterator,
+                             void *iterator_cls, GNUNET_SCHEDULER_Task cont,
+                             void *cont_cls);
 
 
 /**
@@ -2168,10 +2185,9 @@ void GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
  * @param cctx initial value for the client context
  * @return NULL on error, otherwise handle 
  */
-struct GNUNET_FS_UnindexContext *GNUNET_FS_unindex_start (struct
-                                                          GNUNET_FS_Handle *h,
-                                                          const char *filename,
-                                                          void *cctx);
+struct GNUNET_FS_UnindexContext *
+GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename,
+                         void *cctx);
 
 
 /**
@@ -2179,7 +2195,8 @@ struct GNUNET_FS_UnindexContext *GNUNET_FS_unindex_start (struct
  *
  * @param uc handle
  */
-void GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc);
+void
+GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc);
 
 
 /**
@@ -2194,15 +2211,15 @@ 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);
 
 
 /**
@@ -2213,8 +2230,8 @@ void GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h,
  * @param name name to use for the namespace
  * @return handle to the namespace, NULL on error
  */
-struct GNUNET_FS_Namespace *GNUNET_FS_namespace_create (struct GNUNET_FS_Handle
-                                                        *h, const char *name);
+struct GNUNET_FS_Namespace *
+GNUNET_FS_namespace_create (struct GNUNET_FS_Handle *h, const char *name);
 
 
 /**
@@ -2228,8 +2245,8 @@ 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);
 
 
 /**
@@ -2254,9 +2271,9 @@ typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, const char *name,
  * @param cb function to call on each known namespace
  * @param cb_cls closure for cb
  */
-void GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h,
-                               GNUNET_FS_NamespaceInfoProcessor cb,
-                               void *cb_cls);
+void
+GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h,
+                          GNUNET_FS_NamespaceInfoProcessor cb, void *cb_cls);
 
 
 /**
@@ -2296,10 +2313,11 @@ typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls, const char *last_id,
  * @param ip function to call on each updateable identifier
  * @param ip_cls closure for ip
  */
-void GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace,
-                                          const char *next_id,
-                                          GNUNET_FS_IdentifierProcessor ip,
-                                          void *ip_cls);
+void
+GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace,
+                                     const char *next_id,
+                                     GNUNET_FS_IdentifierProcessor ip,
+                                     void *ip_cls);
 
 
 /**
@@ -2331,14 +2349,10 @@ enum GNUNET_FS_SearchOptions
  * @param cctx initial value for the client context
  * @return context that can be used to control the search
  */
-struct GNUNET_FS_SearchContext *GNUNET_FS_search_start (struct GNUNET_FS_Handle
-                                                        *h,
-                                                        const struct
-                                                        GNUNET_FS_Uri *uri,
-                                                        uint32_t anonymity,
-                                                        enum
-                                                        GNUNET_FS_SearchOptions
-                                                        options, void *cctx);
+struct GNUNET_FS_SearchContext *
+GNUNET_FS_search_start (struct GNUNET_FS_Handle *h,
+                        const struct GNUNET_FS_Uri *uri, uint32_t anonymity,
+                        enum GNUNET_FS_SearchOptions options, void *cctx);
 
 
 /**
@@ -2346,7 +2360,8 @@ struct GNUNET_FS_SearchContext *GNUNET_FS_search_start (struct GNUNET_FS_Handle
  *
  * @param sc context for the search that should be paused
  */
-void GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc);
+void
+GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc);
 
 
 /**
@@ -2354,7 +2369,8 @@ void GNUNET_FS_search_pause (struct GNUNET_FS_SearchContext *sc);
  *
  * @param sc context for the search that should be resumed
  */
-void GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc);
+void
+GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc);
 
 
 /**
@@ -2362,7 +2378,8 @@ void GNUNET_FS_search_continue (struct GNUNET_FS_SearchContext *sc);
  *
  * @param sc context for the search that should be stopped
  */
-void GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc);
+void
+GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc);
 
 
 
@@ -2437,26 +2454,14 @@ enum GNUNET_FS_DownloadOptions
  *        for top-level downloads; useful for manually-triggered recursive downloads)
  * @return context that can be used to control this download
  */
-struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start (struct
-                                                            GNUNET_FS_Handle *h,
-                                                            const struct
-                                                            GNUNET_FS_Uri *uri,
-                                                            const struct
-                                                            GNUNET_CONTAINER_MetaData
-                                                            *meta,
-                                                            const char
-                                                            *filename,
-                                                            const char
-                                                            *tempname,
-                                                            uint64_t offset,
-                                                            uint64_t length,
-                                                            uint32_t anonymity,
-                                                            enum
-                                                            GNUNET_FS_DownloadOptions
-                                                            options, void *cctx,
-                                                            struct
-                                                            GNUNET_FS_DownloadContext
-                                                            *parent);
+struct GNUNET_FS_DownloadContext *
+GNUNET_FS_download_start (struct GNUNET_FS_Handle *h,
+                          const struct GNUNET_FS_Uri *uri,
+                          const struct GNUNET_CONTAINER_MetaData *meta,
+                          const char *filename, const char *tempname,
+                          uint64_t offset, uint64_t length, uint32_t anonymity,
+                          enum GNUNET_FS_DownloadOptions options, void *cctx,
+                          struct GNUNET_FS_DownloadContext *parent);
 
 
 /**
@@ -2493,29 +2498,14 @@ struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start (struct
  * @param cctx initial value for the client context for this download
  * @return context that can be used to control this download
  */
-struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start_from_search (struct
-                                                                        GNUNET_FS_Handle
-                                                                        *h,
-                                                                        struct
-                                                                        GNUNET_FS_SearchResult
-                                                                        *sr,
-                                                                        const
-                                                                        char
-                                                                        *filename,
-                                                                        const
-                                                                        char
-                                                                        *tempname,
-                                                                        uint64_t
-                                                                        offset,
-                                                                        uint64_t
-                                                                        length,
-                                                                        uint32_t
-                                                                        anonymity,
-                                                                        enum
-                                                                        GNUNET_FS_DownloadOptions
-                                                                        options,
-                                                                        void
-                                                                        *cctx);
+struct GNUNET_FS_DownloadContext *
+GNUNET_FS_download_start_from_search (struct GNUNET_FS_Handle *h,
+                                      struct GNUNET_FS_SearchResult *sr,
+                                      const char *filename,
+                                      const char *tempname, uint64_t offset,
+                                      uint64_t length, uint32_t anonymity,
+                                      enum GNUNET_FS_DownloadOptions options,
+                                      void *cctx);
 
 
 /**
@@ -2524,8 +2514,8 @@ 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);
 
 
 
@@ -2543,8 +2533,9 @@ void GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc,
  * @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if
  *  we have no mime-type information (treat as 'GNUNET_NO')
  */
-int GNUNET_FS_meta_data_test_for_directory (const struct
-                                            GNUNET_CONTAINER_MetaData *md);
+int
+GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData
+                                        *md);
 
 
 /**
@@ -2553,7 +2544,8 @@ int GNUNET_FS_meta_data_test_for_directory (const struct
  * 
  * @param md metadata to add mimetype to
  */
-void GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md);
+void
+GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md);
 
 
 /**
@@ -2562,8 +2554,9 @@ void GNUNET_FS_meta_data_make_directory (struct GNUNET_CONTAINER_MetaData *md);
  * @param md given meta data
  * @return NULL if meta data is useless for suggesting a filename
  */
-char *GNUNET_FS_meta_data_suggest_filename (const struct
-                                            GNUNET_CONTAINER_MetaData *md);
+char *
+GNUNET_FS_meta_data_suggest_filename (const struct GNUNET_CONTAINER_MetaData
+                                      *md);
 
 
 /**
@@ -2610,10 +2603,11 @@ 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);
 
 
 /**
@@ -2626,10 +2620,9 @@ struct GNUNET_FS_DirectoryBuilder;
  * 
  * @param mdir metadata for the directory
  */
-struct GNUNET_FS_DirectoryBuilder *GNUNET_FS_directory_builder_create (const
-                                                                       struct
-                                                                       GNUNET_CONTAINER_MetaData
-                                                                       *mdir);
+struct GNUNET_FS_DirectoryBuilder *
+GNUNET_FS_directory_builder_create (const struct GNUNET_CONTAINER_MetaData
+                                    *mdir);
 
 
 /**
@@ -2642,10 +2635,11 @@ 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);
 
 
 /**
@@ -2658,8 +2652,9 @@ void 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 */
index 0fb7ec84ea276827fba8fe9dc33932f8045aa761..e6afa2b3c86f0543c618a735815018d779efec42 100644 (file)
@@ -207,9 +207,10 @@ struct GNUNET_GETOPT_CommandLineOption
  * @return index into argv with first non-option
  *   argument, or GNUNET_SYSERR on error
  */
-int GNUNET_GETOPT_run (const char *binaryOptions,
-                       const struct GNUNET_GETOPT_CommandLineOption *allOptions,
-                       unsigned int argc, char *const *argv);
+int
+GNUNET_GETOPT_run (const char *binaryOptions,
+                   const struct GNUNET_GETOPT_CommandLineOption *allOptions,
+                   unsigned int argc, char *const *argv);
 
 
 /**
@@ -225,9 +226,9 @@ int GNUNET_GETOPT_run (const char *binaryOptions,
  * @param value actual value of the option as a string.
  * @return GNUNET_OK if parsing the value worked
  */
-int GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext
-                             *ctx, void *scls, const char *option,
-                             const char *value);
+int
+GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+                         void *scls, const char *option, const char *value);
 
 
 /**
@@ -243,9 +244,9 @@ int GNUNET_GETOPT_set_ulong (struct GNUNET_GETOPT_CommandLineProcessorContext
  * @param value actual value of the option as a string.
  * @return GNUNET_OK if parsing the value worked
  */
-int GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext
-                            *ctx, void *scls, const char *option,
-                            const char *value);
+int
+GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+                        void *scls, const char *option, const char *value);
 
 
 /**
@@ -262,9 +263,9 @@ int GNUNET_GETOPT_set_uint (struct GNUNET_GETOPT_CommandLineProcessorContext
  * @param value not used (NULL)
  * @return GNUNET_OK 
  */
-int GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext
-                           *ctx, void *scls, const char *option,
-                           const char *value);
+int
+GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+                       void *scls, const char *option, const char *value);
 
 
 /**
@@ -281,9 +282,9 @@ int GNUNET_GETOPT_set_one (struct GNUNET_GETOPT_CommandLineProcessorContext
  * @param value actual value of the option (a string)
  * @return GNUNET_OK 
  */
-int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext
-                              *ctx, void *scls, const char *option,
-                              const char *value);
+int
+GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
+                          void *scls, const char *option, const char *value);
 
 /**
  * Set an option of type 'unsigned int' from the command line. Each
@@ -299,10 +300,10 @@ 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! ************* */
@@ -316,9 +317,10 @@ int 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
-                                *ctx, void *scls, const char *option,
-                                const char *value);
+int
+GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
+                            *ctx, void *scls, const char *option,
+                            const char *value);
 
 /**
  * Print out program version (implements --version).
@@ -329,10 +331,10 @@ int GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
  * @param value not used (NULL)
  * @return GNUNET_SYSERR (do not continue)
  */
-int GNUNET_GETOPT_print_version_ (struct
-                                  GNUNET_GETOPT_CommandLineProcessorContext
-                                  *ctx, void *scls, const char *option,
-                                  const char *value);
+int
+GNUNET_GETOPT_print_version_ (struct GNUNET_GETOPT_CommandLineProcessorContext
+                              *ctx, void *scls, const char *option,
+                              const char *value);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
index 3c44b5048927e32639c04b5d03b8f90d0350df3e..556b41d3c75fe9e3937e897718af29c94f83fe13 100644 (file)
@@ -60,11 +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);
 
 
 /**
@@ -90,11 +90,11 @@ typedef size_t (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls,
  *
  * @return the hello message
  */
-struct GNUNET_HELLO_Message *GNUNET_HELLO_create (const struct
-                                                  GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
-                                                  *publicKey,
-                                                  GNUNET_HELLO_GenerateAddressListCallback
-                                                  addrgen, void *addrgen_cls);
+struct GNUNET_HELLO_Message *
+GNUNET_HELLO_create (const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
+                     *publicKey,
+                     GNUNET_HELLO_GenerateAddressListCallback addrgen,
+                     void *addrgen_cls);
 
 
 /**
@@ -102,7 +102,8 @@ struct GNUNET_HELLO_Message *GNUNET_HELLO_create (const struct
  * @param hello to inspect
  * @return the size, 0 if HELLO is invalid
  */
-uint16_t GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello);
+uint16_t
+GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello);
 
 
 /**
@@ -114,10 +115,9 @@ uint16_t GNUNET_HELLO_size (const struct GNUNET_HELLO_Message *hello);
  * @param h2 the second HELLO message
  * @return the combined hello message
  */
-struct GNUNET_HELLO_Message *GNUNET_HELLO_merge (const struct
-                                                 GNUNET_HELLO_Message *h1,
-                                                 const struct
-                                                 GNUNET_HELLO_Message *h2);
+struct GNUNET_HELLO_Message *
+GNUNET_HELLO_merge (const struct GNUNET_HELLO_Message *h1,
+                    const struct GNUNET_HELLO_Message *h2);
 
 
 /**
@@ -136,12 +136,10 @@ 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);
 
 
 /**
@@ -174,13 +172,10 @@ typedef int (*GNUNET_HELLO_AddressIterator) (void *cls, const char *tname,
  * @param it_cls closure for it
  * @return the modified HELLO or NULL
  */
-struct GNUNET_HELLO_Message *GNUNET_HELLO_iterate_addresses (const struct
-                                                             GNUNET_HELLO_Message
-                                                             *msg,
-                                                             int
-                                                             return_modified,
-                                                             GNUNET_HELLO_AddressIterator
-                                                             it, void *it_cls);
+struct GNUNET_HELLO_Message *
+GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg,
+                                int return_modified,
+                                GNUNET_HELLO_AddressIterator it, void *it_cls);
 
 
 /**
@@ -194,14 +189,15 @@ 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);
 
 
 /**
@@ -211,9 +207,10 @@ void 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);
 
 
 /**
@@ -223,8 +220,9 @@ int 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);
 
 
 /**
@@ -235,9 +233,8 @@ int GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
  *
  * @return header or NULL if the HELLO was malformed
  */
-struct GNUNET_MessageHeader *GNUNET_HELLO_get_header (struct
-                                                      GNUNET_HELLO_Message
-                                                      *hello);
+struct GNUNET_MessageHeader *
+GNUNET_HELLO_get_header (struct GNUNET_HELLO_Message *hello);
 
 /* ifndef GNUNET_HELLO_LIB_H */
 #endif
index d56522d4008497ff3040c6b92f897c2ad92a297e..6dfe80cb24381c3fd2d69e60c3766ba133e0bf34 100644 (file)
@@ -51,8 +51,8 @@ struct GNUNET_LOAD_Value;
  *        frequency, 0-load values will be added to the load
  * @return the new load value
  */
-struct GNUNET_LOAD_Value *GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative
-                                                  autodecline);
+struct GNUNET_LOAD_Value *
+GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative autodecline);
 
 
 /**
@@ -61,8 +61,9 @@ 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);
 
 
 /**
@@ -82,7 +83,8 @@ void GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
  *         100 if the latest updates were so large
  *         that we could not do proper calculations
  */
-double GNUNET_LOAD_get_load (struct GNUNET_LOAD_Value *load);
+double
+GNUNET_LOAD_get_load (struct GNUNET_LOAD_Value *load);
 
 
 /**
@@ -91,7 +93,8 @@ double GNUNET_LOAD_get_load (struct GNUNET_LOAD_Value *load);
  * @param load load handle
  * @return zero if update was never called
  */
-double GNUNET_LOAD_get_average (struct GNUNET_LOAD_Value *load);
+double
+GNUNET_LOAD_get_average (struct GNUNET_LOAD_Value *load);
 
 
 /**
@@ -100,7 +103,8 @@ double GNUNET_LOAD_get_average (struct GNUNET_LOAD_Value *load);
  * @param load to update
  * @param data latest measurement value (for example, delay)
  */
-void GNUNET_LOAD_update (struct GNUNET_LOAD_Value *load, uint64_t data);
+void
+GNUNET_LOAD_update (struct GNUNET_LOAD_Value *load, uint64_t data);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 507b766d12cc444ea7da0b5d7a314127764df3cf..bea706478679302e95f2f98fa3c336e4ae2f1964 100644 (file)
@@ -138,17 +138,11 @@ typedef uint32_t GNUNET_MESH_ApplicationType;
  * @return handle to the mesh service 
  *           NULL on error (in this case, init is never called)
  */
-struct GNUNET_MESH_Handle *GNUNET_MESH_connect (const struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, void *cls,
-                                                GNUNET_MESH_TunnelEndHandler
-                                                cleaner,
-                                                const struct
-                                                GNUNET_MESH_MessageHandler
-                                                *handlers,
-                                                const
-                                                GNUNET_MESH_ApplicationType
-                                                *stypes);
+struct GNUNET_MESH_Handle *
+GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls,
+                     GNUNET_MESH_TunnelEndHandler cleaner,
+                     const struct GNUNET_MESH_MessageHandler *handlers,
+                     const GNUNET_MESH_ApplicationType *stypes);
 
 /**
  * Get the peer on the other side of this tunnel if it is just one. Return NULL otherwise
@@ -156,9 +150,8 @@ struct GNUNET_MESH_Handle *GNUNET_MESH_connect (const struct
  * @param tunnel the tunnel
  * @return the peer or NULL
  */
-const struct GNUNET_PeerIdentity *GNUNET_MESH_get_peer (const struct
-                                                        GNUNET_MESH_Tunnel
-                                                        *tunnel);
+const struct GNUNET_PeerIdentity *
+GNUNET_MESH_get_peer (const struct GNUNET_MESH_Tunnel *tunnel);
 
 
 /**
@@ -166,7 +159,8 @@ const struct GNUNET_PeerIdentity *GNUNET_MESH_get_peer (const struct
  *
  * @param handle connection to mesh to disconnect
  */
-void GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
+void
+GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
 
 
 
@@ -220,23 +214,15 @@ struct GNUNET_MESH_PeerRequestHandle;
  * @param handler_cls closure for handler
  * @return NULL on error (handler will not be called), otherwise handle for cancellation
  */
-struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_any (struct
-                                                                 GNUNET_MESH_Handle
-                                                                 *h,
-                                                                 struct
-                                                                 GNUNET_TIME_Relative
-                                                                 timeout,
-                                                                 unsigned int
-                                                                 num_peers,
-                                                                 const struct
-                                                                 GNUNET_PeerIdentity
-                                                                 *peers,
-                                                                 GNUNET_MESH_TunnelConnectHandler
-                                                                 connect_handler,
-                                                                 GNUNET_MESH_TunnelDisconnectHandler
-                                                                 disconnect_handler,
-                                                                 void
-                                                                 *handler_cls);
+struct GNUNET_MESH_Tunnel *
+GNUNET_MESH_peer_request_connect_any (struct GNUNET_MESH_Handle *h,
+                                      struct GNUNET_TIME_Relative timeout,
+                                      unsigned int num_peers,
+                                      const struct GNUNET_PeerIdentity *peers,
+                                      GNUNET_MESH_TunnelConnectHandler
+                                      connect_handler,
+                                      GNUNET_MESH_TunnelDisconnectHandler
+                                      disconnect_handler, void *handler_cls);
 
 
 /**
@@ -256,23 +242,15 @@ struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_any (struct
  * @param handler_cls closure for handler
  * @return NULL on error (handler will not be called), otherwise handle for cancellation
  */
-struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_all (struct
-                                                                 GNUNET_MESH_Handle
-                                                                 *h,
-                                                                 struct
-                                                                 GNUNET_TIME_Relative
-                                                                 timeout,
-                                                                 unsigned int
-                                                                 num_peers,
-                                                                 const struct
-                                                                 GNUNET_PeerIdentity
-                                                                 *peers,
-                                                                 GNUNET_MESH_TunnelConnectHandler
-                                                                 connect_handler,
-                                                                 GNUNET_MESH_TunnelDisconnectHandler
-                                                                 disconnect_handler,
-                                                                 void
-                                                                 *handler_cls);
+struct GNUNET_MESH_Tunnel *
+GNUNET_MESH_peer_request_connect_all (struct GNUNET_MESH_Handle *h,
+                                      struct GNUNET_TIME_Relative timeout,
+                                      unsigned int num_peers,
+                                      const struct GNUNET_PeerIdentity *peers,
+                                      GNUNET_MESH_TunnelConnectHandler
+                                      connect_handler,
+                                      GNUNET_MESH_TunnelDisconnectHandler
+                                      disconnect_handler, void *handler_cls);
 
 
 /**
@@ -283,10 +261,10 @@ 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);
 
 
 /**
@@ -296,9 +274,9 @@ void 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);
 
 
 /**
@@ -318,20 +296,15 @@ void GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
  * @param handler_cls closure for handler
  * @return NULL on error (handler will not be called), otherwise handle for cancellation
  */
-struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_by_type (struct
-                                                                     GNUNET_MESH_Handle
-                                                                     *h,
-                                                                     struct
-                                                                     GNUNET_TIME_Relative
-                                                                     timeout,
-                                                                     GNUNET_MESH_ApplicationType
-                                                                     app_type,
-                                                                     GNUNET_MESH_TunnelConnectHandler
-                                                                     connect_handler,
-                                                                     GNUNET_MESH_TunnelDisconnectHandler
-                                                                     disconnect_handler,
-                                                                     void
-                                                                     *handler_cls);
+struct GNUNET_MESH_Tunnel *
+GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Handle *h,
+                                          struct GNUNET_TIME_Relative timeout,
+                                          GNUNET_MESH_ApplicationType app_type,
+                                          GNUNET_MESH_TunnelConnectHandler
+                                          connect_handler,
+                                          GNUNET_MESH_TunnelDisconnectHandler
+                                          disconnect_handler,
+                                          void *handler_cls);
 
 
 /**
@@ -340,7 +313,8 @@ struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_by_type (struct
  *
  * @param req request handle that was returned for the original request
  */
-void GNUNET_MESH_peer_request_connect_cancel (struct GNUNET_MESH_Tunnel *req);
+void
+GNUNET_MESH_peer_request_connect_cancel (struct GNUNET_MESH_Tunnel *req);
 
 
 /**
@@ -370,25 +344,14 @@ struct GNUNET_MESH_TransmitHandle;
  *         NULL if we can not even queue the request (insufficient
  *         memory); if NULL is returned, "notify" will NOT be called.
  */
-struct GNUNET_MESH_TransmitHandle *GNUNET_MESH_notify_transmit_ready (struct
-                                                                      GNUNET_MESH_Tunnel
-                                                                      *tunnel,
-                                                                      int cork,
-                                                                      uint32_t
-                                                                      priority,
-                                                                      struct
-                                                                      GNUNET_TIME_Relative
-                                                                      maxdelay,
-                                                                      const
-                                                                      struct
-                                                                      GNUNET_PeerIdentity
-                                                                      *target,
-                                                                      size_t
-                                                                      notify_size,
-                                                                      GNUNET_CONNECTION_TransmitReadyNotify
-                                                                      notify,
-                                                                      void
-                                                                      *notify_cls);
+struct GNUNET_MESH_TransmitHandle *
+GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork,
+                                   uint32_t priority,
+                                   struct GNUNET_TIME_Relative maxdelay,
+                                   const struct GNUNET_PeerIdentity *target,
+                                   size_t notify_size,
+                                   GNUNET_CONNECTION_TransmitReadyNotify notify,
+                                   void *notify_cls);
 
 
 /**
@@ -396,19 +359,23 @@ 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_tunnel_set_head (struct GNUNET_MESH_Tunnel *tunnel,
-                                  void *head);
-void GNUNET_MESH_tunnel_set_tail (struct GNUNET_MESH_Tunnel *tunnel,
-                                  void *tail);
-void *GNUNET_MESH_tunnel_get_head (struct GNUNET_MESH_Tunnel *tunnel);
-void *GNUNET_MESH_tunnel_get_tail (struct GNUNET_MESH_Tunnel *tunnel);
-
-void GNUNET_MESH_tunnel_set_data (struct GNUNET_MESH_Tunnel *tunnel,
-                                  void *data);
-void *GNUNET_MESH_tunnel_get_data (struct GNUNET_MESH_Tunnel *tunnel);
+void
+GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle
+                                          *th);
+
+void
+GNUNET_MESH_tunnel_set_head (struct GNUNET_MESH_Tunnel *tunnel, void *head);
+void
+GNUNET_MESH_tunnel_set_tail (struct GNUNET_MESH_Tunnel *tunnel, void *tail);
+void *
+GNUNET_MESH_tunnel_get_head (struct GNUNET_MESH_Tunnel *tunnel);
+void *
+GNUNET_MESH_tunnel_get_tail (struct GNUNET_MESH_Tunnel *tunnel);
+
+void
+GNUNET_MESH_tunnel_set_data (struct GNUNET_MESH_Tunnel *tunnel, void *data);
+void *
+GNUNET_MESH_tunnel_get_data (struct GNUNET_MESH_Tunnel *tunnel);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
index 89b1c881ee5b01f7642bcd5dd5df964af9d8fe0d..83addfce5ab0907f71b5a729f2c8b7efc6b0bc78 100644 (file)
@@ -140,17 +140,11 @@ typedef uint32_t GNUNET_MESH_ApplicationType;
  * @return handle to the mesh service NULL on error
  *         (in this case, init is never called)
  */
-struct GNUNET_MESH_Handle *GNUNET_MESH_connect (const struct
-                                                GNUNET_CONFIGURATION_Handle
-                                                *cfg, void *cls,
-                                                GNUNET_MESH_TunnelEndHandler
-                                                cleaner,
-                                                const struct
-                                                GNUNET_MESH_MessageHandler
-                                                *handlers,
-                                                const
-                                                GNUNET_MESH_ApplicationType
-                                                *stypes);
+struct GNUNET_MESH_Handle *
+GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls,
+                     GNUNET_MESH_TunnelEndHandler cleaner,
+                     const struct GNUNET_MESH_MessageHandler *handlers,
+                     const GNUNET_MESH_ApplicationType *stypes);
 
 
 /**
@@ -158,7 +152,8 @@ struct GNUNET_MESH_Handle *GNUNET_MESH_connect (const struct
  *
  * @param handle connection to mesh to disconnect
  */
-void GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
+void
+GNUNET_MESH_disconnect (struct GNUNET_MESH_Handle *handle);
 
 
 /**
@@ -198,20 +193,19 @@ typedef void (*GNUNET_MESH_TunnelConnectHandler) (void *cls,
  * @param disconnect_handler function to call when peers are disconnected
  * @param handler_cls closure for connect/disconnect handlers
  */
-struct GNUNET_MESH_Tunnel *GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle
-                                                      *h,
-                                                      GNUNET_MESH_TunnelConnectHandler
-                                                      connect_handler,
-                                                      GNUNET_MESH_TunnelDisconnectHandler
-                                                      disconnect_handler,
-                                                      void *handler_cls);
+struct GNUNET_MESH_Tunnel *
+GNUNET_MESH_tunnel_create (struct GNUNET_MESH_Handle *h,
+                           GNUNET_MESH_TunnelConnectHandler connect_handler,
+                           GNUNET_MESH_TunnelDisconnectHandler
+                           disconnect_handler, void *handler_cls);
 
 /**
  * Destroy an existing tunnel.
  *
  * @param tun tunnel handle
  */
-void GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun);
+void
+GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun);
 
 
 /**
@@ -222,10 +216,10 @@ 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);
 
 
 /**
@@ -235,9 +229,9 @@ void 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);
 
 
 /**
@@ -249,12 +243,10 @@ void 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);
 
 
 /**
@@ -283,25 +275,14 @@ struct GNUNET_MESH_TransmitHandle;
  *         NULL if we can not even queue the request (insufficient
  *         memory); if NULL is returned, "notify" will NOT be called.
  */
-struct GNUNET_MESH_TransmitHandle *GNUNET_MESH_notify_transmit_ready (struct
-                                                                      GNUNET_MESH_Tunnel
-                                                                      *tunnel,
-                                                                      int cork,
-                                                                      uint32_t
-                                                                      priority,
-                                                                      struct
-                                                                      GNUNET_TIME_Relative
-                                                                      maxdelay,
-                                                                      const
-                                                                      struct
-                                                                      GNUNET_PeerIdentity
-                                                                      *target,
-                                                                      size_t
-                                                                      notify_size,
-                                                                      GNUNET_CONNECTION_TransmitReadyNotify
-                                                                      notify,
-                                                                      void
-                                                                      *notify_cls);
+struct GNUNET_MESH_TransmitHandle *
+GNUNET_MESH_notify_transmit_ready (struct GNUNET_MESH_Tunnel *tunnel, int cork,
+                                   uint32_t priority,
+                                   struct GNUNET_TIME_Relative maxdelay,
+                                   const struct GNUNET_PeerIdentity *target,
+                                   size_t notify_size,
+                                   GNUNET_CONNECTION_TransmitReadyNotify notify,
+                                   void *notify_cls);
 
 
 /**
@@ -309,8 +290,9 @@ 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 */
index 30eb50dd81fe0b8699a801227f2f623fe14f8a66..c521a560cd4f9c08ef2d44c31c6014b4f055ba17 100644 (file)
@@ -86,17 +86,13 @@ struct GNUNET_NAT_Handle;
  * @param callback_cls closure for callback
  * @return NULL on error, otherwise handle that can be used to unregister 
  */
-struct GNUNET_NAT_Handle *GNUNET_NAT_register (const struct
-                                               GNUNET_CONFIGURATION_Handle *cfg,
-                                               int is_tcp, uint16_t adv_port,
-                                               unsigned int num_addrs,
-                                               const struct sockaddr **addrs,
-                                               const socklen_t * addrlens,
-                                               GNUNET_NAT_AddressCallback
-                                               address_callback,
-                                               GNUNET_NAT_ReversalCallback
-                                               reversal_callback,
-                                               void *callback_cls);
+struct GNUNET_NAT_Handle *
+GNUNET_NAT_register (const struct GNUNET_CONFIGURATION_Handle *cfg, int is_tcp,
+                     uint16_t adv_port, unsigned int num_addrs,
+                     const struct sockaddr **addrs, const socklen_t * addrlens,
+                     GNUNET_NAT_AddressCallback address_callback,
+                     GNUNET_NAT_ReversalCallback reversal_callback,
+                     void *callback_cls);
 
 
 /**
@@ -109,8 +105,9 @@ 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);
 
 
 /**
@@ -121,8 +118,9 @@ int GNUNET_NAT_test_address (struct GNUNET_NAT_Handle *h, const void *addr,
  * @param h handle (used for configuration)
  * @param sa the address of the peer (IPv4-only)
  */
-void GNUNET_NAT_run_client (struct GNUNET_NAT_Handle *h,
-                            const struct sockaddr_in *sa);
+void
+GNUNET_NAT_run_client (struct GNUNET_NAT_Handle *h,
+                       const struct sockaddr_in *sa);
 
 
 
@@ -132,7 +130,8 @@ void GNUNET_NAT_run_client (struct GNUNET_NAT_Handle *h,
  *
  * @param h the handle to stop
  */
-void GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *h);
+void
+GNUNET_NAT_unregister (struct GNUNET_NAT_Handle *h);
 
 
 /**
@@ -163,12 +162,10 @@ typedef void (*GNUNET_NAT_TestCallback) (void *cls, int success);
  * @param report_cls closure for report
  * @return handle to cancel NAT test
  */
-struct GNUNET_NAT_Test *GNUNET_NAT_test_start (const struct
-                                               GNUNET_CONFIGURATION_Handle *cfg,
-                                               int is_tcp, uint16_t bnd_port,
-                                               uint16_t adv_port,
-                                               GNUNET_NAT_TestCallback report,
-                                               void *report_cls);
+struct GNUNET_NAT_Test *
+GNUNET_NAT_test_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                       int is_tcp, uint16_t bnd_port, uint16_t adv_port,
+                       GNUNET_NAT_TestCallback report, void *report_cls);
 
 
 /**
@@ -176,7 +173,8 @@ struct GNUNET_NAT_Test *GNUNET_NAT_test_start (const struct
  *
  * @param tst test to stop.
  */
-void GNUNET_NAT_test_stop (struct GNUNET_NAT_Test *tst);
+void
+GNUNET_NAT_test_stop (struct GNUNET_NAT_Test *tst);
 
 
 /**
@@ -203,13 +201,9 @@ struct GNUNET_NAT_ExternalHandle;
  * @param cb_cls closure for 'cb'
  * @return handle for cancellation (can only be used until 'cb' is called), NULL on error
  */
-struct GNUNET_NAT_ExternalHandle *GNUNET_NAT_mini_get_external_ipv4 (struct
-                                                                     GNUNET_TIME_Relative
-                                                                     timeout,
-                                                                     GNUNET_NAT_IPCallback
-                                                                     cb,
-                                                                     void
-                                                                     *cb_cls);
+struct GNUNET_NAT_ExternalHandle *
+GNUNET_NAT_mini_get_external_ipv4 (struct GNUNET_TIME_Relative timeout,
+                                   GNUNET_NAT_IPCallback cb, void *cb_cls);
 
 
 /**
@@ -217,8 +211,8 @@ 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);
 
 
 /**
@@ -240,10 +234,9 @@ struct GNUNET_NAT_MiniHandle;
  * @param ac_cls closure for 'ac'
  * @return NULL on error
  */
-struct GNUNET_NAT_MiniHandle *GNUNET_NAT_mini_map_start (uint16_t port,
-                                                         int is_tcp,
-                                                         GNUNET_NAT_AddressCallback
-                                                         ac, void *ac_cls);
+struct GNUNET_NAT_MiniHandle *
+GNUNET_NAT_mini_map_start (uint16_t port, int is_tcp,
+                           GNUNET_NAT_AddressCallback ac, void *ac_cls);
 
 
 /**
@@ -254,7 +247,8 @@ struct GNUNET_NAT_MiniHandle *GNUNET_NAT_mini_map_start (uint16_t port,
  * 
  * @param mini the handle
  */
-void GNUNET_NAT_mini_map_stop (struct GNUNET_NAT_MiniHandle *mini);
+void
+GNUNET_NAT_mini_map_stop (struct GNUNET_NAT_MiniHandle *mini);
 
 
 #endif
index 0f38b855f179169ad95e787df4824a63d1c544a8..65b2042d54bcb76cca10d3cf10851d8ced63704f 100644 (file)
@@ -83,13 +83,10 @@ struct GNUNET_NETWORK_FDSet
  * @param address_len length of address
  * @return client socket
  */
-struct GNUNET_NETWORK_Handle *GNUNET_NETWORK_socket_accept (const struct
-                                                            GNUNET_NETWORK_Handle
-                                                            *desc,
-                                                            struct sockaddr
-                                                            *address,
-                                                            socklen_t *
-                                                            address_len);
+struct GNUNET_NETWORK_Handle *
+GNUNET_NETWORK_socket_accept (const struct GNUNET_NETWORK_Handle *desc,
+                              struct sockaddr *address,
+                              socklen_t * address_len);
 
 
 /**
@@ -98,7 +95,8 @@ struct GNUNET_NETWORK_Handle *GNUNET_NETWORK_socket_accept (const struct
  * @param fd socket to box
  * @return NULL on error (including not supported on target platform)
  */
-struct GNUNET_NETWORK_Handle *GNUNET_NETWORK_socket_box_native (int fd);
+struct GNUNET_NETWORK_Handle *
+GNUNET_NETWORK_socket_box_native (int fd);
 
 
 /**
@@ -109,9 +107,10 @@ struct GNUNET_NETWORK_Handle *GNUNET_NETWORK_socket_box_native (int fd);
  * @param address_len length of address
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc,
-                                const struct sockaddr *address,
-                                socklen_t address_len);
+int
+GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc,
+                            const struct sockaddr *address,
+                            socklen_t address_len);
 
 /**
  * Close a socket.
@@ -119,7 +118,8 @@ int GNUNET_NETWORK_socket_bind (struct GNUNET_NETWORK_Handle *desc,
  * @param desc socket to close
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc);
+int
+GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc);
 
 
 /**
@@ -130,9 +130,10 @@ int GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc);
  * @param address_len of address
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc,
-                                   const struct sockaddr *address,
-                                   socklen_t address_len);
+int
+GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc,
+                               const struct sockaddr *address,
+                               socklen_t address_len);
 
 
 /**
@@ -145,9 +146,10 @@ 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);
 
 
 /**
@@ -157,16 +159,18 @@ int GNUNET_NETWORK_socket_getsockopt (const struct GNUNET_NETWORK_Handle *desc,
  * @param backlog length of the listen queue
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_NETWORK_socket_listen (const struct GNUNET_NETWORK_Handle *desc,
-                                  int backlog);
+int
+GNUNET_NETWORK_socket_listen (const struct GNUNET_NETWORK_Handle *desc,
+                              int backlog);
 
 
 /**
  * How much data is available to be read on this descriptor?
  * @param desc socket
  */
-ssize_t GNUNET_NETWORK_socket_recvfrom_amount (const struct
-                                               GNUNET_NETWORK_Handle *desc);
+ssize_t
+GNUNET_NETWORK_socket_recvfrom_amount (const struct GNUNET_NETWORK_Handle
+                                       *desc);
 
 
 /**
@@ -178,12 +182,10 @@ ssize_t GNUNET_NETWORK_socket_recvfrom_amount (const struct
  *        to be filled in by recvfrom
  * @param addrlen length of the addr
  */
-ssize_t               GNUNET_NETWORK_socket_recvfrom (const struct
-                                                      GNUNET_NETWORK_Handle
-                                                      *desc, void *buffer,
-                                                      size_t length,
-                                                      struct sockaddr *src_addr,
-                                                      socklen_t * addrlen);
+ssize_t
+GNUNET_NETWORK_socket_recvfrom (const struct GNUNET_NETWORK_Handle *desc,
+                                void *buffer, size_t length,
+                                struct sockaddr *src_addr, socklen_t * addrlen);
 
 
 /**
@@ -194,8 +196,9 @@ ssize_t               GNUNET_NETWORK_socket_recvfrom (const struct
  * @param length length of buffer
  * @return number of bytes read
  */
-ssize_t GNUNET_NETWORK_socket_recv (const struct GNUNET_NETWORK_Handle *desc,
-                                    void *buffer, size_t length);
+ssize_t
+GNUNET_NETWORK_socket_recv (const struct GNUNET_NETWORK_Handle *desc,
+                            void *buffer, size_t length);
 
 
 /**
@@ -206,10 +209,11 @@ ssize_t GNUNET_NETWORK_socket_recv (const struct GNUNET_NETWORK_Handle *desc,
  * @param timeout relative value when to return
  * @return number of selected sockets, GNUNET_SYSERR on error
  */
-int GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds,
-                                  struct GNUNET_NETWORK_FDSet *wfds,
-                                  struct GNUNET_NETWORK_FDSet *efds,
-                                  struct GNUNET_TIME_Relative timeout);
+int
+GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds,
+                              struct GNUNET_NETWORK_FDSet *wfds,
+                              struct GNUNET_NETWORK_FDSet *efds,
+                              struct GNUNET_TIME_Relative timeout);
 
 
 /**
@@ -220,8 +224,9 @@ int GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds,
  * @param length size of the buffer
  * @return number of bytes sent, GNUNET_SYSERR on error
  */
-ssize_t GNUNET_NETWORK_socket_send (const struct GNUNET_NETWORK_Handle *desc,
-                                    const void *buffer, size_t length);
+ssize_t
+GNUNET_NETWORK_socket_send (const struct GNUNET_NETWORK_Handle *desc,
+                            const void *buffer, size_t length);
 
 
 /**
@@ -235,10 +240,11 @@ 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,
-                                      const struct sockaddr *dest_addr,
-                                      socklen_t dest_len);
+ssize_t
+GNUNET_NETWORK_socket_sendto (const struct GNUNET_NETWORK_Handle *desc,
+                              const void *message, size_t length,
+                              const struct sockaddr *dest_addr,
+                              socklen_t dest_len);
 
 
 /**
@@ -251,10 +257,10 @@ ssize_t GNUNET_NETWORK_socket_sendto (const struct GNUNET_NETWORK_Handle *desc,
  * @param option_len size of option_value
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_NETWORK_socket_setsockopt (struct GNUNET_NETWORK_Handle *fd,
-                                      int level, int option_name,
-                                      const void *option_value,
-                                      socklen_t option_len);
+int
+GNUNET_NETWORK_socket_setsockopt (struct GNUNET_NETWORK_Handle *fd, int level,
+                                  int option_name, const void *option_value,
+                                  socklen_t option_len);
 
 
 /**
@@ -264,8 +270,8 @@ int GNUNET_NETWORK_socket_setsockopt (struct GNUNET_NETWORK_Handle *fd,
  * @param how type of shutdown
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc,
-                                    int how);
+int
+GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc, int how);
 
 
 /**
@@ -277,7 +283,8 @@ int GNUNET_NETWORK_socket_shutdown (struct GNUNET_NETWORK_Handle *desc,
  * @param desc socket
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc);
+int
+GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc);
 
 
 /**
@@ -290,9 +297,8 @@ int GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc);
  * @param protocol network protocol
  * @return new socket, NULL on error
  */
-struct GNUNET_NETWORK_Handle *GNUNET_NETWORK_socket_create (int domain,
-                                                            int type,
-                                                            int protocol);
+struct GNUNET_NETWORK_Handle *
+GNUNET_NETWORK_socket_create (int domain, int type, int protocol);
 
 
 /**
@@ -300,7 +306,8 @@ struct GNUNET_NETWORK_Handle *GNUNET_NETWORK_socket_create (int domain,
  *
  * @param fds fd set to clear
  */
-void GNUNET_NETWORK_fdset_zero (struct GNUNET_NETWORK_FDSet *fds);
+void
+GNUNET_NETWORK_fdset_zero (struct GNUNET_NETWORK_FDSet *fds);
 
 
 /**
@@ -308,8 +315,9 @@ void GNUNET_NETWORK_fdset_zero (struct GNUNET_NETWORK_FDSet *fds);
  * @param fds fd set
  * @param desc socket to add
  */
-void GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds,
-                               const struct GNUNET_NETWORK_Handle *desc);
+void
+GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds,
+                          const struct GNUNET_NETWORK_Handle *desc);
 
 
 #ifdef __MINGW32__
@@ -319,9 +327,9 @@ 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
 
 
@@ -331,8 +339,9 @@ void GNUNET_NETWORK_fdset_handle_set_native_w32_handle (struct
  * @param desc socket
  * @return GNUNET_YES if the socket is in the set
  */
-int GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds,
-                                const struct GNUNET_NETWORK_Handle *desc);
+int
+GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds,
+                            const struct GNUNET_NETWORK_Handle *desc);
 
 
 /**
@@ -340,8 +349,9 @@ int GNUNET_NETWORK_fdset_isset (const struct GNUNET_NETWORK_FDSet *fds,
  * @param dst the fd set to add to
  * @param src the fd set to add from
  */
-void GNUNET_NETWORK_fdset_add (struct GNUNET_NETWORK_FDSet *dst,
-                               const struct GNUNET_NETWORK_FDSet *src);
+void
+GNUNET_NETWORK_fdset_add (struct GNUNET_NETWORK_FDSet *dst,
+                          const struct GNUNET_NETWORK_FDSet *src);
 
 
 /**
@@ -349,8 +359,9 @@ void GNUNET_NETWORK_fdset_add (struct GNUNET_NETWORK_FDSet *dst,
  * @param to destination
  * @param from source
  */
-void GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to,
-                                const struct GNUNET_NETWORK_FDSet *from);
+void
+GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to,
+                           const struct GNUNET_NETWORK_FDSet *from);
 
 
 /**
@@ -359,7 +370,8 @@ void GNUNET_NETWORK_fdset_copy (struct GNUNET_NETWORK_FDSet *to,
  * @param desc wrapper to process
  * @return POSIX file descriptor
  */
-int GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc);
+int
+GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc);
 
 
 /**
@@ -368,8 +380,9 @@ int GNUNET_NETWORK_get_fd (struct GNUNET_NETWORK_Handle *desc);
  * @param from native source set
  * @param nfds the biggest socket number in from + 1
  */
-void GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to,
-                                       const fd_set * from, int nfds);
+void
+GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to,
+                                  const fd_set * from, int nfds);
 
 
 /**
@@ -378,7 +391,8 @@ void GNUNET_NETWORK_fdset_copy_native (struct GNUNET_NETWORK_FDSet *to,
  * @param to destination
  * @param nfd native FD to set
  */
-void GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to, int nfd);
+void
+GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to, int nfd);
 
 
 /**
@@ -388,8 +402,9 @@ 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);
 
 
 /**
@@ -397,8 +412,9 @@ int GNUNET_NETWORK_fdset_test_native (const struct GNUNET_NETWORK_FDSet *to,
  * @param fds fd set
  * @param h the file handle to add
  */
-void GNUNET_NETWORK_fdset_handle_set (struct GNUNET_NETWORK_FDSet *fds,
-                                      const struct GNUNET_DISK_FileHandle *h);
+void
+GNUNET_NETWORK_fdset_handle_set (struct GNUNET_NETWORK_FDSet *fds,
+                                 const struct GNUNET_DISK_FileHandle *h);
 
 
 /**
@@ -407,8 +423,9 @@ void GNUNET_NETWORK_fdset_handle_set (struct GNUNET_NETWORK_FDSet *fds,
  * @param h file handle
  * @return GNUNET_YES if the file handle is part of the set
  */
-int GNUNET_NETWORK_fdset_handle_isset (const struct GNUNET_NETWORK_FDSet *fds,
-                                       const struct GNUNET_DISK_FileHandle *h);
+int
+GNUNET_NETWORK_fdset_handle_isset (const struct GNUNET_NETWORK_FDSet *fds,
+                                   const struct GNUNET_DISK_FileHandle *h);
 
 
 /**
@@ -417,22 +434,25 @@ int GNUNET_NETWORK_fdset_handle_isset (const struct GNUNET_NETWORK_FDSet *fds,
  * @param fds2 second fd set
  * @return GNUNET_YES if they do overlap, GNUNET_NO otherwise
  */
-int GNUNET_NETWORK_fdset_overlap (const struct GNUNET_NETWORK_FDSet *fds1,
-                                  const struct GNUNET_NETWORK_FDSet *fds2);
+int
+GNUNET_NETWORK_fdset_overlap (const struct GNUNET_NETWORK_FDSet *fds1,
+                              const struct GNUNET_NETWORK_FDSet *fds2);
 
 
 /**
  * Creates an fd set
  * @return a new fd set
  */
-struct GNUNET_NETWORK_FDSet *GNUNET_NETWORK_fdset_create (void);
+struct GNUNET_NETWORK_FDSet *
+GNUNET_NETWORK_fdset_create (void);
 
 
 /**
  * Releases the associated memory of an fd set
  * @param fds fd set
  */
-void GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds);
+void
+GNUNET_NETWORK_fdset_destroy (struct GNUNET_NETWORK_FDSet *fds);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 91711ef5be9fb0f33e0a308f6c92cc6cd271e47f..451f2a2dcfbec35096ccef9a2fc72852e712a721 100644 (file)
@@ -84,10 +84,9 @@ typedef void (*GNUNET_NSE_Callback) (void *cls,
  *
  * @return handle to use
  */
-struct GNUNET_NSE_Handle *GNUNET_NSE_connect (const struct
-                                              GNUNET_CONFIGURATION_Handle *cfg,
-                                              GNUNET_NSE_Callback func,
-                                              void *func_cls);
+struct GNUNET_NSE_Handle *
+GNUNET_NSE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                    GNUNET_NSE_Callback func, void *func_cls);
 
 
 /**
@@ -96,7 +95,8 @@ struct GNUNET_NSE_Handle *GNUNET_NSE_connect (const struct
  * @param h handle to destroy
  *
  */
-void GNUNET_NSE_disconnect (struct GNUNET_NSE_Handle *h);
+void
+GNUNET_NSE_disconnect (struct GNUNET_NSE_Handle *h);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index d2474d2d8aa5d8d62783b7a98dcd7d8dadcf907c..9d611af9b95e59b4d341054a053fdd5bad5f5453 100644 (file)
@@ -135,8 +135,8 @@ enum GNUNET_OS_ProcessStatusType
  * @param dirkind what kind of directory is desired?
  * @return a pointer to the dir path (to be freed by the caller)
  */
-char *GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind
-                                       dirkind);
+char *
+GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind);
 
 
 /**
@@ -160,8 +160,9 @@ typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls, const char *name,
  * @param proc the callback function
  * @param proc_cls closure for proc
  */
-void GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor
-                                        proc, void *proc_cls);
+void
+GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
+                                   void *proc_cls);
 
 /**
  * @brief Get maximum string length returned by gethostname()
@@ -183,7 +184,8 @@ void GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor
  *
  * @return pointer to the process sturcutre for this process
  */
-struct GNUNET_OS_Process *GNUNET_OS_process_current (void);
+struct GNUNET_OS_Process *
+GNUNET_OS_process_current (void);
 
 
 /**
@@ -193,7 +195,8 @@ struct GNUNET_OS_Process *GNUNET_OS_process_current (void);
  * @param sig signal
  * @return 0 on success, -1 on error
  */
-int GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc, int sig);
+int
+GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc, int sig);
 
 
 /**
@@ -201,7 +204,8 @@ int GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc, int sig);
  *
  * @param proc pointer to process structure
  */
-void GNUNET_OS_process_close (struct GNUNET_OS_Process *proc);
+void
+GNUNET_OS_process_close (struct GNUNET_OS_Process *proc);
 
 /**
  * Get the pid of the process in question
@@ -210,7 +214,8 @@ void GNUNET_OS_process_close (struct GNUNET_OS_Process *proc);
  *
  * @return the current process id
  */
-pid_t GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc);
+pid_t
+GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc);
 
 /**
  * Set process priority
@@ -219,8 +224,9 @@ pid_t GNUNET_OS_process_get_pid (struct GNUNET_OS_Process *proc);
  * @param prio priority value
  * @return GNUNET_OK on success, GNUNET_SYSERR on error
  */
-int GNUNET_OS_set_process_priority (struct GNUNET_OS_Process *proc,
-                                    enum GNUNET_SCHEDULER_Priority prio);
+int
+GNUNET_OS_set_process_priority (struct GNUNET_OS_Process *proc,
+                                enum GNUNET_SCHEDULER_Priority prio);
 
 
 /**
@@ -232,11 +238,10 @@ int GNUNET_OS_set_process_priority (struct GNUNET_OS_Process *proc,
  * @param ... NULL-terminated list of arguments to the process
  * @return pointer to process structure of the new process, NULL on error
  */
-struct GNUNET_OS_Process *GNUNET_OS_start_process (struct GNUNET_DISK_PipeHandle
-                                                   *pipe_stdin,
-                                                   struct GNUNET_DISK_PipeHandle
-                                                   *pipe_stdout,
-                                                   const char *filename, ...);
+struct GNUNET_OS_Process *
+GNUNET_OS_start_process (struct GNUNET_DISK_PipeHandle *pipe_stdin,
+                         struct GNUNET_DISK_PipeHandle *pipe_stdout,
+                         const char *filename, ...);
 
 
 /**
@@ -248,14 +253,10 @@ struct GNUNET_OS_Process *GNUNET_OS_start_process (struct GNUNET_DISK_PipeHandle
  * @param va NULL-terminated list of arguments to the process
  * @return pointer to process structure of the new process, NULL on error
  */
-struct GNUNET_OS_Process *GNUNET_OS_start_process_va (struct
-                                                      GNUNET_DISK_PipeHandle
-                                                      *pipe_stdin,
-                                                      struct
-                                                      GNUNET_DISK_PipeHandle
-                                                      *pipe_stdout,
-                                                      const char *filename,
-                                                      va_list va);
+struct GNUNET_OS_Process *
+GNUNET_OS_start_process_va (struct GNUNET_DISK_PipeHandle *pipe_stdin,
+                            struct GNUNET_DISK_PipeHandle *pipe_stdout,
+                            const char *filename, va_list va);
 
 /**
  * Start a process.
@@ -267,9 +268,9 @@ struct GNUNET_OS_Process *GNUNET_OS_start_process_va (struct
  *             including the process name as the first argument
  * @return pointer to process structure of the new process, NULL on error
  */
-struct GNUNET_OS_Process *GNUNET_OS_start_process_v (const int *lsocks,
-                                                     const char *filename,
-                                                     char *const argv[]);
+struct GNUNET_OS_Process *
+GNUNET_OS_start_process_v (const int *lsocks, const char *filename,
+                           char *const argv[]);
 
 
 /**
@@ -290,7 +291,8 @@ typedef void (*GNUNET_OS_LineProcessor) (void *cls, const char *line);
  *
  * @param cmd handle to the process
  */
-void GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd);
+void
+GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd);
 
 
 /**
@@ -304,12 +306,10 @@ void GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd);
  * @param ... arguments to command
  * @return NULL on error
  */
-struct GNUNET_OS_CommandHandle *GNUNET_OS_command_run (GNUNET_OS_LineProcessor
-                                                       proc, void *proc_cls,
-                                                       struct
-                                                       GNUNET_TIME_Relative
-                                                       timeout,
-                                                       const char *binary, ...);
+struct GNUNET_OS_CommandHandle *
+GNUNET_OS_command_run (GNUNET_OS_LineProcessor proc, void *proc_cls,
+                       struct GNUNET_TIME_Relative timeout, const char *binary,
+                       ...);
 
 
 /**
@@ -320,9 +320,10 @@ struct GNUNET_OS_CommandHandle *GNUNET_OS_command_run (GNUNET_OS_LineProcessor
  * @param code return code/signal number
  * @return GNUNET_OK on success, GNUNET_NO if the process is still running, GNUNET_SYSERR otherwise
  */
-int GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
-                              enum GNUNET_OS_ProcessStatusType *type,
-                              unsigned long *code);
+int
+GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
+                          enum GNUNET_OS_ProcessStatusType *type,
+                          unsigned long *code);
 
 
 /**
@@ -335,16 +336,17 @@ int GNUNET_OS_process_status (struct GNUNET_OS_Process *proc,
  * @param proc pointer to process structure of the process to wait for
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc);
+int
+GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc);
 
 
 /**
  * Connects this process to its parent via pipe
  */
-void GNUNET_OS_install_parent_control_handler (void *cls,
-                                               const struct
-                                               GNUNET_SCHEDULER_TaskContext
-                                               *tc);
+void
+GNUNET_OS_install_parent_control_handler (void *cls,
+                                          const struct
+                                          GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -358,7 +360,8 @@ void GNUNET_OS_install_parent_control_handler (void *cls,
  *         GNUNET_NO if not SUID (but binary exists)
  *         GNUNET_SYSERR on error (no such binary or not executable)
  */
-int GNUNET_OS_check_helper_binary (const char *binary);
+int
+GNUNET_OS_check_helper_binary (const char *binary);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index da364dd449d552390730d6161bc552d8229ca998..89413aa598915f88ebdce7dd32f3dec0e86e817e 100644 (file)
@@ -53,7 +53,8 @@ typedef unsigned int GNUNET_PEER_Id;
  * @param pid identity to find
  * @return the interned identity or 0.
  */
-GNUNET_PEER_Id GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid);
+GNUNET_PEER_Id
+GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid);
 
 
 /**
@@ -63,7 +64,8 @@ GNUNET_PEER_Id GNUNET_PEER_search (const struct GNUNET_PeerIdentity *pid);
  * @param pid identity to intern
  * @return the interned identity.
  */
-GNUNET_PEER_Id GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid);
+GNUNET_PEER_Id
+GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid);
 
 
 /**
@@ -72,7 +74,8 @@ GNUNET_PEER_Id GNUNET_PEER_intern (const struct GNUNET_PeerIdentity *pid);
  * @param id identity to change the RC of
  * @param delta how much to change the RC
  */
-void GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta);
+void
+GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta);
 
 
 /**
@@ -81,7 +84,8 @@ void GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta);
  * @param ids array of PIDs to decrement the RCs of
  * @param count size of the ids array
  */
-void GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count);
+void
+GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count);
 
 
 /**
@@ -90,7 +94,8 @@ void GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count);
  * @param id interned PID to convert
  * @param pid where to write the normal peer identity
  */
-void GNUNET_PEER_resolve (GNUNET_PEER_Id id, struct GNUNET_PeerIdentity *pid);
+void
+GNUNET_PEER_resolve (GNUNET_PEER_Id id, struct GNUNET_PeerIdentity *pid);
 
 
 /* ifndef GNUNET_PEER_LIB_H */
index 2013eb60f10eafd69fc8cf3f5f271c736096767d..50bbc458ab133c42e67c0fd485722db4b46285a7 100644 (file)
@@ -54,9 +54,8 @@ struct GNUNET_PEERINFO_Handle;
  * @return NULL on error (configuration related, actual connection
  *         etablishment may happen asynchronously).
  */
-struct GNUNET_PEERINFO_Handle *GNUNET_PEERINFO_connect (const struct
-                                                        GNUNET_CONFIGURATION_Handle
-                                                        *cfg);
+struct GNUNET_PEERINFO_Handle *
+GNUNET_PEERINFO_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 
@@ -69,7 +68,8 @@ struct GNUNET_PEERINFO_Handle *GNUNET_PEERINFO_connect (const struct
  *
  * @param h handle to disconnect
  */
-void GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h);
+void
+GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h);
 
 
 /**
@@ -83,8 +83,9 @@ 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);
 
 
 /**
@@ -126,19 +127,12 @@ struct GNUNET_PEERINFO_IteratorContext;
  * @return NULL on error (in this case, 'callback' is never called!), 
  *         otherwise an iterator context
  */
-struct GNUNET_PEERINFO_IteratorContext *GNUNET_PEERINFO_iterate (struct
-                                                                 GNUNET_PEERINFO_Handle
-                                                                 *h,
-                                                                 const struct
-                                                                 GNUNET_PeerIdentity
-                                                                 *peer,
-                                                                 struct
-                                                                 GNUNET_TIME_Relative
-                                                                 timeout,
-                                                                 GNUNET_PEERINFO_Processor
-                                                                 callback,
-                                                                 void
-                                                                 *callback_cls);
+struct GNUNET_PEERINFO_IteratorContext *
+GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h,
+                         const struct GNUNET_PeerIdentity *peer,
+                         struct GNUNET_TIME_Relative timeout,
+                         GNUNET_PEERINFO_Processor callback,
+                         void *callback_cls);
 
 
 
@@ -147,8 +141,8 @@ 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);
 
 
 
@@ -170,13 +164,9 @@ struct GNUNET_PEERINFO_NotifyContext;
  * @param callback_cls closure for callback
  * @return NULL on error
  */
-struct GNUNET_PEERINFO_NotifyContext *GNUNET_PEERINFO_notify (const struct
-                                                              GNUNET_CONFIGURATION_Handle
-                                                              *cfg,
-                                                              GNUNET_PEERINFO_Processor
-                                                              callback,
-                                                              void
-                                                              *callback_cls);
+struct GNUNET_PEERINFO_NotifyContext *
+GNUNET_PEERINFO_notify (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                        GNUNET_PEERINFO_Processor callback, void *callback_cls);
 
 
 /**
@@ -184,7 +174,8 @@ struct GNUNET_PEERINFO_NotifyContext *GNUNET_PEERINFO_notify (const struct
  *
  * @param nc context to stop notifying
  */
-void GNUNET_PEERINFO_notify_cancel (struct GNUNET_PEERINFO_NotifyContext *nc);
+void
+GNUNET_PEERINFO_notify_cancel (struct GNUNET_PEERINFO_NotifyContext *nc);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 9608abd4ce3451c70c35a5465413af7981a30584..fbc7e26174fb30d0cd02e3fef39557c86855967a 100644 (file)
@@ -59,7 +59,8 @@ typedef void *(*GNUNET_PLUGIN_Callback) (void *arg);
  * @param library_name name of the plugin to test if it is installed
  * @return GNUNET_YES if the plugin exists, GNUNET_NO if not
  */
-int GNUNET_PLUGIN_test (const char *library_name);
+int
+GNUNET_PLUGIN_test (const char *library_name);
 
 /**
  * Setup plugin (runs the "init" callback and returns whatever "init"
@@ -73,7 +74,8 @@ int GNUNET_PLUGIN_test (const char *library_name);
  * @param arg argument to the plugin initialization function
  * @return whatever the initialization function returned, NULL on error
  */
-void *GNUNET_PLUGIN_load (const char *library_name, void *arg);
+void *
+GNUNET_PLUGIN_load (const char *library_name, void *arg);
 
 
 /**
@@ -85,7 +87,8 @@ void *GNUNET_PLUGIN_load (const char *library_name, void *arg);
  * @return whatever the shutdown function returned, typically NULL
  *         or a "char *" representing the error message
  */
-void *GNUNET_PLUGIN_unload (const char *library_name, void *arg);
+void *
+GNUNET_PLUGIN_unload (const char *library_name, void *arg);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 8881bfa9de64103564fc1ed83e158951a77cf7fc..48d5280eec744c9fe4ca844fd69ed0e05b3e90b0 100644 (file)
@@ -66,10 +66,11 @@ typedef void (*GNUNET_PROGRAM_Main) (void *cls, char *const *args,
  * @param task_cls closure for task
  * @return GNUNET_SYSERR on error, GNUNET_OK on success
  */
-int GNUNET_PROGRAM_run (int argc, char *const *argv, const char *binaryName,
-                        const char *binaryHelp,
-                        const struct GNUNET_GETOPT_CommandLineOption *options,
-                        GNUNET_PROGRAM_Main task, void *task_cls);
+int
+GNUNET_PROGRAM_run (int argc, char *const *argv, const char *binaryName,
+                    const char *binaryHelp,
+                    const struct GNUNET_GETOPT_CommandLineOption *options,
+                    GNUNET_PROGRAM_Main task, void *task_cls);
 
 
 
index 7a9373cc496d3a7870c84a39384d20ceda1ec213..138375fe1dc628b07d04a24045d6fa465b150831 100644 (file)
@@ -61,8 +61,9 @@ typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls,
  * @param delta by how much should the rating be changed?
  * @return new rating of the namespace
  */
-int GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                           const GNUNET_HashCode * nsid, int delta);
+int
+GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                       const GNUNET_HashCode * nsid, int delta);
 
 /**
  * Add a pseudonym to the set of known pseudonyms.
@@ -73,9 +74,10 @@ int GNUNET_PSEUDONYM_rank (const struct GNUNET_CONFIGURATION_Handle *cfg,
  * @param id the pseudonym identifier
  * @param meta metadata for the pseudonym
  */
-void GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                           const GNUNET_HashCode * id,
-                           const struct GNUNET_CONTAINER_MetaData *meta);
+void
+GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                      const GNUNET_HashCode * id,
+                      const struct GNUNET_CONTAINER_MetaData *meta);
 
 
 /**
@@ -86,41 +88,44 @@ void GNUNET_PSEUDONYM_add (const struct GNUNET_CONFIGURATION_Handle *cfg,
  * @param closure closure for iterator
  * @return number of pseudonyms found
  */
-int GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                               GNUNET_PSEUDONYM_Iterator iterator,
-                               void *closure);
+int
+GNUNET_PSEUDONYM_list_all (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                           GNUNET_PSEUDONYM_Iterator iterator, void *closure);
 
 /**
  * Register callback to be invoked whenever we discover
  * a new pseudonym.
  */
-int GNUNET_PSEUDONYM_discovery_callback_register (const struct
-                                                  GNUNET_CONFIGURATION_Handle
-                                                  *cfg,
-                                                  GNUNET_PSEUDONYM_Iterator
-                                                  iterator, void *closure);
+int
+GNUNET_PSEUDONYM_discovery_callback_register (const struct
+                                              GNUNET_CONFIGURATION_Handle *cfg,
+                                              GNUNET_PSEUDONYM_Iterator
+                                              iterator, void *closure);
 
 /**
  * Unregister namespace discovery callback.
  */
-int GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
-                                                    iterator, void *closure);
+int
+GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
+                                                iterator, void *closure);
 
 /**
  * Return the unique, human readable name for the given pseudonym.
  *
  * @return NULL on failure (should never happen)
  */
-char *GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle
-                                   *cfg, const GNUNET_HashCode * pseudo);
+char *
+GNUNET_PSEUDONYM_id_to_name (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                             const GNUNET_HashCode * pseudo);
 
 /**
  * Get the pseudonym ID belonging to the given human readable name.
  *
  * @return GNUNET_OK on success
  */
-int GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
-                                 const char *hname, GNUNET_HashCode * psid);
+int
+GNUNET_PSEUDONYM_name_to_id (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                             const char *hname, GNUNET_HashCode * psid);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index f24bf5c5e83f140a94e843f4b1d08dd516a1bf66..e55a014e63685a7f1bc286c8bd4188e81e03a2d2 100644 (file)
@@ -63,13 +63,15 @@ struct GNUNET_RESOLVER_RequestHandle;
  *
  * @param cfg configuration to use
  */
-void GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c);
+void
+GNUNET_RESOLVER_connect (const struct GNUNET_CONFIGURATION_Handle *c);
 
 
 /**
  * Destroy the connection to the resolver service.
  */
-void GNUNET_RESOLVER_disconnect (void);
+void
+GNUNET_RESOLVER_disconnect (void);
 
 
 /**
@@ -82,16 +84,11 @@ void GNUNET_RESOLVER_disconnect (void);
  * @param timeout how long to try resolving
  * @return handle that can be used to cancel the request, NULL on error
  */
-struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_ip_get (const char
-                                                              *hostname,
-                                                              int domain,
-                                                              struct
-                                                              GNUNET_TIME_Relative
-                                                              timeout,
-                                                              GNUNET_RESOLVER_AddressCallback
-                                                              callback,
-                                                              void
-                                                              *callback_cls);
+struct GNUNET_RESOLVER_RequestHandle *
+GNUNET_RESOLVER_ip_get (const char *hostname, int domain,
+                        struct GNUNET_TIME_Relative timeout,
+                        GNUNET_RESOLVER_AddressCallback callback,
+                        void *callback_cls);
 
 
 /**
@@ -104,15 +101,11 @@ struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_ip_get (const char
  * @param timeout how long to try resolving
  * @return handle that can be used to cancel the request, NULL on error
  */
-struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_hostname_resolve (int
-                                                                        domain,
-                                                                        struct
-                                                                        GNUNET_TIME_Relative
-                                                                        timeout,
-                                                                        GNUNET_RESOLVER_AddressCallback
-                                                                        callback,
-                                                                        void
-                                                                        *cls);
+struct GNUNET_RESOLVER_RequestHandle *
+GNUNET_RESOLVER_hostname_resolve (int domain,
+                                  struct GNUNET_TIME_Relative timeout,
+                                  GNUNET_RESOLVER_AddressCallback callback,
+                                  void *cls);
 
 
 /**
@@ -130,7 +123,8 @@ typedef void (*GNUNET_RESOLVER_HostnameCallback) (void *cls,
  *
  * @return local hostname, caller must free
  */
-char *GNUNET_RESOLVER_local_fqdn_get (void);
+char *
+GNUNET_RESOLVER_local_fqdn_get (void);
 
 
 /**
@@ -145,19 +139,12 @@ char *GNUNET_RESOLVER_local_fqdn_get (void);
  * @param cls closure for callback
  * @return handle that can be used to cancel the request, NULL on error
  */
-struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_hostname_get (const struct
-                                                                    sockaddr
-                                                                    *sa,
-                                                                    socklen_t
-                                                                    salen,
-                                                                    int
-                                                                    do_resolve,
-                                                                    struct
-                                                                    GNUNET_TIME_Relative
-                                                                    timeout,
-                                                                    GNUNET_RESOLVER_HostnameCallback
-                                                                    callback,
-                                                                    void *cls);
+struct GNUNET_RESOLVER_RequestHandle *
+GNUNET_RESOLVER_hostname_get (const struct sockaddr *sa, socklen_t salen,
+                              int do_resolve,
+                              struct GNUNET_TIME_Relative timeout,
+                              GNUNET_RESOLVER_HostnameCallback callback,
+                              void *cls);
 
 
 /**
@@ -168,7 +155,8 @@ struct GNUNET_RESOLVER_RequestHandle *GNUNET_RESOLVER_hostname_get (const struct
  *
  * @param rh handle of request to cancel
  */
-void GNUNET_RESOLVER_request_cancel (struct GNUNET_RESOLVER_RequestHandle *rh);
+void
+GNUNET_RESOLVER_request_cancel (struct GNUNET_RESOLVER_RequestHandle *rh);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 9ab3a3a8466dec7bfd8ac56fec2cb9ddd964da9d..0f80b9cee5930d986902f68a0cbb7d5f87c289b6 100644 (file)
@@ -224,7 +224,8 @@ typedef int (*GNUNET_SCHEDULER_select) (void *cls,
  * @param task task to run first (and immediately)
  * @param task_cls closure of task
  */
-void GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls);
+void
+GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls);
 
 
 /**
@@ -234,7 +235,8 @@ void GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls);
  * priorities and prerequisite tasks).  Note that tasks
  * scheduled AFTER this call may still be delayed arbitrarily.
  */
-void GNUNET_SCHEDULER_shutdown ();
+void
+GNUNET_SCHEDULER_shutdown ();
 
 
 /**
@@ -248,7 +250,8 @@ void GNUNET_SCHEDULER_shutdown ();
  *          all priority levels
  * @return number of tasks pending right now
  */
-unsigned int GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p);
+unsigned int
+GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p);
 
 
 /**
@@ -258,7 +261,8 @@ unsigned int GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p);
  *
  * * @return reason(s) why the current task is run
  */
-enum GNUNET_SCHEDULER_Reason GNUNET_SCHEDULER_get_reason ();
+enum GNUNET_SCHEDULER_Reason
+GNUNET_SCHEDULER_get_reason ();
 
 
 /**
@@ -268,7 +272,8 @@ enum GNUNET_SCHEDULER_Reason GNUNET_SCHEDULER_get_reason ();
  * * @param task id of the task to cancel
  * @return the closure of the callback of the cancelled task
  */
-void *GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task);
+void *
+GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task);
 
 
 /**
@@ -280,9 +285,9 @@ 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);
 
 
 /**
@@ -315,13 +320,9 @@ 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);
 
 
 /**
@@ -333,8 +334,8 @@ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_with_priority (enum
  * @return unique task identifier for the job
  *         only valid until "task" is started!
  */
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task
-                                                          task, void *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls);
 
 
 /**
@@ -351,12 +352,10 @@ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task
  * @return unique task identifier for the job
  *         only valid until "task" is started!
  */
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now_with_lifeness (int
-                                                                        lifeness,
-                                                                        GNUNET_SCHEDULER_Task
-                                                                        task,
-                                                                        void
-                                                                        *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness,
+                                        GNUNET_SCHEDULER_Task task,
+                                        void *task_cls);
 
 
 /**
@@ -371,12 +370,9 @@ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now_with_lifeness (int
  * @return unique task identifier for the job
  *         only valid until "task" is started!
  */
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_delayed (struct
-                                                              GNUNET_TIME_Relative
-                                                              delay,
-                                                              GNUNET_SCHEDULER_Task
-                                                              task,
-                                                              void *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay,
+                              GNUNET_SCHEDULER_Task task, void *task_cls);
 
 
 /**
@@ -395,15 +391,10 @@ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_delayed (struct
  * @return unique task identifier for the job
  *         only valid until "task" is started!
  */
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_net (struct
-                                                               GNUNET_TIME_Relative
-                                                               delay,
-                                                               struct
-                                                               GNUNET_NETWORK_Handle
-                                                               *rfd,
-                                                               GNUNET_SCHEDULER_Task
-                                                               task,
-                                                               void *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay,
+                               struct GNUNET_NETWORK_Handle *rfd,
+                               GNUNET_SCHEDULER_Task task, void *task_cls);
 
 
 /**
@@ -422,15 +413,10 @@ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_net (struct
  * @return unique task identifier for the job
  *         only valid until "task" is started!
  */
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_net (struct
-                                                                GNUNET_TIME_Relative
-                                                                delay,
-                                                                struct
-                                                                GNUNET_NETWORK_Handle
-                                                                *wfd,
-                                                                GNUNET_SCHEDULER_Task
-                                                                task,
-                                                                void *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay,
+                                struct GNUNET_NETWORK_Handle *wfd,
+                                GNUNET_SCHEDULER_Task task, void *task_cls);
 
 
 /**
@@ -449,15 +435,10 @@ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_net (struct
  * @return unique task identifier for the job
  *         only valid until "task" is started!
  */
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_file (struct
-                                                                GNUNET_TIME_Relative
-                                                                delay,
-                                                                const struct
-                                                                GNUNET_DISK_FileHandle
-                                                                *rfd,
-                                                                GNUNET_SCHEDULER_Task
-                                                                task,
-                                                                void *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay,
+                                const struct GNUNET_DISK_FileHandle *rfd,
+                                GNUNET_SCHEDULER_Task task, void *task_cls);
 
 
 /**
@@ -476,16 +457,10 @@ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_file (struct
  * @return unique task identifier for the job
  *         only valid until "task" is started!
  */
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_file (struct
-                                                                 GNUNET_TIME_Relative
-                                                                 delay,
-                                                                 const struct
-                                                                 GNUNET_DISK_FileHandle
-                                                                 *wfd,
-                                                                 GNUNET_SCHEDULER_Task
-                                                                 task,
-                                                                 void
-                                                                 *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay,
+                                 const struct GNUNET_DISK_FileHandle *wfd,
+                                 GNUNET_SCHEDULER_Task task, void *task_cls);
 
 
 /**
@@ -520,23 +495,13 @@ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_file (struct
  * @return unique task identifier for the job
  *         only valid until "task" is started!
  */
-GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_select (enum
-                                                             GNUNET_SCHEDULER_Priority
-                                                             prio,
-                                                             GNUNET_SCHEDULER_TaskIdentifier
-                                                             prerequisite_task,
-                                                             struct
-                                                             GNUNET_TIME_Relative
-                                                             delay,
-                                                             const struct
-                                                             GNUNET_NETWORK_FDSet
-                                                             *rs,
-                                                             const struct
-                                                             GNUNET_NETWORK_FDSet
-                                                             *ws,
-                                                             GNUNET_SCHEDULER_Task
-                                                             task,
-                                                             void *task_cls);
+GNUNET_SCHEDULER_TaskIdentifier
+GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio,
+                             GNUNET_SCHEDULER_TaskIdentifier prerequisite_task,
+                             struct GNUNET_TIME_Relative delay,
+                             const struct GNUNET_NETWORK_FDSet *rs,
+                             const struct GNUNET_NETWORK_FDSet *ws,
+                             GNUNET_SCHEDULER_Task task, void *task_cls);
 
 /**
  * Sets the select function to use in the scheduler (scheduler_select).
@@ -544,8 +509,9 @@ GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_select (enum
  * @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 */
index d9663ac826fd42faf37353bfb29e297d9dbfd86b..3d8130c605bafe9bee2d1272cf33d334eaf68f6b 100644 (file)
@@ -122,12 +122,12 @@ struct GNUNET_SERVER_MessageHandler
  * @return handle for the new server, NULL on error
  *         (typically, "port" already in use)
  */
-struct GNUNET_SERVER_Handle
-    *GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
-                                        void *access_cls,
-                                        struct GNUNET_NETWORK_Handle **lsocks,
-                                        struct GNUNET_TIME_Relative
-                                        idle_timeout, int require_found);
+struct GNUNET_SERVER_Handle *
+GNUNET_SERVER_create_with_sockets (GNUNET_CONNECTION_AccessCheck access,
+                                   void *access_cls,
+                                   struct GNUNET_NETWORK_Handle **lsocks,
+                                   struct GNUNET_TIME_Relative idle_timeout,
+                                   int require_found);
 
 /**
  * Create a new server.
@@ -142,14 +142,12 @@ struct GNUNET_SERVER_Handle
  * @return handle for the new server, NULL on error
  *         (typically, "port" already in use)
  */
-struct GNUNET_SERVER_Handle *GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck
-                                                   access, void *access_cls,
-                                                   struct sockaddr *const
-                                                   *serverAddr,
-                                                   const socklen_t * socklen,
-                                                   struct GNUNET_TIME_Relative
-                                                   idle_timeout,
-                                                   int require_found);
+struct GNUNET_SERVER_Handle *
+GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck access, void *access_cls,
+                      struct sockaddr *const *serverAddr,
+                      const socklen_t * socklen,
+                      struct GNUNET_TIME_Relative idle_timeout,
+                      int require_found);
 
 
 /**
@@ -157,7 +155,8 @@ struct GNUNET_SERVER_Handle *GNUNET_SERVER_create (GNUNET_CONNECTION_AccessCheck
  *
  * @param s server to destroy
  */
-void GNUNET_SERVER_destroy (struct GNUNET_SERVER_Handle *s);
+void
+GNUNET_SERVER_destroy (struct GNUNET_SERVER_Handle *s);
 
 
 /**
@@ -173,9 +172,10 @@ 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);
 
 
 /**
@@ -193,12 +193,12 @@ void GNUNET_SERVER_add_handlers (struct GNUNET_SERVER_Handle *server,
  *           GNUNET_CONNECTION_notify_transmit_ready_cancel.
  *         NULL if we are already going to notify someone else (busy)
  */
-struct GNUNET_CONNECTION_TransmitHandle
-    *GNUNET_SERVER_notify_transmit_ready (struct GNUNET_SERVER_Client *client,
-                                          size_t size,
-                                          struct GNUNET_TIME_Relative timeout,
-                                          GNUNET_CONNECTION_TransmitReadyNotify
-                                          callback, void *callback_cls);
+struct GNUNET_CONNECTION_TransmitHandle *
+GNUNET_SERVER_notify_transmit_ready (struct GNUNET_SERVER_Client *client,
+                                     size_t size,
+                                     struct GNUNET_TIME_Relative timeout,
+                                     GNUNET_CONNECTION_TransmitReadyNotify
+                                     callback, void *callback_cls);
 
 
 /**
@@ -207,7 +207,8 @@ struct GNUNET_CONNECTION_TransmitHandle
  *
  * @param client the client to set the persistent flag on
  */
-void GNUNET_SERVER_client_persist_ (struct GNUNET_SERVER_Client *client);
+void
+GNUNET_SERVER_client_persist_ (struct GNUNET_SERVER_Client *client);
 
 /**
  * Resume receiving from this client, we are done processing the
@@ -221,8 +222,8 @@ 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);
 
 
 /**
@@ -233,8 +234,9 @@ void GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client,
  * @param client the client to update
  * @param timeout new timeout for activities on the socket
  */
-void GNUNET_SERVER_client_set_timeout (struct GNUNET_SERVER_Client *client,
-                                       struct GNUNET_TIME_Relative timeout);
+void
+GNUNET_SERVER_client_set_timeout (struct GNUNET_SERVER_Client *client,
+                                  struct GNUNET_TIME_Relative timeout);
 
 
 /**
@@ -244,8 +246,9 @@ void 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);
 
 
 /**
@@ -263,9 +266,10 @@ void 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);
 
 
 /**
@@ -280,12 +284,9 @@ int GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server,
  * @return the client handle (client should call
  *         "client_drop" on the return value eventually)
  */
-struct GNUNET_SERVER_Client *GNUNET_SERVER_connect_socket (struct
-                                                           GNUNET_SERVER_Handle
-                                                           *server,
-                                                           struct
-                                                           GNUNET_CONNECTION_Handle
-                                                           *connection);
+struct GNUNET_SERVER_Client *
+GNUNET_SERVER_connect_socket (struct GNUNET_SERVER_Handle *server,
+                              struct GNUNET_CONNECTION_Handle *connection);
 
 
 /**
@@ -295,7 +296,8 @@ struct GNUNET_SERVER_Client *GNUNET_SERVER_connect_socket (struct
  *
  * @param client the client to keep
  */
-void GNUNET_SERVER_client_keep (struct GNUNET_SERVER_Client *client);
+void
+GNUNET_SERVER_client_keep (struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -306,7 +308,8 @@ void GNUNET_SERVER_client_keep (struct GNUNET_SERVER_Client *client);
  *
  * @param client the client to drop
  */
-void GNUNET_SERVER_client_drop (struct GNUNET_SERVER_Client *client);
+void
+GNUNET_SERVER_client_drop (struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -317,8 +320,9 @@ void GNUNET_SERVER_client_drop (struct GNUNET_SERVER_Client *client);
  * @param addrlen where to store the length of the address
  * @return GNUNET_OK on success
  */
-int GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client,
-                                      void **addr, size_t * addrlen);
+int
+GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client,
+                                  void **addr, size_t * addrlen);
 
 
 /**
@@ -348,9 +352,10 @@ typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls,
  * @param callback function to call on disconnect
  * @param callback_cls closure for callback
  */
-void GNUNET_SERVER_disconnect_notify (struct GNUNET_SERVER_Handle *server,
-                                      GNUNET_SERVER_DisconnectCallback callback,
-                                      void *callback_cls);
+void
+GNUNET_SERVER_disconnect_notify (struct GNUNET_SERVER_Handle *server,
+                                 GNUNET_SERVER_DisconnectCallback callback,
+                                 void *callback_cls);
 
 
 /**
@@ -360,10 +365,10 @@ void GNUNET_SERVER_disconnect_notify (struct GNUNET_SERVER_Handle *server,
  * @param callback function to call on disconnect
  * @param callback_cls closure for callback
  */
-void GNUNET_SERVER_disconnect_notify_cancel (struct GNUNET_SERVER_Handle
-                                             *server,
-                                             GNUNET_SERVER_DisconnectCallback
-                                             callback, void *callback_cls);
+void
+GNUNET_SERVER_disconnect_notify_cancel (struct GNUNET_SERVER_Handle *server,
+                                        GNUNET_SERVER_DisconnectCallback
+                                        callback, void *callback_cls);
 
 
 /**
@@ -374,7 +379,8 @@ void GNUNET_SERVER_disconnect_notify_cancel (struct GNUNET_SERVER_Handle
  *
  * @param client the client to disconnect from
  */
-void GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client);
+void
+GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -388,8 +394,8 @@ 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);
 
 
 
@@ -401,7 +407,8 @@ void GNUNET_SERVER_ignore_shutdown (struct GNUNET_SERVER_Handle *h,
  * @param client handle to the client
  * @return GNUNET_OK on success
  */
-int GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client);
+int
+GNUNET_SERVER_client_disable_corking (struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -419,9 +426,8 @@ struct GNUNET_SERVER_TransmitContext;
  * @param client client to create the context for.
  * @return NULL on error
  */
-struct GNUNET_SERVER_TransmitContext
-    *GNUNET_SERVER_transmit_context_create (struct GNUNET_SERVER_Client
-                                            *client);
+struct GNUNET_SERVER_TransmitContext *
+GNUNET_SERVER_transmit_context_create (struct GNUNET_SERVER_Client *client);
 
 
 /**
@@ -434,10 +440,10 @@ 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);
 
 
 /**
@@ -448,11 +454,12 @@ void GNUNET_SERVER_transmit_context_append_data (struct
  * @param tc context to use
  * @param msg message to append
  */
-void GNUNET_SERVER_transmit_context_append_message (struct
-                                                    GNUNET_SERVER_TransmitContext
-                                                    *tc,
-                                                    const struct
-                                                    GNUNET_MessageHeader *msg);
+void
+GNUNET_SERVER_transmit_context_append_message (struct
+                                               GNUNET_SERVER_TransmitContext
+                                               *tc,
+                                               const struct GNUNET_MessageHeader
+                                               *msg);
 
 
 /**
@@ -464,9 +471,9 @@ void 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);
 
 
 
@@ -490,10 +497,9 @@ struct GNUNET_SERVER_NotificationContext;
  *        if the queue gets longer than this number of messages
  * @return handle to the notification context
  */
-struct GNUNET_SERVER_NotificationContext
-    *GNUNET_SERVER_notification_context_create (struct GNUNET_SERVER_Handle
-                                                *server,
-                                                unsigned int queue_length);
+struct GNUNET_SERVER_NotificationContext *
+GNUNET_SERVER_notification_context_create (struct GNUNET_SERVER_Handle *server,
+                                           unsigned int queue_length);
 
 
 /**
@@ -501,9 +507,10 @@ 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);
 
 
 /**
@@ -512,11 +519,10 @@ void 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);
 
 
 /**
@@ -528,14 +534,13 @@ void GNUNET_SERVER_notification_context_add (struct
  * @param msg message to send
  * @param can_drop can this message be dropped due to queue length limitations
  */
-void GNUNET_SERVER_notification_context_unicast (struct
-                                                 GNUNET_SERVER_NotificationContext
-                                                 *nc,
-                                                 struct GNUNET_SERVER_Client
-                                                 *client,
-                                                 const struct
-                                                 GNUNET_MessageHeader *msg,
-                                                 int can_drop);
+void
+GNUNET_SERVER_notification_context_unicast (struct
+                                            GNUNET_SERVER_NotificationContext
+                                            *nc,
+                                            struct GNUNET_SERVER_Client *client,
+                                            const struct GNUNET_MessageHeader
+                                            *msg, int can_drop);
 
 
 /**
@@ -545,12 +550,12 @@ void 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);
 
 
 
@@ -580,9 +585,9 @@ typedef void (*GNUNET_SERVER_MessageTokenizerCallback) (void *cls, void *client,
  * @param cb_cls closure for cb
  * @return handle to tokenizer
  */
-struct GNUNET_SERVER_MessageStreamTokenizer
-    *GNUNET_SERVER_mst_create (GNUNET_SERVER_MessageTokenizerCallback cb,
-                               void *cb_cls);
+struct GNUNET_SERVER_MessageStreamTokenizer *
+GNUNET_SERVER_mst_create (GNUNET_SERVER_MessageTokenizerCallback cb,
+                          void *cb_cls);
 
 
 /**
@@ -601,9 +606,10 @@ 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);
 
 
 /**
@@ -611,8 +617,8 @@ int 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 */
index 79453cbf65fef5889bd8a734dc2f5050cf53aa53..1641e0f939b3e977e72a0104d4ed5ccfe058c127 100644 (file)
@@ -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,9 +111,10 @@ 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;
@@ -126,10 +127,9 @@ struct GNUNET_SERVICE_Context;
  * @param cfg configuration to use
  * @return NULL on error, service handle
  */
-struct GNUNET_SERVICE_Context *GNUNET_SERVICE_start (const char *serviceName,
-                                                     const struct
-                                                     GNUNET_CONFIGURATION_Handle
-                                                     *cfg);
+struct GNUNET_SERVICE_Context *
+GNUNET_SERVICE_start (const char *serviceName,
+                      const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -139,9 +139,8 @@ struct GNUNET_SERVICE_Context *GNUNET_SERVICE_start (const char *serviceName,
  * @param ctx the service context returned from the start function
  * @return handle to the server for this service, NULL if there is none
  */
-struct GNUNET_SERVER_Handle *GNUNET_SERVICE_get_server (struct
-                                                        GNUNET_SERVICE_Context
-                                                        *ctx);
+struct GNUNET_SERVER_Handle *
+GNUNET_SERVICE_get_server (struct GNUNET_SERVICE_Context *ctx);
 
 
 /**
@@ -149,7 +148,8 @@ struct GNUNET_SERVER_Handle *GNUNET_SERVICE_get_server (struct
  *
  * @param sctx the service context returned from the start function
  */
-void GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Context *sctx);
+void
+GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Context *sctx);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index e386ccc0ed261d001c96cea44bba61259633ea86..1597c76d026a5760648b9fc7c19728e8874a1f37 100644 (file)
@@ -59,9 +59,8 @@ typedef void (*GNUNET_SIGNAL_Handler) (void);
  * @param handler the function to call
  * @return context that can be used to restore, NULL on error
  */
-struct GNUNET_SIGNAL_Context *GNUNET_SIGNAL_handler_install (int signal,
-                                                             GNUNET_SIGNAL_Handler
-                                                             handler);
+struct GNUNET_SIGNAL_Context *
+GNUNET_SIGNAL_handler_install (int signal, GNUNET_SIGNAL_Handler handler);
 
 /**
  * Uninstall a previously installed signal hander.
@@ -69,7 +68,8 @@ struct GNUNET_SIGNAL_Context *GNUNET_SIGNAL_handler_install (int signal,
  * @param ctx context that was returned when the
  *            signal handler was installed
  */
-void GNUNET_SIGNAL_handler_uninstall (struct GNUNET_SIGNAL_Context *ctx);
+void
+GNUNET_SIGNAL_handler_uninstall (struct GNUNET_SIGNAL_Context *ctx);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 90cc612df84de5168ec88afd2eaa9195c967302f..c246e7cdaeb95c19ae29811a5819c75cb8be4553 100644 (file)
@@ -72,11 +72,9 @@ typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, const char *subsystem,
  * @param cfg services configuration in use
  * @return handle to use
  */
-struct GNUNET_STATISTICS_Handle *GNUNET_STATISTICS_create (const char
-                                                           *subsystem,
-                                                           const struct
-                                                           GNUNET_CONFIGURATION_Handle
-                                                           *cfg);
+struct GNUNET_STATISTICS_Handle *
+GNUNET_STATISTICS_create (const char *subsystem,
+                          const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -87,8 +85,8 @@ struct GNUNET_STATISTICS_Handle *GNUNET_STATISTICS_create (const char
  * @param sync_first set to GNUNET_YES if pending SET requests should
  *        be completed
  */
-void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h,
-                                int sync_first);
+void
+GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, int sync_first);
 
 
 /**
@@ -103,9 +101,10 @@ 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);
 
 
 /**
@@ -135,19 +134,12 @@ struct GNUNET_STATISTICS_GetHandle;
  * @param cls closure for proc and cont
  * @return NULL on error
  */
-struct GNUNET_STATISTICS_GetHandle *GNUNET_STATISTICS_get (struct
-                                                           GNUNET_STATISTICS_Handle
-                                                           *handle,
-                                                           const char
-                                                           *subsystem,
-                                                           const char *name,
-                                                           struct
-                                                           GNUNET_TIME_Relative
-                                                           timeout,
-                                                           GNUNET_STATISTICS_Callback
-                                                           cont,
-                                                           GNUNET_STATISTICS_Iterator
-                                                           proc, void *cls);
+struct GNUNET_STATISTICS_GetHandle *
+GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle,
+                       const char *subsystem, const char *name,
+                       struct GNUNET_TIME_Relative timeout,
+                       GNUNET_STATISTICS_Callback cont,
+                       GNUNET_STATISTICS_Iterator proc, void *cls);
 
 
 /**
@@ -156,7 +148,8 @@ struct GNUNET_STATISTICS_GetHandle *GNUNET_STATISTICS_get (struct
  *
  * @param gh handle of the request to cancel
  */
-void GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh);
+void
+GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh);
 
 
 /**
@@ -168,9 +161,9 @@ 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
@@ -181,9 +174,9 @@ void 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);
 
 
 
index dd78aee35c1156734973f41baaa77455c57fbb0a..6413fb1026cd9011190b66fd61508f7c41fa21a7 100644 (file)
@@ -56,7 +56,8 @@ extern "C"
  * @param size number of bytes
  * @return fancy representation of the size (possibly rounded) for humans
  */
-char *GNUNET_STRINGS_byte_size_fancy (unsigned long long size);
+char *
+GNUNET_STRINGS_byte_size_fancy (unsigned long long size);
 
 
 /**
@@ -69,8 +70,8 @@ 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);
 
 
 /**
@@ -81,7 +82,8 @@ char *GNUNET_STRINGS_to_utf8 (const char *input, size_t len,
  * @return the full file name,
  *          NULL is returned on error
  */
-char *GNUNET_STRINGS_filename_expand (const char *fil);
+char *
+GNUNET_STRINGS_filename_expand (const char *fil);
 
 /**
  * Fill a buffer of the given size with
@@ -104,8 +106,8 @@ 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 +124,9 @@ size_t GNUNET_STRINGS_buffer_fill (char *buffer, size_t size,
  * @return offset of the character after the last 0-termination
  *         in the buffer, or 0 on error.
  */
-unsigned int GNUNET_STRINGS_buffer_tokenize (const char *buffer, size_t size,
-                                             unsigned int count, ...);
+unsigned int
+GNUNET_STRINGS_buffer_tokenize (const char *buffer, size_t size,
+                                unsigned int count, ...);
 
 
 
@@ -134,7 +137,8 @@ unsigned int GNUNET_STRINGS_buffer_tokenize (const char *buffer, size_t size,
  * @param t the absolute time to convert
  * @return timestamp in human-readable form
  */
-char *GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t);
+char *
+GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t);
 
 
 /**
@@ -143,8 +147,8 @@ char *GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t);
  * @param delta time in milli seconds
  * @return string in human-readable form
  */
-char *GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative
-                                              delta);
+char *
+GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative delta);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
index cd673a0823804922486c5823e395a922da6e0780..5bedc406c05fbbc03958d252e16c8c479e324d14 100644 (file)
@@ -466,22 +466,15 @@ typedef void (*GNUNET_TESTING_NotifyTopology) (void *cls,
  * @param cb_cls closure for cb
  * @return handle to the daemon (actual start will be completed asynchronously)
  */
-struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_start (const struct
-                                                           GNUNET_CONFIGURATION_Handle
-                                                           *cfg,
-                                                           struct
-                                                           GNUNET_TIME_Relative
-                                                           timeout, int pretend,
-                                                           const char *hostname,
-                                                           const char
-                                                           *ssh_username,
-                                                           uint16_t sshport,
-                                                           const char *hostkey,
-                                                           GNUNET_TESTING_NotifyHostkeyCreated
-                                                           hostkey_callback,
-                                                           void *hostkey_cls,
-                                                           GNUNET_TESTING_NotifyDaemonRunning
-                                                           cb, void *cb_cls);
+struct GNUNET_TESTING_Daemon *
+GNUNET_TESTING_daemon_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                             struct GNUNET_TIME_Relative timeout, int pretend,
+                             const char *hostname, const char *ssh_username,
+                             uint16_t sshport, const char *hostkey,
+                             GNUNET_TESTING_NotifyHostkeyCreated
+                             hostkey_callback, void *hostkey_cls,
+                             GNUNET_TESTING_NotifyDaemonRunning cb,
+                             void *cb_cls);
 
 /**
  * Continues GNUnet daemon startup when user wanted to be notified
@@ -490,8 +483,8 @@ 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.
@@ -501,7 +494,8 @@ void GNUNET_TESTING_daemon_continue_startup (struct GNUNET_TESTING_Daemon
  * @return GNUNET_YES if the daemon is up, GNUNET_NO if the
  *         daemon is down, GNUNET_SYSERR on error.
  */
-int GNUNET_TESTING_daemon_running (struct GNUNET_TESTING_Daemon *daemon);
+int
+GNUNET_TESTING_daemon_running (struct GNUNET_TESTING_Daemon *daemon);
 
 /**
  * Restart (stop and start) a GNUnet daemon.
@@ -510,9 +504,10 @@ 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
@@ -523,10 +518,11 @@ void 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.
@@ -537,11 +533,12 @@ void 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.
@@ -552,12 +549,13 @@ void 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.
@@ -565,10 +563,9 @@ void GNUNET_TESTING_daemon_start_stopped_service (struct GNUNET_TESTING_Daemon
  * @param pg handle to the set of running peers
  * @param position the number of the peer to return
  */
-struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_get (struct
-                                                         GNUNET_TESTING_PeerGroup
-                                                         *pg,
-                                                         unsigned int position);
+struct GNUNET_TESTING_Daemon *
+GNUNET_TESTING_daemon_get (struct GNUNET_TESTING_PeerGroup *pg,
+                           unsigned int position);
 
 /*
  * Get a daemon by peer identity, so callers can
@@ -579,12 +576,9 @@ struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_get (struct
  *
  * @return the daemon on success, or NULL if no such peer identity is found
  */
-struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_get_by_id (struct
-                                                               GNUNET_TESTING_PeerGroup
-                                                               *pg,
-                                                               struct
-                                                               GNUNET_PeerIdentity
-                                                               *peer_id);
+struct GNUNET_TESTING_Daemon *
+GNUNET_TESTING_daemon_get_by_id (struct GNUNET_TESTING_PeerGroup *pg,
+                                 struct GNUNET_PeerIdentity *peer_id);
 
 /**
  * Stops a GNUnet daemon.
@@ -599,11 +593,11 @@ 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);
 
 
 /**
@@ -614,10 +608,11 @@ void GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
  * @param cb function called once the configuration was changed
  * @param cb_cls closure for cb
  */
-void GNUNET_TESTING_daemon_reconfigure (struct GNUNET_TESTING_Daemon *d,
-                                        struct GNUNET_CONFIGURATION_Handle *cfg,
-                                        GNUNET_TESTING_NotifyCompletion cb,
-                                        void *cb_cls);
+void
+GNUNET_TESTING_daemon_reconfigure (struct GNUNET_TESTING_Daemon *d,
+                                   struct GNUNET_CONFIGURATION_Handle *cfg,
+                                   GNUNET_TESTING_NotifyCompletion cb,
+                                   void *cb_cls);
 
 /**
  * Stops a single service of a GNUnet daemon.  Used like daemon_stop,
@@ -631,11 +626,12 @@ 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.
@@ -646,9 +642,8 @@ void GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d,
  *
  * @return DLL of hosts on success, NULL on failure
  */
-struct GNUNET_TESTING_Host *GNUNET_TESTING_hosts_load (const struct
-                                                       GNUNET_CONFIGURATION_Handle
-                                                       *cfg);
+struct GNUNET_TESTING_Host *
+GNUNET_TESTING_hosts_load (const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 
 /**
@@ -678,31 +673,19 @@ struct GNUNET_TESTING_Host *GNUNET_TESTING_hosts_load (const struct
  *
  * @return NULL on error, otherwise handle to control peer group
  */
-struct GNUNET_TESTING_PeerGroup *GNUNET_TESTING_daemons_start (const struct
-                                                               GNUNET_CONFIGURATION_Handle
-                                                               *cfg,
-                                                               unsigned int
-                                                               total,
-                                                               unsigned int
-                                                               max_concurrent_connections,
-                                                               unsigned int
-                                                               max_concurrent_ssh,
-                                                               struct
-                                                               GNUNET_TIME_Relative
-                                                               timeout,
-                                                               GNUNET_TESTING_NotifyHostkeyCreated
-                                                               hostkey_callback,
-                                                               void
-                                                               *hostkey_cls,
-                                                               GNUNET_TESTING_NotifyDaemonRunning
-                                                               cb, void *cb_cls,
-                                                               GNUNET_TESTING_NotifyConnection
-                                                               connect_callback,
-                                                               void
-                                                               *connect_callback_cls,
-                                                               const struct
-                                                               GNUNET_TESTING_Host
-                                                               *hostnames);
+struct GNUNET_TESTING_PeerGroup *
+GNUNET_TESTING_daemons_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                              unsigned int total,
+                              unsigned int max_concurrent_connections,
+                              unsigned int max_concurrent_ssh,
+                              struct GNUNET_TIME_Relative timeout,
+                              GNUNET_TESTING_NotifyHostkeyCreated
+                              hostkey_callback, void *hostkey_cls,
+                              GNUNET_TESTING_NotifyDaemonRunning cb,
+                              void *cb_cls,
+                              GNUNET_TESTING_NotifyConnection connect_callback,
+                              void *connect_callback_cls,
+                              const struct GNUNET_TESTING_Host *hostnames);
 
 /**
  * Function which continues a peer group starting up
@@ -710,8 +693,8 @@ 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);
 
 
 /**
@@ -728,13 +711,14 @@ void GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup
  * @param cb function to call at the end
  * @param cb_cls closure for cb
  */
-void GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
-                                     struct GNUNET_TESTING_Daemon *d2,
-                                     struct GNUNET_TIME_Relative timeout,
-                                     unsigned int max_connect_attempts,
-                                     int send_hello,
-                                     GNUNET_TESTING_NotifyConnection cb,
-                                     void *cb_cls);
+void
+GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
+                                struct GNUNET_TESTING_Daemon *d2,
+                                struct GNUNET_TIME_Relative timeout,
+                                unsigned int max_connect_attempts,
+                                int send_hello,
+                                GNUNET_TESTING_NotifyConnection cb,
+                                void *cb_cls);
 
 
 /**
@@ -744,9 +728,10 @@ void 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);
 
 
 /**
@@ -757,10 +742,10 @@ void 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);
 
 
 /**
@@ -770,8 +755,8 @@ void 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
@@ -796,12 +781,12 @@ unsigned int GNUNET_TESTING_daemons_running (struct GNUNET_TESTING_PeerGroup
  * @param cb function to call at the end
  * @param cb_cls closure for cb
  */
-void GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg,
-                                   char *service, unsigned int voff,
-                                   unsigned int von,
-                                   struct GNUNET_TIME_Relative timeout,
-                                   GNUNET_TESTING_NotifyCompletion cb,
-                                   void *cb_cls);
+void
+GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg,
+                              char *service, unsigned int voff,
+                              unsigned int von,
+                              struct GNUNET_TIME_Relative timeout,
+                              GNUNET_TESTING_NotifyCompletion cb, void *cb_cls);
 /*
  * Start a given service for each of the peers in the peer group.
  *
@@ -813,11 +798,12 @@ void 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.
@@ -847,10 +833,11 @@ 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.
@@ -965,8 +952,9 @@ 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.
@@ -977,9 +965,10 @@ int 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);
 
 
 /**
@@ -1018,13 +1007,11 @@ int 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
@@ -1034,22 +1021,25 @@ unsigned int GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup
  * @param cb callback for topology information
  * @param cls closure for callback
  */
-void GNUNET_TESTING_get_topology (struct GNUNET_TESTING_PeerGroup *pg,
-                                  GNUNET_TESTING_NotifyTopology cb, void *cls);
+void
+GNUNET_TESTING_get_topology (struct GNUNET_TESTING_PeerGroup *pg,
+                             GNUNET_TESTING_NotifyTopology cb, void *cls);
 
 /**
  * Stop the connection process temporarily.
  *
  * @param pg the peer group to stop connecting
  */
-void GNUNET_TESTING_stop_connections (struct GNUNET_TESTING_PeerGroup *pg);
+void
+GNUNET_TESTING_stop_connections (struct GNUNET_TESTING_PeerGroup *pg);
 
 /**
  * Resume the connection process.
  *
  * @param pg the peer group to resume connecting
  */
-void GNUNET_TESTING_resume_connections (struct GNUNET_TESTING_PeerGroup *pg);
+void
+GNUNET_TESTING_resume_connections (struct GNUNET_TESTING_PeerGroup *pg);
 
 /**
  * There are many ways to connect peers that are supported by this function.
@@ -1073,15 +1063,15 @@ 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.
@@ -1093,11 +1083,11 @@ int 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
@@ -1116,23 +1106,14 @@ void GNUNET_TESTING_daemons_vary (struct GNUNET_TESTING_PeerGroup *pg,
  *
  * @return NULL on error, otherwise handle to control peer group
  */
-struct GNUNET_TESTING_PeerGroup *GNUNET_TESTING_peergroup_start (const struct
-                                                                 GNUNET_CONFIGURATION_Handle
-                                                                 *cfg,
-                                                                 unsigned int
-                                                                 total,
-                                                                 struct
-                                                                 GNUNET_TIME_Relative
-                                                                 timeout,
-                                                                 GNUNET_TESTING_NotifyConnection
-                                                                 connect_cb,
-                                                                 GNUNET_TESTING_NotifyCompletion
-                                                                 peergroup_cb,
-                                                                 void
-                                                                 *peergroup_cls,
-                                                                 const struct
-                                                                 GNUNET_TESTING_Host
-                                                                 *hostnames);
+struct GNUNET_TESTING_PeerGroup *
+GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                                unsigned int total,
+                                struct GNUNET_TIME_Relative timeout,
+                                GNUNET_TESTING_NotifyConnection connect_cb,
+                                GNUNET_TESTING_NotifyCompletion peergroup_cb,
+                                void *peergroup_cls,
+                                const struct GNUNET_TESTING_Host *hostnames);
 
 /**
  * Print current topology to a graphviz readable file.
@@ -1143,11 +1124,11 @@ 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 */
index ffae1ce51dd89391c3c2dd864ed60c7b3f6ec4f4..1f157631fcec054a590b4c48917ae8e4b85ec3f2 100644 (file)
@@ -151,34 +151,40 @@ struct GNUNET_TIME_AbsoluteNBO
 /**
  * Return relative time of 0ms.
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_get_zero (void);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_get_zero (void);
 
 /**
  * Return absolute time of 0ms.
  */
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get_zero (void);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_get_zero (void);
 
 /**
  * Return relative time of 1ms.
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_get_unit (void);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_get_unit (void);
 
 /**
  * Return "forever".
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_get_forever (void);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_get_forever (void);
 
 /**
  * Return "forever".
  */
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get_forever (void);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_get_forever (void);
 
 /**
  * Get the current time.
  *
  * @return the current time
  */
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get (void);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_get (void);
 
 /**
  * Convert relative time to an absolute time in the
@@ -187,9 +193,8 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_get (void);
  * @param rel relative time to convert
  * @return timestamp that is "rel" in the future, or FOREVER if rel==FOREVER (or if we would overflow)
  */
-struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute (struct
-                                                              GNUNET_TIME_Relative
-                                                              rel);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_relative_to_absolute (struct GNUNET_TIME_Relative rel);
 
 /**
  * Return the minimum of two relative time values.
@@ -198,10 +203,9 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute (struct
  * @param t2 other timestamp
  * @return timestamp that is smaller
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct
-                                                      GNUNET_TIME_Relative t1,
-                                                      struct
-                                                      GNUNET_TIME_Relative t2);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_min (struct GNUNET_TIME_Relative t1,
+                          struct GNUNET_TIME_Relative t2);
 
 
 /**
@@ -211,10 +215,9 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct
  * @param t2 other timestamp
  * @return timestamp that is larger
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_max (struct
-                                                      GNUNET_TIME_Relative t1,
-                                                      struct
-                                                      GNUNET_TIME_Relative t2);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_max (struct GNUNET_TIME_Relative t1,
+                          struct GNUNET_TIME_Relative t2);
 
 /**
  * Return the minimum of two absolute time values.
@@ -223,10 +226,9 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_max (struct
  * @param t2 other timestamp
  * @return timestamp that is smaller
  */
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct
-                                                      GNUNET_TIME_Absolute t1,
-                                                      struct
-                                                      GNUNET_TIME_Absolute t2);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_min (struct GNUNET_TIME_Absolute t1,
+                          struct GNUNET_TIME_Absolute t2);
 
 /**
  * Return the maximum of two absolute time values.
@@ -235,10 +237,9 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct
  * @param t2 other timestamp
  * @return timestamp that is smaller
  */
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_max (struct
-                                                      GNUNET_TIME_Absolute t1,
-                                                      struct
-                                                      GNUNET_TIME_Absolute t2);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_max (struct GNUNET_TIME_Absolute t1,
+                          struct GNUNET_TIME_Absolute t2);
 
 /**
  * Given a timestamp in the future, how much time
@@ -247,9 +248,8 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_max (struct
  * @param future some absolute time, typically in the future
  * @return future - now, or 0 if now >= future, or FOREVER if future==FOREVER.
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining (struct
-                                                                GNUNET_TIME_Absolute
-                                                                future);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_absolute_get_remaining (struct GNUNET_TIME_Absolute future);
 
 
 /**
@@ -262,10 +262,9 @@ struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_remaining (struct
  * @return remaining duration for the operation,
  *        assuming it continues at the same speed
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_calculate_eta (struct
-                                                       GNUNET_TIME_Absolute
-                                                       start, uint64_t finished,
-                                                       uint64_t total);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_calculate_eta (struct GNUNET_TIME_Absolute start, uint64_t finished,
+                           uint64_t total);
 
 
 /**
@@ -277,12 +276,9 @@ struct GNUNET_TIME_Relative GNUNET_TIME_calculate_eta (struct
  * @param end some absolute time (typically larger or equal to start)
  * @return 0 if start >= end; FOREVER if end==FOREVER; otherwise end - start
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_difference (struct
-                                                                 GNUNET_TIME_Absolute
-                                                                 start,
-                                                                 struct
-                                                                 GNUNET_TIME_Absolute
-                                                                 end);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_absolute_get_difference (struct GNUNET_TIME_Absolute start,
+                                     struct GNUNET_TIME_Absolute end);
 
 /**
  * Get the duration of an operation as the
@@ -291,9 +287,8 @@ struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_difference (struct
  * @param whence some absolute time, typically in the past
  * @return aborts if hence==FOREVER, 0 if hence > now, otherwise now-hence.
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_duration (struct
-                                                               GNUNET_TIME_Absolute
-                                                               whence);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_absolute_get_duration (struct GNUNET_TIME_Absolute whence);
 
 
 /**
@@ -304,12 +299,9 @@ struct GNUNET_TIME_Relative GNUNET_TIME_absolute_get_duration (struct
  * @param duration some relative time to add
  * @return FOREVER if either argument is FOREVER or on overflow; start+duration otherwise
  */
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add (struct
-                                                      GNUNET_TIME_Absolute
-                                                      start,
-                                                      struct
-                                                      GNUNET_TIME_Relative
-                                                      duration);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_add (struct GNUNET_TIME_Absolute start,
+                          struct GNUNET_TIME_Relative duration);
 
 
 /**
@@ -320,12 +312,9 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_add (struct
  * @param duration some relative time to subtract
  * @return ZERO if start <= duration, or FOREVER if start time is FOREVER; start-duration otherwise
  */
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_subtract (struct
-                                                           GNUNET_TIME_Absolute
-                                                           start,
-                                                           struct
-                                                           GNUNET_TIME_Relative
-                                                           duration);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_subtract (struct GNUNET_TIME_Absolute start,
+                               struct GNUNET_TIME_Relative duration);
 
 /**
  * Multiply relative time by a given factor.
@@ -334,10 +323,9 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_subtract (struct
  * @param factor integer to multiply with
  * @return FOREVER if rel=FOREVER or on overflow; otherwise rel*factor
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply (struct
-                                                           GNUNET_TIME_Relative
-                                                           rel,
-                                                           unsigned int factor);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_multiply (struct GNUNET_TIME_Relative rel,
+                               unsigned int factor);
 
 /**
  * Divide relative time by a given factor.
@@ -346,10 +334,9 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_multiply (struct
  * @param factor integer to divide by
  * @return FOREVER if rel=FOREVER or factor==0; otherwise rel/factor
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_divide (struct
-                                                         GNUNET_TIME_Relative
-                                                         rel,
-                                                         unsigned int factor);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_divide (struct GNUNET_TIME_Relative rel,
+                             unsigned int factor);
 
 /**
  * Add relative times together.
@@ -358,10 +345,9 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_divide (struct
  * @param a2 some other relative time
  * @return FOREVER if either argument is FOREVER or on overflow; a1+a2 otherwise
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_add (struct
-                                                      GNUNET_TIME_Relative a1,
-                                                      struct
-                                                      GNUNET_TIME_Relative a2);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_add (struct GNUNET_TIME_Relative a1,
+                          struct GNUNET_TIME_Relative a2);
 
 /**
  * Subtract relative timestamp from the other.
@@ -370,12 +356,9 @@ 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);
 
 
 /**
@@ -384,9 +367,8 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_subtract (struct
  * @param a time to convert
  * @return converted time value
  */
-struct GNUNET_TIME_RelativeNBO GNUNET_TIME_relative_hton (struct
-                                                          GNUNET_TIME_Relative
-                                                          a);
+struct GNUNET_TIME_RelativeNBO
+GNUNET_TIME_relative_hton (struct GNUNET_TIME_Relative a);
 
 /**
  * Convert relative time from network byte order.
@@ -394,9 +376,8 @@ struct GNUNET_TIME_RelativeNBO GNUNET_TIME_relative_hton (struct
  * @param a time to convert
  * @return converted time value
  */
-struct GNUNET_TIME_Relative GNUNET_TIME_relative_ntoh (struct
-                                                       GNUNET_TIME_RelativeNBO
-                                                       a);
+struct GNUNET_TIME_Relative
+GNUNET_TIME_relative_ntoh (struct GNUNET_TIME_RelativeNBO a);
 
 /**
  * Convert relative time to network byte order.
@@ -404,9 +385,8 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_ntoh (struct
  * @param a time to convert
  * @return converted time value
  */
-struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton (struct
-                                                          GNUNET_TIME_Absolute
-                                                          a);
+struct GNUNET_TIME_AbsoluteNBO
+GNUNET_TIME_absolute_hton (struct GNUNET_TIME_Absolute a);
 
 /**
  * Convert relative time from network byte order.
@@ -414,9 +394,8 @@ struct GNUNET_TIME_AbsoluteNBO GNUNET_TIME_absolute_hton (struct
  * @param a time to convert
  * @return converted time value
  */
-struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_ntoh (struct
-                                                       GNUNET_TIME_AbsoluteNBO
-                                                       a);
+struct GNUNET_TIME_Absolute
+GNUNET_TIME_absolute_ntoh (struct GNUNET_TIME_AbsoluteNBO a);
 
 /**
  * Convert a relative time to a string.
@@ -426,14 +405,16 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_ntoh (struct
  *
  * @return string form of the time (as milliseconds)
  */
-const char *GNUNET_TIME_relative_to_string (struct GNUNET_TIME_Relative time);
+const char *
+GNUNET_TIME_relative_to_string (struct GNUNET_TIME_Relative time);
 
 /**
  * Set the timestamp offset for this instance.
  *
  * @param offset the offset to skew the locale time by
  */
-void GNUNET_TIME_set_offset (long long offset);
+void
+GNUNET_TIME_set_offset (long long offset);
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
index 7e0656956e4d47c4742984aa2e5a3817d687eb95..988d55784612e25908d0187d27410039a37b1af6 100644 (file)
@@ -468,18 +468,12 @@ typedef void (*GNUNET_TRANSPORT_AddressLookUpCallback) (void *cls,
  * @param nd function to call on disconnect events
  * @return NULL on error
  */
-struct GNUNET_TRANSPORT_Handle *GNUNET_TRANSPORT_connect (const struct
-                                                          GNUNET_CONFIGURATION_Handle
-                                                          *cfg,
-                                                          const struct
-                                                          GNUNET_PeerIdentity
-                                                          *self, void *cls,
-                                                          GNUNET_TRANSPORT_ReceiveCallback
-                                                          rec,
-                                                          GNUNET_TRANSPORT_NotifyConnect
-                                                          nc,
-                                                          GNUNET_TRANSPORT_NotifyDisconnect
-                                                          nd);
+struct GNUNET_TRANSPORT_Handle *
+GNUNET_TRANSPORT_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                          const struct GNUNET_PeerIdentity *self, void *cls,
+                          GNUNET_TRANSPORT_ReceiveCallback rec,
+                          GNUNET_TRANSPORT_NotifyConnect nc,
+                          GNUNET_TRANSPORT_NotifyDisconnect nd);
 
 
 /**
@@ -487,7 +481,8 @@ struct GNUNET_TRANSPORT_Handle *GNUNET_TRANSPORT_connect (const struct
  *
  * @param handle handle returned from connect
  */
-void GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle);
+void
+GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle);
 
 
 /**
@@ -497,8 +492,9 @@ 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);
 
 
 /**
@@ -510,10 +506,11 @@ void 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);
 
 
 /**
@@ -541,16 +538,13 @@ struct GNUNET_TRANSPORT_TransmitHandle;
  *         non-NULL if the notify callback was queued (can be used to cancel
  *         using GNUNET_TRANSPORT_notify_transmit_ready_cancel)
  */
-struct GNUNET_TRANSPORT_TransmitHandle
-    *GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle
-                                             *handle,
-                                             const struct GNUNET_PeerIdentity
-                                             *target, size_t size,
-                                             uint32_t priority,
-                                             struct GNUNET_TIME_Relative
-                                             timeout,
-                                             GNUNET_CONNECTION_TransmitReadyNotify
-                                             notify, void *notify_cls);
+struct GNUNET_TRANSPORT_TransmitHandle *
+GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle,
+                                        const struct GNUNET_PeerIdentity
+                                        *target, size_t size, uint32_t priority,
+                                        struct GNUNET_TIME_Relative timeout,
+                                        GNUNET_CONNECTION_TransmitReadyNotify
+                                        notify, void *notify_cls);
 
 
 /**
@@ -558,9 +552,10 @@ 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);
 
 
 
@@ -584,9 +579,10 @@ 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);
 
 
 /**
@@ -596,9 +592,10 @@ void 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);
 
 
 /**
@@ -612,9 +609,10 @@ void 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);
 
 
 /**
@@ -630,13 +628,13 @@ void 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);
 
 
 /**
@@ -649,14 +647,14 @@ void GNUNET_TRANSPORT_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_peer_address_lookup (const struct
-                                           GNUNET_CONFIGURATION_Handle *cfg,
-                                           const struct GNUNET_PeerIdentity
-                                           *peer,
-                                           struct GNUNET_TIME_Relative timeout,
-                                           GNUNET_TRANSPORT_AddressLookUpCallback
-                                           peer_address_callback,
-                                           void *peer_address_callback_cls);
+void
+GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle
+                                      *cfg,
+                                      const struct GNUNET_PeerIdentity *peer,
+                                      struct GNUNET_TIME_Relative timeout,
+                                      GNUNET_TRANSPORT_AddressLookUpCallback
+                                      peer_address_callback,
+                                      void *peer_address_callback_cls);
 
 
 /**
@@ -668,12 +666,12 @@ void GNUNET_TRANSPORT_peer_address_lookup (const struct
  * @param peer_address_callback function to call with the results
  * @param peer_address_callback_cls closure for peer_address_callback
  */
-void GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle
-                                       *cfg,
-                                       struct GNUNET_TIME_Relative timeout,
-                                       GNUNET_TRANSPORT_AddressLookUpCallback
-                                       peer_address_callback,
-                                       void *peer_address_callback_cls);
+void
+GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                                  struct GNUNET_TIME_Relative timeout,
+                                  GNUNET_TRANSPORT_AddressLookUpCallback
+                                  peer_address_callback,
+                                  void *peer_address_callback_cls);
 
 
 /**
@@ -708,12 +706,10 @@ typedef int (*GNUNET_TRANSPORT_BlacklistCallback) (void *cls,
  * @param cb_cls closure for cb
  * @return NULL on error, otherwise handle for cancellation
  */
-struct GNUNET_TRANSPORT_Blacklist *GNUNET_TRANSPORT_blacklist (const struct
-                                                               GNUNET_CONFIGURATION_Handle
-                                                               *cfg,
-                                                               GNUNET_TRANSPORT_BlacklistCallback
-                                                               cb,
-                                                               void *cb_cls);
+struct GNUNET_TRANSPORT_Blacklist *
+GNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg,
+                            GNUNET_TRANSPORT_BlacklistCallback cb,
+                            void *cb_cls);
 
 
 /**
@@ -722,7 +718,8 @@ struct GNUNET_TRANSPORT_Blacklist *GNUNET_TRANSPORT_blacklist (const struct
  *
  * @param br handle of the request that is to be cancelled
  */
-void GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br);
+void
+GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br);
 
 
 
index 70e50b3540d24d8e1554fed801180022507e5aef..1ac2ca58eb28dfa294bec80c6e8f5dbd94a91cb2 100644 (file)
@@ -54,10 +54,11 @@ 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,
-                        struct GNUNET_TIME_Relative timeout,
-                        GNUNET_RESOLVER_AddressCallback callback, void *cls);
+int
+GNUNET_UPNP_get_ip (struct GNUNET_CONFIGURATION_Handle *cfg, int domain,
+                    int type, int protocol, uint16_t port,
+                    struct GNUNET_TIME_Relative timeout,
+                    GNUNET_RESOLVER_AddressCallback callback, void *cls);
 
 
 #if 0                           /* keep Emacsens' auto-indent happy */
index 4f9eb5eda4776e28a4c70d5fd7a39000e76ae67e..aa24347316311d703545ac07e8c94ac34a145820 100644 (file)
 
 
 #if !HAVE_ATOLL
-long long atoll (const char *nptr);
+long long
+atoll (const char *nptr);
 #endif
 
 #if ENABLE_NLS
index fe0ca631d54d276d8ca17c3090f3081f63a906b5..0fd6b0813c66ca397582690058b90ea843a7009f 100644 (file)
@@ -213,8 +213,8 @@ connect_mesh_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void churn_peers (void *cls,
-                         const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+churn_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index 6069d40ad5faa6662534c3fd048bd23635cb8139..a037e3b20b94dce6606030afd3e8744eeead427d 100644 (file)
@@ -361,7 +361,8 @@ struct GNUNET_NAT_Handle
  *
  * @param h handle to NAT
  */
-static void start_gnunet_nat_server (struct GNUNET_NAT_Handle *h);
+static void
+start_gnunet_nat_server (struct GNUNET_NAT_Handle *h);
 
 
 /**
@@ -548,8 +549,8 @@ add_ip_to_address_list (struct GNUNET_NAT_Handle *h,
  * @param cls the NAT handle
  * @param tc scheduler context
  */
-static void resolve_dns (void *cls,
-                         const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+resolve_dns (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -585,8 +586,8 @@ process_external_ip (void *cls, const struct sockaddr *addr, socklen_t addrlen)
  * @param cls the NAT handle
  * @param tc scheduler context
  */
-static void resolve_hostname (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+resolve_hostname (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index e88c9ca55a1945e7bd4ff30e62179c30b85f7162..1f5a83d2d8c417d2b732e9ecbf4ed62b09b443a6 100644 (file)
@@ -279,8 +279,8 @@ struct GNUNET_NAT_MiniHandle
  * @param cls the 'struct GNUNET_NAT_MiniHandle'
  * @param tc scheduler context
  */
-static void do_refresh (void *cls,
-                        const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_refresh (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -289,7 +289,8 @@ static void do_refresh (void *cls,
  * @param cls the 'struct GNUNET_NAT_MiniHandle'
  * @param line line of output, NULL at the end
  */
-static void process_map_output (void *cls, const char *line);
+static void
+process_map_output (void *cls, const char *line);
 
 
 /**
@@ -376,8 +377,7 @@ process_refresh_output (void *cls, const char *line)
     return;                     /* skip */
   if (1 !=
       sscanf (line,
-              (mini->
-               is_tcp) ? "%*u TCP  %u->%*s:%*u %*s" :
+              (mini->is_tcp) ? "%*u TCP  %u->%*s:%*u %*s" :
               "%*u UDP  %u->%*s:%*u %*s", &nport))
     return;                     /* skip */
   mini->found = GNUNET_YES;
index df26280c429c201fda21ac28fc8804e7a8969112..4879c591666f6222d1dbd8b07d151ee397e13c62 100644 (file)
@@ -263,8 +263,8 @@ connect_nse_service (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 }
 
 
-static void churn_peers (void *cls,
-                         const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+churn_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index 5f880088fbc9353f445487f02099fcedf95ff4f1..c82180dfdd1a5c4bccc27d8153efe08e49a03115 100644 (file)
@@ -498,8 +498,8 @@ get_transmit_delay (int round_offset)
  * @param cls the 'struct NSEPeerEntry'
  * @param tc scheduler context
  */
-static void transmit_task (void *cls,
-                           const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+transmit_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -545,8 +545,9 @@ transmit_ready (void *cls, size_t size, void *buf)
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
               "In round %llu, sending to `%s' estimate with %u bits\n",
               (unsigned long long)
-              GNUNET_TIME_absolute_ntoh (size_estimate_messages[idx].timestamp).
-              abs_value, GNUNET_i2s (&peer_entry->id),
+              GNUNET_TIME_absolute_ntoh (size_estimate_messages[idx].
+                                         timestamp).abs_value,
+              GNUNET_i2s (&peer_entry->id),
               (unsigned int) ntohl (size_estimate_messages[idx].matching_bits));
 #endif
   if (ntohl (size_estimate_messages[idx].hop_count) == 0)
@@ -861,8 +862,8 @@ verify_message_crypto (const struct GNUNET_NSE_FloodMessage *incoming_flood)
                            incoming_flood->proof_of_work))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Proof of work invalid: %llu!\n"),
-                (unsigned long long) GNUNET_ntohll (incoming_flood->
-                                                    proof_of_work));
+                (unsigned long long)
+                GNUNET_ntohll (incoming_flood->proof_of_work));
     GNUNET_break_op (0);
     return GNUNET_NO;
   }
@@ -959,9 +960,9 @@ handle_p2p_size_estimate (void *cls, const struct GNUNET_PeerIdentity *peer,
     GNUNET_snprintf (pred, sizeof (pred), "%s", GNUNET_i2s (peer));
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Flood at %llu from `%s' via `%s' at `%s' with bits %u\n",
-                (unsigned long long) GNUNET_TIME_absolute_ntoh (incoming_flood->
-                                                                timestamp).
-                abs_value, origin, pred, GNUNET_i2s (&my_identity),
+                (unsigned long long)
+                GNUNET_TIME_absolute_ntoh (incoming_flood->timestamp).abs_value,
+                origin, pred, GNUNET_i2s (&my_identity),
                 (unsigned int) matching_bits);
   }
 #endif
index 8ff0256b9107e880b4d2ab21bad2bcbf3b69ff9a..0eb165fe5c883667d45a2b80f039bbce0d5fe8e8 100644 (file)
@@ -85,8 +85,8 @@ struct GNUNET_NSE_Handle
  * @param cls the handle to the transport service
  * @param tc scheduler context
  */
-static void reconnect (void *cls,
-                       const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+reconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index 4febf2eeb890209c33213989e51f61c322bf05e7..d1af01405df3b0b1366febe82fc885292cfe28c4 100644 (file)
@@ -188,7 +188,8 @@ GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h)
  *
  * @param h handle to the service
  */
-static void trigger_transmit (struct GNUNET_PEERINFO_Handle *h);
+static void
+trigger_transmit (struct GNUNET_PEERINFO_Handle *h);
 
 
 /**
@@ -196,7 +197,8 @@ static void trigger_transmit (struct GNUNET_PEERINFO_Handle *h);
  *
  * @param h handle to the service
  */
-static void reconnect (struct GNUNET_PEERINFO_Handle *h);
+static void
+reconnect (struct GNUNET_PEERINFO_Handle *h);
 
 /**
  * Task scheduled to re-try connecting to the peerinfo service.
index 4ec7b21924354e7b05fcf3ecd0fe3a588c49e25d..9c75b18288f5a3942ab51615351c1307a4b7c55d 100644 (file)
@@ -76,7 +76,8 @@ struct GNUNET_PEERINFO_NotifyContext
  *
  * @param nc our context
  */
-static void request_notifications (struct GNUNET_PEERINFO_NotifyContext *nc);
+static void
+request_notifications (struct GNUNET_PEERINFO_NotifyContext *nc);
 
 
 /**
@@ -85,7 +86,8 @@ static void request_notifications (struct GNUNET_PEERINFO_NotifyContext *nc);
  *
  * @param nc our context
  */
-static void receive_notifications (struct GNUNET_PEERINFO_NotifyContext *nc);
+static void
+receive_notifications (struct GNUNET_PEERINFO_NotifyContext *nc);
 
 
 /**
index f4a71cc21b505f75434740d62e7a96673c5364a8..e117e971c00f3f8cc688dba8940553bfef58193a 100644 (file)
@@ -242,14 +242,16 @@ struct GNUNET_STATISTICS_Handle
 /**
  * Schedule the next action to be performed.
  */
-static void schedule_action (struct GNUNET_STATISTICS_Handle *h);
+static void
+schedule_action (struct GNUNET_STATISTICS_Handle *h);
 
 /**
  * Try to (re)connect to the statistics service.
  *
  * @return GNUNET_YES on success, GNUNET_NO on failure.
  */
-static int try_connect (struct GNUNET_STATISTICS_Handle *ret);
+static int
+try_connect (struct GNUNET_STATISTICS_Handle *ret);
 
 
 static void
@@ -500,8 +502,8 @@ receive_stats (void *cls, const struct GNUNET_MessageHeader *msg)
                   "Processing VALUE done, now reading more\n");
 #endif
       GNUNET_CLIENT_receive (h->client, &receive_stats, h,
-                             GNUNET_TIME_absolute_get_remaining (h->current->
-                                                                 timeout));
+                             GNUNET_TIME_absolute_get_remaining (h->
+                                                                 current->timeout));
       h->backoff = GNUNET_TIME_UNIT_MILLISECONDS;
       return;
     }
@@ -572,8 +574,8 @@ transmit_get (struct GNUNET_STATISTICS_Handle *handle, size_t size, void *buf)
 #endif
     handle->receiving = GNUNET_YES;
     GNUNET_CLIENT_receive (handle->client, &receive_stats, handle,
-                           GNUNET_TIME_absolute_get_remaining (handle->current->
-                                                               timeout));
+                           GNUNET_TIME_absolute_get_remaining (handle->
+                                                               current->timeout));
   }
   return msize;
 }
index 480bafdc669508bcc4ec5419b5ec31fe7fb70346..69b87130300f5ce3ad9f9c805641ed42eabd229a 100644 (file)
@@ -54,7 +54,8 @@ static int phase;
  * Run the next phase of starting daemons, connecting them and
  * stopping them again.
  */
-static void run_phase ();
+static void
+run_phase ();
 
 static void
 end2_cb (void *cls, const char *emsg)
index c107ec5933fd95b7081b67a8ff29624ce54f29af..3a712f0719b7495c1f053e9776368779611bf38d 100644 (file)
@@ -164,8 +164,8 @@ process_hello (void *cls, const struct GNUNET_MessageHeader *message)
 #endif
 }
 
-static void start_fsm (void *cls,
-                       const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 #if WAIT_FOR_HELLO
 /**
@@ -195,10 +195,9 @@ testing_init (void *cls, struct GNUNET_CORE_Handle *server,
     d->server = NULL;
     if (GNUNET_YES == d->dead)
       GNUNET_TESTING_daemon_stop (d,
-                                  GNUNET_TIME_absolute_get_remaining (d->
-                                                                      max_timeout),
-                                  d->dead_cb, d->dead_cb_cls, GNUNET_YES,
-                                  GNUNET_NO);
+                                  GNUNET_TIME_absolute_get_remaining
+                                  (d->max_timeout), d->dead_cb, d->dead_cb_cls,
+                                  GNUNET_YES, GNUNET_NO);
     else if (NULL != d->cb)
       d->cb (d->cb_cls, NULL, d->cfg, d,
              _("Failed to connect to core service\n"));
@@ -233,10 +232,9 @@ testing_init (void *cls, struct GNUNET_CORE_Handle *server,
   {
     if (GNUNET_YES == d->dead)
       GNUNET_TESTING_daemon_stop (d,
-                                  GNUNET_TIME_absolute_get_remaining (d->
-                                                                      max_timeout),
-                                  d->dead_cb, d->dead_cb_cls, GNUNET_YES,
-                                  GNUNET_NO);
+                                  GNUNET_TIME_absolute_get_remaining
+                                  (d->max_timeout), d->dead_cb, d->dead_cb_cls,
+                                  GNUNET_YES, GNUNET_NO);
     else if (NULL != d->cb)
       d->cb (d->cb_cls, &d->id, d->cfg, d,
              _("Failed to connect to transport service!\n"));
@@ -349,8 +347,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         if (NULL != cb)
           cb (d->cb_cls, NULL, d->cfg, d,
               (NULL ==
-               d->
-               hostname) ?
+               d->hostname) ?
               _("Failed to create pipe for `gnunet-peerinfo' process.\n") :
               _("Failed to create pipe for `ssh' process.\n"));
         return;
@@ -415,9 +412,8 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         if (NULL != cb)
           cb (d->cb_cls, NULL, d->cfg, d,
               (NULL ==
-               d->
-               hostname) ? _("Failed to start `gnunet-peerinfo' process.\n") :
-              _("Failed to start `ssh' process.\n"));
+               d->hostname) ? _("Failed to start `gnunet-peerinfo' process.\n")
+              : _("Failed to start `ssh' process.\n"));
         GNUNET_DISK_pipe_close (d->pipe_stdout);
         return;
       }
@@ -429,9 +425,9 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       d->task =
           GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_absolute_get_remaining
                                           (d->max_timeout),
-                                          GNUNET_DISK_pipe_handle (d->
-                                                                   pipe_stdout,
-                                                                   GNUNET_DISK_PIPE_END_READ),
+                                          GNUNET_DISK_pipe_handle
+                                          (d->pipe_stdout,
+                                           GNUNET_DISK_PIPE_END_READ),
                                           &start_fsm, d);
     }
     else                        /* Already have a hostkey! */
@@ -464,9 +460,9 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       d->task =
           GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_absolute_get_remaining
                                           (d->max_timeout),
-                                          GNUNET_DISK_pipe_handle (d->
-                                                                   pipe_stdout,
-                                                                   GNUNET_DISK_PIPE_END_READ),
+                                          GNUNET_DISK_pipe_handle
+                                          (d->pipe_stdout,
+                                           GNUNET_DISK_PIPE_END_READ),
                                           &start_fsm, d);
       return;
     }
@@ -614,8 +610,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       if (NULL != cb)
         cb (d->cb_cls, NULL, d->cfg, d,
             (NULL ==
-             d->
-             hostname) ? _("Failed to start `gnunet-arm' process.\n") :
+             d->hostname) ? _("Failed to start `gnunet-arm' process.\n") :
             _("Failed to start `ssh' process.\n"));
       return;
     }
@@ -639,8 +634,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         if (NULL != cb)
           cb (d->cb_cls, NULL, d->cfg, d,
               (NULL ==
-               d->
-               hostname) ? _("`gnunet-arm' does not seem to terminate.\n") :
+               d->hostname) ? _("`gnunet-arm' does not seem to terminate.\n") :
               _("`ssh' does not seem to terminate.\n"));
         GNUNET_CONFIGURATION_destroy (d->cfg);
         GNUNET_free (d->cfgfile);
@@ -698,10 +692,9 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     {
       if (GNUNET_YES == d->dead)
         GNUNET_TESTING_daemon_stop (d,
-                                    GNUNET_TIME_absolute_get_remaining (d->
-                                                                        max_timeout),
-                                    d->dead_cb, d->dead_cb_cls, GNUNET_YES,
-                                    GNUNET_NO);
+                                    GNUNET_TIME_absolute_get_remaining
+                                    (d->max_timeout), d->dead_cb,
+                                    d->dead_cb_cls, GNUNET_YES, GNUNET_NO);
       else if (NULL != d->cb)
         d->cb (d->cb_cls, &d->id, d->cfg, d,
                _("Failed to connect to transport service!\n"));
@@ -763,8 +756,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         if (NULL != cb)
           cb (d->cb_cls, NULL, d->cfg, d,
               (NULL ==
-               d->
-               hostname) ? _("`gnunet-arm' does not seem to terminate.\n") :
+               d->hostname) ? _("`gnunet-arm' does not seem to terminate.\n") :
               _("`ssh' does not seem to terminate.\n"));
         return;
       }
@@ -782,8 +774,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       if (NULL != cb)
         cb (d->cb_cls, NULL, d->cfg, d,
             (NULL ==
-             d->
-             hostname) ?
+             d->hostname) ?
             _
             ("`gnunet-arm' terminated with non-zero exit status (or timed out)!\n")
             : _("`ssh' does not seem to terminate.\n"));
@@ -1946,9 +1937,9 @@ struct ConnectContext
 
 
 /** Forward declaration **/
-static void reattempt_daemons_connect (void *cls,
-                                       const struct GNUNET_SCHEDULER_TaskContext
-                                       *tc);
+static void
+reattempt_daemons_connect (void *cls,
+                           const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
index d03cb307b396240c5b98c9f16321614b0ae962bc..88c51abe031a457827d115d5c44fe03249580a58 100644 (file)
@@ -1630,19 +1630,23 @@ remove_connections (struct GNUNET_TESTING_PeerGroup *pg, unsigned int first,
   }
 #else
   if (GNUNET_YES ==
-      GNUNET_CONTAINER_multihashmap_contains (pg->peers[first].
-                                              blacklisted_peers, &hash_second))
+      GNUNET_CONTAINER_multihashmap_contains (pg->
+                                              peers[first].blacklisted_peers,
+                                              &hash_second))
   {
-    GNUNET_CONTAINER_multihashmap_remove_all (pg->peers[first].
-                                              blacklisted_peers, &hash_second);
+    GNUNET_CONTAINER_multihashmap_remove_all (pg->
+                                              peers[first].blacklisted_peers,
+                                              &hash_second);
   }
 
   if (GNUNET_YES ==
-      GNUNET_CONTAINER_multihashmap_contains (pg->peers[second].
-                                              blacklisted_peers, &hash_first))
+      GNUNET_CONTAINER_multihashmap_contains (pg->
+                                              peers[second].blacklisted_peers,
+                                              &hash_first))
   {
-    GNUNET_CONTAINER_multihashmap_remove_all (pg->peers[second].
-                                              blacklisted_peers, &hash_first);
+    GNUNET_CONTAINER_multihashmap_remove_all (pg->
+                                              peers[second].blacklisted_peers,
+                                              &hash_first);
   }
 #endif
 
@@ -2864,8 +2868,8 @@ create_and_copy_friend_files (struct GNUNET_TESTING_PeerGroup *pg)
     conn_iter = pg->peers[pg_iter].allowed_peers_head;
     while (conn_iter != NULL)
     {
-      GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->id.
-                                 hashPubKey, &peer_enc);
+      GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->
+                                 id.hashPubKey, &peer_enc);
       fprintf (temp_friend_handle, "%s\n", (char *) &peer_enc);
       conn_iter = conn_iter->next;
     }
@@ -3051,15 +3055,16 @@ create_and_copy_blacklist_files (struct GNUNET_TESTING_PeerGroup *pg,
         conn_iter = pg->peers[pg_iter].blacklisted_peers_head;
         while (conn_iter != NULL)
         {
-          GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->id.
-                                     hashPubKey, &peer_enc);
+          GNUNET_CRYPTO_hash_to_enc (&pg->peers[conn_iter->index].daemon->
+                                     id.hashPubKey, &peer_enc);
           fprintf (temp_file_handle, "%s:%s\n", pos, (char *) &peer_enc);
           conn_iter = conn_iter->next;
         }
 #else
         blacklist_ctx.transport = pos;
-        (void) GNUNET_CONTAINER_multihashmap_iterate (pg->peers[pg_iter].
-                                                      blacklisted_peers,
+        (void) GNUNET_CONTAINER_multihashmap_iterate (pg->
+                                                      peers
+                                                      [pg_iter].blacklisted_peers,
                                                       &blacklist_file_iterator,
                                                       &blacklist_ctx);
 #endif
@@ -3176,8 +3181,8 @@ create_and_copy_blacklist_files (struct GNUNET_TESTING_PeerGroup *pg,
 }
 
 /* Forward Declaration */
-static void schedule_connect (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+schedule_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Choose a random peer's next connection to create, and
@@ -3216,9 +3221,8 @@ preschedule_connect (struct GNUNET_TESTING_PeerGroup *pg)
 
 #if USE_SEND_HELLOS
 /* Forward declaration */
-static void schedule_send_hellos (void *cls,
-                                  const struct GNUNET_SCHEDULER_TaskContext
-                                  *tc);
+static void
+schedule_send_hellos (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Close connections and free the hello context.
@@ -3319,19 +3323,19 @@ send_core_connect_requests (void *cls,
     conn = send_hello_context->peer->connect_peers_head;
     while (conn != NULL)
     {
-      GNUNET_CORE_peer_request_connect (send_hello_context->peer->daemon->
-                                        server,
-                                        &send_hello_context->pg->peers[conn->
-                                                                       index].
-                                        daemon->id, NULL, NULL);
+      GNUNET_CORE_peer_request_connect (send_hello_context->peer->
+                                        daemon->server,
+                                        &send_hello_context->pg->
+                                        peers[conn->index].daemon->id, NULL,
+                                        NULL);
       conn = conn->next;
     }
     send_hello_context->core_connect_task =
         GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_divide
-                                      (send_hello_context->pg->ct_ctx.
-                                       connect_timeout,
-                                       send_hello_context->pg->ct_ctx.
-                                       connect_attempts),
+                                      (send_hello_context->pg->
+                                       ct_ctx.connect_timeout,
+                                       send_hello_context->pg->
+                                       ct_ctx.connect_attempts),
                                       &send_core_connect_requests,
                                       send_hello_context);
   }
@@ -3522,10 +3526,10 @@ hello_sent_callback (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 
     send_hello_context->core_connect_task =
         GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_divide
-                                      (send_hello_context->pg->ct_ctx.
-                                       connect_timeout,
-                                       send_hello_context->pg->ct_ctx.
-                                       connect_attempts),
+                                      (send_hello_context->pg->
+                                       ct_ctx.connect_timeout,
+                                       send_hello_context->pg->
+                                       ct_ctx.connect_attempts),
                                       &send_core_connect_requests,
                                       send_hello_context);
   }
@@ -3584,14 +3588,14 @@ schedule_send_hellos (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 _("Offering Hello of peer %s to peer %s\n"),
                 send_hello_context->peer->daemon->shortname,
-                pg->peers[send_hello_context->peer_pos->index].daemon->
-                shortname);
+                pg->peers[send_hello_context->peer_pos->index].
+                daemon->shortname);
 #endif
     GNUNET_TRANSPORT_offer_hello (send_hello_context->peer->daemon->th,
-                                  (const struct GNUNET_MessageHeader *) pg->
-                                  peers[send_hello_context->peer_pos->index].
-                                  daemon->hello, &hello_sent_callback,
-                                  send_hello_context);
+                                  (const struct GNUNET_MessageHeader *)
+                                  pg->peers[send_hello_context->peer_pos->
+                                            index].daemon->hello,
+                                  &hello_sent_callback, send_hello_context);
     send_hello_context->peer_pos = send_hello_context->peer_pos->next;
     GNUNET_assert (send_hello_context->peer->daemon->th != NULL);
   }
@@ -3647,10 +3651,12 @@ internal_connect_notify (void *cls, const struct GNUNET_PeerIdentity *first,
                              second_cfg, first_cfg, second_daemon, first_daemon,
                              emsg);
 
-    GNUNET_CONTAINER_DLL_remove (pg->peers[connect_ctx->second_index].
-                                 connect_peers_head,
-                                 pg->peers[connect_ctx->second_index].
-                                 connect_peers_tail, connection);
+    GNUNET_CONTAINER_DLL_remove (pg->
+                                 peers[connect_ctx->
+                                       second_index].connect_peers_head,
+                                 pg->peers[connect_ctx->
+                                           second_index].connect_peers_tail,
+                                 connection);
     GNUNET_free (connection);
   }
 
@@ -3711,10 +3717,10 @@ schedule_connect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 #endif
     pg->outstanding_connects++;
     pg->total_connects_scheduled++;
-    GNUNET_TESTING_daemons_connect (pg->peers[connect_context->first_index].
-                                    daemon,
-                                    pg->peers[connect_context->second_index].
-                                    daemon,
+    GNUNET_TESTING_daemons_connect (pg->
+                                    peers[connect_context->first_index].daemon,
+                                    pg->peers[connect_context->
+                                              second_index].daemon,
                                     connect_context->ct_ctx->connect_timeout,
                                     connect_context->ct_ctx->connect_attempts,
 #if USE_SEND_HELLOS
@@ -4224,8 +4230,8 @@ random_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
   if (random_number < random_ctx->percentage)
   {
     GNUNET_assert (GNUNET_OK ==
-                   GNUNET_CONTAINER_multihashmap_put (random_ctx->first->
-                                                      connect_peers_working_set,
+                   GNUNET_CONTAINER_multihashmap_put (random_ctx->
+                                                      first->connect_peers_working_set,
                                                       key, value,
                                                       GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
   }
@@ -4235,12 +4241,12 @@ random_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
   hash_from_uid (random_ctx->first_uid, &first_hash);
   GNUNET_assert (random_ctx->pg->total > second_pos);
   GNUNET_assert (GNUNET_YES ==
-                 GNUNET_CONTAINER_multihashmap_remove (random_ctx->pg->
-                                                       peers[second_pos].
-                                                       connect_peers,
+                 GNUNET_CONTAINER_multihashmap_remove (random_ctx->
+                                                       pg->peers
+                                                       [second_pos].connect_peers,
                                                        &first_hash,
-                                                       random_ctx->first->
-                                                       daemon));
+                                                       random_ctx->
+                                                       first->daemon));
 
   return GNUNET_YES;
 }
@@ -4270,29 +4276,29 @@ minimum_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
       if (min_ctx->pg_array[i] == min_ctx->current)
       {
         GNUNET_assert (GNUNET_OK ==
-                       GNUNET_CONTAINER_multihashmap_put (min_ctx->first->
-                                                          connect_peers_working_set,
+                       GNUNET_CONTAINER_multihashmap_put (min_ctx->
+                                                          first->connect_peers_working_set,
                                                           key, value,
                                                           GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
         uid_from_hash (key, &second_pos);
         hash_from_uid (min_ctx->first_uid, &first_hash);
         GNUNET_assert (min_ctx->pg->total > second_pos);
         GNUNET_assert (GNUNET_OK ==
-                       GNUNET_CONTAINER_multihashmap_put (min_ctx->pg->
-                                                          peers[second_pos].
-                                                          connect_peers_working_set,
+                       GNUNET_CONTAINER_multihashmap_put (min_ctx->
+                                                          pg->peers
+                                                          [second_pos].connect_peers_working_set,
                                                           &first_hash,
-                                                          min_ctx->
-                                                          first->daemon,
+                                                          min_ctx->first->
+                                                          daemon,
                                                           GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
         /* Now we have added this particular connection, remove it from the second peer's map so it's not double counted */
         GNUNET_assert (GNUNET_YES ==
-                       GNUNET_CONTAINER_multihashmap_remove (min_ctx->pg->
-                                                             peers[second_pos].
-                                                             connect_peers,
+                       GNUNET_CONTAINER_multihashmap_remove (min_ctx->
+                                                             pg->peers
+                                                             [second_pos].connect_peers,
                                                              &first_hash,
-                                                             min_ctx->first->
-                                                             daemon));
+                                                             min_ctx->
+                                                             first->daemon));
       }
     }
     min_ctx->current++;
@@ -4321,28 +4327,26 @@ dfs_connect_iterator (void *cls, const GNUNET_HashCode * key, void *value)
   if (dfs_ctx->current == dfs_ctx->chosen)
   {
     GNUNET_assert (GNUNET_OK ==
-                   GNUNET_CONTAINER_multihashmap_put (dfs_ctx->first->
-                                                      connect_peers_working_set,
+                   GNUNET_CONTAINER_multihashmap_put (dfs_ctx->
+                                                      first->connect_peers_working_set,
                                                       key, value,
                                                       GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
     uid_from_hash (key, &dfs_ctx->second_uid);
     hash_from_uid (dfs_ctx->first_uid, &first_hash);
     GNUNET_assert (GNUNET_OK ==
-                   GNUNET_CONTAINER_multihashmap_put (dfs_ctx->pg->
-                                                      peers
-                                                      [dfs_ctx->second_uid].
-                                                      connect_peers_working_set,
+                   GNUNET_CONTAINER_multihashmap_put (dfs_ctx->
+                                                      pg->peers[dfs_ctx->
+                                                                second_uid].connect_peers_working_set,
                                                       &first_hash,
                                                       dfs_ctx->first->daemon,
                                                       GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY));
     GNUNET_assert (GNUNET_YES ==
-                   GNUNET_CONTAINER_multihashmap_remove (dfs_ctx->pg->
-                                                         peers[dfs_ctx->
-                                                               second_uid].
-                                                         connect_peers,
+                   GNUNET_CONTAINER_multihashmap_remove (dfs_ctx->
+                                                         pg->peers
+                                                         [dfs_ctx->second_uid].connect_peers,
                                                          &first_hash,
-                                                         dfs_ctx->first->
-                                                         daemon));
+                                                         dfs_ctx->
+                                                         first->daemon));
     /* Can't remove second from first yet because we are currently iterating, hence the return value in the DFSContext! */
     return GNUNET_NO;           /* We have found our peer, don't iterate more */
   }
@@ -4469,8 +4473,9 @@ count_workingset_connections (struct GNUNET_TESTING_PeerGroup *pg)
     }
 #else
     count +=
-        GNUNET_CONTAINER_multihashmap_size (pg->peers[pg_iter].
-                                            connect_peers_working_set);
+        GNUNET_CONTAINER_multihashmap_size (pg->
+                                            peers
+                                            [pg_iter].connect_peers_working_set);
 #endif
   }
 
@@ -4561,10 +4566,8 @@ choose_minimum (struct GNUNET_TESTING_PeerGroup *pg, unsigned int num)
     minimum_ctx.first_uid = pg_iter;
     minimum_ctx.pg_array =
         GNUNET_CRYPTO_random_permute (GNUNET_CRYPTO_QUALITY_WEAK,
-                                      GNUNET_CONTAINER_multihashmap_size (pg->
-                                                                          peers
-                                                                          [pg_iter].
-                                                                          connect_peers));
+                                      GNUNET_CONTAINER_multihashmap_size
+                                      (pg->peers[pg_iter].connect_peers));
     minimum_ctx.first = &pg->peers[pg_iter];
     minimum_ctx.pg = pg;
     minimum_ctx.num_to_add = num;
@@ -4654,13 +4657,13 @@ find_closest_peers (void *cls, const GNUNET_HashCode * key, void *value)
          &closest_ctx->curr_peer->daemon->id.hashPubKey) >
         closest_ctx->closest_dist)) &&
       (GNUNET_YES !=
-       GNUNET_CONTAINER_multihashmap_contains (closest_ctx->curr_peer->
-                                               connect_peers, key)))
+       GNUNET_CONTAINER_multihashmap_contains (closest_ctx->
+                                               curr_peer->connect_peers, key)))
   {
     closest_ctx->closest_dist =
         GNUNET_CRYPTO_hash_matching_bits (&daemon->id.hashPubKey,
-                                          &closest_ctx->curr_peer->daemon->id.
-                                          hashPubKey);
+                                          &closest_ctx->curr_peer->daemon->
+                                          id.hashPubKey);
     closest_ctx->closest = daemon;
     uid_from_hash (key, &closest_ctx->closest_num);
   }
@@ -4747,8 +4750,8 @@ perform_dfs (struct GNUNET_TESTING_PeerGroup *pg, unsigned int num)
       for (pg_iter = 0; pg_iter < pg->total; pg_iter++)
       {
         temp_count =
-            count_connections (pg->peers[pg_iter].
-                               connect_peers_working_set_head);
+            count_connections (pg->
+                               peers[pg_iter].connect_peers_working_set_head);
         if (temp_count < least_connections)
         {
           starting_peer = pg_iter;
@@ -4802,8 +4805,9 @@ perform_dfs (struct GNUNET_TESTING_PeerGroup *pg, unsigned int num)
         {
           starting_peer = pg_iter;
           least_connections =
-              GNUNET_CONTAINER_multihashmap_size (pg->peers[pg_iter].
-                                                  connect_peers_working_set);
+              GNUNET_CONTAINER_multihashmap_size (pg->
+                                                  peers
+                                                  [pg_iter].connect_peers_working_set);
         }
       }
     }
@@ -4817,28 +4821,25 @@ perform_dfs (struct GNUNET_TESTING_PeerGroup *pg, unsigned int num)
     /* Choose a random peer from the chosen peers set of connections to add */
     dfs_ctx.chosen =
         GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_WEAK,
-                                  GNUNET_CONTAINER_multihashmap_size (pg->
-                                                                      peers
-                                                                      [starting_peer].
-                                                                      connect_peers));
+                                  GNUNET_CONTAINER_multihashmap_size (pg->peers
+                                                                      [starting_peer].connect_peers));
     dfs_ctx.first_uid = starting_peer;
     dfs_ctx.first = &pg->peers[starting_peer];
     dfs_ctx.pg = pg;
     dfs_ctx.current = 0;
 
-    GNUNET_CONTAINER_multihashmap_iterate (pg->peers[starting_peer].
-                                           connect_peers, &dfs_connect_iterator,
-                                           &dfs_ctx);
+    GNUNET_CONTAINER_multihashmap_iterate (pg->
+                                           peers[starting_peer].connect_peers,
+                                           &dfs_connect_iterator, &dfs_ctx);
     /* Remove the second from the first, since we will be continuing the search and may encounter the first peer again! */
     hash_from_uid (dfs_ctx.second_uid, &second_hash);
     GNUNET_assert (GNUNET_YES ==
-                   GNUNET_CONTAINER_multihashmap_remove (pg->
-                                                         peers[starting_peer].
-                                                         connect_peers,
+                   GNUNET_CONTAINER_multihashmap_remove (pg->peers
+                                                         [starting_peer].connect_peers,
                                                          &second_hash,
-                                                         pg->peers[dfs_ctx.
-                                                                   second_uid].
-                                                         daemon));
+                                                         pg->
+                                                         peers
+                                                         [dfs_ctx.second_uid].daemon));
     starting_peer = dfs_ctx.second_uid;
   }
 
@@ -5620,8 +5621,8 @@ schedule_churn_restart (void *cls,
   {
     if (startup_ctx->churn_ctx->service != NULL)
       GNUNET_TESTING_daemon_start_stopped_service (peer_restart_ctx->daemon,
-                                                   startup_ctx->churn_ctx->
-                                                   service,
+                                                   startup_ctx->
+                                                   churn_ctx->service,
                                                    startup_ctx->timeout,
                                                    &churn_start_callback,
                                                    startup_ctx);
@@ -5880,9 +5881,8 @@ call_hostkey_callbacks (void *cls,
   for (i = 0; i < pg->total; i++)
   {
     if (pg->peers[i].internal_context.hostkey_callback != NULL)
-      pg->peers[i].internal_context.hostkey_callback (pg->
-                                                      peers[i].internal_context.
-                                                      hostkey_cls,
+      pg->peers[i].internal_context.hostkey_callback (pg->peers[i].
+                                                      internal_context.hostkey_cls,
                                                       &pg->peers[i].daemon->id,
                                                       pg->peers[i].daemon,
                                                       NULL);
index a76c7cc2699d7a53d4d4f8b92a1c97ce42cc9dda..ba25a62bd6ef7a029ce0afab508bf064366c9adc 100644 (file)
@@ -346,12 +346,12 @@ internal_topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
     /* Get duration in seconds */
     duration =
         GNUNET_TIME_absolute_get_difference (connect_last_time,
-                                             GNUNET_TIME_absolute_get ()).
-        rel_value / 1000;
+                                             GNUNET_TIME_absolute_get
+                                             ()).rel_value / 1000;
     total_duration =
         GNUNET_TIME_absolute_get_difference (connect_start_time,
-                                             GNUNET_TIME_absolute_get ()).
-        rel_value / 1000;
+                                             GNUNET_TIME_absolute_get
+                                             ()).rel_value / 1000;
 
     failed_conns_per_sec_recent = (double) new_failed_connections / duration;
     failed_conns_per_sec_total = (double) failed_connections / total_duration;
@@ -422,8 +422,8 @@ internal_topology_callback (void *cls, const struct GNUNET_PeerIdentity *first,
 #if TIMING
     total_duration =
         GNUNET_TIME_absolute_get_difference (connect_start_time,
-                                             GNUNET_TIME_absolute_get ()).
-        rel_value / 1000;
+                                             GNUNET_TIME_absolute_get
+                                             ()).rel_value / 1000;
     failed_conns_per_sec_total = (double) failed_connections / total_duration;
     conns_per_sec_total = (double) total_connections / total_duration;
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -493,10 +493,8 @@ internal_peers_started_callback (void *cls,
       pg_start_ctx->expected_connections =
           GNUNET_TESTING_connect_topology (pg_start_ctx->pg,
                                            pg_start_ctx->connect_topology,
-                                           pg_start_ctx->
-                                           connect_topology_option,
-                                           pg_start_ctx->
-                                           connect_topology_option_modifier,
+                                           pg_start_ctx->connect_topology_option,
+                                           pg_start_ctx->connect_topology_option_modifier,
                                            DEFAULT_CONNECT_TIMEOUT,
                                            pg_start_ctx->connect_attempts, NULL,
                                            NULL);
@@ -736,8 +734,7 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_number (cfg, "testing",
                                              "max_outstanding_connections",
-                                             &pg_start_ctx->
-                                             max_concurrent_connections))
+                                             &pg_start_ctx->max_concurrent_connections))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Must provide option %s:%s!\n",
                 "testing", "max_outstanding_connections");
@@ -857,8 +854,8 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
                                               "connect_topology_option",
                                               &temp_str)) &&
       (GNUNET_NO ==
-       GNUNET_TESTING_topology_option_get (&pg_start_ctx->
-                                           connect_topology_option, temp_str)))
+       GNUNET_TESTING_topology_option_get
+       (&pg_start_ctx->connect_topology_option, temp_str)))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                 "Invalid connect topology option `%s' given for section %s option %s\n",
@@ -889,8 +886,7 @@ GNUNET_TESTING_peergroup_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
   if (GNUNET_YES !=
       GNUNET_CONFIGURATION_get_value_string (cfg, "testing",
                                              "blacklist_transports",
-                                             &pg_start_ctx->
-                                             restrict_transports))
+                                             &pg_start_ctx->restrict_transports))
     pg_start_ctx->restrict_transports = NULL;
 
   pg_start_ctx->restrict_topology = GNUNET_TESTING_TOPOLOGY_NONE;
index 8f86619fd3dc8d033fbe2641c2c96297ec024b74..4db7ce6d29b6742bff2fc658c39a39ac19e9f77d 100644 (file)
@@ -355,9 +355,8 @@ free_peer (void *cls, const GNUNET_HashCode * pid, void *value)
  * @param cls 'struct Peer' to greylist
  * @param tc scheduler context
  */
-static void remove_from_greylist (void *cls,
-                                  const struct GNUNET_SCHEDULER_TaskContext
-                                  *tc);
+static void
+remove_from_greylist (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -503,7 +502,8 @@ setup_filter (struct Peer *peer)
  * @param buf where the callee should write the message
  * @return number of bytes written to buf
  */
-static size_t hello_advertising_ready (void *cls, size_t size, void *buf);
+static size_t
+hello_advertising_ready (void *cls, size_t size, void *buf);
 
 
 /**
@@ -921,8 +921,8 @@ process_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
       }
       if ((!pos->is_connected) && (!pos->is_friend) &&
           (0 ==
-           GNUNET_TIME_absolute_get_remaining (pos->greylisted_until).
-           rel_value))
+           GNUNET_TIME_absolute_get_remaining (pos->
+                                               greylisted_until).rel_value))
         free_peer (NULL, &pos->pid.hashPubKey, pos);
     }
     return;
@@ -1056,8 +1056,8 @@ read_friends_file (const struct GNUNET_CONFIGURATION_Handle *cfg)
   {
     memcpy (&enc, &data[pos], sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded));
     if (!isspace
-        ((unsigned char) enc.
-         encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
+        ((unsigned char)
+         enc.encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   _
index 6c2b396dca663e8e4f1419d66ebb66dc53857f54..95f181835a24d7e002b26da7040edb2bdf994814 100644 (file)
@@ -218,8 +218,8 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
       ret =
           GST_neighbours_calculate_receive_delay (peer,
                                                   (message ==
-                                                   NULL) ? 0 : ntohs (message->
-                                                                      size),
+                                                   NULL) ? 0 :
+                                                  ntohs (message->size),
                                                   &do_forward);
       if (do_forward == GNUNET_YES)
         GST_clients_broadcast (message, GNUNET_YES);
index 5b0a58fac5c5b7d908757171af47e5509ebebe09..d6b5ac23f20a70497094e48690b97e6c8f5e3c0b 100644 (file)
@@ -953,7 +953,8 @@ struct GNUNET_TIME_Relative ats_regular_interval;
  *        disconnected or must we ask all plugins to
  *        disconnect?
  */
-static void disconnect_neighbour (struct NeighbourMapEntry *n, int check);
+static void
+disconnect_neighbour (struct NeighbourMapEntry *n, int check);
 
 /**
  * Check the ready list for the given neighbour and if a plugin is
@@ -961,10 +962,11 @@ static void disconnect_neighbour (struct NeighbourMapEntry *n, int check);
  *
  * @param nexi target peer for which to transmit
  */
-static void try_transmission_to_peer (struct NeighbourMapEntry *n);
+static void
+try_transmission_to_peer (struct NeighbourMapEntry *n);
 
-struct ForeignAddressList *get_preferred_ats_address (struct NeighbourMapEntry
-                                                      *n);
+struct ForeignAddressList *
+get_preferred_ats_address (struct NeighbourMapEntry *n);
 
 /**
  * Find an entry in the neighbour list for a particular peer.
@@ -1223,8 +1225,8 @@ read_blacklist_file (const struct GNUNET_CONFIGURATION_Handle *cfg)
 #endif
     memcpy (&enc, &data[pos], sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded));
     if (!isspace
-        ((unsigned char) enc.
-         encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
+        ((unsigned char)
+         enc.encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   _
@@ -1523,7 +1525,8 @@ transmit_send_ok (struct TransportClient *client, struct NeighbourMapEntry *n,
  *
  * @param fal address to set to 'connected'
  */
-static void mark_address_connected (struct ForeignAddressList *fal);
+static void
+mark_address_connected (struct ForeignAddressList *fal);
 
 
 
@@ -1939,8 +1942,8 @@ mark_address_connected (struct ForeignAddressList *fal)
   /* Have an inbound connection to this peer which is valid; our id is lower, ignore outbound connection! */
   if ((inbound != NULL) && (0 != fal->addrlen) &&
       (1 ==
-       GNUNET_CRYPTO_hash_xorcmp (&inbound->ready_list->neighbour->
-                                  id.hashPubKey, &my_identity.hashPubKey,
+       GNUNET_CRYPTO_hash_xorcmp (&inbound->ready_list->neighbour->id.
+                                  hashPubKey, &my_identity.hashPubKey,
                                   &null_hash)))
   {
 #if DEBUG_INBOUND
@@ -1951,8 +1954,8 @@ mark_address_connected (struct ForeignAddressList *fal)
   }
   else if ((outbound != NULL) && (0 == fal->addrlen) &&
            ((-1 ==
-             GNUNET_CRYPTO_hash_xorcmp (&outbound->ready_list->neighbour->id.
-                                        hashPubKey, &my_identity.hashPubKey,
+             GNUNET_CRYPTO_hash_xorcmp (&outbound->ready_list->neighbour->
+                                        id.hashPubKey, &my_identity.hashPubKey,
                                         &null_hash))))
   {
 #if DEBUG_INBOUND
@@ -2056,10 +2059,10 @@ find_ready_address (struct NeighbourMapEntry *neighbour)
       if (((best_address == NULL) || (addresses->connected == GNUNET_YES) ||
            (best_address->connected == GNUNET_NO)) &&
           (addresses->in_transmit == GNUNET_NO) && ((best_address == NULL) ||
-                                                    (addresses->latency.
-                                                     rel_value <
-                                                     best_address->latency.
-                                                     rel_value)))
+                                                    (addresses->
+                                                     latency.rel_value <
+                                                     best_address->
+                                                     latency.rel_value)))
         best_address = addresses;
       /* FIXME: also give lower-latency addresses that are not
        * connected a chance some times... */
@@ -2960,7 +2963,8 @@ neighbour_timeout_task (void *cls,
  *
  * @param fal address to PING
  */
-static void schedule_next_ping (struct ForeignAddressList *fal);
+static void
+schedule_next_ping (struct ForeignAddressList *fal);
 
 
 /**
@@ -3295,8 +3299,8 @@ static struct BlacklistCheck *bc_tail;
  * @param cls the 'struct BlacklistCheck*'
  * @param tc unused
  */
-static void do_blacklist_check (void *cls,
-                                const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_blacklist_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Transmit blacklist query to the client.
@@ -3633,9 +3637,8 @@ send_periodic_ping (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                 "Some validation of address `%s' via `%s' for peer `%4s' already in progress.\n",
                 (peer_address->addr != NULL) ? a2s (tp->short_name,
                                                     peer_address->addr,
-                                                    peer_address->
-                                                    addrlen) : "<inbound>",
-                tp->short_name, GNUNET_i2s (&neighbour->id));
+                                                    peer_address->addrlen) :
+                "<inbound>", tp->short_name, GNUNET_i2s (&neighbour->id));
 #endif
     schedule_next_ping (peer_address);
     return;
@@ -4065,8 +4068,9 @@ check_pending_validation (void *cls, const GNUNET_HashCode * key, void *value)
                               GNUNET_NO);
     fal->latency = GNUNET_TIME_absolute_get_duration (ve->send_time);
     update_addr_value (fal,
-                       GNUNET_TIME_absolute_get_duration (ve->send_time).
-                       rel_value, GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
+                       GNUNET_TIME_absolute_get_duration (ve->
+                                                          send_time).rel_value,
+                       GNUNET_TRANSPORT_ATS_QUALITY_NET_DELAY);
 
     schedule_next_ping (fal);
     if (n->latency.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
@@ -4571,8 +4575,8 @@ process_hello (struct TransportPlugin *plugin,
   chvc = chvc_head;
   while (NULL != chvc)
   {
-    if (GNUNET_HELLO_equals (hello, chvc->hello, GNUNET_TIME_absolute_get ()).
-        abs_value > 0)
+    if (GNUNET_HELLO_equals
+        (hello, chvc->hello, GNUNET_TIME_absolute_get ()).abs_value > 0)
     {
 #if DEBUG_TRANSPORT_HELLO > 2
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -4889,8 +4893,9 @@ handle_ping (void *cls, const struct GNUNET_MessageHeader *message,
     memcpy (&pong[1], plugin->short_name, slen);
     if ((sender_address != NULL) && (sender_address_len > 0))
       memcpy (&((char *) &pong[1])[slen], sender_address, sender_address_len);
-    if (GNUNET_TIME_absolute_get_remaining (session_header->pong_sig_expires).
-        rel_value < PONG_SIGNATURE_LIFETIME.rel_value / 4)
+    if (GNUNET_TIME_absolute_get_remaining
+        (session_header->pong_sig_expires).rel_value <
+        PONG_SIGNATURE_LIFETIME.rel_value / 4)
     {
       /* create / update cached sig */
 #if DEBUG_TRANSPORT
@@ -5235,8 +5240,8 @@ plugin_env_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
 #if DEBUG_TRANSPORT
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Throttling read (%llu bytes excess at %u b/s), waiting %llu ms before reading more.\n",
-                (unsigned long long) n->in_tracker.
-                consumption_since_last_update__,
+                (unsigned long long) n->
+                in_tracker.consumption_since_last_update__,
                 (unsigned int) n->in_tracker.available_bytes_per_s__,
                 (unsigned long long) ret.rel_value);
 #endif
index 2e859f1db90243f2adcb328123bbdf41f0cb7503..87aa34bf4fd7945aebe54a51671b8b4e77ea04d3 100644 (file)
@@ -473,7 +473,8 @@ _lp_print_sol (glp_prob *P, const char *fname)
  * Dummy functions for CFLAGS
  */
 
-static void _dummy2 ();
+static void
+_dummy2 ();
 static void
 _dummy ()
 {
index 88e4b4bbf2daed8a7e42084c0529d71ded4b6e63..550f218a980d127314f8a916bb397be0ba5febd5 100644 (file)
@@ -449,40 +449,48 @@ 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 GNUNET_TIME_Relative max_duration,
-                             GNUNET_TRANSPORT_ATS_AddressNotification
-                             address_not,
-                             GNUNET_TRANSPORT_ATS_ResultCallback res_cb);
+struct ATS_Handle *
+ats_init (double D, double U, double R, int v_b_min, int v_n_min,
+          int max_iterations, struct GNUNET_TIME_Relative max_duration,
+          GNUNET_TRANSPORT_ATS_AddressNotification address_not,
+          GNUNET_TRANSPORT_ATS_ResultCallback res_cb);
 
-void ats_shutdown (struct ATS_Handle *ats);
+void
+ats_shutdown (struct ATS_Handle *ats);
 
-void ats_delete_problem (struct ATS_Handle *ats);
+void
+ats_delete_problem (struct ATS_Handle *ats);
 
-int ats_create_problem (struct ATS_Handle *ats, struct ATS_internals *stat,
-                        struct ATS_peer *peers, int c_p,
-                        struct ATS_mechanism *mechanisms, int c_m);
+int
+ats_create_problem (struct ATS_Handle *ats, struct ATS_internals *stat,
+                    struct ATS_peer *peers, int c_p,
+                    struct ATS_mechanism *mechanisms, int c_m);
 
-void ats_modify_problem_state (struct ATS_Handle *ats,
-                               enum ATS_problem_state s);
+void
+ats_modify_problem_state (struct ATS_Handle *ats, enum ATS_problem_state s);
 
-void ats_calculate_bandwidth_distribution (struct ATS_Handle *ats);
+void
+ats_calculate_bandwidth_distribution (struct ATS_Handle *ats);
 
-void ats_solve_problem (struct ATS_Handle *ats, unsigned int max_it,
-                        unsigned int max_dur, unsigned int c_peers,
-                        unsigned int c_mechs, struct ATS_internals *stat);
+void
+ats_solve_problem (struct ATS_Handle *ats, unsigned int max_it,
+                   unsigned int max_dur, unsigned int c_peers,
+                   unsigned int c_mechs, struct ATS_internals *stat);
 
-int ats_evaluate_results (int result, int solution, char *problem);
+int
+ats_evaluate_results (int result, int solution, char *problem);
 
-void ats_update_problem_qm (struct ATS_Handle *ats);
+void
+ats_update_problem_qm (struct ATS_Handle *ats);
 
-void ats_update_problem_cr (struct ATS_Handle *ats);
+void
+ats_update_problem_cr (struct ATS_Handle *ats);
 
 
-void ats_set_logging_options (struct ATS_Handle *ats,
-                              struct GNUNET_STATISTICS_Handle *stats,
-                              const struct GNUNET_CONFIGURATION_Handle *cfg);
+void
+ats_set_logging_options (struct ATS_Handle *ats,
+                         struct GNUNET_STATISTICS_Handle *stats,
+                         const struct GNUNET_CONFIGURATION_Handle *cfg);
 
 #endif
 /* end of file gnunet-service-transport_ats.h */
index abb53641419ca713d9a7472b7e2473a0357a15a9..21ad49652bbab1ca48136676e1c4f13dbf677349 100644 (file)
@@ -161,8 +161,8 @@ static struct GNUNET_CONTAINER_MultiHashMap *blacklist;
  * @param cls the 'struct BlacklistCheck*'
  * @param tc unused
  */
-static void do_blacklist_check (void *cls,
-                                const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+do_blacklist_check (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -328,8 +328,8 @@ read_blacklist_file ()
 #endif
     memcpy (&enc, &data[pos], sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded));
     if (!isspace
-        ((unsigned char) enc.
-         encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
+        ((unsigned char)
+         enc.encoding[sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1]))
     {
       GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                   _
index 7e88b3961c5613abd982bc9b4f0c40b91896f520..64a8006641b386ae245dc1b87eb9a5fe3f05b4ca 100644 (file)
  *
  * @param server server used to accept clients from
  */
-void GST_blacklist_start (struct GNUNET_SERVER_Handle *server);
+void
+GST_blacklist_start (struct GNUNET_SERVER_Handle *server);
 
 
 /**
  * Stop blacklist subsystem.
  */
-void GST_blacklist_stop (void);
+void
+GST_blacklist_stop (void);
 
 
 /**
@@ -52,8 +54,9 @@ 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.
@@ -62,8 +65,9 @@ void GST_blacklist_handle_init (void *cls, struct GNUNET_SERVER_Client *client,
  * @param client the client
  * @param message the blacklist-init message that was sent
  */
-void GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client,
-                                 const struct GNUNET_MessageHeader *message);
+void
+GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client,
+                            const struct GNUNET_MessageHeader *message);
 
 /**
  * Add the given peer to the blacklist (for the given transport).
@@ -71,8 +75,9 @@ void GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client,
  * @param peer peer to blacklist
  * @param transport_name transport to blacklist for this peer, NULL for all
  */
-void GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
-                             const char *transport_name);
+void
+GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
+                        const char *transport_name);
 
 
 /**
@@ -104,13 +109,10 @@ typedef void (*GST_BlacklistTestContinuation) (void *cls,
  * @return handle to the blacklist check, NULL if the decision
  *        was made instantly and 'cont' was already called
  */
-struct GST_BlacklistCheck *GST_blacklist_test_allowed (const struct
-                                                       GNUNET_PeerIdentity
-                                                       *peer,
-                                                       const char
-                                                       *transport_name,
-                                                       GST_BlacklistTestContinuation
-                                                       cont, void *cont_cls);
+struct GST_BlacklistCheck *
+GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
+                            const char *transport_name,
+                            GST_BlacklistTestContinuation cont, void *cont_cls);
 
 
 /**
@@ -118,7 +120,8 @@ struct GST_BlacklistCheck *GST_blacklist_test_allowed (const struct
  * 
  * @param bc check to cancel
  */
-void GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc);
+void
+GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc);
 
 #endif
 /* end of file gnunet-service-transport_blacklist.h */
index 6bcc18cd3b578e66d423eb733e3901dc1432eb86..aae7ba89f6bae1576dfe7517bd2f659067b28dd9 100644 (file)
  *
  * @param server server used to accept clients from.
  */
-void GST_clients_start (struct GNUNET_SERVER_Handle *server);
+void
+GST_clients_start (struct GNUNET_SERVER_Handle *server);
 
 
 /**
  * Stop processing clients.
  */
-void GST_clients_stop (void);
+void
+GST_clients_stop (void);
 
 
 /**
@@ -50,8 +52,8 @@ 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,8 +63,9 @@ void GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
  * @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);
 
 
 
index ff817814bc5c28ded4a240d1db40abfc1e2290c1..153b7447e98cd33db9d93f31b3ae56e4f3073335 100644 (file)
@@ -55,13 +55,15 @@ typedef void (*GST_HelloCallback) (void *cls,
  * @param cb function to call whenever our HELLO changes
  * @param cb_cls closure for cb
  */
-void GST_hello_start (GST_HelloCallback cb, void *cb_cls);
+void
+GST_hello_start (GST_HelloCallback cb, void *cb_cls);
 
 
 /**
  * Shutdown the HELLO module.
  */
-void GST_hello_stop (void);
+void
+GST_hello_stop (void);
 
 
 /**
@@ -69,7 +71,8 @@ void GST_hello_stop (void);
  *
  * @return our HELLO message
  */
-const struct GNUNET_MessageHeader *GST_hello_get (void);
+const struct GNUNET_MessageHeader *
+GST_hello_get (void);
 
 
 /**
@@ -80,9 +83,10 @@ 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);
 
 
 /**
@@ -97,10 +101,11 @@ void GST_hello_modify_addresses (int addremove, const char *plugin_name,
  * @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
index 251b4c356c4d0a9d44c9960199c361d8e3e20b67..71539d3de45d241b25608471db6a7091060af5d3 100644 (file)
@@ -246,8 +246,8 @@ lookup_neighbour (const struct GNUNET_PeerIdentity *pid)
  * @param cls the 'struct NeighbourMapEntry'
  * @param tc scheduler context
  */
-static void transmission_task (void *cls,
-                               const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+transmission_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -770,8 +770,8 @@ GST_neighbours_calculate_receive_delay (const struct GNUNET_PeerIdentity
 #if DEBUG_TRANSPORT
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Throttling read (%llu bytes excess at %u b/s), waiting %llu ms before reading more.\n",
-                (unsigned long long) n->in_tracker.
-                consumption_since_last_update__,
+                (unsigned long long) n->
+                in_tracker.consumption_since_last_update__,
                 (unsigned int) n->in_tracker.available_bytes_per_s__,
                 (unsigned long long) ret.rel_value);
 #endif
index c0cee01a6cacb99c6739687d1d7cd4e911cdef19..db29d66aa4e4f527776b63839af0bcad394d1b96 100644 (file)
  * @param connect_cb function to call if we connect to a peer
  * @param disconnect_cb function to call if we disconnect from a peer
  */
-void GST_neighbours_start (void *cls, GNUNET_TRANSPORT_NotifyConnect connect_cb,
-                           GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb);
+void
+GST_neighbours_start (void *cls, GNUNET_TRANSPORT_NotifyConnect connect_cb,
+                      GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb);
 
 
 /**
  * Cleanup the neighbours subsystem.
  */
-void GST_neighbours_stop (void);
+void
+GST_neighbours_stop (void);
 
 
 /**
@@ -58,7 +60,8 @@ void GST_neighbours_stop (void);
  *
  * @param target peer to try to connect to
  */
-void GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target);
+void
+GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target);
 
 
 /**
@@ -67,7 +70,8 @@ void GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target);
  * @param target peer to test
  * @return GNUNET_YES if we are connected, GNUNET_NO if not
  */
-int GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target);
+int
+GST_neighbours_test_connected (const struct GNUNET_PeerIdentity *target);
 
 
 /**
@@ -89,10 +93,10 @@ 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);
 
 
 /**
@@ -106,13 +110,9 @@ void 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);
 
 
 /**
@@ -121,7 +121,8 @@ struct GNUNET_TIME_Relative GST_neighbours_calculate_receive_delay (const struct
  *
  * @param neighbour neighbour to keep alive
  */
-void GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour);
+void
+GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour);
 
 
 /**
@@ -130,10 +131,9 @@ 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);
 
 
 /**
@@ -141,7 +141,8 @@ void GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity
  *
  * @param target peer to disconnect from
  */
-void GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target);
+void
+GST_neighbours_force_disconnect (const struct GNUNET_PeerIdentity *target);
 
 
 /**
@@ -166,7 +167,8 @@ typedef void (*GST_NeighbourIterator) (void *cls,
  * @param cb function to call 
  * @param cb_cls closure for cb
  */
-void GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls);
+void
+GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls);
 
 
 /**
@@ -175,8 +177,9 @@ 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,13 +195,12 @@ void 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
index ebc8fa451bb7ce85e077a658326802f571a21444..856b594cd9a511fba4adf5751d43df6b5ca5e347 100644 (file)
  * @param address_cb function to call when our public addresses changed
  * @param session_end_cb function to call when a session was terminated
  */
-void GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb,
-                       GNUNET_TRANSPORT_AddressNotification address_cb,
-                       GNUNET_TRANSPORT_SessionEnd session_end_cb);
+void
+GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb,
+                  GNUNET_TRANSPORT_AddressNotification address_cb,
+                  GNUNET_TRANSPORT_SessionEnd session_end_cb);
 
 
 /**
  * Unload all plugins
  */
-void GST_plugins_unload (void);
+void
+GST_plugins_unload (void);
 
 
 /**
@@ -59,7 +61,8 @@ void GST_plugins_unload (void);
  * @param name name of the plugin
  * @return the plugin's API, NULL if the plugin is not loaded
  */
-struct GNUNET_TRANSPORT_PluginFunctions *GST_plugins_find (const char *name);
+struct GNUNET_TRANSPORT_PluginFunctions *
+GST_plugins_find (const char *name);
 
 
 /**
@@ -71,8 +74,8 @@ 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
index 86ede157649aa41ff92a382aeefb0564e1ee5dfb..1840c0919dc31113b7c4c8f20a02147d0261e2e7 100644 (file)
 /**
  * Start the validation subsystem.
  */
-void GST_validation_start (void);
+void
+GST_validation_start (void);
 
 
 /**
  * Stop the validation subsystem.
  */
-void GST_validation_stop (void);
+void
+GST_validation_stop (void);
 
 
 /**
@@ -54,12 +56,12 @@ 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);
 
 
 /**
@@ -69,8 +71,9 @@ void 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);
 
 
 /**
@@ -79,7 +82,8 @@ void GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
  *
  * @param hello the HELLO we received
  */
-void GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello);
+void
+GST_validation_handle_hello (const struct GNUNET_MessageHeader *hello);
 
 
 /**
@@ -122,9 +126,9 @@ 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
index b3468791dcebee8c875c301630d363c76523c0da..3fca1f85f41f70aaa9565e3b9e12328f0fac7778 100644 (file)
@@ -108,7 +108,8 @@ struct Hardware_Infos
 };
 
 // FIXME: inline?
-int getChannelFromFrequency (int frequency);
+int
+getChannelFromFrequency (int frequency);
 
 // FIXME: make nice...
 static unsigned long
index a6b24e73e9ea317da453e64127d0b4359628e13a..5c11f1f328fff3b6848644eaf288770869b32a2a 100644 (file)
@@ -547,24 +547,24 @@ struct PrettyPrinterContext
  * @param addrlen length of the address
  * @return string representing the same address
  */
-static const char *http_plugin_address_to_string (void *cls, const void *addr,
-                                                  size_t addrlen);
+static const char *
+http_plugin_address_to_string (void *cls, const void *addr, size_t addrlen);
 
 
 /**
  * Call MHD to process pending ipv4 requests and then go back
  * and schedule the next run.
  */
-static void http_server_daemon_v4_run (void *cls,
-                                       const struct GNUNET_SCHEDULER_TaskContext
-                                       *tc);
+static void
+http_server_daemon_v4_run (void *cls,
+                           const struct GNUNET_SCHEDULER_TaskContext *tc);
 /**
  * Call MHD to process pending ipv6 requests and then go back
  * and schedule the next run.
  */
-static void http_server_daemon_v6_run (void *cls,
-                                       const struct GNUNET_SCHEDULER_TaskContext
-                                       *tc);
+static void
+http_server_daemon_v6_run (void *cls,
+                           const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Function setting up curl handle and selecting message to send
@@ -573,7 +573,8 @@ static void http_server_daemon_v6_run (void *cls,
  * @param ps session
  * @return GNUNET_SYSERR on failure, GNUNET_NO if connecting, GNUNET_YES if ok
  */
-static int send_check_connections (struct Plugin *plugin, struct Session *ps);
+static int
+send_check_connections (struct Plugin *plugin, struct Session *ps);
 
 /**
  * Function setting up file descriptors and scheduling task to run
@@ -581,7 +582,8 @@ static int send_check_connections (struct Plugin *plugin, struct Session *ps);
  * @param  plugin plugin as closure
  * @return GNUNET_SYSERR for hard failure, GNUNET_OK for ok
  */
-static int curl_schedule (struct Plugin *plugin);
+static int
+curl_schedule (struct Plugin *plugin);
 
 /**
  * Task scheduled to reset the inbound quota delay for a specific peer
@@ -1785,10 +1787,8 @@ curl_receive_mst_cb (void *cls, void *client,
               "Connection %X: Forwarding message to transport service, type %u and size %u from `%s' (`%s')\n",
               ps, ntohs (message->type), ntohs (message->size),
               GNUNET_i2s (&(pc->identity)), http_plugin_address_to_string (NULL,
-                                                                           ps->
-                                                                           addr,
-                                                                           ps->
-                                                                           addrlen));
+                                                                           ps->addr,
+                                                                           ps->addrlen));
 #endif
   struct GNUNET_TRANSPORT_ATS_Information distance[2];
 
@@ -3333,8 +3333,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
                   GNUNET_CONFIGURATION_get_value_string (env->cfg,
                                                          component_name,
                                                          "BINDTO4",
-                                                         &plugin->
-                                                         bind_hostname));
+                                                         &plugin->bind_hostname));
     plugin->bind4_address = GNUNET_malloc (sizeof (struct sockaddr_in));
     plugin->bind4_address->sin_family = AF_INET;
     plugin->bind4_address->sin_port = htons (port);
@@ -3494,8 +3493,8 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
                                                        MHD_OPTION_SOCK_ADDR,
                                                        tmp,
                                                        MHD_OPTION_CONNECTION_LIMIT,
-                                                       (unsigned int) plugin->
-                                                       max_connect_per_transport,
+                                                       (unsigned int)
+                                                       plugin->max_connect_per_transport,
 #if BUILD_HTTPS
                                                        MHD_OPTION_HTTPS_PRIORITIES,
                                                        plugin->crypto_init,
@@ -3534,8 +3533,8 @@ LIBGNUNET_PLUGIN_TRANSPORT_INIT (void *cls)
                                                        (struct sockaddr_in *)
                                                        plugin->bind4_address,
                                                        MHD_OPTION_CONNECTION_LIMIT,
-                                                       (unsigned int) plugin->
-                                                       max_connect_per_transport,
+                                                       (unsigned int)
+                                                       plugin->max_connect_per_transport,
 #if BUILD_HTTPS
                                                        MHD_OPTION_HTTPS_PRIORITIES,
                                                        plugin->crypto_init,
index 1b9f5fb7271ab128a4b6695201334ce61583951c..2600456025ae27a0994f546cf2d0b78857b27c07 100644 (file)
@@ -420,9 +420,8 @@ api_verify_hello (const GNUNET_MessageHello * hello)
   maddr = (const EmailAddress *) &hello[1];
   if ((ntohs (hello->header.size) !=
        sizeof (GNUNET_MessageHello) + ntohs (hello->senderAddressSize)) ||
-      (maddr->
-       senderAddress[ntohs (hello->senderAddressSize) - 1 -
-                     FILTER_STRING_SIZE] != '\0'))
+      (maddr->senderAddress
+       [ntohs (hello->senderAddressSize) - 1 - FILTER_STRING_SIZE] != '\0'))
   {
     GNUNET_GE_BREAK (ectx, 0);
     return GNUNET_SYSERR;       /* obviously invalid */
index 3312034713ad6f697b02810f0d984d373c5f6c3b..d6084d9f0034c29a675f1cbb62a65f2c1e0edc7b 100644 (file)
@@ -605,7 +605,8 @@ create_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *target,
  *
  * @param session for which session should we do this
  */
-static void process_pending_messages (struct Session *session);
+static void
+process_pending_messages (struct Session *session);
 
 
 /**
@@ -779,8 +780,8 @@ disconnect_session (struct Session *session)
                    (session->connect_addr !=
                     NULL) ? tcp_address_to_string (session->plugin,
                                                    session->connect_addr,
-                                                   session->
-                                                   connect_alen) : "*");
+                                                   session->connect_alen) :
+                   "*");
 #endif
   /* remove from session list */
   prev = NULL;
@@ -1455,8 +1456,8 @@ handle_tcp_nat_probe (void *cls, struct GNUNET_SERVER_Client *client,
 
   session =
       GNUNET_CONTAINER_multihashmap_get (plugin->nat_wait_conns,
-                                         &tcp_nat_probe->clientIdentity.
-                                         hashPubKey);
+                                         &tcp_nat_probe->
+                                         clientIdentity.hashPubKey);
   if (session == NULL)
   {
 #if DEBUG_TCP_NAT
@@ -1775,8 +1776,8 @@ disconnect_notify (void *cls, struct GNUNET_SERVER_Client *client)
                    (session->connect_addr !=
                     NULL) ? tcp_address_to_string (session->plugin,
                                                    session->connect_addr,
-                                                   session->
-                                                   connect_alen) : "*");
+                                                   session->connect_alen) :
+                   "*");
 #endif
   GNUNET_STATISTICS_update (session->plugin->env->stats,
                             gettext_noop
@@ -1863,8 +1864,8 @@ try_connection_reversal (void *cls, const struct sockaddr *addr,
                                tcp_probe_ctx);
   tcp_probe_ctx->transmit_handle =
       GNUNET_CONNECTION_notify_transmit_ready (sock,
-                                               ntohs (tcp_probe_ctx->message.
-                                                      header.size),
+                                               ntohs (tcp_probe_ctx->
+                                                      message.header.size),
                                                GNUNET_TIME_UNIT_FOREVER_REL,
                                                &notify_send_probe,
                                                tcp_probe_ctx);
index f9310fb8fd74b13a5a311807bc75ef2f6da81adf..07a3df3620a14c7b2cc93a47d504691e8117817f 100644 (file)
@@ -852,8 +852,8 @@ udp_read (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *rsock)
       return;
     GNUNET_assert (GNUNET_OK ==
                    GNUNET_CONTAINER_multihashmap_remove (plugin->sessions,
-                                                         &udp->sender.
-                                                         hashPubKey,
+                                                         &udp->
+                                                         sender.hashPubKey,
                                                          peer_session));
     plugin->last_expected_delay =
         GNUNET_FRAGMENT_context_destroy (peer_session->frag);
@@ -882,8 +882,8 @@ udp_read (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *rsock)
                                             &fragment_msg_proc, &ack_proc);
       rc->hnode =
           GNUNET_CONTAINER_heap_insert (plugin->defrags, rc,
-                                        (GNUNET_CONTAINER_HeapCostType) now.
-                                        abs_value);
+                                        (GNUNET_CONTAINER_HeapCostType)
+                                        now.abs_value);
     }
 #if DEBUG_UDP
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -896,8 +896,8 @@ udp_read (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *rsock)
     {
       /* keep this 'rc' from expiring */
       GNUNET_CONTAINER_heap_update_cost (plugin->defrags, rc->hnode,
-                                         (GNUNET_CONTAINER_HeapCostType) now.
-                                         abs_value);
+                                         (GNUNET_CONTAINER_HeapCostType)
+                                         now.abs_value);
     }
     if (GNUNET_CONTAINER_heap_get_size (plugin->defrags) >
         UDP_MAX_SENDER_ADDRESSES_WITH_DEFRAG)
index 7193e2e8bc4193e2309dee9d614a038d4fc3422a..59c42e1f64229af8686ce92a56f78959dd65f996 100644 (file)
@@ -419,16 +419,14 @@ find_session (struct Plugin *plugin, const struct GNUNET_PeerIdentity *peer)
 }
 
 /* Forward Declaration */
-static ssize_t unix_real_send (void *cls,
-                               struct RetrySendContext *incoming_retry_context,
-                               struct GNUNET_NETWORK_Handle *send_handle,
-                               const struct GNUNET_PeerIdentity *target,
-                               const char *msgbuf, size_t msgbuf_size,
-                               unsigned int priority,
-                               struct GNUNET_TIME_Relative timeout,
-                               const void *addr, size_t addrlen,
-                               GNUNET_TRANSPORT_TransmitContinuation cont,
-                               void *cont_cls);
+static ssize_t
+unix_real_send (void *cls, struct RetrySendContext *incoming_retry_context,
+                struct GNUNET_NETWORK_Handle *send_handle,
+                const struct GNUNET_PeerIdentity *target, const char *msgbuf,
+                size_t msgbuf_size, unsigned int priority,
+                struct GNUNET_TIME_Relative timeout, const void *addr,
+                size_t addrlen, GNUNET_TRANSPORT_TransmitContinuation cont,
+                void *cont_cls);
 
 /**
  * Retry sending a message.
index ad8d9a7a1d99e70ce8eee0d613bde07055697852..d3bd1ef82a5570e5b97b95bc795d3d1f775e3472 100644 (file)
@@ -662,12 +662,13 @@ struct FragmentMessage
   struct Radiotap_Send *radioHeader;
 };
 
-static void do_transmit (void *cls,
-                         const struct GNUNET_SCHEDULER_TaskContext *tc);
-static void free_session (struct Plugin *plugin, struct Sessionqueue *queue,
-                          int do_free_macendpoint);
-static struct MacEndpoint *create_macendpoint (struct Plugin *plugin,
-                                               const struct MacAddress *addr);
+static void
+do_transmit (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+free_session (struct Plugin *plugin, struct Sessionqueue *queue,
+              int do_free_macendpoint);
+static struct MacEndpoint *
+create_macendpoint (struct Plugin *plugin, const struct MacAddress *addr);
 
 /**
  * Generates a nice hexdump of a memory area.
@@ -1860,8 +1861,9 @@ wlan_plugin_send (void *cls, const struct GNUNET_PeerIdentity *target,
     newmsg = session->pending_message_head;
     GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, PLUGIN_LOG_NAME,
                      "wlan_plugin_send: a pending message is already in the queue for this client\n remaining time to send this message is %u, queued fragment messages for this mac connection %u\n",
-                     GNUNET_TIME_absolute_get_remaining (newmsg->timeout).
-                     rel_value, session->mac->fragment_messages_out_count);
+                     GNUNET_TIME_absolute_get_remaining (newmsg->
+                                                         timeout).rel_value,
+                     session->mac->fragment_messages_out_count);
   }
 
   newmsg = GNUNET_malloc (sizeof (struct PendingMessage));
@@ -2263,8 +2265,8 @@ process_data (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
   GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
                    "Calling plugin->env->receive for session %p; %s; size: %u\n",
                    session, wlan_plugin_address_to_string (NULL,
-                                                           session->mac->addr.
-                                                           mac, 6),
+                                                           session->mac->
+                                                           addr.mac, 6),
                    htons (hdr->size));
 #endif
 
@@ -2303,9 +2305,8 @@ wlan_data_helper (void *cls, struct Session_light *session_light,
     GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
                      "Func wlan_data_helper got GNUNET_MESSAGE_TYPE_WLAN_ADVERTISEMENT size: %u; %s\n",
                      ntohs (hdr->size), wlan_plugin_address_to_string (NULL,
-                                                                       session_light->
-                                                                       addr.mac,
-                                                                       6));
+                                                                       session_light->addr.
+                                                                       mac, 6));
 #endif
 
     if (session_light->macendpoint == NULL)
@@ -2373,9 +2374,7 @@ wlan_data_helper (void *cls, struct Session_light *session_light,
       GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, PLUGIN_LOG_NAME,
                        "Macendpoint does not exist for this GNUNET_MESSAGE_TYPE_FRAGMENT_ACK size: %u; %s\n",
                        ntohs (hdr->size), wlan_plugin_address_to_string (NULL,
-                                                                         session_light->
-                                                                         addr.
-                                                                         mac,
+                                                                         session_light->addr.mac,
                                                                          6));
 #endif
       return;
@@ -2477,8 +2476,8 @@ macendpoint_timeout (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     return;
   }
   if (GNUNET_TIME_absolute_get_remaining
-      (GNUNET_TIME_absolute_add (endpoint->last_activity, MACENDPOINT_TIMEOUT)).
-      rel_value == 0)
+      (GNUNET_TIME_absolute_add
+       (endpoint->last_activity, MACENDPOINT_TIMEOUT)).rel_value == 0)
   {
     free_macendpoint (endpoint->plugin, endpoint);
   }
index f59edfb264df2301fc20025d5630459ea226dc34..778fe4be30858f826a07333303f7beb925b87ae0 100644 (file)
@@ -522,7 +522,8 @@ task_send_cont (void *cls, const struct GNUNET_PeerIdentity *target, int result)
 }
 
 
-static void run_connection_tests (int phase, void *cls);
+static void
+run_connection_tests (int phase, void *cls);
 
 /**
  * Recieves messages from plugin, in real world transport
@@ -646,7 +647,8 @@ header_function (void *ptr, size_t size, size_t nmemb, void *stream)
 }
 
 
-static size_t send_prepare (struct HTTP_Transfer *result);
+static size_t
+send_prepare (struct HTTP_Transfer *result);
 
 
 static void
index 5b78f89b4f22ceec5f11867701bb931a68f32537..962010c422d5552e7f55bd50a3ed26290b83814a 100644 (file)
@@ -551,7 +551,8 @@ task_send_cont (void *cls, const struct GNUNET_PeerIdentity *target, int result)
 }
 
 
-static void run_connection_tests (int phase, void *cls);
+static void
+run_connection_tests (int phase, void *cls);
 
 /**
  * Recieves messages from plugin, in real world transport
@@ -679,7 +680,8 @@ header_function (void *ptr, size_t size, size_t nmemb, void *stream)
   return size * nmemb;
 }
 
-static size_t send_prepare (struct HTTP_Transfer *result);
+static size_t
+send_prepare (struct HTTP_Transfer *result);
 
 
 
index bc2aca31bd5782f696df1e362c90b2c55352555e..71332bf36acb58143f689b3996b8df7509f25aa3 100644 (file)
@@ -315,7 +315,8 @@ notify_ready (void *cls, size_t size, void *buf)
 }
 
 
-static void measure (unsigned long long quota_p1, unsigned long long quota_p2);
+static void
+measure (unsigned long long quota_p1, unsigned long long quota_p2);
 
 static void
 measurement_counter (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
index daae553b75c105897e106887bd8181c53db8466d..a9cf0b4ded635986d8d02a1736815f48f557e633 100644 (file)
@@ -80,7 +80,8 @@ struct GNUNET_TRANSPORT_TransmitHandle *th;
 #endif
 
 
-static void peers_connect ();
+static void
+peers_connect ();
 
 static void
 end ()
@@ -200,8 +201,8 @@ notify_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
   msgs_recv++;
 }
 
-static void peers_disconnect (void *cls,
-                              const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+peers_disconnect (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 static size_t
 notify_ready (void *cls, size_t size, void *buf)
index 62544584cf566943fe0c184c6692c0008b128345..0c628a7311fc206103e9fcc9e8dc0f9e00e6f4f8 100644 (file)
@@ -41,10 +41,10 @@ struct ConnectingContext
   int p2_c;
 };
 
-static void exchange_hello_last (void *cb_cls,
-                                 const struct GNUNET_MessageHeader *message);
-static void exchange_hello (void *cb_cls,
-                            const struct GNUNET_MessageHeader *message);
+static void
+exchange_hello_last (void *cb_cls, const struct GNUNET_MessageHeader *message);
+static void
+exchange_hello (void *cb_cls, const struct GNUNET_MessageHeader *message);
 
 static void
 notify_connect_internal (void *cls, const struct GNUNET_PeerIdentity *peer,
index a21ccc11ff741a187ff9bb3f6e54e7ee2b51b346..d5a75d143180f866394eba2e2a0b397bab47b6c7 100644 (file)
@@ -76,13 +76,12 @@ typedef void (*GNUNET_TRANSPORT_TESTING_connect_cb) (struct PeerContext * p1,
  *   if NULL passed the PeerContext * will be used!
  * @return the peer context
  */
-struct PeerContext *GNUNET_TRANSPORT_TESTING_start_peer (const char *cfgname,
-                                                         GNUNET_TRANSPORT_ReceiveCallback
-                                                         rec,
-                                                         GNUNET_TRANSPORT_NotifyConnect
-                                                         nc,
-                                                         GNUNET_TRANSPORT_NotifyDisconnect
-                                                         nd, void *cb_cls);
+struct PeerContext *
+GNUNET_TRANSPORT_TESTING_start_peer (const char *cfgname,
+                                     GNUNET_TRANSPORT_ReceiveCallback rec,
+                                     GNUNET_TRANSPORT_NotifyConnect nc,
+                                     GNUNET_TRANSPORT_NotifyDisconnect nd,
+                                     void *cb_cls);
 
 
 /**
@@ -90,7 +89,8 @@ struct PeerContext *GNUNET_TRANSPORT_TESTING_start_peer (const char *cfgname,
  * @param p the peer
  */
 
-void GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext *pc);
+void
+GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext *pc);
 
 
 /**
@@ -102,9 +102,10 @@ 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 */
index b732871ca3716dd366be400a0a7d42bb0f21aa3f..fed611e490a3b766ca9dd8270aa87b941cf63419 100644 (file)
@@ -295,7 +295,8 @@ struct GNUNET_TRANSPORT_Handle
  *
  * @param h transport service to schedule a transmission for
  */
-static void schedule_transmission (struct GNUNET_TRANSPORT_Handle *h);
+static void
+schedule_transmission (struct GNUNET_TRANSPORT_Handle *h);
 
 
 /**
@@ -304,8 +305,8 @@ static void schedule_transmission (struct GNUNET_TRANSPORT_Handle *h);
  *
  * @param h transport service to reconnect
  */
-static void disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_Handle
-                                               *h);
+static void
+disconnect_and_schedule_reconnect (struct GNUNET_TRANSPORT_Handle *h);
 
 
 /**
@@ -659,8 +660,8 @@ transport_notify_ready (void *cls, size_t size, void *buf)
     th = n->th;
     if (th->notify_size + sizeof (struct OutboundMessage) > size)
       break;                    /* does not fit */
-    if (GNUNET_BANDWIDTH_tracker_get_delay (&n->out_tracker, th->notify_size).
-        rel_value > 0)
+    if (GNUNET_BANDWIDTH_tracker_get_delay
+        (&n->out_tracker, th->notify_size).rel_value > 0)
       break;                    /* too early */
     GNUNET_assert (n == GNUNET_CONTAINER_heap_remove_root (h->ready_heap));
     n->hn = NULL;
index f6852ff0101553ba42ba1838db2d42d985eeea82..d6387b14465fdab3f97e6ad6173ec15c13dcfa7f 100644 (file)
@@ -78,7 +78,8 @@ struct GNUNET_TRANSPORT_Blacklist
  *
  * @param br overall handle
  */
-static void reconnect (struct GNUNET_TRANSPORT_Blacklist *br);
+static void
+reconnect (struct GNUNET_TRANSPORT_Blacklist *br);
 
 
 /**
@@ -86,7 +87,8 @@ static void reconnect (struct GNUNET_TRANSPORT_Blacklist *br);
  *
  * @param br our overall context
  */
-static void reply (struct GNUNET_TRANSPORT_Blacklist *br);
+static void
+reply (struct GNUNET_TRANSPORT_Blacklist *br);
 
 
 /**
index b093283209a1bacbf762a2f0f13ca03c676dd576..9fc58c8d882e61c7184cb906ec81f3c861da0c51 100644 (file)
@@ -1,37 +1,37 @@
-/*\r
- *  Compatibility header\r
- *\r
- *  Copyright (C) 2009 Thomas d'Otreppe\r
- *\r
- *  This program is free software; you can redistribute it and/or modify\r
- *  it under the terms of the GNU General Public License as published by\r
- *  the Free Software Foundation; either version 2 of the License, or\r
- *  (at your option) any later version.\r
- *\r
- *  This program is distributed in the hope that it will be useful,\r
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- *  GNU General Public License for more details.\r
- *\r
- *  You should have received a copy of the GNU General Public License\r
- *  along with this program; if not, write to the Free Software\r
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
- */  \r
-    \r
-#ifndef _AIRCRACK_NG_BYTEORDER_H_\r
-#define _AIRCRACK_NG_BYTEORDER_H_\r
-    \r
-#define ___my_swab16(x) \\r
+/*
+ *  Compatibility header
+ *
+ *  Copyright (C) 2009 Thomas d'Otreppe
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */  
+    
+#ifndef _AIRCRACK_NG_BYTEORDER_H_
+#define _AIRCRACK_NG_BYTEORDER_H_
+    
+#define ___my_swab16(x) \
     ((u_int16_t)
      (\\r(((u_int16_t) (x) & (u_int16_t) 0x00ffU) << 8) |
-      \\r(((u_int16_t) (x) & (u_int16_t) 0xff00U) >> 8))) \r
-#define ___my_swab32(x) \\r
+      \\r(((u_int16_t) (x) & (u_int16_t) 0xff00U) >> 8))) 
+#define ___my_swab32(x) \
     ((u_int32_t)
      (\\r(((u_int32_t) (x) & (u_int32_t) 0x000000ffUL) << 24) |
       \\r(((u_int32_t) (x) & (u_int32_t) 0x0000ff00UL) << 8) |
       \\r(((u_int32_t) (x) & (u_int32_t) 0x00ff0000UL) >> 8) |
-      \\r(((u_int32_t) (x) & (u_int32_t) 0xff000000UL) >> 24))) \r
-#define ___my_swab64(x) \\r
+      \\r(((u_int32_t) (x) & (u_int32_t) 0xff000000UL) >> 24))) 
+#define ___my_swab64(x) \
     ((u_int64_t)
      (\\r(u_int64_t)
       (((u_int64_t) (x) & (u_int64_t) 0x00000000000000ffULL) << 56) |
                                             0x0000ff0000000000ULL) >> 24) |
       \\r(u_int64_t) (((u_int64_t) (x) & (u_int64_t) 0x00ff000000000000ULL) >>
                      40) | \\r(u_int64_t) (((u_int64_t) (x) & (u_int64_t)
-                                           0xff00000000000000ULL) >> 56))) \r \r \r
-    /*\r
-     * Linux\r
-     */ \r
-#if defined(linux) || defined(Linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux__)\r
-#include <endian.h>\r
-#include <unistd.h>\r
-#include <stdint.h>\r
-    \r
-#ifndef __int8_t_defined\r
+                                           0xff00000000000000ULL) >> 56))) \r \r 
+    /*
+     * Linux
+     */ 
+#if defined(linux) || defined(Linux) || defined(__linux__) || defined(__linux) || defined(__gnu_linux__)
+#include <endian.h>
+#include <unistd.h>
+#include <stdint.h>
+    
+#ifndef __int8_t_defined
 typedef uint64_t u_int64_t;
 \rtypedef uint32_t u_int32_t;
 \rtypedef uint16_t u_int16_t;
 \rtypedef uint8_t u_int8_t;
 
-\r
-#endif /* \r */
-    \r
-#ifndef htole16\r
-#if __BYTE_ORDER == __LITTLE_ENDIAN\r
-#define htobe16(x) ___my_swab16 (x)\r
-#define htole16(x) (x)\r
-#define be16toh(x) ___my_swab16 (x)\r
-#define le16toh(x) (x)\r
-    \r
-#define htobe32(x) ___my_swab32 (x)\r
-#define htole32(x) (x)\r
-#define be32toh(x) ___my_swab32 (x)\r
-#define le32toh(x) (x)\r
-    \r
-#define htobe64(x) ___my_swab64 (x)\r
-#define htole64(x) (x)\r
-#define be64toh(x) ___my_swab64 (x)\r
-#define le64toh(x) (x)\r
+
+#endif /* \r */
+    
+#ifndef htole16
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+#define htobe16(x) ___my_swab16 (x)
+#define htole16(x) (x)
+#define be16toh(x) ___my_swab16 (x)
+#define le16toh(x) (x)
+    
+#define htobe32(x) ___my_swab32 (x)
+#define htole32(x) (x)
+#define be32toh(x) ___my_swab32 (x)
+#define le32toh(x) (x)
+    
+#define htobe64(x) ___my_swab64 (x)
+#define htole64(x) (x)
+#define be64toh(x) ___my_swab64 (x)
+#define le64toh(x) (x)
 #else /* \r */
-#define htobe16(x) (x)\r
-#define htole16(x) ___my_swab16 (x)\r
-#define be16toh(x) (x)\r
-#define le16toh(x) ___my_swab16 (x)\r
-    \r
-#define htobe32(x) (x)\r
-#define htole32(x) ___my_swab32 (x)\r
-#define be32toh(x) (x)\r
-#define le32toh(x) ___my_swab32 (x)\r
-    \r
-#define htobe64(x) (x)\r
-#define htole64(x) ___my_swab64 (x)\r
-#define be64toh(x) (x)\r
-#define le64toh(x) ___my_swab64 (x)\r
-#endif /* \r */
-#endif /* \r */
-    \r \r \r
-#endif /* \r */
-    \r
-    /*\r
-     * Cygwin\r
-     */ \r
-#if defined(__CYGWIN32__)\r
-#include <asm/byteorder.h>\r
-#include <unistd.h>\r
-    \r
-#define __be64_to_cpu(x) ___my_swab64(x)\r
-#define __be32_to_cpu(x) ___my_swab32(x)\r
-#define __be16_to_cpu(x) ___my_swab16(x)\r
-#define __cpu_to_be64(x) ___my_swab64(x)\r
-#define __cpu_to_be32(x) ___my_swab32(x)\r
-#define __cpu_to_be16(x) ___my_swab16(x)\r
-#define __le64_to_cpu(x) (x)\r
-#define __le32_to_cpu(x) (x)\r
-#define __le16_to_cpu(x) (x)\r
-#define __cpu_to_le64(x) (x)\r
-#define __cpu_to_le32(x) (x)\r
-#define __cpu_to_le16(x) (x)\r
-    \r
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED\r
-    \r
-#endif /* \r */
-    \r
-    /*\r
-     * Windows (DDK)\r
-     */ \r
-#if defined(__WIN__)\r
-    \r
-#include <io.h>\r
-    \r
-#define __be64_to_cpu(x) ___my_swab64(x)\r
-#define __be32_to_cpu(x) ___my_swab32(x)\r
-#define __be16_to_cpu(x) ___my_swab16(x)\r
-#define __cpu_to_be64(x) ___my_swab64(x)\r
-#define __cpu_to_be32(x) ___my_swab32(x)\r
-#define __cpu_to_be16(x) ___my_swab16(x)\r
-#define __le64_to_cpu(x) (x)\r
-#define __le32_to_cpu(x) (x)\r
-#define __le16_to_cpu(x) (x)\r
-#define __cpu_to_le64(x) (x)\r
-#define __cpu_to_le32(x) (x)\r
-#define __cpu_to_le16(x) (x)\r
-    \r
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED\r
-    \r
-#endif /* \r */
-    \r
-    /*\r
-     * MAC (Darwin)\r
-     */ \r
-#if defined(__APPLE_CC__)\r
-#if defined(__x86_64__) && defined(__APPLE__)\r
-    \r
-#include <libkern/OSByteOrder.h>\r
-    \r
-#define __swab64(x)      (unsigned long long) OSSwapInt64((uint64_t)x)\r
-#define __swab32(x)      (unsigned long) OSSwapInt32((uint32_t)x)\r
-#define __swab16(x)      (unsigned short) OSSwapInt16((uint16_t)x)\r
-#define __be64_to_cpu(x) (unsigned long long) OSSwapBigToHostInt64((uint64_t)x)\r
-#define __be32_to_cpu(x) (unsigned long) OSSwapBigToHostInt32((uint32_t)x)\r
-#define __be16_to_cpu(x) (unsigned short) OSSwapBigToHostInt16((uint16_t)x)\r
-#define __le64_to_cpu(x) (unsigned long long) OSSwapLittleToHostInt64((uint64_t)x)\r
-#define __le32_to_cpu(x) (unsigned long) OSSwapLittleToHostInt32((uint32_t)x)\r
-#define __le16_to_cpu(x) (unsigned short) OSSwapLittleToHostInt16((uint16_t)x)\r
-#define __cpu_to_be64(x) (unsigned long long) OSSwapHostToBigInt64((uint64_t)x)\r
-#define __cpu_to_be32(x) (unsigned long) OSSwapHostToBigInt32((uint32_t)x)\r
-#define __cpu_to_be16(x) (unsigned short) OSSwapHostToBigInt16((uint16_t)x)\r
-#define __cpu_to_le64(x) (unsigned long long) OSSwapHostToLittleInt64((uint64_t)x)\r
-#define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x)\r
-#define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x)\r
-    \r
+#define htobe16(x) (x)
+#define htole16(x) ___my_swab16 (x)
+#define be16toh(x) (x)
+#define le16toh(x) ___my_swab16 (x)
+    
+#define htobe32(x) (x)
+#define htole32(x) ___my_swab32 (x)
+#define be32toh(x) (x)
+#define le32toh(x) ___my_swab32 (x)
+    
+#define htobe64(x) (x)
+#define htole64(x) ___my_swab64 (x)
+#define be64toh(x) (x)
+#define le64toh(x) ___my_swab64 (x)
+#endif /* \r */
+#endif /* \r */
+    \r \r 
+#endif /* \r */
+    
+    /*
+     * Cygwin
+     */ 
+#if defined(__CYGWIN32__)
+#include <asm/byteorder.h>
+#include <unistd.h>
+    
+#define __be64_to_cpu(x) ___my_swab64(x)
+#define __be32_to_cpu(x) ___my_swab32(x)
+#define __be16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_be64(x) ___my_swab64(x)
+#define __cpu_to_be32(x) ___my_swab32(x)
+#define __cpu_to_be16(x) ___my_swab16(x)
+#define __le64_to_cpu(x) (x)
+#define __le32_to_cpu(x) (x)
+#define __le16_to_cpu(x) (x)
+#define __cpu_to_le64(x) (x)
+#define __cpu_to_le32(x) (x)
+#define __cpu_to_le16(x) (x)
+    
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+    
+#endif /* \r */
+    
+    /*
+     * Windows (DDK)
+     */ 
+#if defined(__WIN__)
+    
+#include <io.h>
+    
+#define __be64_to_cpu(x) ___my_swab64(x)
+#define __be32_to_cpu(x) ___my_swab32(x)
+#define __be16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_be64(x) ___my_swab64(x)
+#define __cpu_to_be32(x) ___my_swab32(x)
+#define __cpu_to_be16(x) ___my_swab16(x)
+#define __le64_to_cpu(x) (x)
+#define __le32_to_cpu(x) (x)
+#define __le16_to_cpu(x) (x)
+#define __cpu_to_le64(x) (x)
+#define __cpu_to_le32(x) (x)
+#define __cpu_to_le16(x) (x)
+    
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+    
+#endif /* \r */
+    
+    /*
+     * MAC (Darwin)
+     */ 
+#if defined(__APPLE_CC__)
+#if defined(__x86_64__) && defined(__APPLE__)
+    
+#include <libkern/OSByteOrder.h>
+    
+#define __swab64(x)      (unsigned long long) OSSwapInt64((uint64_t)x)
+#define __swab32(x)      (unsigned long) OSSwapInt32((uint32_t)x)
+#define __swab16(x)      (unsigned short) OSSwapInt16((uint16_t)x)
+#define __be64_to_cpu(x) (unsigned long long) OSSwapBigToHostInt64((uint64_t)x)
+#define __be32_to_cpu(x) (unsigned long) OSSwapBigToHostInt32((uint32_t)x)
+#define __be16_to_cpu(x) (unsigned short) OSSwapBigToHostInt16((uint16_t)x)
+#define __le64_to_cpu(x) (unsigned long long) OSSwapLittleToHostInt64((uint64_t)x)
+#define __le32_to_cpu(x) (unsigned long) OSSwapLittleToHostInt32((uint32_t)x)
+#define __le16_to_cpu(x) (unsigned short) OSSwapLittleToHostInt16((uint16_t)x)
+#define __cpu_to_be64(x) (unsigned long long) OSSwapHostToBigInt64((uint64_t)x)
+#define __cpu_to_be32(x) (unsigned long) OSSwapHostToBigInt32((uint32_t)x)
+#define __cpu_to_be16(x) (unsigned short) OSSwapHostToBigInt16((uint16_t)x)
+#define __cpu_to_le64(x) (unsigned long long) OSSwapHostToLittleInt64((uint64_t)x)
+#define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x)
+#define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x)
+    
 #else /* \r */
-    \r
-#include <architecture/byte_order.h>\r
-    \r
-#define __swab64(x)      NXSwapLongLong(x)\r
-#define __swab32(x)      NXSwapLong(x)\r
-#define __swab16(x)      NXSwapShort(x)\r
-#define __be64_to_cpu(x) NXSwapBigLongLongToHost(x)\r
-#define __be32_to_cpu(x) NXSwapBigLongToHost(x)\r
-#define __be16_to_cpu(x) NXSwapBigShortToHost(x)\r
-#define __le64_to_cpu(x) NXSwapLittleLongLongToHost(x)\r
-#define __le32_to_cpu(x) NXSwapLittleLongToHost(x)\r
-#define __le16_to_cpu(x) NXSwapLittleShortToHost(x)\r
-#define __cpu_to_be64(x) NXSwapHostLongLongToBig(x)\r
-#define __cpu_to_be32(x) NXSwapHostLongToBig(x)\r
-#define __cpu_to_be16(x) NXSwapHostShortToBig(x)\r
-#define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x)\r
-#define __cpu_to_le32(x) NXSwapHostLongToLittle(x)\r
-#define __cpu_to_le16(x) NXSwapHostShortToLittle(x)\r
-    \r
-#endif /* \r */
-    \r
-#define __LITTLE_ENDIAN 1234\r
-#define __BIG_ENDIAN    4321\r
-#define __PDP_ENDIAN    3412\r
-#define __BYTE_ORDER    __BIG_ENDIAN\r
-    \r
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED\r
-    \r
-#endif /* \r */
-    \r
-    /*\r
-     * Solaris\r
-     * -------\r
-     */ \r
-#if defined(__sparc__) && defined(__sun__)\r
-#include <sys/byteorder.h>\r
-#include <sys/types.h>\r
-#include <unistd.h>\r
-    \r
-#define __be64_to_cpu(x) (x)\r
-#define __be32_to_cpu(x) (x)\r
-#define __be16_to_cpu(x) (x)\r
-#define __cpu_to_be64(x) (x)\r
-#define __cpu_to_be32(x) (x)\r
-#define __cpu_to_be16(x) (x)\r
-#define __le64_to_cpu(x) ___my_swab64(x)\r
-#define __le32_to_cpu(x) ___my_swab32(x)\r
-#define __le16_to_cpu(x) ___my_swab16(x)\r
-#define __cpu_to_le64(x) ___my_swab64(x)\r
-#define __cpu_to_le32(x) ___my_swab32(x)\r
-#define __cpu_to_le16(x) ___my_swab16(x)\r
+    
+#include <architecture/byte_order.h>
+    
+#define __swab64(x)      NXSwapLongLong(x)
+#define __swab32(x)      NXSwapLong(x)
+#define __swab16(x)      NXSwapShort(x)
+#define __be64_to_cpu(x) NXSwapBigLongLongToHost(x)
+#define __be32_to_cpu(x) NXSwapBigLongToHost(x)
+#define __be16_to_cpu(x) NXSwapBigShortToHost(x)
+#define __le64_to_cpu(x) NXSwapLittleLongLongToHost(x)
+#define __le32_to_cpu(x) NXSwapLittleLongToHost(x)
+#define __le16_to_cpu(x) NXSwapLittleShortToHost(x)
+#define __cpu_to_be64(x) NXSwapHostLongLongToBig(x)
+#define __cpu_to_be32(x) NXSwapHostLongToBig(x)
+#define __cpu_to_be16(x) NXSwapHostShortToBig(x)
+#define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x)
+#define __cpu_to_le32(x) NXSwapHostLongToLittle(x)
+#define __cpu_to_le16(x) NXSwapHostShortToLittle(x)
+    
+#endif /* \r */
+    
+#define __LITTLE_ENDIAN 1234
+#define __BIG_ENDIAN    4321
+#define __PDP_ENDIAN    3412
+#define __BYTE_ORDER    __BIG_ENDIAN
+    
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+    
+#endif /* \r */
+    
+    /*
+     * Solaris
+     * -------
+     */ 
+#if defined(__sparc__) && defined(__sun__)
+#include <sys/byteorder.h>
+#include <sys/types.h>
+#include <unistd.h>
+    
+#define __be64_to_cpu(x) (x)
+#define __be32_to_cpu(x) (x)
+#define __be16_to_cpu(x) (x)
+#define __cpu_to_be64(x) (x)
+#define __cpu_to_be32(x) (x)
+#define __cpu_to_be16(x) (x)
+#define __le64_to_cpu(x) ___my_swab64(x)
+#define __le32_to_cpu(x) ___my_swab32(x)
+#define __le16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_le64(x) ___my_swab64(x)
+#define __cpu_to_le32(x) ___my_swab32(x)
+#define __cpu_to_le16(x) ___my_swab16(x)
 \rtypedef uint64_t u_int64_t;
 \rtypedef uint32_t u_int32_t;
 \rtypedef uint16_t u_int16_t;
 \rtypedef uint8_t u_int8_t;
 
-\r \r
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED\r
-    \r
-#endif /* \r */
-    \r
-    /*\r
-     * Custom stuff\r
-     */ \r
-#if  defined(__MACH__) && !defined(__APPLE_CC__)\r
-#include <libkern/OSByteOrder.h>\r
-#define __cpu_to_be64(x) = OSSwapHostToBigInt64(x)\r
-#define __cpu_to_be32(x) = OSSwapHostToBigInt32(x)\r
-    \r
-#define AIRCRACK_NG_BYTE_ORDER_DEFINED\r
-    \r
-#endif /* \r */
-    \r \r
-    // FreeBSD\r
-#ifdef __FreeBSD__\r
-#include <machine/endian.h>\r
-#endif /* \r */
-    \r
-    // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...?\r
-    \r \r
-    // XXX: Mac: Check http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h\r
-    //           http://developer.apple.com/DOCUMENTATION/CoreFoundation/Reference/CFByteOrderUtils/Reference/reference.html\r
-    //           Write to apple to ask what should be used.\r
-    \r
-#if defined(LITTLE_ENDIAN)\r
-#define AIRCRACK_NG_LITTLE_ENDIAN LITTLE_ENDIAN\r
-#elif defined(__LITTLE_ENDIAN)\r
-#define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN\r
-#elif defined(_LITTLE_ENDIAN)\r
-#define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN\r
-#endif /* \r */
-    \r
-#if defined(BIG_ENDIAN)\r
-#define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN\r
-#elif defined(__BIG_ENDIAN)\r
-#define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN\r
-#elif defined(_BIG_ENDIAN)\r
-#define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN\r
-#endif /* \r */
-    \r
-#if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN)\r
-#error Impossible to determine endianness (Little or Big endian), please contact the author.\r
-#endif /* \r */
-    \r
-#if defined(BYTE_ORDER)\r
-#if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)\r
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN\r
-#elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)\r
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN\r
-#endif /* \r */
-#elif defined(__BYTE_ORDER)\r
-#if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)\r
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN\r
-#elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)\r
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN\r
-#endif /* \r */
-#elif defined(_BYTE_ORDER)\r
-#if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)\r
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN\r
-#elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)\r
-#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN\r
-#endif /* \r */
-#endif /* \r */
-    \r
-#ifndef AIRCRACK_NG_BYTE_ORDER\r
-#error Impossible to determine endianness (Little or Big endian), please contact the author.\r
-#endif /* \r */
-    \r
-#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)\r
-    \r
-#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED\r
-#define __be64_to_cpu(x) ___my_swab64(x)\r
-#define __be32_to_cpu(x) ___my_swab32(x)\r
-#define __be16_to_cpu(x) ___my_swab16(x)\r
-#define __cpu_to_be64(x) ___my_swab64(x)\r
-#define __cpu_to_be32(x) ___my_swab32(x)\r
-#define __cpu_to_be16(x) ___my_swab16(x)\r
-#define __le64_to_cpu(x) (x)\r
-#define __le32_to_cpu(x) (x)\r
-#define __le16_to_cpu(x) (x)\r
-#define __cpu_to_le64(x) (x)\r
-#define __cpu_to_le32(x) (x)\r
-#define __cpu_to_le16(x) (x)\r
-#endif /* \r */
-    \r
-#ifndef htobe16\r
-#define htobe16 ___my_swab16\r
-#endif /* \r */
-#ifndef htobe32\r
-#define htobe32 ___my_swab32\r
-#endif /* \r */
-#ifndef betoh16\r
-#define betoh16 ___my_swab16\r
-#endif /* \r */
-#ifndef betoh32\r
-#define betoh32 ___my_swab32\r
-#endif /* \r */
-    \r
-#ifndef htole16\r
-#define htole16(x) (x)\r
-#endif /* \r */
-#ifndef htole32\r
-#define htole32(x) (x)\r
-#endif /* \r */
-#ifndef letoh16\r
-#define letoh16(x) (x)\r
-#endif /* \r */
-#ifndef letoh32\r
-#define letoh32(x) (x)\r
-#endif /* \r */
-    \r
-#endif /* \r */
-    \r
-#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)\r
-    \r
-#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED\r
-#define __be64_to_cpu(x) (x)\r
-#define __be32_to_cpu(x) (x)\r
-#define __be16_to_cpu(x) (x)\r
-#define __cpu_to_be64(x) (x)\r
-#define __cpu_to_be32(x) (x)\r
-#define __cpu_to_be16(x) (x)\r
-#define __le64_to_cpu(x) ___my_swab64(x)\r
-#define __le32_to_cpu(x) ___my_swab32(x)\r
-#define __le16_to_cpu(x) ___my_swab16(x)\r
-#define __cpu_to_le64(x) ___my_swab64(x)\r
-#define __cpu_to_le32(x) ___my_swab32(x)\r
-#define __cpu_to_le16(x) ___my_swab16(x)\r
-#endif /* \r */
-    \r
-#ifndef htobe16\r
-#define htobe16(x) (x)\r
-#endif /* \r */
-#ifndef htobe32\r
-#define htobe32(x) (x)\r
-#endif /* \r */
-#ifndef betoh16\r
-#define betoh16(x) (x)\r
-#endif /* \r */
-#ifndef betoh32\r
-#define betoh32(x) (x)\r
-#endif /* \r */
-    \r
-#ifndef htole16\r
-#define htole16 ___my_swab16\r
-#endif /* \r */
-#ifndef htole32\r
-#define htole32 ___my_swab32\r
-#endif /* \r */
-#ifndef letoh16\r
-#define letoh16 ___my_swab16\r
-#endif /* \r */
-#ifndef letoh32\r
-#define letoh32 ___my_swab32\r
-#endif /* \r */
-    \r
-#endif /* \r */
-    \r
-    // Common defines\r
-#define cpu_to_le64 __cpu_to_le64\r
-#define le64_to_cpu __le64_to_cpu\r
-#define cpu_to_le32 __cpu_to_le32\r
-#define le32_to_cpu __le32_to_cpu\r
-#define cpu_to_le16 __cpu_to_le16\r
-#define le16_to_cpu __le16_to_cpu\r
-#define cpu_to_be64 __cpu_to_be64\r
-#define be64_to_cpu __be64_to_cpu\r
-#define cpu_to_be32 __cpu_to_be32\r
-#define be32_to_cpu __be32_to_cpu\r
-#define cpu_to_be16 __cpu_to_be16\r
-#define be16_to_cpu __be16_to_cpu\r
-    \r
-#ifndef le16toh\r
-#define le16toh le16_to_cpu\r
-#endif /* \r */
-#ifndef be16toh\r
-#define be16toh be16_to_cpu\r
-#endif /* \r */
-#ifndef le32toh\r
-#define le32toh le32_to_cpu\r
-#endif /* \r */
-#ifndef be32toh\r
-#define be32toh be32_to_cpu\r
+\r 
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+    
+#endif /* \r */
+    
+    /*
+     * Custom stuff
+     */ 
+#if  defined(__MACH__) && !defined(__APPLE_CC__)
+#include <libkern/OSByteOrder.h>
+#define __cpu_to_be64(x) = OSSwapHostToBigInt64(x)
+#define __cpu_to_be32(x) = OSSwapHostToBigInt32(x)
+    
+#define AIRCRACK_NG_BYTE_ORDER_DEFINED
+    
+#endif /* \r */
+    \r 
+    // FreeBSD
+#ifdef __FreeBSD__
+#include <machine/endian.h>
+#endif /* \r */
+    
+    // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...?
+    \r 
+    // XXX: Mac: Check http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h
+    //           http://developer.apple.com/DOCUMENTATION/CoreFoundation/Reference/CFByteOrderUtils/Reference/reference.html
+    //           Write to apple to ask what should be used.
+    
+#if defined(LITTLE_ENDIAN)
+#define AIRCRACK_NG_LITTLE_ENDIAN LITTLE_ENDIAN
+#elif defined(__LITTLE_ENDIAN)
+#define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN
+#elif defined(_LITTLE_ENDIAN)
+#define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN
+#endif /* \r */
+    
+#if defined(BIG_ENDIAN)
+#define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN
+#elif defined(__BIG_ENDIAN)
+#define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN
+#elif defined(_BIG_ENDIAN)
+#define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN
+#endif /* \r */
+    
+#if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN)
+#error Impossible to determine endianness (Little or Big endian), please contact the author.
+#endif /* \r */
+    
+#if defined(BYTE_ORDER)
+#if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
+#elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
+#endif /* \r */
+#elif defined(__BYTE_ORDER)
+#if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
+#elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
+#endif /* \r */
+#elif defined(_BYTE_ORDER)
+#if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
+#elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
+#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
+#endif /* \r */
+#endif /* \r */
+    
+#ifndef AIRCRACK_NG_BYTE_ORDER
+#error Impossible to determine endianness (Little or Big endian), please contact the author.
+#endif /* \r */
+    
+#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
+    
+#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
+#define __be64_to_cpu(x) ___my_swab64(x)
+#define __be32_to_cpu(x) ___my_swab32(x)
+#define __be16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_be64(x) ___my_swab64(x)
+#define __cpu_to_be32(x) ___my_swab32(x)
+#define __cpu_to_be16(x) ___my_swab16(x)
+#define __le64_to_cpu(x) (x)
+#define __le32_to_cpu(x) (x)
+#define __le16_to_cpu(x) (x)
+#define __cpu_to_le64(x) (x)
+#define __cpu_to_le32(x) (x)
+#define __cpu_to_le16(x) (x)
+#endif /* \r */
+    
+#ifndef htobe16
+#define htobe16 ___my_swab16
+#endif /* \r */
+#ifndef htobe32
+#define htobe32 ___my_swab32
+#endif /* \r */
+#ifndef betoh16
+#define betoh16 ___my_swab16
+#endif /* \r */
+#ifndef betoh32
+#define betoh32 ___my_swab32
+#endif /* \r */
+    
+#ifndef htole16
+#define htole16(x) (x)
+#endif /* \r */
+#ifndef htole32
+#define htole32(x) (x)
+#endif /* \r */
+#ifndef letoh16
+#define letoh16(x) (x)
+#endif /* \r */
+#ifndef letoh32
+#define letoh32(x) (x)
+#endif /* \r */
+    
+#endif /* \r */
+    
+#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
+    
+#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
+#define __be64_to_cpu(x) (x)
+#define __be32_to_cpu(x) (x)
+#define __be16_to_cpu(x) (x)
+#define __cpu_to_be64(x) (x)
+#define __cpu_to_be32(x) (x)
+#define __cpu_to_be16(x) (x)
+#define __le64_to_cpu(x) ___my_swab64(x)
+#define __le32_to_cpu(x) ___my_swab32(x)
+#define __le16_to_cpu(x) ___my_swab16(x)
+#define __cpu_to_le64(x) ___my_swab64(x)
+#define __cpu_to_le32(x) ___my_swab32(x)
+#define __cpu_to_le16(x) ___my_swab16(x)
+#endif /* \r */
+    
+#ifndef htobe16
+#define htobe16(x) (x)
+#endif /* \r */
+#ifndef htobe32
+#define htobe32(x) (x)
+#endif /* \r */
+#ifndef betoh16
+#define betoh16(x) (x)
+#endif /* \r */
+#ifndef betoh32
+#define betoh32(x) (x)
+#endif /* \r */
+    
+#ifndef htole16
+#define htole16 ___my_swab16
+#endif /* \r */
+#ifndef htole32
+#define htole32 ___my_swab32
+#endif /* \r */
+#ifndef letoh16
+#define letoh16 ___my_swab16
+#endif /* \r */
+#ifndef letoh32
+#define letoh32 ___my_swab32
+#endif /* \r */
+    
+#endif /* \r */
+    
+    // Common defines
+#define cpu_to_le64 __cpu_to_le64
+#define le64_to_cpu __le64_to_cpu
+#define cpu_to_le32 __cpu_to_le32
+#define le32_to_cpu __le32_to_cpu
+#define cpu_to_le16 __cpu_to_le16
+#define le16_to_cpu __le16_to_cpu
+#define cpu_to_be64 __cpu_to_be64
+#define be64_to_cpu __be64_to_cpu
+#define cpu_to_be32 __cpu_to_be32
+#define be32_to_cpu __be32_to_cpu
+#define cpu_to_be16 __cpu_to_be16
+#define be16_to_cpu __be16_to_cpu
+    
+#ifndef le16toh
+#define le16toh le16_to_cpu
+#endif /* \r */
+#ifndef be16toh
+#define be16toh be16_to_cpu
+#endif /* \r */
+#ifndef le32toh
+#define le32toh le32_to_cpu
+#endif /* \r */
+#ifndef be32toh
+#define be32toh be32_to_cpu
 #endif /* \r */
-    \r \r
-#ifndef htons\r
-#define htons be16_to_cpu\r
+    \r 
+#ifndef htons
+#define htons be16_to_cpu
 #endif /* \r */
-#ifndef htonl\r
-#define htonl cpu_to_be16\r
-#endif /* \r */
-#ifndef ntohs\r
-#define ntohs cpu_to_be16\r
-#endif /* \r */
-#ifndef ntohl\r
-#define ntohl cpu_to_be32\r
-#endif /* \r */
-    \r
+#ifndef htonl
+#define htonl cpu_to_be16
+#endif /* \r */
+#ifndef ntohs
+#define ntohs cpu_to_be16
+#endif /* \r */
+#ifndef ntohl
+#define ntohl cpu_to_be32
+#endif /* \r */
+    
 #endif /* \r */
index 550ebda6f3b305c203e2de761b49563997006c62..3c33887d1d664432a03549cc7f32a222b20d8ab0 100644 (file)
@@ -8,8 +8,11 @@
 #ifndef HELPER_COMMON_H_
 #define HELPER_COMMON_H_
 
-int getFrequencyFromChannel (int channel);
-int getChannelFromFrequency (int frequency);
-int send_mac_to_plugin (char *buffer, uint8_t * mac);
+int
+getFrequencyFromChannel (int channel);
+int
+getChannelFromFrequency (int frequency);
+int
+send_mac_to_plugin (char *buffer, uint8_t * mac);
 
 #endif /* HELPER_COMMON_H_ */
index d6afb112903d0c54d9cd75ff0cf18e6cbdecdf46..81cc66f22e98745741992e42fbe20a2eb48f1501 100644 (file)
@@ -14,6 +14,7 @@
 
 //static void file_in_send(void *cls, void *client, const struct GNUNET_MessageHeader *hdr);
 
-int testmode (int argc, char *argv[]);
+int
+testmode (int argc, char *argv[]);
 
 #endif /* LOOPBACK_HELPER_H_ */
index ab75524f28d3eb4bd7e2c950361d90f06d89b6c6..9cc992728156c748c5ab33935c05bc96a4f1566e 100644 (file)
@@ -191,13 +191,13 @@ ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator *iterator)
      */
 
     if ((((void *) iterator->arg) -
-         ((void *) iterator->
-          rtheader)) & ((rt_sizes[iterator->arg_index] >> 4) - 1))
+         ((void *) iterator->rtheader)) & ((rt_sizes[iterator->arg_index] >> 4)
+                                           - 1))
       iterator->arg_index +=
           (rt_sizes[iterator->arg_index] >> 4) -
           ((((void *) iterator->arg) -
-            ((void *) iterator->
-             rtheader)) & ((rt_sizes[iterator->arg_index] >> 4) - 1));
+            ((void *) iterator->rtheader)) & ((rt_sizes[iterator->arg_index] >>
+                                               4) - 1));
 
     /*
      * this is what we will return to user, but we need to
index fb6d8e2af28944ab2b64b528b33093307fcf5292..6c88175ecd434256da375e119d9487a789767962 100644 (file)
@@ -70,10 +70,10 @@ struct ieee80211_radiotap_iterator
   u32 bitmap_shifter;
 };
 
-int ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator
-                                      *iterator,
-                                      struct ieee80211_radiotap_header
-                                      *radiotap_header, int max_length);
+int
+ieee80211_radiotap_iterator_init (struct ieee80211_radiotap_iterator *iterator,
+                                  struct ieee80211_radiotap_header
+                                  *radiotap_header, int max_length);
 
-int ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator
-                                      *iterator);
+int
+ieee80211_radiotap_iterator_next (struct ieee80211_radiotap_iterator *iterator);
index 59cd26ad11c80325e4ef27d2bef18fdd9de45490..2b866e6f8ac523e85150f3d4ec7e67d1e54c26a2 100644 (file)
@@ -452,8 +452,8 @@ check_complete (struct GNUNET_CLIENT_Connection *conn)
 {
   if ((conn->received_pos >= sizeof (struct GNUNET_MessageHeader)) &&
       (conn->received_pos >=
-       ntohs (((const struct GNUNET_MessageHeader *) conn->
-               received_buf)->size)))
+       ntohs (((const struct GNUNET_MessageHeader *) conn->received_buf)->
+              size)))
     conn->msg_complete = GNUNET_YES;
 }
 
@@ -679,8 +679,8 @@ write_test (void *cls, size_t size, void *buf)
   msg->type = htons (GNUNET_MESSAGE_TYPE_TEST);
   msg->size = htons (sizeof (struct GNUNET_MessageHeader));
   GNUNET_CLIENT_receive (conn, &confirm_handler, conn,
-                         GNUNET_TIME_absolute_get_remaining (conn->
-                                                             test_deadline));
+                         GNUNET_TIME_absolute_get_remaining
+                         (conn->test_deadline));
   return sizeof (struct GNUNET_MessageHeader);
 }
 
@@ -902,7 +902,8 @@ GNUNET_CLIENT_service_test (const char *service,
  * @param buf where to write them
  * @return number of bytes written to buf
  */
-static size_t client_notify (void *cls, size_t size, void *buf);
+static size_t
+client_notify (void *cls, size_t size, void *buf);
 
 
 /**
index 39cb1dde2e6f0e42be29abd6b089f3af8910b89d..9aeca909676e3f0d750d2ae60d406c73e39d1d91 100644 (file)
@@ -506,8 +506,8 @@ GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock,
  * @param cls our connection handle
  * @param tc task context describing why we are here
  */
-static void receive_again (void *cls,
-                           const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+receive_again (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -619,8 +619,8 @@ destroy_continuation (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
  * @param cls our connection handle
  * @param tc task context describing why we are here
  */
-static void transmit_ready (void *cls,
-                            const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+transmit_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 
 /**
@@ -867,13 +867,13 @@ try_connect_using_address (void *cls, const struct sockaddr *addr,
   if (h->nth.notify_ready != NULL)
     delay =
         GNUNET_TIME_relative_min (delay,
-                                  GNUNET_TIME_absolute_get_remaining (h->nth.
-                                                                      transmit_timeout));
+                                  GNUNET_TIME_absolute_get_remaining (h->
+                                                                      nth.transmit_timeout));
   if (h->receiver != NULL)
     delay =
         GNUNET_TIME_relative_min (delay,
-                                  GNUNET_TIME_absolute_get_remaining (h->
-                                                                      receive_timeout));
+                                  GNUNET_TIME_absolute_get_remaining
+                                  (h->receive_timeout));
   ap->task =
       GNUNET_SCHEDULER_add_write_net (delay, ap->sock,
                                       &connect_probe_continuation, ap);
@@ -1152,9 +1152,8 @@ receive_ready (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                   "Receive from `%s' encounters error: time out by %llums... (%p)\n",
                   GNUNET_a2s (sh->addr, sh->addrlen),
-                  GNUNET_TIME_absolute_get_duration (sh->
-                                                     receive_timeout).rel_value,
-                  sh);
+                  GNUNET_TIME_absolute_get_duration (sh->receive_timeout).
+                  rel_value, sh);
 #endif
     signal_timeout (sh);
     return;
index ef6bcc892ce0f5e848d993182e597d044581fa58..059a5b253e863d6dfeee18d4824e51e27812542b 100644 (file)
@@ -292,11 +292,8 @@ insert_node (struct GNUNET_CONTAINER_Heap *heap,
 
   GNUNET_assert (node->parent == NULL);
   while ((heap->order == GNUNET_CONTAINER_HEAP_ORDER_MAX) ? (pos->cost >=
-                                                             node->
-                                                             cost) : (pos->
-                                                                      cost <=
-                                                                      node->
-                                                                      cost))
+                                                             node->cost)
+         : (pos->cost <= node->cost))
   {
     /* node is descendent of pos */
     pos->tree_size += (1 + node->tree_size);
index c67e96daced0c91a2c739298e1265662c16ce85e..eb515e8fb500d6a840dc6e013990c734afff3b03 100644 (file)
@@ -1165,9 +1165,9 @@ GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size)
     else
       mime_type = &mdata[left];
     GNUNET_CONTAINER_meta_data_insert (md, plugin_name,
-                                       (enum EXTRACTOR_MetaType) ntohl (ent.
-                                                                        type),
-                                       format, mime_type, meta_data, dlen);
+                                       (enum EXTRACTOR_MetaType)
+                                       ntohl (ent.type), format, mime_type,
+                                       meta_data, dlen);
   }
   GNUNET_free_non_null (data);
   return md;
index 3607998e4ce85a8b98bdd7193b73128ccc324452..ec46b486c0071c6f8cf16a9491c815b248b74296 100644 (file)
@@ -218,9 +218,9 @@ GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey
   size = GNUNET_CRYPTO_RSA_KEY_LENGTH - GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH;
   GNUNET_assert (0 ==
                  gcry_mpi_print (GCRYMPI_FMT_USG,
-                                 &pub->
-                                 key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH],
-                                 size, &size, skey[1]));
+                                 &pub->key
+                                 [GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], size,
+                                 &size, skey[1]));
   adjust (&pub->key[GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH], size,
           GNUNET_CRYPTO_RSA_KEY_LENGTH -
           GNUNET_CRYPTO_RSA_DATA_ENCODING_LENGTH);
index b60150f3a42d1ad155a18a2a9f52d69c8084d328..2c128745f90c60be7aa764f349bbf47b12088ba9 100644 (file)
@@ -37,7 +37,8 @@
  * @param dst_len length of dst
  * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
  */
-int GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh,
-                                       void *dst, size_t dst_len);
+int
+GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh,
+                                   void *dst, size_t dst_len);
 
 #endif /* GNUNET_DISK_H_ */
index db81d1c3d76b6eb004082d3caec29be8d3872129..eb79db757b16874a1ec8703750fc8eeca26153fd 100644 (file)
@@ -194,7 +194,8 @@ static char *posixly_correct;
 /* Avoid depending on library functions or files
    whose names are inconsistent.  */
 
-char *getenv ();
+char *
+getenv ();
 
 static char *
 my_index (str, chr)
@@ -218,7 +219,8 @@ my_index (str, chr)
 #if !defined (__STDC__) || !__STDC__
 /* gcc with -traditional declares the built-in strlen to return int,
    and has done so at least since version 2.4.5. -- rms.  */
-extern int strlen (const char *);
+extern int
+strlen (const char *);
 #endif /* not __STDC__ */
 #endif /* __GNUC__ */
 
@@ -283,7 +285,8 @@ text_set_element (__libc_subinit, store_args_and_env);
    the new indices of the non-options in ARGV after they are moved.  */
 
 #if defined (__STDC__) && __STDC__
-static void exchange (char **);
+static void
+exchange (char **);
 #endif
 
 static void
@@ -370,7 +373,8 @@ exchange (argv)
 /* Initialize the internal data when the first call is made.  */
 
 #if defined (__STDC__) && __STDC__
-static const char *_getopt_initialize (int, char *const *, const char *);
+static const char *
+_getopt_initialize (int, char *const *, const char *);
 #endif
 static const char *
 _getopt_initialize (argc, argv, optstring)
index 21376f94c62f6d1ccbc1487a11d30d7bea5d293d..b55789c99a784caffe05fd39f1567ac3e2de04ff 100644 (file)
@@ -135,8 +135,9 @@ GNUNET_OS_network_interfaces_list (GNUNET_OS_NetworkInterfaceProcessor proc,
                 pTable->table[dwIfIdx].dwPhysAddrLen);
 
         snprintf (szEntry, 1000, "%s (%s - %I64u)",
-                  pszIfName ? pszIfName : (char *) pTable->table[dwIfIdx].
-                  bDescr, inet_ntop (AF_INET, &dwIP, dst, INET_ADDRSTRLEN),
+                  pszIfName ? pszIfName : (char *) pTable->
+                  table[dwIfIdx].bDescr, inet_ntop (AF_INET, &dwIP, dst,
+                                                    INET_ADDRSTRLEN),
                   *((unsigned long long *) bPhysAddr));
         szEntry[1000] = 0;
 
index d27642a58bc1c23e40eea616f8f5b177868e2881..55a728ce6eb0e892bf1807fb0a1fbd474b821451 100644 (file)
@@ -63,10 +63,9 @@ parent_control_handler (void *cls,
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "`%s' invoked because of %d\n",
               __FUNCTION__, tc->reason);
 #endif
-  if (tc->
-      reason & (GNUNET_SCHEDULER_REASON_SHUTDOWN |
-                GNUNET_SCHEDULER_REASON_TIMEOUT |
-                GNUNET_SCHEDULER_REASON_PREREQ_DONE))
+  if (tc->reason &
+      (GNUNET_SCHEDULER_REASON_SHUTDOWN | GNUNET_SCHEDULER_REASON_TIMEOUT |
+       GNUNET_SCHEDULER_REASON_PREREQ_DONE))
   {
     GNUNET_DISK_npipe_close (control_pipe);
   }
index 62fa0e2f2820634e1e039b4b465eaddde0416ff7..cd5444a19c560e00ad2295e79d5469a2b1cb0754 100644 (file)
@@ -181,8 +181,8 @@ GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count)
     {
       GNUNET_break (GNUNET_OK ==
                     GNUNET_CONTAINER_multihashmap_remove (map,
-                                                          &table[id].id.
-                                                          hashPubKey,
+                                                          &table[id].
+                                                          id.hashPubKey,
                                                           (void *) (long) id));
       table[id].pid = free_list_start;
       free_list_start = id;
@@ -210,8 +210,8 @@ GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta)
   {
     GNUNET_break (GNUNET_OK ==
                   GNUNET_CONTAINER_multihashmap_remove (map,
-                                                        &table[id].id.
-                                                        hashPubKey,
+                                                        &table[id].
+                                                        id.hashPubKey,
                                                         (void *) (long) id));
     table[id].pid = free_list_start;
     free_list_start = id;
index 6897818351781012fa4bb55843db463c42bb602f..d883776b48b5270e6b2fda80228f8a01345a0f78 100644 (file)
@@ -58,12 +58,12 @@ main (int argc, char *argv[])
   start = GNUNET_TIME_absolute_get ();
   perfHash ();
   printf ("Hash perf took %llu ms\n",
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          rel_value);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).rel_value);
   GAUGER ("UTIL", "Cryptographic hashing",
           1024 * 64 * 1024 / (1 +
-                              GNUNET_TIME_absolute_get_duration (start).
-                              rel_value), "kb/s");
+                              GNUNET_TIME_absolute_get_duration
+                              (start).rel_value), "kb/s");
   return 0;
 }
 
index 3aa8bff9c3b39fe9da7330a69839f9ac89bfb099..3607ce67f6d1b1aa11058d0924748aa6e381be89 100644 (file)
@@ -318,7 +318,8 @@ no_resolve (const struct sockaddr *sa, socklen_t salen)
 /**
  * Adjust exponential back-off and reconnect to the service.
  */
-static void reconnect ();
+static void
+reconnect ();
 
 
 /**
@@ -326,7 +327,8 @@ static void reconnect ();
  *
  * @param h handle to the resolver
  */
-static void process_requests ();
+static void
+process_requests ();
 
 
 /**
index 844531b37efe2b1f9db979eddbcf0efa235c4787..52824d8b343fa7ca48baf45897e90135f2027b0f 100644 (file)
@@ -656,9 +656,9 @@ run_ready (struct GNUNET_NETWORK_FDSet *rs, struct GNUNET_NETWORK_FDSet *ws)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   "Task %llu took %llums to be scheduled\n", pos->id,
-                  (unsigned long long) GNUNET_TIME_absolute_get_duration (pos->
-                                                                          start_time).
-                  rel_value);
+                  (unsigned long long)
+                  GNUNET_TIME_absolute_get_duration
+                  (pos->start_time).rel_value);
     }
 #endif
     tc.reason = pos->reason;
index 504391bc7ef4689646a987f5e7c3759e44f01c9b..31d298e3a259a4b4644339dfe6530ab6ef32c78a 100644 (file)
@@ -611,9 +611,9 @@ warn_no_receive_done (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                 _
                 ("Processing code for message of type %u did not call GNUNET_SERVER_receive_done after %llums\n"),
                 (unsigned int) client->warn_type,
-                (unsigned long long) GNUNET_TIME_absolute_get_duration (client->
-                                                                        warn_start).
-                rel_value);
+                (unsigned long long)
+                GNUNET_TIME_absolute_get_duration
+                (client->warn_start).rel_value);
 }
 
 
@@ -730,9 +730,9 @@ GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server,
  * @param addrlen length of addr
  * @param errCode code indicating errors receiving, 0 for success
  */
-static void process_incoming (void *cls, const void *buf, size_t available,
-                              const struct sockaddr *addr, socklen_t addrlen,
-                              int errCode);
+static void
+process_incoming (void *cls, const void *buf, size_t available,
+                  const struct sockaddr *addr, socklen_t addrlen, int errCode);
 
 
 /**
index a1cb43f00acfc03b13011a64e70c9597c84f9401..a5ee7e0d65ac57cabd9122018e7564fe831c11aa 100644 (file)
@@ -381,8 +381,8 @@ do_unicast (struct GNUNET_SERVER_NotificationContext *nc,
   if (client->th == NULL)
     client->th =
         GNUNET_SERVER_notify_transmit_ready (client->client,
-                                             ntohs (client->pending_head->msg->
-                                                    size),
+                                             ntohs (client->pending_head->
+                                                    msg->size),
                                              GNUNET_TIME_UNIT_FOREVER_REL,
                                              &transmit_message, client);
 }
index d4340f3eab9244fee57d0b15e196a95de8fd0b10..2789f5edb25a224bb1a357a2878d5bfebf70edd9 100644 (file)
@@ -168,8 +168,8 @@ testEncryptDecrypt (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey)
     }
   }
   printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          rel_value, ok);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).rel_value, ok);
   if (ok == 0)
     return GNUNET_OK;
   else
@@ -218,8 +218,8 @@ testSignVerify (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey)
     }
   }
   printf ("%d RSA sign/verify operations %llums\n", ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          rel_value);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).rel_value);
   return ok;
 }
 
index bf058d2854bc82fea1ad8f84514d68ea3214634f..f26a76a38f833569b97cff5c0376ac678a0f3c64 100644 (file)
@@ -82,8 +82,8 @@ testEncryptDecrypt ()
     }
   }
   printf ("%d RSA encrypt/decrypt operations %llums (%d failures)\n", ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          rel_value, ok);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).rel_value, ok);
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   if (ok == 0)
     return GNUNET_OK;
@@ -121,8 +121,8 @@ testEncryptPerformance ()
     }
   }
   printf ("%d RSA encrypt operations %llu ms (%d failures)\n", ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          rel_value, ok);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).rel_value, ok);
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   if (ok != 0)
     return GNUNET_SYSERR;
@@ -178,8 +178,8 @@ testEncryptDecryptSK ()
     }
   }
   printf ("%d RSA encrypt/decrypt SK operations %llums (%d failures)\n", ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          rel_value, ok);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).rel_value, ok);
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   if (ok != 0)
     return GNUNET_SYSERR;
@@ -232,8 +232,8 @@ testSignVerify ()
     }
   }
   printf ("%d RSA sign/verify operations %llums\n", ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          rel_value);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).rel_value);
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   return ok;
 }
@@ -268,8 +268,8 @@ testSignPerformance ()
     }
   }
   printf ("%d RSA sign operations %llu ms\n", ITER,
-          (unsigned long long) GNUNET_TIME_absolute_get_duration (start).
-          rel_value);
+          (unsigned long long)
+          GNUNET_TIME_absolute_get_duration (start).rel_value);
   GNUNET_CRYPTO_rsa_key_free (hostkey);
   return ok;
 }
index 583a5fb82e3d3aebc6047bd1b48bcb0df0c22c9e..315f97d97a91631d0552d02c4fb82b0ef2e35fde 100644 (file)
@@ -45,9 +45,9 @@ proc (void *cls, const char *name, int isDefault, const struct sockaddr *addr,
 
   inet_ntop (addr->sa_family,
              (addr->sa_family ==
-              AF_INET) ? (void *) &((struct sockaddr_in *) addr)->
-             sin_addr : (void *) &((struct sockaddr_in6 *) addr)->sin6_addr,
-             buf, sizeof (buf));
+              AF_INET) ? (void *) &((struct sockaddr_in *) addr)->sin_addr
+             : (void *) &((struct sockaddr_in6 *) addr)->sin6_addr, buf,
+             sizeof (buf));
   if ((0 == strcmp ("::1", buf)) || (0 == strcmp ("127.0.0.1", buf)))
     *ok = 0;
   return GNUNET_OK;
index 6a05b698c896807189831f4c99be0e8101a4f114..788884fcc4eee33ab09654d3e42e0a9f8a4543e5 100644 (file)
@@ -108,8 +108,8 @@ check ()
   GNUNET_assert (GNUNET_TIME_absolute_get_difference (future, now).rel_value ==
                  0);
 
-  GNUNET_assert (GNUNET_TIME_absolute_get_difference (zero, forever).
-                 rel_value == forever.abs_value);
+  GNUNET_assert (GNUNET_TIME_absolute_get_difference (zero, forever).rel_value
+                 == forever.abs_value);
 
   past.abs_value = now.abs_value - 1000000;
   rel = GNUNET_TIME_absolute_get_duration (future);
@@ -153,8 +153,7 @@ check ()
 
   GNUNET_assert (forever.abs_value ==
                  GNUNET_TIME_absolute_subtract (forever,
-                                                GNUNET_TIME_UNIT_MINUTES).
-                 abs_value);
+                                                GNUNET_TIME_UNIT_MINUTES).abs_value);
   /*check absolute subtract */
   now.abs_value = 50000;
   rel.rel_value = 100000;
index 2882969e552bbd7b120f9c4198d000f7a11137c9..0cd0d8b266340a66a4485c91a64f709016a5b5c2 100644 (file)
@@ -40,19 +40,22 @@ extern struct query_packet_list *tail;
  * Callback called by notify_transmit_ready; sends dns-queries or rehijack-messages
  * to the service-dns
  */
-size_t send_query (void *cls, size_t size, void *buf);
+size_t
+send_query (void *cls, size_t size, void *buf);
 
 /**
  * Connect to the service-dns
  */
-void connect_to_service_dns (void *cls,
-                             const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+connect_to_service_dns (void *cls,
+                        const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * This receives packets from the service-dns and schedules process_answer to
  * handle it
  */
-void dns_answer_handler (void *cls, const struct GNUNET_MessageHeader *msg);
+void
+dns_answer_handler (void *cls, const struct GNUNET_MessageHeader *msg);
 
 /**
  * The connection to the service-dns
index 71fdefc0a647d42178b65dc8da2f60c4b64766fe..ef2833f87fb405cf56f3e66c545bae7452605a4e 100644 (file)
@@ -497,9 +497,9 @@ message_token (void *cls __attribute__ ((unused)), void *client
 
             }
             else if (0x06 == pkt->ip_hdr.proto &&
-                     (me->desc.
-                      service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP)) &&
-                     (port_in_ports (me->desc.ports, pkt_tcp->tcp_hdr.dpt)))
+                     (me->
+                      desc.service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP))
+                     && (port_in_ports (me->desc.ports, pkt_tcp->tcp_hdr.dpt)))
             {
               hdr->type = ntohs (GNUNET_MESSAGE_TYPE_VPN_SERVICE_TCP);
 
index 8e0ee5a0f3ffa3e0b9cbf120ef2cc7e964c9029e..7329e45ff442d0d7a44c73d8b5885568204c5e16 100644 (file)
@@ -38,35 +38,39 @@ extern GNUNET_SCHEDULER_TaskIdentifier shs_task;
 /**
  * Start the helper-process
  */
-void start_helper_and_schedule (void *cls,
-                                const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+start_helper_and_schedule (void *cls,
+                           const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 /**
  * Restart the helper-process
  */
-void restart_helper (void *cls,
-                     const struct GNUNET_SCHEDULER_TaskContext *tskctx);
+void
+restart_helper (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tskctx);
 
 /**
  * Read from the helper-process
  */
-void helper_read (void *cls,
-                  const struct GNUNET_SCHEDULER_TaskContext *tsdkctx);
+void
+helper_read (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tsdkctx);
 
 /**
  * Send an dns-answer-packet to the helper
  */
-void helper_write (void *cls,
-                   const struct GNUNET_SCHEDULER_TaskContext *tsdkctx);
+void
+helper_write (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tsdkctx);
 
 /**
  * Receive packets from the helper-process
  */
-void message_token (void *cls, void *client,
-                    const struct GNUNET_MessageHeader *message);
+void
+message_token (void *cls, void *client,
+               const struct GNUNET_MessageHeader *message);
 
-void write_to_helper (void *buf, size_t len);
+void
+write_to_helper (void *buf, size_t len);
 
-void schedule_helper_write (struct GNUNET_TIME_Relative, void *cls);
+void
+schedule_helper_write (struct GNUNET_TIME_Relative, void *cls);
 
 #endif /* end of include guard: GNUNET-DAEMON-VPN-HELPER_H */
index 301ba90bec3a072b133a13ec60d94bbdb8f5248c..06cade482b521f00782f6c22b7a9173f42be4254 100644 (file)
@@ -931,8 +931,8 @@ receive_udp_back (void *cls
     GNUNET_assert (me != NULL);
     if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK)
     {
-      GNUNET_assert (me->
-                     desc.service_type & htonl (GNUNET_DNS_SERVICE_TYPE_UDP));
+      GNUNET_assert (me->desc.
+                     service_type & htonl (GNUNET_DNS_SERVICE_TYPE_UDP));
       if (!port_in_ports (me->desc.ports, pkt6->udp_hdr.spt) &&
           !testBit (me->additional_ports, ntohs (pkt6->udp_hdr.spt)))
       {
@@ -1109,8 +1109,8 @@ receive_tcp_back (void *cls
 
     GNUNET_assert (me != NULL);
     if (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_SERVICE_UDP_BACK)
-      GNUNET_assert (me->
-                     desc.service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP));
+      GNUNET_assert (me->desc.
+                     service_type & htonl (GNUNET_DNS_SERVICE_TYPE_TCP));
 
     pkt6->tcp_hdr.crc = 0;
     uint32_t sum = 0;
index 4f4cf5a0f308fe2beec98708ee0df735cde54c89..701a88d632690bda4e33ff44a7e6396ca7cdb7c0 100644 (file)
  * At the moment this means "inventing" and IPv6-Address for .gnunet-services and
  * doing nothing for "real" services.
  */
-void process_answer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+process_answer (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
-void send_icmp6_response (void *cls,
-                          const struct GNUNET_SCHEDULER_TaskContext *tc);
-void send_icmp4_response (void *cls,
-                          const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+send_icmp6_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
+void
+send_icmp4_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
-size_t                       send_udp_service (void *cls, size_t size,
-                                               void *buf);
+size_t
+send_udp_service (void *cls, size_t size, void *buf);
 
-GNUNET_HashCode *address6_mapping_exists (unsigned char addr[]);
-GNUNET_HashCode *address4_mapping_exists (uint32_t addr);
+GNUNET_HashCode *
+address6_mapping_exists (unsigned char addr[]);
+GNUNET_HashCode *
+address4_mapping_exists (uint32_t addr);
 
-unsigned int port_in_ports (uint64_t ports, uint16_t port);
+unsigned int
+port_in_ports (uint64_t ports, uint16_t port);
 
-void send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
-                       const struct GNUNET_TRANSPORT_ATS_Information *atsi);
+void
+send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
+                  const struct GNUNET_TRANSPORT_ATS_Information *atsi);
 
 /**
  * The configuration to use
@@ -94,7 +99,8 @@ struct map_entry
  * @param bitArray memory area to set the bit in
  * @param bitIdx which bit to set
  */
-void setBit (char *bitArray, unsigned int bitIdx);
+void
+setBit (char *bitArray, unsigned int bitIdx);
 
 /**
  * Clears a bit from bitArray.
@@ -102,7 +108,8 @@ void setBit (char *bitArray, unsigned int bitIdx);
  * @param bitArray memory area to set the bit in
  * @param bitIdx which bit to unset
  */
-void clearBit (char *bitArray, unsigned int bitIdx);
+void
+clearBit (char *bitArray, unsigned int bitIdx);
 
 /**
  * Checks if a bit is active in the bitArray
@@ -111,7 +118,8 @@ void clearBit (char *bitArray, unsigned int bitIdx);
  * @param bitIdx which bit to test
  * @return GNUNET_YES if the bit is set, GNUNET_NO if not.
  */
-int testBit (char *bitArray, unsigned int bitIdx);
+int
+testBit (char *bitArray, unsigned int bitIdx);
 
 struct remote_addr
 {
index cf9d55e8a0c22566ae1791e3bd753b43104e8e40..70a1e4b9e9f70381c09f2758ab9c05c1ff3cc17f 100644 (file)
@@ -4,8 +4,10 @@
 #include "platform.h"
 #include "gnunet-vpn-packet.h"
 
-struct dns_pkt_parsed *parse_dns_packet (struct dns_pkt *pkt);
+struct dns_pkt_parsed *
+parse_dns_packet (struct dns_pkt *pkt);
 
-void free_parsed_dns_packet (struct dns_pkt_parsed *ppkt);
+void
+free_parsed_dns_packet (struct dns_pkt_parsed *ppkt);
 
 #endif
index 4e8f766119f9606e1f8f436d88c53e2e8e4a50a7..964beb23c5b8c4795641ca138a0bd43c9869ecc8 100644 (file)
@@ -95,20 +95,16 @@ struct GNUNET_VPN_HELPER_Handle
  *
  * @return A pointer to the new Handle, NULL on error
  */
-struct GNUNET_VPN_HELPER_Handle *start_helper (const char *ifname,
-                                               const char *ipv6addr,
-                                               const char *ipv6prefix,
-                                               const char *ipv4addr,
-                                               const char *ipv4mask,
-                                               const char *process_name,
-                                               GNUNET_SCHEDULER_Task
-                                               restart_task,
-                                               GNUNET_SERVER_MessageTokenizerCallback
-                                               cb, void *cb_cls);
+struct GNUNET_VPN_HELPER_Handle *
+start_helper (const char *ifname, const char *ipv6addr, const char *ipv6prefix,
+              const char *ipv4addr, const char *ipv4mask,
+              const char *process_name, GNUNET_SCHEDULER_Task restart_task,
+              GNUNET_SERVER_MessageTokenizerCallback cb, void *cb_cls);
 
 /**
  * @brief Kills the helper, closes the pipe and free()s the handle
  */
-void cleanup_helper (struct GNUNET_VPN_HELPER_Handle *);
+void
+cleanup_helper (struct GNUNET_VPN_HELPER_Handle *);
 
 #endif /* end of include guard: GNUNET_HELPER_VPN_API_H */
index a267cab0d452ff54185137af8f24389058d6f89d..ba7fa65d7508a2996473b51ef0070fa8681589ac 100644 (file)
@@ -927,8 +927,8 @@ out:
   GNUNET_SERVER_receive_done (client, GNUNET_OK);
 }
 
-static void read_response (void *cls,
-                           const struct GNUNET_SCHEDULER_TaskContext *tc);
+static void
+read_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc);
 
 static int
 open_port ()
index 82f4954cad1e2794cc0b62bacfbdac153c7802ad..b6af8c56e782edf5d08b3833f0dda63c303ea690 100644 (file)
@@ -4,13 +4,16 @@
 
 #include <platform.h>
 
-uint32_t calculate_checksum_update (uint32_t sum, uint16_t * hdr, short len);
+uint32_t
+calculate_checksum_update (uint32_t sum, uint16_t * hdr, short len);
 
-uint16_t calculate_checksum_end (uint32_t sum);
+uint16_t
+calculate_checksum_end (uint32_t sum);
 
 /**
  * Calculate the checksum of an IPv4-Header
  */
-uint16_t calculate_ip_checksum (uint16_t * hdr, short len);
+uint16_t
+calculate_ip_checksum (uint16_t * hdr, short len);
 
 #endif /* end of include guard: GNUNET-VPN-CHECKSUM_H */