aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/gnunet-service-transport.c')
-rw-r--r--src/transport/gnunet-service-transport.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index e927a11f5..7dddb42f5 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -166,11 +166,6 @@ struct ForeignAddressList
166 GNUNET_SCHEDULER_TaskIdentifier revalidate_task; 166 GNUNET_SCHEDULER_TaskIdentifier revalidate_task;
167 167
168 /** 168 /**
169 * Length of addr.
170 */
171 size_t addrlen;
172
173 /**
174 * The address. 169 * The address.
175 */ 170 */
176 const void *addr; 171 const void *addr;
@@ -209,6 +204,11 @@ struct ForeignAddressList
209 uint32_t distance; 204 uint32_t distance;
210 205
211 /** 206 /**
207 * Length of addr.
208 */
209 uint16_t addrlen;
210
211 /**
212 * Have we ever estimated the latency of this address? Used to 212 * Have we ever estimated the latency of this address? Used to
213 * ensure that the first time we add an address, we immediately 213 * ensure that the first time we add an address, we immediately
214 * probe its latency. 214 * probe its latency.
@@ -264,7 +264,7 @@ struct OwnAddressList
264 /** 264 /**
265 * Length of addr. 265 * Length of addr.
266 */ 266 */
267 size_t addrlen; 267 uint16_t addrlen;
268 268
269}; 269};
270 270
@@ -623,7 +623,7 @@ struct TransportPongMessage
623 /** 623 /**
624 * Size of address appended to this message 624 * Size of address appended to this message
625 */ 625 */
626 size_t addrlen; 626 uint16_t addrlen;
627 627
628}; 628};
629 629
@@ -734,14 +734,14 @@ struct ValidationEntry
734 struct Session *session; 734 struct Session *session;
735 735
736 /** 736 /**
737 * Length of addr. 737 * Challenge number we used.
738 */ 738 */
739 size_t addrlen; 739 uint32_t challenge;
740 740
741 /** 741 /**
742 * Challenge number we used. 742 * Length of addr.
743 */ 743 */
744 uint32_t challenge; 744 uint16_t addrlen;
745 745
746}; 746};
747 747
@@ -1403,7 +1403,7 @@ transmit_send_continuation (void *cls,
1403static const char* 1403static const char*
1404a2s (const char *plugin, 1404a2s (const char *plugin,
1405 const void *addr, 1405 const void *addr,
1406 size_t addr_len) 1406 uint16_t addr_len)
1407{ 1407{
1408 struct TransportPlugin *p; 1408 struct TransportPlugin *p;
1409 1409
@@ -2040,7 +2040,7 @@ static void
2040plugin_env_notify_address (void *cls, 2040plugin_env_notify_address (void *cls,
2041 const char *name, 2041 const char *name,
2042 const void *addr, 2042 const void *addr,
2043 size_t addrlen, 2043 uint16_t addrlen,
2044 struct GNUNET_TIME_Relative expires) 2044 struct GNUNET_TIME_Relative expires)
2045{ 2045{
2046 struct TransportPlugin *p = cls; 2046 struct TransportPlugin *p = cls;
@@ -2156,7 +2156,7 @@ find_peer_address(struct NeighbourList *neighbour,
2156 const char *tname, 2156 const char *tname,
2157 struct Session *session, 2157 struct Session *session,
2158 const char *addr, 2158 const char *addr,
2159 size_t addrlen) 2159 uint16_t addrlen)
2160{ 2160{
2161 struct ReadyList *head; 2161 struct ReadyList *head;
2162 struct ForeignAddressList *pos; 2162 struct ForeignAddressList *pos;
@@ -2202,7 +2202,7 @@ add_peer_address (struct NeighbourList *neighbour,
2202 const char *tname, 2202 const char *tname,
2203 struct Session *session, 2203 struct Session *session,
2204 const char *addr, 2204 const char *addr,
2205 size_t addrlen) 2205 uint16_t addrlen)
2206{ 2206{
2207 struct ReadyList *head; 2207 struct ReadyList *head;
2208 struct ForeignAddressList *ret; 2208 struct ForeignAddressList *ret;
@@ -2315,14 +2315,15 @@ struct CheckAddressExistsClosure
2315 struct Session *session; 2315 struct Session *session;
2316 2316
2317 /** 2317 /**
2318 * Length of addr. 2318 * Set to GNUNET_YES if the address exists.
2319 */ 2319 */
2320 size_t addrlen; 2320 int exists;
2321 2321
2322 /** 2322 /**
2323 * Set to GNUNET_YES if the address exists. 2323 * Length of addr.
2324 */ 2324 */
2325 int exists; 2325 uint16_t addrlen;
2326
2326}; 2327};
2327 2328
2328 2329
@@ -2437,7 +2438,8 @@ static int
2437add_to_foreign_address_list (void *cls, 2438add_to_foreign_address_list (void *cls,
2438 const char *tname, 2439 const char *tname,
2439 struct GNUNET_TIME_Absolute expiration, 2440 struct GNUNET_TIME_Absolute expiration,
2440 const void *addr, size_t addrlen) 2441 const void *addr,
2442 uint16_t addrlen)
2441{ 2443{
2442 struct NeighbourList *n = cls; 2444 struct NeighbourList *n = cls;
2443 struct ForeignAddressList *fal; 2445 struct ForeignAddressList *fal;
@@ -3492,7 +3494,8 @@ static int
3492run_validation (void *cls, 3494run_validation (void *cls,
3493 const char *tname, 3495 const char *tname,
3494 struct GNUNET_TIME_Absolute expiration, 3496 struct GNUNET_TIME_Absolute expiration,
3495 const void *addr, size_t addrlen) 3497 const void *addr,
3498 uint16_t addrlen)
3496{ 3499{
3497 struct CheckHelloValidatedContext *chvc = cls; 3500 struct CheckHelloValidatedContext *chvc = cls;
3498 struct GNUNET_PeerIdentity id; 3501 struct GNUNET_PeerIdentity id;
@@ -3932,7 +3935,7 @@ static int
3932handle_ping(void *cls, const struct GNUNET_MessageHeader *message, 3935handle_ping(void *cls, const struct GNUNET_MessageHeader *message,
3933 const struct GNUNET_PeerIdentity *peer, 3936 const struct GNUNET_PeerIdentity *peer,
3934 const char *sender_address, 3937 const char *sender_address,
3935 size_t sender_address_len) 3938 uint16_t sender_address_len)
3936{ 3939{
3937 struct TransportPlugin *plugin = cls; 3940 struct TransportPlugin *plugin = cls;
3938 struct TransportPingMessage *ping; 3941 struct TransportPingMessage *ping;
@@ -4072,7 +4075,7 @@ plugin_env_receive (void *cls, const struct GNUNET_PeerIdentity *peer,
4072 uint32_t distance, 4075 uint32_t distance,
4073 struct Session *session, 4076 struct Session *session,
4074 const char *sender_address, 4077 const char *sender_address,
4075 size_t sender_address_len) 4078 uint16_t sender_address_len)
4076{ 4079{
4077 struct TransportPlugin *plugin = cls; 4080 struct TransportPlugin *plugin = cls;
4078 struct ReadyList *service_context; 4081 struct ReadyList *service_context;