diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-08-04 08:13:54 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-08-04 08:13:54 +0000 |
commit | 5d24c89f54f14026da55d964f6ea4735fdf96665 (patch) | |
tree | 7821ee137cf432ee262d91eb70180295cdc33866 /src/transport/gnunet-service-transport.c | |
parent | 4be3bd14be40dd9686479e43591159fb26d9b0ea (diff) | |
download | gnunet-5d24c89f54f14026da55d964f6ea4735fdf96665.tar.gz gnunet-5d24c89f54f14026da55d964f6ea4735fdf96665.zip |
rename neighbourlist to neighbourmapentry
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r-- | src/transport/gnunet-service-transport.c | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c index 8dc826e50..f05bf2336 100644 --- a/src/transport/gnunet-service-transport.c +++ b/src/transport/gnunet-service-transport.c | |||
@@ -333,7 +333,7 @@ struct TransportPlugin | |||
333 | struct GNUNET_CONTAINER_MultiHashMap *blacklist; | 333 | struct GNUNET_CONTAINER_MultiHashMap *blacklist; |
334 | }; | 334 | }; |
335 | 335 | ||
336 | struct NeighbourList; | 336 | struct NeighbourMapEntry; |
337 | 337 | ||
338 | /** | 338 | /** |
339 | * For each neighbour we keep a list of messages | 339 | * For each neighbour we keep a list of messages |
@@ -434,14 +434,14 @@ struct ReadyList | |||
434 | /** | 434 | /** |
435 | * To which neighbour does this ready list belong to? | 435 | * To which neighbour does this ready list belong to? |
436 | */ | 436 | */ |
437 | struct NeighbourList *neighbour; | 437 | struct NeighbourMapEntry *neighbour; |
438 | }; | 438 | }; |
439 | 439 | ||
440 | 440 | ||
441 | /** | 441 | /** |
442 | * Entry in neighbours. (not a 'List' -- bad name!) | 442 | * Entry in neighbours. |
443 | */ | 443 | */ |
444 | struct NeighbourList | 444 | struct NeighbourMapEntry |
445 | { | 445 | { |
446 | 446 | ||
447 | /** | 447 | /** |
@@ -951,7 +951,7 @@ struct GNUNET_TIME_Relative ats_regular_interval; | |||
951 | * disconnected or must we ask all plugins to | 951 | * disconnected or must we ask all plugins to |
952 | * disconnect? | 952 | * disconnect? |
953 | */ | 953 | */ |
954 | static void disconnect_neighbour (struct NeighbourList *n, int check); | 954 | static void disconnect_neighbour (struct NeighbourMapEntry *n, int check); |
955 | 955 | ||
956 | /** | 956 | /** |
957 | * Check the ready list for the given neighbour and if a plugin is | 957 | * Check the ready list for the given neighbour and if a plugin is |
@@ -959,17 +959,17 @@ static void disconnect_neighbour (struct NeighbourList *n, int check); | |||
959 | * | 959 | * |
960 | * @param nexi target peer for which to transmit | 960 | * @param nexi target peer for which to transmit |
961 | */ | 961 | */ |
962 | static void try_transmission_to_peer (struct NeighbourList *n); | 962 | static void try_transmission_to_peer (struct NeighbourMapEntry *n); |
963 | 963 | ||
964 | struct ForeignAddressList * get_preferred_ats_address ( | 964 | struct ForeignAddressList * get_preferred_ats_address ( |
965 | struct NeighbourList *n); | 965 | struct NeighbourMapEntry *n); |
966 | 966 | ||
967 | /** | 967 | /** |
968 | * Find an entry in the neighbour list for a particular peer. | 968 | * Find an entry in the neighbour list for a particular peer. |
969 | * | 969 | * |
970 | * @return NULL if not found. | 970 | * @return NULL if not found. |
971 | */ | 971 | */ |
972 | static struct NeighbourList * | 972 | static struct NeighbourMapEntry * |
973 | find_neighbour (const struct GNUNET_PeerIdentity *key) | 973 | find_neighbour (const struct GNUNET_PeerIdentity *key) |
974 | { | 974 | { |
975 | return GNUNET_CONTAINER_multihashmap_get (neighbours, &key->hashPubKey); | 975 | return GNUNET_CONTAINER_multihashmap_get (neighbours, &key->hashPubKey); |
@@ -1494,7 +1494,7 @@ transmit_to_client (struct TransportClient *client, | |||
1494 | */ | 1494 | */ |
1495 | static void | 1495 | static void |
1496 | transmit_send_ok (struct TransportClient *client, | 1496 | transmit_send_ok (struct TransportClient *client, |
1497 | struct NeighbourList *n, | 1497 | struct NeighbourMapEntry *n, |
1498 | const struct GNUNET_PeerIdentity *target, | 1498 | const struct GNUNET_PeerIdentity *target, |
1499 | int result) | 1499 | int result) |
1500 | { | 1500 | { |
@@ -1532,7 +1532,7 @@ static void | |||
1532 | retry_transmission_task (void *cls, | 1532 | retry_transmission_task (void *cls, |
1533 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 1533 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
1534 | { | 1534 | { |
1535 | struct NeighbourList *n = cls; | 1535 | struct NeighbourMapEntry *n = cls; |
1536 | 1536 | ||
1537 | n->retry_task = GNUNET_SCHEDULER_NO_TASK; | 1537 | n->retry_task = GNUNET_SCHEDULER_NO_TASK; |
1538 | try_transmission_to_peer (n); | 1538 | try_transmission_to_peer (n); |
@@ -1559,7 +1559,7 @@ transmit_send_continuation (void *cls, | |||
1559 | int result) | 1559 | int result) |
1560 | { | 1560 | { |
1561 | struct MessageQueue *mq = cls; | 1561 | struct MessageQueue *mq = cls; |
1562 | struct NeighbourList *n; | 1562 | struct NeighbourMapEntry *n; |
1563 | 1563 | ||
1564 | GNUNET_STATISTICS_update (stats, | 1564 | GNUNET_STATISTICS_update (stats, |
1565 | gettext_noop ("# bytes pending with plugins"), | 1565 | gettext_noop ("# bytes pending with plugins"), |
@@ -1633,7 +1633,7 @@ transmit_send_continuation (void *cls, | |||
1633 | * @param neighbour target peer for which to transmit | 1633 | * @param neighbour target peer for which to transmit |
1634 | */ | 1634 | */ |
1635 | static void | 1635 | static void |
1636 | try_transmission_to_peer (struct NeighbourList *n) | 1636 | try_transmission_to_peer (struct NeighbourMapEntry *n) |
1637 | { | 1637 | { |
1638 | struct ReadyList *rl; | 1638 | struct ReadyList *rl; |
1639 | struct MessageQueue *mq; | 1639 | struct MessageQueue *mq; |
@@ -1790,7 +1790,7 @@ transmit_to_peer (struct TransportClient *client, | |||
1790 | struct GNUNET_TIME_Relative timeout, | 1790 | struct GNUNET_TIME_Relative timeout, |
1791 | const char *message_buf, | 1791 | const char *message_buf, |
1792 | size_t message_buf_size, | 1792 | size_t message_buf_size, |
1793 | int is_internal, struct NeighbourList *neighbour) | 1793 | int is_internal, struct NeighbourMapEntry *neighbour) |
1794 | { | 1794 | { |
1795 | struct MessageQueue *mq; | 1795 | struct MessageQueue *mq; |
1796 | 1796 | ||
@@ -1848,7 +1848,7 @@ transmit_to_peer (struct TransportClient *client, | |||
1848 | * @param n neighbour to PING | 1848 | * @param n neighbour to PING |
1849 | */ | 1849 | */ |
1850 | static void | 1850 | static void |
1851 | transmit_plain_ping (struct NeighbourList *n) | 1851 | transmit_plain_ping (struct NeighbourMapEntry *n) |
1852 | { | 1852 | { |
1853 | struct ValidationEntry *ve; | 1853 | struct ValidationEntry *ve; |
1854 | struct TransportPingMessage ping; | 1854 | struct TransportPingMessage ping; |
@@ -2030,7 +2030,7 @@ mark_address_connected(struct ForeignAddressList *fal) | |||
2030 | * @return selected address, NULL if we have none | 2030 | * @return selected address, NULL if we have none |
2031 | */ | 2031 | */ |
2032 | struct ForeignAddressList * | 2032 | struct ForeignAddressList * |
2033 | find_ready_address(struct NeighbourList *neighbour) | 2033 | find_ready_address(struct NeighbourMapEntry *neighbour) |
2034 | { | 2034 | { |
2035 | struct ReadyList *head = neighbour->plugins; | 2035 | struct ReadyList *head = neighbour->plugins; |
2036 | struct ForeignAddressList *addresses; | 2036 | struct ForeignAddressList *addresses; |
@@ -2181,7 +2181,7 @@ transmit_our_hello_if_pong (void *cls, | |||
2181 | const GNUNET_HashCode *key, | 2181 | const GNUNET_HashCode *key, |
2182 | void *value) | 2182 | void *value) |
2183 | { | 2183 | { |
2184 | struct NeighbourList *npos = value; | 2184 | struct NeighbourMapEntry *npos = value; |
2185 | 2185 | ||
2186 | if (GNUNET_YES != npos->received_pong) | 2186 | if (GNUNET_YES != npos->received_pong) |
2187 | return GNUNET_OK; | 2187 | return GNUNET_OK; |
@@ -2307,7 +2307,7 @@ remove_session_validations (void *cls, | |||
2307 | */ | 2307 | */ |
2308 | static void | 2308 | static void |
2309 | try_fast_reconnect (struct TransportPlugin *p, | 2309 | try_fast_reconnect (struct TransportPlugin *p, |
2310 | struct NeighbourList *nl) | 2310 | struct NeighbourMapEntry *nl) |
2311 | { | 2311 | { |
2312 | /* FIXME-MW: fast reconnect / transport switching not implemented... */ | 2312 | /* FIXME-MW: fast reconnect / transport switching not implemented... */ |
2313 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 2313 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
@@ -2378,7 +2378,7 @@ plugin_env_session_end (void *cls, | |||
2378 | struct Session *session) | 2378 | struct Session *session) |
2379 | { | 2379 | { |
2380 | struct TransportPlugin *p = cls; | 2380 | struct TransportPlugin *p = cls; |
2381 | struct NeighbourList *nl; | 2381 | struct NeighbourMapEntry *nl; |
2382 | struct ReadyList *rl; | 2382 | struct ReadyList *rl; |
2383 | struct ForeignAddressList *pos; | 2383 | struct ForeignAddressList *pos; |
2384 | struct ForeignAddressList *prev; | 2384 | struct ForeignAddressList *prev; |
@@ -2763,7 +2763,7 @@ notify_clients_disconnect (const struct GNUNET_PeerIdentity *peer) | |||
2763 | * @return NULL if no such entry exists | 2763 | * @return NULL if no such entry exists |
2764 | */ | 2764 | */ |
2765 | static struct ForeignAddressList * | 2765 | static struct ForeignAddressList * |
2766 | find_peer_address(struct NeighbourList *neighbour, | 2766 | find_peer_address(struct NeighbourMapEntry *neighbour, |
2767 | const char *tname, | 2767 | const char *tname, |
2768 | struct Session *session, | 2768 | struct Session *session, |
2769 | const char *addr, | 2769 | const char *addr, |
@@ -2809,7 +2809,7 @@ find_peer_address(struct NeighbourList *neighbour, | |||
2809 | * @return NULL if we do not have a transport plugin for 'tname' | 2809 | * @return NULL if we do not have a transport plugin for 'tname' |
2810 | */ | 2810 | */ |
2811 | static struct ForeignAddressList * | 2811 | static struct ForeignAddressList * |
2812 | add_peer_address (struct NeighbourList *neighbour, | 2812 | add_peer_address (struct NeighbourMapEntry *neighbour, |
2813 | const char *tname, | 2813 | const char *tname, |
2814 | struct Session *session, | 2814 | struct Session *session, |
2815 | const char *addr, | 2815 | const char *addr, |
@@ -3024,7 +3024,7 @@ static void | |||
3024 | neighbour_timeout_task (void *cls, | 3024 | neighbour_timeout_task (void *cls, |
3025 | const struct GNUNET_SCHEDULER_TaskContext *tc) | 3025 | const struct GNUNET_SCHEDULER_TaskContext *tc) |
3026 | { | 3026 | { |
3027 | struct NeighbourList *n = cls; | 3027 | struct NeighbourMapEntry *n = cls; |
3028 | 3028 | ||
3029 | #if DEBUG_TRANSPORT | 3029 | #if DEBUG_TRANSPORT |
3030 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, | 3030 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, |
@@ -3053,7 +3053,7 @@ schedule_next_ping (struct ForeignAddressList *fal); | |||
3053 | * Add the given address to the list of foreign addresses | 3053 | * Add the given address to the list of foreign addresses |
3054 | * available for the given peer (check for duplicates). | 3054 | * available for the given peer (check for duplicates). |
3055 | * | 3055 | * |
3056 | * @param cls the respective 'struct NeighbourList' to update | 3056 | * @param cls the respective 'struct NeighbourMapEntry' to update |
3057 | * @param tname name of the transport | 3057 | * @param tname name of the transport |
3058 | * @param expiration expiration time | 3058 | * @param expiration expiration time |
3059 | * @param addr the address | 3059 | * @param addr the address |
@@ -3067,7 +3067,7 @@ add_to_foreign_address_list (void *cls, | |||
3067 | const void *addr, | 3067 | const void *addr, |
3068 | uint16_t addrlen) | 3068 | uint16_t addrlen) |
3069 | { | 3069 | { |
3070 | struct NeighbourList *n = cls; | 3070 | struct NeighbourMapEntry *n = cls; |
3071 | struct ForeignAddressList *fal; | 3071 | struct ForeignAddressList *fal; |
3072 | int try; | 3072 | int try; |
3073 | 3073 | ||
@@ -3141,7 +3141,7 @@ add_to_foreign_address_list (void *cls, | |||
3141 | * Add addresses in validated HELLO "h" to the set of addresses | 3141 | * Add addresses in validated HELLO "h" to the set of addresses |
3142 | * we have for this peer. | 3142 | * we have for this peer. |
3143 | * | 3143 | * |
3144 | * @param cls closure ('struct NeighbourList*') | 3144 | * @param cls closure ('struct NeighbourMapEntry*') |
3145 | * @param peer id of the peer, NULL for last call | 3145 | * @param peer id of the peer, NULL for last call |
3146 | * @param h hello message for the peer (can be NULL) | 3146 | * @param h hello message for the peer (can be NULL) |
3147 | * @param err_msg NULL if successful, otherwise contains error message | 3147 | * @param err_msg NULL if successful, otherwise contains error message |
@@ -3152,7 +3152,7 @@ add_hello_for_peer (void *cls, | |||
3152 | const struct GNUNET_HELLO_Message *h, | 3152 | const struct GNUNET_HELLO_Message *h, |
3153 | const char *err_msg) | 3153 | const char *err_msg) |
3154 | { | 3154 | { |
3155 | struct NeighbourList *n = cls; | 3155 | struct NeighbourMapEntry *n = cls; |
3156 | 3156 | ||
3157 | if (err_msg != NULL) | 3157 | if (err_msg != NULL) |
3158 | { | 3158 | { |
@@ -3201,11 +3201,11 @@ add_hello_for_peer (void *cls, | |||
3201 | * @param do_hello should we schedule transmitting a HELLO | 3201 | * @param do_hello should we schedule transmitting a HELLO |
3202 | * @return the new neighbour list entry | 3202 | * @return the new neighbour list entry |
3203 | */ | 3203 | */ |
3204 | static struct NeighbourList * | 3204 | static struct NeighbourMapEntry * |
3205 | setup_new_neighbour (const struct GNUNET_PeerIdentity *peer, | 3205 | setup_new_neighbour (const struct GNUNET_PeerIdentity *peer, |
3206 | int do_hello) | 3206 | int do_hello) |
3207 | { | 3207 | { |
3208 | struct NeighbourList *n; | 3208 | struct NeighbourMapEntry *n; |
3209 | struct TransportPlugin *tp; | 3209 | struct TransportPlugin *tp; |
3210 | struct ReadyList *rl; | 3210 | struct ReadyList *rl; |
3211 | 3211 | ||
@@ -3221,7 +3221,7 @@ setup_new_neighbour (const struct GNUNET_PeerIdentity *peer, | |||
3221 | gettext_noop ("# active neighbours"), | 3221 | gettext_noop ("# active neighbours"), |
3222 | 1, | 3222 | 1, |
3223 | GNUNET_NO); | 3223 | GNUNET_NO); |
3224 | n = GNUNET_malloc (sizeof (struct NeighbourList)); | 3224 | n = GNUNET_malloc (sizeof (struct NeighbourMapEntry)); |
3225 | n->id = *peer; | 3225 | n->id = *peer; |
3226 | n->peer_timeout = | 3226 | n->peer_timeout = |
3227 | GNUNET_TIME_relative_to_absolute | 3227 | GNUNET_TIME_relative_to_absolute |
@@ -3287,7 +3287,7 @@ setup_new_neighbour (const struct GNUNET_PeerIdentity *peer, | |||
3287 | * @param n NULL if communication is not acceptable | 3287 | * @param n NULL if communication is not acceptable |
3288 | */ | 3288 | */ |
3289 | typedef void (*SetupContinuation)(void *cls, | 3289 | typedef void (*SetupContinuation)(void *cls, |
3290 | struct NeighbourList *n); | 3290 | struct NeighbourMapEntry *n); |
3291 | 3291 | ||
3292 | 3292 | ||
3293 | /** | 3293 | /** |
@@ -3489,12 +3489,12 @@ do_blacklist_check (void *cls, | |||
3489 | 3489 | ||
3490 | 3490 | ||
3491 | /** | 3491 | /** |
3492 | * Obtain a 'struct NeighbourList' for the given peer. If such an entry | 3492 | * Obtain a 'struct NeighbourMapEntry' for the given peer. If such an entry |
3493 | * does not yet exist, check the blacklist. If the blacklist says creating | 3493 | * does not yet exist, check the blacklist. If the blacklist says creating |
3494 | * one is acceptable, create one and call the continuation; otherwise | 3494 | * one is acceptable, create one and call the continuation; otherwise |
3495 | * call the continuation with NULL. | 3495 | * call the continuation with NULL. |
3496 | * | 3496 | * |
3497 | * @param peer peer to setup or look up a struct NeighbourList for | 3497 | * @param peer peer to setup or look up a struct NeighbourMapEntry for |
3498 | * @param do_hello should we also schedule sending our HELLO to the peer | 3498 | * @param do_hello should we also schedule sending our HELLO to the peer |
3499 | * if this is a new record | 3499 | * if this is a new record |
3500 | * @param cont function to call with the 'struct NeigbhbourList*' | 3500 | * @param cont function to call with the 'struct NeigbhbourList*' |
@@ -3506,7 +3506,7 @@ setup_peer_check_blacklist (const struct GNUNET_PeerIdentity *peer, | |||
3506 | SetupContinuation cont, | 3506 | SetupContinuation cont, |
3507 | void *cont_cls) | 3507 | void *cont_cls) |
3508 | { | 3508 | { |
3509 | struct NeighbourList *n; | 3509 | struct NeighbourMapEntry *n; |
3510 | struct BlacklistCheck *bc; | 3510 | struct BlacklistCheck *bc; |
3511 | 3511 | ||
3512 | n = find_neighbour(peer); | 3512 | n = find_neighbour(peer); |
@@ -3545,14 +3545,14 @@ setup_peer_check_blacklist (const struct GNUNET_PeerIdentity *peer, | |||
3545 | * Function called with the result of querying a new blacklister about | 3545 | * Function called with the result of querying a new blacklister about |
3546 | * it being allowed (or not) to continue to talk to an existing neighbour. | 3546 | * it being allowed (or not) to continue to talk to an existing neighbour. |
3547 | * | 3547 | * |
3548 | * @param cls the original 'struct NeighbourList' | 3548 | * @param cls the original 'struct NeighbourMapEntry' |
3549 | * @param n NULL if we need to disconnect | 3549 | * @param n NULL if we need to disconnect |
3550 | */ | 3550 | */ |
3551 | static void | 3551 | static void |
3552 | confirm_or_drop_neighbour (void *cls, | 3552 | confirm_or_drop_neighbour (void *cls, |
3553 | struct NeighbourList *n) | 3553 | struct NeighbourMapEntry *n) |
3554 | { | 3554 | { |
3555 | struct NeighbourList * orig = cls; | 3555 | struct NeighbourMapEntry * orig = cls; |
3556 | 3556 | ||
3557 | if (n == NULL) | 3557 | if (n == NULL) |
3558 | { | 3558 | { |
@@ -3584,7 +3584,7 @@ test_connection_ok (void *cls, | |||
3584 | void *value) | 3584 | void *value) |
3585 | { | 3585 | { |
3586 | struct TestConnectionContext *tcc = cls; | 3586 | struct TestConnectionContext *tcc = cls; |
3587 | struct NeighbourList *n = value; | 3587 | struct NeighbourMapEntry *n = value; |
3588 | struct BlacklistCheck *bc; | 3588 | struct BlacklistCheck *bc; |
3589 | 3589 | ||
3590 | 3590 | ||
@@ -3724,7 +3724,7 @@ send_periodic_ping (void *cls, | |||
3724 | struct ForeignAddressList *peer_address = cls; | 3724 | struct ForeignAddressList *peer_address = cls; |
3725 | struct TransportPlugin *tp; | 3725 | struct TransportPlugin *tp; |
3726 | struct ValidationEntry *va; | 3726 | struct ValidationEntry *va; |
3727 | struct NeighbourList *neighbour; | 3727 | struct NeighbourMapEntry *neighbour; |
3728 | struct TransportPingMessage ping; | 3728 | struct TransportPingMessage ping; |
3729 | struct CheckAddressExistsClosure caec; | 3729 | struct CheckAddressExistsClosure caec; |
3730 | char * message_buf; | 3730 | char * message_buf; |
@@ -3937,7 +3937,7 @@ schedule_next_ping (struct ForeignAddressList *fal) | |||
3937 | */ | 3937 | */ |
3938 | static void | 3938 | static void |
3939 | handle_payload_message (const struct GNUNET_MessageHeader *message, | 3939 | handle_payload_message (const struct GNUNET_MessageHeader *message, |
3940 | struct NeighbourList *n) | 3940 | struct NeighbourMapEntry *n) |
3941 | { | 3941 | { |
3942 | struct InboundMessage *im; | 3942 | struct InboundMessage *im; |
3943 | struct TransportClient *cpos; | 3943 | struct TransportClient *cpos; |
@@ -4045,7 +4045,7 @@ check_pending_validation (void *cls, | |||
4045 | unsigned int challenge = ntohl(pong->challenge); | 4045 | unsigned int challenge = ntohl(pong->challenge); |
4046 | struct GNUNET_HELLO_Message *hello; | 4046 | struct GNUNET_HELLO_Message *hello; |
4047 | struct GNUNET_PeerIdentity target; | 4047 | struct GNUNET_PeerIdentity target; |
4048 | struct NeighbourList *n; | 4048 | struct NeighbourMapEntry *n; |
4049 | struct ForeignAddressList *fal; | 4049 | struct ForeignAddressList *fal; |
4050 | struct OwnAddressList *oal; | 4050 | struct OwnAddressList *oal; |
4051 | struct TransportPlugin *tp; | 4051 | struct TransportPlugin *tp; |
@@ -4348,7 +4348,7 @@ handle_pong (void *cls, const struct GNUNET_MessageHeader *message, | |||
4348 | */ | 4348 | */ |
4349 | static void | 4349 | static void |
4350 | transmit_hello_and_ping (void *cls, | 4350 | transmit_hello_and_ping (void *cls, |
4351 | struct NeighbourList *neighbour) | 4351 | struct NeighbourMapEntry *neighbour) |
4352 | { | 4352 | { |
4353 | struct ValidationEntry *va = cls; | 4353 | struct ValidationEntry *va = cls; |
4354 | struct ForeignAddressList *peer_address; | 4354 | struct ForeignAddressList *peer_address; |
@@ -4591,7 +4591,7 @@ check_hello_validated (void *cls, | |||
4591 | struct GNUNET_HELLO_Message *plain_hello; | 4591 | struct GNUNET_HELLO_Message *plain_hello; |
4592 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pk; | 4592 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pk; |
4593 | struct GNUNET_PeerIdentity target; | 4593 | struct GNUNET_PeerIdentity target; |
4594 | struct NeighbourList *n; | 4594 | struct NeighbourMapEntry *n; |
4595 | 4595 | ||
4596 | if (err_msg != NULL) | 4596 | if (err_msg != NULL) |
4597 | { | 4597 | { |
@@ -4718,7 +4718,7 @@ process_hello (struct TransportPlugin *plugin, | |||
4718 | const struct GNUNET_HELLO_Message *hello; | 4718 | const struct GNUNET_HELLO_Message *hello; |
4719 | struct CheckHelloValidatedContext *chvc; | 4719 | struct CheckHelloValidatedContext *chvc; |
4720 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded publicKey; | 4720 | struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded publicKey; |
4721 | struct NeighbourList *n; | 4721 | struct NeighbourMapEntry *n; |
4722 | #if DEBUG_TRANSPORT_HELLO > 2 | 4722 | #if DEBUG_TRANSPORT_HELLO > 2 |
4723 | char *my_id; | 4723 | char *my_id; |
4724 | #endif | 4724 | #endif |
@@ -4814,7 +4814,7 @@ process_hello (struct TransportPlugin *plugin, | |||
4814 | } | 4814 | } |
4815 | 4815 | ||
4816 | #if BREAK_TESTS | 4816 | #if BREAK_TESTS |
4817 | struct NeighbourList *temp_neighbor = find_neighbour(&target); | 4817 | struct NeighbourMapEntry *temp_neighbor = find_neighbour(&target); |
4818 | if ((NULL != temp_neighbor)) | 4818 | if ((NULL != temp_neighbor)) |
4819 | { | 4819 | { |
4820 | fprintf(stderr, "Already know peer, ignoring hello\n"); | 4820 | fprintf(stderr, "Already know peer, ignoring hello\n"); |
@@ -4877,7 +4877,7 @@ process_hello (struct TransportPlugin *plugin, | |||
4877 | * regardless of whether other addresses exist. | 4877 | * regardless of whether other addresses exist. |
4878 | */ | 4878 | */ |
4879 | static void | 4879 | static void |
4880 | disconnect_neighbour (struct NeighbourList *n, int check) | 4880 | disconnect_neighbour (struct NeighbourMapEntry *n, int check) |
4881 | { | 4881 | { |
4882 | struct ReadyList *rpos; | 4882 | struct ReadyList *rpos; |
4883 | struct MessageQueue *mq; | 4883 | struct MessageQueue *mq; |
@@ -5045,7 +5045,7 @@ handle_ping (void *cls, const struct GNUNET_MessageHeader *message, | |||
5045 | struct SessionHeader *session_header = (struct SessionHeader*) session; | 5045 | struct SessionHeader *session_header = (struct SessionHeader*) session; |
5046 | struct TransportPingMessage *ping; | 5046 | struct TransportPingMessage *ping; |
5047 | struct TransportPongMessage *pong; | 5047 | struct TransportPongMessage *pong; |
5048 | struct NeighbourList *n; | 5048 | struct NeighbourMapEntry *n; |
5049 | struct ReadyList *rl; | 5049 | struct ReadyList *rl; |
5050 | struct ForeignAddressList *fal; | 5050 | struct ForeignAddressList *fal; |
5051 | struct OwnAddressList *oal; | 5051 | struct OwnAddressList *oal; |
@@ -5350,7 +5350,7 @@ plugin_env_receive (void *cls, const struct GNUNET_PeerIdentity *peer, | |||
5350 | struct ReadyList *service_context; | 5350 | struct ReadyList *service_context; |
5351 | struct ForeignAddressList *peer_address; | 5351 | struct ForeignAddressList *peer_address; |
5352 | uint16_t msize; | 5352 | uint16_t msize; |
5353 | struct NeighbourList *n; | 5353 | struct NeighbourMapEntry *n; |
5354 | struct GNUNET_TIME_Relative ret; | 5354 | struct GNUNET_TIME_Relative ret; |
5355 | uint32_t distance; | 5355 | uint32_t distance; |
5356 | int c; | 5356 | int c; |
@@ -5524,7 +5524,7 @@ notify_client_about_neighbour (void *cls, | |||
5524 | void *value) | 5524 | void *value) |
5525 | { | 5525 | { |
5526 | struct TransportClient *c = cls; | 5526 | struct TransportClient *c = cls; |
5527 | struct NeighbourList *n = value; | 5527 | struct NeighbourMapEntry *n = value; |
5528 | struct ConnectInfoMessage * cim; | 5528 | struct ConnectInfoMessage * cim; |
5529 | uint32_t ats_count; | 5529 | uint32_t ats_count; |
5530 | size_t size; | 5530 | size_t size; |
@@ -5688,7 +5688,7 @@ struct TransmitClientMessageContext | |||
5688 | */ | 5688 | */ |
5689 | static void | 5689 | static void |
5690 | transmit_client_message (void *cls, | 5690 | transmit_client_message (void *cls, |
5691 | struct NeighbourList *n) | 5691 | struct NeighbourMapEntry *n) |
5692 | { | 5692 | { |
5693 | struct TransmitClientMessageContext *tcmc = cls; | 5693 | struct TransmitClientMessageContext *tcmc = cls; |
5694 | struct TransportClient *tc; | 5694 | struct TransportClient *tc; |
@@ -5808,7 +5808,7 @@ handle_set_quota (void *cls, | |||
5808 | { | 5808 | { |
5809 | const struct QuotaSetMessage *qsm = | 5809 | const struct QuotaSetMessage *qsm = |
5810 | (const struct QuotaSetMessage *) message; | 5810 | (const struct QuotaSetMessage *) message; |
5811 | struct NeighbourList *n; | 5811 | struct NeighbourMapEntry *n; |
5812 | 5812 | ||
5813 | GNUNET_STATISTICS_update (stats, | 5813 | GNUNET_STATISTICS_update (stats, |
5814 | gettext_noop ("# SET QUOTA messages received"), | 5814 | gettext_noop ("# SET QUOTA messages received"), |
@@ -5958,7 +5958,7 @@ handle_peer_address_lookup (void *cls, | |||
5958 | const struct GNUNET_MessageHeader *message) | 5958 | const struct GNUNET_MessageHeader *message) |
5959 | { | 5959 | { |
5960 | const struct PeerAddressLookupMessage *peer_address_lookup; | 5960 | const struct PeerAddressLookupMessage *peer_address_lookup; |
5961 | struct NeighbourList *neighbor_iterator; | 5961 | struct NeighbourMapEntry *neighbor_iterator; |
5962 | struct ReadyList *ready_iterator; | 5962 | struct ReadyList *ready_iterator; |
5963 | struct ForeignAddressList *foreign_address_iterator; | 5963 | struct ForeignAddressList *foreign_address_iterator; |
5964 | struct TransportPlugin *transport_plugin; | 5964 | struct TransportPlugin *transport_plugin; |
@@ -6048,7 +6048,7 @@ output_addresses (void *cls, | |||
6048 | void *value) | 6048 | void *value) |
6049 | { | 6049 | { |
6050 | struct GNUNET_SERVER_TransmitContext *tc = cls; | 6050 | struct GNUNET_SERVER_TransmitContext *tc = cls; |
6051 | struct NeighbourList *neighbor_iterator = value; | 6051 | struct NeighbourMapEntry *neighbor_iterator = value; |
6052 | struct ForeignAddressList *foreign_address_iterator; | 6052 | struct ForeignAddressList *foreign_address_iterator; |
6053 | struct TransportPlugin *transport_plugin; | 6053 | struct TransportPlugin *transport_plugin; |
6054 | struct ReadyList *ready_iterator; | 6054 | struct ReadyList *ready_iterator; |
@@ -6189,7 +6189,7 @@ null_mq_client_pointers (void *cls, | |||
6189 | void *value) | 6189 | void *value) |
6190 | { | 6190 | { |
6191 | struct TransportClient *pos = cls; | 6191 | struct TransportClient *pos = cls; |
6192 | struct NeighbourList *n = value; | 6192 | struct NeighbourMapEntry *n = value; |
6193 | struct MessageQueue *mq; | 6193 | struct MessageQueue *mq; |
6194 | 6194 | ||
6195 | for (mq = n->messages_head; mq != NULL; mq = mq->next) | 6195 | for (mq = n->messages_head; mq != NULL; mq = mq->next) |
@@ -6302,7 +6302,7 @@ disconnect_all_neighbours (void *cls, | |||
6302 | const GNUNET_HashCode *key, | 6302 | const GNUNET_HashCode *key, |
6303 | void *value) | 6303 | void *value) |
6304 | { | 6304 | { |
6305 | struct NeighbourList *n = value; | 6305 | struct NeighbourMapEntry *n = value; |
6306 | 6306 | ||
6307 | #if DEBUG_TRANSPORT | 6307 | #if DEBUG_TRANSPORT |
6308 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 6308 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
@@ -6443,7 +6443,7 @@ find_and_count_addresses (void *cls, | |||
6443 | void *value) | 6443 | void *value) |
6444 | { | 6444 | { |
6445 | struct AtsBuildContext *abc = cls; | 6445 | struct AtsBuildContext *abc = cls; |
6446 | struct NeighbourList *next = value; | 6446 | struct NeighbourMapEntry *next = value; |
6447 | int found_addresses = GNUNET_NO; | 6447 | int found_addresses = GNUNET_NO; |
6448 | 6448 | ||
6449 | struct ReadyList *r_next = next->plugins; | 6449 | struct ReadyList *r_next = next->plugins; |
@@ -6470,7 +6470,7 @@ setup_ats_problem (void *cls, | |||
6470 | void *value) | 6470 | void *value) |
6471 | { | 6471 | { |
6472 | struct AtsBuildContext *abc = cls; | 6472 | struct AtsBuildContext *abc = cls; |
6473 | struct NeighbourList *next = value; | 6473 | struct NeighbourMapEntry *next = value; |
6474 | 6474 | ||
6475 | int found_addresses = GNUNET_NO; | 6475 | int found_addresses = GNUNET_NO; |
6476 | struct ReadyList *r_next = next->plugins; | 6476 | struct ReadyList *r_next = next->plugins; |
@@ -6596,7 +6596,7 @@ schedule_ats (void *cls, | |||
6596 | 6596 | ||
6597 | 6597 | ||
6598 | struct ForeignAddressList * get_preferred_ats_address ( | 6598 | struct ForeignAddressList * get_preferred_ats_address ( |
6599 | struct NeighbourList *n) | 6599 | struct NeighbourMapEntry *n) |
6600 | { | 6600 | { |
6601 | // TODO get ATS prefered address | 6601 | // TODO get ATS prefered address |
6602 | return find_ready_address(n); | 6602 | return find_ready_address(n); |