diff options
Diffstat (limited to 'src/transport/gnunet-service-tng.c')
-rw-r--r-- | src/transport/gnunet-service-tng.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/transport/gnunet-service-tng.c b/src/transport/gnunet-service-tng.c index ca8838380..3e08900bb 100644 --- a/src/transport/gnunet-service-tng.c +++ b/src/transport/gnunet-service-tng.c | |||
@@ -155,6 +155,11 @@ struct Queue | |||
155 | uint32_t mtu; | 155 | uint32_t mtu; |
156 | 156 | ||
157 | /** | 157 | /** |
158 | * Distance to the target of this queue. | ||
159 | */ | ||
160 | uint32_t distance; | ||
161 | |||
162 | /** | ||
158 | * Network type offered by this queue. | 163 | * Network type offered by this queue. |
159 | */ | 164 | */ |
160 | enum GNUNET_ATS_Network_Type nt; | 165 | enum GNUNET_ATS_Network_Type nt; |
@@ -423,6 +428,11 @@ struct TransportClient | |||
423 | */ | 428 | */ |
424 | struct AddressListEntry *addr_tail; | 429 | struct AddressListEntry *addr_tail; |
425 | 430 | ||
431 | /** | ||
432 | * Characteristics of this communicator. | ||
433 | */ | ||
434 | enum GNUNET_TRANSPORT_CommunicatorCharacteristics cc; | ||
435 | |||
426 | } communicator; | 436 | } communicator; |
427 | 437 | ||
428 | } details; | 438 | } details; |
@@ -1106,7 +1116,10 @@ handle_communicator_available (void *cls, | |||
1106 | size = ntohs (cam->header.size) - sizeof (*cam); | 1116 | size = ntohs (cam->header.size) - sizeof (*cam); |
1107 | if (0 == size) | 1117 | if (0 == size) |
1108 | return; /* receive-only communicator */ | 1118 | return; /* receive-only communicator */ |
1109 | tc->details.communicator.address_prefix = GNUNET_strdup ((const char *) &cam[1]); | 1119 | tc->details.communicator.address_prefix |
1120 | = GNUNET_strdup ((const char *) &cam[1]); | ||
1121 | tc->details.communicator.cc | ||
1122 | = (enum GNUNET_TRANSPORT_CommunicatorCharacteristics) ntohl (cam->cc); | ||
1110 | GNUNET_SERVICE_client_continue (tc->client); | 1123 | GNUNET_SERVICE_client_continue (tc->client); |
1111 | } | 1124 | } |
1112 | 1125 | ||
@@ -1413,6 +1426,7 @@ handle_add_queue_message (void *cls, | |||
1413 | queue->rtt = GNUNET_TIME_UNIT_FOREVER_REL; | 1426 | queue->rtt = GNUNET_TIME_UNIT_FOREVER_REL; |
1414 | queue->qid = aqm->qid; | 1427 | queue->qid = aqm->qid; |
1415 | queue->mtu = ntohl (aqm->mtu); | 1428 | queue->mtu = ntohl (aqm->mtu); |
1429 | queue->distance = ntohl (aqm->distance); | ||
1416 | queue->nt = (enum GNUNET_ATS_Network_Type) ntohl (aqm->nt); | 1430 | queue->nt = (enum GNUNET_ATS_Network_Type) ntohl (aqm->nt); |
1417 | queue->cs = (enum GNUNET_TRANSPORT_ConnectionStatus) ntohl (aqm->cs); | 1431 | queue->cs = (enum GNUNET_TRANSPORT_ConnectionStatus) ntohl (aqm->cs); |
1418 | queue->neighbour = neighbour; | 1432 | queue->neighbour = neighbour; |