diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-09 13:21:48 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-09 13:21:48 +0000 |
commit | b9e7bbea6e7628e77fdbcfdd6832587a07d43658 (patch) | |
tree | 2b885562e701d3cc5c11ec07d2051b08ed4c05bf | |
parent | f0ac323a4bae4dd87c96bf6d2e9980ec9952df8b (diff) | |
download | gnunet-b9e7bbea6e7628e77fdbcfdd6832587a07d43658.tar.gz gnunet-b9e7bbea6e7628e77fdbcfdd6832587a07d43658.zip |
misc train hacking
-rw-r--r-- | TODO | 14 | ||||
-rw-r--r-- | src/include/gnunet_resolver_service.h | 2 | ||||
-rw-r--r-- | src/testing/testing.c | 2 | ||||
-rw-r--r-- | src/testing/testing_peergroup.c | 1 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport-new.c | 3 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_blacklist.c | 2 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_clients.c | 2 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_neighbours.c | 37 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_plugins.c | 1 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_validation.c | 9 | ||||
-rw-r--r-- | src/transport/gnunet-service-transport_validation.h | 2 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp.c | 15 | ||||
-rw-r--r-- | src/util/resolver_api.c | 2 |
13 files changed, 44 insertions, 48 deletions
@@ -1,14 +1,5 @@ | |||
1 | 0.9.0pre3: | 1 | 0.9.0pre3: |
2 | * connections fail if transport-plugin/nat produces | 2 | * clean buildbots (with new transport) |
3 | some addresses that don't work (enable 'use_localaddr' with bindto for example, | ||
4 | so that some of the 'local' IPs do not work due to the bindto); the result | ||
5 | seems to be that the plugin tries some of the broken addresses, fails and the | ||
6 | transport-level connection never comes up. | ||
7 | [still an issue?] | ||
8 | * transport: | ||
9 | - explicit CONNECT: add timestamp | ||
10 | - explicit DISCONNECT: add signature | ||
11 | * clean buildbots | ||
12 | 3 | ||
13 | 0.9.0pre4: | 4 | 0.9.0pre4: |
14 | * GNUNET-GTK: [CG] | 5 | * GNUNET-GTK: [CG] |
@@ -23,6 +14,9 @@ | |||
23 | + insert | 14 | + insert |
24 | + download | 15 | + download |
25 | + search | 16 | + search |
17 | * transport: | ||
18 | - explicit DISCONNECT: add signature, create message... | ||
19 | - CONNECT: actually consider switching session... | ||
26 | 20 | ||
27 | 0.9.0: | 21 | 0.9.0: |
28 | * new webpage: | 22 | * new webpage: |
diff --git a/src/include/gnunet_resolver_service.h b/src/include/gnunet_resolver_service.h index ca6544e94..86499a8c0 100644 --- a/src/include/gnunet_resolver_service.h +++ b/src/include/gnunet_resolver_service.h | |||
@@ -94,7 +94,6 @@ GNUNET_RESOLVER_ip_get (const char *hostname, int domain, | |||
94 | /** | 94 | /** |
95 | * Resolve our hostname to an IP address. | 95 | * Resolve our hostname to an IP address. |
96 | * | 96 | * |
97 | * @param cfg configuration to use | ||
98 | * @param domain AF_INET or AF_INET6; use AF_UNSPEC for "any" | 97 | * @param domain AF_INET or AF_INET6; use AF_UNSPEC for "any" |
99 | * @param callback function to call with addresses | 98 | * @param callback function to call with addresses |
100 | * @param cls closure for callback | 99 | * @param cls closure for callback |
@@ -130,7 +129,6 @@ GNUNET_RESOLVER_local_fqdn_get (void); | |||
130 | /** | 129 | /** |
131 | * Perform a reverse DNS lookup. | 130 | * Perform a reverse DNS lookup. |
132 | * | 131 | * |
133 | * @param cfg configuration to use | ||
134 | * @param sa host address | 132 | * @param sa host address |
135 | * @param salen length of host address | 133 | * @param salen length of host address |
136 | * @param do_resolve use GNUNET_NO to return numeric hostname | 134 | * @param do_resolve use GNUNET_NO to return numeric hostname |
diff --git a/src/testing/testing.c b/src/testing/testing.c index 78ed39e4a..65446eb77 100644 --- a/src/testing/testing.c +++ b/src/testing/testing.c | |||
@@ -1418,8 +1418,6 @@ GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d, | |||
1418 | * @param timeout how long to wait for process for shutdown to complete | 1418 | * @param timeout how long to wait for process for shutdown to complete |
1419 | * @param cb function called once the daemon was stopped | 1419 | * @param cb function called once the daemon was stopped |
1420 | * @param cb_cls closure for cb | 1420 | * @param cb_cls closure for cb |
1421 | * @param allow_restart GNUNET_YES to restart peer later (using this API) | ||
1422 | * GNUNET_NO to kill off and clean up for good | ||
1423 | */ | 1421 | */ |
1424 | void | 1422 | void |
1425 | GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d, | 1423 | GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d, |
diff --git a/src/testing/testing_peergroup.c b/src/testing/testing_peergroup.c index ba25a62bd..90c0f0373 100644 --- a/src/testing/testing_peergroup.c +++ b/src/testing/testing_peergroup.c | |||
@@ -599,7 +599,6 @@ internal_hostkey_callback (void *cls, const struct GNUNET_PeerIdentity *id, | |||
599 | * @param cls closure | 599 | * @param cls closure |
600 | * @param first peer id for first daemon | 600 | * @param first peer id for first daemon |
601 | * @param second peer id for the second daemon | 601 | * @param second peer id for the second daemon |
602 | * @param distance distance between the connected peers | ||
603 | * @param emsg error message (NULL on success) | 602 | * @param emsg error message (NULL on success) |
604 | */ | 603 | */ |
605 | void | 604 | void |
diff --git a/src/transport/gnunet-service-transport-new.c b/src/transport/gnunet-service-transport-new.c index f4a39a1e6..4b1becacd 100644 --- a/src/transport/gnunet-service-transport-new.c +++ b/src/transport/gnunet-service-transport-new.c | |||
@@ -201,7 +201,8 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
201 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT: | 201 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT: |
202 | (void) GST_blacklist_test_allowed (peer, NULL, &try_connect_if_allowed, | 202 | (void) GST_blacklist_test_allowed (peer, NULL, &try_connect_if_allowed, |
203 | NULL); | 203 | NULL); |
204 | /* TODO: if 'session != NULL', maybe notify ATS that this is now the preferred | 204 | /* TODO: if 'session != NULL', and timestamp more recent than the |
205 | previous one, maybe notify ATS that this is now the preferred | ||
205 | * way to communicate with this peer (other peer switched transport) */ | 206 | * way to communicate with this peer (other peer switched transport) */ |
206 | break; | 207 | break; |
207 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT: | 208 | case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT: |
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c index 36abbf85c..a73aa17c1 100644 --- a/src/transport/gnunet-service-transport_blacklist.c +++ b/src/transport/gnunet-service-transport_blacklist.c | |||
@@ -547,7 +547,7 @@ struct TestConnectionContext | |||
547 | * blacklisting client. | 547 | * blacklisting client. |
548 | * | 548 | * |
549 | * @param cls the 'struct TestConnectionContest' | 549 | * @param cls the 'struct TestConnectionContest' |
550 | * @param pid neighbour's identity | 550 | * @param neighbour neighbour's identity |
551 | * @param ats performance data | 551 | * @param ats performance data |
552 | * @param ats_count number of entries in ats (excluding 0-termination) | 552 | * @param ats_count number of entries in ats (excluding 0-termination) |
553 | */ | 553 | */ |
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c index 8676f335e..7e519a547 100644 --- a/src/transport/gnunet-service-transport_clients.c +++ b/src/transport/gnunet-service-transport_clients.c | |||
@@ -228,7 +228,7 @@ transmit_to_client_callback (void *cls, size_t size, void *buf) | |||
228 | /** | 228 | /** |
229 | * Queue the given message for transmission to the given client | 229 | * Queue the given message for transmission to the given client |
230 | * | 230 | * |
231 | * @param client target of the message | 231 | * @param tc target of the message |
232 | * @param msg message to transmit | 232 | * @param msg message to transmit |
233 | * @param may_drop GNUNET_YES if the message can be dropped | 233 | * @param may_drop GNUNET_YES if the message can be dropped |
234 | */ | 234 | */ |
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c index 9c6aaba67..6e3ee8a71 100644 --- a/src/transport/gnunet-service-transport_neighbours.c +++ b/src/transport/gnunet-service-transport_neighbours.c | |||
@@ -51,6 +51,32 @@ | |||
51 | */ | 51 | */ |
52 | struct NeighbourMapEntry; | 52 | struct NeighbourMapEntry; |
53 | 53 | ||
54 | /** | ||
55 | * Message a peer sends to another to indicate its | ||
56 | * preference for communicating via a particular | ||
57 | * session (and the desire to establish a real | ||
58 | * connection). | ||
59 | */ | ||
60 | struct SessionConnectMessage | ||
61 | { | ||
62 | /** | ||
63 | * Header of type 'GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT' | ||
64 | */ | ||
65 | struct GNUNET_MessageHeader header; | ||
66 | |||
67 | /** | ||
68 | * Always zero. | ||
69 | */ | ||
70 | uint32_t reserved GNUNET_PACKED; | ||
71 | |||
72 | /** | ||
73 | * Absolute time at the sender. Only the most recent connect | ||
74 | * message implies which session is preferred by the sender. | ||
75 | */ | ||
76 | struct GNUNET_TIME_AbsoluteNBO timestamp; | ||
77 | |||
78 | }; | ||
79 | |||
54 | 80 | ||
55 | /** | 81 | /** |
56 | * For each neighbour we keep a list of messages | 82 | * For each neighbour we keep a list of messages |
@@ -288,7 +314,7 @@ transmit_send_continuation (void *cls, | |||
288 | * Check the ready list for the given neighbour and if a plugin is | 314 | * Check the ready list for the given neighbour and if a plugin is |
289 | * ready for transmission (and if we have a message), do so! | 315 | * ready for transmission (and if we have a message), do so! |
290 | * | 316 | * |
291 | * @param neighbour target peer for which to transmit | 317 | * @param n target peer for which to transmit |
292 | */ | 318 | */ |
293 | static void | 319 | static void |
294 | try_transmission_to_peer (struct NeighbourMapEntry *n) | 320 | try_transmission_to_peer (struct NeighbourMapEntry *n) |
@@ -520,7 +546,7 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | |||
520 | *ats, uint32_t ats_count) | 546 | *ats, uint32_t ats_count) |
521 | { | 547 | { |
522 | struct NeighbourMapEntry *n; | 548 | struct NeighbourMapEntry *n; |
523 | struct GNUNET_MessageHeader connect_msg; | 549 | struct SessionConnectMessage connect_msg; |
524 | 550 | ||
525 | GNUNET_assert (neighbours != NULL); | 551 | GNUNET_assert (neighbours != NULL); |
526 | 552 | ||
@@ -555,8 +581,10 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | |||
555 | n->timeout_task = | 581 | n->timeout_task = |
556 | GNUNET_SCHEDULER_add_delayed (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, | 582 | GNUNET_SCHEDULER_add_delayed (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT, |
557 | &neighbour_timeout_task, n); | 583 | &neighbour_timeout_task, n); |
558 | connect_msg.size = htons (sizeof (struct GNUNET_MessageHeader)); | 584 | connect_msg.header.size = htons (sizeof (struct SessionConnectMessage)); |
559 | connect_msg.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT); | 585 | connect_msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT); |
586 | connect_msg.reserved = htonl (0); | ||
587 | connect_msg.timestamp = GNUNET_TIME_absolute_hton (GNUNET_TIME_absolute_get ()); | ||
560 | GST_neighbours_send (peer, &connect_msg, sizeof (connect_msg), | 588 | GST_neighbours_send (peer, &connect_msg, sizeof (connect_msg), |
561 | GNUNET_TIME_UNIT_FOREVER_REL, NULL, NULL); | 589 | GNUNET_TIME_UNIT_FOREVER_REL, NULL, NULL); |
562 | } | 590 | } |
@@ -570,6 +598,7 @@ GST_neighbours_switch_to_address (const struct GNUNET_PeerIdentity *peer, | |||
570 | * @param plugin_name name of the plugin | 598 | * @param plugin_name name of the plugin |
571 | * @param plugin_address binary address | 599 | * @param plugin_address binary address |
572 | * @param plugin_address_len length of address | 600 | * @param plugin_address_len length of address |
601 | * @param session session to use | ||
573 | * @param bandwidth available bandwidth | 602 | * @param bandwidth available bandwidth |
574 | * @param ats performance data for the address (as far as known) | 603 | * @param ats performance data for the address (as far as known) |
575 | * @param ats_count number of performance records in 'ats' | 604 | * @param ats_count number of performance records in 'ats' |
diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c index 12ee231c4..52fcf661d 100644 --- a/src/transport/gnunet-service-transport_plugins.c +++ b/src/transport/gnunet-service-transport_plugins.c | |||
@@ -87,7 +87,6 @@ static struct TransportPlugin *plugins_tail; | |||
87 | * | 87 | * |
88 | * @param recv_cb function to call when data is received | 88 | * @param recv_cb function to call when data is received |
89 | * @param address_cb function to call when our public addresses changed | 89 | * @param address_cb function to call when our public addresses changed |
90 | * @param traffic_cb function to call for flow control | ||
91 | * @param session_end_cb function to call when a session was terminated | 90 | * @param session_end_cb function to call when a session was terminated |
92 | */ | 91 | */ |
93 | void | 92 | void |
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c index 56b4037b4..57fa86260 100644 --- a/src/transport/gnunet-service-transport_validation.c +++ b/src/transport/gnunet-service-transport_validation.c | |||
@@ -335,9 +335,6 @@ validation_entry_match (void *cls, const GNUNET_HashCode * key, void *value) | |||
335 | * @param public_key public key of the peer, NULL for unknown | 335 | * @param public_key public key of the peer, NULL for unknown |
336 | * @param neighbour which peer we care about | 336 | * @param neighbour which peer we care about |
337 | * @param tname name of the transport plugin | 337 | * @param tname name of the transport plugin |
338 | * @param session session to look for, NULL for 'any'; otherwise | ||
339 | * can be used for the service to "learn" this session ID | ||
340 | * if 'addr' matches | ||
341 | * @param addr binary address | 338 | * @param addr binary address |
342 | * @param addrlen length of addr | 339 | * @param addrlen length of addr |
343 | * @return validation entry matching the given specifications, NULL | 340 | * @return validation entry matching the given specifications, NULL |
@@ -425,7 +422,7 @@ add_valid_address (void *cls, const char *tname, | |||
425 | * @param cls unused | 422 | * @param cls unused |
426 | * @param peer id of the peer, NULL for last call | 423 | * @param peer id of the peer, NULL for last call |
427 | * @param hello hello message for the peer (can be NULL) | 424 | * @param hello hello message for the peer (can be NULL) |
428 | * @param error message | 425 | * @param err_msg error message |
429 | */ | 426 | */ |
430 | static void | 427 | static void |
431 | process_peerinfo_hello (void *cls, const struct GNUNET_PeerIdentity *peer, | 428 | process_peerinfo_hello (void *cls, const struct GNUNET_PeerIdentity *peer, |
@@ -1077,12 +1074,8 @@ iterate_addresses (void *cls, const GNUNET_HashCode * key, void *value) | |||
1077 | * Can either give a snapshot (synchronous API) or be continuous. | 1074 | * Can either give a snapshot (synchronous API) or be continuous. |
1078 | * | 1075 | * |
1079 | * @param target peer information is requested for | 1076 | * @param target peer information is requested for |
1080 | * @param snapshot_only GNUNET_YES to iterate over addresses once, GNUNET_NO to | ||
1081 | * continue to give information about addresses as it evolves | ||
1082 | * @param cb function to call; will not be called after this function returns | 1077 | * @param cb function to call; will not be called after this function returns |
1083 | * if snapshot_only is GNUNET_YES | ||
1084 | * @param cb_cls closure for 'cb' | 1078 | * @param cb_cls closure for 'cb' |
1085 | * @return context to cancel, NULL if 'snapshot_only' is GNUNET_YES | ||
1086 | */ | 1079 | */ |
1087 | void | 1080 | void |
1088 | GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target, | 1081 | GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target, |
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h index 1840c0919..06370161c 100644 --- a/src/transport/gnunet-service-transport_validation.h +++ b/src/transport/gnunet-service-transport_validation.h | |||
@@ -122,9 +122,7 @@ typedef void (*GST_ValidationAddressCallback) (void *cls, | |||
122 | * | 122 | * |
123 | * @param target peer information is requested for | 123 | * @param target peer information is requested for |
124 | * @param cb function to call; will not be called after this function returns | 124 | * @param cb function to call; will not be called after this function returns |
125 | * if snapshot_only is GNUNET_YES | ||
126 | * @param cb_cls closure for 'cb' | 125 | * @param cb_cls closure for 'cb' |
127 | * @return context to cancel, NULL if 'snapshot_only' is GNUNET_YES | ||
128 | */ | 126 | */ |
129 | void | 127 | void |
130 | GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target, | 128 | GST_validation_get_addresses (const struct GNUNET_PeerIdentity *target, |
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index cced16ffd..3a69273c5 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -335,19 +335,8 @@ udp_disconnect (void *cls, const struct GNUNET_PeerIdentity *target) | |||
335 | * Actually send out the message. | 335 | * Actually send out the message. |
336 | * | 336 | * |
337 | * @param plugin the plugin | 337 | * @param plugin the plugin |
338 | * @param send_handle which handle to send message on | 338 | * @param sa the address to send the message to |
339 | * @param target who should receive this message (ignored by UDP) | 339 | * @param msg message to transmit |
340 | * @param msgbuf one or more GNUNET_MessageHeader(s) strung together | ||
341 | * @param msgbuf_size the size of the msgbuf to send | ||
342 | * @param priority how important is the message (ignored by UDP) | ||
343 | * @param timeout when should we time out (give up) if we can not transmit? | ||
344 | * @param addr the addr to send the message to, needs to be a sockaddr for us | ||
345 | * @param addrlen the len of addr | ||
346 | * @param cont continuation to call once the message has | ||
347 | * been transmitted (or if the transport is ready | ||
348 | * for the next transmission call; or if the | ||
349 | * peer disconnected...) | ||
350 | * @param cont_cls closure for cont | ||
351 | * @return the number of bytes written | 340 | * @return the number of bytes written |
352 | */ | 341 | */ |
353 | static ssize_t | 342 | static ssize_t |
diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index 87b7bbd46..a59b9639f 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c | |||
@@ -582,8 +582,6 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
582 | 582 | ||
583 | /** | 583 | /** |
584 | * Process pending requests to the resolver. | 584 | * Process pending requests to the resolver. |
585 | * | ||
586 | * @param h handle to the resolver | ||
587 | */ | 585 | */ |
588 | static void | 586 | static void |
589 | process_requests () | 587 | process_requests () |