aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.indent.pro4
-rw-r--r--src/arm/gnunet-service-arm.h4
-rw-r--r--src/dht/dhtlog.h36
-rw-r--r--src/fs/fs.h65
-rw-r--r--src/fs/fs_test_lib.h61
-rw-r--r--src/fs/fs_tree.h8
-rw-r--r--src/fs/gnunet-service-fs_cp.h69
-rw-r--r--src/fs/gnunet-service-fs_indexing.h45
-rw-r--r--src/fs/gnunet-service-fs_lc.h9
-rw-r--r--src/fs/gnunet-service-fs_pe.h4
-rw-r--r--src/fs/gnunet-service-fs_pr.h38
-rw-r--r--src/hostlist/hostlist-client.h11
-rw-r--r--src/hostlist/hostlist-server.h13
-rw-r--r--src/include/gnunet_arm_service.h18
-rw-r--r--src/include/gnunet_ats_service.h49
-rw-r--r--src/include/gnunet_bandwidth_lib.h80
-rw-r--r--src/include/gnunet_bio_lib.h24
-rw-r--r--src/include/gnunet_block_lib.h39
-rw-r--r--src/include/gnunet_block_plugin.h40
-rw-r--r--src/include/gnunet_chat_service.h16
-rw-r--r--src/include/gnunet_client_lib.h51
-rw-r--r--src/include/gnunet_common.h32
-rw-r--r--src/include/gnunet_configuration_lib.h52
-rw-r--r--src/include/gnunet_connection_lib.h80
-rw-r--r--src/include/gnunet_container_lib.h187
-rw-r--r--src/include/gnunet_core_service.h85
-rw-r--r--src/include/gnunet_crypto_lib.h92
-rw-r--r--src/include/gnunet_datacache_lib.h24
-rw-r--r--src/include/gnunet_datacache_plugin.h10
-rw-r--r--src/include/gnunet_datastore_plugin.h37
-rw-r--r--src/include/gnunet_datastore_service.h3
-rw-r--r--src/include/gnunet_dht_service.h50
-rw-r--r--src/include/gnunet_disk_lib.h39
-rw-r--r--src/include/gnunet_dv_service.h9
-rw-r--r--src/include/gnunet_fragmentation_lib.h17
-rw-r--r--src/include/gnunet_fs_service.h256
-rw-r--r--src/include/gnunet_getopt_lib.h27
-rw-r--r--src/include/gnunet_hello_lib.h72
-rw-r--r--src/include/gnunet_load_lib.h5
-rw-r--r--src/include/gnunet_mesh_service.h37
-rw-r--r--src/include/gnunet_mesh_service_new.h51
-rw-r--r--src/include/gnunet_nat_lib.h17
-rw-r--r--src/include/gnunet_network_lib.h44
-rw-r--r--src/include/gnunet_os_lib.h11
-rw-r--r--src/include/gnunet_peerinfo_service.h19
-rw-r--r--src/include/gnunet_program_lib.h7
-rw-r--r--src/include/gnunet_pseudonym_lib.h13
-rw-r--r--src/include/gnunet_scheduler_lib.h127
-rw-r--r--src/include/gnunet_server_lib.h127
-rw-r--r--src/include/gnunet_service_lib.h19
-rw-r--r--src/include/gnunet_statistics_service.h35
-rw-r--r--src/include/gnunet_strings_lib.h11
-rw-r--r--src/include/gnunet_testing_lib.h204
-rw-r--r--src/include/gnunet_time_lib.h21
-rw-r--r--src/include/gnunet_transport_plugin.h74
-rw-r--r--src/include/gnunet_transport_service.h109
-rw-r--r--src/include/gnunet_upnp_service.h7
-rw-r--r--src/include/plibc.h13
-rw-r--r--src/include/winproc.h10
-rw-r--r--src/transport/gnunet-service-transport_ats.h40
-rw-r--r--src/transport/gnunet-service-transport_blacklist.h17
-rw-r--r--src/transport/gnunet-service-transport_clients.h9
-rw-r--r--src/transport/gnunet-service-transport_hello.h18
-rw-r--r--src/transport/gnunet-service-transport_neighbours.h53
-rw-r--r--src/transport/gnunet-service-transport_plugins.h11
-rw-r--r--src/transport/gnunet-service-transport_validation.h24
-rw-r--r--src/transport/transport-testing.h9
-rw-r--r--src/transport/wlan/byteorder.h46
-rw-r--r--src/util/disk.h4
-rw-r--r--src/vpn/gnunet-daemon-vpn-helper.h4
-rw-r--r--src/vpn/gnunet-daemon-vpn.h10
71 files changed, 1350 insertions, 1612 deletions
diff --git a/.indent.pro b/.indent.pro
index 29c9900c3..7009a9140 100644
--- a/.indent.pro
+++ b/.indent.pro
@@ -449,8 +449,8 @@
449// ((mask[0] == '0') || (mask[0] == '*'))))) 449// ((mask[0] == '0') || (mask[0] == '*')))))
450// ------- 450// -------
451// For now just keep ignoring. After everything settles down, we might want to start putting custom newlines where it is appropriate 451// For now just keep ignoring. After everything settles down, we might want to start putting custom newlines where it is appropriate
452--honour-newlines 452// --honour-newlines
453//--ignore-newlines 453--ignore-newlines
454// 454//
455// 455//
456// 456//
diff --git a/src/arm/gnunet-service-arm.h b/src/arm/gnunet-service-arm.h
index a9f72b512..bdb5d2c93 100644
--- a/src/arm/gnunet-service-arm.h
+++ b/src/arm/gnunet-service-arm.h
@@ -35,8 +35,8 @@
35 * @param lsocks -1 terminated list of listen sockets to pass (systemd style), or NULL 35 * @param lsocks -1 terminated list of listen sockets to pass (systemd style), or NULL
36 * @return GNUNET_OK on success 36 * @return GNUNET_OK on success
37 */ 37 */
38int start_service (struct GNUNET_SERVER_Client *client, 38int start_service (struct GNUNET_SERVER_Client *client, const char *servicename,
39 const char *servicename, const int *lsocks); 39 const int *lsocks);
40 40
41/** 41/**
42 * Stop listening for connections to a service. 42 * Stop listening for connections to a service.
diff --git a/src/dht/dhtlog.h b/src/dht/dhtlog.h
index 6a8a6f1bb..476a4039e 100644
--- a/src/dht/dhtlog.h
+++ b/src/dht/dhtlog.h
@@ -166,8 +166,7 @@ struct GNUNET_DHTLOG_Handle
166 */ 166 */
167 int (*insert_query) (unsigned long long *sqlqueryuid, 167 int (*insert_query) (unsigned long long *sqlqueryuid,
168 unsigned long long queryid, DHTLOG_MESSAGE_TYPES type, 168 unsigned long long queryid, DHTLOG_MESSAGE_TYPES type,
169 unsigned int hops, 169 unsigned int hops, int succeeded,
170 int succeeded,
171 const struct GNUNET_PeerIdentity * node, 170 const struct GNUNET_PeerIdentity * node,
172 const GNUNET_HashCode * key); 171 const GNUNET_HashCode * key);
173 172
@@ -203,16 +202,19 @@ struct GNUNET_DHTLOG_Handle
203 * 202 *
204 * @return GNUNET_OK on success, GNUNET_SYSERR on failure 203 * @return GNUNET_OK on success, GNUNET_SYSERR on failure
205 */ 204 */
206 int (*insert_stat) 205 int (*insert_stat) (const struct GNUNET_PeerIdentity * peer,
207 (const struct GNUNET_PeerIdentity * peer, unsigned int route_requests, 206 unsigned int route_requests, unsigned int route_forwards,
208 unsigned int route_forwards, unsigned int result_requests, 207 unsigned int result_requests,
209 unsigned int client_requests, unsigned int result_forwards, 208 unsigned int client_requests,
210 unsigned int gets, unsigned int puts, 209 unsigned int result_forwards, unsigned int gets,
211 unsigned int data_inserts, unsigned int find_peer_requests, 210 unsigned int puts, unsigned int data_inserts,
212 unsigned int find_peers_started, unsigned int gets_started, 211 unsigned int find_peer_requests,
213 unsigned int puts_started, unsigned int find_peer_responses_received, 212 unsigned int find_peers_started,
214 unsigned int get_responses_received, 213 unsigned int gets_started, unsigned int puts_started,
215 unsigned int find_peer_responses_sent, unsigned int get_responses_sent); 214 unsigned int find_peer_responses_received,
215 unsigned int get_responses_received,
216 unsigned int find_peer_responses_sent,
217 unsigned int get_responses_sent);
216 218
217 /* 219 /*
218 * Update dhttests.trials table with current server time as end time 220 * Update dhttests.trials table with current server time as end time
@@ -264,8 +266,8 @@ struct GNUNET_DHTLOG_Handle
264 * @return GNUNET_OK on success, GNUNET_SYSERR on failure 266 * @return GNUNET_OK on success, GNUNET_SYSERR on failure
265 */ 267 */
266 int (*add_generic_stat) (const struct GNUNET_PeerIdentity * peer, 268 int (*add_generic_stat) (const struct GNUNET_PeerIdentity * peer,
267 const char *name, 269 const char *name, const char *section,
268 const char *section, uint64_t value); 270 uint64_t value);
269 271
270 /* 272 /*
271 * Inserts the specified round into the dhttests.rounds table 273 * Inserts the specified round into the dhttests.rounds table
@@ -327,10 +329,8 @@ struct GNUNET_DHTLOG_Handle
327 * @return GNUNET_OK on success, GNUNET_SYSERR on failure. 329 * @return GNUNET_OK on success, GNUNET_SYSERR on failure.
328 */ 330 */
329 int (*insert_route) (unsigned long long *sqlqueryuid, 331 int (*insert_route) (unsigned long long *sqlqueryuid,
330 unsigned long long queryid, 332 unsigned long long queryid, unsigned int type,
331 unsigned int type, 333 unsigned int hops, int succeeded,
332 unsigned int hops,
333 int succeeded,
334 const struct GNUNET_PeerIdentity * node, 334 const struct GNUNET_PeerIdentity * node,
335 const GNUNET_HashCode * key, 335 const GNUNET_HashCode * key,
336 const struct GNUNET_PeerIdentity * from_node, 336 const struct GNUNET_PeerIdentity * from_node,
diff --git a/src/fs/fs.h b/src/fs/fs.h
index 1d3fc6611..68bab5916 100644
--- a/src/fs/fs.h
+++ b/src/fs/fs.h
@@ -788,17 +788,9 @@ void GNUNET_FS_dequeue_ (struct GNUNET_FS_QueueEntry *qh);
788 * @param emsg location for the reader to store an error message 788 * @param emsg location for the reader to store an error message
789 * @return number of bytes written, usually "max", 0 on error 789 * @return number of bytes written, usually "max", 0 on error
790 */ 790 */
791size_t 791size_t GNUNET_FS_data_reader_file_ (void *cls, uint64_t offset,
792 792 size_t max, void *buf,
793 793 char **emsg);
794
795
796
797
798
799GNUNET_FS_data_reader_file_ (void *cls,
800 uint64_t offset,
801 size_t max, void *buf, char **emsg);
802 794
803 795
804/** 796/**
@@ -827,10 +819,8 @@ void *GNUNET_FS_make_file_reader_context_ (const char *filename);
827 * @param emsg location for the reader to store an error message 819 * @param emsg location for the reader to store an error message
828 * @return number of bytes written, usually "max", 0 on error 820 * @return number of bytes written, usually "max", 0 on error
829 */ 821 */
830size_t 822size_t GNUNET_FS_data_reader_copy_ (void *cls, uint64_t offset, size_t max,
831GNUNET_FS_data_reader_copy_ (void *cls, 823 void *buf, char **emsg);
832 uint64_t offset,
833 size_t max, void *buf, char **emsg);
834 824
835/** 825/**
836 * Notification of FS that a search probe has made progress. 826 * Notification of FS that a search probe has made progress.
@@ -858,9 +848,8 @@ void *GNUNET_FS_search_probe_progress_ (void *cls,
858 * @param cls "struct GNUNET_FS_PublishContext" identifies the upload 848 * @param cls "struct GNUNET_FS_PublishContext" identifies the upload
859 * @param tc task context 849 * @param tc task context
860 */ 850 */
861void 851void GNUNET_FS_publish_main_ (void *cls,
862GNUNET_FS_publish_main_ (void *cls, 852 const struct GNUNET_SCHEDULER_TaskContext *tc);
863 const struct GNUNET_SCHEDULER_TaskContext *tc);
864 853
865 854
866/** 855/**
@@ -870,8 +859,8 @@ GNUNET_FS_publish_main_ (void *cls,
870 * @param cls closure, unindex context 859 * @param cls closure, unindex context
871 * @param file_id computed hash, NULL on error 860 * @param file_id computed hash, NULL on error
872 */ 861 */
873void 862void GNUNET_FS_unindex_process_hash_ (void *cls,
874GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id); 863 const GNUNET_HashCode * file_id);
875 864
876 865
877/** 866/**
@@ -897,9 +886,8 @@ void *GNUNET_FS_publish_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
897 * @param pi structure to fill in 886 * @param pi structure to fill in
898 * @param dc overall download context 887 * @param dc overall download context
899 */ 888 */
900void 889void GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
901GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi, 890 struct GNUNET_FS_DownloadContext *dc);
902 struct GNUNET_FS_DownloadContext *dc);
903 891
904 892
905/** 893/**
@@ -909,9 +897,9 @@ GNUNET_FS_download_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
909 * @param cls the 'struct GNUNET_FS_DownloadContext' 897 * @param cls the 'struct GNUNET_FS_DownloadContext'
910 * @param tc scheduler context 898 * @param tc scheduler context
911 */ 899 */
912void 900void GNUNET_FS_download_start_task_ (void *cls,
913GNUNET_FS_download_start_task_ (void *cls, 901 const struct GNUNET_SCHEDULER_TaskContext
914 const struct GNUNET_SCHEDULER_TaskContext *tc); 902 *tc);
915 903
916 904
917 905
@@ -923,10 +911,9 @@ GNUNET_FS_download_start_task_ (void *cls,
923 * @param uc overall unindex context 911 * @param uc overall unindex context
924 * @param offset where we are in the file (for progress) 912 * @param offset where we are in the file (for progress)
925 */ 913 */
926void 914void GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi,
927GNUNET_FS_unindex_make_status_ (struct GNUNET_FS_ProgressInfo *pi, 915 struct GNUNET_FS_UnindexContext *uc,
928 struct GNUNET_FS_UnindexContext *uc, 916 uint64_t offset);
929 uint64_t offset);
930 917
931/** 918/**
932 * Fill in all of the generic fields for a search event and 919 * Fill in all of the generic fields for a search event and
@@ -961,8 +948,8 @@ int GNUNET_FS_search_start_searching_ (struct GNUNET_FS_SearchContext *sc);
961 * 948 *
962 * @param dc our download context 949 * @param dc our download context
963 */ 950 */
964void 951void GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext
965GNUNET_FS_download_start_downloading_ (struct GNUNET_FS_DownloadContext *dc); 952 *dc);
966 953
967 954
968/** 955/**
@@ -979,9 +966,8 @@ void GNUNET_FS_search_start_probe_ (struct GNUNET_FS_SearchResult *sr);
979 * @param ext component of the path 966 * @param ext component of the path
980 * @param ent entity identifier 967 * @param ent entity identifier
981 */ 968 */
982void 969void GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, const char *ext,
983GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h, 970 const char *ent);
984 const char *ext, const char *ent);
985 971
986 972
987/** 973/**
@@ -991,9 +977,8 @@ GNUNET_FS_remove_sync_file_ (struct GNUNET_FS_Handle *h,
991 * @param ext component of the path 977 * @param ext component of the path
992 * @param uni unique name of parent 978 * @param uni unique name of parent
993 */ 979 */
994void 980void GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, const char *ext,
995GNUNET_FS_remove_sync_dir_ (struct GNUNET_FS_Handle *h, 981 const char *uni);
996 const char *ext, const char *uni);
997 982
998 983
999/** 984/**
@@ -1144,8 +1129,8 @@ struct TopLevelActivity *GNUNET_FS_make_top (struct GNUNET_FS_Handle *h,
1144 * @param h global fs handle 1129 * @param h global fs handle
1145 * @param top top level activity entry 1130 * @param top top level activity entry
1146 */ 1131 */
1147void 1132void GNUNET_FS_end_top (struct GNUNET_FS_Handle *h,
1148GNUNET_FS_end_top (struct GNUNET_FS_Handle *h, struct TopLevelActivity *top); 1133 struct TopLevelActivity *top);
1149 1134
1150 1135
1151 1136
diff --git a/src/fs/fs_test_lib.h b/src/fs/fs_test_lib.h
index 2017b21ea..fa822e265 100644
--- a/src/fs/fs_test_lib.h
+++ b/src/fs/fs_test_lib.h
@@ -53,12 +53,11 @@ struct GNUNET_FS_TestDaemon;
53 * 'GNUNET_FS_TEST_daemons_stop'! 53 * 'GNUNET_FS_TEST_daemons_stop'!
54 * @param cont_cls closure for cont 54 * @param cont_cls closure for cont
55 */ 55 */
56void 56void GNUNET_FS_TEST_daemons_start (const char *template_cfg_file,
57GNUNET_FS_TEST_daemons_start (const char *template_cfg_file, 57 struct GNUNET_TIME_Relative timeout,
58 struct GNUNET_TIME_Relative timeout, 58 unsigned int total,
59 unsigned int total, 59 struct GNUNET_FS_TestDaemon **daemons,
60 struct GNUNET_FS_TestDaemon **daemons, 60 GNUNET_SCHEDULER_Task cont, void *cont_cls);
61 GNUNET_SCHEDULER_Task cont, void *cont_cls);
62 61
63 62
64/** 63/**
@@ -71,11 +70,11 @@ GNUNET_FS_TEST_daemons_start (const char *template_cfg_file,
71 * @param cont function to call when done 70 * @param cont function to call when done
72 * @param cont_cls closure for cont 71 * @param cont_cls closure for cont
73 */ 72 */
74void 73void GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1,
75GNUNET_FS_TEST_daemons_connect (struct GNUNET_FS_TestDaemon *daemon1, 74 struct GNUNET_FS_TestDaemon *daemon2,
76 struct GNUNET_FS_TestDaemon *daemon2, 75 struct GNUNET_TIME_Relative timeout,
77 struct GNUNET_TIME_Relative timeout, 76 GNUNET_SCHEDULER_Task cont,
78 GNUNET_SCHEDULER_Task cont, void *cont_cls); 77 void *cont_cls);
79 78
80 79
81/** 80/**
@@ -107,9 +106,8 @@ const struct GNUNET_CONFIGURATION_Handle
107 * @param total number of daemons to stop 106 * @param total number of daemons to stop
108 * @param daemons array with the daemons (values will be clobbered) 107 * @param daemons array with the daemons (values will be clobbered)
109 */ 108 */
110void 109void GNUNET_FS_TEST_daemons_stop (unsigned int total,
111GNUNET_FS_TEST_daemons_stop (unsigned int total, 110 struct GNUNET_FS_TestDaemon **daemons);
112 struct GNUNET_FS_TestDaemon **daemons);
113 111
114 112
115/** 113/**
@@ -118,9 +116,9 @@ GNUNET_FS_TEST_daemons_stop (unsigned int total,
118 * @param cls closure (user defined) 116 * @param cls closure (user defined)
119 * @param uri a URI, NULL for errors 117 * @param uri a URI, NULL for errors
120 */ 118 */
121typedef void 119typedef void (*GNUNET_FS_TEST_UriContinuation) (void *cls,
122 (*GNUNET_FS_TEST_UriContinuation) (void *cls, 120 const struct GNUNET_FS_Uri *
123 const struct GNUNET_FS_Uri * uri); 121 uri);
124 122
125 123
126/** 124/**
@@ -138,15 +136,12 @@ typedef void
138 * @param cont function to call when done 136 * @param cont function to call when done
139 * @param cont_cls closure for cont 137 * @param cont_cls closure for cont
140 */ 138 */
141void 139void GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon,
142GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon, 140 struct GNUNET_TIME_Relative timeout,
143 struct GNUNET_TIME_Relative timeout, 141 uint32_t anonymity, int do_index, uint64_t size,
144 uint32_t anonymity, 142 uint32_t seed, unsigned int verbose,
145 int do_index, 143 GNUNET_FS_TEST_UriContinuation cont,
146 uint64_t size, 144 void *cont_cls);
147 uint32_t seed,
148 unsigned int verbose,
149 GNUNET_FS_TEST_UriContinuation cont, void *cont_cls);
150 145
151 146
152/** 147/**
@@ -162,14 +157,12 @@ GNUNET_FS_TEST_publish (struct GNUNET_FS_TestDaemon *daemon,
162 * @param cont function to call when done 157 * @param cont function to call when done
163 * @param cont_cls closure for cont 158 * @param cont_cls closure for cont
164 */ 159 */
165void 160void GNUNET_FS_TEST_download (struct GNUNET_FS_TestDaemon *daemon,
166GNUNET_FS_TEST_download (struct GNUNET_FS_TestDaemon *daemon, 161 struct GNUNET_TIME_Relative timeout,
167 struct GNUNET_TIME_Relative timeout, 162 uint32_t anonymity, uint32_t seed,
168 uint32_t anonymity, 163 const struct GNUNET_FS_Uri *uri,
169 uint32_t seed, 164 unsigned int verbose, GNUNET_SCHEDULER_Task cont,
170 const struct GNUNET_FS_Uri *uri, 165 void *cont_cls);
171 unsigned int verbose,
172 GNUNET_SCHEDULER_Task cont, void *cont_cls);
173 166
174 167
175 168
diff --git a/src/fs/fs_tree.h b/src/fs/fs_tree.h
index c2b7de48c..532c9e9aa 100644
--- a/src/fs/fs_tree.h
+++ b/src/fs/fs_tree.h
@@ -66,9 +66,8 @@ uint64_t GNUNET_FS_tree_compute_tree_size (unsigned int depth);
66 * @param depth depth of the node in the tree, 0 for DBLOCK 66 * @param depth depth of the node in the tree, 0 for DBLOCK
67 * @return number of bytes stored in this node 67 * @return number of bytes stored in this node
68 */ 68 */
69size_t 69size_t GNUNET_FS_tree_calculate_block_size (uint64_t fsize, uint64_t offset,
70GNUNET_FS_tree_calculate_block_size (uint64_t fsize, 70 unsigned int depth);
71 uint64_t offset, unsigned int depth);
72 71
73 72
74/** 73/**
@@ -111,8 +110,7 @@ typedef void (*GNUNET_FS_TreeBlockProcessor) (void *cls,
111 * @param pt_size size of pt_block 110 * @param pt_size size of pt_block
112 * @param depth depth of the block in the tree, 0 for DBLOCKS 111 * @param depth depth of the block in the tree, 0 for DBLOCKS
113 */ 112 */
114typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, 113typedef void (*GNUNET_FS_TreeProgressCallback) (void *cls, uint64_t offset,
115 uint64_t offset,
116 const void *pt_block, 114 const void *pt_block,
117 size_t pt_size, 115 size_t pt_size,
118 unsigned int depth); 116 unsigned int depth);
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h
index c9485f23b..84165d8b7 100644
--- a/src/fs/gnunet-service-fs_cp.h
+++ b/src/fs/gnunet-service-fs_cp.h
@@ -140,8 +140,8 @@ typedef void (*GSF_ConnectedPeerIterator) (void *cls,
140 * @param buf where to copy the message, NULL on error (peer disconnect) 140 * @param buf where to copy the message, NULL on error (peer disconnect)
141 * @return number of bytes copied to 'buf', can be 0 (without indicating an error) 141 * @return number of bytes copied to 'buf', can be 0 (without indicating an error)
142 */ 142 */
143typedef size_t (*GSF_GetMessageCallback) (void *cls, 143typedef size_t (*GSF_GetMessageCallback) (void *cls, size_t buf_size,
144 size_t buf_size, void *buf); 144 void *buf);
145 145
146 146
147/** 147/**
@@ -225,10 +225,9 @@ void GSF_peer_transmit_cancel_ (struct GSF_PeerTransmitHandle *pth);
225 * @param request_time time at which the original query was transmitted 225 * @param request_time time at which the original query was transmitted
226 * @param request_priority priority of the original request 226 * @param request_priority priority of the original request
227 */ 227 */
228void 228void GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp,
229GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp, 229 struct GNUNET_TIME_Absolute request_time,
230 struct GNUNET_TIME_Absolute request_time, 230 uint32_t request_priority);
231 uint32_t request_priority);
232 231
233 232
234/** 233/**
@@ -238,9 +237,9 @@ GSF_peer_update_performance_ (struct GSF_ConnectedPeer *cp,
238 * @param cp responding peer (will be updated) 237 * @param cp responding peer (will be updated)
239 * @param initiator_client local client on responsible for query 238 * @param initiator_client local client on responsible for query
240 */ 239 */
241void 240void GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp,
242GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp, 241 struct GSF_LocalClient
243 struct GSF_LocalClient *initiator_client); 242 *initiator_client);
244 243
245 244
246/** 245/**
@@ -250,10 +249,9 @@ GSF_peer_update_responder_client_ (struct GSF_ConnectedPeer *cp,
250 * @param cp responding peer (will be updated) 249 * @param cp responding peer (will be updated)
251 * @param initiator_peer other peer responsible for query 250 * @param initiator_peer other peer responsible for query
252 */ 251 */
253void 252void GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
254GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp, 253 const struct GSF_ConnectedPeer
255 const struct GSF_ConnectedPeer 254 *initiator_peer);
256 *initiator_peer);
257 255
258 256
259/** 257/**
@@ -267,13 +265,13 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
267 * unless we see some further activity from it 265 * unless we see some further activity from it
268 * @param atsi status information 266 * @param atsi status information
269 */ 267 */
270void 268void GSF_peer_status_handler_ (void *cls,
271GSF_peer_status_handler_ (void *cls, 269 const struct GNUNET_PeerIdentity *peer,
272 const struct GNUNET_PeerIdentity *peer, 270 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
273 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 271 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
274 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, 272 struct GNUNET_TIME_Absolute timeout,
275 struct GNUNET_TIME_Absolute timeout, 273 const struct GNUNET_TRANSPORT_ATS_Information
276 const struct GNUNET_TRANSPORT_ATS_Information *atsi); 274 *atsi);
277 275
278 276
279/** 277/**
@@ -287,12 +285,11 @@ GSF_peer_status_handler_ (void *cls,
287 * @return GNUNET_OK to keep the connection open, 285 * @return GNUNET_OK to keep the connection open,
288 * GNUNET_SYSERR to close it (signal serious error) 286 * GNUNET_SYSERR to close it (signal serious error)
289 */ 287 */
290int 288int GSF_handle_p2p_migration_stop_ (void *cls,
291GSF_handle_p2p_migration_stop_ (void *cls, 289 const struct GNUNET_PeerIdentity *other,
292 const struct GNUNET_PeerIdentity *other, 290 const struct GNUNET_MessageHeader *message,
293 const struct GNUNET_MessageHeader *message, 291 const struct
294 const struct GNUNET_TRANSPORT_ATS_Information 292 GNUNET_TRANSPORT_ATS_Information *atsi);
295 *atsi);
296 293
297 294
298/** 295/**
@@ -331,9 +328,8 @@ struct GSF_PeerPerformanceData *GSF_get_peer_performance_data_ (struct
331 * @param cp peer to ask 328 * @param cp peer to ask
332 * @param block_time until when to block 329 * @param block_time until when to block
333 */ 330 */
334void 331void GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
335GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp, 332 struct GNUNET_TIME_Relative block_time);
336 struct GNUNET_TIME_Relative block_time);
337 333
338 334
339/** 335/**
@@ -343,9 +339,8 @@ GSF_block_peer_migration_ (struct GSF_ConnectedPeer *cp,
343 * @param cls unused 339 * @param cls unused
344 * @param peer identity of peer that connected 340 * @param peer identity of peer that connected
345 */ 341 */
346void 342void GSF_peer_disconnect_handler_ (void *cls,
347GSF_peer_disconnect_handler_ (void *cls, 343 const struct GNUNET_PeerIdentity *peer);
348 const struct GNUNET_PeerIdentity *peer);
349 344
350 345
351/** 346/**
@@ -366,9 +361,8 @@ void GSF_handle_local_client_disconnect_ (const struct GSF_LocalClient *lc);
366 * @param cp peer to reserve bandwidth from 361 * @param cp peer to reserve bandwidth from
367 * @param pref preference change 362 * @param pref preference change
368 */ 363 */
369void 364void GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp,
370GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp, 365 uint64_t pref);
371 uint64_t pref);
372 366
373 367
374/** 368/**
@@ -377,9 +371,8 @@ GSF_connected_peer_change_preference_ (struct GSF_ConnectedPeer *cp,
377 * @param cp peer to reserve bandwidth from 371 * @param cp peer to reserve bandwidth from
378 * @param id identity to set (written to) 372 * @param id identity to set (written to)
379 */ 373 */
380void 374void GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp,
381GSF_connected_peer_get_identity_ (const struct GSF_ConnectedPeer *cp, 375 struct GNUNET_PeerIdentity *id);
382 struct GNUNET_PeerIdentity *id);
383 376
384 377
385/** 378/**
diff --git a/src/fs/gnunet-service-fs_indexing.h b/src/fs/gnunet-service-fs_indexing.h
index c6ef53351..a5c8f6593 100644
--- a/src/fs/gnunet-service-fs_indexing.h
+++ b/src/fs/gnunet-service-fs_indexing.h
@@ -54,17 +54,14 @@
54 * @param cont_cls closure for cont 54 * @param cont_cls closure for cont
55 * @return GNUNET_OK on success 55 * @return GNUNET_OK on success
56 */ 56 */
57int 57int GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
58GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key, 58 uint32_t size, const void *data,
59 uint32_t size, 59 enum GNUNET_BLOCK_Type type,
60 const void *data, 60 uint32_t priority, uint32_t anonymity,
61 enum GNUNET_BLOCK_Type type, 61 struct GNUNET_TIME_Absolute expiration,
62 uint32_t priority, 62 uint64_t uid,
63 uint32_t anonymity, 63 GNUNET_DATASTORE_DatumProcessor cont,
64 struct GNUNET_TIME_Absolute 64 void *cont_cls);
65 expiration, uint64_t uid,
66 GNUNET_DATASTORE_DatumProcessor cont,
67 void *cont_cls);
68 65
69/** 66/**
70 * Handle INDEX_START-message. 67 * Handle INDEX_START-message.
@@ -73,10 +70,9 @@ GNUNET_FS_handle_on_demand_block (const GNUNET_HashCode * key,
73 * @param client identification of the client 70 * @param client identification of the client
74 * @param message the actual message 71 * @param message the actual message
75 */ 72 */
76void 73void GNUNET_FS_handle_index_start (void *cls,
77GNUNET_FS_handle_index_start (void *cls, 74 struct GNUNET_SERVER_Client *client,
78 struct GNUNET_SERVER_Client *client, 75 const struct GNUNET_MessageHeader *message);
79 const struct GNUNET_MessageHeader *message);
80 76
81 77
82/** 78/**
@@ -86,10 +82,10 @@ GNUNET_FS_handle_index_start (void *cls,
86 * @param client identification of the client 82 * @param client identification of the client
87 * @param message the actual message 83 * @param message the actual message
88 */ 84 */
89void 85void GNUNET_FS_handle_index_list_get (void *cls,
90GNUNET_FS_handle_index_list_get (void *cls, 86 struct GNUNET_SERVER_Client *client,
91 struct GNUNET_SERVER_Client *client, 87 const struct GNUNET_MessageHeader
92 const struct GNUNET_MessageHeader *message); 88 *message);
93 89
94 90
95/** 91/**
@@ -99,10 +95,8 @@ GNUNET_FS_handle_index_list_get (void *cls,
99 * @param client identification of the client 95 * @param client identification of the client
100 * @param message the actual message 96 * @param message the actual message
101 */ 97 */
102void 98void GNUNET_FS_handle_unindex (void *cls, struct GNUNET_SERVER_Client *client,
103GNUNET_FS_handle_unindex (void *cls, 99 const struct GNUNET_MessageHeader *message);
104 struct GNUNET_SERVER_Client *client,
105 const struct GNUNET_MessageHeader *message);
106 100
107 101
108/** 102/**
@@ -112,9 +106,8 @@ GNUNET_FS_handle_unindex (void *cls,
112 * @param d datastore to use 106 * @param d datastore to use
113 * @return GNUNET_OK on success 107 * @return GNUNET_OK on success
114 */ 108 */
115int 109int GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c,
116GNUNET_FS_indexing_init (const struct GNUNET_CONFIGURATION_Handle *c, 110 struct GNUNET_DATASTORE_Handle *d);
117 struct GNUNET_DATASTORE_Handle *d);
118 111
119 112
120/** 113/**
diff --git a/src/fs/gnunet-service-fs_lc.h b/src/fs/gnunet-service-fs_lc.h
index c9d8ce191..6b79690f1 100644
--- a/src/fs/gnunet-service-fs_lc.h
+++ b/src/fs/gnunet-service-fs_lc.h
@@ -66,9 +66,8 @@ struct GSF_PendingRequest *GSF_local_client_start_search_handler_ (struct
66 * @param lc recipient 66 * @param lc recipient
67 * @param msg message to transmit to client 67 * @param msg message to transmit to client
68 */ 68 */
69void 69void GSF_local_client_transmit_ (struct GSF_LocalClient *lc,
70GSF_local_client_transmit_ (struct GSF_LocalClient *lc, 70 const struct GNUNET_MessageHeader *msg);
71 const struct GNUNET_MessageHeader *msg);
72 71
73 72
74/** 73/**
@@ -77,8 +76,8 @@ GSF_local_client_transmit_ (struct GSF_LocalClient *lc,
77 * @param cls unused 76 * @param cls unused
78 * @param client handle of the client 77 * @param client handle of the client
79 */ 78 */
80void 79void GSF_client_disconnect_handler_ (void *cls,
81GSF_client_disconnect_handler_ (void *cls, struct GNUNET_SERVER_Client *client); 80 struct GNUNET_SERVER_Client *client);
82 81
83 82
84#endif 83#endif
diff --git a/src/fs/gnunet-service-fs_pe.h b/src/fs/gnunet-service-fs_pe.h
index 7fbf9fc4a..cfaeabe22 100644
--- a/src/fs/gnunet-service-fs_pe.h
+++ b/src/fs/gnunet-service-fs_pe.h
@@ -35,8 +35,8 @@
35 * @param cp peer with the entry 35 * @param cp peer with the entry
36 * @param pr request with the entry 36 * @param pr request with the entry
37 */ 37 */
38void 38void GSF_plan_add_ (struct GSF_ConnectedPeer *cp,
39GSF_plan_add_ (struct GSF_ConnectedPeer *cp, struct GSF_PendingRequest *pr); 39 struct GSF_PendingRequest *pr);
40 40
41 41
42/** 42/**
diff --git a/src/fs/gnunet-service-fs_pr.h b/src/fs/gnunet-service-fs_pr.h
index 2f89f6e73..f2e7bcf62 100644
--- a/src/fs/gnunet-service-fs_pr.h
+++ b/src/fs/gnunet-service-fs_pr.h
@@ -238,10 +238,9 @@ struct GSF_PendingRequest *GSF_pending_request_create_ (enum
238 * @param replies_seen hash codes of replies that we've seen 238 * @param replies_seen hash codes of replies that we've seen
239 * @param replies_seen_count size of the replies_seen array 239 * @param replies_seen_count size of the replies_seen array
240 */ 240 */
241void 241void GSF_pending_request_update_ (struct GSF_PendingRequest *pr,
242GSF_pending_request_update_ (struct GSF_PendingRequest *pr, 242 const GNUNET_HashCode * replies_seen,
243 const GNUNET_HashCode * replies_seen, 243 unsigned int replies_seen_count);
244 unsigned int replies_seen_count);
245 244
246 245
247/** 246/**
@@ -264,9 +263,8 @@ struct GSF_PendingRequestData *GSF_pending_request_get_data_ (struct
264 * @param pra another pending request 263 * @param pra another pending request
265 * @return GNUNET_OK if the requests are compatible 264 * @return GNUNET_OK if the requests are compatible
266 */ 265 */
267int 266int GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
268GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra, 267 struct GSF_PendingRequest *prb);
269 struct GSF_PendingRequest *prb);
270 268
271 269
272/** 270/**
@@ -278,15 +276,9 @@ GSF_pending_request_is_compatible_ (struct GSF_PendingRequest *pra,
278 * @param buf where to copy the message (can be NULL) 276 * @param buf where to copy the message (can be NULL)
279 * @return number of bytes needed (if buf_size too small) or used 277 * @return number of bytes needed (if buf_size too small) or used
280 */ 278 */
281size_t 279size_t GSF_pending_request_get_message_ (struct GSF_PendingRequest
282 280 *pr, size_t buf_size,
283 281 void *buf);
284
285
286
287
288GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
289 size_t buf_size, void *buf);
290 282
291 283
292/** 284/**
@@ -295,8 +287,8 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr,
295 * @param pr request to cancel 287 * @param pr request to cancel
296 * @param full_cleanup fully purge the request 288 * @param full_cleanup fully purge the request
297 */ 289 */
298void 290void GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr,
299GSF_pending_request_cancel_ (struct GSF_PendingRequest *pr, int full_cleanup); 291 int full_cleanup);
300 292
301 293
302/** 294/**
@@ -335,9 +327,8 @@ void GSF_iterate_pending_requests_ (GSF_PendingRequestIterator it, void *cls);
335 * GNUNET_SYSERR if the message was malformed (close connection, 327 * GNUNET_SYSERR if the message was malformed (close connection,
336 * do not cache under any circumstances) 328 * do not cache under any circumstances)
337 */ 329 */
338int 330int GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp,
339GSF_handle_p2p_content_ (struct GSF_ConnectedPeer *cp, 331 const struct GNUNET_MessageHeader *message);
340 const struct GNUNET_MessageHeader *message);
341 332
342 333
343/** 334/**
@@ -369,9 +360,8 @@ typedef void (*GSF_LocalLookupContinuation) (void *cls,
369 * @param cont function to call at the end 360 * @param cont function to call at the end
370 * @param cont_cls closure for cont 361 * @param cont_cls closure for cont
371 */ 362 */
372void 363void GSF_local_lookup_ (struct GSF_PendingRequest *pr,
373GSF_local_lookup_ (struct GSF_PendingRequest *pr, 364 GSF_LocalLookupContinuation cont, void *cont_cls);
374 GSF_LocalLookupContinuation cont, void *cont_cls);
375 365
376 366
377/** 367/**
diff --git a/src/hostlist/hostlist-client.h b/src/hostlist/hostlist-client.h
index 80ead64bb..c6561c820 100644
--- a/src/hostlist/hostlist-client.h
+++ b/src/hostlist/hostlist-client.h
@@ -89,12 +89,11 @@
89 * @param learn set if client is learning new hostlists 89 * @param learn set if client is learning new hostlists
90 * @return GNUNET_OK on success 90 * @return GNUNET_OK on success
91 */ 91 */
92int 92int GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
93GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c, 93 struct GNUNET_STATISTICS_Handle *st,
94 struct GNUNET_STATISTICS_Handle *st, 94 GNUNET_CORE_ConnectEventHandler *ch,
95 GNUNET_CORE_ConnectEventHandler *ch, 95 GNUNET_CORE_DisconnectEventHandler *dh,
96 GNUNET_CORE_DisconnectEventHandler *dh, 96 GNUNET_CORE_MessageCallback *msgh, int learn);
97 GNUNET_CORE_MessageCallback *msgh, int learn);
98 97
99 98
100/** 99/**
diff --git a/src/hostlist/hostlist-server.h b/src/hostlist/hostlist-server.h
index 7b7e37a4d..b5960b39c 100644
--- a/src/hostlist/hostlist-server.h
+++ b/src/hostlist/hostlist-server.h
@@ -38,13 +38,12 @@
38 * 38 *
39 * @return GNUNET_OK on success 39 * @return GNUNET_OK on success
40 */ 40 */
41int 41int GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c,
42GNUNET_HOSTLIST_server_start (const struct GNUNET_CONFIGURATION_Handle *c, 42 struct GNUNET_STATISTICS_Handle *st,
43 struct GNUNET_STATISTICS_Handle *st, 43 struct GNUNET_CORE_Handle *core,
44 struct GNUNET_CORE_Handle *core, 44 GNUNET_CORE_ConnectEventHandler *server_ch,
45 GNUNET_CORE_ConnectEventHandler *server_ch, 45 GNUNET_CORE_DisconnectEventHandler *server_dh,
46 GNUNET_CORE_DisconnectEventHandler *server_dh, 46 int advertise);
47 int advertise);
48 47
49 48
50/** 49/**
diff --git a/src/include/gnunet_arm_service.h b/src/include/gnunet_arm_service.h
index e0a0b83ad..76529ede4 100644
--- a/src/include/gnunet_arm_service.h
+++ b/src/include/gnunet_arm_service.h
@@ -104,11 +104,10 @@ void GNUNET_ARM_disconnect (struct GNUNET_ARM_Handle *h);
104 * @param cb callback to invoke when service is ready 104 * @param cb callback to invoke when service is ready
105 * @param cb_cls closure for callback 105 * @param cb_cls closure for callback
106 */ 106 */
107void 107void GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h,
108GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h, 108 const char *service_name,
109 const char *service_name, 109 struct GNUNET_TIME_Relative timeout,
110 struct GNUNET_TIME_Relative timeout, 110 GNUNET_ARM_Callback cb, void *cb_cls);
111 GNUNET_ARM_Callback cb, void *cb_cls);
112 111
113 112
114/** 113/**
@@ -122,11 +121,10 @@ GNUNET_ARM_start_service (struct GNUNET_ARM_Handle *h,
122 * @param cb callback to invoke when service is ready 121 * @param cb callback to invoke when service is ready
123 * @param cb_cls closure for callback 122 * @param cb_cls closure for callback
124 */ 123 */
125void 124void GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h,
126GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h, 125 const char *service_name,
127 const char *service_name, 126 struct GNUNET_TIME_Relative timeout,
128 struct GNUNET_TIME_Relative timeout, 127 GNUNET_ARM_Callback cb, void *cb_cls);
129 GNUNET_ARM_Callback cb, void *cb_cls);
130 128
131 129
132 130
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index a6149ee5a..dd648dd75 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -156,8 +156,8 @@ struct GNUNET_ATS_SuggestionContext *GNUNET_ATS_suggest_address (struct
156 * 156 *
157 * @param asc handle of the request to cancel 157 * @param asc handle of the request to cancel
158 */ 158 */
159void 159void GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext
160GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext *asc); 160 *asc);
161 161
162 162
163/** 163/**
@@ -174,15 +174,12 @@ GNUNET_ATS_suggest_address_cancel (struct GNUNET_ATS_SuggestionContext *asc);
174 * @param ats performance data for the connection 174 * @param ats performance data for the connection
175 * @param ats_count number of performance records in 'ats' 175 * @param ats_count number of performance records in 'ats'
176 */ 176 */
177void 177void GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
178GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc, 178 const struct GNUNET_PeerIdentity *peer,
179 const struct GNUNET_PeerIdentity *peer, 179 const char *plugin_name, struct Session *session,
180 const char *plugin_name, 180 const void *plugin_addr, size_t plugin_addr_len,
181 struct Session *session, 181 const struct GNUNET_TRANSPORT_ATS_Information
182 const void *plugin_addr, 182 *ats, uint32_t ats_count);
183 size_t plugin_addr_len,
184 const struct GNUNET_TRANSPORT_ATS_Information *ats,
185 uint32_t ats_count);
186 183
187 184
188/** 185/**
@@ -193,9 +190,8 @@ GNUNET_ATS_peer_connect (struct GNUNET_ATS_Handle *atc,
193 * @param atc handle 190 * @param atc handle
194 * @param peer identity of the peer 191 * @param peer identity of the peer
195 */ 192 */
196void 193void GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc,
197GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc, 194 const struct GNUNET_PeerIdentity *peer);
198 const struct GNUNET_PeerIdentity *peer);
199 195
200 196
201/** 197/**
@@ -205,10 +201,9 @@ GNUNET_ATS_peer_disconnect (struct GNUNET_ATS_Handle *atc,
205 * @param peer identity of the peer 201 * @param peer identity of the peer
206 * @param session session handle that is no longer valid 202 * @param session session handle that is no longer valid
207 */ 203 */
208void 204void GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc,
209GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc, 205 const struct GNUNET_PeerIdentity *peer,
210 const struct GNUNET_PeerIdentity *peer, 206 const struct Session *session);
211 const struct Session *session);
212 207
213 208
214/** 209/**
@@ -229,16 +224,14 @@ GNUNET_ATS_session_destroyed (struct GNUNET_ATS_Handle *atc,
229 * @param ats performance data for the address 224 * @param ats performance data for the address
230 * @param ats_count number of performance records in 'ats' 225 * @param ats_count number of performance records in 'ats'
231 */ 226 */
232void 227void GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc,
233GNUNET_ATS_address_update (struct GNUNET_ATS_Handle *atc, 228 const struct GNUNET_PeerIdentity *peer,
234 const struct GNUNET_PeerIdentity *peer, 229 struct GNUNET_TIME_Absolute valid_until,
235 struct GNUNET_TIME_Absolute valid_until, 230 const char *plugin_name,
236 const char *plugin_name, 231 struct Session *session,
237 struct Session *session, 232 const void *plugin_addr, size_t plugin_addr_len,
238 const void *plugin_addr, 233 const struct GNUNET_TRANSPORT_ATS_Information
239 size_t plugin_addr_len, 234 *ats, uint32_t ats_count);
240 const struct GNUNET_TRANSPORT_ATS_Information *ats,
241 uint32_t ats_count);
242 235
243 236
244#endif 237#endif
diff --git a/src/include/gnunet_bandwidth_lib.h b/src/include/gnunet_bandwidth_lib.h
index 059a6696c..e78d16552 100644
--- a/src/include/gnunet_bandwidth_lib.h
+++ b/src/include/gnunet_bandwidth_lib.h
@@ -89,8 +89,8 @@ struct GNUNET_BANDWIDTH_Tracker
89 * @param bytes_per_second value to create 89 * @param bytes_per_second value to create
90 * @return the new bandwidth value 90 * @return the new bandwidth value
91 */ 91 */
92struct GNUNET_BANDWIDTH_Value32NBO 92struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_init (uint32_t
93GNUNET_BANDWIDTH_value_init (uint32_t bytes_per_second); 93 bytes_per_second);
94 94
95 95
96/** 96/**
@@ -107,20 +107,12 @@ GNUNET_BANDWIDTH_value_init (uint32_t bytes_per_second);
107 * @param deadline when is the deadline 107 * @param deadline when is the deadline
108 * @return number of bytes available at bps until deadline 108 * @return number of bytes available at bps until deadline
109 */ 109 */
110uint64_t 110uint64_t GNUNET_BANDWIDTH_value_get_available_until (struct
111 111 GNUNET_BANDWIDTH_Value32NBO
112 112 bps,
113 113 struct
114 114 GNUNET_TIME_Relative
115 115 deadline);
116
117
118
119
120 GNUNET_BANDWIDTH_value_get_available_until (struct GNUNET_BANDWIDTH_Value32NBO
121 bps,
122 struct GNUNET_TIME_Relative
123 deadline);
124 116
125 117
126/** 118/**
@@ -131,9 +123,11 @@ uint64_t
131 * @param size number of bytes we want to have available 123 * @param size number of bytes we want to have available
132 * @return how long it would take 124 * @return how long it would take
133 */ 125 */
134struct GNUNET_TIME_Relative 126struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_value_get_delay_for (struct
135GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps, 127 GNUNET_BANDWIDTH_Value32NBO
136 uint64_t size); 128 bps,
129 uint64_t
130 size);
137 131
138 132
139 133
@@ -144,9 +138,12 @@ GNUNET_BANDWIDTH_value_get_delay_for (struct GNUNET_BANDWIDTH_Value32NBO bps,
144 * @param b2 second value 138 * @param b2 second value
145 * @return the min of b1 and b2 139 * @return the min of b1 and b2
146 */ 140 */
147struct GNUNET_BANDWIDTH_Value32NBO 141struct GNUNET_BANDWIDTH_Value32NBO GNUNET_BANDWIDTH_value_min (struct
148GNUNET_BANDWIDTH_value_min (struct GNUNET_BANDWIDTH_Value32NBO b1, 142 GNUNET_BANDWIDTH_Value32NBO
149 struct GNUNET_BANDWIDTH_Value32NBO b2); 143 b1,
144 struct
145 GNUNET_BANDWIDTH_Value32NBO
146 b2);
150 147
151 148
152/** 149/**
@@ -163,10 +160,10 @@ GNUNET_BANDWIDTH_value_min (struct GNUNET_BANDWIDTH_Value32NBO b1,
163 * @param max_carry_s maximum number of seconds unused bandwidth 160 * @param max_carry_s maximum number of seconds unused bandwidth
164 * may accumulate before it expires 161 * may accumulate before it expires
165 */ 162 */
166void 163void GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
167GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av, 164 struct GNUNET_BANDWIDTH_Value32NBO
168 struct GNUNET_BANDWIDTH_Value32NBO 165 bytes_per_second_limit,
169 bytes_per_second_limit, uint32_t max_carry_s); 166 uint32_t max_carry_s);
170 167
171 168
172/** 169/**
@@ -180,9 +177,8 @@ GNUNET_BANDWIDTH_tracker_init (struct GNUNET_BANDWIDTH_Tracker *av,
180 * @param size number of bytes consumed 177 * @param size number of bytes consumed
181 * @return GNUNET_YES if this consumption is above the limit 178 * @return GNUNET_YES if this consumption is above the limit
182 */ 179 */
183int 180int GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av,
184GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av, 181 ssize_t size);
185 ssize_t size);
186 182
187 183
188/** 184/**
@@ -194,9 +190,10 @@ GNUNET_BANDWIDTH_tracker_consume (struct GNUNET_BANDWIDTH_Tracker *av,
194 * @param size number of bytes we would like to consume 190 * @param size number of bytes we would like to consume
195 * @return time to wait for consumption to be OK 191 * @return time to wait for consumption to be OK
196 */ 192 */
197struct GNUNET_TIME_Relative 193struct GNUNET_TIME_Relative GNUNET_BANDWIDTH_tracker_get_delay (struct
198GNUNET_BANDWIDTH_tracker_get_delay (struct GNUNET_BANDWIDTH_Tracker *av, 194 GNUNET_BANDWIDTH_Tracker
199 size_t size); 195 *av,
196 size_t size);
200 197
201 198
202/** 199/**
@@ -206,15 +203,9 @@ GNUNET_BANDWIDTH_tracker_get_delay (struct GNUNET_BANDWIDTH_Tracker *av,
206 * @param av tracker to query 203 * @param av tracker to query
207 * @return number of bytes available for consumption right now 204 * @return number of bytes available for consumption right now
208 */ 205 */
209int64_t 206int64_t GNUNET_BANDWIDTH_tracker_get_available (struct
210 207 GNUNET_BANDWIDTH_Tracker
211 208 *av);
212
213
214
215
216
217 GNUNET_BANDWIDTH_tracker_get_available (struct GNUNET_BANDWIDTH_Tracker *av);
218 209
219 210
220/** 211/**
@@ -223,10 +214,9 @@ int64_t
223 * @param av tracker to initialize 214 * @param av tracker to initialize
224 * @param bytes_per_second_limit new limit to assume 215 * @param bytes_per_second_limit new limit to assume
225 */ 216 */
226void 217void GNUNET_BANDWIDTH_tracker_update_quota (struct GNUNET_BANDWIDTH_Tracker *av,
227GNUNET_BANDWIDTH_tracker_update_quota (struct GNUNET_BANDWIDTH_Tracker *av, 218 struct GNUNET_BANDWIDTH_Value32NBO
228 struct GNUNET_BANDWIDTH_Value32NBO 219 bytes_per_second_limit);
229 bytes_per_second_limit);
230 220
231 221
232#if 0 /* keep Emacsens' auto-indent happy */ 222#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_bio_lib.h b/src/include/gnunet_bio_lib.h
index f0b486fd2..74512ec40 100644
--- a/src/include/gnunet_bio_lib.h
+++ b/src/include/gnunet_bio_lib.h
@@ -72,8 +72,8 @@ int GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg);
72 * @param len the number of bytes to read 72 * @param len the number of bytes to read
73 * @return GNUNET_OK on success, GNUNET_SYSERR on failure 73 * @return GNUNET_OK on success, GNUNET_SYSERR on failure
74 */ 74 */
75int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, 75int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h, const char *what,
76 const char *what, void *result, size_t len); 76 void *result, size_t len);
77 77
78 78
79/** 79/**
@@ -86,8 +86,8 @@ int GNUNET_BIO_read (struct GNUNET_BIO_ReadHandle *h,
86 * @param len the number of bytes to read 86 * @param len the number of bytes to read
87 * @return GNUNET_OK on success, GNUNET_SYSERR on failure 87 * @return GNUNET_OK on success, GNUNET_SYSERR on failure
88 */ 88 */
89int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, 89int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h, const char *file,
90 const char *file, int line, void *result, size_t len); 90 int line, void *result, size_t len);
91 91
92/** 92/**
93 * Read 0-terminated string from a file. 93 * Read 0-terminated string from a file.
@@ -99,8 +99,8 @@ int GNUNET_BIO_read_fn (struct GNUNET_BIO_ReadHandle *h,
99 * @param maxLen maximum allowed length for the string 99 * @param maxLen maximum allowed length for the string
100 * @return GNUNET_OK on success, GNUNET_SYSERR on failure 100 * @return GNUNET_OK on success, GNUNET_SYSERR on failure
101 */ 101 */
102int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, 102int GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h, const char *what,
103 const char *what, char **result, size_t maxLen); 103 char **result, size_t maxLen);
104 104
105 105
106/** 106/**
@@ -144,8 +144,8 @@ int GNUNET_BIO_read_meta_data (struct GNUNET_BIO_ReadHandle *h,
144 * @param i address of 32-bit integer to read 144 * @param i address of 32-bit integer to read
145 * @return GNUNET_OK on success, GNUNET_SYSERR on error 145 * @return GNUNET_OK on success, GNUNET_SYSERR on error
146 */ 146 */
147int GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, 147int GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
148 const char *file, int line, int32_t * i); 148 int line, int32_t * i);
149 149
150 150
151/** 151/**
@@ -166,8 +166,8 @@ int GNUNET_BIO_read_int32__ (struct GNUNET_BIO_ReadHandle *h,
166 * @param i address of 64-bit integer to read 166 * @param i address of 64-bit integer to read
167 * @return GNUNET_OK on success, GNUNET_SYSERR on error 167 * @return GNUNET_OK on success, GNUNET_SYSERR on error
168 */ 168 */
169int GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, 169int GNUNET_BIO_read_int64__ (struct GNUNET_BIO_ReadHandle *h, const char *file,
170 const char *file, int line, int64_t * i); 170 int line, int64_t * i);
171 171
172 172
173/** 173/**
@@ -210,8 +210,8 @@ int GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h);
210 * @param n number of bytes to write 210 * @param n number of bytes to write
211 * @return GNUNET_OK on success, GNUNET_SYSERR on error 211 * @return GNUNET_OK on success, GNUNET_SYSERR on error
212 */ 212 */
213int GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, 213int GNUNET_BIO_write (struct GNUNET_BIO_WriteHandle *h, const void *buffer,
214 const void *buffer, size_t n); 214 size_t n);
215 215
216 216
217/** 217/**
diff --git a/src/include/gnunet_block_lib.h b/src/include/gnunet_block_lib.h
index ae6884869..51b8254d0 100644
--- a/src/include/gnunet_block_lib.h
+++ b/src/include/gnunet_block_lib.h
@@ -161,9 +161,8 @@ struct GNUNET_BLOCK_Context;
161 * @param mingle_number number for hash permutation 161 * @param mingle_number number for hash permutation
162 * @param hc where to store the result. 162 * @param hc where to store the result.
163 */ 163 */
164void 164void GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in,
165GNUNET_BLOCK_mingle_hash (const GNUNET_HashCode * in, 165 uint32_t mingle_number, GNUNET_HashCode * hc);
166 uint32_t mingle_number, GNUNET_HashCode * hc);
167 166
168 167
169/** 168/**
@@ -203,15 +202,23 @@ void GNUNET_BLOCK_context_destroy (struct GNUNET_BLOCK_Context *ctx);
203 * @param reply_block_size number of bytes in reply block 202 * @param reply_block_size number of bytes in reply block
204 * @return characterization of result 203 * @return characterization of result
205 */ 204 */
206enum GNUNET_BLOCK_EvaluationResult 205enum GNUNET_BLOCK_EvaluationResult GNUNET_BLOCK_evaluate (struct
207GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx, 206 GNUNET_BLOCK_Context
208 enum GNUNET_BLOCK_Type type, 207 *ctx,
209 const GNUNET_HashCode * query, 208 enum GNUNET_BLOCK_Type
210 struct GNUNET_CONTAINER_BloomFilter **bf, 209 type,
211 int32_t bf_mutator, 210 const GNUNET_HashCode
212 const void *xquery, 211 * query,
213 size_t xquery_size, 212 struct
214 const void *reply_block, size_t reply_block_size); 213 GNUNET_CONTAINER_BloomFilter
214 **bf,
215 int32_t bf_mutator,
216 const void *xquery,
217 size_t xquery_size,
218 const void
219 *reply_block,
220 size_t
221 reply_block_size);
215 222
216 223
217/** 224/**
@@ -227,11 +234,9 @@ GNUNET_BLOCK_evaluate (struct GNUNET_BLOCK_Context *ctx,
227 * GNUNET_SYSERR if type not supported 234 * GNUNET_SYSERR if type not supported
228 * (or if extracting a key from a block of this type does not work) 235 * (or if extracting a key from a block of this type does not work)
229 */ 236 */
230int 237int GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx,
231GNUNET_BLOCK_get_key (struct GNUNET_BLOCK_Context *ctx, 238 enum GNUNET_BLOCK_Type type, const void *block,
232 enum GNUNET_BLOCK_Type type, 239 size_t block_size, GNUNET_HashCode * key);
233 const void *block,
234 size_t block_size, GNUNET_HashCode * key);
235 240
236 241
237#if 0 /* keep Emacsens' auto-indent happy */ 242#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_block_plugin.h b/src/include/gnunet_block_plugin.h
index 885842157..6d1f2f103 100644
--- a/src/include/gnunet_block_plugin.h
+++ b/src/include/gnunet_block_plugin.h
@@ -50,15 +50,27 @@
50 * @param reply_block_size number of bytes in reply block 50 * @param reply_block_size number of bytes in reply block
51 * @return characterization of result 51 * @return characterization of result
52 */ 52 */
53typedef enum GNUNET_BLOCK_EvaluationResult 53typedef enum
54 (*GNUNET_BLOCK_EvaluationFunction) (void *cls, 54 GNUNET_BLOCK_EvaluationResult (*GNUNET_BLOCK_EvaluationFunction) (void *cls,
55 enum GNUNET_BLOCK_Type type, 55 enum
56 const GNUNET_HashCode * query, 56 GNUNET_BLOCK_Type
57 struct GNUNET_CONTAINER_BloomFilter ** 57 type,
58 bf, int32_t bf_mutator, 58 const
59 const void *xquery, size_t xquery_size, 59 GNUNET_HashCode
60 const void *reply_block, 60 * query,
61 size_t reply_block_size); 61 struct
62 GNUNET_CONTAINER_BloomFilter
63 ** bf,
64 int32_t
65 bf_mutator,
66 const void
67 *xquery,
68 size_t
69 xquery_size,
70 const void
71 *reply_block,
72 size_t
73 reply_block_size);
62 74
63 75
64/** 76/**
@@ -74,11 +86,11 @@ typedef enum GNUNET_BLOCK_EvaluationResult
74 * GNUNET_SYSERR if type not supported 86 * GNUNET_SYSERR if type not supported
75 * (or if extracting a key from a block of this type does not work) 87 * (or if extracting a key from a block of this type does not work)
76 */ 88 */
77typedef int 89typedef int (*GNUNET_BLOCK_GetKeyFunction) (void *cls,
78 (*GNUNET_BLOCK_GetKeyFunction) (void *cls, 90 enum GNUNET_BLOCK_Type type,
79 enum GNUNET_BLOCK_Type type, 91 const void *block,
80 const void *block, 92 size_t block_size,
81 size_t block_size, GNUNET_HashCode * key); 93 GNUNET_HashCode * key);
82 94
83 95
84 96
diff --git a/src/include/gnunet_chat_service.h b/src/include/gnunet_chat_service.h
index 723c280e6..d9c3ec76f 100644
--- a/src/include/gnunet_chat_service.h
+++ b/src/include/gnunet_chat_service.h
@@ -213,12 +213,12 @@ struct GNUNET_CHAT_Room *GNUNET_CHAT_join_room (const struct
213 * @param receiver use NULL to send to everyone in the room 213 * @param receiver use NULL to send to everyone in the room
214 * @param sequence_number where to write the sequence id of the message 214 * @param sequence_number where to write the sequence id of the message
215 */ 215 */
216void 216void GNUNET_CHAT_send_message (struct GNUNET_CHAT_Room *room,
217GNUNET_CHAT_send_message (struct GNUNET_CHAT_Room *room, 217 const char *message,
218 const char *message, 218 enum GNUNET_CHAT_MsgOptions options,
219 enum GNUNET_CHAT_MsgOptions options, 219 const struct
220 const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded 220 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
221 *receiver, uint32_t * sequence_number); 221 *receiver, uint32_t * sequence_number);
222 222
223 223
224/** 224/**
@@ -234,8 +234,8 @@ void GNUNET_CHAT_leave_room (struct GNUNET_CHAT_Room *chat_room);
234 * 234 *
235 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration 235 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
236 */ 236 */
237typedef int (*GNUNET_CHAT_RoomIterator) (const char *room, 237typedef int (*GNUNET_CHAT_RoomIterator) (const char *room, const char *topic,
238 const char *topic, void *cls); 238 void *cls);
239 239
240/** 240/**
241 * List all of the (publically visible) chat rooms. 241 * List all of the (publically visible) chat rooms.
diff --git a/src/include/gnunet_client_lib.h b/src/include/gnunet_client_lib.h
index 343960426..3fad01222 100644
--- a/src/include/gnunet_client_lib.h
+++ b/src/include/gnunet_client_lib.h
@@ -66,9 +66,8 @@ struct GNUNET_CLIENT_Connection *GNUNET_CLIENT_connect (const char
66 * @param h client handle 66 * @param h client handle
67 * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default 67 * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
68 */ 68 */
69void 69void GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h,
70GNUNET_CLIENT_ignore_shutdown (struct GNUNET_CLIENT_Connection *h, 70 int do_ignore);
71 int do_ignore);
72 71
73 72
74 73
@@ -98,8 +97,8 @@ void GNUNET_CLIENT_disconnect (struct GNUNET_CLIENT_Connection *sock,
98 * @param msg message received, NULL on timeout or fatal error 97 * @param msg message received, NULL on timeout or fatal error
99 */ 98 */
100typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls, 99typedef void (*GNUNET_CLIENT_MessageHandler) (void *cls,
101 const struct 100 const struct GNUNET_MessageHeader
102 GNUNET_MessageHeader * msg); 101 * msg);
103 102
104/** 103/**
105 * Type of a function to call when we have finished shutting 104 * Type of a function to call when we have finished shutting
@@ -153,13 +152,20 @@ struct GNUNET_CLIENT_TransmitHandle;
153 * non-NULL if the notify callback was queued (can be used to cancel 152 * non-NULL if the notify callback was queued (can be used to cancel
154 * using GNUNET_CONNECTION_notify_transmit_ready_cancel) 153 * using GNUNET_CONNECTION_notify_transmit_ready_cancel)
155 */ 154 */
156struct GNUNET_CLIENT_TransmitHandle 155struct GNUNET_CLIENT_TransmitHandle *GNUNET_CLIENT_notify_transmit_ready (struct
157 *GNUNET_CLIENT_notify_transmit_ready (struct GNUNET_CLIENT_Connection *sock, 156 GNUNET_CLIENT_Connection
158 size_t size, 157 *sock,
159 struct GNUNET_TIME_Relative timeout, 158 size_t
160 int auto_retry, 159 size,
161 GNUNET_CONNECTION_TransmitReadyNotify 160 struct
162 notify, void *notify_cls); 161 GNUNET_TIME_Relative
162 timeout,
163 int
164 auto_retry,
165 GNUNET_CONNECTION_TransmitReadyNotify
166 notify,
167 void
168 *notify_cls);
163 169
164 170
165/** 171/**
@@ -167,9 +173,9 @@ struct GNUNET_CLIENT_TransmitHandle
167 * 173 *
168 * @param th handle from the original request. 174 * @param th handle from the original request.
169 */ 175 */
170void 176void GNUNET_CLIENT_notify_transmit_ready_cancel (struct
171GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle 177 GNUNET_CLIENT_TransmitHandle
172 *th); 178 *th);
173 179
174 180
175/** 181/**
@@ -193,13 +199,14 @@ GNUNET_CLIENT_notify_transmit_ready_cancel (struct GNUNET_CLIENT_TransmitHandle
193 * @return GNUNET_OK on success, GNUNET_SYSERR if a request 199 * @return GNUNET_OK on success, GNUNET_SYSERR if a request
194 * is already pending 200 * is already pending
195 */ 201 */
196int 202int GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection
197GNUNET_CLIENT_transmit_and_get_response (struct GNUNET_CLIENT_Connection *sock, 203 *sock,
198 const struct GNUNET_MessageHeader *hdr, 204 const struct GNUNET_MessageHeader
199 struct GNUNET_TIME_Relative timeout, 205 *hdr,
200 int auto_retry, 206 struct GNUNET_TIME_Relative
201 GNUNET_CLIENT_MessageHandler rn, 207 timeout, int auto_retry,
202 void *rn_cls); 208 GNUNET_CLIENT_MessageHandler rn,
209 void *rn_cls);
203 210
204 211
205/** 212/**
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 036249e34..f884d9a24 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -157,10 +157,9 @@ enum GNUNET_ErrorType
157 * @param date when was the message logged? 157 * @param date when was the message logged?
158 * @param message what is the message 158 * @param message what is the message
159 */ 159 */
160typedef void (*GNUNET_Logger) (void *cls, 160typedef void (*GNUNET_Logger) (void *cls, enum GNUNET_ErrorType kind,
161 enum GNUNET_ErrorType kind, 161 const char *component, const char *date,
162 const char *component, 162 const char *message);
163 const char *date, const char *message);
164 163
165/** 164/**
166 * Main log function. 165 * Main log function.
@@ -182,9 +181,8 @@ void GNUNET_log (enum GNUNET_ErrorType kind, const char *message, ...);
182 * @param message what is the message (format string) 181 * @param message what is the message (format string)
183 * @param ... arguments for format string 182 * @param ... arguments for format string
184 */ 183 */
185void 184void GNUNET_log_from (enum GNUNET_ErrorType kind, const char *comp,
186GNUNET_log_from (enum GNUNET_ErrorType kind, 185 const char *message, ...);
187 const char *comp, const char *message, ...);
188 186
189 187
190/** 188/**
@@ -204,8 +202,8 @@ void GNUNET_log_skip (unsigned int n, int check_reset);
204 * @param logfile change logging to logfile (use NULL to keep stderr) 202 * @param logfile change logging to logfile (use NULL to keep stderr)
205 * @return GNUNET_OK on success, GNUNET_SYSERR if logfile could not be opened 203 * @return GNUNET_OK on success, GNUNET_SYSERR if logfile could not be opened
206 */ 204 */
207int 205int GNUNET_log_setup (const char *comp, const char *loglevel,
208GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile); 206 const char *logfile);
209 207
210 208
211/** 209/**
@@ -528,15 +526,15 @@ void *GNUNET_xmemdup_ (const void *buf, size_t size, const char *filename,
528 * @param linenumber line where this call is being made (for debugging) 526 * @param linenumber line where this call is being made (for debugging)
529 * @return pointer to size bytes of memory, NULL if we do not have enough memory 527 * @return pointer to size bytes of memory, NULL if we do not have enough memory
530 */ 528 */
531void *GNUNET_xmalloc_unchecked_ (size_t size, 529void *GNUNET_xmalloc_unchecked_ (size_t size, const char *filename,
532 const char *filename, int linenumber); 530 int linenumber);
533 531
534/** 532/**
535 * Reallocate memory. Checks the return value, aborts if no more 533 * Reallocate memory. Checks the return value, aborts if no more
536 * memory is available. 534 * memory is available.
537 */ 535 */
538void *GNUNET_xrealloc_ (void *ptr, 536void *GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename,
539 size_t n, const char *filename, int linenumber); 537 int linenumber);
540 538
541/** 539/**
542 * Free memory. Merely a wrapper for the case that we 540 * Free memory. Merely a wrapper for the case that we
@@ -585,11 +583,9 @@ char *GNUNET_xstrndup_ (const char *str, size_t len, const char *filename,
585 * @param filename where is this call being made (for debugging) 583 * @param filename where is this call being made (for debugging)
586 * @param linenumber line where this call is being made (for debugging) 584 * @param linenumber line where this call is being made (for debugging)
587 */ 585 */
588void GNUNET_xgrow_ (void **old, 586void GNUNET_xgrow_ (void **old, size_t elementSize, unsigned int *oldCount,
589 size_t elementSize, 587 unsigned int newCount, const char *filename,
590 unsigned int *oldCount, 588 int linenumber);
591 unsigned int newCount,
592 const char *filename, int linenumber);
593 589
594 590
595 591
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h
index 4ecb3539f..24705f0fb 100644
--- a/src/include/gnunet_configuration_lib.h
+++ b/src/include/gnunet_configuration_lib.h
@@ -113,11 +113,10 @@ int GNUNET_CONFIGURATION_write (struct GNUNET_CONFIGURATION_Handle *cfg,
113 * @param filename where to write the configuration diff between default and new 113 * @param filename where to write the configuration diff between default and new
114 * @return GNUNET_OK on success, GNUNET_SYSERR on error 114 * @return GNUNET_OK on success, GNUNET_SYSERR on error
115 */ 115 */
116int 116int GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle
117GNUNET_CONFIGURATION_write_diffs (const struct GNUNET_CONFIGURATION_Handle 117 *cfgDefault,
118 *cfgDefault, 118 const struct GNUNET_CONFIGURATION_Handle
119 const struct GNUNET_CONFIGURATION_Handle 119 *cfgNew, const char *filename);
120 *cfgNew, const char *filename);
121 120
122/** 121/**
123 * Test if there are configuration options that were 122 * Test if there are configuration options that were
@@ -138,8 +137,7 @@ int GNUNET_CONFIGURATION_is_dirty (const struct GNUNET_CONFIGURATION_Handle
138 * @param option name of the option 137 * @param option name of the option
139 * @param value value of the option 138 * @param value value of the option
140 */ 139 */
141typedef void (*GNUNET_CONFIGURATION_Iterator) (void *cls, 140typedef void (*GNUNET_CONFIGURATION_Iterator) (void *cls, const char *section,
142 const char *section,
143 const char *option, 141 const char *option,
144 const char *value); 142 const char *value);
145 143
@@ -277,11 +275,10 @@ int GNUNET_CONFIGURATION_get_value_filename (const struct
277 */ 275 */
278int GNUNET_CONFIGURATION_iterate_value_filenames (const struct 276int GNUNET_CONFIGURATION_iterate_value_filenames (const struct
279 GNUNET_CONFIGURATION_Handle 277 GNUNET_CONFIGURATION_Handle
280 *cfg, 278 *cfg, const char *section,
281 const char *section,
282 const char *option, 279 const char *option,
283 GNUNET_FileNameCallback 280 GNUNET_FileNameCallback cb,
284 cb, void *cb_cls); 281 void *cb_cls);
285 282
286/** 283/**
287 * Iterate over values of a section in the configuration. 284 * Iterate over values of a section in the configuration.
@@ -291,12 +288,11 @@ int GNUNET_CONFIGURATION_iterate_value_filenames (const struct
291 * @param iter function to call on each option 288 * @param iter function to call on each option
292 * @param iter_cls closure for iter 289 * @param iter_cls closure for iter
293 */ 290 */
294void 291void GNUNET_CONFIGURATION_iterate_section_values (const struct
295GNUNET_CONFIGURATION_iterate_section_values (const struct 292 GNUNET_CONFIGURATION_Handle
296 GNUNET_CONFIGURATION_Handle *cfg, 293 *cfg, const char *section,
297 const char *section, 294 GNUNET_CONFIGURATION_Iterator
298 GNUNET_CONFIGURATION_Iterator iter, 295 iter, void *iter_cls);
299 void *iter_cls);
300 296
301/** 297/**
302 * Get a configuration value that should be in a set of 298 * Get a configuration value that should be in a set of
@@ -353,12 +349,10 @@ char *GNUNET_CONFIGURATION_expand_dollar (const struct
353 * @param option option of interest 349 * @param option option of interest
354 * @param number value to set 350 * @param number value to set
355 */ 351 */
356void 352void GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle
357GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle 353 *cfg, const char *section,
358 *cfg, 354 const char *option,
359 const char *section, 355 unsigned long long number);
360 const char *option,
361 unsigned long long number);
362 356
363 357
364/** 358/**
@@ -369,11 +363,10 @@ GNUNET_CONFIGURATION_set_value_number (struct GNUNET_CONFIGURATION_Handle
369 * @param option option of interest 363 * @param option option of interest
370 * @param value value to set 364 * @param value value to set
371 */ 365 */
372void 366void GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle
373GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle 367 *cfg, const char *section,
374 *cfg, 368 const char *option,
375 const char *section, 369 const char *value);
376 const char *option, const char *value);
377 370
378/** 371/**
379 * Remove a filename from a configuration value that 372 * Remove a filename from a configuration value that
@@ -388,8 +381,7 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle
388 */ 381 */
389int GNUNET_CONFIGURATION_remove_value_filename (struct 382int GNUNET_CONFIGURATION_remove_value_filename (struct
390 GNUNET_CONFIGURATION_Handle 383 GNUNET_CONFIGURATION_Handle
391 *cfg, 384 *cfg, const char *section,
392 const char *section,
393 const char *option, 385 const char *option,
394 const char *value); 386 const char *value);
395 387
diff --git a/src/include/gnunet_connection_lib.h b/src/include/gnunet_connection_lib.h
index 00b97d903..af10c5966 100644
--- a/src/include/gnunet_connection_lib.h
+++ b/src/include/gnunet_connection_lib.h
@@ -99,8 +99,7 @@ typedef int (*GNUNET_CONNECTION_AccessCheck) (void *cls,
99 * @param addrlen size of addr 99 * @param addrlen size of addr
100 * @param errCode value of errno (on errors receiving) 100 * @param errCode value of errno (on errors receiving)
101 */ 101 */
102typedef void (*GNUNET_CONNECTION_Receiver) (void *cls, 102typedef void (*GNUNET_CONNECTION_Receiver) (void *cls, const void *buf,
103 const void *buf,
104 size_t available, 103 size_t available,
105 const struct sockaddr * addr, 104 const struct sockaddr * addr,
106 socklen_t addrlen, int errCode); 105 socklen_t addrlen, int errCode);
@@ -136,9 +135,9 @@ int GNUNET_CONNECTION_disable_corking (struct GNUNET_CONNECTION_Handle *sock);
136 * @param osSocket existing socket to box 135 * @param osSocket existing socket to box
137 * @return the boxed socket handle 136 * @return the boxed socket handle
138 */ 137 */
139struct GNUNET_CONNECTION_Handle 138struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_existing (struct
140 *GNUNET_CONNECTION_create_from_existing (struct 139 GNUNET_NETWORK_Handle
141 GNUNET_NETWORK_Handle *osSocket); 140 *osSocket);
142 141
143 142
144/** 143/**
@@ -151,8 +150,8 @@ struct GNUNET_CONNECTION_Handle
151 * @return the socket handle, NULL on error (for example, access refused) 150 * @return the socket handle, NULL on error (for example, access refused)
152 */ 151 */
153struct GNUNET_CONNECTION_Handle 152struct GNUNET_CONNECTION_Handle
154 *GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck 153 *GNUNET_CONNECTION_create_from_accept (GNUNET_CONNECTION_AccessCheck access,
155 access, void *access_cls, 154 void *access_cls,
156 struct GNUNET_NETWORK_Handle *lsock); 155 struct GNUNET_NETWORK_Handle *lsock);
157 156
158 157
@@ -166,11 +165,15 @@ struct GNUNET_CONNECTION_Handle
166 * @param port port to connect to 165 * @param port port to connect to
167 * @return the socket handle 166 * @return the socket handle
168 */ 167 */
169struct GNUNET_CONNECTION_Handle 168struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_connect (const
170 *GNUNET_CONNECTION_create_from_connect (const struct 169 struct
171 GNUNET_CONFIGURATION_Handle *cfg, 170 GNUNET_CONFIGURATION_Handle
172 const char *hostname, 171 *cfg,
173 uint16_t port); 172 const
173 char
174 *hostname,
175 uint16_t
176 port);
174 177
175 178
176/** 179/**
@@ -201,10 +204,14 @@ struct GNUNET_CONNECTION_Handle
201 * @param addrlen length of server address 204 * @param addrlen length of server address
202 * @return the socket handle 205 * @return the socket handle
203 */ 206 */
204struct GNUNET_CONNECTION_Handle 207struct GNUNET_CONNECTION_Handle *GNUNET_CONNECTION_create_from_sockaddr (int
205 *GNUNET_CONNECTION_create_from_sockaddr (int af_family, 208 af_family,
206 const struct sockaddr 209 const
207 *serv_addr, socklen_t addrlen); 210 struct
211 sockaddr
212 *serv_addr,
213 socklen_t
214 addrlen);
208 215
209/** 216/**
210 * Check if socket is valid (no fatal errors have happened so far). 217 * Check if socket is valid (no fatal errors have happened so far).
@@ -225,9 +232,8 @@ int GNUNET_CONNECTION_check (struct GNUNET_CONNECTION_Handle *sock);
225 * @param addrlen where to store the length of the address 232 * @param addrlen where to store the length of the address
226 * @return GNUNET_OK on success 233 * @return GNUNET_OK on success
227 */ 234 */
228int GNUNET_CONNECTION_get_address (struct 235int GNUNET_CONNECTION_get_address (struct GNUNET_CONNECTION_Handle *sock,
229 GNUNET_CONNECTION_Handle 236 void **addr, size_t * addrlen);
230 *sock, void **addr, size_t * addrlen);
231 237
232 238
233/** 239/**
@@ -243,9 +249,8 @@ int GNUNET_CONNECTION_get_address (struct
243 * read from the application; all other transmissions should be 249 * read from the application; all other transmissions should be
244 * aborted using 'GNUNET_CONNECTION_notify_transmit_ready_cancel'). 250 * aborted using 'GNUNET_CONNECTION_notify_transmit_ready_cancel').
245 */ 251 */
246void 252void GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
247GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock, 253 int finish_pending_write);
248 int finish_pending_write);
249 254
250 255
251/** 256/**
@@ -261,12 +266,10 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *sock,
261 * @param receiver function to call with received data 266 * @param receiver function to call with received data
262 * @param receiver_cls closure for receiver 267 * @param receiver_cls closure for receiver
263 */ 268 */
264void 269void GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle *sock,
265GNUNET_CONNECTION_receive (struct GNUNET_CONNECTION_Handle 270 size_t max, struct GNUNET_TIME_Relative timeout,
266 *sock, size_t max, 271 GNUNET_CONNECTION_Receiver receiver,
267 struct GNUNET_TIME_Relative timeout, 272 void *receiver_cls);
268 GNUNET_CONNECTION_Receiver receiver,
269 void *receiver_cls);
270 273
271 274
272/** 275/**
@@ -291,8 +294,7 @@ void *GNUNET_CONNECTION_receive_cancel (struct GNUNET_CONNECTION_Handle *sock);
291 * @param buf where the callee should write the message 294 * @param buf where the callee should write the message
292 * @return number of bytes written to buf 295 * @return number of bytes written to buf
293 */ 296 */
294typedef size_t (*GNUNET_CONNECTION_TransmitReadyNotify) (void *cls, 297typedef size_t (*GNUNET_CONNECTION_TransmitReadyNotify) (void *cls, size_t size,
295 size_t size,
296 void *buf); 298 void *buf);
297 299
298 300
@@ -332,11 +334,9 @@ struct GNUNET_CONNECTION_TransmitHandle;
332 * NULL if we are already going to notify someone else (busy) 334 * NULL if we are already going to notify someone else (busy)
333 */ 335 */
334struct GNUNET_CONNECTION_TransmitHandle 336struct GNUNET_CONNECTION_TransmitHandle
335 *GNUNET_CONNECTION_notify_transmit_ready (struct 337 *GNUNET_CONNECTION_notify_transmit_ready (struct GNUNET_CONNECTION_Handle
336 GNUNET_CONNECTION_Handle
337 *sock, size_t size, 338 *sock, size_t size,
338 struct 339 struct GNUNET_TIME_Relative
339 GNUNET_TIME_Relative
340 timeout, 340 timeout,
341 GNUNET_CONNECTION_TransmitReadyNotify 341 GNUNET_CONNECTION_TransmitReadyNotify
342 notify, void *notify_cls); 342 notify, void *notify_cls);
@@ -348,10 +348,9 @@ struct GNUNET_CONNECTION_TransmitHandle
348 * 348 *
349 * @param h handle for notification to cancel 349 * @param h handle for notification to cancel
350 */ 350 */
351void 351void GNUNET_CONNECTION_notify_transmit_ready_cancel (struct
352GNUNET_CONNECTION_notify_transmit_ready_cancel (struct 352 GNUNET_CONNECTION_TransmitHandle
353 GNUNET_CONNECTION_TransmitHandle 353 *h);
354 *h);
355 354
356 355
357/** 356/**
@@ -360,9 +359,8 @@ GNUNET_CONNECTION_notify_transmit_ready_cancel (struct
360 * @param sock socket handle 359 * @param sock socket handle
361 * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default 360 * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
362 */ 361 */
363void 362void GNUNET_CONNECTION_ignore_shutdown (struct GNUNET_CONNECTION_Handle *sock,
364GNUNET_CONNECTION_ignore_shutdown (struct GNUNET_CONNECTION_Handle *sock, 363 int do_ignore);
365 int do_ignore);
366 364
367 365
368#if 0 /* keep Emacsens' auto-indent happy */ 366#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h
index cfc7e0842..fde31ed34 100644
--- a/src/include/gnunet_container_lib.h
+++ b/src/include/gnunet_container_lib.h
@@ -115,8 +115,8 @@ struct GNUNET_CONTAINER_BloomFilter *GNUNET_CONTAINER_bloomfilter_init (const
115 * @return GNUNET_SYSERR if the data array of the wrong size 115 * @return GNUNET_SYSERR if the data array of the wrong size
116 */ 116 */
117int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct 117int GNUNET_CONTAINER_bloomfilter_get_raw_data (const struct
118 GNUNET_CONTAINER_BloomFilter 118 GNUNET_CONTAINER_BloomFilter *bf,
119 *bf, char *data, size_t size); 119 char *data, size_t size);
120 120
121 121
122/** 122/**
@@ -134,8 +134,8 @@ int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
134 * @param bf the filter 134 * @param bf the filter
135 * @param e the element 135 * @param e the element
136 */ 136 */
137void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter 137void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter *bf,
138 *bf, const GNUNET_HashCode * e); 138 const GNUNET_HashCode * e);
139 139
140 140
141/** 141/**
@@ -176,20 +176,9 @@ void GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter
176 * @param bf the filter 176 * @param bf the filter
177 * @return number of bytes used for the data of the bloom filter 177 * @return number of bytes used for the data of the bloom filter
178 */ 178 */
179size_t 179size_t GNUNET_CONTAINER_bloomfilter_get_size (const struct
180 180 GNUNET_CONTAINER_BloomFilter
181 181 *bf);
182
183
184
185
186
187
188
189
190
191GNUNET_CONTAINER_bloomfilter_get_size (const struct GNUNET_CONTAINER_BloomFilter
192 *bf);
193 182
194 183
195/** 184/**
@@ -223,10 +212,9 @@ int GNUNET_CONTAINER_bloomfilter_or (struct GNUNET_CONTAINER_BloomFilter *bf,
223 * @param to_or the bloomfilter to or-in 212 * @param to_or the bloomfilter to or-in
224 * @param size number of bytes in data 213 * @param size number of bytes in data
225 */ 214 */
226int 215int GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
227GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf, 216 const struct GNUNET_CONTAINER_BloomFilter
228 const struct GNUNET_CONTAINER_BloomFilter 217 *to_or, size_t size);
229 *to_or, size_t size);
230 218
231/** 219/**
232 * Resize a bloom filter. Note that this operation 220 * Resize a bloom filter. Note that this operation
@@ -240,10 +228,9 @@ GNUNET_CONTAINER_bloomfilter_or2 (struct GNUNET_CONTAINER_BloomFilter *bf,
240 * @param k the new number of GNUNET_CRYPTO_hash-function to apply per element 228 * @param k the new number of GNUNET_CRYPTO_hash-function to apply per element
241 */ 229 */
242void GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter 230void GNUNET_CONTAINER_bloomfilter_resize (struct GNUNET_CONTAINER_BloomFilter
243 *bf, 231 *bf, GNUNET_HashCodeIterator iterator,
244 GNUNET_HashCodeIterator iterator, 232 void *iterator_cls, size_t size,
245 void *iterator_cls, 233 unsigned int k);
246 size_t size, unsigned int k);
247 234
248/* ****************** metadata ******************* */ 235/* ****************** metadata ******************* */
249 236
@@ -287,11 +274,10 @@ void GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md);
287 * @param md2 other value to check 274 * @param md2 other value to check
288 * @return GNUNET_YES if they are equal 275 * @return GNUNET_YES if they are equal
289 */ 276 */
290int 277int GNUNET_CONTAINER_meta_data_test_equal (const struct
291GNUNET_CONTAINER_meta_data_test_equal (const struct 278 GNUNET_CONTAINER_MetaData *md1,
292 GNUNET_CONTAINER_MetaData *md1, 279 const struct
293 const struct 280 GNUNET_CONTAINER_MetaData *md2);
294 GNUNET_CONTAINER_MetaData *md2);
295 281
296 282
297/** 283/**
@@ -311,13 +297,12 @@ GNUNET_CONTAINER_meta_data_test_equal (const struct
311 * @return GNUNET_OK on success, GNUNET_SYSERR if this entry already exists 297 * @return GNUNET_OK on success, GNUNET_SYSERR if this entry already exists
312 * data_mime_type and plugin_name are not considered for "exists" checks 298 * data_mime_type and plugin_name are not considered for "exists" checks
313 */ 299 */
314int 300int GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
315GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md, 301 const char *plugin_name,
316 const char *plugin_name, 302 enum EXTRACTOR_MetaType type,
317 enum EXTRACTOR_MetaType type, 303 enum EXTRACTOR_MetaFormat format,
318 enum EXTRACTOR_MetaFormat format, 304 const char *data_mime_type,
319 const char *data_mime_type, 305 const char *data, size_t data_len);
320 const char *data, size_t data_len);
321 306
322 307
323/** 308/**
@@ -327,9 +312,9 @@ GNUNET_CONTAINER_meta_data_insert (struct GNUNET_CONTAINER_MetaData *md,
327 * @param md metadata to extend 312 * @param md metadata to extend
328 * @param in metadata to merge 313 * @param in metadata to merge
329 */ 314 */
330void 315void GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md,
331GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md, 316 const struct GNUNET_CONTAINER_MetaData
332 const struct GNUNET_CONTAINER_MetaData *in); 317 *in);
333 318
334 319
335/** 320/**
@@ -342,10 +327,9 @@ GNUNET_CONTAINER_meta_data_merge (struct GNUNET_CONTAINER_MetaData *md,
342 * @param data_len number of bytes in data 327 * @param data_len number of bytes in data
343 * @return GNUNET_OK on success, GNUNET_SYSERR if the item does not exist in md 328 * @return GNUNET_OK on success, GNUNET_SYSERR if the item does not exist in md
344 */ 329 */
345int 330int GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md,
346GNUNET_CONTAINER_meta_data_delete (struct GNUNET_CONTAINER_MetaData *md, 331 enum EXTRACTOR_MetaType type,
347 enum EXTRACTOR_MetaType type, 332 const char *data, size_t data_len);
348 const char *data, size_t data_len);
349 333
350 334
351/** 335/**
@@ -362,9 +346,9 @@ void GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md);
362 * 346 *
363 * @param md metadata to modify 347 * @param md metadata to modify
364 */ 348 */
365void 349void GNUNET_CONTAINER_meta_data_add_publication_date (struct
366GNUNET_CONTAINER_meta_data_add_publication_date (struct 350 GNUNET_CONTAINER_MetaData
367 GNUNET_CONTAINER_MetaData *md); 351 *md);
368 352
369 353
370/** 354/**
@@ -375,10 +359,9 @@ GNUNET_CONTAINER_meta_data_add_publication_date (struct
375 * @param iter_cls closure for iterator 359 * @param iter_cls closure for iterator
376 * @return number of entries 360 * @return number of entries
377 */ 361 */
378int GNUNET_CONTAINER_meta_data_iterate (const struct 362int GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData
379 GNUNET_CONTAINER_MetaData *md, 363 *md, EXTRACTOR_MetaDataProcessor iter,
380 EXTRACTOR_MetaDataProcessor 364 void *iter_cls);
381 iter, void *iter_cls);
382 365
383/** 366/**
384 * Get the first MD entry of the given type. Caller 367 * Get the first MD entry of the given type. Caller
@@ -419,10 +402,9 @@ char *GNUNET_CONTAINER_meta_data_get_first_by_types (const struct
419 * freed by the caller! 402 * freed by the caller!
420 * @return number of bytes in thumbnail, 0 if not available 403 * @return number of bytes in thumbnail, 0 if not available
421 */ 404 */
422size_t 405size_t GNUNET_CONTAINER_meta_data_get_thumbnail (const struct
423GNUNET_CONTAINER_meta_data_get_thumbnail (const struct 406 GNUNET_CONTAINER_MetaData *md,
424 GNUNET_CONTAINER_MetaData 407 unsigned char **thumb);
425 *md, unsigned char **thumb);
426 408
427 409
428 410
@@ -463,30 +445,9 @@ enum GNUNET_CONTAINER_MetaDataSerializationOptions
463 * -1 on error (typically: not enough 445 * -1 on error (typically: not enough
464 * space) 446 * space)
465 */ 447 */
466ssize_t 448ssize_t
467 449GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
468 450 *md, char **target, size_t max,
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486GNUNET_CONTAINER_meta_data_serialize (const struct
487 GNUNET_CONTAINER_MetaData *md,
488 char **target,
489 size_t max,
490 enum 451 enum
491 GNUNET_CONTAINER_MetaDataSerializationOptions 452 GNUNET_CONTAINER_MetaDataSerializationOptions
492 opt); 453 opt);
@@ -498,26 +459,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct
498 * @param md metadata to inspect 459 * @param md metadata to inspect
499 * @return number of bytes needed for serialization, -1 on error 460 * @return number of bytes needed for serialization, -1 on error
500 */ 461 */
501ssize_t 462ssize_t
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521GNUNET_CONTAINER_meta_data_get_serialized_size (const struct 463GNUNET_CONTAINER_meta_data_get_serialized_size (const struct
522 GNUNET_CONTAINER_MetaData *md); 464 GNUNET_CONTAINER_MetaData *md);
523 465
@@ -609,8 +551,8 @@ struct GNUNET_CONTAINER_MultiHashMap
609 * 551 *
610 * @param map the map 552 * @param map the map
611 */ 553 */
612void GNUNET_CONTAINER_multihashmap_destroy (struct 554void GNUNET_CONTAINER_multihashmap_destroy (struct GNUNET_CONTAINER_MultiHashMap
613 GNUNET_CONTAINER_MultiHashMap *map); 555 *map);
614 556
615 557
616/** 558/**
@@ -667,8 +609,8 @@ int GNUNET_CONTAINER_multihashmap_remove_all (struct
667 * GNUNET_NO if not 609 * GNUNET_NO if not
668 */ 610 */
669int GNUNET_CONTAINER_multihashmap_contains (const struct 611int GNUNET_CONTAINER_multihashmap_contains (const struct
670 GNUNET_CONTAINER_MultiHashMap 612 GNUNET_CONTAINER_MultiHashMap *map,
671 *map, const GNUNET_HashCode * key); 613 const GNUNET_HashCode * key);
672 614
673 615
674/** 616/**
@@ -703,8 +645,8 @@ int GNUNET_CONTAINER_multihashmap_contains_value (const struct
703int GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap 645int GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap
704 *map, const GNUNET_HashCode * key, 646 *map, const GNUNET_HashCode * key,
705 void *value, 647 void *value,
706 enum 648 enum GNUNET_CONTAINER_MultiHashMapOption
707 GNUNET_CONTAINER_MultiHashMapOption opt); 649 opt);
708 650
709/** 651/**
710 * Get the number of key-value pairs in the map. 652 * Get the number of key-value pairs in the map.
@@ -728,8 +670,8 @@ unsigned int GNUNET_CONTAINER_multihashmap_size (const struct
728 */ 670 */
729int GNUNET_CONTAINER_multihashmap_iterate (const struct 671int GNUNET_CONTAINER_multihashmap_iterate (const struct
730 GNUNET_CONTAINER_MultiHashMap *map, 672 GNUNET_CONTAINER_MultiHashMap *map,
731 GNUNET_CONTAINER_HashMapIterator 673 GNUNET_CONTAINER_HashMapIterator it,
732 it, void *it_cls); 674 void *it_cls);
733 675
734 676
735/** 677/**
@@ -951,8 +893,8 @@ void *GNUNET_CONTAINER_heap_peek (const struct GNUNET_CONTAINER_Heap *heap);
951 * @param heap the heap to get the size of 893 * @param heap the heap to get the size of
952 * @return number of elements stored 894 * @return number of elements stored
953 */ 895 */
954unsigned int 896unsigned int GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap
955GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap); 897 *heap);
956 898
957 899
958/** 900/**
@@ -961,9 +903,9 @@ GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap);
961 * @param node the node to get the cost of 903 * @param node the node to get the cost of
962 * @return cost of the node 904 * @return cost of the node
963 */ 905 */
964GNUNET_CONTAINER_HeapCostType 906GNUNET_CONTAINER_HeapCostType GNUNET_CONTAINER_heap_node_get_cost (const struct
965GNUNET_CONTAINER_heap_node_get_cost (const struct GNUNET_CONTAINER_HeapNode 907 GNUNET_CONTAINER_HeapNode
966 *node); 908 *node);
967 909
968/** 910/**
969 * Iterator for heap 911 * Iterator for heap
@@ -989,10 +931,9 @@ typedef int (*GNUNET_CONTAINER_HeapIterator) (void *cls,
989 * @param iterator function to call on each entry 931 * @param iterator function to call on each entry
990 * @param iterator_cls closure for iterator 932 * @param iterator_cls closure for iterator
991 */ 933 */
992void 934void GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap,
993GNUNET_CONTAINER_heap_iterate (const struct GNUNET_CONTAINER_Heap *heap, 935 GNUNET_CONTAINER_HeapIterator iterator,
994 GNUNET_CONTAINER_HeapIterator iterator, 936 void *iterator_cls);
995 void *iterator_cls);
996 937
997 938
998/** 939/**
@@ -1067,10 +1008,9 @@ void *GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode
1067 * @param node node for which the cost is to be changed 1008 * @param node node for which the cost is to be changed
1068 * @param new_cost new cost for the node 1009 * @param new_cost new cost for the node
1069 */ 1010 */
1070void 1011void GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_Heap *heap,
1071GNUNET_CONTAINER_heap_update_cost (struct GNUNET_CONTAINER_Heap *heap, 1012 struct GNUNET_CONTAINER_HeapNode *node,
1072 struct GNUNET_CONTAINER_HeapNode *node, 1013 GNUNET_CONTAINER_HeapCostType new_cost);
1073 GNUNET_CONTAINER_HeapCostType new_cost);
1074 1014
1075 1015
1076/* ******************** Singly linked list *************** */ 1016/* ******************** Singly linked list *************** */
@@ -1139,9 +1079,8 @@ void GNUNET_CONTAINER_slist_add_end (struct GNUNET_CONTAINER_SList *l,
1139 * @param dst list to append to 1079 * @param dst list to append to
1140 * @param src source 1080 * @param src source
1141 */ 1081 */
1142void 1082void GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst,
1143GNUNET_CONTAINER_slist_append (struct GNUNET_CONTAINER_SList *dst, 1083 struct GNUNET_CONTAINER_SList *src);
1144 struct GNUNET_CONTAINER_SList *src);
1145 1084
1146 1085
1147/** 1086/**
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h
index 1bf82030d..94272a30a 100644
--- a/src/include/gnunet_core_service.h
+++ b/src/include/gnunet_core_service.h
@@ -116,12 +116,14 @@ typedef void (*GNUNET_CORE_DisconnectEventHandler) (void *cls,
116 * @return GNUNET_OK to keep the connection open, 116 * @return GNUNET_OK to keep the connection open,
117 * GNUNET_SYSERR to close it (signal serious error) 117 * GNUNET_SYSERR to close it (signal serious error)
118 */ 118 */
119typedef int 119typedef int (*GNUNET_CORE_MessageCallback) (void *cls,
120 (*GNUNET_CORE_MessageCallback) (void *cls, 120 const struct GNUNET_PeerIdentity *
121 const struct GNUNET_PeerIdentity * other, 121 other,
122 const struct GNUNET_MessageHeader * message, 122 const struct GNUNET_MessageHeader *
123 const struct 123 message,
124 GNUNET_TRANSPORT_ATS_Information * atsi); 124 const struct
125 GNUNET_TRANSPORT_ATS_Information *
126 atsi);
125 127
126 128
127/** 129/**
@@ -162,14 +164,13 @@ struct GNUNET_CORE_MessageHandler
162 * @param my_identity ID of this peer, NULL if we failed 164 * @param my_identity ID of this peer, NULL if we failed
163 * @param publicKey public key of this peer, NULL if we failed 165 * @param publicKey public key of this peer, NULL if we failed
164 */ 166 */
165typedef void 167typedef void (*GNUNET_CORE_StartupCallback) (void *cls,
166 (*GNUNET_CORE_StartupCallback) (void *cls, 168 struct GNUNET_CORE_Handle * server,
167 struct GNUNET_CORE_Handle * server, 169 const struct GNUNET_PeerIdentity *
168 const struct GNUNET_PeerIdentity * 170 my_identity,
169 my_identity, 171 const struct
170 const struct 172 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
171 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded * 173 * publicKey);
172 publicKey);
173 174
174 175
175/** 176/**
@@ -308,9 +309,9 @@ struct GNUNET_CORE_PeerRequestHandle *GNUNET_CORE_peer_request_connect (struct
308 * 309 *
309 * @param req request handle that was returned for the original request 310 * @param req request handle that was returned for the original request
310 */ 311 */
311void 312void GNUNET_CORE_peer_request_connect_cancel (struct
312GNUNET_CORE_peer_request_connect_cancel (struct GNUNET_CORE_PeerRequestHandle 313 GNUNET_CORE_PeerRequestHandle
313 *req); 314 *req);
314 315
315 316
316/** 317/**
@@ -325,16 +326,18 @@ GNUNET_CORE_peer_request_connect_cancel (struct GNUNET_CORE_PeerRequestHandle
325 * long should the client wait until re-trying? 326 * long should the client wait until re-trying?
326 * @param preference current traffic preference for the given peer 327 * @param preference current traffic preference for the given peer
327 */ 328 */
328typedef void 329typedef void (*GNUNET_CORE_PeerConfigurationInfoCallback) (void *cls,
329 (*GNUNET_CORE_PeerConfigurationInfoCallback) (void *cls, 330 const struct
330 const struct 331 GNUNET_PeerIdentity *
331 GNUNET_PeerIdentity * peer, 332 peer,
332 struct 333 struct
333 GNUNET_BANDWIDTH_Value32NBO 334 GNUNET_BANDWIDTH_Value32NBO
334 bandwidth_out, int32_t amount, 335 bandwidth_out,
335 struct GNUNET_TIME_Relative 336 int32_t amount,
336 res_delay, 337 struct
337 uint64_t preference); 338 GNUNET_TIME_Relative
339 res_delay,
340 uint64_t preference);
338 341
339 342
340 343
@@ -391,10 +394,9 @@ struct GNUNET_CORE_InformationRequestContext
391 * 394 *
392 * @param irc context returned by the original GNUNET_CORE_peer_get_info call 395 * @param irc context returned by the original GNUNET_CORE_peer_get_info call
393 */ 396 */
394void 397void GNUNET_CORE_peer_change_preference_cancel (struct
395GNUNET_CORE_peer_change_preference_cancel (struct 398 GNUNET_CORE_InformationRequestContext
396 GNUNET_CORE_InformationRequestContext 399 *irc);
397 *irc);
398 400
399 401
400/** 402/**
@@ -405,10 +407,9 @@ GNUNET_CORE_peer_change_preference_cancel (struct
405 * @param cb_cls closure for peer_cb 407 * @param cb_cls closure for peer_cb
406 * @return GNUNET_OK on success, GNUNET_SYSERR on errors 408 * @return GNUNET_OK on success, GNUNET_SYSERR on errors
407 */ 409 */
408int 410int GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
409GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg, 411 GNUNET_CORE_ConnectEventHandler peer_cb,
410 GNUNET_CORE_ConnectEventHandler peer_cb, 412 void *cb_cls);
411 void *cb_cls);
412 413
413/** 414/**
414 * Iterate over all currently connected peers. 415 * Iterate over all currently connected peers.
@@ -423,11 +424,10 @@ GNUNET_CORE_iterate_peers (const struct GNUNET_CONFIGURATION_Handle *cfg,
423 * 424 *
424 * @return GNUNET_OK if iterating, GNUNET_SYSERR on error 425 * @return GNUNET_OK if iterating, GNUNET_SYSERR on error
425 */ 426 */
426int 427int GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle
427GNUNET_CORE_is_peer_connected (const struct GNUNET_CONFIGURATION_Handle *cfg, 428 *cfg, struct GNUNET_PeerIdentity *peer,
428 struct GNUNET_PeerIdentity *peer, 429 GNUNET_CORE_ConnectEventHandler peer_cb,
429 GNUNET_CORE_ConnectEventHandler peer_cb, 430 void *cb_cls);
430 void *cb_cls);
431 431
432 432
433/** 433/**
@@ -490,9 +490,8 @@ struct GNUNET_CORE_TransmitHandle *GNUNET_CORE_notify_transmit_ready (struct
490 * 490 *
491 * @param th handle that was returned by "notify_transmit_ready". 491 * @param th handle that was returned by "notify_transmit_ready".
492 */ 492 */
493void 493void GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle
494GNUNET_CORE_notify_transmit_ready_cancel (struct GNUNET_CORE_TransmitHandle 494 *th);
495 *th);
496 495
497 496
498#if 0 /* keep Emacsens' auto-indent happy */ 497#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index ec71a791b..30a7d9ee0 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -295,8 +295,7 @@ int GNUNET_CRYPTO_aes_check_session_key (const struct
295 * for streams. 295 * for streams.
296 * @return the size of the encrypted block, -1 for errors 296 * @return the size of the encrypted block, -1 for errors
297 */ 297 */
298ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block, 298ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block, size_t len,
299 size_t len,
300 const struct GNUNET_CRYPTO_AesSessionKey 299 const struct GNUNET_CRYPTO_AesSessionKey
301 *sessionkey, 300 *sessionkey,
302 const struct 301 const struct
@@ -314,8 +313,7 @@ ssize_t GNUNET_CRYPTO_aes_encrypt (const void *block,
314 * @param result address to store the result at 313 * @param result address to store the result at
315 * @return -1 on failure, size of decrypted block on success 314 * @return -1 on failure, size of decrypted block on success
316 */ 315 */
317ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block, 316ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block, size_t size,
318 size_t size,
319 const struct GNUNET_CRYPTO_AesSessionKey 317 const struct GNUNET_CRYPTO_AesSessionKey
320 *sessionkey, 318 *sessionkey,
321 const struct 319 const struct
@@ -331,10 +329,11 @@ ssize_t GNUNET_CRYPTO_aes_decrypt (const void *block,
331 * @param salt_len size of the salt 329 * @param salt_len size of the salt
332 * @param ... pairs of void * & size_t for context chunks, terminated by NULL 330 * @param ... pairs of void * & size_t for context chunks, terminated by NULL
333 */ 331 */
334void 332void GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector
335GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector *iv, 333 *iv,
336 const struct GNUNET_CRYPTO_AesSessionKey *skey, 334 const struct GNUNET_CRYPTO_AesSessionKey
337 const void *salt, size_t salt_len, ...); 335 *skey, const void *salt, size_t salt_len,
336 ...);
338 337
339 338
340/** 339/**
@@ -345,10 +344,11 @@ GNUNET_CRYPTO_aes_derive_iv (struct GNUNET_CRYPTO_AesInitializationVector *iv,
345 * @param salt_len size of the salt 344 * @param salt_len size of the salt
346 * @param argp pairs of void * & size_t for context chunks, terminated by NULL 345 * @param argp pairs of void * & size_t for context chunks, terminated by NULL
347 */ 346 */
348void 347void GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector
349GNUNET_CRYPTO_aes_derive_iv_v (struct GNUNET_CRYPTO_AesInitializationVector *iv, 348 *iv,
350 const struct GNUNET_CRYPTO_AesSessionKey *skey, 349 const struct GNUNET_CRYPTO_AesSessionKey
351 const void *salt, size_t salt_len, va_list argp); 350 *skey, const void *salt, size_t salt_len,
351 va_list argp);
352 352
353 353
354/** 354/**
@@ -403,10 +403,9 @@ void GNUNET_CRYPTO_hash (const void *block, size_t size, GNUNET_HashCode * ret);
403 * @param plaintext_len length of plaintext 403 * @param plaintext_len length of plaintext
404 * @param hmac where to store the hmac 404 * @param hmac where to store the hmac
405 */ 405 */
406void 406void GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key,
407GNUNET_CRYPTO_hmac (const struct GNUNET_CRYPTO_AuthKey *key, 407 const void *plaintext, size_t plaintext_len,
408 const void *plaintext, 408 GNUNET_HashCode * hmac);
409 size_t plaintext_len, GNUNET_HashCode * hmac);
410 409
411 410
412/** 411/**
@@ -511,8 +510,8 @@ void GNUNET_CRYPTO_hash_xor (const GNUNET_HashCode * a,
511 */ 510 */
512void GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc, 511void GNUNET_CRYPTO_hash_to_aes_key (const GNUNET_HashCode * hc,
513 struct GNUNET_CRYPTO_AesSessionKey *skey, 512 struct GNUNET_CRYPTO_AesSessionKey *skey,
514 struct 513 struct GNUNET_CRYPTO_AesInitializationVector
515 GNUNET_CRYPTO_AesInitializationVector *iv); 514 *iv);
516 515
517 516
518/** 517/**
@@ -574,11 +573,10 @@ int GNUNET_CRYPTO_hash_xorcmp (const GNUNET_HashCode * h1,
574 * @param salt_len size of the salt 573 * @param salt_len size of the salt
575 * @param argp pair of void * & size_t for context chunks, terminated by NULL 574 * @param argp pair of void * & size_t for context chunks, terminated by NULL
576 */ 575 */
577void 576void GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key,
578GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key, 577 const struct GNUNET_CRYPTO_AesSessionKey
579 const struct GNUNET_CRYPTO_AesSessionKey *rkey, 578 *rkey, const void *salt, size_t salt_len,
580 const void *salt, 579 va_list argp);
581 size_t salt_len, va_list argp);
582 580
583 581
584/** 582/**
@@ -589,10 +587,10 @@ GNUNET_CRYPTO_hmac_derive_key_v (struct GNUNET_CRYPTO_AuthKey *key,
589 * @param salt_len size of the salt 587 * @param salt_len size of the salt
590 * @param ... pair of void * & size_t for context chunks, terminated by NULL 588 * @param ... pair of void * & size_t for context chunks, terminated by NULL
591 */ 589 */
592void 590void GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key,
593GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key, 591 const struct GNUNET_CRYPTO_AesSessionKey
594 const struct GNUNET_CRYPTO_AesSessionKey *rkey, 592 *rkey, const void *salt, size_t salt_len,
595 const void *salt, size_t salt_len, ...); 593 ...);
596 594
597/** 595/**
598 * @brief Derive key 596 * @brief Derive key
@@ -606,12 +604,9 @@ GNUNET_CRYPTO_hmac_derive_key (struct GNUNET_CRYPTO_AuthKey *key,
606 * @param skm_len length of skm 604 * @param skm_len length of skm
607 * @return GNUNET_YES on success 605 * @return GNUNET_YES on success
608 */ 606 */
609int 607int GNUNET_CRYPTO_hkdf (void *result, size_t out_len, int xtr_algo,
610GNUNET_CRYPTO_hkdf (void *result, 608 int prf_algo, const void *xts, size_t xts_len,
611 size_t out_len, 609 const void *skm, size_t skm_len, ...);
612 int xtr_algo, int prf_algo,
613 const void *xts, size_t xts_len,
614 const void *skm, size_t skm_len, ...);
615 610
616 611
617/** 612/**
@@ -627,13 +622,9 @@ GNUNET_CRYPTO_hkdf (void *result,
627 * @param argp va_list of void * & size_t pairs for context chunks 622 * @param argp va_list of void * & size_t pairs for context chunks
628 * @return GNUNET_YES on success 623 * @return GNUNET_YES on success
629 */ 624 */
630int 625int GNUNET_CRYPTO_hkdf_v (void *result, size_t out_len, int xtr_algo,
631GNUNET_CRYPTO_hkdf_v (void *result, 626 int prf_algo, const void *xts, size_t xts_len,
632 size_t out_len, 627 const void *skm, size_t skm_len, va_list argp);
633 int xtr_algo,
634 int prf_algo,
635 const void *xts, size_t xts_len,
636 const void *skm, size_t skm_len, va_list argp);
637 628
638 629
639/** 630/**
@@ -647,11 +638,9 @@ GNUNET_CRYPTO_hkdf_v (void *result,
647 * @param argp va_list of void * & size_t pairs for context chunks 638 * @param argp va_list of void * & size_t pairs for context chunks
648 * @return GNUNET_YES on success 639 * @return GNUNET_YES on success
649 */ 640 */
650int 641int GNUNET_CRYPTO_kdf_v (void *result, size_t out_len, const void *xts,
651GNUNET_CRYPTO_kdf_v (void *result, 642 size_t xts_len, const void *skm, size_t skm_len,
652 size_t out_len, 643 va_list argp);
653 const void *xts, size_t xts_len,
654 const void *skm, size_t skm_len, va_list argp);
655 644
656 645
657/** 646/**
@@ -665,10 +654,8 @@ GNUNET_CRYPTO_kdf_v (void *result,
665 * @param ... void * & size_t pairs for context chunks 654 * @param ... void * & size_t pairs for context chunks
666 * @return GNUNET_YES on success 655 * @return GNUNET_YES on success
667 */ 656 */
668int 657int GNUNET_CRYPTO_kdf (void *result, size_t out_len, const void *xts,
669GNUNET_CRYPTO_kdf (void *result, size_t out_len, 658 size_t xts_len, const void *skm, size_t skm_len, ...);
670 const void *xts, size_t xts_len, const void *skm,
671 size_t skm_len, ...);
672 659
673 660
674/** 661/**
@@ -731,8 +718,8 @@ void GNUNET_CRYPTO_rsa_key_free (struct GNUNET_CRYPTO_RsaPrivateKey *hostkey);
731 * @param priv the private key 718 * @param priv the private key
732 * @param pub where to write the public key 719 * @param pub where to write the public key
733 */ 720 */
734void GNUNET_CRYPTO_rsa_key_get_public (const struct 721void GNUNET_CRYPTO_rsa_key_get_public (const struct GNUNET_CRYPTO_RsaPrivateKey
735 GNUNET_CRYPTO_RsaPrivateKey *priv, 722 *priv,
736 struct 723 struct
737 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded 724 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
738 *pub); 725 *pub);
@@ -748,8 +735,7 @@ void GNUNET_CRYPTO_rsa_key_get_public (const struct
748 * @param target where to store the encrypted block 735 * @param target where to store the encrypted block
749 * @return GNUNET_SYSERR on error, GNUNET_OK if ok 736 * @return GNUNET_SYSERR on error, GNUNET_OK if ok
750 */ 737 */
751int GNUNET_CRYPTO_rsa_encrypt (const void *block, 738int GNUNET_CRYPTO_rsa_encrypt (const void *block, size_t size,
752 size_t size,
753 const struct 739 const struct
754 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded 740 GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
755 *publicKey, 741 *publicKey,
diff --git a/src/include/gnunet_datacache_lib.h b/src/include/gnunet_datacache_lib.h
index a1712b809..46d22d5ec 100644
--- a/src/include/gnunet_datacache_lib.h
+++ b/src/include/gnunet_datacache_lib.h
@@ -84,8 +84,7 @@ void GNUNET_DATACACHE_destroy (struct GNUNET_DATACACHE_Handle *h);
84typedef int (*GNUNET_DATACACHE_Iterator) (void *cls, 84typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
85 struct GNUNET_TIME_Absolute exp, 85 struct GNUNET_TIME_Absolute exp,
86 const GNUNET_HashCode * key, 86 const GNUNET_HashCode * key,
87 size_t size, 87 size_t size, const char *data,
88 const char *data,
89 enum GNUNET_BLOCK_Type type); 88 enum GNUNET_BLOCK_Type type);
90 89
91 90
@@ -100,13 +99,10 @@ typedef int (*GNUNET_DATACACHE_Iterator) (void *cls,
100 * @param discard_time when to discard the value in any case 99 * @param discard_time when to discard the value in any case
101 * @return GNUNET_OK on success, GNUNET_SYSERR on error (full, etc.) 100 * @return GNUNET_OK on success, GNUNET_SYSERR on error (full, etc.)
102 */ 101 */
103int 102int GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
104GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h, 103 const GNUNET_HashCode * key, size_t size,
105 const GNUNET_HashCode * key, 104 const char *data, enum GNUNET_BLOCK_Type type,
106 size_t size, 105 struct GNUNET_TIME_Absolute discard_time);
107 const char *data,
108 enum GNUNET_BLOCK_Type type,
109 struct GNUNET_TIME_Absolute discard_time);
110 106
111 107
112/** 108/**
@@ -120,11 +116,11 @@ GNUNET_DATACACHE_put (struct GNUNET_DATACACHE_Handle *h,
120 * @param iter_cls closure for iter 116 * @param iter_cls closure for iter
121 * @return the number of results found 117 * @return the number of results found
122 */ 118 */
123unsigned int 119unsigned int GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h,
124GNUNET_DATACACHE_get (struct GNUNET_DATACACHE_Handle *h, 120 const GNUNET_HashCode * key,
125 const GNUNET_HashCode * key, 121 enum GNUNET_BLOCK_Type type,
126 enum GNUNET_BLOCK_Type type, 122 GNUNET_DATACACHE_Iterator iter,
127 GNUNET_DATACACHE_Iterator iter, void *iter_cls); 123 void *iter_cls);
128 124
129 125
130#if 0 /* keep Emacsens' auto-indent happy */ 126#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_datacache_plugin.h b/src/include/gnunet_datacache_plugin.h
index c7ce0bef1..6868d6b76 100644
--- a/src/include/gnunet_datacache_plugin.h
+++ b/src/include/gnunet_datacache_plugin.h
@@ -109,11 +109,8 @@ struct GNUNET_DATACACHE_PluginFunctions
109 * @param discard_time when to discard the value in any case 109 * @param discard_time when to discard the value in any case
110 * @return 0 on error, number of bytes used otherwise 110 * @return 0 on error, number of bytes used otherwise
111 */ 111 */
112 size_t (*put) (void *cls, 112 size_t (*put) (void *cls, const GNUNET_HashCode * key, size_t size,
113 const GNUNET_HashCode * key, 113 const char *data, enum GNUNET_BLOCK_Type type,
114 size_t size,
115 const char *data,
116 enum GNUNET_BLOCK_Type type,
117 struct GNUNET_TIME_Absolute discard_time); 114 struct GNUNET_TIME_Absolute discard_time);
118 115
119 116
@@ -128,8 +125,7 @@ struct GNUNET_DATACACHE_PluginFunctions
128 * @param iter_cls closure for iter 125 * @param iter_cls closure for iter
129 * @return the number of results found 126 * @return the number of results found
130 */ 127 */
131 unsigned int (*get) (void *cls, 128 unsigned int (*get) (void *cls, const GNUNET_HashCode * key,
132 const GNUNET_HashCode * key,
133 enum GNUNET_BLOCK_Type type, 129 enum GNUNET_BLOCK_Type type,
134 GNUNET_DATACACHE_Iterator iter, void *iter_cls); 130 GNUNET_DATACACHE_Iterator iter, void *iter_cls);
135 131
diff --git a/src/include/gnunet_datastore_plugin.h b/src/include/gnunet_datastore_plugin.h
index f33588bce..b0aa0c6c9 100644
--- a/src/include/gnunet_datastore_plugin.h
+++ b/src/include/gnunet_datastore_plugin.h
@@ -92,15 +92,12 @@ struct GNUNET_DATASTORE_PluginEnvironment
92 * @return GNUNET_OK to keep the item 92 * @return GNUNET_OK to keep the item
93 * GNUNET_NO to delete the item 93 * GNUNET_NO to delete the item
94 */ 94 */
95typedef int (*PluginDatumProcessor) (void *cls, 95typedef int (*PluginDatumProcessor) (void *cls, const GNUNET_HashCode * key,
96 const GNUNET_HashCode * key, 96 uint32_t size, const void *data,
97 uint32_t size,
98 const void *data,
99 enum GNUNET_BLOCK_Type type, 97 enum GNUNET_BLOCK_Type type,
100 uint32_t priority, 98 uint32_t priority, uint32_t anonymity,
101 uint32_t anonymity, 99 struct GNUNET_TIME_Absolute expiration,
102 struct GNUNET_TIME_Absolute 100 uint64_t uid);
103 expiration, uint64_t uid);
104 101
105/** 102/**
106 * Get an estimate of how much space the database is 103 * Get an estimate of how much space the database is
@@ -130,13 +127,9 @@ typedef unsigned long long (*PluginEstimateSize) (void *cls);
130 * @return GNUNET_OK on success, 127 * @return GNUNET_OK on success,
131 * GNUNET_SYSERR on failure 128 * GNUNET_SYSERR on failure
132 */ 129 */
133typedef int (*PluginPut) (void *cls, 130typedef int (*PluginPut) (void *cls, const GNUNET_HashCode * key, uint32_t size,
134 const GNUNET_HashCode * key, 131 const void *data, enum GNUNET_BLOCK_Type type,
135 uint32_t size, 132 uint32_t priority, uint32_t anonymity,
136 const void *data,
137 enum GNUNET_BLOCK_Type type,
138 uint32_t priority,
139 uint32_t anonymity,
140 uint32_t replication, 133 uint32_t replication,
141 struct GNUNET_TIME_Absolute expiration, char **msg); 134 struct GNUNET_TIME_Absolute expiration, char **msg);
142 135
@@ -159,8 +152,7 @@ typedef int (*PluginPut) (void *cls,
159 * proc should be called with NULL if there is no result 152 * proc should be called with NULL if there is no result
160 * @param proc_cls closure for proc 153 * @param proc_cls closure for proc
161 */ 154 */
162typedef void (*PluginGetKey) (void *cls, 155typedef void (*PluginGetKey) (void *cls, uint64_t offset,
163 uint64_t offset,
164 const GNUNET_HashCode * key, 156 const GNUNET_HashCode * key,
165 const GNUNET_HashCode * vhash, 157 const GNUNET_HashCode * vhash,
166 enum GNUNET_BLOCK_Type type, 158 enum GNUNET_BLOCK_Type type,
@@ -178,8 +170,8 @@ typedef void (*PluginGetKey) (void *cls,
178 * @param proc function to call the value (once only). 170 * @param proc function to call the value (once only).
179 * @param proc_cls closure for proc 171 * @param proc_cls closure for proc
180 */ 172 */
181typedef void (*PluginGetRandom) (void *cls, 173typedef void (*PluginGetRandom) (void *cls, PluginDatumProcessor proc,
182 PluginDatumProcessor proc, void *proc_cls); 174 void *proc_cls);
183 175
184 176
185/** 177/**
@@ -205,9 +197,7 @@ typedef void (*PluginGetRandom) (void *cls,
205 * @param msg set to an error message (on error) 197 * @param msg set to an error message (on error)
206 * @return GNUNET_OK on success 198 * @return GNUNET_OK on success
207 */ 199 */
208typedef int (*PluginUpdate) (void *cls, 200typedef int (*PluginUpdate) (void *cls, uint64_t uid, int delta,
209 uint64_t uid,
210 int delta,
211 struct GNUNET_TIME_Absolute expire, char **msg); 201 struct GNUNET_TIME_Absolute expire, char **msg);
212 202
213 203
@@ -223,8 +213,7 @@ typedef int (*PluginUpdate) (void *cls,
223 * @param proc function to call on the matching value 213 * @param proc function to call on the matching value
224 * @param proc_cls closure for proc 214 * @param proc_cls closure for proc
225 */ 215 */
226typedef void (*PluginGetType) (void *cls, 216typedef void (*PluginGetType) (void *cls, uint64_t offset,
227 uint64_t offset,
228 enum GNUNET_BLOCK_Type type, 217 enum GNUNET_BLOCK_Type type,
229 PluginDatumProcessor proc, void *proc_cls); 218 PluginDatumProcessor proc, void *proc_cls);
230 219
diff --git a/src/include/gnunet_datastore_service.h b/src/include/gnunet_datastore_service.h
index 58c730aba..584537f39 100644
--- a/src/include/gnunet_datastore_service.h
+++ b/src/include/gnunet_datastore_service.h
@@ -313,8 +313,7 @@ struct GNUNET_DATASTORE_QueueEntry *GNUNET_DATASTORE_remove (struct
313 */ 313 */
314typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls, 314typedef void (*GNUNET_DATASTORE_DatumProcessor) (void *cls,
315 const GNUNET_HashCode * key, 315 const GNUNET_HashCode * key,
316 size_t size, 316 size_t size, const void *data,
317 const void *data,
318 enum GNUNET_BLOCK_Type type, 317 enum GNUNET_BLOCK_Type type,
319 uint32_t priority, 318 uint32_t priority,
320 uint32_t anonymity, 319 uint32_t anonymity,
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h
index 7c7f646e6..46929c366 100644
--- a/src/include/gnunet_dht_service.h
+++ b/src/include/gnunet_dht_service.h
@@ -154,17 +154,14 @@ void GNUNET_DHT_disconnect (struct GNUNET_DHT_Handle *handle);
154 * @param cont continuation to call when done (transmitting request to service) 154 * @param cont continuation to call when done (transmitting request to service)
155 * @param cont_cls closure for cont 155 * @param cont_cls closure for cont
156 */ 156 */
157void 157void GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle,
158GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, 158 const GNUNET_HashCode * key,
159 const GNUNET_HashCode * key, 159 uint32_t desired_replication_level,
160 uint32_t desired_replication_level, 160 enum GNUNET_DHT_RouteOption options,
161 enum GNUNET_DHT_RouteOption options, 161 enum GNUNET_BLOCK_Type type, size_t size, const char *data,
162 enum GNUNET_BLOCK_Type type, 162 struct GNUNET_TIME_Absolute exp,
163 size_t size, 163 struct GNUNET_TIME_Relative timeout,
164 const char *data, 164 GNUNET_SCHEDULER_Task cont, void *cont_cls);
165 struct GNUNET_TIME_Absolute exp,
166 struct GNUNET_TIME_Relative timeout,
167 GNUNET_SCHEDULER_Task cont, void *cont_cls);
168 165
169 166
170/** 167/**
@@ -292,8 +289,8 @@ struct GNUNET_DHT_FindPeerHandle *GNUNET_DHT_find_peer_start (struct
292 * 289 *
293 * @param find_peer_handle GET operation to stop. 290 * @param find_peer_handle GET operation to stop.
294 */ 291 */
295void 292void GNUNET_DHT_find_peer_stop (struct GNUNET_DHT_FindPeerHandle
296GNUNET_DHT_find_peer_stop (struct GNUNET_DHT_FindPeerHandle *find_peer_handle); 293 *find_peer_handle);
297 294
298 295
299 296
@@ -384,9 +381,8 @@ void GNUNET_DHT_route_stop (struct GNUNET_DHT_RouteHandle *route_handle);
384 * @param cont_cls closure for cont 381 * @param cont_cls closure for cont
385 * @param handle handle to the DHT service 382 * @param handle handle to the DHT service
386 */ 383 */
387void 384void GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle,
388GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle, 385 GNUNET_SCHEDULER_Task cont, void *cont_cls);
389 GNUNET_SCHEDULER_Task cont, void *cont_cls);
390 386
391/* ***** Special API for testing robustness with malicious peers ******* */ 387/* ***** Special API for testing robustness with malicious peers ******* */
392 388
@@ -406,9 +402,9 @@ GNUNET_DHT_find_peers (struct GNUNET_DHT_Handle *handle,
406 * @param cont_cls closure for cont 402 * @param cont_cls closure for cont
407 * 403 *
408 */ 404 */
409void 405void GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle,
410GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle, 406 GNUNET_SCHEDULER_Task cont,
411 GNUNET_SCHEDULER_Task cont, void *cont_cls); 407 void *cont_cls);
412 408
413 409
414/** 410/**
@@ -420,10 +416,10 @@ GNUNET_DHT_set_malicious_dropper (struct GNUNET_DHT_Handle *handle,
420 * @param cont continuation to call when done (transmitting request to service) 416 * @param cont continuation to call when done (transmitting request to service)
421 * @param cont_cls closure for cont 417 * @param cont_cls closure for cont
422 */ 418 */
423void 419void GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle,
424GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle, 420 struct GNUNET_TIME_Relative frequency,
425 struct GNUNET_TIME_Relative frequency, 421 GNUNET_SCHEDULER_Task cont,
426 GNUNET_SCHEDULER_Task cont, void *cont_cls); 422 void *cont_cls);
427 423
428 424
429/** 425/**
@@ -435,10 +431,10 @@ GNUNET_DHT_set_malicious_putter (struct GNUNET_DHT_Handle *handle,
435 * @param cont continuation to call when done (transmitting request to service) 431 * @param cont continuation to call when done (transmitting request to service)
436 * @param cont_cls closure for cont 432 * @param cont_cls closure for cont
437 */ 433 */
438void 434void GNUNET_DHT_set_malicious_getter (struct GNUNET_DHT_Handle *handle,
439GNUNET_DHT_set_malicious_getter (struct GNUNET_DHT_Handle *handle, 435 struct GNUNET_TIME_Relative frequency,
440 struct GNUNET_TIME_Relative frequency, 436 GNUNET_SCHEDULER_Task cont,
441 GNUNET_SCHEDULER_Task cont, void *cont_cls); 437 void *cont_cls);
442 438
443 439
444#endif 440#endif
diff --git a/src/include/gnunet_disk_lib.h b/src/include/gnunet_disk_lib.h
index 5732a27d6..f5fae80c9 100644
--- a/src/include/gnunet_disk_lib.h
+++ b/src/include/gnunet_disk_lib.h
@@ -292,9 +292,8 @@ int GNUNET_DISK_file_test (const char *fil);
292 * @param whence specification to which position the offset parameter relates to 292 * @param whence specification to which position the offset parameter relates to
293 * @return the new position on success, GNUNET_SYSERR otherwise 293 * @return the new position on success, GNUNET_SYSERR otherwise
294 */ 294 */
295off_t 295off_t GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h,
296GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h, 296 off_t offset, enum GNUNET_DISK_Seek whence);
297 off_t offset, enum GNUNET_DISK_Seek whence);
298 297
299 298
300/** 299/**
@@ -309,8 +308,8 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle *h,
309 * included? 308 * included?
310 * @return GNUNET_OK on success, GNUNET_SYSERR on error 309 * @return GNUNET_OK on success, GNUNET_SYSERR on error
311 */ 310 */
312int GNUNET_DISK_file_size (const char *filename, 311int GNUNET_DISK_file_size (const char *filename, uint64_t * size,
313 uint64_t * size, int includeSymLinks); 312 int includeSymLinks);
314 313
315 314
316/** 315/**
@@ -328,8 +327,8 @@ int GNUNET_DISK_file_size (const char *filename,
328 * @param ino set to the inode ID 327 * @param ino set to the inode ID
329 * @return GNUNET_OK on success 328 * @return GNUNET_OK on success
330 */ 329 */
331int GNUNET_DISK_file_get_identifiers (const char *filename, 330int GNUNET_DISK_file_get_identifiers (const char *filename, uint64_t * dev,
332 uint64_t * dev, uint64_t * ino); 331 uint64_t * ino);
333 332
334 333
335/** 334/**
@@ -372,8 +371,7 @@ struct GNUNET_DISK_FileHandle *GNUNET_DISK_file_open (const char *fn,
372 * @param inherit_write 1 to make write handle inheritable, 0 otherwise (NT only) 371 * @param inherit_write 1 to make write handle inheritable, 0 otherwise (NT only)
373 * @return handle to the new pipe, NULL on error 372 * @return handle to the new pipe, NULL on error
374 */ 373 */
375struct GNUNET_DISK_PipeHandle *GNUNET_DISK_pipe (int blocking, 374struct GNUNET_DISK_PipeHandle *GNUNET_DISK_pipe (int blocking, int inherit_read,
376 int inherit_read,
377 int inherit_write); 375 int inherit_write);
378 376
379 377
@@ -391,9 +389,8 @@ int GNUNET_DISK_pipe_close (struct GNUNET_DISK_PipeHandle *p);
391 * @param end which end of the pipe to close 389 * @param end which end of the pipe to close
392 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise 390 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
393 */ 391 */
394int 392int GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p,
395GNUNET_DISK_pipe_close_end (struct GNUNET_DISK_PipeHandle *p, 393 enum GNUNET_DISK_PipeEnd end);
396 enum GNUNET_DISK_PipeEnd end);
397 394
398/** 395/**
399 * Close an open file. 396 * Close an open file.
@@ -462,9 +459,7 @@ ssize_t GNUNET_DISK_file_write (const struct GNUNET_DISK_FileHandle *h,
462 * @param mode file permissions 459 * @param mode file permissions
463 * @return number of bytes written on success, GNUNET_SYSERR on error 460 * @return number of bytes written on success, GNUNET_SYSERR on error
464 */ 461 */
465ssize_t GNUNET_DISK_fn_write (const char *fn, 462ssize_t GNUNET_DISK_fn_write (const char *fn, const void *buffer, size_t n,
466 const void *buffer,
467 size_t n,
468 enum GNUNET_DISK_AccessPermissions mode); 463 enum GNUNET_DISK_AccessPermissions mode);
469 464
470 465
@@ -541,8 +536,8 @@ int GNUNET_DISK_directory_iterator_next (struct GNUNET_DISK_DirectoryIterator
541 * @param callback the method to call for each file 536 * @param callback the method to call for each file
542 * @param callback_cls closure for callback 537 * @param callback_cls closure for callback
543 */ 538 */
544void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority 539void GNUNET_DISK_directory_iterator_start (enum GNUNET_SCHEDULER_Priority prio,
545 prio, const char *dirName, 540 const char *dirName,
546 GNUNET_DISK_DirectoryIteratorCallback 541 GNUNET_DISK_DirectoryIteratorCallback
547 callback, void *callback_cls); 542 callback, void *callback_cls);
548 543
@@ -599,9 +594,8 @@ int GNUNET_DISK_directory_create (const char *dir);
599 * @param excl GNUNET_YES for an exclusive lock 594 * @param excl GNUNET_YES for an exclusive lock
600 * @return GNUNET_OK on success, GNUNET_SYSERR on error 595 * @return GNUNET_OK on success, GNUNET_SYSERR on error
601 */ 596 */
602int 597int GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart,
603GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart, 598 off_t lockEnd, int excl);
604 off_t lockEnd, int excl);
605 599
606 600
607/** 601/**
@@ -611,9 +605,8 @@ GNUNET_DISK_file_lock (struct GNUNET_DISK_FileHandle *fh, off_t lockStart,
611 * @param unlockEnd absolute position until where to unlock 605 * @param unlockEnd absolute position until where to unlock
612 * @return GNUNET_OK on success, GNUNET_SYSERR on error 606 * @return GNUNET_OK on success, GNUNET_SYSERR on error
613 */ 607 */
614int 608int GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh,
615GNUNET_DISK_file_unlock (struct GNUNET_DISK_FileHandle *fh, 609 off_t unlockStart, off_t unlockEnd);
616 off_t unlockStart, off_t unlockEnd);
617 610
618 611
619/** 612/**
diff --git a/src/include/gnunet_dv_service.h b/src/include/gnunet_dv_service.h
index 0da76c56c..2bb2319b9 100644
--- a/src/include/gnunet_dv_service.h
+++ b/src/include/gnunet_dv_service.h
@@ -70,12 +70,9 @@ struct GNUNET_DV_Handle;
70 */ 70 */
71int GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle, 71int GNUNET_DV_send (struct GNUNET_DV_Handle *dv_handle,
72 const struct GNUNET_PeerIdentity *target, 72 const struct GNUNET_PeerIdentity *target,
73 const char *msgbuf, 73 const char *msgbuf, size_t msgbuf_size,
74 size_t msgbuf_size, 74 unsigned int priority, struct GNUNET_TIME_Relative timeout,
75 unsigned int priority, 75 const void *addr, size_t addrlen,
76 struct GNUNET_TIME_Relative timeout,
77 const void *addr,
78 size_t addrlen,
79 GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls); 76 GNUNET_TRANSPORT_TransmitContinuation cont, void *cont_cls);
80 77
81 78
diff --git a/src/include/gnunet_fragmentation_lib.h b/src/include/gnunet_fragmentation_lib.h
index da236478c..1f1f85321 100644
--- a/src/include/gnunet_fragmentation_lib.h
+++ b/src/include/gnunet_fragmentation_lib.h
@@ -105,8 +105,8 @@ struct GNUNET_FRAGMENT_Context *GNUNET_FRAGMENT_context_create (struct
105 * 105 *
106 * @param fc fragmentation context 106 * @param fc fragmentation context
107 */ 107 */
108void 108void GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context
109GNUNET_FRAGMENT_context_transmission_done (struct GNUNET_FRAGMENT_Context *fc); 109 *fc);
110 110
111 111
112/** 112/**
@@ -132,8 +132,9 @@ int GNUNET_FRAGMENT_process_ack (struct GNUNET_FRAGMENT_Context *fc,
132 * @return average delay between transmission and ACK for the 132 * @return average delay between transmission and ACK for the
133 * last message, FOREVER if the message was not fully transmitted 133 * last message, FOREVER if the message was not fully transmitted
134 */ 134 */
135struct GNUNET_TIME_Relative 135struct GNUNET_TIME_Relative GNUNET_FRAGMENT_context_destroy (struct
136GNUNET_FRAGMENT_context_destroy (struct GNUNET_FRAGMENT_Context *fc); 136 GNUNET_FRAGMENT_Context
137 *fc);
137 138
138 139
139/** 140/**
@@ -152,8 +153,7 @@ struct GNUNET_DEFRAGMENT_Context;
152 * @param id unique message ID (modulo collisions) 153 * @param id unique message ID (modulo collisions)
153 * @param msg the message that was created 154 * @param msg the message that was created
154 */ 155 */
155typedef void (*GNUNET_DEFRAGMENT_AckProcessor) (void *cls, 156typedef void (*GNUNET_DEFRAGMENT_AckProcessor) (void *cls, uint32_t id,
156 uint32_t id,
157 const struct 157 const struct
158 GNUNET_MessageHeader * msg); 158 GNUNET_MessageHeader * msg);
159 159
@@ -200,9 +200,8 @@ void GNUNET_DEFRAGMENT_context_destroy (struct GNUNET_DEFRAGMENT_Context *dc);
200 * @param msg the message that was received 200 * @param msg the message that was received
201 * @return GNUNET_OK on success, GNUNET_NO if this was a duplicate, GNUNET_SYSERR on error 201 * @return GNUNET_OK on success, GNUNET_NO if this was a duplicate, GNUNET_SYSERR on error
202 */ 202 */
203int 203int GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc,
204GNUNET_DEFRAGMENT_process_fragment (struct GNUNET_DEFRAGMENT_Context *dc, 204 const struct GNUNET_MessageHeader *msg);
205 const struct GNUNET_MessageHeader *msg);
206 205
207 206
208#if 0 /* keep Emacsens' auto-indent happy */ 207#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_fs_service.h b/src/include/gnunet_fs_service.h
index b6eb83609..2962a9cf2 100644
--- a/src/include/gnunet_fs_service.h
+++ b/src/include/gnunet_fs_service.h
@@ -79,8 +79,7 @@ struct GNUNET_FS_Uri;
79 * @param is_mandatory is the keyword mandatory (in a search) 79 * @param is_mandatory is the keyword mandatory (in a search)
80 * @return GNUNET_OK to continue to iterate, GNUNET_SYSERR to abort 80 * @return GNUNET_OK to continue to iterate, GNUNET_SYSERR to abort
81 */ 81 */
82typedef int (*GNUNET_FS_KeywordIterator) (void *cls, 82typedef int (*GNUNET_FS_KeywordIterator) (void *cls, const char *keyword,
83 const char *keyword,
84 int is_mandatory); 83 int is_mandatory);
85 84
86/** 85/**
@@ -90,8 +89,8 @@ typedef int (*GNUNET_FS_KeywordIterator) (void *cls,
90 * @param uri uri to convert to a unique key 89 * @param uri uri to convert to a unique key
91 * @param key wherer to store the unique key 90 * @param key wherer to store the unique key
92 */ 91 */
93void 92void GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri,
94GNUNET_FS_uri_to_key (const struct GNUNET_FS_Uri *uri, GNUNET_HashCode * key); 93 GNUNET_HashCode * key);
95 94
96/** 95/**
97 * Convert a URI to a UTF-8 String. 96 * Convert a URI to a UTF-8 String.
@@ -119,9 +118,8 @@ char *GNUNET_FS_uri_ksk_to_string_fancy (const struct GNUNET_FS_Uri *uri);
119 * @param keyword keyword to add 118 * @param keyword keyword to add
120 * @param is_mandatory is this keyword mandatory? 119 * @param is_mandatory is this keyword mandatory?
121 */ 120 */
122void 121void GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri,
123GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri, 122 const char *keyword, int is_mandatory);
124 const char *keyword, int is_mandatory);
125 123
126 124
127/** 125/**
@@ -131,9 +129,8 @@ GNUNET_FS_uri_ksk_add_keyword (struct GNUNET_FS_Uri *uri,
131 * @param uri ksk uri to modify 129 * @param uri ksk uri to modify
132 * @param keyword keyword to add 130 * @param keyword keyword to add
133 */ 131 */
134void 132void GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri,
135GNUNET_FS_uri_ksk_remove_keyword (struct GNUNET_FS_Uri *uri, 133 const char *keyword);
136 const char *keyword);
137 134
138 135
139/** 136/**
@@ -159,8 +156,8 @@ void GNUNET_FS_uri_destroy (struct GNUNET_FS_Uri *uri);
159 * @param uri ksk uri to get the number of keywords from 156 * @param uri ksk uri to get the number of keywords from
160 * @return 0 if this is not a keyword URI 157 * @return 0 if this is not a keyword URI
161 */ 158 */
162unsigned int 159unsigned int GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri
163GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri *uri); 160 *uri);
164 161
165 162
166/** 163/**
@@ -172,10 +169,9 @@ GNUNET_FS_uri_ksk_get_keyword_count (const struct GNUNET_FS_Uri *uri);
172 * @return -1 if this is not a keyword URI, otherwise number of 169 * @return -1 if this is not a keyword URI, otherwise number of
173 * keywords iterated over until iterator aborted 170 * keywords iterated over until iterator aborted
174 */ 171 */
175int 172int GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri,
176GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri, 173 GNUNET_FS_KeywordIterator iterator,
177 GNUNET_FS_KeywordIterator iterator, 174 void *iterator_cls);
178 void *iterator_cls);
179 175
180 176
181/** 177/**
@@ -185,9 +181,8 @@ GNUNET_FS_uri_ksk_get_keywords (const struct GNUNET_FS_Uri *uri,
185 * @param peer where to store the identify of the peer (presumably) offering the content 181 * @param peer where to store the identify of the peer (presumably) offering the content
186 * @return GNUNET_SYSERR if this is not a location URI, otherwise GNUNET_OK 182 * @return GNUNET_SYSERR if this is not a location URI, otherwise GNUNET_OK
187 */ 183 */
188int 184int GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri,
189GNUNET_FS_uri_loc_get_peer_identity (const struct GNUNET_FS_Uri *uri, 185 struct GNUNET_PeerIdentity *peer);
190 struct GNUNET_PeerIdentity *peer);
191 186
192 187
193/** 188/**
@@ -206,8 +201,9 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_loc_get_uri (const struct GNUNET_FS_Uri
206 * @param uri location URI to get the expiration from 201 * @param uri location URI to get the expiration from
207 * @return expiration time of the URI 202 * @return expiration time of the URI
208 */ 203 */
209struct GNUNET_TIME_Absolute 204struct GNUNET_TIME_Absolute GNUNET_FS_uri_loc_get_expiration (const struct
210GNUNET_FS_uri_loc_get_expiration (const struct GNUNET_FS_Uri *uri); 205 GNUNET_FS_Uri
206 *uri);
211 207
212 208
213/** 209/**
@@ -310,9 +306,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_args (unsigned int argc,
310 * @param u2 the other URI 306 * @param u2 the other URI
311 * @return GNUNET_YES if the URIs are equal 307 * @return GNUNET_YES if the URIs are equal
312 */ 308 */
313int 309int GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1,
314GNUNET_FS_uri_test_equal (const struct GNUNET_FS_Uri *u1, 310 const struct GNUNET_FS_Uri *u2);
315 const struct GNUNET_FS_Uri *u2);
316 311
317 312
318/** 313/**
@@ -361,9 +356,8 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_sks_create_from_nsid (GNUNET_HashCode *
361 * @param nsid where to store the ID of the namespace 356 * @param nsid where to store the ID of the namespace
362 * @return GNUNET_OK on success 357 * @return GNUNET_OK on success
363 */ 358 */
364int 359int GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri,
365GNUNET_FS_uri_sks_get_namespace (const struct GNUNET_FS_Uri *uri, 360 GNUNET_HashCode * nsid);
366 GNUNET_HashCode * nsid);
367 361
368 362
369/** 363/**
@@ -451,10 +445,10 @@ struct GNUNET_FS_Uri *GNUNET_FS_uri_ksk_create_from_meta_data (const struct
451 * @param value command line argument given 445 * @param value command line argument given
452 * @return GNUNET_OK on success 446 * @return GNUNET_OK on success
453 */ 447 */
454int 448int GNUNET_FS_getopt_set_keywords (struct
455GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext 449 GNUNET_GETOPT_CommandLineProcessorContext
456 *ctx, void *scls, const char *option, 450 *ctx, void *scls, const char *option,
457 const char *value); 451 const char *value);
458 452
459 453
460/** 454/**
@@ -469,10 +463,10 @@ GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext
469 * @param value command line argument given 463 * @param value command line argument given
470 * @return GNUNET_OK on success 464 * @return GNUNET_OK on success
471 */ 465 */
472int 466int GNUNET_FS_getopt_set_metadata (struct
473GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext 467 GNUNET_GETOPT_CommandLineProcessorContext
474 *ctx, void *scls, const char *option, 468 *ctx, void *scls, const char *option,
475 const char *value); 469 const char *value);
476 470
477 471
478 472
@@ -1522,8 +1516,9 @@ struct GNUNET_FS_ProgressInfo
1522 * will be passed to future callbacks in the respective 1516 * will be passed to future callbacks in the respective
1523 * field in the GNUNET_FS_ProgressInfo struct. 1517 * field in the GNUNET_FS_ProgressInfo struct.
1524 */ 1518 */
1525typedef void *(*GNUNET_FS_ProgressCallback) 1519typedef void *(*GNUNET_FS_ProgressCallback) (void *cls,
1526 (void *cls, const struct GNUNET_FS_ProgressInfo * info); 1520 const struct GNUNET_FS_ProgressInfo
1521 * info);
1527 1522
1528 1523
1529/** 1524/**
@@ -1682,11 +1677,10 @@ void GNUNET_FS_stop (struct GNUNET_FS_Handle *h);
1682 * @return GNUNET_SYSERR on error, otherwise the number 1677 * @return GNUNET_SYSERR on error, otherwise the number
1683 * of meta-data items obtained 1678 * of meta-data items obtained
1684 */ 1679 */
1685int 1680int GNUNET_FS_meta_data_extract_from_file (struct GNUNET_CONTAINER_MetaData *md,
1686GNUNET_FS_meta_data_extract_from_file (struct 1681 const char *filename,
1687 GNUNET_CONTAINER_MetaData 1682 struct EXTRACTOR_PluginList
1688 *md, const char *filename, 1683 *extractors);
1689 struct EXTRACTOR_PluginList *extractors);
1690 1684
1691 1685
1692/** 1686/**
@@ -1804,9 +1798,8 @@ struct GNUNET_FS_FileInformation
1804 * @param emsg location for the reader to store an error message 1798 * @param emsg location for the reader to store an error message
1805 * @return number of bytes written, usually "max", 0 on error 1799 * @return number of bytes written, usually "max", 0 on error
1806 */ 1800 */
1807typedef size_t (*GNUNET_FS_DataReader) (void *cls, 1801typedef size_t (*GNUNET_FS_DataReader) (void *cls, uint64_t offset, size_t max,
1808 uint64_t offset, 1802 void *buf, char **emsg);
1809 size_t max, void *buf, char **emsg);
1810 1803
1811 1804
1812/** 1805/**
@@ -1850,8 +1843,7 @@ struct GNUNET_FS_FileInformation
1850 * @param fi information about the file (should not be 1843 * @param fi information about the file (should not be
1851 * used henceforth by the caller) 1844 * used henceforth by the caller)
1852 */ 1845 */
1853typedef void (*GNUNET_FS_FileProcessor) (void *cls, 1846typedef void (*GNUNET_FS_FileProcessor) (void *cls, const char *filename,
1854 const char *filename,
1855 struct GNUNET_FS_FileInformation * fi); 1847 struct GNUNET_FS_FileInformation * fi);
1856 1848
1857 1849
@@ -1870,8 +1862,7 @@ typedef void (*GNUNET_FS_FileProcessor) (void *cls,
1870 */ 1862 */
1871typedef int (*GNUNET_FS_DirectoryScanner) (void *cls, 1863typedef int (*GNUNET_FS_DirectoryScanner) (void *cls,
1872 struct GNUNET_FS_Handle * h, 1864 struct GNUNET_FS_Handle * h,
1873 const char *dirname, 1865 const char *dirname, int do_index,
1874 int do_index,
1875 const struct GNUNET_FS_BlockOptions * 1866 const struct GNUNET_FS_BlockOptions *
1876 bo, GNUNET_FS_FileProcessor proc, 1867 bo, GNUNET_FS_FileProcessor proc,
1877 void *proc_cls, char **emsg); 1868 void *proc_cls, char **emsg);
@@ -1899,14 +1890,11 @@ typedef int (*GNUNET_FS_DirectoryScanner) (void *cls,
1899 * @param emsg where to store an error message (on errors) 1890 * @param emsg where to store an error message (on errors)
1900 * @return GNUNET_OK on success 1891 * @return GNUNET_OK on success
1901 */ 1892 */
1902int 1893int GNUNET_FS_directory_scanner_default (void *cls, struct GNUNET_FS_Handle *h,
1903GNUNET_FS_directory_scanner_default (void *cls, 1894 const char *dirname, int do_index,
1904 struct GNUNET_FS_Handle *h, 1895 const struct GNUNET_FS_BlockOptions
1905 const char *dirname, 1896 *bo, GNUNET_FS_FileProcessor proc,
1906 int do_index, 1897 void *proc_cls, char **emsg);
1907 const struct GNUNET_FS_BlockOptions *bo,
1908 GNUNET_FS_FileProcessor proc,
1909 void *proc_cls, char **emsg);
1910 1898
1911 1899
1912/** 1900/**
@@ -1975,9 +1963,8 @@ struct GNUNET_FS_FileInformation
1975 * @param ent check if this FI represents a directory 1963 * @param ent check if this FI represents a directory
1976 * @return GNUNET_YES if so, GNUNET_NO if not 1964 * @return GNUNET_YES if so, GNUNET_NO if not
1977 */ 1965 */
1978int 1966int GNUNET_FS_file_information_is_directory (const struct
1979GNUNET_FS_file_information_is_directory (const struct GNUNET_FS_FileInformation 1967 GNUNET_FS_FileInformation *ent);
1980 *ent);
1981 1968
1982 1969
1983/** 1970/**
@@ -1991,9 +1978,8 @@ GNUNET_FS_file_information_is_directory (const struct GNUNET_FS_FileInformation
1991 * must not include "dir" in its structure 1978 * must not include "dir" in its structure
1992 * @return GNUNET_OK on success, GNUNET_SYSERR on error 1979 * @return GNUNET_OK on success, GNUNET_SYSERR on error
1993 */ 1980 */
1994int 1981int GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir,
1995GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir, 1982 struct GNUNET_FS_FileInformation *ent);
1996 struct GNUNET_FS_FileInformation *ent);
1997 1983
1998 1984
1999/** 1985/**
@@ -2010,10 +1996,9 @@ GNUNET_FS_file_information_add (struct GNUNET_FS_FileInformation *dir,
2010 * @param proc function to call on each entry 1996 * @param proc function to call on each entry
2011 * @param proc_cls closure for proc 1997 * @param proc_cls closure for proc
2012 */ 1998 */
2013void 1999void GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
2014GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir, 2000 GNUNET_FS_FileInformationProcessor
2015 GNUNET_FS_FileInformationProcessor proc, 2001 proc, void *proc_cls);
2016 void *proc_cls);
2017 2002
2018 2003
2019/** 2004/**
@@ -2026,10 +2011,9 @@ GNUNET_FS_file_information_inspect (struct GNUNET_FS_FileInformation *dir,
2026 * values are ignored 2011 * values are ignored
2027 * @param cleaner_cls closure for cleaner 2012 * @param cleaner_cls closure for cleaner
2028 */ 2013 */
2029void 2014void GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
2030GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi, 2015 GNUNET_FS_FileInformationProcessor
2031 GNUNET_FS_FileInformationProcessor cleaner, 2016 cleaner, void *cleaner_cls);
2032 void *cleaner_cls);
2033 2017
2034 2018
2035/** 2019/**
@@ -2114,14 +2098,13 @@ typedef void (*GNUNET_FS_PublishContinuation) (void *cls,
2114 * @param cont continuation 2098 * @param cont continuation
2115 * @param cont_cls closure for cont 2099 * @param cont_cls closure for cont
2116 */ 2100 */
2117void 2101void GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h,
2118GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h, 2102 const struct GNUNET_FS_Uri *ksk_uri,
2119 const struct GNUNET_FS_Uri *ksk_uri, 2103 const struct GNUNET_CONTAINER_MetaData *meta,
2120 const struct GNUNET_CONTAINER_MetaData *meta, 2104 const struct GNUNET_FS_Uri *uri,
2121 const struct GNUNET_FS_Uri *uri, 2105 const struct GNUNET_FS_BlockOptions *bo,
2122 const struct GNUNET_FS_BlockOptions *bo, 2106 enum GNUNET_FS_PublishOptions options,
2123 enum GNUNET_FS_PublishOptions options, 2107 GNUNET_FS_PublishContinuation cont, void *cont_cls);
2124 GNUNET_FS_PublishContinuation cont, void *cont_cls);
2125 2108
2126 2109
2127/** 2110/**
@@ -2138,16 +2121,14 @@ GNUNET_FS_publish_ksk (struct GNUNET_FS_Handle *h,
2138 * @param cont continuation 2121 * @param cont continuation
2139 * @param cont_cls closure for cont 2122 * @param cont_cls closure for cont
2140 */ 2123 */
2141void 2124void GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
2142GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h, 2125 struct GNUNET_FS_Namespace *namespace,
2143 struct GNUNET_FS_Namespace *namespace, 2126 const char *identifier, const char *update,
2144 const char *identifier, 2127 const struct GNUNET_CONTAINER_MetaData *meta,
2145 const char *update, 2128 const struct GNUNET_FS_Uri *uri,
2146 const struct GNUNET_CONTAINER_MetaData *meta, 2129 const struct GNUNET_FS_BlockOptions *bo,
2147 const struct GNUNET_FS_Uri *uri, 2130 enum GNUNET_FS_PublishOptions options,
2148 const struct GNUNET_FS_BlockOptions *bo, 2131 GNUNET_FS_PublishContinuation cont, void *cont_cls);
2149 enum GNUNET_FS_PublishOptions options,
2150 GNUNET_FS_PublishContinuation cont, void *cont_cls);
2151 2132
2152 2133
2153/** 2134/**
@@ -2158,8 +2139,7 @@ GNUNET_FS_publish_sks (struct GNUNET_FS_Handle *h,
2158 * @param file_id hash of the contents of the indexed file 2139 * @param file_id hash of the contents of the indexed file
2159 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort 2140 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
2160 */ 2141 */
2161typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, 2142typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls, const char *filename,
2162 const char *filename,
2163 const GNUNET_HashCode * file_id); 2143 const GNUNET_HashCode * file_id);
2164 2144
2165 2145
@@ -2174,11 +2154,10 @@ typedef int (*GNUNET_FS_IndexedFileProcessor) (void *cls,
2174 * error) or "PREREQ_DONE" (on success) 2154 * error) or "PREREQ_DONE" (on success)
2175 * @param cont_cls closure for cont 2155 * @param cont_cls closure for cont
2176 */ 2156 */
2177void 2157void GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h,
2178GNUNET_FS_get_indexed_files (struct GNUNET_FS_Handle *h, 2158 GNUNET_FS_IndexedFileProcessor iterator,
2179 GNUNET_FS_IndexedFileProcessor iterator, 2159 void *iterator_cls,
2180 void *iterator_cls, 2160 GNUNET_SCHEDULER_Task cont, void *cont_cls);
2181 GNUNET_SCHEDULER_Task cont, void *cont_cls);
2182 2161
2183 2162
2184/** 2163/**
@@ -2215,15 +2194,15 @@ void GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc);
2215 * @param cont continuation 2194 * @param cont continuation
2216 * @param cont_cls closure for cont 2195 * @param cont_cls closure for cont
2217 */ 2196 */
2218void 2197void GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h,
2219GNUNET_FS_namespace_advertise (struct GNUNET_FS_Handle *h, 2198 struct GNUNET_FS_Uri *ksk_uri,
2220 struct GNUNET_FS_Uri *ksk_uri, 2199 struct GNUNET_FS_Namespace *namespace,
2221 struct GNUNET_FS_Namespace *namespace, 2200 const struct GNUNET_CONTAINER_MetaData
2222 const struct GNUNET_CONTAINER_MetaData *meta, 2201 *meta,
2223 const struct GNUNET_FS_BlockOptions *bo, 2202 const struct GNUNET_FS_BlockOptions *bo,
2224 const char *rootEntry, 2203 const char *rootEntry,
2225 GNUNET_FS_PublishContinuation cont, 2204 GNUNET_FS_PublishContinuation cont,
2226 void *cont_cls); 2205 void *cont_cls);
2227 2206
2228 2207
2229/** 2208/**
@@ -2249,8 +2228,8 @@ struct GNUNET_FS_Namespace *GNUNET_FS_namespace_create (struct GNUNET_FS_Handle
2249 * 2228 *
2250 * @return GNUNET_OK on success, GNUNET_SYSERR on error 2229 * @return GNUNET_OK on success, GNUNET_SYSERR on error
2251 */ 2230 */
2252int 2231int GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace,
2253GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, int freeze); 2232 int freeze);
2254 2233
2255 2234
2256/** 2235/**
@@ -2262,8 +2241,7 @@ GNUNET_FS_namespace_delete (struct GNUNET_FS_Namespace *namespace, int freeze);
2262 * @param name human-readable identifier of the namespace 2241 * @param name human-readable identifier of the namespace
2263 * @param id hash identifier for the namespace 2242 * @param id hash identifier for the namespace
2264 */ 2243 */
2265typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, 2244typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls, const char *name,
2266 const char *name,
2267 const GNUNET_HashCode * id); 2245 const GNUNET_HashCode * id);
2268 2246
2269 2247
@@ -2276,9 +2254,9 @@ typedef void (*GNUNET_FS_NamespaceInfoProcessor) (void *cls,
2276 * @param cb function to call on each known namespace 2254 * @param cb function to call on each known namespace
2277 * @param cb_cls closure for cb 2255 * @param cb_cls closure for cb
2278 */ 2256 */
2279void 2257void GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h,
2280GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h, 2258 GNUNET_FS_NamespaceInfoProcessor cb,
2281 GNUNET_FS_NamespaceInfoProcessor cb, void *cb_cls); 2259 void *cb_cls);
2282 2260
2283 2261
2284/** 2262/**
@@ -2290,12 +2268,12 @@ GNUNET_FS_namespace_list (struct GNUNET_FS_Handle *h,
2290 * @param last_meta metadata associated with last_uri 2268 * @param last_meta metadata associated with last_uri
2291 * @param next_id identifier that should be used for updates 2269 * @param next_id identifier that should be used for updates
2292 */ 2270 */
2293typedef void 2271typedef void (*GNUNET_FS_IdentifierProcessor) (void *cls, const char *last_id,
2294 (*GNUNET_FS_IdentifierProcessor) (void *cls, 2272 const struct GNUNET_FS_Uri *
2295 const char *last_id, 2273 last_uri,
2296 const struct GNUNET_FS_Uri * last_uri, 2274 const struct
2297 const struct GNUNET_CONTAINER_MetaData * 2275 GNUNET_CONTAINER_MetaData *
2298 last_meta, const char *next_id); 2276 last_meta, const char *next_id);
2299 2277
2300 2278
2301/** 2279/**
@@ -2318,11 +2296,10 @@ typedef void
2318 * @param ip function to call on each updateable identifier 2296 * @param ip function to call on each updateable identifier
2319 * @param ip_cls closure for ip 2297 * @param ip_cls closure for ip
2320 */ 2298 */
2321void 2299void GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace,
2322GNUNET_FS_namespace_list_updateable (struct GNUNET_FS_Namespace *namespace, 2300 const char *next_id,
2323 const char *next_id, 2301 GNUNET_FS_IdentifierProcessor ip,
2324 GNUNET_FS_IdentifierProcessor ip, 2302 void *ip_cls);
2325 void *ip_cls);
2326 2303
2327 2304
2328/** 2305/**
@@ -2547,8 +2524,8 @@ struct GNUNET_FS_DownloadContext *GNUNET_FS_download_start_from_search (struct
2547 * @param dc handle for the download 2524 * @param dc handle for the download
2548 * @param do_delete delete files of incomplete downloads 2525 * @param do_delete delete files of incomplete downloads
2549 */ 2526 */
2550void 2527void GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc,
2551GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete); 2528 int do_delete);
2552 2529
2553 2530
2554 2531
@@ -2566,9 +2543,8 @@ GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete);
2566 * @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if 2543 * @return GNUNET_YES if it is, GNUNET_NO if it is not, GNUNET_SYSERR if
2567 * we have no mime-type information (treat as 'GNUNET_NO') 2544 * we have no mime-type information (treat as 'GNUNET_NO')
2568 */ 2545 */
2569int 2546int GNUNET_FS_meta_data_test_for_directory (const struct
2570GNUNET_FS_meta_data_test_for_directory (const struct GNUNET_CONTAINER_MetaData 2547 GNUNET_CONTAINER_MetaData *md);
2571 *md);
2572 2548
2573 2549
2574/** 2550/**
@@ -2634,12 +2610,10 @@ typedef void (*GNUNET_FS_DirectoryEntryProcessor) (void *cls,
2634 * GNUNET_NO if this could be part of a directory (but not 100% OK) 2610 * GNUNET_NO if this could be part of a directory (but not 100% OK)
2635 * GNUNET_SYSERR if 'data' does not represent a directory 2611 * GNUNET_SYSERR if 'data' does not represent a directory
2636 */ 2612 */
2637int 2613int GNUNET_FS_directory_list_contents (size_t size, const void *data,
2638GNUNET_FS_directory_list_contents (size_t size, 2614 uint64_t offset,
2639 const void *data, 2615 GNUNET_FS_DirectoryEntryProcessor dep,
2640 uint64_t offset, 2616 void *dep_cls);
2641 GNUNET_FS_DirectoryEntryProcessor dep,
2642 void *dep_cls);
2643 2617
2644 2618
2645/** 2619/**
@@ -2668,11 +2642,10 @@ struct GNUNET_FS_DirectoryBuilder *GNUNET_FS_directory_builder_create (const
2668 * data must point to exactly the number of bytes specified 2642 * data must point to exactly the number of bytes specified
2669 * by the uri 2643 * by the uri
2670 */ 2644 */
2671void 2645void GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld,
2672GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld, 2646 const struct GNUNET_FS_Uri *uri,
2673 const struct GNUNET_FS_Uri *uri, 2647 const struct GNUNET_CONTAINER_MetaData
2674 const struct GNUNET_CONTAINER_MetaData *md, 2648 *md, const void *data);
2675 const void *data);
2676 2649
2677 2650
2678/** 2651/**
@@ -2685,9 +2658,8 @@ GNUNET_FS_directory_builder_add (struct GNUNET_FS_DirectoryBuilder *bld,
2685 * @param rdata set to the encoded directory 2658 * @param rdata set to the encoded directory
2686 * @return GNUNET_OK on success 2659 * @return GNUNET_OK on success
2687 */ 2660 */
2688int 2661int GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
2689GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld, 2662 size_t * rsize, void **rdata);
2690 size_t * rsize, void **rdata);
2691 2663
2692 2664
2693#if 0 /* keep Emacsens' auto-indent happy */ 2665#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_getopt_lib.h b/src/include/gnunet_getopt_lib.h
index 9c34810b2..0fb7ec84e 100644
--- a/src/include/gnunet_getopt_lib.h
+++ b/src/include/gnunet_getopt_lib.h
@@ -85,12 +85,11 @@ struct GNUNET_GETOPT_CommandLineProcessorContext
85 * @param value argument, NULL if none was given 85 * @param value argument, NULL if none was given
86 * @return GNUNET_OK to continue processing other options, GNUNET_SYSERR to abort 86 * @return GNUNET_OK to continue processing other options, GNUNET_SYSERR to abort
87 */ 87 */
88typedef 88typedef int (*GNUNET_GETOPT_CommandLineOptionProcessor) (struct
89 int (*GNUNET_GETOPT_CommandLineOptionProcessor) (struct 89 GNUNET_GETOPT_CommandLineProcessorContext
90 GNUNET_GETOPT_CommandLineProcessorContext 90 * ctx, void *scls,
91 * ctx, void *scls, 91 const char *option,
92 const char *option, 92 const char *value);
93 const char *value);
94 93
95/** 94/**
96 * @brief Definition of a command line option. 95 * @brief Definition of a command line option.
@@ -209,8 +208,8 @@ struct GNUNET_GETOPT_CommandLineOption
209 * argument, or GNUNET_SYSERR on error 208 * argument, or GNUNET_SYSERR on error
210 */ 209 */
211int GNUNET_GETOPT_run (const char *binaryOptions, 210int GNUNET_GETOPT_run (const char *binaryOptions,
212 const struct GNUNET_GETOPT_CommandLineOption 211 const struct GNUNET_GETOPT_CommandLineOption *allOptions,
213 *allOptions, unsigned int argc, char *const *argv); 212 unsigned int argc, char *const *argv);
214 213
215 214
216/** 215/**
@@ -300,11 +299,10 @@ int GNUNET_GETOPT_set_string (struct GNUNET_GETOPT_CommandLineProcessorContext
300 * @param value not used (NULL) 299 * @param value not used (NULL)
301 * @return GNUNET_OK 300 * @return GNUNET_OK
302 */ 301 */
303int 302int GNUNET_GETOPT_increment_value (struct
304GNUNET_GETOPT_increment_value (struct 303 GNUNET_GETOPT_CommandLineProcessorContext
305 GNUNET_GETOPT_CommandLineProcessorContext *ctx, 304 *ctx, void *scls, const char *option,
306 void *scls, const char *option, 305 const char *value);
307 const char *value);
308 306
309 307
310/* *************** internal prototypes - use macros above! ************* */ 308/* *************** internal prototypes - use macros above! ************* */
@@ -318,8 +316,7 @@ GNUNET_GETOPT_increment_value (struct
318 * @param value not used (NULL) 316 * @param value not used (NULL)
319 * @return GNUNET_SYSERR (do not continue) 317 * @return GNUNET_SYSERR (do not continue)
320 */ 318 */
321int GNUNET_GETOPT_format_help_ (struct 319int GNUNET_GETOPT_format_help_ (struct GNUNET_GETOPT_CommandLineProcessorContext
322 GNUNET_GETOPT_CommandLineProcessorContext
323 *ctx, void *scls, const char *option, 320 *ctx, void *scls, const char *option,
324 const char *value); 321 const char *value);
325 322
diff --git a/src/include/gnunet_hello_lib.h b/src/include/gnunet_hello_lib.h
index a3e4ba0f0..3c44b5048 100644
--- a/src/include/gnunet_hello_lib.h
+++ b/src/include/gnunet_hello_lib.h
@@ -60,18 +60,11 @@ struct GNUNET_HELLO_Message;
60 * @return number of bytes copied, 0 if 60 * @return number of bytes copied, 0 if
61 * the target buffer was not big enough. 61 * the target buffer was not big enough.
62 */ 62 */
63size_t 63size_t GNUNET_HELLO_add_address (const char *tname,
64 64 struct GNUNET_TIME_Absolute
65 65 expiration, const void *addr,
66 66 uint16_t addr_len, char *target,
67 67 size_t max);
68
69
70
71GNUNET_HELLO_add_address (const char *tname,
72 struct GNUNET_TIME_Absolute expiration,
73 const void *addr,
74 uint16_t addr_len, char *target, size_t max);
75 68
76 69
77/** 70/**
@@ -85,9 +78,9 @@ GNUNET_HELLO_add_address (const char *tname,
85 * @return number of bytes written, 0 to signal the 78 * @return number of bytes written, 0 to signal the
86 * end of the iteration. 79 * end of the iteration.
87 */ 80 */
88typedef size_t 81typedef size_t (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls,
89 (*GNUNET_HELLO_GenerateAddressListCallback) (void *cls, 82 size_t max,
90 size_t max, void *buf); 83 void *buf);
91 84
92 85
93/** 86/**
@@ -143,11 +136,12 @@ struct GNUNET_HELLO_Message *GNUNET_HELLO_merge (const struct
143 * zero if the some addresses with expirations >= now 136 * zero if the some addresses with expirations >= now
144 * do not match at all 137 * do not match at all
145 */ 138 */
146struct GNUNET_TIME_Absolute 139struct GNUNET_TIME_Absolute GNUNET_HELLO_equals (const struct
147GNUNET_HELLO_equals (const struct 140 GNUNET_HELLO_Message *h1,
148 GNUNET_HELLO_Message *h1, 141 const struct
149 const struct 142 GNUNET_HELLO_Message *h2,
150 GNUNET_HELLO_Message *h2, struct GNUNET_TIME_Absolute now); 143 struct GNUNET_TIME_Absolute
144 now);
151 145
152 146
153/** 147/**
@@ -162,11 +156,10 @@ GNUNET_HELLO_equals (const struct
162 * GNUNET_NO to delete it from the HELLO 156 * GNUNET_NO to delete it from the HELLO
163 * GNUNET_SYSERR to stop iterating (but keep current address) 157 * GNUNET_SYSERR to stop iterating (but keep current address)
164 */ 158 */
165typedef int 159typedef int (*GNUNET_HELLO_AddressIterator) (void *cls, const char *tname,
166 (*GNUNET_HELLO_AddressIterator) (void *cls, 160 struct GNUNET_TIME_Absolute
167 const char *tname, 161 expiration, const void *addr,
168 struct GNUNET_TIME_Absolute expiration, 162 uint16_t addrlen);
169 const void *addr, uint16_t addrlen);
170 163
171 164
172/** 165/**
@@ -201,15 +194,14 @@ struct GNUNET_HELLO_Message *GNUNET_HELLO_iterate_addresses (const struct
201 * @param it iterator to call on each address 194 * @param it iterator to call on each address
202 * @param it_cls closure for it 195 * @param it_cls closure for it
203 */ 196 */
204void 197void GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message
205GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message 198 *new_hello,
206 *new_hello, 199 const struct GNUNET_HELLO_Message
207 const struct GNUNET_HELLO_Message 200 *old_hello,
208 *old_hello, 201 struct GNUNET_TIME_Absolute
209 struct GNUNET_TIME_Absolute 202 expiration_limit,
210 expiration_limit, 203 GNUNET_HELLO_AddressIterator it,
211 GNUNET_HELLO_AddressIterator it, 204 void *it_cls);
212 void *it_cls);
213 205
214 206
215/** 207/**
@@ -219,10 +211,9 @@ GNUNET_HELLO_iterate_new_addresses (const struct GNUNET_HELLO_Message
219 * @param publicKey where to copy the public key information, can be NULL 211 * @param publicKey where to copy the public key information, can be NULL
220 * @return GNUNET_SYSERR if the HELLO was malformed 212 * @return GNUNET_SYSERR if the HELLO was malformed
221 */ 213 */
222int 214int GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
223GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello, 215 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded
224 struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded 216 *publicKey);
225 *publicKey);
226 217
227 218
228/** 219/**
@@ -232,9 +223,8 @@ GNUNET_HELLO_get_key (const struct GNUNET_HELLO_Message *hello,
232 * @param peer where to store the peer's identity 223 * @param peer where to store the peer's identity
233 * @return GNUNET_SYSERR if the HELLO was malformed 224 * @return GNUNET_SYSERR if the HELLO was malformed
234 */ 225 */
235int 226int GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello,
236GNUNET_HELLO_get_id (const struct GNUNET_HELLO_Message *hello, 227 struct GNUNET_PeerIdentity *peer);
237 struct GNUNET_PeerIdentity *peer);
238 228
239 229
240/** 230/**
diff --git a/src/include/gnunet_load_lib.h b/src/include/gnunet_load_lib.h
index 40323e709..d56522d40 100644
--- a/src/include/gnunet_load_lib.h
+++ b/src/include/gnunet_load_lib.h
@@ -61,9 +61,8 @@ struct GNUNET_LOAD_Value *GNUNET_LOAD_value_init (struct GNUNET_TIME_Relative
61 * @param load load to update 61 * @param load load to update
62 * @param autodecline frequency of load decline 62 * @param autodecline frequency of load decline
63 */ 63 */
64void 64void GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load,
65GNUNET_LOAD_value_set_decline (struct GNUNET_LOAD_Value *load, 65 struct GNUNET_TIME_Relative autodecline);
66 struct GNUNET_TIME_Relative autodecline);
67 66
68 67
69/** 68/**
diff --git a/src/include/gnunet_mesh_service.h b/src/include/gnunet_mesh_service.h
index 7e332c749..507b766d1 100644
--- a/src/include/gnunet_mesh_service.h
+++ b/src/include/gnunet_mesh_service.h
@@ -67,14 +67,16 @@ struct GNUNET_MESH_Tunnel;
67 * @return GNUNET_OK to keep the connection open, 67 * @return GNUNET_OK to keep the connection open,
68 * GNUNET_SYSERR to close it (signal serious error) 68 * GNUNET_SYSERR to close it (signal serious error)
69 */ 69 */
70typedef int 70typedef int (*GNUNET_MESH_MessageCallback) (void *cls,
71 (*GNUNET_MESH_MessageCallback) (void *cls, 71 struct GNUNET_MESH_Tunnel * tunnel,
72 struct GNUNET_MESH_Tunnel * tunnel, 72 void **tunnel_ctx,
73 void **tunnel_ctx, 73 const struct GNUNET_PeerIdentity *
74 const struct GNUNET_PeerIdentity * sender, 74 sender,
75 const struct GNUNET_MessageHeader * message, 75 const struct GNUNET_MessageHeader *
76 const struct 76 message,
77 GNUNET_TRANSPORT_ATS_Information * atsi); 77 const struct
78 GNUNET_TRANSPORT_ATS_Information *
79 atsi);
78 80
79 81
80/** 82/**
@@ -281,10 +283,10 @@ struct GNUNET_MESH_Tunnel *GNUNET_MESH_peer_request_connect_all (struct
281 * @param timeout how long to try to establish a connection 283 * @param timeout how long to try to establish a connection
282 * @param peer peer to add 284 * @param peer peer to add
283 */ 285 */
284void 286void GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
285GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel, 287 struct GNUNET_TIME_Relative timeout,
286 struct GNUNET_TIME_Relative timeout, 288 const struct GNUNET_PeerIdentity
287 const struct GNUNET_PeerIdentity *peer); 289 *peer);
288 290
289 291
290/** 292/**
@@ -294,9 +296,9 @@ GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
294 * @param tunnel handle to existing tunnel 296 * @param tunnel handle to existing tunnel
295 * @param peer peer to remove 297 * @param peer peer to remove
296 */ 298 */
297void 299void GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
298GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel, 300 const struct GNUNET_PeerIdentity
299 const struct GNUNET_PeerIdentity *peer); 301 *peer);
300 302
301 303
302/** 304/**
@@ -394,9 +396,8 @@ struct GNUNET_MESH_TransmitHandle *GNUNET_MESH_notify_transmit_ready (struct
394 * 396 *
395 * @param th handle that was returned by "notify_transmit_ready". 397 * @param th handle that was returned by "notify_transmit_ready".
396 */ 398 */
397void 399void GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle
398GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle 400 *th);
399 *th);
400 401
401void GNUNET_MESH_tunnel_set_head (struct GNUNET_MESH_Tunnel *tunnel, 402void GNUNET_MESH_tunnel_set_head (struct GNUNET_MESH_Tunnel *tunnel,
402 void *head); 403 void *head);
diff --git a/src/include/gnunet_mesh_service_new.h b/src/include/gnunet_mesh_service_new.h
index 7146faa75..89b1c881e 100644
--- a/src/include/gnunet_mesh_service_new.h
+++ b/src/include/gnunet_mesh_service_new.h
@@ -67,14 +67,16 @@ struct GNUNET_MESH_Tunnel;
67 * @return GNUNET_OK to keep the connection open, 67 * @return GNUNET_OK to keep the connection open,
68 * GNUNET_SYSERR to close it (signal serious error) 68 * GNUNET_SYSERR to close it (signal serious error)
69 */ 69 */
70typedef int 70typedef int (*GNUNET_MESH_MessageCallback) (void *cls,
71 (*GNUNET_MESH_MessageCallback) (void *cls, 71 struct GNUNET_MESH_Tunnel * tunnel,
72 struct GNUNET_MESH_Tunnel * tunnel, 72 void **tunnel_ctx,
73 void **tunnel_ctx, 73 const struct GNUNET_PeerIdentity *
74 const struct GNUNET_PeerIdentity * sender, 74 sender,
75 const struct GNUNET_MessageHeader * message, 75 const struct GNUNET_MessageHeader *
76 const struct 76 message,
77 GNUNET_TRANSPORT_ATS_Information * atsi); 77 const struct
78 GNUNET_TRANSPORT_ATS_Information *
79 atsi);
78 80
79 81
80/** 82/**
@@ -113,8 +115,8 @@ struct GNUNET_MESH_MessageHandler
113 * with the tunnel is stored 115 * with the tunnel is stored
114 */ 116 */
115typedef void (GNUNET_MESH_TunnelEndHandler) (void *cls, 117typedef void (GNUNET_MESH_TunnelEndHandler) (void *cls,
116 const struct GNUNET_MESH_Tunnel 118 const struct GNUNET_MESH_Tunnel *
117 * tunnel, void **tunnel_ctx); 119 tunnel, void **tunnel_ctx);
118 120
119 121
120/** 122/**
@@ -220,10 +222,10 @@ void GNUNET_MESH_tunnel_destroy (struct GNUNET_MESH_Tunnel *tun);
220 * @param timeout how long to try to establish a connection 222 * @param timeout how long to try to establish a connection
221 * @param peer peer to add 223 * @param peer peer to add
222 */ 224 */
223void 225void GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
224GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel, 226 struct GNUNET_TIME_Relative timeout,
225 struct GNUNET_TIME_Relative timeout, 227 const struct GNUNET_PeerIdentity
226 const struct GNUNET_PeerIdentity *peer); 228 *peer);
227 229
228 230
229/** 231/**
@@ -233,9 +235,9 @@ GNUNET_MESH_peer_request_connect_add (struct GNUNET_MESH_Tunnel *tunnel,
233 * @param tunnel handle to existing tunnel 235 * @param tunnel handle to existing tunnel
234 * @param peer peer to remove 236 * @param peer peer to remove
235 */ 237 */
236void 238void GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
237GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel, 239 const struct GNUNET_PeerIdentity
238 const struct GNUNET_PeerIdentity *peer); 240 *peer);
239 241
240 242
241/** 243/**
@@ -247,10 +249,12 @@ GNUNET_MESH_peer_request_connect_del (struct GNUNET_MESH_Tunnel *tunnel,
247 * @param app_type application type that must be supported by the peer 249 * @param app_type application type that must be supported by the peer
248 * (MESH should discover peer in proximity handling this type) 250 * (MESH should discover peer in proximity handling this type)
249 */ 251 */
250void 252void GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Tunnel
251GNUNET_MESH_peer_request_connect_by_type (struct GNUNET_MESH_Tunnel *tunnel, 253 *tunnel,
252 struct GNUNET_TIME_Relative timeout, 254 struct GNUNET_TIME_Relative
253 GNUNET_MESH_ApplicationType app_type); 255 timeout,
256 GNUNET_MESH_ApplicationType
257 app_type);
254 258
255 259
256/** 260/**
@@ -305,9 +309,8 @@ struct GNUNET_MESH_TransmitHandle *GNUNET_MESH_notify_transmit_ready (struct
305 * 309 *
306 * @param th handle that was returned by "notify_transmit_ready". 310 * @param th handle that was returned by "notify_transmit_ready".
307 */ 311 */
308void 312void GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle
309GNUNET_MESH_notify_transmit_ready_cancel (struct GNUNET_MESH_TransmitHandle 313 *th);
310 *th);
311 314
312 315
313#if 0 /* keep Emacsens' auto-indent happy */ 316#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_nat_lib.h b/src/include/gnunet_nat_lib.h
index a84f684a7..30eb50dd8 100644
--- a/src/include/gnunet_nat_lib.h
+++ b/src/include/gnunet_nat_lib.h
@@ -41,8 +41,7 @@
41 * @param addr either the previous or the new public IP address 41 * @param addr either the previous or the new public IP address
42 * @param addrlen actual lenght of the address 42 * @param addrlen actual lenght of the address
43 */ 43 */
44typedef void (*GNUNET_NAT_AddressCallback) (void *cls, 44typedef void (*GNUNET_NAT_AddressCallback) (void *cls, int add_remove,
45 int add_remove,
46 const struct sockaddr * addr, 45 const struct sockaddr * addr,
47 socklen_t addrlen); 46 socklen_t addrlen);
48 47
@@ -110,9 +109,8 @@ struct GNUNET_NAT_Handle *GNUNET_NAT_register (const struct
110 * GNUNET_NO if the address is not plausible, 109 * GNUNET_NO if the address is not plausible,
111 * GNUNET_SYSERR if the address is malformed 110 * GNUNET_SYSERR if the address is malformed
112 */ 111 */
113int 112int GNUNET_NAT_test_address (struct GNUNET_NAT_Handle *h, const void *addr,
114GNUNET_NAT_test_address (struct GNUNET_NAT_Handle *h, 113 socklen_t addrlen);
115 const void *addr, socklen_t addrlen);
116 114
117 115
118/** 116/**
@@ -123,9 +121,8 @@ GNUNET_NAT_test_address (struct GNUNET_NAT_Handle *h,
123 * @param h handle (used for configuration) 121 * @param h handle (used for configuration)
124 * @param sa the address of the peer (IPv4-only) 122 * @param sa the address of the peer (IPv4-only)
125 */ 123 */
126void 124void GNUNET_NAT_run_client (struct GNUNET_NAT_Handle *h,
127GNUNET_NAT_run_client (struct GNUNET_NAT_Handle *h, 125 const struct sockaddr_in *sa);
128 const struct sockaddr_in *sa);
129 126
130 127
131 128
@@ -220,8 +217,8 @@ struct GNUNET_NAT_ExternalHandle *GNUNET_NAT_mini_get_external_ipv4 (struct
220 * 217 *
221 * @param eh operation to cancel 218 * @param eh operation to cancel
222 */ 219 */
223void 220void GNUNET_NAT_mini_get_external_ipv4_cancel (struct GNUNET_NAT_ExternalHandle
224GNUNET_NAT_mini_get_external_ipv4_cancel (struct GNUNET_NAT_ExternalHandle *eh); 221 *eh);
225 222
226 223
227/** 224/**
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h
index ecc4adf41..0f38b855f 100644
--- a/src/include/gnunet_network_lib.h
+++ b/src/include/gnunet_network_lib.h
@@ -145,9 +145,9 @@ int GNUNET_NETWORK_socket_connect (const struct GNUNET_NETWORK_Handle *desc,
145 * @param optlen length of optval 145 * @param optlen length of optval
146 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise 146 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
147 */ 147 */
148int GNUNET_NETWORK_socket_getsockopt (const struct GNUNET_NETWORK_Handle 148int GNUNET_NETWORK_socket_getsockopt (const struct GNUNET_NETWORK_Handle *desc,
149 *desc, int level, int optname, 149 int level, int optname, void *optval,
150 void *optval, socklen_t * optlen); 150 socklen_t * optlen);
151 151
152 152
153/** 153/**
@@ -165,9 +165,8 @@ int GNUNET_NETWORK_socket_listen (const struct GNUNET_NETWORK_Handle *desc,
165 * How much data is available to be read on this descriptor? 165 * How much data is available to be read on this descriptor?
166 * @param desc socket 166 * @param desc socket
167 */ 167 */
168ssize_t 168ssize_t GNUNET_NETWORK_socket_recvfrom_amount (const struct
169GNUNET_NETWORK_socket_recvfrom_amount (const struct GNUNET_NETWORK_Handle 169 GNUNET_NETWORK_Handle *desc);
170 *desc);
171 170
172 171
173/** 172/**
@@ -179,17 +178,12 @@ GNUNET_NETWORK_socket_recvfrom_amount (const struct GNUNET_NETWORK_Handle
179 * to be filled in by recvfrom 178 * to be filled in by recvfrom
180 * @param addrlen length of the addr 179 * @param addrlen length of the addr
181 */ 180 */
182ssize_t 181ssize_t GNUNET_NETWORK_socket_recvfrom (const struct
183 182 GNUNET_NETWORK_Handle
184 183 *desc, void *buffer,
185 184 size_t length,
186 185 struct sockaddr *src_addr,
187 186 socklen_t * addrlen);
188
189
190GNUNET_NETWORK_socket_recvfrom (const struct GNUNET_NETWORK_Handle *desc,
191 void *buffer, size_t length,
192 struct sockaddr *src_addr, socklen_t * addrlen);
193 187
194 188
195/** 189/**
@@ -241,9 +235,8 @@ ssize_t GNUNET_NETWORK_socket_send (const struct GNUNET_NETWORK_Handle *desc,
241 * @param dest_len length of address 235 * @param dest_len length of address
242 * @return number of bytes sent, GNUNET_SYSERR on error 236 * @return number of bytes sent, GNUNET_SYSERR on error
243 */ 237 */
244ssize_t GNUNET_NETWORK_socket_sendto (const struct GNUNET_NETWORK_Handle 238ssize_t GNUNET_NETWORK_socket_sendto (const struct GNUNET_NETWORK_Handle *desc,
245 *desc, const void *message, 239 const void *message, size_t length,
246 size_t length,
247 const struct sockaddr *dest_addr, 240 const struct sockaddr *dest_addr,
248 socklen_t dest_len); 241 socklen_t dest_len);
249 242
@@ -326,9 +319,9 @@ void GNUNET_NETWORK_fdset_set (struct GNUNET_NETWORK_FDSet *fds,
326 * @param fds fd set 319 * @param fds fd set
327 * @param h the file handle to add 320 * @param h the file handle to add
328 */ 321 */
329void 322void GNUNET_NETWORK_fdset_handle_set_native_w32_handle (struct
330GNUNET_NETWORK_fdset_handle_set_native_w32_handle (struct GNUNET_NETWORK_FDSet 323 GNUNET_NETWORK_FDSet
331 *fds, HANDLE h); 324 *fds, HANDLE h);
332#endif 325#endif
333 326
334 327
@@ -395,9 +388,8 @@ void GNUNET_NETWORK_fdset_set_native (struct GNUNET_NETWORK_FDSet *to, int nfd);
395 * @param nfd native FD to test, -1 for none 388 * @param nfd native FD to test, -1 for none
396 * @return GNUNET_YES if to contains nfd 389 * @return GNUNET_YES if to contains nfd
397 */ 390 */
398int 391int GNUNET_NETWORK_fdset_test_native (const struct GNUNET_NETWORK_FDSet *to,
399GNUNET_NETWORK_fdset_test_native (const struct GNUNET_NETWORK_FDSet *to, 392 int nfd);
400 int nfd);
401 393
402 394
403/** 395/**
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h
index b285e3b60..d2474d2d8 100644
--- a/src/include/gnunet_os_lib.h
+++ b/src/include/gnunet_os_lib.h
@@ -149,8 +149,7 @@ char *GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind
149 * @param addrlen length of the address 149 * @param addrlen length of the address
150 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort 150 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
151 */ 151 */
152typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls, 152typedef int (*GNUNET_OS_NetworkInterfaceProcessor) (void *cls, const char *name,
153 const char *name,
154 int isDefault, 153 int isDefault,
155 const struct sockaddr * 154 const struct sockaddr *
156 addr, socklen_t addrlen); 155 addr, socklen_t addrlen);
@@ -342,10 +341,10 @@ int GNUNET_OS_process_wait (struct GNUNET_OS_Process *proc);
342/** 341/**
343 * Connects this process to its parent via pipe 342 * Connects this process to its parent via pipe
344 */ 343 */
345void 344void GNUNET_OS_install_parent_control_handler (void *cls,
346GNUNET_OS_install_parent_control_handler (void *cls, 345 const struct
347 const struct 346 GNUNET_SCHEDULER_TaskContext
348 GNUNET_SCHEDULER_TaskContext *tc); 347 *tc);
349 348
350 349
351/** 350/**
diff --git a/src/include/gnunet_peerinfo_service.h b/src/include/gnunet_peerinfo_service.h
index 04c63cbb1..2013eb60f 100644
--- a/src/include/gnunet_peerinfo_service.h
+++ b/src/include/gnunet_peerinfo_service.h
@@ -83,9 +83,8 @@ void GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h);
83 * @param h handle to the peerinfo service 83 * @param h handle to the peerinfo service
84 * @param hello the verified (!) HELLO message 84 * @param hello the verified (!) HELLO message
85 */ 85 */
86void 86void GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h,
87GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h, 87 const struct GNUNET_HELLO_Message *hello);
88 const struct GNUNET_HELLO_Message *hello);
89 88
90 89
91/** 90/**
@@ -97,11 +96,11 @@ GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h,
97 * @param hello hello message for the peer (can be NULL) 96 * @param hello hello message for the peer (can be NULL)
98 * @param error message 97 * @param error message
99 */ 98 */
100typedef void 99typedef void (*GNUNET_PEERINFO_Processor) (void *cls,
101 (*GNUNET_PEERINFO_Processor) (void *cls, 100 const struct GNUNET_PeerIdentity *
102 const struct GNUNET_PeerIdentity * peer, 101 peer,
103 const struct GNUNET_HELLO_Message * hello, 102 const struct GNUNET_HELLO_Message *
104 const char *err_msg); 103 hello, const char *err_msg);
105 104
106 105
107/** 106/**
@@ -148,8 +147,8 @@ struct GNUNET_PEERINFO_IteratorContext *GNUNET_PEERINFO_iterate (struct
148 * 147 *
149 * @param ic context of the iterator to cancel 148 * @param ic context of the iterator to cancel
150 */ 149 */
151void 150void GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext
152GNUNET_PEERINFO_iterate_cancel (struct GNUNET_PEERINFO_IteratorContext *ic); 151 *ic);
153 152
154 153
155 154
diff --git a/src/include/gnunet_program_lib.h b/src/include/gnunet_program_lib.h
index b01703f05..8881bfa9d 100644
--- a/src/include/gnunet_program_lib.h
+++ b/src/include/gnunet_program_lib.h
@@ -47,8 +47,7 @@ extern "C"
47 * @param cfgfile name of the configuration file used (for saving, can be NULL!) 47 * @param cfgfile name of the configuration file used (for saving, can be NULL!)
48 * @param cfg configuration 48 * @param cfg configuration
49 */ 49 */
50typedef void (*GNUNET_PROGRAM_Main) (void *cls, 50typedef void (*GNUNET_PROGRAM_Main) (void *cls, char *const *args,
51 char *const *args,
52 const char *cfgfile, 51 const char *cfgfile,
53 const struct GNUNET_CONFIGURATION_Handle * 52 const struct GNUNET_CONFIGURATION_Handle *
54 cfg); 53 cfg);
@@ -67,9 +66,7 @@ typedef void (*GNUNET_PROGRAM_Main) (void *cls,
67 * @param task_cls closure for task 66 * @param task_cls closure for task
68 * @return GNUNET_SYSERR on error, GNUNET_OK on success 67 * @return GNUNET_SYSERR on error, GNUNET_OK on success
69 */ 68 */
70int GNUNET_PROGRAM_run (int argc, 69int GNUNET_PROGRAM_run (int argc, char *const *argv, const char *binaryName,
71 char *const *argv,
72 const char *binaryName,
73 const char *binaryHelp, 70 const char *binaryHelp,
74 const struct GNUNET_GETOPT_CommandLineOption *options, 71 const struct GNUNET_GETOPT_CommandLineOption *options,
75 GNUNET_PROGRAM_Main task, void *task_cls); 72 GNUNET_PROGRAM_Main task, void *task_cls);
diff --git a/src/include/gnunet_pseudonym_lib.h b/src/include/gnunet_pseudonym_lib.h
index a0f202a3c..7a9373cc4 100644
--- a/src/include/gnunet_pseudonym_lib.h
+++ b/src/include/gnunet_pseudonym_lib.h
@@ -49,11 +49,9 @@ extern "C"
49 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort 49 * @return GNUNET_OK to continue iteration, GNUNET_SYSERR to abort
50 */ 50 */
51typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls, 51typedef int (*GNUNET_PSEUDONYM_Iterator) (void *cls,
52 const GNUNET_HashCode * 52 const GNUNET_HashCode * pseudonym,
53 pseudonym, 53 const struct GNUNET_CONTAINER_MetaData
54 const struct 54 * md, int rating);
55 GNUNET_CONTAINER_MetaData * md,
56 int rating);
57 55
58/** 56/**
59 * Change the ranking of a pseudonym. 57 * Change the ranking of a pseudonym.
@@ -105,9 +103,8 @@ int GNUNET_PSEUDONYM_discovery_callback_register (const struct
105/** 103/**
106 * Unregister namespace discovery callback. 104 * Unregister namespace discovery callback.
107 */ 105 */
108int 106int GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator
109GNUNET_PSEUDONYM_discovery_callback_unregister (GNUNET_PSEUDONYM_Iterator 107 iterator, void *closure);
110 iterator, void *closure);
111 108
112/** 109/**
113 * Return the unique, human readable name for the given pseudonym. 110 * Return the unique, human readable name for the given pseudonym.
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h
index c09153e31..9ab3a3a84 100644
--- a/src/include/gnunet_scheduler_lib.h
+++ b/src/include/gnunet_scheduler_lib.h
@@ -190,8 +190,8 @@ struct GNUNET_SCHEDULER_TaskContext
190 * @param tc context information (why was this task triggered now) 190 * @param tc context information (why was this task triggered now)
191 */ 191 */
192typedef void (*GNUNET_SCHEDULER_Task) (void *cls, 192typedef void (*GNUNET_SCHEDULER_Task) (void *cls,
193 const struct 193 const struct GNUNET_SCHEDULER_TaskContext
194 GNUNET_SCHEDULER_TaskContext * tc); 194 * tc);
195 195
196 196
197/** 197/**
@@ -280,10 +280,9 @@ void *GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task);
280 * @param task_cls closure of task 280 * @param task_cls closure of task
281 * @param reason reason for task invocation 281 * @param reason reason for task invocation
282 */ 282 */
283void 283void GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task,
284GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task, 284 void *task_cls,
285 void *task_cls, 285 enum GNUNET_SCHEDULER_Reason reason);
286 enum GNUNET_SCHEDULER_Reason reason);
287 286
288 287
289/** 288/**
@@ -316,9 +315,13 @@ GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_TaskIdentifier prerequisite_task,
316 * @return unique task identifier for the job 315 * @return unique task identifier for the job
317 * only valid until "task" is started! 316 * only valid until "task" is started!
318 */ 317 */
319GNUNET_SCHEDULER_TaskIdentifier 318GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_with_priority (enum
320GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, 319 GNUNET_SCHEDULER_Priority
321 GNUNET_SCHEDULER_Task task, void *task_cls); 320 prio,
321 GNUNET_SCHEDULER_Task
322 task,
323 void
324 *task_cls);
322 325
323 326
324/** 327/**
@@ -330,8 +333,8 @@ GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio,
330 * @return unique task identifier for the job 333 * @return unique task identifier for the job
331 * only valid until "task" is started! 334 * only valid until "task" is started!
332 */ 335 */
333GNUNET_SCHEDULER_TaskIdentifier 336GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task
334GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls); 337 task, void *task_cls);
335 338
336 339
337/** 340/**
@@ -348,10 +351,12 @@ GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls);
348 * @return unique task identifier for the job 351 * @return unique task identifier for the job
349 * only valid until "task" is started! 352 * only valid until "task" is started!
350 */ 353 */
351GNUNET_SCHEDULER_TaskIdentifier 354GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now_with_lifeness (int
352GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, 355 lifeness,
353 GNUNET_SCHEDULER_Task task, 356 GNUNET_SCHEDULER_Task
354 void *task_cls); 357 task,
358 void
359 *task_cls);
355 360
356 361
357/** 362/**
@@ -366,9 +371,12 @@ GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness,
366 * @return unique task identifier for the job 371 * @return unique task identifier for the job
367 * only valid until "task" is started! 372 * only valid until "task" is started!
368 */ 373 */
369GNUNET_SCHEDULER_TaskIdentifier 374GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_delayed (struct
370GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, 375 GNUNET_TIME_Relative
371 GNUNET_SCHEDULER_Task task, void *task_cls); 376 delay,
377 GNUNET_SCHEDULER_Task
378 task,
379 void *task_cls);
372 380
373 381
374/** 382/**
@@ -387,10 +395,15 @@ GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay,
387 * @return unique task identifier for the job 395 * @return unique task identifier for the job
388 * only valid until "task" is started! 396 * only valid until "task" is started!
389 */ 397 */
390GNUNET_SCHEDULER_TaskIdentifier 398GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_net (struct
391GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, 399 GNUNET_TIME_Relative
392 struct GNUNET_NETWORK_Handle *rfd, 400 delay,
393 GNUNET_SCHEDULER_Task task, void *task_cls); 401 struct
402 GNUNET_NETWORK_Handle
403 *rfd,
404 GNUNET_SCHEDULER_Task
405 task,
406 void *task_cls);
394 407
395 408
396/** 409/**
@@ -409,10 +422,15 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay,
409 * @return unique task identifier for the job 422 * @return unique task identifier for the job
410 * only valid until "task" is started! 423 * only valid until "task" is started!
411 */ 424 */
412GNUNET_SCHEDULER_TaskIdentifier 425GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_net (struct
413GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, 426 GNUNET_TIME_Relative
414 struct GNUNET_NETWORK_Handle *wfd, 427 delay,
415 GNUNET_SCHEDULER_Task task, void *task_cls); 428 struct
429 GNUNET_NETWORK_Handle
430 *wfd,
431 GNUNET_SCHEDULER_Task
432 task,
433 void *task_cls);
416 434
417 435
418/** 436/**
@@ -431,10 +449,15 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay,
431 * @return unique task identifier for the job 449 * @return unique task identifier for the job
432 * only valid until "task" is started! 450 * only valid until "task" is started!
433 */ 451 */
434GNUNET_SCHEDULER_TaskIdentifier 452GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_file (struct
435GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, 453 GNUNET_TIME_Relative
436 const struct GNUNET_DISK_FileHandle *rfd, 454 delay,
437 GNUNET_SCHEDULER_Task task, void *task_cls); 455 const struct
456 GNUNET_DISK_FileHandle
457 *rfd,
458 GNUNET_SCHEDULER_Task
459 task,
460 void *task_cls);
438 461
439 462
440/** 463/**
@@ -453,10 +476,16 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay,
453 * @return unique task identifier for the job 476 * @return unique task identifier for the job
454 * only valid until "task" is started! 477 * only valid until "task" is started!
455 */ 478 */
456GNUNET_SCHEDULER_TaskIdentifier 479GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_file (struct
457GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay, 480 GNUNET_TIME_Relative
458 const struct GNUNET_DISK_FileHandle *wfd, 481 delay,
459 GNUNET_SCHEDULER_Task task, void *task_cls); 482 const struct
483 GNUNET_DISK_FileHandle
484 *wfd,
485 GNUNET_SCHEDULER_Task
486 task,
487 void
488 *task_cls);
460 489
461 490
462/** 491/**
@@ -491,14 +520,23 @@ GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay,
491 * @return unique task identifier for the job 520 * @return unique task identifier for the job
492 * only valid until "task" is started! 521 * only valid until "task" is started!
493 */ 522 */
494GNUNET_SCHEDULER_TaskIdentifier 523GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_select (enum
495GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio, 524 GNUNET_SCHEDULER_Priority
496 GNUNET_SCHEDULER_TaskIdentifier 525 prio,
497 prerequisite_task, 526 GNUNET_SCHEDULER_TaskIdentifier
498 struct GNUNET_TIME_Relative delay, 527 prerequisite_task,
499 const struct GNUNET_NETWORK_FDSet *rs, 528 struct
500 const struct GNUNET_NETWORK_FDSet *ws, 529 GNUNET_TIME_Relative
501 GNUNET_SCHEDULER_Task task, void *task_cls); 530 delay,
531 const struct
532 GNUNET_NETWORK_FDSet
533 *rs,
534 const struct
535 GNUNET_NETWORK_FDSet
536 *ws,
537 GNUNET_SCHEDULER_Task
538 task,
539 void *task_cls);
502 540
503/** 541/**
504 * Sets the select function to use in the scheduler (scheduler_select). 542 * Sets the select function to use in the scheduler (scheduler_select).
@@ -506,9 +544,8 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio,
506 * @param new_select new select function to use (NULL to reset to default) 544 * @param new_select new select function to use (NULL to reset to default)
507 * @param new_select_cls closure for 'new_select' 545 * @param new_select_cls closure for 'new_select'
508 */ 546 */
509void 547void GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select,
510GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select, 548 void *new_select_cls);
511 void *new_select_cls);
512 549
513 550
514#if 0 /* keep Emacsens' auto-indent happy */ 551#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_server_lib.h b/src/include/gnunet_server_lib.h
index e4b856db0..d9663ac82 100644
--- a/src/include/gnunet_server_lib.h
+++ b/src/include/gnunet_server_lib.h
@@ -73,8 +73,8 @@ struct GNUNET_SERVER_Client;
73typedef void (*GNUNET_SERVER_MessageCallback) (void *cls, 73typedef void (*GNUNET_SERVER_MessageCallback) (void *cls,
74 struct GNUNET_SERVER_Client * 74 struct GNUNET_SERVER_Client *
75 client, 75 client,
76 const struct 76 const struct GNUNET_MessageHeader
77 GNUNET_MessageHeader * message); 77 * message);
78 78
79 79
80 80
@@ -173,10 +173,9 @@ void GNUNET_SERVER_destroy (struct GNUNET_SERVER_Handle *s);
173 * the handlers array must exist until removed 173 * the handlers array must exist until removed
174 * (or server is destroyed). 174 * (or server is destroyed).
175 */ 175 */
176void 176void GNUNET_SERVER_add_handlers (struct GNUNET_SERVER_Handle *server,
177GNUNET_SERVER_add_handlers (struct GNUNET_SERVER_Handle *server, 177 const struct GNUNET_SERVER_MessageHandler
178 const struct GNUNET_SERVER_MessageHandler 178 *handlers);
179 *handlers);
180 179
181 180
182/** 181/**
@@ -222,8 +221,8 @@ void GNUNET_SERVER_client_persist_ (struct GNUNET_SERVER_Client *client);
222 * GNUNET_SYSERR to close the connection (signal 221 * GNUNET_SYSERR to close the connection (signal
223 * serious error) 222 * serious error)
224 */ 223 */
225void 224void GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client,
226GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client, int success); 225 int success);
227 226
228 227
229/** 228/**
@@ -234,9 +233,8 @@ GNUNET_SERVER_receive_done (struct GNUNET_SERVER_Client *client, int success);
234 * @param client the client to update 233 * @param client the client to update
235 * @param timeout new timeout for activities on the socket 234 * @param timeout new timeout for activities on the socket
236 */ 235 */
237void 236void GNUNET_SERVER_client_set_timeout (struct GNUNET_SERVER_Client *client,
238GNUNET_SERVER_client_set_timeout (struct GNUNET_SERVER_Client *client, 237 struct GNUNET_TIME_Relative timeout);
239 struct GNUNET_TIME_Relative timeout);
240 238
241 239
242/** 240/**
@@ -246,9 +244,8 @@ GNUNET_SERVER_client_set_timeout (struct GNUNET_SERVER_Client *client,
246 * 244 *
247 * @param client client for which to disable the warning 245 * @param client client for which to disable the warning
248 */ 246 */
249void 247void GNUNET_SERVER_disable_receive_done_warning (struct GNUNET_SERVER_Client
250GNUNET_SERVER_disable_receive_done_warning (struct GNUNET_SERVER_Client 248 *client);
251 *client);
252 249
253 250
254/** 251/**
@@ -266,10 +263,9 @@ GNUNET_SERVER_disable_receive_done_warning (struct GNUNET_SERVER_Client
266 * GNUNET_SYSERR if the connection to the 263 * GNUNET_SYSERR if the connection to the
267 * client should be shut down 264 * client should be shut down
268 */ 265 */
269int 266int GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server,
270GNUNET_SERVER_inject (struct GNUNET_SERVER_Handle *server, 267 struct GNUNET_SERVER_Client *sender,
271 struct GNUNET_SERVER_Client *sender, 268 const struct GNUNET_MessageHeader *message);
272 const struct GNUNET_MessageHeader *message);
273 269
274 270
275/** 271/**
@@ -334,8 +330,8 @@ int GNUNET_SERVER_client_get_address (struct GNUNET_SERVER_Client *client,
334 * for the last call when the server is destroyed 330 * for the last call when the server is destroyed
335 */ 331 */
336typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls, 332typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls,
337 struct GNUNET_SERVER_Client 333 struct GNUNET_SERVER_Client *
338 * client); 334 client);
339 335
340 336
341/** 337/**
@@ -353,8 +349,8 @@ typedef void (*GNUNET_SERVER_DisconnectCallback) (void *cls,
353 * @param callback_cls closure for callback 349 * @param callback_cls closure for callback
354 */ 350 */
355void GNUNET_SERVER_disconnect_notify (struct GNUNET_SERVER_Handle *server, 351void GNUNET_SERVER_disconnect_notify (struct GNUNET_SERVER_Handle *server,
356 GNUNET_SERVER_DisconnectCallback 352 GNUNET_SERVER_DisconnectCallback callback,
357 callback, void *callback_cls); 353 void *callback_cls);
358 354
359 355
360/** 356/**
@@ -392,8 +388,8 @@ void GNUNET_SERVER_client_disconnect (struct GNUNET_SERVER_Client *client);
392 * @param h server handle 388 * @param h server handle
393 * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default 389 * @param do_ignore GNUNET_YES to ignore, GNUNET_NO to restore default
394 */ 390 */
395void 391void GNUNET_SERVER_ignore_shutdown (struct GNUNET_SERVER_Handle *h,
396GNUNET_SERVER_ignore_shutdown (struct GNUNET_SERVER_Handle *h, int do_ignore); 392 int do_ignore);
397 393
398 394
399 395
@@ -438,10 +434,10 @@ struct GNUNET_SERVER_TransmitContext
438 * @param length length of data 434 * @param length length of data
439 * @param type type of the message 435 * @param type type of the message
440 */ 436 */
441void 437void GNUNET_SERVER_transmit_context_append_data (struct
442GNUNET_SERVER_transmit_context_append_data (struct GNUNET_SERVER_TransmitContext 438 GNUNET_SERVER_TransmitContext
443 *tc, const void *data, 439 *tc, const void *data,
444 size_t length, uint16_t type); 440 size_t length, uint16_t type);
445 441
446 442
447/** 443/**
@@ -452,12 +448,11 @@ GNUNET_SERVER_transmit_context_append_data (struct GNUNET_SERVER_TransmitContext
452 * @param tc context to use 448 * @param tc context to use
453 * @param msg message to append 449 * @param msg message to append
454 */ 450 */
455void 451void GNUNET_SERVER_transmit_context_append_message (struct
456GNUNET_SERVER_transmit_context_append_message (struct 452 GNUNET_SERVER_TransmitContext
457 GNUNET_SERVER_TransmitContext 453 *tc,
458 *tc, 454 const struct
459 const struct GNUNET_MessageHeader 455 GNUNET_MessageHeader *msg);
460 *msg);
461 456
462 457
463/** 458/**
@@ -469,9 +464,9 @@ GNUNET_SERVER_transmit_context_append_message (struct
469 * @param tc transmission context to use 464 * @param tc transmission context to use
470 * @param timeout when to time out and abort the transmission 465 * @param timeout when to time out and abort the transmission
471 */ 466 */
472void 467void GNUNET_SERVER_transmit_context_run (struct GNUNET_SERVER_TransmitContext
473GNUNET_SERVER_transmit_context_run (struct GNUNET_SERVER_TransmitContext *tc, 468 *tc,
474 struct GNUNET_TIME_Relative timeout); 469 struct GNUNET_TIME_Relative timeout);
475 470
476 471
477 472
@@ -506,10 +501,9 @@ struct GNUNET_SERVER_NotificationContext
506 * 501 *
507 * @param nc context to destroy. 502 * @param nc context to destroy.
508 */ 503 */
509void 504void GNUNET_SERVER_notification_context_destroy (struct
510GNUNET_SERVER_notification_context_destroy (struct 505 GNUNET_SERVER_NotificationContext
511 GNUNET_SERVER_NotificationContext 506 *nc);
512 *nc);
513 507
514 508
515/** 509/**
@@ -518,10 +512,11 @@ GNUNET_SERVER_notification_context_destroy (struct
518 * @param nc context to modify 512 * @param nc context to modify
519 * @param client client to add 513 * @param client client to add
520 */ 514 */
521void 515void GNUNET_SERVER_notification_context_add (struct
522GNUNET_SERVER_notification_context_add (struct GNUNET_SERVER_NotificationContext 516 GNUNET_SERVER_NotificationContext
523 *nc, 517 *nc,
524 struct GNUNET_SERVER_Client *client); 518 struct GNUNET_SERVER_Client
519 *client);
525 520
526 521
527/** 522/**
@@ -533,13 +528,14 @@ GNUNET_SERVER_notification_context_add (struct GNUNET_SERVER_NotificationContext
533 * @param msg message to send 528 * @param msg message to send
534 * @param can_drop can this message be dropped due to queue length limitations 529 * @param can_drop can this message be dropped due to queue length limitations
535 */ 530 */
536void 531void GNUNET_SERVER_notification_context_unicast (struct
537GNUNET_SERVER_notification_context_unicast (struct 532 GNUNET_SERVER_NotificationContext
538 GNUNET_SERVER_NotificationContext 533 *nc,
539 *nc, 534 struct GNUNET_SERVER_Client
540 struct GNUNET_SERVER_Client *client, 535 *client,
541 const struct GNUNET_MessageHeader 536 const struct
542 *msg, int can_drop); 537 GNUNET_MessageHeader *msg,
538 int can_drop);
543 539
544 540
545/** 541/**
@@ -549,12 +545,12 @@ GNUNET_SERVER_notification_context_unicast (struct
549 * @param msg message to send 545 * @param msg message to send
550 * @param can_drop can this message be dropped due to queue length limitations 546 * @param can_drop can this message be dropped due to queue length limitations
551 */ 547 */
552void 548void GNUNET_SERVER_notification_context_broadcast (struct
553GNUNET_SERVER_notification_context_broadcast (struct 549 GNUNET_SERVER_NotificationContext
554 GNUNET_SERVER_NotificationContext 550 *nc,
555 *nc, 551 const struct
556 const struct GNUNET_MessageHeader 552 GNUNET_MessageHeader *msg,
557 *msg, int can_drop); 553 int can_drop);
558 554
559 555
560 556
@@ -571,8 +567,7 @@ struct GNUNET_SERVER_MessageStreamTokenizer;
571 * @param client identification of the client 567 * @param client identification of the client
572 * @param message the actual message 568 * @param message the actual message
573 */ 569 */
574typedef void (*GNUNET_SERVER_MessageTokenizerCallback) (void *cls, 570typedef void (*GNUNET_SERVER_MessageTokenizerCallback) (void *cls, void *client,
575 void *client,
576 const struct 571 const struct
577 GNUNET_MessageHeader * 572 GNUNET_MessageHeader *
578 message); 573 message);
@@ -606,11 +601,9 @@ struct GNUNET_SERVER_MessageStreamTokenizer
606 * GNUNET_NO if one_shot was set and we have another message ready 601 * GNUNET_NO if one_shot was set and we have another message ready
607 * GNUNET_SYSERR if the data stream is corrupt 602 * GNUNET_SYSERR if the data stream is corrupt
608 */ 603 */
609int 604int GNUNET_SERVER_mst_receive (struct GNUNET_SERVER_MessageStreamTokenizer *mst,
610GNUNET_SERVER_mst_receive (struct GNUNET_SERVER_MessageStreamTokenizer *mst, 605 void *client_identity, const char *buf,
611 void *client_identity, 606 size_t size, int purge, int one_shot);
612 const char *buf,
613 size_t size, int purge, int one_shot);
614 607
615 608
616/** 609/**
@@ -618,8 +611,8 @@ GNUNET_SERVER_mst_receive (struct GNUNET_SERVER_MessageStreamTokenizer *mst,
618 * 611 *
619 * @param mst tokenizer to destroy 612 * @param mst tokenizer to destroy
620 */ 613 */
621void 614void GNUNET_SERVER_mst_destroy (struct GNUNET_SERVER_MessageStreamTokenizer
622GNUNET_SERVER_mst_destroy (struct GNUNET_SERVER_MessageStreamTokenizer *mst); 615 *mst);
623 616
624 617
625#if 0 /* keep Emacsens' auto-indent happy */ 618#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_service_lib.h b/src/include/gnunet_service_lib.h
index fca2ff329..79453cbf6 100644
--- a/src/include/gnunet_service_lib.h
+++ b/src/include/gnunet_service_lib.h
@@ -59,11 +59,11 @@ extern "C"
59 * zero (in this case, '*addrs' and '*addr_lens' will be 59 * zero (in this case, '*addrs' and '*addr_lens' will be
60 * set to NULL). 60 * set to NULL).
61 */ 61 */
62int 62int GNUNET_SERVICE_get_server_addresses (const char *serviceName,
63GNUNET_SERVICE_get_server_addresses (const char *serviceName, 63 const struct
64 const struct GNUNET_CONFIGURATION_Handle 64 GNUNET_CONFIGURATION_Handle *cfg,
65 *cfg, struct sockaddr ***addrs, 65 struct sockaddr ***addrs,
66 socklen_t ** addr_lens); 66 socklen_t ** addr_lens);
67 67
68 68
69/** 69/**
@@ -111,12 +111,9 @@ enum GNUNET_SERVICE_Options
111 * @return GNUNET_SYSERR on error, GNUNET_OK 111 * @return GNUNET_SYSERR on error, GNUNET_OK
112 * if we shutdown nicely 112 * if we shutdown nicely
113 */ 113 */
114int 114int GNUNET_SERVICE_run (int argc, char *const *argv, const char *serviceName,
115GNUNET_SERVICE_run (int argc, 115 enum GNUNET_SERVICE_Options opt,
116 char *const *argv, 116 GNUNET_SERVICE_Main task, void *task_cls);
117 const char *serviceName,
118 enum GNUNET_SERVICE_Options opt,
119 GNUNET_SERVICE_Main task, void *task_cls);
120 117
121 118
122struct GNUNET_SERVICE_Context; 119struct GNUNET_SERVICE_Context;
diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h
index 1807d3de0..90cc612df 100644
--- a/src/include/gnunet_statistics_service.h
+++ b/src/include/gnunet_statistics_service.h
@@ -61,10 +61,9 @@ struct GNUNET_STATISTICS_Handle;
61 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not 61 * @param is_persistent GNUNET_YES if the value is persistent, GNUNET_NO if not
62 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration 62 * @return GNUNET_OK to continue, GNUNET_SYSERR to abort iteration
63 */ 63 */
64typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, 64typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, const char *subsystem,
65 const char *subsystem, 65 const char *name, uint64_t value,
66 const char *name, 66 int is_persistent);
67 uint64_t value, int is_persistent);
68 67
69/** 68/**
70 * Get handle for the statistics service. 69 * Get handle for the statistics service.
@@ -73,9 +72,11 @@ typedef int (*GNUNET_STATISTICS_Iterator) (void *cls,
73 * @param cfg services configuration in use 72 * @param cfg services configuration in use
74 * @return handle to use 73 * @return handle to use
75 */ 74 */
76struct GNUNET_STATISTICS_Handle 75struct GNUNET_STATISTICS_Handle *GNUNET_STATISTICS_create (const char
77 *GNUNET_STATISTICS_create (const char *subsystem, 76 *subsystem,
78 const struct GNUNET_CONFIGURATION_Handle *cfg); 77 const struct
78 GNUNET_CONFIGURATION_Handle
79 *cfg);
79 80
80 81
81/** 82/**
@@ -102,11 +103,9 @@ void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h,
102 * @param proc_cls closure for proc 103 * @param proc_cls closure for proc
103 * @return GNUNET_OK on success, GNUNET_SYSERR on error 104 * @return GNUNET_OK on success, GNUNET_SYSERR on error
104 */ 105 */
105int 106int GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle,
106GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle, 107 const char *subsystem, const char *name,
107 const char *subsystem, 108 GNUNET_STATISTICS_Iterator proc, void *proc_cls);
108 const char *name,
109 GNUNET_STATISTICS_Iterator proc, void *proc_cls);
110 109
111 110
112/** 111/**
@@ -169,9 +168,9 @@ void GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh);
169 * @param value new value to set 168 * @param value new value to set
170 * @param make_persistent should the value be kept across restarts? 169 * @param make_persistent should the value be kept across restarts?
171 */ 170 */
172void 171void GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle,
173GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, 172 const char *name, uint64_t value,
174 const char *name, uint64_t value, int make_persistent); 173 int make_persistent);
175 174
176/** 175/**
177 * Set statistic value for the peer. Will always use our 176 * Set statistic value for the peer. Will always use our
@@ -182,9 +181,9 @@ GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle,
182 * @param delta change in value (added to existing value) 181 * @param delta change in value (added to existing value)
183 * @param make_persistent should the value be kept across restarts? 182 * @param make_persistent should the value be kept across restarts?
184 */ 183 */
185void 184void GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle,
186GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle, 185 const char *name, int64_t delta,
187 const char *name, int64_t delta, int make_persistent); 186 int make_persistent);
188 187
189 188
190 189
diff --git a/src/include/gnunet_strings_lib.h b/src/include/gnunet_strings_lib.h
index 3e15a24c8..dd78aee35 100644
--- a/src/include/gnunet_strings_lib.h
+++ b/src/include/gnunet_strings_lib.h
@@ -69,8 +69,8 @@ char *GNUNET_STRINGS_byte_size_fancy (unsigned long long size);
69 * @param charset character set to convert from 69 * @param charset character set to convert from
70 * @return the converted string (0-terminated) 70 * @return the converted string (0-terminated)
71 */ 71 */
72char *GNUNET_STRINGS_to_utf8 (const char *input, 72char *GNUNET_STRINGS_to_utf8 (const char *input, size_t len,
73 size_t len, const char *charset); 73 const char *charset);
74 74
75 75
76/** 76/**
@@ -104,8 +104,8 @@ char *GNUNET_STRINGS_filename_expand (const char *fil);
104 * @return number of bytes written to the buffer 104 * @return number of bytes written to the buffer
105 * (or number of bytes that would have been written) 105 * (or number of bytes that would have been written)
106 */ 106 */
107size_t GNUNET_STRINGS_buffer_fill (char *buffer, 107size_t GNUNET_STRINGS_buffer_fill (char *buffer, size_t size,
108 size_t size, unsigned int count, ...); 108 unsigned int count, ...);
109 109
110 110
111/** 111/**
@@ -122,8 +122,7 @@ size_t GNUNET_STRINGS_buffer_fill (char *buffer,
122 * @return offset of the character after the last 0-termination 122 * @return offset of the character after the last 0-termination
123 * in the buffer, or 0 on error. 123 * in the buffer, or 0 on error.
124 */ 124 */
125unsigned int GNUNET_STRINGS_buffer_tokenize (const char *buffer, 125unsigned int GNUNET_STRINGS_buffer_tokenize (const char *buffer, size_t size,
126 size_t size,
127 unsigned int count, ...); 126 unsigned int count, ...);
128 127
129 128
diff --git a/src/include/gnunet_testing_lib.h b/src/include/gnunet_testing_lib.h
index 1111f576c..cd673a082 100644
--- a/src/include/gnunet_testing_lib.h
+++ b/src/include/gnunet_testing_lib.h
@@ -490,8 +490,8 @@ struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_start (const struct
490 * 490 *
491 * @param daemon the daemon to finish starting 491 * @param daemon the daemon to finish starting
492 */ 492 */
493void 493void GNUNET_TESTING_daemon_continue_startup (struct GNUNET_TESTING_Daemon
494GNUNET_TESTING_daemon_continue_startup (struct GNUNET_TESTING_Daemon *daemon); 494 *daemon);
495 495
496/** 496/**
497 * Check whether the given daemon is running. 497 * Check whether the given daemon is running.
@@ -510,10 +510,9 @@ int GNUNET_TESTING_daemon_running (struct GNUNET_TESTING_Daemon *daemon);
510 * @param cb function called once the daemon is (re)started 510 * @param cb function called once the daemon is (re)started
511 * @param cb_cls closure for cb 511 * @param cb_cls closure for cb
512 */ 512 */
513void 513void GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d,
514GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d, 514 GNUNET_TESTING_NotifyDaemonRunning cb,
515 GNUNET_TESTING_NotifyDaemonRunning cb, 515 void *cb_cls);
516 void *cb_cls);
517 516
518/** 517/**
519 * Start a peer that has previously been stopped using the daemon_stop 518 * Start a peer that has previously been stopped using the daemon_stop
@@ -524,11 +523,10 @@ GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d,
524 * @param cb the callback for notification when the peer is running 523 * @param cb the callback for notification when the peer is running
525 * @param cb_cls closure for the callback 524 * @param cb_cls closure for the callback
526 */ 525 */
527void 526void GNUNET_TESTING_daemon_start_stopped (struct GNUNET_TESTING_Daemon *daemon,
528GNUNET_TESTING_daemon_start_stopped (struct GNUNET_TESTING_Daemon *daemon, 527 struct GNUNET_TIME_Relative timeout,
529 struct GNUNET_TIME_Relative timeout, 528 GNUNET_TESTING_NotifyDaemonRunning cb,
530 GNUNET_TESTING_NotifyDaemonRunning cb, 529 void *cb_cls);
531 void *cb_cls);
532 530
533/** 531/**
534 * Starts a GNUnet daemon's service. 532 * Starts a GNUnet daemon's service.
@@ -539,12 +537,11 @@ GNUNET_TESTING_daemon_start_stopped (struct GNUNET_TESTING_Daemon *daemon,
539 * @param cb function called once gnunet-arm returns 537 * @param cb function called once gnunet-arm returns
540 * @param cb_cls closure for cb 538 * @param cb_cls closure for cb
541 */ 539 */
542void 540void GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
543GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d, 541 char *service,
544 char *service, 542 struct GNUNET_TIME_Relative timeout,
545 struct GNUNET_TIME_Relative timeout, 543 GNUNET_TESTING_NotifyDaemonRunning cb,
546 GNUNET_TESTING_NotifyDaemonRunning cb, 544 void *cb_cls);
547 void *cb_cls);
548 545
549/** 546/**
550 * Starts a GNUnet daemon's service which has been previously turned off. 547 * Starts a GNUnet daemon's service which has been previously turned off.
@@ -555,13 +552,12 @@ GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
555 * @param cb function called once gnunet-arm returns 552 * @param cb function called once gnunet-arm returns
556 * @param cb_cls closure for cb 553 * @param cb_cls closure for cb
557 */ 554 */
558void 555void GNUNET_TESTING_daemon_start_stopped_service (struct GNUNET_TESTING_Daemon
559GNUNET_TESTING_daemon_start_stopped_service (struct GNUNET_TESTING_Daemon *d, 556 *d, char *service,
560 char *service, 557 struct GNUNET_TIME_Relative
561 struct GNUNET_TIME_Relative 558 timeout,
562 timeout, 559 GNUNET_TESTING_NotifyDaemonRunning
563 GNUNET_TESTING_NotifyDaemonRunning 560 cb, void *cb_cls);
564 cb, void *cb_cls);
565 561
566/** 562/**
567 * Get a certain testing daemon handle. 563 * Get a certain testing daemon handle.
@@ -603,11 +599,11 @@ struct GNUNET_TESTING_Daemon *GNUNET_TESTING_daemon_get_by_id (struct
603 * @param allow_restart GNUNET_YES to restart peer later (using this API) 599 * @param allow_restart GNUNET_YES to restart peer later (using this API)
604 * GNUNET_NO to kill off and clean up for good 600 * GNUNET_NO to kill off and clean up for good
605 */ 601 */
606void 602void GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
607GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d, 603 struct GNUNET_TIME_Relative timeout,
608 struct GNUNET_TIME_Relative timeout, 604 GNUNET_TESTING_NotifyCompletion cb,
609 GNUNET_TESTING_NotifyCompletion cb, void *cb_cls, 605 void *cb_cls, int delete_files,
610 int delete_files, int allow_restart); 606 int allow_restart);
611 607
612 608
613/** 609/**
@@ -635,12 +631,11 @@ void GNUNET_TESTING_daemon_reconfigure (struct GNUNET_TESTING_Daemon *d,
635 * @param cb function called once the service was stopped 631 * @param cb function called once the service was stopped
636 * @param cb_cls closure for cb 632 * @param cb_cls closure for cb
637 */ 633 */
638void 634void GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d,
639GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d, 635 char *service,
640 char *service, 636 struct GNUNET_TIME_Relative timeout,
641 struct GNUNET_TIME_Relative timeout, 637 GNUNET_TESTING_NotifyCompletion cb,
642 GNUNET_TESTING_NotifyCompletion cb, 638 void *cb_cls);
643 void *cb_cls);
644 639
645/** 640/**
646 * Read a testing hosts file based on a configuration. 641 * Read a testing hosts file based on a configuration.
@@ -715,8 +710,8 @@ struct GNUNET_TESTING_PeerGroup *GNUNET_TESTING_daemons_start (const struct
715 * 710 *
716 * @param pg the peer group to continue starting 711 * @param pg the peer group to continue starting
717 */ 712 */
718void 713void GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup
719GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup *pg); 714 *pg);
720 715
721 716
722/** 717/**
@@ -733,14 +728,13 @@ GNUNET_TESTING_daemons_continue_startup (struct GNUNET_TESTING_PeerGroup *pg);
733 * @param cb function to call at the end 728 * @param cb function to call at the end
734 * @param cb_cls closure for cb 729 * @param cb_cls closure for cb
735 */ 730 */
736void 731void GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
737GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1, 732 struct GNUNET_TESTING_Daemon *d2,
738 struct GNUNET_TESTING_Daemon *d2, 733 struct GNUNET_TIME_Relative timeout,
739 struct GNUNET_TIME_Relative timeout, 734 unsigned int max_connect_attempts,
740 unsigned int max_connect_attempts, 735 int send_hello,
741 int send_hello, 736 GNUNET_TESTING_NotifyConnection cb,
742 GNUNET_TESTING_NotifyConnection cb, 737 void *cb_cls);
743 void *cb_cls);
744 738
745 739
746/** 740/**
@@ -750,10 +744,9 @@ GNUNET_TESTING_daemons_connect (struct GNUNET_TESTING_Daemon *d1,
750 * @param callback function to call on completion (or failure) 744 * @param callback function to call on completion (or failure)
751 * @param callback_cls closure for the callback function 745 * @param callback_cls closure for the callback function
752 */ 746 */
753void 747void GNUNET_TESTING_daemons_restart (struct GNUNET_TESTING_PeerGroup *pg,
754GNUNET_TESTING_daemons_restart (struct GNUNET_TESTING_PeerGroup *pg, 748 GNUNET_TESTING_NotifyCompletion callback,
755 GNUNET_TESTING_NotifyCompletion callback, 749 void *callback_cls);
756 void *callback_cls);
757 750
758 751
759/** 752/**
@@ -764,10 +757,10 @@ GNUNET_TESTING_daemons_restart (struct GNUNET_TESTING_PeerGroup *pg,
764 * @param cb callback to notify upon success or failure 757 * @param cb callback to notify upon success or failure
765 * @param cb_cls closure for cb 758 * @param cb_cls closure for cb
766 */ 759 */
767void 760void GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg,
768GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg, 761 struct GNUNET_TIME_Relative timeout,
769 struct GNUNET_TIME_Relative timeout, 762 GNUNET_TESTING_NotifyCompletion cb,
770 GNUNET_TESTING_NotifyCompletion cb, void *cb_cls); 763 void *cb_cls);
771 764
772 765
773/** 766/**
@@ -777,8 +770,8 @@ GNUNET_TESTING_daemons_stop (struct GNUNET_TESTING_PeerGroup *pg,
777 * 770 *
778 * @return the number of currently running peers in the peer group 771 * @return the number of currently running peers in the peer group
779 */ 772 */
780unsigned int 773unsigned int GNUNET_TESTING_daemons_running (struct GNUNET_TESTING_PeerGroup
781GNUNET_TESTING_daemons_running (struct GNUNET_TESTING_PeerGroup *pg); 774 *pg);
782 775
783/** 776/**
784 * Simulate churn by stopping some peers (and possibly 777 * Simulate churn by stopping some peers (and possibly
@@ -803,13 +796,12 @@ GNUNET_TESTING_daemons_running (struct GNUNET_TESTING_PeerGroup *pg);
803 * @param cb function to call at the end 796 * @param cb function to call at the end
804 * @param cb_cls closure for cb 797 * @param cb_cls closure for cb
805 */ 798 */
806void 799void GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg,
807GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg, 800 char *service, unsigned int voff,
808 char *service, 801 unsigned int von,
809 unsigned int voff, 802 struct GNUNET_TIME_Relative timeout,
810 unsigned int von, 803 GNUNET_TESTING_NotifyCompletion cb,
811 struct GNUNET_TIME_Relative timeout, 804 void *cb_cls);
812 GNUNET_TESTING_NotifyCompletion cb, void *cb_cls);
813/* 805/*
814 * Start a given service for each of the peers in the peer group. 806 * Start a given service for each of the peers in the peer group.
815 * 807 *
@@ -821,12 +813,11 @@ GNUNET_TESTING_daemons_churn (struct GNUNET_TESTING_PeerGroup *pg,
821 * @param cb_cls closure for cb 813 * @param cb_cls closure for cb
822 * 814 *
823 */ 815 */
824void 816void GNUNET_TESTING_daemons_start_service (struct GNUNET_TESTING_PeerGroup *pg,
825GNUNET_TESTING_daemons_start_service (struct GNUNET_TESTING_PeerGroup *pg, 817 char *service,
826 char *service, 818 struct GNUNET_TIME_Relative timeout,
827 struct GNUNET_TIME_Relative timeout, 819 GNUNET_TESTING_NotifyCompletion cb,
828 GNUNET_TESTING_NotifyCompletion cb, 820 void *cb_cls);
829 void *cb_cls);
830 821
831/** 822/**
832 * Callback function to process statistic values. 823 * Callback function to process statistic values.
@@ -856,11 +847,10 @@ typedef int (*GNUNET_TESTING_STATISTICS_Iterator) (void *cls,
856 * @param proc processing function for each statistic retrieved 847 * @param proc processing function for each statistic retrieved
857 * @param cls closure to pass to proc 848 * @param cls closure to pass to proc
858 */ 849 */
859void 850void GNUNET_TESTING_get_statistics (struct GNUNET_TESTING_PeerGroup *pg,
860GNUNET_TESTING_get_statistics (struct GNUNET_TESTING_PeerGroup *pg, 851 GNUNET_STATISTICS_Callback cont,
861 GNUNET_STATISTICS_Callback cont, 852 GNUNET_TESTING_STATISTICS_Iterator proc,
862 GNUNET_TESTING_STATISTICS_Iterator proc, 853 void *cls);
863 void *cls);
864 854
865/** 855/**
866 * Topologies supported for testbeds. 856 * Topologies supported for testbeds.
@@ -975,9 +965,8 @@ enum GNUNET_TESTING_TopologyOption
975 * @return GNUNET_YES if topology string matched a 965 * @return GNUNET_YES if topology string matched a
976 * known topology, GNUNET_NO if not 966 * known topology, GNUNET_NO if not
977 */ 967 */
978int 968int GNUNET_TESTING_topology_get (enum GNUNET_TESTING_Topology *topology,
979GNUNET_TESTING_topology_get (enum GNUNET_TESTING_Topology *topology, 969 const char *topology_string);
980 const char *topology_string);
981 970
982/** 971/**
983 * Get connect topology option from string input. 972 * Get connect topology option from string input.
@@ -988,10 +977,9 @@ GNUNET_TESTING_topology_get (enum GNUNET_TESTING_Topology *topology,
988 * @return GNUNET_YES if topology string matched a 977 * @return GNUNET_YES if topology string matched a
989 * known topology, GNUNET_NO if not 978 * known topology, GNUNET_NO if not
990 */ 979 */
991int 980int GNUNET_TESTING_topology_option_get (enum GNUNET_TESTING_TopologyOption
992GNUNET_TESTING_topology_option_get (enum GNUNET_TESTING_TopologyOption 981 *topology_option,
993 *topology_option, 982 const char *topology_string);
994 const char *topology_string);
995 983
996 984
997/** 985/**
@@ -1030,11 +1018,13 @@ GNUNET_TESTING_topology_option_get (enum GNUNET_TESTING_TopologyOption
1030 * @return the maximum number of connections were all allowed peers 1018 * @return the maximum number of connections were all allowed peers
1031 * connected to each other 1019 * connected to each other
1032 */ 1020 */
1033unsigned int 1021unsigned int GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup
1034GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg, 1022 *pg,
1035 enum GNUNET_TESTING_Topology topology, 1023 enum GNUNET_TESTING_Topology
1036 enum GNUNET_TESTING_Topology restrict_topology, 1024 topology,
1037 const char *restrict_transports); 1025 enum GNUNET_TESTING_Topology
1026 restrict_topology,
1027 const char *restrict_transports);
1038 1028
1039/** 1029/**
1040 * Iterate over all (running) peers in the peer group, retrieve 1030 * Iterate over all (running) peers in the peer group, retrieve
@@ -1044,9 +1034,8 @@ GNUNET_TESTING_create_topology (struct GNUNET_TESTING_PeerGroup *pg,
1044 * @param cb callback for topology information 1034 * @param cb callback for topology information
1045 * @param cls closure for callback 1035 * @param cls closure for callback
1046 */ 1036 */
1047void 1037void GNUNET_TESTING_get_topology (struct GNUNET_TESTING_PeerGroup *pg,
1048GNUNET_TESTING_get_topology (struct GNUNET_TESTING_PeerGroup *pg, 1038 GNUNET_TESTING_NotifyTopology cb, void *cls);
1049 GNUNET_TESTING_NotifyTopology cb, void *cls);
1050 1039
1051/** 1040/**
1052 * Stop the connection process temporarily. 1041 * Stop the connection process temporarily.
@@ -1084,15 +1073,15 @@ void GNUNET_TESTING_resume_connections (struct GNUNET_TESTING_PeerGroup *pg);
1084 * 1073 *
1085 * @return the number of connections that will be attempted, GNUNET_SYSERR on error 1074 * @return the number of connections that will be attempted, GNUNET_SYSERR on error
1086 */ 1075 */
1087int 1076int GNUNET_TESTING_connect_topology (struct GNUNET_TESTING_PeerGroup *pg,
1088GNUNET_TESTING_connect_topology (struct GNUNET_TESTING_PeerGroup *pg, 1077 enum GNUNET_TESTING_Topology topology,
1089 enum GNUNET_TESTING_Topology topology, 1078 enum GNUNET_TESTING_TopologyOption options,
1090 enum GNUNET_TESTING_TopologyOption options, 1079 double option_modifier,
1091 double option_modifier, 1080 struct GNUNET_TIME_Relative
1092 struct GNUNET_TIME_Relative connect_timeout, 1081 connect_timeout,
1093 unsigned int connect_attempts, 1082 unsigned int connect_attempts,
1094 GNUNET_TESTING_NotifyCompletion 1083 GNUNET_TESTING_NotifyCompletion
1095 notify_callback, void *notify_cls); 1084 notify_callback, void *notify_cls);
1096 1085
1097/** 1086/**
1098 * Start or stop an individual peer from the given group. 1087 * Start or stop an individual peer from the given group.
@@ -1104,12 +1093,11 @@ GNUNET_TESTING_connect_topology (struct GNUNET_TESTING_PeerGroup *pg,
1104 * @param cb function to call at the end 1093 * @param cb function to call at the end
1105 * @param cb_cls closure for cb 1094 * @param cb_cls closure for cb
1106 */ 1095 */
1107void 1096void GNUNET_TESTING_daemons_vary (struct GNUNET_TESTING_PeerGroup *pg,
1108GNUNET_TESTING_daemons_vary (struct GNUNET_TESTING_PeerGroup *pg, 1097 unsigned int offset, int desired_status,
1109 unsigned int offset, 1098 struct GNUNET_TIME_Relative timeout,
1110 int desired_status, 1099 GNUNET_TESTING_NotifyCompletion cb,
1111 struct GNUNET_TIME_Relative timeout, 1100 void *cb_cls);
1112 GNUNET_TESTING_NotifyCompletion cb, void *cb_cls);
1113 1101
1114/** 1102/**
1115 * Start a peer group with a given number of peers. Notify 1103 * Start a peer group with a given number of peers. Notify
@@ -1155,11 +1143,11 @@ struct GNUNET_TESTING_PeerGroup *GNUNET_TESTING_peergroup_start (const struct
1155 * @param notify_cb_cls closure for notify_cb 1143 * @param notify_cb_cls closure for notify_cb
1156 * 1144 *
1157 */ 1145 */
1158void 1146void GNUNET_TESTING_peergroup_topology_to_file (struct GNUNET_TESTING_PeerGroup
1159GNUNET_TESTING_peergroup_topology_to_file (struct GNUNET_TESTING_PeerGroup *pg, 1147 *pg,
1160 const char *output_filename, 1148 const char *output_filename,
1161 GNUNET_TESTING_NotifyCompletion 1149 GNUNET_TESTING_NotifyCompletion
1162 notify_cb, void *notify_cb_cls); 1150 notify_cb, void *notify_cb_cls);
1163 1151
1164 1152
1165#if 0 /* keep Emacsens' auto-indent happy */ 1153#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/include/gnunet_time_lib.h b/src/include/gnunet_time_lib.h
index be35ff131..ffae1ce51 100644
--- a/src/include/gnunet_time_lib.h
+++ b/src/include/gnunet_time_lib.h
@@ -199,8 +199,7 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_relative_to_absolute (struct
199 * @return timestamp that is smaller 199 * @return timestamp that is smaller
200 */ 200 */
201struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct 201struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct
202 GNUNET_TIME_Relative 202 GNUNET_TIME_Relative t1,
203 t1,
204 struct 203 struct
205 GNUNET_TIME_Relative t2); 204 GNUNET_TIME_Relative t2);
206 205
@@ -213,8 +212,7 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_min (struct
213 * @return timestamp that is larger 212 * @return timestamp that is larger
214 */ 213 */
215struct GNUNET_TIME_Relative GNUNET_TIME_relative_max (struct 214struct GNUNET_TIME_Relative GNUNET_TIME_relative_max (struct
216 GNUNET_TIME_Relative 215 GNUNET_TIME_Relative t1,
217 t1,
218 struct 216 struct
219 GNUNET_TIME_Relative t2); 217 GNUNET_TIME_Relative t2);
220 218
@@ -226,8 +224,7 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_max (struct
226 * @return timestamp that is smaller 224 * @return timestamp that is smaller
227 */ 225 */
228struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct 226struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct
229 GNUNET_TIME_Absolute 227 GNUNET_TIME_Absolute t1,
230 t1,
231 struct 228 struct
232 GNUNET_TIME_Absolute t2); 229 GNUNET_TIME_Absolute t2);
233 230
@@ -239,8 +236,7 @@ struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_min (struct
239 * @return timestamp that is smaller 236 * @return timestamp that is smaller
240 */ 237 */
241struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_max (struct 238struct GNUNET_TIME_Absolute GNUNET_TIME_absolute_max (struct
242 GNUNET_TIME_Absolute 239 GNUNET_TIME_Absolute t1,
243 t1,
244 struct 240 struct
245 GNUNET_TIME_Absolute t2); 241 GNUNET_TIME_Absolute t2);
246 242
@@ -374,9 +370,12 @@ struct GNUNET_TIME_Relative GNUNET_TIME_relative_add (struct
374 * @param a2 second timestamp 370 * @param a2 second timestamp
375 * @return ZERO if a2>=a1 (including both FOREVER), FOREVER if a1 is FOREVER, a1-a2 otherwise 371 * @return ZERO if a2>=a1 (including both FOREVER), FOREVER if a1 is FOREVER, a1-a2 otherwise
376 */ 372 */
377struct GNUNET_TIME_Relative 373struct GNUNET_TIME_Relative GNUNET_TIME_relative_subtract (struct
378GNUNET_TIME_relative_subtract (struct GNUNET_TIME_Relative a1, 374 GNUNET_TIME_Relative
379 struct GNUNET_TIME_Relative a2); 375 a1,
376 struct
377 GNUNET_TIME_Relative
378 a2);
380 379
381 380
382/** 381/**
diff --git a/src/include/gnunet_transport_plugin.h b/src/include/gnunet_transport_plugin.h
index b90f3f1cf..d7ca62219 100644
--- a/src/include/gnunet_transport_plugin.h
+++ b/src/include/gnunet_transport_plugin.h
@@ -138,8 +138,7 @@ typedef struct
138 * the specific address format depends on the transport 138 * the specific address format depends on the transport
139 * @param addrlen length of the address 139 * @param addrlen length of the address
140 */ 140 */
141typedef void (*GNUNET_TRANSPORT_AddressNotification) (void *cls, 141typedef void (*GNUNET_TRANSPORT_AddressNotification) (void *cls, int add_remove,
142 int add_remove,
143 const void *addr, 142 const void *addr,
144 size_t addrlen); 143 size_t addrlen);
145 144
@@ -254,10 +253,10 @@ struct GNUNET_TRANSPORT_PluginEnvironment
254 * disconnect will ALSO be signalled using 253 * disconnect will ALSO be signalled using
255 * the ReceiveCallback. 254 * the ReceiveCallback.
256 */ 255 */
257typedef void 256typedef void (*GNUNET_TRANSPORT_TransmitContinuation) (void *cls,
258 (*GNUNET_TRANSPORT_TransmitContinuation) (void *cls, 257 const struct
259 const struct GNUNET_PeerIdentity * 258 GNUNET_PeerIdentity *
260 target, int result); 259 target, int result);
261 260
262 261
263/** 262/**
@@ -296,20 +295,22 @@ typedef void
296 * -1 on hard errors (i.e. address invalid); 0 is a legal value 295 * -1 on hard errors (i.e. address invalid); 0 is a legal value
297 * and does NOT mean that the message was not transmitted (DV) 296 * and does NOT mean that the message was not transmitted (DV)
298 */ 297 */
299typedef ssize_t 298typedef ssize_t (*GNUNET_TRANSPORT_TransmitFunction) (void *cls,
300 (*GNUNET_TRANSPORT_TransmitFunction) (void *cls, 299 const struct
301 const struct GNUNET_PeerIdentity * 300 GNUNET_PeerIdentity *
302 target, 301 target,
303 const char *msgbuf, 302 const char *msgbuf,
304 size_t msgbuf_size, 303 size_t msgbuf_size,
305 uint32_t priority, 304 uint32_t priority,
306 struct GNUNET_TIME_Relative timeout, 305 struct
307 struct Session * session, 306 GNUNET_TIME_Relative
308 const void *addr, 307 timeout,
309 size_t addrlen, 308 struct Session * session,
310 int force_address, 309 const void *addr,
311 GNUNET_TRANSPORT_TransmitContinuation 310 size_t addrlen,
312 cont, void *cont_cls); 311 int force_address,
312 GNUNET_TRANSPORT_TransmitContinuation
313 cont, void *cont_cls);
313 314
314 315
315/** 316/**
@@ -328,10 +329,10 @@ typedef ssize_t
328 * @param target peer for which the last transmission is 329 * @param target peer for which the last transmission is
329 * to be cancelled 330 * to be cancelled
330 */ 331 */
331typedef void 332typedef void (*GNUNET_TRANSPORT_DisconnectFunction) (void *cls,
332 (*GNUNET_TRANSPORT_DisconnectFunction) (void *cls, 333 const struct
333 const struct GNUNET_PeerIdentity * 334 GNUNET_PeerIdentity *
334 target); 335 target);
335 336
336 337
337/** 338/**
@@ -360,16 +361,16 @@ typedef void (*GNUNET_TRANSPORT_AddressStringCallback) (void *cls,
360 * @param asc function to call on each string 361 * @param asc function to call on each string
361 * @param asc_cls closure for asc 362 * @param asc_cls closure for asc
362 */ 363 */
363typedef void 364typedef void (*GNUNET_TRANSPORT_AddressPrettyPrinter) (void *cls,
364 (*GNUNET_TRANSPORT_AddressPrettyPrinter) (void *cls, 365 const char *type,
365 const char *type, 366 const void *addr,
366 const void *addr, 367 size_t addrlen,
367 size_t addrlen, 368 int numeric,
368 int numeric, 369 struct
369 struct GNUNET_TIME_Relative 370 GNUNET_TIME_Relative
370 timeout, 371 timeout,
371 GNUNET_TRANSPORT_AddressStringCallback 372 GNUNET_TRANSPORT_AddressStringCallback
372 asc, void *asc_cls); 373 asc, void *asc_cls);
373 374
374 375
375/** 376/**
@@ -386,9 +387,8 @@ typedef void
386 * @return GNUNET_OK if this is a plausible address for this peer 387 * @return GNUNET_OK if this is a plausible address for this peer
387 * and transport, GNUNET_SYSERR if not 388 * and transport, GNUNET_SYSERR if not
388 */ 389 */
389typedef int 390typedef int (*GNUNET_TRANSPORT_CheckAddress) (void *cls, const void *addr,
390 (*GNUNET_TRANSPORT_CheckAddress) (void *cls, 391 size_t addrlen);
391 const void *addr, size_t addrlen);
392 392
393 393
394/** 394/**
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index f4cc88e55..7e0656956 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -426,12 +426,12 @@ struct GNUNET_TRANSPORT_Handle;
426 * @param ats performance data 426 * @param ats performance data
427 * @param ats_count number of entries in ats (excluding 0-termination) 427 * @param ats_count number of entries in ats (excluding 0-termination)
428 */ 428 */
429typedef void 429typedef void (*GNUNET_TRANSPORT_NotifyConnect) (void *cls,
430 (*GNUNET_TRANSPORT_NotifyConnect) (void *cls, 430 const struct GNUNET_PeerIdentity
431 const struct GNUNET_PeerIdentity * peer, 431 * peer,
432 const struct 432 const struct
433 GNUNET_TRANSPORT_ATS_Information * ats, 433 GNUNET_TRANSPORT_ATS_Information
434 uint32_t ats_count); 434 * ats, uint32_t ats_count);
435 435
436/** 436/**
437 * Function called to notify transport users that another 437 * Function called to notify transport users that another
@@ -440,10 +440,9 @@ typedef void
440 * @param cls closure 440 * @param cls closure
441 * @param peer the peer that disconnected 441 * @param peer the peer that disconnected
442 */ 442 */
443typedef void 443typedef void (*GNUNET_TRANSPORT_NotifyDisconnect) (void *cls,
444 (*GNUNET_TRANSPORT_NotifyDisconnect) (void *cls, 444 const struct
445 const struct GNUNET_PeerIdentity * 445 GNUNET_PeerIdentity * peer);
446 peer);
447 446
448 447
449/** 448/**
@@ -452,8 +451,8 @@ typedef void
452 * @param cls closure 451 * @param cls closure
453 * @param address NULL on error, otherwise 0-terminated printable UTF-8 string 452 * @param address NULL on error, otherwise 0-terminated printable UTF-8 string
454 */ 453 */
455typedef void 454typedef void (*GNUNET_TRANSPORT_AddressLookUpCallback) (void *cls,
456 (*GNUNET_TRANSPORT_AddressLookUpCallback) (void *cls, const char *address); 455 const char *address);
457 456
458 457
459/** 458/**
@@ -498,9 +497,8 @@ void GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle);
498 * @param handle connection to transport service 497 * @param handle connection to transport service
499 * @param target who we should try to connect to 498 * @param target who we should try to connect to
500 */ 499 */
501void 500void GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle,
502GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle, 501 const struct GNUNET_PeerIdentity *target);
503 const struct GNUNET_PeerIdentity *target);
504 502
505 503
506/** 504/**
@@ -512,11 +510,10 @@ GNUNET_TRANSPORT_try_connect (struct GNUNET_TRANSPORT_Handle *handle,
512 * @param quota_in incoming bandwidth quota 510 * @param quota_in incoming bandwidth quota
513 * @param quota_out outgoing bandwidth quota 511 * @param quota_out outgoing bandwidth quota
514 */ 512 */
515void 513void GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle,
516GNUNET_TRANSPORT_set_quota (struct GNUNET_TRANSPORT_Handle *handle, 514 const struct GNUNET_PeerIdentity *target,
517 const struct GNUNET_PeerIdentity *target, 515 struct GNUNET_BANDWIDTH_Value32NBO quota_in,
518 struct GNUNET_BANDWIDTH_Value32NBO quota_in, 516 struct GNUNET_BANDWIDTH_Value32NBO quota_out);
519 struct GNUNET_BANDWIDTH_Value32NBO quota_out);
520 517
521 518
522/** 519/**
@@ -561,10 +558,9 @@ struct GNUNET_TRANSPORT_TransmitHandle
561 * 558 *
562 * @param th handle of the transmission notification request to cancel 559 * @param th handle of the transmission notification request to cancel
563 */ 560 */
564void 561void GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct
565GNUNET_TRANSPORT_notify_transmit_ready_cancel (struct 562 GNUNET_TRANSPORT_TransmitHandle
566 GNUNET_TRANSPORT_TransmitHandle 563 *th);
567 *th);
568 564
569 565
570 566
@@ -588,10 +584,9 @@ typedef void (*GNUNET_TRANSPORT_HelloUpdateCallback) (void *cls,
588 * @param rec function to call with the HELLO 584 * @param rec function to call with the HELLO
589 * @param rec_cls closure for rec 585 * @param rec_cls closure for rec
590 */ 586 */
591void 587void GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle,
592GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle, 588 GNUNET_TRANSPORT_HelloUpdateCallback rec,
593 GNUNET_TRANSPORT_HelloUpdateCallback rec, 589 void *rec_cls);
594 void *rec_cls);
595 590
596 591
597/** 592/**
@@ -601,10 +596,9 @@ GNUNET_TRANSPORT_get_hello (struct GNUNET_TRANSPORT_Handle *handle,
601 * @param rec function previously registered to be called with the HELLOs 596 * @param rec function previously registered to be called with the HELLOs
602 * @param rec_cls closure for rec 597 * @param rec_cls closure for rec
603 */ 598 */
604void 599void GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle,
605GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle, 600 GNUNET_TRANSPORT_HelloUpdateCallback
606 GNUNET_TRANSPORT_HelloUpdateCallback rec, 601 rec, void *rec_cls);
607 void *rec_cls);
608 602
609 603
610/** 604/**
@@ -618,10 +612,9 @@ GNUNET_TRANSPORT_get_hello_cancel (struct GNUNET_TRANSPORT_Handle *handle,
618 * @param cls closure for continuation 612 * @param cls closure for continuation
619 * 613 *
620 */ 614 */
621void 615void GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
622GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle, 616 const struct GNUNET_MessageHeader *hello,
623 const struct GNUNET_MessageHeader *hello, 617 GNUNET_SCHEDULER_Task cont, void *cls);
624 GNUNET_SCHEDULER_Task cont, void *cls);
625 618
626 619
627/** 620/**
@@ -637,15 +630,13 @@ GNUNET_TRANSPORT_offer_hello (struct GNUNET_TRANSPORT_Handle *handle,
637 * @param aluc function to call with the results 630 * @param aluc function to call with the results
638 * @param aluc_cls closure for aluc 631 * @param aluc_cls closure for aluc
639 */ 632 */
640void 633void GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle
641GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg, 634 *cfg, const char *address,
642 const char *address, 635 size_t addressLen, int numeric,
643 size_t addressLen, 636 const char *nameTrans,
644 int numeric, 637 struct GNUNET_TIME_Relative timeout,
645 const char *nameTrans, 638 GNUNET_TRANSPORT_AddressLookUpCallback
646 struct GNUNET_TIME_Relative timeout, 639 aluc, void *aluc_cls);
647 GNUNET_TRANSPORT_AddressLookUpCallback aluc,
648 void *aluc_cls);
649 640
650 641
651/** 642/**
@@ -658,14 +649,14 @@ GNUNET_TRANSPORT_address_lookup (const struct GNUNET_CONFIGURATION_Handle *cfg,
658 * @param peer_address_callback function to call with the results 649 * @param peer_address_callback function to call with the results
659 * @param peer_address_callback_cls closure for peer_address_callback 650 * @param peer_address_callback_cls closure for peer_address_callback
660 */ 651 */
661void 652void GNUNET_TRANSPORT_peer_address_lookup (const struct
662GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle 653 GNUNET_CONFIGURATION_Handle *cfg,
663 *cfg, 654 const struct GNUNET_PeerIdentity
664 const struct GNUNET_PeerIdentity *peer, 655 *peer,
665 struct GNUNET_TIME_Relative timeout, 656 struct GNUNET_TIME_Relative timeout,
666 GNUNET_TRANSPORT_AddressLookUpCallback 657 GNUNET_TRANSPORT_AddressLookUpCallback
667 peer_address_callback, 658 peer_address_callback,
668 void *peer_address_callback_cls); 659 void *peer_address_callback_cls);
669 660
670 661
671/** 662/**
@@ -677,12 +668,12 @@ GNUNET_TRANSPORT_peer_address_lookup (const struct GNUNET_CONFIGURATION_Handle
677 * @param peer_address_callback function to call with the results 668 * @param peer_address_callback function to call with the results
678 * @param peer_address_callback_cls closure for peer_address_callback 669 * @param peer_address_callback_cls closure for peer_address_callback
679 */ 670 */
680void 671void GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle
681GNUNET_TRANSPORT_address_iterate (const struct GNUNET_CONFIGURATION_Handle *cfg, 672 *cfg,
682 struct GNUNET_TIME_Relative timeout, 673 struct GNUNET_TIME_Relative timeout,
683 GNUNET_TRANSPORT_AddressLookUpCallback 674 GNUNET_TRANSPORT_AddressLookUpCallback
684 peer_address_callback, 675 peer_address_callback,
685 void *peer_address_callback_cls); 676 void *peer_address_callback_cls);
686 677
687 678
688/** 679/**
diff --git a/src/include/gnunet_upnp_service.h b/src/include/gnunet_upnp_service.h
index 7e6ea5180..70e50b354 100644
--- a/src/include/gnunet_upnp_service.h
+++ b/src/include/gnunet_upnp_service.h
@@ -54,11 +54,8 @@ extern "C"
54 * function will be called with NULL on error 54 * function will be called with NULL on error
55 * @param cls closure for callback 55 * @param cls closure for callback
56 */ 56 */
57int GNUNET_UPNP_get_ip (struct GNUNET_CONFIGURATION_Handle *cfg, 57int GNUNET_UPNP_get_ip (struct GNUNET_CONFIGURATION_Handle *cfg, int domain,
58 int domain, 58 int type, int protocol, uint16_t port,
59 int type,
60 int protocol,
61 uint16_t port,
62 struct GNUNET_TIME_Relative timeout, 59 struct GNUNET_TIME_Relative timeout,
63 GNUNET_RESOLVER_AddressCallback callback, void *cls); 60 GNUNET_RESOLVER_AddressCallback callback, void *cls);
64 61
diff --git a/src/include/plibc.h b/src/include/plibc.h
index 82079faf1..8314f2146 100644
--- a/src/include/plibc.h
+++ b/src/include/plibc.h
@@ -770,8 +770,7 @@ extern "C"
770 PLIBC_SEARCH__compar_fn_t __compar); 770 PLIBC_SEARCH__compar_fn_t __compar);
771 771
772/* Remove the element matching KEY from the tree pointed to by *ROOTP. */ 772/* Remove the element matching KEY from the tree pointed to by *ROOTP. */
773 void *_win_tdelete (__const void *__restrict __key, 773 void *_win_tdelete (__const void *__restrict __key, void **__restrict __rootp,
774 void **__restrict __rootp,
775 PLIBC_SEARCH__compar_fn_t __compar); 774 PLIBC_SEARCH__compar_fn_t __compar);
776 775
777 typedef void (*PLIBC_SEARCH__action_fn_t) (__const void *__nodep, 776 typedef void (*PLIBC_SEARCH__action_fn_t) (__const void *__nodep,
@@ -792,15 +791,13 @@ extern "C"
792 791
793/* Perform linear search for KEY by comparing by COMPAR in an array 792/* Perform linear search for KEY by comparing by COMPAR in an array
794 [BASE,BASE+NMEMB*SIZE). */ 793 [BASE,BASE+NMEMB*SIZE). */
795 void *_win_lfind (__const void *__key, __const void *__base, 794 void *_win_lfind (__const void *__key, __const void *__base, size_t * __nmemb,
796 size_t * __nmemb, size_t __size, 795 size_t __size, PLIBC_SEARCH__compar_fn_t __compar);
797 PLIBC_SEARCH__compar_fn_t __compar);
798 796
799/* Perform linear search for KEY by comparing by COMPAR function in 797/* Perform linear search for KEY by comparing by COMPAR function in
800 array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */ 798 array [BASE,BASE+NMEMB*SIZE) and insert entry if not found. */
801 void *_win_lsearch (__const void *__key, void *__base, 799 void *_win_lsearch (__const void *__key, void *__base, size_t * __nmemb,
802 size_t * __nmemb, size_t __size, 800 size_t __size, PLIBC_SEARCH__compar_fn_t __compar);
803 PLIBC_SEARCH__compar_fn_t __compar);
804 801
805 802
806#ifdef __cplusplus 803#ifdef __cplusplus
diff --git a/src/include/winproc.h b/src/include/winproc.h
index 1c7703799..05c4ac1bf 100644
--- a/src/include/winproc.h
+++ b/src/include/winproc.h
@@ -109,12 +109,11 @@ extern "C"
109 DWORD level, LPBYTE buf, 109 DWORD level, LPBYTE buf,
110 LPDWORD parm_err); 110 LPDWORD parm_err);
111 typedef NTSTATUS NTAPI (*TLsaOpenPolicy) (PLSA_UNICODE_STRING, 111 typedef NTSTATUS NTAPI (*TLsaOpenPolicy) (PLSA_UNICODE_STRING,
112 PLSA_OBJECT_ATTRIBUTES, 112 PLSA_OBJECT_ATTRIBUTES, ACCESS_MASK,
113 ACCESS_MASK, PLSA_HANDLE); 113 PLSA_HANDLE);
114 typedef NTSTATUS NTAPI (*TLsaAddAccountRights) (LSA_HANDLE, PSID, 114 typedef NTSTATUS NTAPI (*TLsaAddAccountRights) (LSA_HANDLE, PSID,
115 PLSA_UNICODE_STRING, ULONG); 115 PLSA_UNICODE_STRING, ULONG);
116 typedef NTSTATUS NTAPI (*TLsaRemoveAccountRights) (LSA_HANDLE, PSID, 116 typedef NTSTATUS NTAPI (*TLsaRemoveAccountRights) (LSA_HANDLE, PSID, BOOLEAN,
117 BOOLEAN,
118 PLSA_UNICODE_STRING, 117 PLSA_UNICODE_STRING,
119 ULONG); 118 ULONG);
120 typedef NTSTATUS NTAPI (*TLsaClose) (LSA_HANDLE); 119 typedef NTSTATUS NTAPI (*TLsaClose) (LSA_HANDLE);
@@ -139,8 +138,7 @@ extern "C"
139 LPBOOL lpbDaclPresent, 138 LPBOOL lpbDaclPresent,
140 PACL * pDacl, 139 PACL * pDacl,
141 LPBOOL lpbDaclDefaulted); 140 LPBOOL lpbDaclDefaulted);
142 typedef BOOL WINAPI (*TGetAclInformation) (PACL pAcl, 141 typedef BOOL WINAPI (*TGetAclInformation) (PACL pAcl, LPVOID pAclInformation,
143 LPVOID pAclInformation,
144 DWORD nAclInformationLength, 142 DWORD nAclInformationLength,
145 ACL_INFORMATION_CLASS 143 ACL_INFORMATION_CLASS
146 dwAclInformationClass); 144 dwAclInformationClass);
diff --git a/src/transport/gnunet-service-transport_ats.h b/src/transport/gnunet-service-transport_ats.h
index d1d789b5f..88e4b4bbf 100644
--- a/src/transport/gnunet-service-transport_ats.h
+++ b/src/transport/gnunet-service-transport_ats.h
@@ -67,9 +67,11 @@
67struct ATS_mechanism; 67struct ATS_mechanism;
68struct ATS_peer; 68struct ATS_peer;
69 69
70typedef void (*GNUNET_TRANSPORT_ATS_AddressNotification) 70typedef void (*GNUNET_TRANSPORT_ATS_AddressNotification) (struct ATS_peer **
71 (struct ATS_peer ** peers, 71 peers, int *c_p,
72 int *c_p, struct ATS_mechanism ** mechanisms, int *c_m); 72 struct ATS_mechanism
73 ** mechanisms,
74 int *c_m);
73 75
74typedef void (*GNUNET_TRANSPORT_ATS_ResultCallback) (void); 76typedef void (*GNUNET_TRANSPORT_ATS_ResultCallback) (void);
75 77
@@ -447,12 +449,8 @@ static struct ATS_quality_metric qm[] = {
447/* 449/*
448 * ATS functions 450 * ATS functions
449 */ 451 */
450struct ATS_Handle *ats_init (double D, 452struct ATS_Handle *ats_init (double D, double U, double R, int v_b_min,
451 double U, 453 int v_n_min, int max_iterations,
452 double R,
453 int v_b_min,
454 int v_n_min,
455 int max_iterations,
456 struct GNUNET_TIME_Relative max_duration, 454 struct GNUNET_TIME_Relative max_duration,
457 GNUNET_TRANSPORT_ATS_AddressNotification 455 GNUNET_TRANSPORT_ATS_AddressNotification
458 address_not, 456 address_not,
@@ -462,23 +460,18 @@ void ats_shutdown (struct ATS_Handle *ats);
462 460
463void ats_delete_problem (struct ATS_Handle *ats); 461void ats_delete_problem (struct ATS_Handle *ats);
464 462
465int 463int ats_create_problem (struct ATS_Handle *ats, struct ATS_internals *stat,
466ats_create_problem (struct ATS_Handle *ats, 464 struct ATS_peer *peers, int c_p,
467 struct ATS_internals *stat, 465 struct ATS_mechanism *mechanisms, int c_m);
468 struct ATS_peer *peers,
469 int c_p, struct ATS_mechanism *mechanisms, int c_m);
470 466
471void ats_modify_problem_state (struct ATS_Handle *ats, 467void ats_modify_problem_state (struct ATS_Handle *ats,
472 enum ATS_problem_state s); 468 enum ATS_problem_state s);
473 469
474void ats_calculate_bandwidth_distribution (struct ATS_Handle *ats); 470void ats_calculate_bandwidth_distribution (struct ATS_Handle *ats);
475 471
476void 472void ats_solve_problem (struct ATS_Handle *ats, unsigned int max_it,
477ats_solve_problem (struct ATS_Handle *ats, 473 unsigned int max_dur, unsigned int c_peers,
478 unsigned int max_it, 474 unsigned int c_mechs, struct ATS_internals *stat);
479 unsigned int max_dur,
480 unsigned int c_peers,
481 unsigned int c_mechs, struct ATS_internals *stat);
482 475
483int ats_evaluate_results (int result, int solution, char *problem); 476int ats_evaluate_results (int result, int solution, char *problem);
484 477
@@ -487,10 +480,9 @@ void ats_update_problem_qm (struct ATS_Handle *ats);
487void ats_update_problem_cr (struct ATS_Handle *ats); 480void ats_update_problem_cr (struct ATS_Handle *ats);
488 481
489 482
490void 483void ats_set_logging_options (struct ATS_Handle *ats,
491ats_set_logging_options (struct ATS_Handle *ats, 484 struct GNUNET_STATISTICS_Handle *stats,
492 struct GNUNET_STATISTICS_Handle *stats, 485 const struct GNUNET_CONFIGURATION_Handle *cfg);
493 const struct GNUNET_CONFIGURATION_Handle *cfg);
494 486
495#endif 487#endif
496/* end of file gnunet-service-transport_ats.h */ 488/* end of file gnunet-service-transport_ats.h */
diff --git a/src/transport/gnunet-service-transport_blacklist.h b/src/transport/gnunet-service-transport_blacklist.h
index 4823d055d..7e88b3961 100644
--- a/src/transport/gnunet-service-transport_blacklist.h
+++ b/src/transport/gnunet-service-transport_blacklist.h
@@ -52,10 +52,8 @@ void GST_blacklist_stop (void);
52 * @param client the client 52 * @param client the client
53 * @param message the blacklist-init message that was sent 53 * @param message the blacklist-init message that was sent
54 */ 54 */
55void 55void GST_blacklist_handle_init (void *cls, struct GNUNET_SERVER_Client *client,
56GST_blacklist_handle_init (void *cls, 56 const struct GNUNET_MessageHeader *message);
57 struct GNUNET_SERVER_Client *client,
58 const struct GNUNET_MessageHeader *message);
59 57
60/** 58/**
61 * A blacklisting client has sent us reply. Process it. 59 * A blacklisting client has sent us reply. Process it.
@@ -64,10 +62,8 @@ GST_blacklist_handle_init (void *cls,
64 * @param client the client 62 * @param client the client
65 * @param message the blacklist-init message that was sent 63 * @param message the blacklist-init message that was sent
66 */ 64 */
67void 65void GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client,
68GST_blacklist_handle_reply (void *cls, 66 const struct GNUNET_MessageHeader *message);
69 struct GNUNET_SERVER_Client *client,
70 const struct GNUNET_MessageHeader *message);
71 67
72/** 68/**
73 * Add the given peer to the blacklist (for the given transport). 69 * Add the given peer to the blacklist (for the given transport).
@@ -75,9 +71,8 @@ GST_blacklist_handle_reply (void *cls,
75 * @param peer peer to blacklist 71 * @param peer peer to blacklist
76 * @param transport_name transport to blacklist for this peer, NULL for all 72 * @param transport_name transport to blacklist for this peer, NULL for all
77 */ 73 */
78void 74void GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
79GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer, 75 const char *transport_name);
80 const char *transport_name);
81 76
82 77
83/** 78/**
diff --git a/src/transport/gnunet-service-transport_clients.h b/src/transport/gnunet-service-transport_clients.h
index 7c79eec15..6bcc18cd3 100644
--- a/src/transport/gnunet-service-transport_clients.h
+++ b/src/transport/gnunet-service-transport_clients.h
@@ -50,8 +50,8 @@ void GST_clients_stop (void);
50 * @param msg message to broadcast 50 * @param msg message to broadcast
51 * @param may_drop GNUNET_YES if the message can be dropped 51 * @param may_drop GNUNET_YES if the message can be dropped
52 */ 52 */
53void 53void GST_clients_broadcast (const struct GNUNET_MessageHeader *msg,
54GST_clients_broadcast (const struct GNUNET_MessageHeader *msg, int may_drop); 54 int may_drop);
55 55
56 56
57/** 57/**
@@ -61,9 +61,8 @@ GST_clients_broadcast (const struct GNUNET_MessageHeader *msg, int may_drop);
61 * @param msg message to transmit 61 * @param msg message to transmit
62 * @param may_drop GNUNET_YES if the message can be dropped 62 * @param may_drop GNUNET_YES if the message can be dropped
63 */ 63 */
64void 64void GST_clients_unicast (struct GNUNET_SERVER_Client *client,
65GST_clients_unicast (struct GNUNET_SERVER_Client *client, 65 const struct GNUNET_MessageHeader *msg, int may_drop);
66 const struct GNUNET_MessageHeader *msg, int may_drop);
67 66
68 67
69 68
diff --git a/src/transport/gnunet-service-transport_hello.h b/src/transport/gnunet-service-transport_hello.h
index 8aac2838a..ff817814b 100644
--- a/src/transport/gnunet-service-transport_hello.h
+++ b/src/transport/gnunet-service-transport_hello.h
@@ -80,11 +80,9 @@ const struct GNUNET_MessageHeader *GST_hello_get (void);
80 * @param plugin_address address in a plugin-specific format 80 * @param plugin_address address in a plugin-specific format
81 * @param plugin_address_len number of bytes in plugin_address 81 * @param plugin_address_len number of bytes in plugin_address
82 */ 82 */
83void 83void GST_hello_modify_addresses (int addremove, const char *plugin_name,
84GST_hello_modify_addresses (int addremove, 84 const void *plugin_address,
85 const char *plugin_name, 85 size_t plugin_address_len);
86 const void *plugin_address,
87 size_t plugin_address_len);
88 86
89 87
90/** 88/**
@@ -99,12 +97,10 @@ GST_hello_modify_addresses (int addremove,
99 * @return GNUNET_YES if this is one of our addresses, 97 * @return GNUNET_YES if this is one of our addresses,
100 * GNUNET_NO if not 98 * GNUNET_NO if not
101 */ 99 */
102int 100int GST_hello_test_address (const char *plugin_name, const void *plugin_address,
103GST_hello_test_address (const char *plugin_name, 101 size_t plugin_address_len,
104 const void *plugin_address, 102 struct GNUNET_CRYPTO_RsaSignature **sig,
105 size_t plugin_address_len, 103 struct GNUNET_TIME_Absolute **sig_expiration);
106 struct GNUNET_CRYPTO_RsaSignature **sig,
107 struct GNUNET_TIME_Absolute **sig_expiration);
108 104
109 105
110#endif 106#endif
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h
index c263c33d9..c0cee01a6 100644
--- a/src/transport/gnunet-service-transport_neighbours.h
+++ b/src/transport/gnunet-service-transport_neighbours.h
@@ -43,10 +43,8 @@
43 * @param connect_cb function to call if we connect to a peer 43 * @param connect_cb function to call if we connect to a peer
44 * @param disconnect_cb function to call if we disconnect from a peer 44 * @param disconnect_cb function to call if we disconnect from a peer
45 */ 45 */
46void 46void GST_neighbours_start (void *cls, GNUNET_TRANSPORT_NotifyConnect connect_cb,
47GST_neighbours_start (void *cls, 47 GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb);
48 GNUNET_TRANSPORT_NotifyConnect connect_cb,
49 GNUNET_TRANSPORT_NotifyDisconnect disconnect_cb);
50 48
51 49
52/** 50/**
@@ -91,12 +89,10 @@ typedef void (*GST_NeighbourSendContinuation) (void *cls, int success);
91 * @param cont function to call when done 89 * @param cont function to call when done
92 * @param cont_cls closure for 'cont' 90 * @param cont_cls closure for 'cont'
93 */ 91 */
94void 92void GST_neighbours_send (const struct GNUNET_PeerIdentity *target,
95GST_neighbours_send (const struct GNUNET_PeerIdentity *target, 93 const void *msg, size_t msg_size,
96 const void *msg, 94 struct GNUNET_TIME_Relative timeout,
97 size_t msg_size, 95 GST_NeighbourSendContinuation cont, void *cont_cls);
98 struct GNUNET_TIME_Relative timeout,
99 GST_NeighbourSendContinuation cont, void *cont_cls);
100 96
101 97
102/** 98/**
@@ -110,9 +106,13 @@ GST_neighbours_send (const struct GNUNET_PeerIdentity *target,
110 * GNUNET_NO if the neighbour is not connected or violates the quota 106 * GNUNET_NO if the neighbour is not connected or violates the quota
111 * @return how long to wait before reading more from this sender 107 * @return how long to wait before reading more from this sender
112 */ 108 */
113struct GNUNET_TIME_Relative 109struct GNUNET_TIME_Relative GST_neighbours_calculate_receive_delay (const struct
114GST_neighbours_calculate_receive_delay (const struct GNUNET_PeerIdentity 110 GNUNET_PeerIdentity
115 *sender, ssize_t size, int *do_forward); 111 *sender,
112 ssize_t
113 size,
114 int
115 *do_forward);
116 116
117 117
118/** 118/**
@@ -130,9 +130,10 @@ void GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour);
130 * @param neighbour identity of peer to change qutoa for 130 * @param neighbour identity of peer to change qutoa for
131 * @param quota new quota 131 * @param quota new quota
132 */ 132 */
133void 133void GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity
134GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, 134 *neighbour,
135 struct GNUNET_BANDWIDTH_Value32NBO quota); 135 struct GNUNET_BANDWIDTH_Value32NBO
136 quota);
136 137
137 138
138/** 139/**
@@ -174,9 +175,8 @@ void GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls);
174 * @param peer identity of the peer where the session died 175 * @param peer identity of the peer where the session died
175 * @param session session that is gone 176 * @param session session that is gone
176 */ 177 */
177void 178void GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
178GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, 179 struct Session *session);
179 struct Session *session);
180 180
181 181
182/** 182/**
@@ -192,14 +192,13 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
192 * @param ats performance data 192 * @param ats performance data
193 * @param ats_count number of entries in ats (excluding 0-termination) 193 * @param ats_count number of entries in ats (excluding 0-termination)
194 */ 194 */
195void 195void GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer,
196GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, 196 const char *plugin_name,
197 const char *plugin_name, 197 const void *address, size_t address_len,
198 const void *address, 198 struct Session *session,
199 size_t address_len, 199 const struct
200 struct Session *session, 200 GNUNET_TRANSPORT_ATS_Information *ats,
201 const struct GNUNET_TRANSPORT_ATS_Information 201 uint32_t ats_count);
202 *ats, uint32_t ats_count);
203 202
204 203
205#endif 204#endif
diff --git a/src/transport/gnunet-service-transport_plugins.h b/src/transport/gnunet-service-transport_plugins.h
index f3f46e342..ebc8fa451 100644
--- a/src/transport/gnunet-service-transport_plugins.h
+++ b/src/transport/gnunet-service-transport_plugins.h
@@ -42,10 +42,9 @@
42 * @param address_cb function to call when our public addresses changed 42 * @param address_cb function to call when our public addresses changed
43 * @param session_end_cb function to call when a session was terminated 43 * @param session_end_cb function to call when a session was terminated
44 */ 44 */
45void 45void GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb,
46GST_plugins_load (GNUNET_TRANSPORT_PluginReceiveCallback recv_cb, 46 GNUNET_TRANSPORT_AddressNotification address_cb,
47 GNUNET_TRANSPORT_AddressNotification address_cb, 47 GNUNET_TRANSPORT_SessionEnd session_end_cb);
48 GNUNET_TRANSPORT_SessionEnd session_end_cb);
49 48
50 49
51/** 50/**
@@ -72,8 +71,8 @@ struct GNUNET_TRANSPORT_PluginFunctions *GST_plugins_find (const char *name);
72 * @param addrlen number of bytes in 'addr' 71 * @param addrlen number of bytes in 'addr'
73 * @return statically allocated (!) human-readable address 72 * @return statically allocated (!) human-readable address
74 */ 73 */
75const char *GST_plugins_a2s (const char *name, 74const char *GST_plugins_a2s (const char *name, const void *addr,
76 const void *addr, size_t addrlen); 75 size_t addrlen);
77 76
78 77
79#endif 78#endif
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h
index bdf8bd9ed..86ede1576 100644
--- a/src/transport/gnunet-service-transport_validation.h
+++ b/src/transport/gnunet-service-transport_validation.h
@@ -54,13 +54,12 @@ void GST_validation_stop (void);
54 * if we did not initiate the connection 54 * if we did not initiate the connection
55 * @param sender_address_len number of bytes in sender_address 55 * @param sender_address_len number of bytes in sender_address
56 */ 56 */
57void 57void GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
58GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender, 58 const struct GNUNET_MessageHeader *hdr,
59 const struct GNUNET_MessageHeader *hdr, 59 const char *plugin_name,
60 const char *plugin_name, 60 struct Session *session,
61 struct Session *session, 61 const void *sender_address,
62 const void *sender_address, 62 size_t sender_address_len);
63 size_t sender_address_len);
64 63
65 64
66/** 65/**
@@ -70,9 +69,8 @@ GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
70 * @param sender peer sending the PONG 69 * @param sender peer sending the PONG
71 * @param hdr the PONG 70 * @param hdr the PONG
72 */ 71 */
73void 72void GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender,
74GST_validation_handle_pong (const struct GNUNET_PeerIdentity *sender, 73 const struct GNUNET_MessageHeader *hdr);
75 const struct GNUNET_MessageHeader *hdr);
76 74
77 75
78/** 76/**
@@ -124,9 +122,9 @@ typedef void (*GST_ValidationAddressCallback) (void *cls,
124 * @param cb_cls closure for 'cb' 122 * @param cb_cls closure for 'cb'
125 * @return context to cancel, NULL if 'snapshot_only' is GNUNET_YES 123 * @return context to cancel, NULL if 'snapshot_only' is GNUNET_YES
126 */ 124 */
127void 125void GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target,
128GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target, 126 GST_ValidationAddressCallback cb,
129 GST_ValidationAddressCallback cb, void *cb_cls); 127 void *cb_cls);
130 128
131 129
132#endif 130#endif
diff --git a/src/transport/transport-testing.h b/src/transport/transport-testing.h
index a867df4c1..a21ccc11f 100644
--- a/src/transport/transport-testing.h
+++ b/src/transport/transport-testing.h
@@ -102,10 +102,9 @@ void GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext *pc);
102 * @param cb the callback to call 102 * @param cb the callback to call
103 * @param cb_cls callback cls 103 * @param cb_cls callback cls
104 */ 104 */
105void 105void GNUNET_TRANSPORT_TESTING_connect_peers (struct PeerContext *p1,
106GNUNET_TRANSPORT_TESTING_connect_peers (struct PeerContext *p1, 106 struct PeerContext *p2,
107 struct PeerContext *p2, 107 GNUNET_TRANSPORT_TESTING_connect_cb
108 GNUNET_TRANSPORT_TESTING_connect_cb cb, 108 cb, void *cls);
109 void *cls);
110 109
111/* end of transport_testing.h */ 110/* end of transport_testing.h */
diff --git a/src/transport/wlan/byteorder.h b/src/transport/wlan/byteorder.h
index e065e24d6..b09328320 100644
--- a/src/transport/wlan/byteorder.h
+++ b/src/transport/wlan/byteorder.h
@@ -22,33 +22,29 @@
22#define _AIRCRACK_NG_BYTEORDER_H_ 22#define _AIRCRACK_NG_BYTEORDER_H_
23 23
24#define ___my_swab16(x) \ 24#define ___my_swab16(x) \
25 ((u_int16_t) (\ 25 ((u_int16_t)
26 (((u_int16_t) (x) & (u_int16_t) 0x00ffU) << 8) | \ 26 (\ (((u_int16_t) (x) & (u_int16_t) 0x00ffU) << 8) |
27 (((u_int16_t) (x) & (u_int16_t) 0xff00U) >> 8))) 27 \ (((u_int16_t) (x) & (u_int16_t) 0xff00U) >> 8)))
28#define ___my_swab32(x) \ 28#define ___my_swab32(x) \
29 ((u_int32_t) (\ 29 ((u_int32_t)
30 (((u_int32_t) (x) & (u_int32_t) 0x000000ffUL) << 24) | \ 30 (\ (((u_int32_t) (x) & (u_int32_t) 0x000000ffUL) << 24) |
31 (((u_int32_t) (x) & (u_int32_t) 0x0000ff00UL) << 8) | \ 31 \ (((u_int32_t) (x) & (u_int32_t) 0x0000ff00UL) << 8) |
32 (((u_int32_t) (x) & (u_int32_t) 0x00ff0000UL) >> 8) | \ 32 \ (((u_int32_t) (x) & (u_int32_t) 0x00ff0000UL) >> 8) |
33 (((u_int32_t) (x) & (u_int32_t) 0xff000000UL) >> 24))) 33 \ (((u_int32_t) (x) & (u_int32_t) 0xff000000UL) >> 24)))
34#define ___my_swab64(x) \ 34#define ___my_swab64(x) \
35 ((u_int64_t) (\ 35 ((u_int64_t)
36 (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 36 (\ (u_int64_t)
37 0x00000000000000ffULL) << 56) | 37 (((u_int64_t) (x) & (u_int64_t) 0x00000000000000ffULL) << 56) |
38 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 38 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 0x000000000000ff00ULL) <<
39 0x000000000000ff00ULL) << 40) | 39 40) | \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t)
40 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 40 0x0000000000ff0000ULL) << 24) |
41 0x0000000000ff0000ULL) << 24) | 41 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 0x00000000ff000000ULL) << 8)
42 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 42 | \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 0x000000ff00000000ULL) >>
43 0x00000000ff000000ULL) << 8) | 43 8) | \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t)
44 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 44 0x0000ff0000000000ULL) >> 24) |
45 0x000000ff00000000ULL) >> 8) | 45 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 0x00ff000000000000ULL) >>
46 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t) 46 40) | \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t)
47 0x0000ff0000000000ULL) >> 24) | 47 0xff00000000000000ULL) >> 56)))
48 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t)
49 0x00ff000000000000ULL) >> 40) |
50 \ (u_int64_t) (((u_int64_t) (x) & (u_int64_t)
51 0xff00000000000000ULL) >> 56)))
52 /* 48 /*
53 * Linux 49 * Linux
54 */ 50 */
diff --git a/src/util/disk.h b/src/util/disk.h
index 8c48b85ca..b60150f3a 100644
--- a/src/util/disk.h
+++ b/src/util/disk.h
@@ -37,7 +37,7 @@
37 * @param dst_len length of dst 37 * @param dst_len length of dst
38 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise 38 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
39 */ 39 */
40int GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle 40int GNUNET_DISK_internal_file_handle_ (const struct GNUNET_DISK_FileHandle *fh,
41 *fh, void *dst, size_t dst_len); 41 void *dst, size_t dst_len);
42 42
43#endif /* GNUNET_DISK_H_ */ 43#endif /* GNUNET_DISK_H_ */
diff --git a/src/vpn/gnunet-daemon-vpn-helper.h b/src/vpn/gnunet-daemon-vpn-helper.h
index 963fafd09..8e0ee5a0f 100644
--- a/src/vpn/gnunet-daemon-vpn-helper.h
+++ b/src/vpn/gnunet-daemon-vpn-helper.h
@@ -62,8 +62,8 @@ void helper_write (void *cls,
62/** 62/**
63 * Receive packets from the helper-process 63 * Receive packets from the helper-process
64 */ 64 */
65void message_token (void *cls, 65void message_token (void *cls, void *client,
66 void *client, const struct GNUNET_MessageHeader *message); 66 const struct GNUNET_MessageHeader *message);
67 67
68void write_to_helper (void *buf, size_t len); 68void write_to_helper (void *buf, size_t len);
69 69
diff --git a/src/vpn/gnunet-daemon-vpn.h b/src/vpn/gnunet-daemon-vpn.h
index ac6e50c72..4f4cf5a0f 100644
--- a/src/vpn/gnunet-daemon-vpn.h
+++ b/src/vpn/gnunet-daemon-vpn.h
@@ -42,18 +42,16 @@ void send_icmp6_response (void *cls,
42void send_icmp4_response (void *cls, 42void send_icmp4_response (void *cls,
43 const struct GNUNET_SCHEDULER_TaskContext *tc); 43 const struct GNUNET_SCHEDULER_TaskContext *tc);
44 44
45size_t 45size_t send_udp_service (void *cls, size_t size,
46 send_udp_service (void *cls, size_t size, void *buf); 46 void *buf);
47 47
48GNUNET_HashCode *address6_mapping_exists (unsigned char addr[]); 48GNUNET_HashCode *address6_mapping_exists (unsigned char addr[]);
49GNUNET_HashCode *address4_mapping_exists (uint32_t addr); 49GNUNET_HashCode *address4_mapping_exists (uint32_t addr);
50 50
51unsigned int port_in_ports (uint64_t ports, uint16_t port); 51unsigned int port_in_ports (uint64_t ports, uint16_t port);
52 52
53void 53void send_pkt_to_peer (void *cls, const struct GNUNET_PeerIdentity *peer,
54send_pkt_to_peer (void *cls, 54 const struct GNUNET_TRANSPORT_ATS_Information *atsi);
55 const struct GNUNET_PeerIdentity *peer,
56 const struct GNUNET_TRANSPORT_ATS_Information *atsi);
57 55
58/** 56/**
59 * The configuration to use 57 * The configuration to use