aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-10-10 11:29:59 +0000
committerChristian Grothoff <christian@grothoff.org>2011-10-10 11:29:59 +0000
commit4e49d814f8c52d784e8aa7bd57a40eda7656d3c0 (patch)
tree86f9971794e0d72f8de9ac2886fd11e85ccde7c1 /src
parent0a15f777a19feea3937264b6acf96685b76bbc45 (diff)
downloadgnunet-4e49d814f8c52d784e8aa7bd57a40eda7656d3c0.tar.gz
gnunet-4e49d814f8c52d784e8aa7bd57a40eda7656d3c0.zip
another core API simplification due to ATS introduction
Diffstat (limited to 'src')
-rw-r--r--src/core/core_api.c57
-rw-r--r--src/core/test_core_api.c4
-rw-r--r--src/core/test_core_api_reliability.c4
-rw-r--r--src/core/test_core_api_send_to_self.c2
-rw-r--r--src/core/test_core_api_start_only.c4
-rw-r--r--src/core/test_core_quota_compliance.c4
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c1
-rw-r--r--src/fs/gnunet-service-fs.c2
-rw-r--r--src/fs/gnunet-service-fs_cp.c26
-rw-r--r--src/fs/gnunet-service-fs_cp.h19
-rw-r--r--src/hostlist/gnunet-daemon-hostlist.c2
-rw-r--r--src/include/gnunet_ats_service.h3
-rw-r--r--src/include/gnunet_core_service.h29
-rw-r--r--src/include/gnunet_protocols.h6
-rw-r--r--src/mesh/gnunet-service-mesh.c1
-rw-r--r--src/mesh/mesh_api.c2
-rw-r--r--src/nse/gnunet-service-nse.c1
-rw-r--r--src/testing/testing.c4
-rw-r--r--src/topology/gnunet-daemon-topology.c2
19 files changed, 17 insertions, 156 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 16668e9fc..78f606322 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -178,11 +178,6 @@ struct GNUNET_CORE_Handle
178 GNUNET_CORE_DisconnectEventHandler disconnects; 178 GNUNET_CORE_DisconnectEventHandler disconnects;
179 179
180 /** 180 /**
181 * Function to call whenever we're notified about a peer changing status.
182 */
183 GNUNET_CORE_PeerStatusEventHandler status_events;
184
185 /**
186 * Function to call whenever we receive an inbound message. 181 * Function to call whenever we receive an inbound message.
187 */ 182 */
188 GNUNET_CORE_MessageCallback inbound_notify; 183 GNUNET_CORE_MessageCallback inbound_notify;
@@ -785,7 +780,6 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
785 const struct DisconnectNotifyMessage *dnm; 780 const struct DisconnectNotifyMessage *dnm;
786 const struct NotifyTrafficMessage *ntm; 781 const struct NotifyTrafficMessage *ntm;
787 const struct GNUNET_MessageHeader *em; 782 const struct GNUNET_MessageHeader *em;
788 const struct PeerStatusNotifyMessage *psnm;
789 const struct SendMessageReady *smr; 783 const struct SendMessageReady *smr;
790 const struct GNUNET_CORE_MessageHandler *mh; 784 const struct GNUNET_CORE_MessageHandler *mh;
791 GNUNET_CORE_StartupCallback init; 785 GNUNET_CORE_StartupCallback init;
@@ -941,52 +935,6 @@ main_notify_handler (void *cls, const struct GNUNET_MessageHeader *msg)
941 if (trigger) 935 if (trigger)
942 trigger_next_request (h, GNUNET_NO); 936 trigger_next_request (h, GNUNET_NO);
943 break; 937 break;
944 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_STATUS_CHANGE:
945 if (NULL == h->status_events)
946 {
947 GNUNET_break (0);
948 return;
949 }
950 if (msize < sizeof (struct PeerStatusNotifyMessage))
951 {
952 GNUNET_break (0);
953 reconnect_later (h);
954 return;
955 }
956 psnm = (const struct PeerStatusNotifyMessage *) msg;
957 if (0 == memcmp (&h->me, &psnm->peer, sizeof (struct GNUNET_PeerIdentity)))
958 {
959 /* self-change!? */
960 GNUNET_break (0);
961 return;
962 }
963 ats_count = ntohl (psnm->ats_count);
964 if ((msize !=
965 sizeof (struct PeerStatusNotifyMessage) +
966 ats_count * sizeof (struct GNUNET_TRANSPORT_ATS_Information)) ||
967 (GNUNET_TRANSPORT_ATS_ARRAY_TERMINATOR !=
968 ntohl ((&psnm->ats)[ats_count].type)))
969 {
970 GNUNET_break (0);
971 reconnect_later (h);
972 return;
973 }
974#if DEBUG_CORE > 1
975 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
976 "Received notification about status change by `%s'.\n",
977 GNUNET_i2s (&psnm->peer));
978#endif
979 pr = GNUNET_CONTAINER_multihashmap_get (h->peers, &psnm->peer.hashPubKey);
980 if (pr == NULL)
981 {
982 GNUNET_break (0);
983 reconnect_later (h);
984 return;
985 }
986 h->status_events (h->cls, &psnm->peer, psnm->bandwidth_in,
987 psnm->bandwidth_out,
988 GNUNET_TIME_absolute_ntoh (psnm->timeout), &psnm->ats);
989 break;
990 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND: 938 case GNUNET_MESSAGE_TYPE_CORE_NOTIFY_INBOUND:
991 if (msize < sizeof (struct NotifyTrafficMessage)) 939 if (msize < sizeof (struct NotifyTrafficMessage))
992 { 940 {
@@ -1223,8 +1171,6 @@ reconnect (struct GNUNET_CORE_Handle *h)
1223 init->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT); 1171 init->header.type = htons (GNUNET_MESSAGE_TYPE_CORE_INIT);
1224 init->header.size = htons (msize); 1172 init->header.size = htons (msize);
1225 opt = GNUNET_CORE_OPTION_SEND_CONNECT | GNUNET_CORE_OPTION_SEND_DISCONNECT; 1173 opt = GNUNET_CORE_OPTION_SEND_CONNECT | GNUNET_CORE_OPTION_SEND_DISCONNECT;
1226 if (h->status_events != NULL)
1227 opt |= GNUNET_CORE_OPTION_SEND_STATUS_CHANGE;
1228 if (h->inbound_notify != NULL) 1174 if (h->inbound_notify != NULL)
1229 { 1175 {
1230 if (h->inbound_hdr_only) 1176 if (h->inbound_hdr_only)
@@ -1261,7 +1207,6 @@ reconnect (struct GNUNET_CORE_Handle *h)
1261 * connected to the core service; note that timeout is only meaningful if init is not NULL 1207 * connected to the core service; note that timeout is only meaningful if init is not NULL
1262 * @param connects function to call on peer connect, can be NULL 1208 * @param connects function to call on peer connect, can be NULL
1263 * @param disconnects function to call on peer disconnect / timeout, can be NULL 1209 * @param disconnects function to call on peer disconnect / timeout, can be NULL
1264 * @param status_events function to call on changes to peer connection status, can be NULL
1265 * @param inbound_notify function to call for all inbound messages, can be NULL 1210 * @param inbound_notify function to call for all inbound messages, can be NULL
1266 * @param inbound_hdr_only set to GNUNET_YES if inbound_notify will only read the 1211 * @param inbound_hdr_only set to GNUNET_YES if inbound_notify will only read the
1267 * GNUNET_MessageHeader and hence we do not need to give it the full message; 1212 * GNUNET_MessageHeader and hence we do not need to give it the full message;
@@ -1280,7 +1225,6 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
1280 GNUNET_CORE_StartupCallback init, 1225 GNUNET_CORE_StartupCallback init,
1281 GNUNET_CORE_ConnectEventHandler connects, 1226 GNUNET_CORE_ConnectEventHandler connects,
1282 GNUNET_CORE_DisconnectEventHandler disconnects, 1227 GNUNET_CORE_DisconnectEventHandler disconnects,
1283 GNUNET_CORE_PeerStatusEventHandler status_events,
1284 GNUNET_CORE_MessageCallback inbound_notify, 1228 GNUNET_CORE_MessageCallback inbound_notify,
1285 int inbound_hdr_only, 1229 int inbound_hdr_only,
1286 GNUNET_CORE_MessageCallback outbound_notify, 1230 GNUNET_CORE_MessageCallback outbound_notify,
@@ -1296,7 +1240,6 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
1296 h->init = init; 1240 h->init = init;
1297 h->connects = connects; 1241 h->connects = connects;
1298 h->disconnects = disconnects; 1242 h->disconnects = disconnects;
1299 h->status_events = status_events;
1300 h->inbound_notify = inbound_notify; 1243 h->inbound_notify = inbound_notify;
1301 h->outbound_notify = outbound_notify; 1244 h->outbound_notify = outbound_notify;
1302 h->inbound_hdr_only = inbound_hdr_only; 1245 h->inbound_hdr_only = inbound_hdr_only;
diff --git a/src/core/test_core_api.c b/src/core/test_core_api.c
index 7695f9e86..db3bb4ce5 100644
--- a/src/core/test_core_api.c
+++ b/src/core/test_core_api.c
@@ -299,7 +299,7 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server,
299 /* connect p2 */ 299 /* connect p2 */
300 p2.ch = 300 p2.ch =
301 GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify, 301 GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
302 &disconnect_notify, NULL, &inbound_notify, 302 &disconnect_notify, &inbound_notify,
303 GNUNET_YES, &outbound_notify, GNUNET_YES, 303 GNUNET_YES, &outbound_notify, GNUNET_YES,
304 handlers); 304 handlers);
305 } 305 }
@@ -347,7 +347,7 @@ run (void *cls, char *const *args, const char *cfgfile,
347 &terminate_task_error, NULL); 347 &terminate_task_error, NULL);
348 p1.ch = 348 p1.ch =
349 GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify, 349 GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
350 &disconnect_notify, NULL, &inbound_notify, 350 &disconnect_notify, &inbound_notify,
351 GNUNET_YES, &outbound_notify, GNUNET_YES, handlers); 351 GNUNET_YES, &outbound_notify, GNUNET_YES, handlers);
352} 352}
353 353
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index a696c7cbd..895b72449 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -381,7 +381,7 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server,
381 OKPP; 381 OKPP;
382 /* connect p2 */ 382 /* connect p2 */
383 GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify, 383 GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
384 &disconnect_notify, NULL, &inbound_notify, GNUNET_YES, 384 &disconnect_notify, &inbound_notify, GNUNET_YES,
385 &outbound_notify, GNUNET_YES, handlers); 385 &outbound_notify, GNUNET_YES, handlers);
386 } 386 }
387 else 387 else
@@ -451,7 +451,7 @@ run (void *cls, char *const *args, const char *cfgfile,
451 err_task = 451 err_task =
452 GNUNET_SCHEDULER_add_delayed (TIMEOUT, &terminate_task_error, NULL); 452 GNUNET_SCHEDULER_add_delayed (TIMEOUT, &terminate_task_error, NULL);
453 GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify, 453 GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
454 &disconnect_notify, NULL, &inbound_notify, GNUNET_YES, 454 &disconnect_notify, &inbound_notify, GNUNET_YES,
455 &outbound_notify, GNUNET_YES, handlers); 455 &outbound_notify, GNUNET_YES, handlers);
456} 456}
457 457
diff --git a/src/core/test_core_api_send_to_self.c b/src/core/test_core_api_send_to_self.c
index 25651beb5..b7e2b449b 100644
--- a/src/core/test_core_api_send_to_self.c
+++ b/src/core/test_core_api_send_to_self.c
@@ -182,7 +182,7 @@ run (void *cls, char *const *args, const char *cfgfile,
182 "test_core_api_peer1.conf")); 182 "test_core_api_peer1.conf"));
183 183
184 core = 184 core =
185 GNUNET_CORE_connect (core_cfg, 42, NULL, &init, &connect_cb, NULL, NULL, 185 GNUNET_CORE_connect (core_cfg, 42, NULL, &init, &connect_cb, NULL,
186 NULL, 0, NULL, 0, handlers); 186 NULL, 0, NULL, 0, handlers);
187 187
188 die_task = 188 die_task =
diff --git a/src/core/test_core_api_start_only.c b/src/core/test_core_api_start_only.c
index 6b1f3da1c..744758191 100644
--- a/src/core/test_core_api_start_only.c
+++ b/src/core/test_core_api_start_only.c
@@ -127,7 +127,7 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server,
127 /* connect p2 */ 127 /* connect p2 */
128 p2.ch = 128 p2.ch =
129 GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify, 129 GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
130 &disconnect_notify, NULL, &inbound_notify, 130 &disconnect_notify, &inbound_notify,
131 GNUNET_YES, &outbound_notify, GNUNET_YES, 131 GNUNET_YES, &outbound_notify, GNUNET_YES,
132 handlers); 132 handlers);
133 } 133 }
@@ -190,7 +190,7 @@ run (void *cls, char *const *args, const char *cfgfile,
190 &timeout_task, NULL); 190 &timeout_task, NULL);
191 p1.ch = 191 p1.ch =
192 GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify, 192 GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
193 &disconnect_notify, NULL, &inbound_notify, 193 &disconnect_notify, &inbound_notify,
194 GNUNET_YES, &outbound_notify, GNUNET_YES, handlers); 194 GNUNET_YES, &outbound_notify, GNUNET_YES, handlers);
195} 195}
196 196
diff --git a/src/core/test_core_quota_compliance.c b/src/core/test_core_quota_compliance.c
index 5fce06b31..e3b760624 100644
--- a/src/core/test_core_quota_compliance.c
+++ b/src/core/test_core_quota_compliance.c
@@ -520,7 +520,7 @@ init_notify (void *cls, struct GNUNET_CORE_Handle *server,
520 OKPP; 520 OKPP;
521 /* connect p2 */ 521 /* connect p2 */
522 p2.ch = GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify, 522 p2.ch = GNUNET_CORE_connect (p2.cfg, 1, &p2, &init_notify, &connect_notify,
523 &disconnect_notify, NULL, &inbound_notify, GNUNET_YES, 523 &disconnect_notify, &inbound_notify, GNUNET_YES,
524 &outbound_notify, GNUNET_YES, handlers); 524 &outbound_notify, GNUNET_YES, handlers);
525 } 525 }
526 else 526 else
@@ -630,7 +630,7 @@ run (void *cls, char *const *args, const char *cfgfile,
630 &current_quota_p2_out)); 630 &current_quota_p2_out));
631 631
632 p1.ch = GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify, 632 p1.ch = GNUNET_CORE_connect (p1.cfg, 1, &p1, &init_notify, &connect_notify,
633 &disconnect_notify, NULL, &inbound_notify, GNUNET_YES, 633 &disconnect_notify, &inbound_notify, GNUNET_YES,
634 &outbound_notify, GNUNET_YES, handlers); 634 &outbound_notify, GNUNET_YES, handlers);
635} 635}
636 636
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index e1421e0f6..f4717711f 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -2053,7 +2053,6 @@ GDS_NEIGHBOURS_init ()
2053 &core_init, 2053 &core_init,
2054 &handle_core_connect, 2054 &handle_core_connect,
2055 &handle_core_disconnect, 2055 &handle_core_disconnect,
2056 NULL, /* Do we care about "status" updates? */
2057 NULL, GNUNET_NO, 2056 NULL, GNUNET_NO,
2058 NULL, GNUNET_NO, 2057 NULL, GNUNET_NO,
2059 core_handlers); 2058 core_handlers);
diff --git a/src/fs/gnunet-service-fs.c b/src/fs/gnunet-service-fs.c
index f2770df3e..d4728760d 100644
--- a/src/fs/gnunet-service-fs.c
+++ b/src/fs/gnunet-service-fs.c
@@ -508,7 +508,7 @@ main_init (struct GNUNET_SERVER_Handle *server,
508 NULL, &peer_init_handler, 508 NULL, &peer_init_handler,
509 &peer_connect_handler, 509 &peer_connect_handler,
510 &GSF_peer_disconnect_handler_, 510 &GSF_peer_disconnect_handler_,
511 &GSF_peer_status_handler_, NULL, GNUNET_NO, 511 NULL, GNUNET_NO,
512 NULL, GNUNET_NO, p2p_handlers); 512 NULL, GNUNET_NO, p2p_handlers);
513 if (NULL == GSF_core) 513 if (NULL == GSF_core)
514 { 514 {
diff --git a/src/fs/gnunet-service-fs_cp.c b/src/fs/gnunet-service-fs_cp.c
index 05e5bedef..0fed7b855 100644
--- a/src/fs/gnunet-service-fs_cp.c
+++ b/src/fs/gnunet-service-fs_cp.c
@@ -1503,32 +1503,6 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
1503 1503
1504 1504
1505/** 1505/**
1506 * Method called whenever a given peer has a status change.
1507 *
1508 * @param cls closure
1509 * @param peer peer identity this notification is about
1510 * @param bandwidth_in available amount of inbound bandwidth
1511 * @param bandwidth_out available amount of outbound bandwidth
1512 * @param timeout absolute time when this peer will time out
1513 * unless we see some further activity from it
1514 * @param atsi status information
1515 */
1516void
1517GSF_peer_status_handler_ (void *cls, const struct GNUNET_PeerIdentity *peer,
1518 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
1519 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
1520 struct GNUNET_TIME_Absolute timeout,
1521 const struct GNUNET_TRANSPORT_ATS_Information *atsi)
1522{
1523 struct GSF_ConnectedPeer *cp;
1524
1525 cp = GNUNET_CONTAINER_multihashmap_get (cp_map, &peer->hashPubKey);
1526 GNUNET_assert (NULL != cp);
1527 update_atsi (cp, atsi);
1528}
1529
1530
1531/**
1532 * A peer disconnected from us. Tear down the connected peer 1506 * A peer disconnected from us. Tear down the connected peer
1533 * record. 1507 * record.
1534 * 1508 *
diff --git a/src/fs/gnunet-service-fs_cp.h b/src/fs/gnunet-service-fs_cp.h
index 0f22b0280..4a238dce8 100644
--- a/src/fs/gnunet-service-fs_cp.h
+++ b/src/fs/gnunet-service-fs_cp.h
@@ -253,25 +253,6 @@ GSF_peer_update_responder_peer_ (struct GSF_ConnectedPeer *cp,
253 253
254 254
255/** 255/**
256 * Method called whenever a given peer has a status change.
257 *
258 * @param cls closure
259 * @param peer peer identity this notification is about
260 * @param bandwidth_in available amount of inbound bandwidth
261 * @param bandwidth_out available amount of outbound bandwidth
262 * @param timeout absolute time when this peer will time out
263 * unless we see some further activity from it
264 * @param atsi status information
265 */
266void
267GSF_peer_status_handler_ (void *cls, const struct GNUNET_PeerIdentity *peer,
268 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
269 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
270 struct GNUNET_TIME_Absolute timeout,
271 const struct GNUNET_TRANSPORT_ATS_Information *atsi);
272
273
274/**
275 * Handle P2P "MIGRATION_STOP" message. 256 * Handle P2P "MIGRATION_STOP" message.
276 * 257 *
277 * @param cls closure, always NULL 258 * @param cls closure, always NULL
diff --git a/src/hostlist/gnunet-daemon-hostlist.c b/src/hostlist/gnunet-daemon-hostlist.c
index 859f8498c..30f736002 100644
--- a/src/hostlist/gnunet-daemon-hostlist.c
+++ b/src/hostlist/gnunet-daemon-hostlist.c
@@ -259,7 +259,7 @@ run (void *cls, char *const *args, const char *cfgfile,
259 259
260 core = 260 core =
261 GNUNET_CORE_connect (cfg, 1, NULL, &core_init, &connect_handler, 261 GNUNET_CORE_connect (cfg, 1, NULL, &core_init, &connect_handler,
262 &disconnect_handler, NULL, NULL, GNUNET_NO, NULL, 262 &disconnect_handler, NULL, GNUNET_NO, NULL,
263 GNUNET_NO, 263 GNUNET_NO,
264 learning ? learn_handlers : no_learn_handlers); 264 learning ? learn_handlers : no_learn_handlers);
265 265
diff --git a/src/include/gnunet_ats_service.h b/src/include/gnunet_ats_service.h
index eb785afdd..33539bdaf 100644
--- a/src/include/gnunet_ats_service.h
+++ b/src/include/gnunet_ats_service.h
@@ -282,7 +282,8 @@ struct GNUNET_ATS_InformationRequestContext;
282 * @param preference increase incoming traffic share preference by this amount; 282 * @param preference increase incoming traffic share preference by this amount;
283 * in the absence of "amount" reservations, we use this 283 * in the absence of "amount" reservations, we use this
284 * preference value to assign proportional bandwidth shares 284 * preference value to assign proportional bandwidth shares
285 * to all connected peers 285 * to all connected peers; in the future, this should be
286 * replaced with more specific QoS expressions...
286 * @param info function to call with the resulting configuration information 287 * @param info function to call with the resulting configuration information
287 * @param info_cls closure for info 288 * @param info_cls closure for info
288 * @return NULL on error 289 * @return NULL on error
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h
index 366986b4b..24083f1a1 100644
--- a/src/include/gnunet_core_service.h
+++ b/src/include/gnunet_core_service.h
@@ -67,33 +67,6 @@ typedef void (*GNUNET_CORE_ConnectEventHandler) (void *cls,
67 67
68 68
69/** 69/**
70 * Method called whenever a given peer has a status change.
71 *
72 * @param cls closure
73 * @param peer peer identity this notification is about
74 * @param timeout absolute time when this peer will time out
75 * unless we see some further activity from it
76 * @param bandwidth_in available amount of inbound bandwidth
77 * @param bandwidth_out available amount of outbound bandwidth
78 * @param atsi performance data for the connection
79 */
80typedef void (*GNUNET_CORE_PeerStatusEventHandler) (void *cls,
81 const struct
82 GNUNET_PeerIdentity * peer,
83 struct
84 GNUNET_BANDWIDTH_Value32NBO
85 bandwidth_in,
86 struct
87 GNUNET_BANDWIDTH_Value32NBO
88 bandwidth_out,
89 struct GNUNET_TIME_Absolute
90 timeout,
91 const struct
92 GNUNET_TRANSPORT_ATS_Information
93 * atsi);
94
95
96/**
97 * Method called whenever a peer disconnects. 70 * Method called whenever a peer disconnects.
98 * 71 *
99 * @param cls closure 72 * @param cls closure
@@ -186,7 +159,6 @@ typedef void (*GNUNET_CORE_StartupCallback) (void *cls,
186 * connected to the core service; note that timeout is only meaningful if init is not NULL 159 * connected to the core service; note that timeout is only meaningful if init is not NULL
187 * @param connects function to call on peer connect, can be NULL 160 * @param connects function to call on peer connect, can be NULL
188 * @param disconnects function to call on peer disconnect / timeout, can be NULL 161 * @param disconnects function to call on peer disconnect / timeout, can be NULL
189 * @param status_events function to call on peer status changes, can be NULL
190 * @param inbound_notify function to call for all inbound messages, can be NULL 162 * @param inbound_notify function to call for all inbound messages, can be NULL
191 * note that the core is allowed to drop notifications about inbound 163 * note that the core is allowed to drop notifications about inbound
192 * messages if the client does not process them fast enough (for this 164 * messages if the client does not process them fast enough (for this
@@ -220,7 +192,6 @@ GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
220 GNUNET_CORE_StartupCallback init, 192 GNUNET_CORE_StartupCallback init,
221 GNUNET_CORE_ConnectEventHandler connects, 193 GNUNET_CORE_ConnectEventHandler connects,
222 GNUNET_CORE_DisconnectEventHandler disconnects, 194 GNUNET_CORE_DisconnectEventHandler disconnects,
223 GNUNET_CORE_PeerStatusEventHandler status_events,
224 GNUNET_CORE_MessageCallback inbound_notify, 195 GNUNET_CORE_MessageCallback inbound_notify,
225 int inbound_hdr_only, 196 int inbound_hdr_only,
226 GNUNET_CORE_MessageCallback outbound_notify, 197 GNUNET_CORE_MessageCallback outbound_notify,
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index 1b95d847b..31f6e0b4c 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -402,12 +402,6 @@ extern "C"
402#define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 71 402#define GNUNET_MESSAGE_TYPE_CORE_NOTIFY_OUTBOUND 71
403 403
404/** 404/**
405 * Response from server about (possibly updated) P2P
406 * connection configuration.
407 */
408#define GNUNET_MESSAGE_TYPE_CORE_CONFIGURATION_INFO 73
409
410/**
411 * Request from client to transmit message. 405 * Request from client to transmit message.
412 */ 406 */
413#define GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST 74 407#define GNUNET_MESSAGE_TYPE_CORE_SEND_REQUEST 74
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c
index 8d6780493..e76d440cf 100644
--- a/src/mesh/gnunet-service-mesh.c
+++ b/src/mesh/gnunet-service-mesh.c
@@ -3370,7 +3370,6 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
3370 &core_init, /* Call core_init once connected */ 3370 &core_init, /* Call core_init once connected */
3371 &core_connect, /* Handle connects */ 3371 &core_connect, /* Handle connects */
3372 &core_disconnect, /* remove peers on disconnects */ 3372 &core_disconnect, /* remove peers on disconnects */
3373 NULL, /* Do we care about "status" updates? */
3374 NULL, /* Don't notify about all incoming messages */ 3373 NULL, /* Don't notify about all incoming messages */
3375 GNUNET_NO, /* For header only in notification */ 3374 GNUNET_NO, /* For header only in notification */
3376 NULL, /* Don't notify about all outbound messages */ 3375 NULL, /* Don't notify about all outbound messages */
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c
index 4e510e596..9c2af545b 100644
--- a/src/mesh/mesh_api.c
+++ b/src/mesh/mesh_api.c
@@ -872,7 +872,7 @@ GNUNET_MESH_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, void *cls,
872 872
873 ret->core = 873 ret->core =
874 GNUNET_CORE_connect (cfg, 42, ret, &core_startup, &core_connect, 874 GNUNET_CORE_connect (cfg, 42, ret, &core_startup, &core_connect,
875 &core_disconnect, NULL, NULL, GNUNET_NO, NULL, 875 &core_disconnect, NULL, GNUNET_NO, NULL,
876 GNUNET_NO, core_handlers); 876 GNUNET_NO, core_handlers);
877 ret->transport = 877 ret->transport =
878 GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL, NULL, NULL); 878 GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL, NULL, NULL);
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index 47014fd60..7000ec602 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -1360,7 +1360,6 @@ run (void *cls, struct GNUNET_SERVER_Handle *server,
1360 &core_init, /* Call core_init once connected */ 1360 &core_init, /* Call core_init once connected */
1361 &handle_core_connect, /* Handle connects */ 1361 &handle_core_connect, /* Handle connects */
1362 &handle_core_disconnect, /* Handle disconnects */ 1362 &handle_core_disconnect, /* Handle disconnects */
1363 NULL, /* Do we care about "status" updates? */
1364 NULL, /* Don't want notified about all incoming messages */ 1363 NULL, /* Don't want notified about all incoming messages */
1365 GNUNET_NO, /* For header only inbound notification */ 1364 GNUNET_NO, /* For header only inbound notification */
1366 NULL, /* Don't want notified about all outbound messages */ 1365 NULL, /* Don't want notified about all outbound messages */
diff --git a/src/testing/testing.c b/src/testing/testing.c
index ca7ed6376..df2a67668 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -1994,7 +1994,7 @@ reattempt_daemons_connect (void *cls,
1994 ctx->d1core_ready = GNUNET_NO; 1994 ctx->d1core_ready = GNUNET_NO;
1995 ctx->d1core = 1995 ctx->d1core =
1996 GNUNET_CORE_connect (ctx->d1->cfg, 1, ctx, &core_init_notify, 1996 GNUNET_CORE_connect (ctx->d1->cfg, 1, ctx, &core_init_notify,
1997 &connect_notify, NULL, NULL, NULL, GNUNET_NO, NULL, 1997 &connect_notify, NULL, NULL, GNUNET_NO, NULL,
1998 GNUNET_NO, no_handlers); 1998 GNUNET_NO, no_handlers);
1999 if (ctx->d1core == NULL) 1999 if (ctx->d1core == NULL)
2000 { 2000 {
@@ -2115,7 +2115,7 @@ core_initial_iteration (void *cls, const struct GNUNET_PeerIdentity *peer,
2115#endif 2115#endif
2116 ctx->d1core = 2116 ctx->d1core =
2117 GNUNET_CORE_connect (ctx->d1->cfg, 1, ctx, &core_init_notify, 2117 GNUNET_CORE_connect (ctx->d1->cfg, 1, ctx, &core_init_notify,
2118 &connect_notify, NULL, NULL, NULL, GNUNET_NO, NULL, 2118 &connect_notify, NULL, NULL, GNUNET_NO, NULL,
2119 GNUNET_NO, no_handlers); 2119 GNUNET_NO, no_handlers);
2120 } 2120 }
2121 2121
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index e8704552b..1616ab613 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -1278,7 +1278,7 @@ run (void *cls, char *const *args, const char *cfgfile,
1278 transport = GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL, NULL, NULL); 1278 transport = GNUNET_TRANSPORT_connect (cfg, NULL, NULL, NULL, NULL, NULL);
1279 handle = 1279 handle =
1280 GNUNET_CORE_connect (cfg, 1, NULL, &core_init, &connect_notify, 1280 GNUNET_CORE_connect (cfg, 1, NULL, &core_init, &connect_notify,
1281 &disconnect_notify, NULL, NULL, GNUNET_NO, NULL, 1281 &disconnect_notify, NULL, GNUNET_NO, NULL,
1282 GNUNET_NO, handlers); 1282 GNUNET_NO, handlers);
1283 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleaning_task, 1283 GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_FOREVER_REL, &cleaning_task,
1284 NULL); 1284 NULL);