aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-service-transport.c38
-rw-r--r--src/transport/gnunet-service-transport.h2
-rw-r--r--src/transport/gnunet-service-transport_ats.c18
-rw-r--r--src/transport/gnunet-service-transport_ats.h12
-rw-r--r--src/transport/gnunet-service-transport_blacklist.c8
-rw-r--r--src/transport/gnunet-service-transport_blacklist.h6
-rw-r--r--src/transport/gnunet-service-transport_clients.c2
-rw-r--r--src/transport/gnunet-service-transport_manipulation.c4
-rw-r--r--src/transport/gnunet-service-transport_manipulation.h4
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c76
-rw-r--r--src/transport/gnunet-service-transport_neighbours.h16
-rw-r--r--src/transport/gnunet-service-transport_validation.c8
-rw-r--r--src/transport/gnunet-service-transport_validation.h2
-rw-r--r--src/transport/plugin_transport_http.h38
-rw-r--r--src/transport/plugin_transport_http_client.c90
-rw-r--r--src/transport/plugin_transport_http_server.c64
-rw-r--r--src/transport/plugin_transport_tcp.c78
-rw-r--r--src/transport/plugin_transport_template.c22
-rw-r--r--src/transport/plugin_transport_udp.c76
-rw-r--r--src/transport/plugin_transport_udp.h2
-rw-r--r--src/transport/plugin_transport_unix.c52
-rw-r--r--src/transport/plugin_transport_wlan.c48
-rw-r--r--src/transport/test_plugin_transport.c4
-rw-r--r--src/transport/transport_api_monitor_plugins.c2
24 files changed, 336 insertions, 336 deletions
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 8e2a135f2..89a1ec4c9 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -44,22 +44,22 @@
44/** 44/**
45 * Information we need for an asynchronous session kill. 45 * Information we need for an asynchronous session kill.
46 */ 46 */
47struct SessionKiller 47struct GNUNET_ATS_SessionKiller
48{ 48{
49 /** 49 /**
50 * Kept in a DLL. 50 * Kept in a DLL.
51 */ 51 */
52 struct SessionKiller *next; 52 struct GNUNET_ATS_SessionKiller *next;
53 53
54 /** 54 /**
55 * Kept in a DLL. 55 * Kept in a DLL.
56 */ 56 */
57 struct SessionKiller *prev; 57 struct GNUNET_ATS_SessionKiller *prev;
58 58
59 /** 59 /**
60 * Session to kill. 60 * Session to kill.
61 */ 61 */
62 struct Session *session; 62 struct GNUNET_ATS_Session *session;
63 63
64 /** 64 /**
65 * Plugin for the session. 65 * Plugin for the session.
@@ -123,12 +123,12 @@ struct GNUNET_TIME_Relative hello_expiration;
123/** 123/**
124 * Head of DLL of asynchronous tasks to kill sessions. 124 * Head of DLL of asynchronous tasks to kill sessions.
125 */ 125 */
126static struct SessionKiller *sk_head; 126static struct GNUNET_ATS_SessionKiller *sk_head;
127 127
128/** 128/**
129 * Tail of DLL of asynchronous tasks to kill sessions. 129 * Tail of DLL of asynchronous tasks to kill sessions.
130 */ 130 */
131static struct SessionKiller *sk_tail; 131static struct GNUNET_ATS_SessionKiller *sk_tail;
132 132
133/** 133/**
134 * Interface scanner determines our LAN address range(s). 134 * Interface scanner determines our LAN address range(s).
@@ -206,7 +206,7 @@ process_hello_update (void *cls,
206 */ 206 */
207static struct GNUNET_TIME_Relative 207static struct GNUNET_TIME_Relative
208process_payload (const struct GNUNET_HELLO_Address *address, 208process_payload (const struct GNUNET_HELLO_Address *address,
209 struct Session *session, 209 struct GNUNET_ATS_Session *session,
210 const struct GNUNET_MessageHeader *message) 210 const struct GNUNET_MessageHeader *message)
211{ 211{
212 struct GNUNET_TIME_Relative ret; 212 struct GNUNET_TIME_Relative ret;
@@ -249,14 +249,14 @@ process_payload (const struct GNUNET_HELLO_Address *address,
249/** 249/**
250 * Task to asynchronously terminate a session. 250 * Task to asynchronously terminate a session.
251 * 251 *
252 * @param cls the `struct SessionKiller` with the information for the kill 252 * @param cls the `struct GNUNET_ATS_SessionKiller` with the information for the kill
253 * @param tc scheduler context 253 * @param tc scheduler context
254 */ 254 */
255static void 255static void
256kill_session_task (void *cls, 256kill_session_task (void *cls,
257 const struct GNUNET_SCHEDULER_TaskContext *tc) 257 const struct GNUNET_SCHEDULER_TaskContext *tc)
258{ 258{
259 struct SessionKiller *sk = cls; 259 struct GNUNET_ATS_SessionKiller *sk = cls;
260 260
261 sk->task = NULL; 261 sk->task = NULL;
262 GNUNET_CONTAINER_DLL_remove (sk_head, sk_tail, sk); 262 GNUNET_CONTAINER_DLL_remove (sk_head, sk_tail, sk);
@@ -274,10 +274,10 @@ kill_session_task (void *cls,
274 */ 274 */
275static void 275static void
276kill_session (const char *plugin_name, 276kill_session (const char *plugin_name,
277 struct Session *session) 277 struct GNUNET_ATS_Session *session)
278{ 278{
279 struct GNUNET_TRANSPORT_PluginFunctions *plugin; 279 struct GNUNET_TRANSPORT_PluginFunctions *plugin;
280 struct SessionKiller *sk; 280 struct GNUNET_ATS_SessionKiller *sk;
281 281
282 for (sk = sk_head; NULL != sk; sk = sk->next) 282 for (sk = sk_head; NULL != sk; sk = sk->next)
283 if (sk->session == session) 283 if (sk->session == session)
@@ -289,7 +289,7 @@ kill_session (const char *plugin_name,
289 return; 289 return;
290 } 290 }
291 /* need to issue disconnect asynchronously */ 291 /* need to issue disconnect asynchronously */
292 sk = GNUNET_new (struct SessionKiller); 292 sk = GNUNET_new (struct GNUNET_ATS_SessionKiller);
293 sk->session = session; 293 sk->session = session;
294 sk->plugin = plugin; 294 sk->plugin = plugin;
295 sk->task = GNUNET_SCHEDULER_add_now (&kill_session_task, sk); 295 sk->task = GNUNET_SCHEDULER_add_now (&kill_session_task, sk);
@@ -313,7 +313,7 @@ static void
313connect_bl_check_cont (void *cls, 313connect_bl_check_cont (void *cls,
314 const struct GNUNET_PeerIdentity *peer, 314 const struct GNUNET_PeerIdentity *peer,
315 const struct GNUNET_HELLO_Address *address, 315 const struct GNUNET_HELLO_Address *address,
316 struct Session *session, 316 struct GNUNET_ATS_Session *session,
317 int result) 317 int result)
318{ 318{
319 struct GNUNET_MessageHeader *msg = cls; 319 struct GNUNET_MessageHeader *msg = cls;
@@ -365,7 +365,7 @@ connect_bl_check_cont (void *cls,
365struct GNUNET_TIME_Relative 365struct GNUNET_TIME_Relative
366GST_receive_callback (void *cls, 366GST_receive_callback (void *cls,
367 const struct GNUNET_HELLO_Address *address, 367 const struct GNUNET_HELLO_Address *address,
368 struct Session *session, 368 struct GNUNET_ATS_Session *session,
369 const struct GNUNET_MessageHeader *message) 369 const struct GNUNET_MessageHeader *message)
370{ 370{
371 const char *plugin_name = cls; 371 const char *plugin_name = cls;
@@ -559,9 +559,9 @@ plugin_env_address_change_notification (void *cls,
559static void 559static void
560plugin_env_session_end (void *cls, 560plugin_env_session_end (void *cls,
561 const struct GNUNET_HELLO_Address *address, 561 const struct GNUNET_HELLO_Address *address,
562 struct Session *session) 562 struct GNUNET_ATS_Session *session)
563{ 563{
564 struct SessionKiller *sk; 564 struct GNUNET_ATS_SessionKiller *sk;
565 565
566 if (NULL == address) 566 if (NULL == address)
567 { 567 {
@@ -614,7 +614,7 @@ static void
614plugin_env_session_start_bl_check_cont (void *cls, 614plugin_env_session_start_bl_check_cont (void *cls,
615 const struct GNUNET_PeerIdentity *peer, 615 const struct GNUNET_PeerIdentity *peer,
616 const struct GNUNET_HELLO_Address *address, 616 const struct GNUNET_HELLO_Address *address,
617 struct Session *session, 617 struct GNUNET_ATS_Session *session,
618 int result) 618 int result)
619{ 619{
620 if (GNUNET_OK != result) 620 if (GNUNET_OK != result)
@@ -646,7 +646,7 @@ plugin_env_session_start_bl_check_cont (void *cls,
646static void 646static void
647plugin_env_session_start (void *cls, 647plugin_env_session_start (void *cls,
648 const struct GNUNET_HELLO_Address *address, 648 const struct GNUNET_HELLO_Address *address,
649 struct Session *session, 649 struct GNUNET_ATS_Session *session,
650 enum GNUNET_ATS_Network_Type scope) 650 enum GNUNET_ATS_Network_Type scope)
651{ 651{
652 struct GNUNET_ATS_Properties prop; 652 struct GNUNET_ATS_Properties prop;
@@ -713,7 +713,7 @@ static void
713ats_request_address_change (void *cls, 713ats_request_address_change (void *cls,
714 const struct GNUNET_PeerIdentity *peer, 714 const struct GNUNET_PeerIdentity *peer,
715 const struct GNUNET_HELLO_Address *address, 715 const struct GNUNET_HELLO_Address *address,
716 struct Session *session, 716 struct GNUNET_ATS_Session *session,
717 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out, 717 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out,
718 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in) 718 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in)
719{ 719{
diff --git a/src/transport/gnunet-service-transport.h b/src/transport/gnunet-service-transport.h
index 4966341af..a38dbd2fe 100644
--- a/src/transport/gnunet-service-transport.h
+++ b/src/transport/gnunet-service-transport.h
@@ -107,7 +107,7 @@ typedef void
107struct GNUNET_TIME_Relative 107struct GNUNET_TIME_Relative
108GST_receive_callback (void *cls, 108GST_receive_callback (void *cls,
109 const struct GNUNET_HELLO_Address *address, 109 const struct GNUNET_HELLO_Address *address,
110 struct Session *session, 110 struct GNUNET_ATS_Session *session,
111 const struct GNUNET_MessageHeader *message); 111 const struct GNUNET_MessageHeader *message);
112 112
113 113
diff --git a/src/transport/gnunet-service-transport_ats.c b/src/transport/gnunet-service-transport_ats.c
index 5fcd8f479..d6bc836d3 100644
--- a/src/transport/gnunet-service-transport_ats.c
+++ b/src/transport/gnunet-service-transport_ats.c
@@ -50,7 +50,7 @@ struct AddressInfo
50 /** 50 /**
51 * Session (can be NULL) 51 * Session (can be NULL)
52 */ 52 */
53 struct Session *session; 53 struct GNUNET_ATS_Session *session;
54 54
55 /** 55 /**
56 * Record with ATS API for the address. 56 * Record with ATS API for the address.
@@ -114,7 +114,7 @@ struct FindClosure
114 /** 114 /**
115 * Session to look for (only used if the address is inbound). 115 * Session to look for (only used if the address is inbound).
116 */ 116 */
117 struct Session *session; 117 struct GNUNET_ATS_Session *session;
118 118
119 /** 119 /**
120 * Address to look for. 120 * Address to look for.
@@ -188,7 +188,7 @@ find_ai_cb (void *cls,
188 */ 188 */
189static struct AddressInfo * 189static struct AddressInfo *
190find_ai (const struct GNUNET_HELLO_Address *address, 190find_ai (const struct GNUNET_HELLO_Address *address,
191 struct Session *session) 191 struct GNUNET_ATS_Session *session)
192{ 192{
193 struct FindClosure fc; 193 struct FindClosure fc;
194 194
@@ -267,7 +267,7 @@ find_ai_no_session (const struct GNUNET_HELLO_Address *address)
267 */ 267 */
268int 268int
269GST_ats_is_known (const struct GNUNET_HELLO_Address *address, 269GST_ats_is_known (const struct GNUNET_HELLO_Address *address,
270 struct Session *session) 270 struct GNUNET_ATS_Session *session)
271{ 271{
272 return (NULL != find_ai (address, session)) ? GNUNET_YES : GNUNET_NO; 272 return (NULL != find_ai (address, session)) ? GNUNET_YES : GNUNET_NO;
273} 273}
@@ -328,7 +328,7 @@ unblock_address (void *cls,
328 */ 328 */
329void 329void
330GST_ats_block_address (const struct GNUNET_HELLO_Address *address, 330GST_ats_block_address (const struct GNUNET_HELLO_Address *address,
331 struct Session *session) 331 struct GNUNET_ATS_Session *session)
332{ 332{
333 struct AddressInfo *ai; 333 struct AddressInfo *ai;
334 334
@@ -395,7 +395,7 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address,
395 */ 395 */
396void 396void
397GST_ats_block_reset (const struct GNUNET_HELLO_Address *address, 397GST_ats_block_reset (const struct GNUNET_HELLO_Address *address,
398 struct Session *session) 398 struct GNUNET_ATS_Session *session)
399{ 399{
400 struct AddressInfo *ai; 400 struct AddressInfo *ai;
401 401
@@ -423,7 +423,7 @@ GST_ats_block_reset (const struct GNUNET_HELLO_Address *address,
423 */ 423 */
424void 424void
425GST_ats_add_inbound_address (const struct GNUNET_HELLO_Address *address, 425GST_ats_add_inbound_address (const struct GNUNET_HELLO_Address *address,
426 struct Session *session, 426 struct GNUNET_ATS_Session *session,
427 const struct GNUNET_ATS_Properties *prop) 427 const struct GNUNET_ATS_Properties *prop)
428{ 428{
429 struct GNUNET_ATS_AddressRecord *ar; 429 struct GNUNET_ATS_AddressRecord *ar;
@@ -533,7 +533,7 @@ GST_ats_add_address (const struct GNUNET_HELLO_Address *address,
533 */ 533 */
534void 534void
535GST_ats_new_session (const struct GNUNET_HELLO_Address *address, 535GST_ats_new_session (const struct GNUNET_HELLO_Address *address,
536 struct Session *session) 536 struct GNUNET_ATS_Session *session)
537{ 537{
538 struct AddressInfo *ai; 538 struct AddressInfo *ai;
539 539
@@ -611,7 +611,7 @@ destroy_ai (struct AddressInfo *ai)
611 */ 611 */
612void 612void
613GST_ats_del_session (const struct GNUNET_HELLO_Address *address, 613GST_ats_del_session (const struct GNUNET_HELLO_Address *address,
614 struct Session *session) 614 struct GNUNET_ATS_Session *session)
615{ 615{
616 struct AddressInfo *ai; 616 struct AddressInfo *ai;
617 617
diff --git a/src/transport/gnunet-service-transport_ats.h b/src/transport/gnunet-service-transport_ats.h
index e73e82913..5e98112f8 100644
--- a/src/transport/gnunet-service-transport_ats.h
+++ b/src/transport/gnunet-service-transport_ats.h
@@ -52,7 +52,7 @@ GST_ats_done (void);
52 */ 52 */
53int 53int
54GST_ats_is_known (const struct GNUNET_HELLO_Address *address, 54GST_ats_is_known (const struct GNUNET_HELLO_Address *address,
55 struct Session *session); 55 struct GNUNET_ATS_Session *session);
56 56
57 57
58/** 58/**
@@ -77,7 +77,7 @@ GST_ats_is_known_no_session (const struct GNUNET_HELLO_Address *address);
77 */ 77 */
78void 78void
79GST_ats_block_address (const struct GNUNET_HELLO_Address *address, 79GST_ats_block_address (const struct GNUNET_HELLO_Address *address,
80 struct Session *session); 80 struct GNUNET_ATS_Session *session);
81 81
82 82
83/** 83/**
@@ -90,7 +90,7 @@ GST_ats_block_address (const struct GNUNET_HELLO_Address *address,
90 */ 90 */
91void 91void
92GST_ats_block_reset (const struct GNUNET_HELLO_Address *address, 92GST_ats_block_reset (const struct GNUNET_HELLO_Address *address,
93 struct Session *session); 93 struct GNUNET_ATS_Session *session);
94 94
95 95
96/** 96/**
@@ -105,7 +105,7 @@ GST_ats_block_reset (const struct GNUNET_HELLO_Address *address,
105 */ 105 */
106void 106void
107GST_ats_add_inbound_address (const struct GNUNET_HELLO_Address *address, 107GST_ats_add_inbound_address (const struct GNUNET_HELLO_Address *address,
108 struct Session *session, 108 struct GNUNET_ATS_Session *session,
109 const struct GNUNET_ATS_Properties *prop); 109 const struct GNUNET_ATS_Properties *prop);
110 110
111 111
@@ -132,7 +132,7 @@ GST_ats_add_address (const struct GNUNET_HELLO_Address *address,
132 */ 132 */
133void 133void
134GST_ats_new_session (const struct GNUNET_HELLO_Address *address, 134GST_ats_new_session (const struct GNUNET_HELLO_Address *address,
135 struct Session *session); 135 struct GNUNET_ATS_Session *session);
136 136
137 137
138/** 138/**
@@ -187,7 +187,7 @@ GST_ats_update_distance (const struct GNUNET_HELLO_Address *address,
187 */ 187 */
188void 188void
189GST_ats_del_session (const struct GNUNET_HELLO_Address *address, 189GST_ats_del_session (const struct GNUNET_HELLO_Address *address,
190 struct Session *session); 190 struct GNUNET_ATS_Session *session);
191 191
192 192
193/** 193/**
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c
index 987957911..967aae89b 100644
--- a/src/transport/gnunet-service-transport_blacklist.c
+++ b/src/transport/gnunet-service-transport_blacklist.c
@@ -153,7 +153,7 @@ struct GST_BlacklistCheck
153 /** 153 /**
154 * Session for #GST_blacklist_abort_matching(), can be NULL. 154 * Session for #GST_blacklist_abort_matching(), can be NULL.
155 */ 155 */
156 struct Session *session; 156 struct GNUNET_ATS_Session *session;
157 157
158 /** 158 /**
159 * Current transmission request handle for this client, or NULL if no 159 * Current transmission request handle for this client, or NULL if no
@@ -495,7 +495,7 @@ static void
495confirm_or_drop_neighbour (void *cls, 495confirm_or_drop_neighbour (void *cls,
496 const struct GNUNET_PeerIdentity *peer, 496 const struct GNUNET_PeerIdentity *peer,
497 const struct GNUNET_HELLO_Address *address, 497 const struct GNUNET_HELLO_Address *address,
498 struct Session *session, 498 struct GNUNET_ATS_Session *session,
499 int allowed) 499 int allowed)
500{ 500{
501 if (GNUNET_OK == allowed) 501 if (GNUNET_OK == allowed)
@@ -744,7 +744,7 @@ GST_blacklist_add_peer (const struct GNUNET_PeerIdentity *peer,
744 */ 744 */
745void 745void
746GST_blacklist_abort_matching (const struct GNUNET_HELLO_Address *address, 746GST_blacklist_abort_matching (const struct GNUNET_HELLO_Address *address,
747 struct Session *session) 747 struct GNUNET_ATS_Session *session)
748{ 748{
749 struct GST_BlacklistCheck *bc; 749 struct GST_BlacklistCheck *bc;
750 struct GST_BlacklistCheck *n; 750 struct GST_BlacklistCheck *n;
@@ -832,7 +832,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
832 GST_BlacklistTestContinuation cont, 832 GST_BlacklistTestContinuation cont,
833 void *cont_cls, 833 void *cont_cls,
834 const struct GNUNET_HELLO_Address *address, 834 const struct GNUNET_HELLO_Address *address,
835 struct Session *session) 835 struct GNUNET_ATS_Session *session)
836{ 836{
837 struct GST_BlacklistCheck *bc; 837 struct GST_BlacklistCheck *bc;
838 838
diff --git a/src/transport/gnunet-service-transport_blacklist.h b/src/transport/gnunet-service-transport_blacklist.h
index 268e03d8c..6c5e57030 100644
--- a/src/transport/gnunet-service-transport_blacklist.h
+++ b/src/transport/gnunet-service-transport_blacklist.h
@@ -110,7 +110,7 @@ typedef void
110(*GST_BlacklistTestContinuation) (void *cls, 110(*GST_BlacklistTestContinuation) (void *cls,
111 const struct GNUNET_PeerIdentity *peer, 111 const struct GNUNET_PeerIdentity *peer,
112 const struct GNUNET_HELLO_Address *address, 112 const struct GNUNET_HELLO_Address *address,
113 struct Session *session, 113 struct GNUNET_ATS_Session *session,
114 int result); 114 int result);
115 115
116 116
@@ -132,7 +132,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
132 GST_BlacklistTestContinuation cont, 132 GST_BlacklistTestContinuation cont,
133 void *cont_cls, 133 void *cont_cls,
134 const struct GNUNET_HELLO_Address *address, 134 const struct GNUNET_HELLO_Address *address,
135 struct Session *session); 135 struct GNUNET_ATS_Session *session);
136 136
137 137
138/** 138/**
@@ -143,7 +143,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
143 */ 143 */
144void 144void
145GST_blacklist_abort_matching (const struct GNUNET_HELLO_Address *address, 145GST_blacklist_abort_matching (const struct GNUNET_HELLO_Address *address,
146 struct Session *session); 146 struct GNUNET_ATS_Session *session);
147 147
148 148
149 149
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c
index 103c6fd0a..f286016a6 100644
--- a/src/transport/gnunet-service-transport_clients.c
+++ b/src/transport/gnunet-service-transport_clients.c
@@ -1430,7 +1430,7 @@ clients_handle_monitor_validation (void *cls,
1430 */ 1430 */
1431static void 1431static void
1432plugin_session_info_cb (void *cls, 1432plugin_session_info_cb (void *cls,
1433 struct Session *session, 1433 struct GNUNET_ATS_Session *session,
1434 const struct GNUNET_TRANSPORT_SessionInfo *info) 1434 const struct GNUNET_TRANSPORT_SessionInfo *info)
1435{ 1435{
1436 struct TransportPluginMonitorMessage *msg; 1436 struct TransportPluginMonitorMessage *msg;
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c
index d8f12827c..89d4b532a 100644
--- a/src/transport/gnunet-service-transport_manipulation.c
+++ b/src/transport/gnunet-service-transport_manipulation.c
@@ -369,7 +369,7 @@ GST_manipulation_send (const struct GNUNET_PeerIdentity *target,
369 */ 369 */
370void 370void
371GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address, 371GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address,
372 struct Session *session, 372 struct GNUNET_ATS_Session *session,
373 struct GNUNET_ATS_Properties *prop) 373 struct GNUNET_ATS_Properties *prop)
374{ 374{
375 const struct GNUNET_PeerIdentity *peer = &address->peer; 375 const struct GNUNET_PeerIdentity *peer = &address->peer;
@@ -395,7 +395,7 @@ GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address,
395struct GNUNET_TIME_Relative 395struct GNUNET_TIME_Relative
396GST_manipulation_recv (void *cls, 396GST_manipulation_recv (void *cls,
397 const struct GNUNET_HELLO_Address *address, 397 const struct GNUNET_HELLO_Address *address,
398 struct Session *session, 398 struct GNUNET_ATS_Session *session,
399 const struct GNUNET_MessageHeader *message) 399 const struct GNUNET_MessageHeader *message)
400{ 400{
401 struct TM_Peer *tmp; 401 struct TM_Peer *tmp;
diff --git a/src/transport/gnunet-service-transport_manipulation.h b/src/transport/gnunet-service-transport_manipulation.h
index e0395e2fe..3afb9885a 100644
--- a/src/transport/gnunet-service-transport_manipulation.h
+++ b/src/transport/gnunet-service-transport_manipulation.h
@@ -83,7 +83,7 @@ GST_manipulation_send (const struct GNUNET_PeerIdentity *target,
83struct GNUNET_TIME_Relative 83struct GNUNET_TIME_Relative
84GST_manipulation_recv (void *cls, 84GST_manipulation_recv (void *cls,
85 const struct GNUNET_HELLO_Address *address, 85 const struct GNUNET_HELLO_Address *address,
86 struct Session *session, 86 struct GNUNET_ATS_Session *session,
87 const struct GNUNET_MessageHeader *message); 87 const struct GNUNET_MessageHeader *message);
88 88
89 89
@@ -97,7 +97,7 @@ GST_manipulation_recv (void *cls,
97 */ 97 */
98void 98void
99GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address, 99GST_manipulation_manipulate_metrics (const struct GNUNET_HELLO_Address *address,
100 struct Session *session, 100 struct GNUNET_ATS_Session *session,
101 struct GNUNET_ATS_Properties *prop); 101 struct GNUNET_ATS_Properties *prop);
102 102
103 103
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 442935993..d41fa6582 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -148,7 +148,7 @@ struct TransportSynMessage
148 * When the keep alive response with type is received, transport service 148 * When the keep alive response with type is received, transport service
149 * will call the respective plugin to update the session timeout 149 * will call the respective plugin to update the session timeout
150 */ 150 */
151struct SessionKeepAliveMessage 151struct GNUNET_ATS_SessionKeepAliveMessage
152{ 152{
153 /** 153 /**
154 * Header of type #GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE or 154 * Header of type #GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE or
@@ -168,7 +168,7 @@ struct SessionKeepAliveMessage
168 * the other peer should limit transmissions to the indicated 168 * the other peer should limit transmissions to the indicated
169 * quota. 169 * quota.
170 */ 170 */
171struct SessionQuotaMessage 171struct GNUNET_ATS_SessionQuotaMessage
172{ 172{
173 /** 173 /**
174 * Header of type #GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA. 174 * Header of type #GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA.
@@ -188,7 +188,7 @@ struct SessionQuotaMessage
188 * notification, peers must not rely on always receiving disconnect 188 * notification, peers must not rely on always receiving disconnect
189 * messages. 189 * messages.
190 */ 190 */
191struct SessionDisconnectMessage 191struct GNUNET_ATS_SessionDisconnectMessage
192{ 192{
193 /** 193 /**
194 * Header of type #GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT 194 * Header of type #GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT
@@ -284,7 +284,7 @@ struct NeighbourAddress
284 /** 284 /**
285 * Active session for this address. 285 * Active session for this address.
286 */ 286 */
287 struct Session *session; 287 struct GNUNET_ATS_Session *session;
288 288
289 /** 289 /**
290 * Network-level address information. 290 * Network-level address information.
@@ -819,7 +819,7 @@ set_state_and_timeout (struct NeighbourMapEntry *n,
819static void 819static void
820set_alternative_address (struct NeighbourMapEntry *n, 820set_alternative_address (struct NeighbourMapEntry *n,
821 const struct GNUNET_HELLO_Address *address, 821 const struct GNUNET_HELLO_Address *address,
822 struct Session *session, 822 struct GNUNET_ATS_Session *session,
823 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 823 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
824 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) 824 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
825{ 825{
@@ -1063,12 +1063,12 @@ send_disconnect_cont (void *cls,
1063static void 1063static void
1064send_disconnect (struct NeighbourMapEntry *n) 1064send_disconnect (struct NeighbourMapEntry *n)
1065{ 1065{
1066 struct SessionDisconnectMessage disconnect_msg; 1066 struct GNUNET_ATS_SessionDisconnectMessage disconnect_msg;
1067 1067
1068 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 1068 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
1069 "Sending DISCONNECT message to peer `%4s'\n", 1069 "Sending DISCONNECT message to peer `%4s'\n",
1070 GNUNET_i2s (&n->id)); 1070 GNUNET_i2s (&n->id));
1071 disconnect_msg.header.size = htons (sizeof (struct SessionDisconnectMessage)); 1071 disconnect_msg.header.size = htons (sizeof (struct GNUNET_ATS_SessionDisconnectMessage));
1072 disconnect_msg.header.type = 1072 disconnect_msg.header.type =
1073 htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT); 1073 htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT);
1074 disconnect_msg.reserved = htonl (0); 1074 disconnect_msg.reserved = htonl (0);
@@ -1196,9 +1196,9 @@ set_incoming_quota (struct NeighbourMapEntry *n,
1196 quota); 1196 quota);
1197 if (0 != ntohl (quota.value__)) 1197 if (0 != ntohl (quota.value__))
1198 { 1198 {
1199 struct SessionQuotaMessage sqm; 1199 struct GNUNET_ATS_SessionQuotaMessage sqm;
1200 1200
1201 sqm.header.size = htons (sizeof (struct SessionQuotaMessage)); 1201 sqm.header.size = htons (sizeof (struct GNUNET_ATS_SessionQuotaMessage));
1202 sqm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA); 1202 sqm.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_QUOTA);
1203 sqm.quota = quota.value__; 1203 sqm.quota = quota.value__;
1204 (void) send_with_session (n, 1204 (void) send_with_session (n,
@@ -1235,7 +1235,7 @@ set_incoming_quota (struct NeighbourMapEntry *n,
1235static void 1235static void
1236set_primary_address (struct NeighbourMapEntry *n, 1236set_primary_address (struct NeighbourMapEntry *n,
1237 const struct GNUNET_HELLO_Address *address, 1237 const struct GNUNET_HELLO_Address *address,
1238 struct Session *session, 1238 struct GNUNET_ATS_Session *session,
1239 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 1239 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
1240 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) 1240 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
1241{ 1241{
@@ -1475,7 +1475,7 @@ try_transmission_to_peer (struct NeighbourMapEntry *n)
1475static void 1475static void
1476send_keepalive (struct NeighbourMapEntry *n) 1476send_keepalive (struct NeighbourMapEntry *n)
1477{ 1477{
1478 struct SessionKeepAliveMessage m; 1478 struct GNUNET_ATS_SessionKeepAliveMessage m;
1479 struct GNUNET_TIME_Relative timeout; 1479 struct GNUNET_TIME_Relative timeout;
1480 uint32_t nonce; 1480 uint32_t nonce;
1481 1481
@@ -1493,7 +1493,7 @@ send_keepalive (struct NeighbourMapEntry *n)
1493 "Sending KEEPALIVE to peer `%s' with nonce %u\n", 1493 "Sending KEEPALIVE to peer `%s' with nonce %u\n",
1494 GNUNET_i2s (&n->id), 1494 GNUNET_i2s (&n->id),
1495 nonce); 1495 nonce);
1496 m.header.size = htons (sizeof (struct SessionKeepAliveMessage)); 1496 m.header.size = htons (sizeof (struct GNUNET_ATS_SessionKeepAliveMessage));
1497 m.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE); 1497 m.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE);
1498 m.nonce = htonl (nonce); 1498 m.nonce = htonl (nonce);
1499 1499
@@ -1527,16 +1527,16 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour,
1527 const struct GNUNET_MessageHeader *m) 1527 const struct GNUNET_MessageHeader *m)
1528{ 1528{
1529 struct NeighbourMapEntry *n; 1529 struct NeighbourMapEntry *n;
1530 const struct SessionKeepAliveMessage *msg_in; 1530 const struct GNUNET_ATS_SessionKeepAliveMessage *msg_in;
1531 struct SessionKeepAliveMessage msg; 1531 struct GNUNET_ATS_SessionKeepAliveMessage msg;
1532 1532
1533 if (sizeof (struct SessionKeepAliveMessage) != ntohs (m->size)) 1533 if (sizeof (struct GNUNET_ATS_SessionKeepAliveMessage) != ntohs (m->size))
1534 { 1534 {
1535 GNUNET_break_op (0); 1535 GNUNET_break_op (0);
1536 return; 1536 return;
1537 } 1537 }
1538 1538
1539 msg_in = (const struct SessionKeepAliveMessage *) m; 1539 msg_in = (const struct GNUNET_ATS_SessionKeepAliveMessage *) m;
1540 if (NULL == (n = lookup_neighbour (neighbour))) 1540 if (NULL == (n = lookup_neighbour (neighbour)))
1541 { 1541 {
1542 GNUNET_STATISTICS_update (GST_stats, 1542 GNUNET_STATISTICS_update (GST_stats,
@@ -1564,12 +1564,12 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour,
1564 GNUNET_NO); 1564 GNUNET_NO);
1565 1565
1566 /* send reply to allow neighbour to measure latency */ 1566 /* send reply to allow neighbour to measure latency */
1567 msg.header.size = htons (sizeof (struct SessionKeepAliveMessage)); 1567 msg.header.size = htons (sizeof (struct GNUNET_ATS_SessionKeepAliveMessage));
1568 msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE_RESPONSE); 1568 msg.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_KEEPALIVE_RESPONSE);
1569 msg.nonce = msg_in->nonce; 1569 msg.nonce = msg_in->nonce;
1570 (void) send_with_session (n, 1570 (void) send_with_session (n,
1571 &msg, 1571 &msg,
1572 sizeof (struct SessionKeepAliveMessage), 1572 sizeof (struct GNUNET_ATS_SessionKeepAliveMessage),
1573 UINT32_MAX /* priority */, 1573 UINT32_MAX /* priority */,
1574 GNUNET_TIME_UNIT_FOREVER_REL, 1574 GNUNET_TIME_UNIT_FOREVER_REL,
1575 GNUNET_YES, 1575 GNUNET_YES,
@@ -1590,17 +1590,17 @@ GST_neighbours_keepalive_response (const struct GNUNET_PeerIdentity *neighbour,
1590 const struct GNUNET_MessageHeader *m) 1590 const struct GNUNET_MessageHeader *m)
1591{ 1591{
1592 struct NeighbourMapEntry *n; 1592 struct NeighbourMapEntry *n;
1593 const struct SessionKeepAliveMessage *msg; 1593 const struct GNUNET_ATS_SessionKeepAliveMessage *msg;
1594 struct GNUNET_TRANSPORT_PluginFunctions *papi; 1594 struct GNUNET_TRANSPORT_PluginFunctions *papi;
1595 struct GNUNET_TIME_Relative latency; 1595 struct GNUNET_TIME_Relative latency;
1596 1596
1597 if (sizeof (struct SessionKeepAliveMessage) != ntohs (m->size)) 1597 if (sizeof (struct GNUNET_ATS_SessionKeepAliveMessage) != ntohs (m->size))
1598 { 1598 {
1599 GNUNET_break_op (0); 1599 GNUNET_break_op (0);
1600 return; 1600 return;
1601 } 1601 }
1602 1602
1603 msg = (const struct SessionKeepAliveMessage *) m; 1603 msg = (const struct GNUNET_ATS_SessionKeepAliveMessage *) m;
1604 if (NULL == (n = lookup_neighbour (neighbour))) 1604 if (NULL == (n = lookup_neighbour (neighbour)))
1605 { 1605 {
1606 GNUNET_STATISTICS_update (GST_stats, 1606 GNUNET_STATISTICS_update (GST_stats,
@@ -2080,7 +2080,7 @@ send_syn_ack_message (struct NeighbourAddress *na,
2080 struct GNUNET_TIME_Absolute timestamp) 2080 struct GNUNET_TIME_Absolute timestamp)
2081{ 2081{
2082 const struct GNUNET_HELLO_Address *address = na->address; 2082 const struct GNUNET_HELLO_Address *address = na->address;
2083 struct Session *session = na->session; 2083 struct GNUNET_ATS_Session *session = na->session;
2084 struct GNUNET_TRANSPORT_PluginFunctions *papi; 2084 struct GNUNET_TRANSPORT_PluginFunctions *papi;
2085 struct TransportSynMessage connect_msg; 2085 struct TransportSynMessage connect_msg;
2086 struct NeighbourMapEntry *n; 2086 struct NeighbourMapEntry *n;
@@ -2267,7 +2267,7 @@ static void
2267try_connect_bl_check_cont (void *cls, 2267try_connect_bl_check_cont (void *cls,
2268 const struct GNUNET_PeerIdentity *peer, 2268 const struct GNUNET_PeerIdentity *peer,
2269 const struct GNUNET_HELLO_Address *address, 2269 const struct GNUNET_HELLO_Address *address,
2270 struct Session *session, 2270 struct GNUNET_ATS_Session *session,
2271 int result) 2271 int result)
2272{ 2272{
2273 struct BlacklistCheckSwitchContext *blc_ctx = cls; 2273 struct BlacklistCheckSwitchContext *blc_ctx = cls;
@@ -2534,7 +2534,7 @@ GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message,
2534 */ 2534 */
2535static int 2535static int
2536try_run_fast_ats_update (const struct GNUNET_HELLO_Address *address, 2536try_run_fast_ats_update (const struct GNUNET_HELLO_Address *address,
2537 struct Session *session, 2537 struct GNUNET_ATS_Session *session,
2538 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 2538 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
2539 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) 2539 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
2540{ 2540{
@@ -2589,7 +2589,7 @@ static void
2589switch_address_bl_check_cont (void *cls, 2589switch_address_bl_check_cont (void *cls,
2590 const struct GNUNET_PeerIdentity *peer, 2590 const struct GNUNET_PeerIdentity *peer,
2591 const struct GNUNET_HELLO_Address *address, 2591 const struct GNUNET_HELLO_Address *address,
2592 struct Session *session, 2592 struct GNUNET_ATS_Session *session,
2593 int result) 2593 int result)
2594{ 2594{
2595 struct BlacklistCheckSwitchContext *blc_ctx = cls; 2595 struct BlacklistCheckSwitchContext *blc_ctx = cls;
@@ -2882,7 +2882,7 @@ switch_address_bl_check_cont (void *cls,
2882 */ 2882 */
2883void 2883void
2884GST_neighbours_switch_to_address (const struct GNUNET_HELLO_Address *address, 2884GST_neighbours_switch_to_address (const struct GNUNET_HELLO_Address *address,
2885 struct Session *session, 2885 struct GNUNET_ATS_Session *session,
2886 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 2886 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
2887 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out) 2887 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out)
2888{ 2888{
@@ -3042,7 +3042,7 @@ GST_neighbours_notify_data_recv (const struct GNUNET_HELLO_Address *address,
3042 */ 3042 */
3043void 3043void
3044GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address, 3044GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address,
3045 struct Session *session, 3045 struct GNUNET_ATS_Session *session,
3046 size_t size) 3046 size_t size)
3047{ 3047{
3048 struct NeighbourMapEntry *n; 3048 struct NeighbourMapEntry *n;
@@ -3240,7 +3240,7 @@ send_session_ack_message (struct NeighbourMapEntry *n)
3240 * We received a 'SESSION_SYN_ACK' message from the other peer. 3240 * We received a 'SESSION_SYN_ACK' message from the other peer.
3241 * Consider switching to it. 3241 * Consider switching to it.
3242 * 3242 *
3243 * @param message possibly a `struct SessionConnectMessage` (check format) 3243 * @param message possibly a `struct GNUNET_ATS_SessionConnectMessage` (check format)
3244 * @param peer identity of the peer to switch the address for 3244 * @param peer identity of the peer to switch the address for
3245 * @param address address of the other peer, NULL if other peer 3245 * @param address address of the other peer, NULL if other peer
3246 * connected to us 3246 * connected to us
@@ -3250,7 +3250,7 @@ send_session_ack_message (struct NeighbourMapEntry *n)
3250int 3250int
3251GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *message, 3251GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *message,
3252 const struct GNUNET_HELLO_Address *address, 3252 const struct GNUNET_HELLO_Address *address,
3253 struct Session *session) 3253 struct GNUNET_ATS_Session *session)
3254{ 3254{
3255 const struct TransportSynMessage *scm; 3255 const struct TransportSynMessage *scm;
3256 struct GNUNET_TIME_Absolute ts; 3256 struct GNUNET_TIME_Absolute ts;
@@ -3391,7 +3391,7 @@ GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *messag
3391 */ 3391 */
3392int 3392int
3393GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, 3393GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
3394 struct Session *session) 3394 struct GNUNET_ATS_Session *session)
3395{ 3395{
3396 struct NeighbourMapEntry *n; 3396 struct NeighbourMapEntry *n;
3397 struct BlackListCheckContext *bcc; 3397 struct BlackListCheckContext *bcc;
@@ -3539,7 +3539,7 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
3539 * If we sent a 'SYN_ACK' last, this means we are now 3539 * If we sent a 'SYN_ACK' last, this means we are now
3540 * connected. Otherwise, do nothing. 3540 * connected. Otherwise, do nothing.
3541 * 3541 *
3542 * @param message possibly a 'struct SessionConnectMessage' (check format) 3542 * @param message possibly a 'struct GNUNET_ATS_SessionConnectMessage' (check format)
3543 * @param address address of the other peer 3543 * @param address address of the other peer
3544 * @param session session to use (or NULL) 3544 * @param session session to use (or NULL)
3545 * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error 3545 * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error
@@ -3547,7 +3547,7 @@ GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
3547int 3547int
3548GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, 3548GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message,
3549 const struct GNUNET_HELLO_Address *address, 3549 const struct GNUNET_HELLO_Address *address,
3550 struct Session *session) 3550 struct GNUNET_ATS_Session *session)
3551{ 3551{
3552 struct NeighbourMapEntry *n; 3552 struct NeighbourMapEntry *n;
3553 3553
@@ -3673,12 +3673,12 @@ GST_neighbours_handle_quota_message (const struct GNUNET_PeerIdentity *peer,
3673 const struct GNUNET_MessageHeader *msg) 3673 const struct GNUNET_MessageHeader *msg)
3674{ 3674{
3675 struct NeighbourMapEntry *n; 3675 struct NeighbourMapEntry *n;
3676 const struct SessionQuotaMessage *sqm; 3676 const struct GNUNET_ATS_SessionQuotaMessage *sqm;
3677 3677
3678 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3678 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3679 "Received QUOTA message from peer `%s'\n", 3679 "Received QUOTA message from peer `%s'\n",
3680 GNUNET_i2s (peer)); 3680 GNUNET_i2s (peer));
3681 if (ntohs (msg->size) != sizeof (struct SessionQuotaMessage)) 3681 if (ntohs (msg->size) != sizeof (struct GNUNET_ATS_SessionQuotaMessage))
3682 { 3682 {
3683 GNUNET_break_op (0); 3683 GNUNET_break_op (0);
3684 GNUNET_STATISTICS_update (GST_stats, 3684 GNUNET_STATISTICS_update (GST_stats,
@@ -3691,7 +3691,7 @@ GST_neighbours_handle_quota_message (const struct GNUNET_PeerIdentity *peer,
3691 gettext_noop 3691 gettext_noop
3692 ("# QUOTA messages received"), 3692 ("# QUOTA messages received"),
3693 1, GNUNET_NO); 3693 1, GNUNET_NO);
3694 sqm = (const struct SessionQuotaMessage *) msg; 3694 sqm = (const struct GNUNET_ATS_SessionQuotaMessage *) msg;
3695 if (NULL == (n = lookup_neighbour (peer))) 3695 if (NULL == (n = lookup_neighbour (peer)))
3696 { 3696 {
3697 /* gone already */ 3697 /* gone already */
@@ -3716,12 +3716,12 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity *peer
3716 const struct GNUNET_MessageHeader *msg) 3716 const struct GNUNET_MessageHeader *msg)
3717{ 3717{
3718 struct NeighbourMapEntry *n; 3718 struct NeighbourMapEntry *n;
3719 const struct SessionDisconnectMessage *sdm; 3719 const struct GNUNET_ATS_SessionDisconnectMessage *sdm;
3720 3720
3721 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 3721 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
3722 "Received DISCONNECT message from peer `%s'\n", 3722 "Received DISCONNECT message from peer `%s'\n",
3723 GNUNET_i2s (peer)); 3723 GNUNET_i2s (peer));
3724 if (ntohs (msg->size) != sizeof (struct SessionDisconnectMessage)) 3724 if (ntohs (msg->size) != sizeof (struct GNUNET_ATS_SessionDisconnectMessage))
3725 { 3725 {
3726 GNUNET_break_op (0); 3726 GNUNET_break_op (0);
3727 GNUNET_STATISTICS_update (GST_stats, 3727 GNUNET_STATISTICS_update (GST_stats,
@@ -3735,7 +3735,7 @@ GST_neighbours_handle_disconnect_message (const struct GNUNET_PeerIdentity *peer
3735 gettext_noop 3735 gettext_noop
3736 ("# DISCONNECT messages received"), 3736 ("# DISCONNECT messages received"),
3737 1, GNUNET_NO); 3737 1, GNUNET_NO);
3738 sdm = (const struct SessionDisconnectMessage *) msg; 3738 sdm = (const struct GNUNET_ATS_SessionDisconnectMessage *) msg;
3739 if (NULL == (n = lookup_neighbour (peer))) 3739 if (NULL == (n = lookup_neighbour (peer)))
3740 { 3740 {
3741 /* gone already */ 3741 /* gone already */
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h
index a6c9f2f53..b7864399d 100644
--- a/src/transport/gnunet-service-transport_neighbours.h
+++ b/src/transport/gnunet-service-transport_neighbours.h
@@ -194,7 +194,7 @@ GST_neighbours_iterate (GST_NeighbourIterator cb, void *cb_cls);
194 */ 194 */
195int 195int
196GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer, 196GST_neighbours_session_terminated (const struct GNUNET_PeerIdentity *peer,
197 struct Session *session); 197 struct GNUNET_ATS_Session *session);
198 198
199 199
200/** 200/**
@@ -221,7 +221,7 @@ GST_neighbours_notify_data_recv (const struct GNUNET_HELLO_Address *address,
221 */ 221 */
222void 222void
223GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address, 223GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address,
224 struct Session *session, 224 struct GNUNET_ATS_Session *session,
225 size_t size); 225 size_t size);
226 226
227 227
@@ -236,7 +236,7 @@ GST_neighbours_notify_data_sent (const struct GNUNET_HELLO_Address *address,
236 */ 236 */
237void 237void
238GST_neighbours_switch_to_address (const struct GNUNET_HELLO_Address *address, 238GST_neighbours_switch_to_address (const struct GNUNET_HELLO_Address *address,
239 struct Session *session, 239 struct GNUNET_ATS_Session *session,
240 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in, 240 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_in,
241 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out); 241 struct GNUNET_BANDWIDTH_Value32NBO bandwidth_out);
242 242
@@ -245,7 +245,7 @@ GST_neighbours_switch_to_address (const struct GNUNET_HELLO_Address *address,
245 * We received a 'SESSION_CONNECT' message from the other peer. 245 * We received a 'SESSION_CONNECT' message from the other peer.
246 * Consider switching to it. 246 * Consider switching to it.
247 * 247 *
248 * @param message possibly a 'struct SessionConnectMessage' (check format) 248 * @param message possibly a 'struct GNUNET_ATS_SessionConnectMessage' (check format)
249 * @param peer identity of the peer to switch the address for 249 * @param peer identity of the peer to switch the address for
250 * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error 250 * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error
251 */ 251 */
@@ -258,7 +258,7 @@ GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message,
258 * We received a 'SESSION_CONNECT_ACK' message from the other peer. 258 * We received a 'SESSION_CONNECT_ACK' message from the other peer.
259 * Consider switching to it. 259 * Consider switching to it.
260 * 260 *
261 * @param message possibly a `struct SessionConnectMessage` (check format) 261 * @param message possibly a `struct GNUNET_ATS_SessionConnectMessage` (check format)
262 * @param address address of the other peer 262 * @param address address of the other peer
263 * @param session session to use (or NULL) 263 * @param session session to use (or NULL)
264 * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error 264 * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error
@@ -266,7 +266,7 @@ GST_neighbours_handle_session_syn (const struct GNUNET_MessageHeader *message,
266int 266int
267GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *message, 267GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *message,
268 const struct GNUNET_HELLO_Address *address, 268 const struct GNUNET_HELLO_Address *address,
269 struct Session *session); 269 struct GNUNET_ATS_Session *session);
270 270
271 271
272/** 272/**
@@ -274,7 +274,7 @@ GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *messag
274 * If we sent a 'CONNECT_ACK' last, this means we are now 274 * If we sent a 'CONNECT_ACK' last, this means we are now
275 * connected. Otherwise, do nothing. 275 * connected. Otherwise, do nothing.
276 * 276 *
277 * @param message possibly a 'struct SessionConnectMessage' (check format) 277 * @param message possibly a 'struct GNUNET_ATS_SessionConnectMessage' (check format)
278 * @param address address of the other peer 278 * @param address address of the other peer
279 * @param session session to use (or NULL) 279 * @param session session to use (or NULL)
280 * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error 280 * @return #GNUNET_OK if the message was fine, #GNUNET_SYSERR on serious error
@@ -282,7 +282,7 @@ GST_neighbours_handle_session_syn_ack (const struct GNUNET_MessageHeader *messag
282int 282int
283GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message, 283GST_neighbours_handle_session_ack (const struct GNUNET_MessageHeader *message,
284 const struct GNUNET_HELLO_Address *address, 284 const struct GNUNET_HELLO_Address *address,
285 struct Session *session); 285 struct GNUNET_ATS_Session *session);
286 286
287 287
288/** 288/**
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index 89e901561..d36418cc2 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -517,7 +517,7 @@ static void
517transmit_ping_if_allowed (void *cls, 517transmit_ping_if_allowed (void *cls,
518 const struct GNUNET_PeerIdentity *pid, 518 const struct GNUNET_PeerIdentity *pid,
519 const struct GNUNET_HELLO_Address *address_null, 519 const struct GNUNET_HELLO_Address *address_null,
520 struct Session *session_null, 520 struct GNUNET_ATS_Session *session_null,
521 int result) 521 int result)
522{ 522{
523 struct ValidationEntry *ve = cls; 523 struct ValidationEntry *ve = cls;
@@ -529,7 +529,7 @@ transmit_ping_if_allowed (void *cls,
529 size_t tsize; 529 size_t tsize;
530 size_t slen; 530 size_t slen;
531 uint16_t hsize; 531 uint16_t hsize;
532 struct Session *session; 532 struct GNUNET_ATS_Session *session;
533 533
534 ve->bc = NULL; 534 ve->bc = NULL;
535 if (GNUNET_OK != result) 535 if (GNUNET_OK != result)
@@ -995,7 +995,7 @@ multicast_pong (void *cls,
995{ 995{
996 struct TransportPongMessage *pong = cls; 996 struct TransportPongMessage *pong = cls;
997 struct GNUNET_TRANSPORT_PluginFunctions *papi; 997 struct GNUNET_TRANSPORT_PluginFunctions *papi;
998 struct Session *session; 998 struct GNUNET_ATS_Session *session;
999 999
1000 papi = GST_plugins_find (address->transport_name); 1000 papi = GST_plugins_find (address->transport_name);
1001 if (NULL == papi) 1001 if (NULL == papi)
@@ -1039,7 +1039,7 @@ int
1039GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender, 1039GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
1040 const struct GNUNET_MessageHeader *hdr, 1040 const struct GNUNET_MessageHeader *hdr,
1041 const struct GNUNET_HELLO_Address *sender_address, 1041 const struct GNUNET_HELLO_Address *sender_address,
1042 struct Session *session) 1042 struct GNUNET_ATS_Session *session)
1043{ 1043{
1044 const struct TransportPingMessage *ping; 1044 const struct TransportPingMessage *ping;
1045 struct TransportPongMessage *pong; 1045 struct TransportPongMessage *pong;
diff --git a/src/transport/gnunet-service-transport_validation.h b/src/transport/gnunet-service-transport_validation.h
index 6a807934b..458fda453 100644
--- a/src/transport/gnunet-service-transport_validation.h
+++ b/src/transport/gnunet-service-transport_validation.h
@@ -104,7 +104,7 @@ int
104GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender, 104GST_validation_handle_ping (const struct GNUNET_PeerIdentity *sender,
105 const struct GNUNET_MessageHeader *hdr, 105 const struct GNUNET_MessageHeader *hdr,
106 const struct GNUNET_HELLO_Address *sender_address, 106 const struct GNUNET_HELLO_Address *sender_address,
107 struct Session *session); 107 struct GNUNET_ATS_Session *session);
108 108
109 109
110/** 110/**
diff --git a/src/transport/plugin_transport_http.h b/src/transport/plugin_transport_http.h
index 94952173c..1e32cbf42 100644
--- a/src/transport/plugin_transport_http.h
+++ b/src/transport/plugin_transport_http.h
@@ -80,12 +80,12 @@ struct Plugin
80 /** 80 /**
81 * Head of linked list of open sessions. 81 * Head of linked list of open sessions.
82 */ 82 */
83 struct Session *head; 83 struct GNUNET_ATS_Session *head;
84 84
85 /** 85 /**
86 * Tail of linked list of open sessions. 86 * Tail of linked list of open sessions.
87 */ 87 */
88 struct Session *tail; 88 struct GNUNET_ATS_Session *tail;
89 89
90 /** 90 /**
91 * NAT handle & address management 91 * NAT handle & address management
@@ -247,14 +247,14 @@ struct Plugin
247 * A full session consists of 2 semi-connections: send and receive 247 * A full session consists of 2 semi-connections: send and receive
248 * If not both directions are established the server keeps this sessions here 248 * If not both directions are established the server keeps this sessions here
249 */ 249 */
250 struct Session *server_semi_head; 250 struct GNUNET_ATS_Session *server_semi_head;
251 251
252 /** 252 /**
253 * Tail of server semi connections 253 * Tail of server semi connections
254 * A full session consists of 2 semi-connections: send and receive 254 * A full session consists of 2 semi-connections: send and receive
255 * If not both directions are established the server keeps this sessions here 255 * If not both directions are established the server keeps this sessions here
256 */ 256 */
257 struct Session *server_semi_tail; 257 struct GNUNET_ATS_Session *server_semi_tail;
258 258
259 /** 259 /**
260 * cURL Multihandle 260 * cURL Multihandle
@@ -335,7 +335,7 @@ struct ServerRequest
335 /** 335 /**
336 * The session this server connection belongs to 336 * The session this server connection belongs to
337 */ 337 */
338 struct Session *session; 338 struct GNUNET_ATS_Session *session;
339 339
340 /** 340 /**
341 * The MHD connection 341 * The MHD connection
@@ -347,7 +347,7 @@ struct ServerRequest
347/** 347/**
348 * Session handle for connections. 348 * Session handle for connections.
349 */ 349 */
350struct Session 350struct GNUNET_ATS_Session
351{ 351{
352 /** 352 /**
353 * To whom are we talking to 353 * To whom are we talking to
@@ -357,12 +357,12 @@ struct Session
357 /** 357 /**
358 * Stored in a linked list. 358 * Stored in a linked list.
359 */ 359 */
360 struct Session *next; 360 struct GNUNET_ATS_Session *next;
361 361
362 /** 362 /**
363 * Stored in a linked list. 363 * Stored in a linked list.
364 */ 364 */
365 struct Session *prev; 365 struct GNUNET_ATS_Session *prev;
366 366
367 /** 367 /**
368 * Pointer to the global plugin struct. 368 * Pointer to the global plugin struct.
@@ -499,7 +499,7 @@ struct HTTP_Message
499}; 499};
500 500
501 501
502struct Session * 502struct GNUNET_ATS_Session *
503create_session (struct Plugin *plugin, 503create_session (struct Plugin *plugin,
504 const struct GNUNET_PeerIdentity *target, 504 const struct GNUNET_PeerIdentity *target,
505 const void *addr, 505 const void *addr,
@@ -508,23 +508,23 @@ create_session (struct Plugin *plugin,
508 508
509int 509int
510exist_session (struct Plugin *plugin, 510exist_session (struct Plugin *plugin,
511 struct Session *s); 511 struct GNUNET_ATS_Session *s);
512 512
513 513
514void 514void
515delete_session (struct Session *s); 515delete_session (struct GNUNET_ATS_Session *s);
516 516
517 517
518int 518int
519exist_session (struct Plugin *plugin, 519exist_session (struct Plugin *plugin,
520 struct Session *s); 520 struct GNUNET_ATS_Session *s);
521 521
522 522
523struct GNUNET_TIME_Relative 523struct GNUNET_TIME_Relative
524http_plugin_receive (void *cls, 524http_plugin_receive (void *cls,
525 const struct GNUNET_PeerIdentity *peer, 525 const struct GNUNET_PeerIdentity *peer,
526 const struct GNUNET_MessageHeader *message, 526 const struct GNUNET_MessageHeader *message,
527 struct Session *session, 527 struct GNUNET_ATS_Session *session,
528 const char *sender_address, 528 const char *sender_address,
529 uint16_t sender_address_len); 529 uint16_t sender_address_len);
530 530
@@ -536,15 +536,15 @@ http_plugin_address_to_string (void *cls,
536 536
537 537
538int 538int
539client_disconnect (struct Session *s); 539client_disconnect (struct GNUNET_ATS_Session *s);
540 540
541 541
542int 542int
543client_connect (struct Session *s); 543client_connect (struct GNUNET_ATS_Session *s);
544 544
545 545
546int 546int
547client_send (struct Session *s, struct HTTP_Message *msg); 547client_send (struct GNUNET_ATS_Session *s, struct HTTP_Message *msg);
548 548
549 549
550int 550int
@@ -556,11 +556,11 @@ client_stop (struct Plugin *plugin);
556 556
557 557
558int 558int
559server_disconnect (struct Session *s); 559server_disconnect (struct GNUNET_ATS_Session *s);
560 560
561 561
562int 562int
563server_send (struct Session *s, struct HTTP_Message *msg); 563server_send (struct GNUNET_ATS_Session *s, struct HTTP_Message *msg);
564 564
565 565
566int 566int
@@ -574,7 +574,7 @@ server_stop (struct Plugin *plugin);
574void 574void
575notify_session_end (void *cls, 575notify_session_end (void *cls,
576 const struct GNUNET_PeerIdentity *peer, 576 const struct GNUNET_PeerIdentity *peer,
577 struct Session *s); 577 struct GNUNET_ATS_Session *s);
578 578
579 579
580/*#ifndef PLUGIN_TRANSPORT_HTTP_H*/ 580/*#ifndef PLUGIN_TRANSPORT_HTTP_H*/
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 8066fb384..262961a29 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -152,7 +152,7 @@ struct HTTP_Message
152/** 152/**
153 * Session handle for HTTP(S) connections. 153 * Session handle for HTTP(S) connections.
154 */ 154 */
155struct Session; 155struct GNUNET_ATS_Session;
156 156
157 157
158/** 158/**
@@ -174,14 +174,14 @@ struct RequestHandle
174 /** 174 /**
175 * The related session 175 * The related session
176 */ 176 */
177 struct Session *s; 177 struct GNUNET_ATS_Session *s;
178}; 178};
179 179
180 180
181/** 181/**
182 * Session handle for connections. 182 * Session handle for connections.
183 */ 183 */
184struct Session 184struct GNUNET_ATS_Session
185{ 185{
186 /** 186 /**
187 * The URL to connect to 187 * The URL to connect to
@@ -397,7 +397,7 @@ struct HTTP_Client_Plugin
397 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error 397 * @return #GNUNET_OK on success, #GNUNET_SYSERR on error
398 */ 398 */
399static int 399static int
400http_client_plugin_session_disconnect (void *cls, struct Session *s); 400http_client_plugin_session_disconnect (void *cls, struct GNUNET_ATS_Session *s);
401 401
402 402
403/** 403/**
@@ -410,7 +410,7 @@ http_client_plugin_session_disconnect (void *cls, struct Session *s);
410 */ 410 */
411static void 411static void
412notify_session_monitor (struct HTTP_Client_Plugin *plugin, 412notify_session_monitor (struct HTTP_Client_Plugin *plugin,
413 struct Session *session, 413 struct GNUNET_ATS_Session *session,
414 enum GNUNET_TRANSPORT_SessionState state) 414 enum GNUNET_TRANSPORT_SessionState state)
415{ 415{
416 struct GNUNET_TRANSPORT_SessionInfo info; 416 struct GNUNET_TRANSPORT_SessionInfo info;
@@ -437,7 +437,7 @@ notify_session_monitor (struct HTTP_Client_Plugin *plugin,
437 * @param s the session to delete 437 * @param s the session to delete
438 */ 438 */
439static void 439static void
440client_delete_session (struct Session *s) 440client_delete_session (struct GNUNET_ATS_Session *s)
441{ 441{
442 struct HTTP_Client_Plugin *plugin = s->plugin; 442 struct HTTP_Client_Plugin *plugin = s->plugin;
443 struct HTTP_Message *pos; 443 struct HTTP_Message *pos;
@@ -543,7 +543,7 @@ client_delete_session (struct Session *s)
543 * @param s the session 543 * @param s the session
544 */ 544 */
545static void 545static void
546client_reschedule_session_timeout (struct Session *s) 546client_reschedule_session_timeout (struct GNUNET_ATS_Session *s)
547{ 547{
548 GNUNET_assert (NULL != s->timeout_task); 548 GNUNET_assert (NULL != s->timeout_task);
549 s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); 549 s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT);
@@ -708,7 +708,7 @@ client_log (CURL *curl,
708 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 708 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
709 */ 709 */
710static int 710static int
711client_connect_get (struct Session *s); 711client_connect_get (struct GNUNET_ATS_Session *s);
712 712
713 713
714/** 714/**
@@ -718,7 +718,7 @@ client_connect_get (struct Session *s);
718 * @return #GNUNET_SYSERR for hard failure, #GNUNET_OK for success 718 * @return #GNUNET_SYSERR for hard failure, #GNUNET_OK for success
719 */ 719 */
720static int 720static int
721client_connect_put (struct Session *s); 721client_connect_put (struct GNUNET_ATS_Session *s);
722 722
723 723
724/** 724/**
@@ -750,7 +750,7 @@ client_connect_put (struct Session *s);
750 */ 750 */
751static ssize_t 751static ssize_t
752http_client_plugin_send (void *cls, 752http_client_plugin_send (void *cls,
753 struct Session *s, 753 struct GNUNET_ATS_Session *s,
754 const char *msgbuf, 754 const char *msgbuf,
755 size_t msgbuf_size, 755 size_t msgbuf_size,
756 unsigned int priority, 756 unsigned int priority,
@@ -842,7 +842,7 @@ http_client_plugin_send (void *cls,
842 */ 842 */
843static int 843static int
844http_client_plugin_session_disconnect (void *cls, 844http_client_plugin_session_disconnect (void *cls,
845 struct Session *s) 845 struct GNUNET_ATS_Session *s)
846{ 846{
847 struct HTTP_Client_Plugin *plugin = cls; 847 struct HTTP_Client_Plugin *plugin = cls;
848 848
@@ -886,7 +886,7 @@ http_client_query_keepalive_factor (void *cls)
886 * 886 *
887 * @param cls the `struct HTTP_Client_Plugin *` 887 * @param cls the `struct HTTP_Client_Plugin *`
888 * @param peer identity of the peer 888 * @param peer identity of the peer
889 * @param value the `struct Session *` 889 * @param value the `struct GNUNET_ATS_Session *`
890 * @return #GNUNET_OK (continue iterating) 890 * @return #GNUNET_OK (continue iterating)
891 */ 891 */
892static int 892static int
@@ -895,7 +895,7 @@ destroy_session_cb (void *cls,
895 void *value) 895 void *value)
896{ 896{
897 struct HTTP_Client_Plugin *plugin = cls; 897 struct HTTP_Client_Plugin *plugin = cls;
898 struct Session *session = value; 898 struct GNUNET_ATS_Session *session = value;
899 899
900 http_client_plugin_session_disconnect (plugin, session); 900 http_client_plugin_session_disconnect (plugin, session);
901 return GNUNET_OK; 901 return GNUNET_OK;
@@ -929,7 +929,7 @@ http_client_plugin_peer_disconnect (void *cls,
929/** 929/**
930 * Closure for #session_lookup_client_by_address(). 930 * Closure for #session_lookup_client_by_address().
931 */ 931 */
932struct SessionClientCtx 932struct GNUNET_ATS_SessionClientCtx
933{ 933{
934 /** 934 /**
935 * Address we are looking for. 935 * Address we are looking for.
@@ -939,16 +939,16 @@ struct SessionClientCtx
939 /** 939 /**
940 * Session that was found. 940 * Session that was found.
941 */ 941 */
942 struct Session *ret; 942 struct GNUNET_ATS_Session *ret;
943}; 943};
944 944
945 945
946/** 946/**
947 * Locate the seession object for a given address. 947 * Locate the seession object for a given address.
948 * 948 *
949 * @param cls the `struct SessionClientCtx *` 949 * @param cls the `struct GNUNET_ATS_SessionClientCtx *`
950 * @param key peer identity 950 * @param key peer identity
951 * @param value the `struct Session` to check 951 * @param value the `struct GNUNET_ATS_Session` to check
952 * @return #GNUNET_NO if found, #GNUNET_OK if not 952 * @return #GNUNET_NO if found, #GNUNET_OK if not
953 */ 953 */
954static int 954static int
@@ -956,8 +956,8 @@ session_lookup_client_by_address (void *cls,
956 const struct GNUNET_PeerIdentity *key, 956 const struct GNUNET_PeerIdentity *key,
957 void *value) 957 void *value)
958{ 958{
959 struct SessionClientCtx *sc_ctx = cls; 959 struct GNUNET_ATS_SessionClientCtx *sc_ctx = cls;
960 struct Session *s = value; 960 struct GNUNET_ATS_Session *s = value;
961 961
962 if (0 == GNUNET_HELLO_address_cmp (sc_ctx->address, 962 if (0 == GNUNET_HELLO_address_cmp (sc_ctx->address,
963 s->address)) 963 s->address))
@@ -976,11 +976,11 @@ session_lookup_client_by_address (void *cls,
976 * @param address the address 976 * @param address the address
977 * @return the session or NULL 977 * @return the session or NULL
978 */ 978 */
979static struct Session * 979static struct GNUNET_ATS_Session *
980client_lookup_session (struct HTTP_Client_Plugin *plugin, 980client_lookup_session (struct HTTP_Client_Plugin *plugin,
981 const struct GNUNET_HELLO_Address *address) 981 const struct GNUNET_HELLO_Address *address)
982{ 982{
983 struct SessionClientCtx sc_ctx; 983 struct GNUNET_ATS_SessionClientCtx sc_ctx;
984 984
985 sc_ctx.address = address; 985 sc_ctx.address = address;
986 sc_ctx.ret = NULL; 986 sc_ctx.ret = NULL;
@@ -996,14 +996,14 @@ client_lookup_session (struct HTTP_Client_Plugin *plugin,
996 * after a while (so that gnurl stops asking). This task 996 * after a while (so that gnurl stops asking). This task
997 * is the delayed task that actually disconnects the PUT. 997 * is the delayed task that actually disconnects the PUT.
998 * 998 *
999 * @param cls the `struct Session *` with the put 999 * @param cls the `struct GNUNET_ATS_Session *` with the put
1000 * @param tc scheduler context 1000 * @param tc scheduler context
1001 */ 1001 */
1002static void 1002static void
1003client_put_disconnect (void *cls, 1003client_put_disconnect (void *cls,
1004 const struct GNUNET_SCHEDULER_TaskContext *tc) 1004 const struct GNUNET_SCHEDULER_TaskContext *tc)
1005{ 1005{
1006 struct Session *s = cls; 1006 struct GNUNET_ATS_Session *s = cls;
1007 1007
1008 s->put_disconnect_task = NULL; 1008 s->put_disconnect_task = NULL;
1009 LOG (GNUNET_ERROR_TYPE_DEBUG, 1009 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -1024,7 +1024,7 @@ client_put_disconnect (void *cls,
1024 * @param stream pointer where to write data 1024 * @param stream pointer where to write data
1025 * @param size size of an individual element 1025 * @param size size of an individual element
1026 * @param nmemb count of elements that can be written to the buffer 1026 * @param nmemb count of elements that can be written to the buffer
1027 * @param cls our `struct Session` 1027 * @param cls our `struct GNUNET_ATS_Session`
1028 * @return bytes written to stream, returning 0 will terminate request! 1028 * @return bytes written to stream, returning 0 will terminate request!
1029 */ 1029 */
1030static size_t 1030static size_t
@@ -1033,7 +1033,7 @@ client_send_cb (void *stream,
1033 size_t nmemb, 1033 size_t nmemb,
1034 void *cls) 1034 void *cls)
1035{ 1035{
1036 struct Session *s = cls; 1036 struct GNUNET_ATS_Session *s = cls;
1037 struct HTTP_Client_Plugin *plugin = s->plugin; 1037 struct HTTP_Client_Plugin *plugin = s->plugin;
1038 struct HTTP_Message *msg = s->msg_head; 1038 struct HTTP_Message *msg = s->msg_head;
1039 size_t len; 1039 size_t len;
@@ -1134,7 +1134,7 @@ static void
1134client_wake_up (void *cls, 1134client_wake_up (void *cls,
1135 const struct GNUNET_SCHEDULER_TaskContext *tc) 1135 const struct GNUNET_SCHEDULER_TaskContext *tc)
1136{ 1136{
1137 struct Session *s = cls; 1137 struct GNUNET_ATS_Session *s = cls;
1138 1138
1139 s->recv_wakeup_task = NULL; 1139 s->recv_wakeup_task = NULL;
1140 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 1140 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
@@ -1170,7 +1170,7 @@ client_receive_mst_cb (void *cls,
1170 void *client, 1170 void *client,
1171 const struct GNUNET_MessageHeader *message) 1171 const struct GNUNET_MessageHeader *message)
1172{ 1172{
1173 struct Session *s = cls; 1173 struct GNUNET_ATS_Session *s = cls;
1174 struct HTTP_Client_Plugin *plugin; 1174 struct HTTP_Client_Plugin *plugin;
1175 struct GNUNET_TIME_Relative delay; 1175 struct GNUNET_TIME_Relative delay;
1176 char *stat_txt; 1176 char *stat_txt;
@@ -1242,7 +1242,7 @@ client_receive (void *stream,
1242 size_t nmemb, 1242 size_t nmemb,
1243 void *cls) 1243 void *cls)
1244{ 1244{
1245 struct Session *s = cls; 1245 struct GNUNET_ATS_Session *s = cls;
1246 struct GNUNET_TIME_Absolute now; 1246 struct GNUNET_TIME_Absolute now;
1247 size_t len = size * nmemb; 1247 size_t len = size * nmemb;
1248 1248
@@ -1322,14 +1322,14 @@ client_run (void *cls,
1322 while (NULL != (msg = curl_multi_info_read (plugin->curl_multi_handle, &msgs_left))) 1322 while (NULL != (msg = curl_multi_info_read (plugin->curl_multi_handle, &msgs_left)))
1323 { 1323 {
1324 CURL *easy_h = msg->easy_handle; 1324 CURL *easy_h = msg->easy_handle;
1325 struct Session *s = NULL; 1325 struct GNUNET_ATS_Session *s = NULL;
1326 char *d = NULL; /* curl requires 'd' to be a 'char *' */ 1326 char *d = NULL; /* curl requires 'd' to be a 'char *' */
1327 1327
1328 GNUNET_assert (NULL != easy_h); 1328 GNUNET_assert (NULL != easy_h);
1329 1329
1330 /* Obtain session from easy handle */ 1330 /* Obtain session from easy handle */
1331 GNUNET_assert (CURLE_OK == curl_easy_getinfo (easy_h, CURLINFO_PRIVATE, &d)); 1331 GNUNET_assert (CURLE_OK == curl_easy_getinfo (easy_h, CURLINFO_PRIVATE, &d));
1332 s = (struct Session *) d; 1332 s = (struct GNUNET_ATS_Session *) d;
1333 GNUNET_assert (NULL != s); 1333 GNUNET_assert (NULL != s);
1334 1334
1335 if (msg->msg != CURLMSG_DONE) 1335 if (msg->msg != CURLMSG_DONE)
@@ -1450,7 +1450,7 @@ client_run (void *cls,
1450/** 1450/**
1451 * Open TCP socket with TCP STEALTH enabled. 1451 * Open TCP socket with TCP STEALTH enabled.
1452 * 1452 *
1453 * @param clientp our `struct Session *` 1453 * @param clientp our `struct GNUNET_ATS_Session *`
1454 * @param purpose why does curl want to open a socket 1454 * @param purpose why does curl want to open a socket
1455 * @param address what kind of socket does curl want to have opened? 1455 * @param address what kind of socket does curl want to have opened?
1456 * @return opened socket 1456 * @return opened socket
@@ -1460,7 +1460,7 @@ open_tcp_stealth_socket_cb (void *clientp,
1460 curlsocktype purpose, 1460 curlsocktype purpose,
1461 struct curl_sockaddr *address) 1461 struct curl_sockaddr *address)
1462{ 1462{
1463 struct Session *s = clientp; 1463 struct GNUNET_ATS_Session *s = clientp;
1464 int ret; 1464 int ret;
1465 1465
1466 switch (purpose) 1466 switch (purpose)
@@ -1509,7 +1509,7 @@ open_tcp_stealth_socket_cb (void *clientp,
1509 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 1509 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
1510 */ 1510 */
1511static int 1511static int
1512client_connect_get (struct Session *s) 1512client_connect_get (struct GNUNET_ATS_Session *s)
1513{ 1513{
1514 CURLMcode mret; 1514 CURLMcode mret;
1515 struct HttpAddress *ha; 1515 struct HttpAddress *ha;
@@ -1689,7 +1689,7 @@ client_connect_get (struct Session *s)
1689 * @return #GNUNET_SYSERR for hard failure, #GNUNET_OK for ok 1689 * @return #GNUNET_SYSERR for hard failure, #GNUNET_OK for ok
1690 */ 1690 */
1691static int 1691static int
1692client_connect_put (struct Session *s) 1692client_connect_put (struct GNUNET_ATS_Session *s)
1693{ 1693{
1694 CURLMcode mret; 1694 CURLMcode mret;
1695 struct HttpAddress *ha; 1695 struct HttpAddress *ha;
@@ -1861,7 +1861,7 @@ client_connect_put (struct Session *s)
1861 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise 1861 * @return #GNUNET_OK on success, #GNUNET_SYSERR otherwise
1862 */ 1862 */
1863static int 1863static int
1864client_connect (struct Session *s) 1864client_connect (struct GNUNET_ATS_Session *s)
1865{ 1865{
1866 struct HTTP_Client_Plugin *plugin = s->plugin; 1866 struct HTTP_Client_Plugin *plugin = s->plugin;
1867 int res = GNUNET_OK; 1867 int res = GNUNET_OK;
@@ -1935,7 +1935,7 @@ client_connect (struct Session *s)
1935 */ 1935 */
1936static enum GNUNET_ATS_Network_Type 1936static enum GNUNET_ATS_Network_Type
1937http_client_plugin_get_network (void *cls, 1937http_client_plugin_get_network (void *cls,
1938 struct Session *session) 1938 struct GNUNET_ATS_Session *session)
1939{ 1939{
1940 return session->scope; 1940 return session->scope;
1941} 1941}
@@ -1962,14 +1962,14 @@ http_client_plugin_get_network_for_address (void *cls,
1962/** 1962/**
1963 * Session was idle, so disconnect it 1963 * Session was idle, so disconnect it
1964 * 1964 *
1965 * @param cls the `struct Session` of the idle session 1965 * @param cls the `struct GNUNET_ATS_Session` of the idle session
1966 * @param tc scheduler context 1966 * @param tc scheduler context
1967 */ 1967 */
1968static void 1968static void
1969client_session_timeout (void *cls, 1969client_session_timeout (void *cls,
1970 const struct GNUNET_SCHEDULER_TaskContext *tc) 1970 const struct GNUNET_SCHEDULER_TaskContext *tc)
1971{ 1971{
1972 struct Session *s = cls; 1972 struct GNUNET_ATS_Session *s = cls;
1973 struct GNUNET_TIME_Relative left; 1973 struct GNUNET_TIME_Relative left;
1974 1974
1975 s->timeout_task = NULL; 1975 s->timeout_task = NULL;
@@ -2005,12 +2005,12 @@ client_session_timeout (void *cls,
2005 * @param address the address 2005 * @param address the address
2006 * @return the session or NULL of max connections exceeded 2006 * @return the session or NULL of max connections exceeded
2007 */ 2007 */
2008static struct Session * 2008static struct GNUNET_ATS_Session *
2009http_client_plugin_get_session (void *cls, 2009http_client_plugin_get_session (void *cls,
2010 const struct GNUNET_HELLO_Address *address) 2010 const struct GNUNET_HELLO_Address *address)
2011{ 2011{
2012 struct HTTP_Client_Plugin *plugin = cls; 2012 struct HTTP_Client_Plugin *plugin = cls;
2013 struct Session *s; 2013 struct GNUNET_ATS_Session *s;
2014 struct sockaddr *sa; 2014 struct sockaddr *sa;
2015 enum GNUNET_ATS_Network_Type net_type; 2015 enum GNUNET_ATS_Network_Type net_type;
2016 size_t salen = 0; 2016 size_t salen = 0;
@@ -2066,7 +2066,7 @@ http_client_plugin_get_session (void *cls,
2066 return NULL; 2066 return NULL;
2067 } 2067 }
2068 2068
2069 s = GNUNET_new (struct Session); 2069 s = GNUNET_new (struct GNUNET_ATS_Session);
2070 s->plugin = plugin; 2070 s->plugin = plugin;
2071 s->address = GNUNET_HELLO_address_copy (address); 2071 s->address = GNUNET_HELLO_address_copy (address);
2072 s->scope = net_type; 2072 s->scope = net_type;
@@ -2354,7 +2354,7 @@ http_client_plugin_address_to_string (void *cls,
2354static void 2354static void
2355http_client_plugin_update_session_timeout (void *cls, 2355http_client_plugin_update_session_timeout (void *cls,
2356 const struct GNUNET_PeerIdentity *peer, 2356 const struct GNUNET_PeerIdentity *peer,
2357 struct Session *session) 2357 struct GNUNET_ATS_Session *session)
2358{ 2358{
2359 client_reschedule_session_timeout (session); 2359 client_reschedule_session_timeout (session);
2360} 2360}
@@ -2373,7 +2373,7 @@ http_client_plugin_update_session_timeout (void *cls,
2373static void 2373static void
2374http_client_plugin_update_inbound_delay (void *cls, 2374http_client_plugin_update_inbound_delay (void *cls,
2375 const struct GNUNET_PeerIdentity *peer, 2375 const struct GNUNET_PeerIdentity *peer,
2376 struct Session *s, 2376 struct GNUNET_ATS_Session *s,
2377 struct GNUNET_TIME_Relative delay) 2377 struct GNUNET_TIME_Relative delay)
2378{ 2378{
2379 s->next_receive = GNUNET_TIME_relative_to_absolute (delay); 2379 s->next_receive = GNUNET_TIME_relative_to_absolute (delay);
@@ -2396,7 +2396,7 @@ http_client_plugin_update_inbound_delay (void *cls,
2396 * 2396 *
2397 * @param cls the `struct Plugin` with the monitor callback (`sic`) 2397 * @param cls the `struct Plugin` with the monitor callback (`sic`)
2398 * @param peer peer we send information about 2398 * @param peer peer we send information about
2399 * @param value our `struct Session` to send information about 2399 * @param value our `struct GNUNET_ATS_Session` to send information about
2400 * @return #GNUNET_OK (continue to iterate) 2400 * @return #GNUNET_OK (continue to iterate)
2401 */ 2401 */
2402static int 2402static int
@@ -2405,7 +2405,7 @@ send_session_info_iter (void *cls,
2405 void *value) 2405 void *value)
2406{ 2406{
2407 struct HTTP_Client_Plugin *plugin = cls; 2407 struct HTTP_Client_Plugin *plugin = cls;
2408 struct Session *session = value; 2408 struct GNUNET_ATS_Session *session = value;
2409 2409
2410 notify_session_monitor (plugin, 2410 notify_session_monitor (plugin,
2411 session, 2411 session,
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index db483098a..07137e0fb 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -63,7 +63,7 @@ struct ServerRequest
63 * The session this server request belongs to 63 * The session this server request belongs to
64 * Can be NULL, when session was disconnected and freed 64 * Can be NULL, when session was disconnected and freed
65 */ 65 */
66 struct Session *session; 66 struct GNUNET_ATS_Session *session;
67 67
68 /** 68 /**
69 * The MHD connection 69 * The MHD connection
@@ -174,7 +174,7 @@ struct HTTP_Message
174/** 174/**
175 * Session handle for connections. 175 * Session handle for connections.
176 */ 176 */
177struct Session 177struct GNUNET_ATS_Session
178{ 178{
179 179
180 /** 180 /**
@@ -466,7 +466,7 @@ struct HTTP_Server_Plugin
466 */ 466 */
467static void 467static void
468notify_session_monitor (struct HTTP_Server_Plugin *plugin, 468notify_session_monitor (struct HTTP_Server_Plugin *plugin,
469 struct Session *session, 469 struct GNUNET_ATS_Session *session,
470 enum GNUNET_TRANSPORT_SessionState state) 470 enum GNUNET_TRANSPORT_SessionState state)
471{ 471{
472 struct GNUNET_TRANSPORT_SessionInfo info; 472 struct GNUNET_TRANSPORT_SessionInfo info;
@@ -497,7 +497,7 @@ static void
497server_wake_up (void *cls, 497server_wake_up (void *cls,
498 const struct GNUNET_SCHEDULER_TaskContext *tc) 498 const struct GNUNET_SCHEDULER_TaskContext *tc)
499{ 499{
500 struct Session *s = cls; 500 struct GNUNET_ATS_Session *s = cls;
501 501
502 s->recv_wakeup_task = NULL; 502 s->recv_wakeup_task = NULL;
503 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)) 503 if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
@@ -529,7 +529,7 @@ server_reschedule (struct HTTP_Server_Plugin *plugin,
529 * @param s the session to delete 529 * @param s the session to delete
530 */ 530 */
531static void 531static void
532server_delete_session (struct Session *s) 532server_delete_session (struct GNUNET_ATS_Session *s)
533{ 533{
534 struct HTTP_Server_Plugin *plugin = s->plugin; 534 struct HTTP_Server_Plugin *plugin = s->plugin;
535 struct HTTP_Message *msg; 535 struct HTTP_Message *msg;
@@ -630,7 +630,7 @@ server_delete_session (struct Session *s)
630 */ 630 */
631static int 631static int
632http_server_plugin_disconnect_session (void *cls, 632http_server_plugin_disconnect_session (void *cls,
633 struct Session *s) 633 struct GNUNET_ATS_Session *s)
634{ 634{
635 server_delete_session (s); 635 server_delete_session (s);
636 return GNUNET_OK; 636 return GNUNET_OK;
@@ -647,7 +647,7 @@ static void
647server_session_timeout (void *cls, 647server_session_timeout (void *cls,
648 const struct GNUNET_SCHEDULER_TaskContext *tc) 648 const struct GNUNET_SCHEDULER_TaskContext *tc)
649{ 649{
650 struct Session *s = cls; 650 struct GNUNET_ATS_Session *s = cls;
651 struct GNUNET_TIME_Relative left; 651 struct GNUNET_TIME_Relative left;
652 652
653 s->timeout_task = NULL; 653 s->timeout_task = NULL;
@@ -679,7 +679,7 @@ server_session_timeout (void *cls,
679 * @param s the session 679 * @param s the session
680 */ 680 */
681static void 681static void
682server_reschedule_session_timeout (struct Session *s) 682server_reschedule_session_timeout (struct GNUNET_ATS_Session *s)
683{ 683{
684 GNUNET_assert (NULL != s->timeout_task); 684 GNUNET_assert (NULL != s->timeout_task);
685 s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); 685 s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT);
@@ -715,7 +715,7 @@ server_reschedule_session_timeout (struct Session *s)
715 */ 715 */
716static ssize_t 716static ssize_t
717http_server_plugin_send (void *cls, 717http_server_plugin_send (void *cls,
718 struct Session *session, 718 struct GNUNET_ATS_Session *session,
719 const char *msgbuf, 719 const char *msgbuf,
720 size_t msgbuf_size, 720 size_t msgbuf_size,
721 unsigned int priority, 721 unsigned int priority,
@@ -775,7 +775,7 @@ http_server_plugin_send (void *cls,
775 * 775 *
776 * @param cls the `struct HTTP_Server_Plugin *` 776 * @param cls the `struct HTTP_Server_Plugin *`
777 * @param peer for which this is a session 777 * @param peer for which this is a session
778 * @param value the `struct Session` to clean up 778 * @param value the `struct GNUNET_ATS_Session` to clean up
779 * @return #GNUNET_OK (continue to iterate) 779 * @return #GNUNET_OK (continue to iterate)
780 */ 780 */
781static int 781static int
@@ -783,7 +783,7 @@ destroy_session_shutdown_cb (void *cls,
783 const struct GNUNET_PeerIdentity *peer, 783 const struct GNUNET_PeerIdentity *peer,
784 void *value) 784 void *value)
785{ 785{
786 struct Session *s = value; 786 struct GNUNET_ATS_Session *s = value;
787 struct ServerRequest *sc_send; 787 struct ServerRequest *sc_send;
788 struct ServerRequest *sc_recv; 788 struct ServerRequest *sc_recv;
789 789
@@ -802,7 +802,7 @@ destroy_session_shutdown_cb (void *cls,
802 * 802 *
803 * @param cls the `struct HTTP_Server_Plugin *` 803 * @param cls the `struct HTTP_Server_Plugin *`
804 * @param peer for which this is a session 804 * @param peer for which this is a session
805 * @param value the `struct Session` to clean up 805 * @param value the `struct GNUNET_ATS_Session` to clean up
806 * @return #GNUNET_OK (continue to iterate) 806 * @return #GNUNET_OK (continue to iterate)
807 */ 807 */
808static int 808static int
@@ -810,7 +810,7 @@ destroy_session_cb (void *cls,
810 const struct GNUNET_PeerIdentity *peer, 810 const struct GNUNET_PeerIdentity *peer,
811 void *value) 811 void *value)
812{ 812{
813 struct Session *s = value; 813 struct GNUNET_ATS_Session *s = value;
814 814
815 server_delete_session (s); 815 server_delete_session (s);
816 return GNUNET_OK; 816 return GNUNET_OK;
@@ -897,7 +897,7 @@ http_server_plugin_address_suggested (void *cls,
897 * @param address the address 897 * @param address the address
898 * @return always NULL 898 * @return always NULL
899 */ 899 */
900static struct Session * 900static struct GNUNET_ATS_Session *
901http_server_plugin_get_session (void *cls, 901http_server_plugin_get_session (void *cls,
902 const struct GNUNET_HELLO_Address *address) 902 const struct GNUNET_HELLO_Address *address)
903{ 903{
@@ -1127,7 +1127,7 @@ http_server_query_keepalive_factor (void *cls)
1127static void 1127static void
1128http_server_plugin_update_session_timeout (void *cls, 1128http_server_plugin_update_session_timeout (void *cls,
1129 const struct GNUNET_PeerIdentity *peer, 1129 const struct GNUNET_PeerIdentity *peer,
1130 struct Session *session) 1130 struct GNUNET_ATS_Session *session)
1131{ 1131{
1132 server_reschedule_session_timeout (session); 1132 server_reschedule_session_timeout (session);
1133} 1133}
@@ -1142,7 +1142,7 @@ http_server_plugin_update_session_timeout (void *cls,
1142 */ 1142 */
1143static void 1143static void
1144server_mhd_connection_timeout (struct HTTP_Server_Plugin *plugin, 1144server_mhd_connection_timeout (struct HTTP_Server_Plugin *plugin,
1145 struct Session *s, 1145 struct GNUNET_ATS_Session *s,
1146 unsigned int to) 1146 unsigned int to)
1147{ 1147{
1148 /* Setting timeouts for other connections */ 1148 /* Setting timeouts for other connections */
@@ -1305,12 +1305,12 @@ server_parse_url (struct HTTP_Server_Plugin *plugin,
1305/** 1305/**
1306 * Closure for #session_tag_it(). 1306 * Closure for #session_tag_it().
1307 */ 1307 */
1308struct SessionTagContext 1308struct GNUNET_ATS_SessionTagContext
1309{ 1309{
1310 /** 1310 /**
1311 * Set to session matching the tag. 1311 * Set to session matching the tag.
1312 */ 1312 */
1313 struct Session *res; 1313 struct GNUNET_ATS_Session *res;
1314 1314
1315 /** 1315 /**
1316 * Tag we are looking for. 1316 * Tag we are looking for.
@@ -1322,9 +1322,9 @@ struct SessionTagContext
1322/** 1322/**
1323 * Find a session with a matching tag. 1323 * Find a session with a matching tag.
1324 * 1324 *
1325 * @param cls the `struct SessionTagContext *` 1325 * @param cls the `struct GNUNET_ATS_SessionTagContext *`
1326 * @param key peer identity (unused) 1326 * @param key peer identity (unused)
1327 * @param value the `struct Session *` 1327 * @param value the `struct GNUNET_ATS_Session *`
1328 * @return #GNUNET_NO if we found the session, #GNUNET_OK if not 1328 * @return #GNUNET_NO if we found the session, #GNUNET_OK if not
1329 */ 1329 */
1330static int 1330static int
@@ -1332,8 +1332,8 @@ session_tag_it (void *cls,
1332 const struct GNUNET_PeerIdentity *key, 1332 const struct GNUNET_PeerIdentity *key,
1333 void *value) 1333 void *value)
1334{ 1334{
1335 struct SessionTagContext *stc = cls; 1335 struct GNUNET_ATS_SessionTagContext *stc = cls;
1336 struct Session *s = value; 1336 struct GNUNET_ATS_Session *s = value;
1337 1337
1338 if (s->tag == stc->tag) 1338 if (s->tag == stc->tag)
1339 { 1339 {
@@ -1359,13 +1359,13 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1359 const char *url, 1359 const char *url,
1360 const char *method) 1360 const char *method)
1361{ 1361{
1362 struct Session *s = NULL; 1362 struct GNUNET_ATS_Session *s = NULL;
1363 struct ServerRequest *sc = NULL; 1363 struct ServerRequest *sc = NULL;
1364 const union MHD_ConnectionInfo *conn_info; 1364 const union MHD_ConnectionInfo *conn_info;
1365 struct HttpAddress *addr; 1365 struct HttpAddress *addr;
1366 struct GNUNET_PeerIdentity target; 1366 struct GNUNET_PeerIdentity target;
1367 size_t addr_len; 1367 size_t addr_len;
1368 struct SessionTagContext stc; 1368 struct GNUNET_ATS_SessionTagContext stc;
1369 uint32_t options; 1369 uint32_t options;
1370 int direction = GNUNET_SYSERR; 1370 int direction = GNUNET_SYSERR;
1371 unsigned int to; 1371 unsigned int to;
@@ -1442,7 +1442,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1442 /* external host name */ 1442 /* external host name */
1443 return NULL; 1443 return NULL;
1444 } 1444 }
1445 s = GNUNET_new (struct Session); 1445 s = GNUNET_new (struct GNUNET_ATS_Session);
1446 s->target = target; 1446 s->target = target;
1447 s->plugin = plugin; 1447 s->plugin = plugin;
1448 s->scope = scope; 1448 s->scope = scope;
@@ -1548,7 +1548,7 @@ server_send_callback (void *cls,
1548 size_t max) 1548 size_t max)
1549{ 1549{
1550 struct ServerRequest *sc = cls; 1550 struct ServerRequest *sc = cls;
1551 struct Session *s = sc->session; 1551 struct GNUNET_ATS_Session *s = sc->session;
1552 ssize_t bytes_read = 0; 1552 ssize_t bytes_read = 0;
1553 struct HTTP_Message *msg; 1553 struct HTTP_Message *msg;
1554 char *stat_txt; 1554 char *stat_txt;
@@ -1638,7 +1638,7 @@ server_receive_mst_cb (void *cls,
1638 void *client, 1638 void *client,
1639 const struct GNUNET_MessageHeader *message) 1639 const struct GNUNET_MessageHeader *message)
1640{ 1640{
1641 struct Session *s = cls; 1641 struct GNUNET_ATS_Session *s = cls;
1642 struct HTTP_Server_Plugin *plugin = s->plugin; 1642 struct HTTP_Server_Plugin *plugin = s->plugin;
1643 struct GNUNET_TIME_Relative delay; 1643 struct GNUNET_TIME_Relative delay;
1644 char *stat_txt; 1644 char *stat_txt;
@@ -1727,7 +1727,7 @@ server_access_cb (void *cls,
1727{ 1727{
1728 struct HTTP_Server_Plugin *plugin = cls; 1728 struct HTTP_Server_Plugin *plugin = cls;
1729 struct ServerRequest *sc = *httpSessionCache; 1729 struct ServerRequest *sc = *httpSessionCache;
1730 struct Session *s; 1730 struct GNUNET_ATS_Session *s;
1731 struct MHD_Response *response; 1731 struct MHD_Response *response;
1732 int res = MHD_YES; 1732 int res = MHD_YES;
1733 1733
@@ -3257,7 +3257,7 @@ http_server_plugin_address_to_string (void *cls,
3257 */ 3257 */
3258static enum GNUNET_ATS_Network_Type 3258static enum GNUNET_ATS_Network_Type
3259http_server_plugin_get_network (void *cls, 3259http_server_plugin_get_network (void *cls,
3260 struct Session *session) 3260 struct GNUNET_ATS_Session *session)
3261{ 3261{
3262 return session->scope; 3262 return session->scope;
3263} 3263}
@@ -3294,7 +3294,7 @@ http_server_plugin_get_network_for_address (void *cls,
3294static void 3294static void
3295http_server_plugin_update_inbound_delay (void *cls, 3295http_server_plugin_update_inbound_delay (void *cls,
3296 const struct GNUNET_PeerIdentity *peer, 3296 const struct GNUNET_PeerIdentity *peer,
3297 struct Session *session, 3297 struct GNUNET_ATS_Session *session,
3298 struct GNUNET_TIME_Relative delay) 3298 struct GNUNET_TIME_Relative delay)
3299{ 3299{
3300 session->next_receive = GNUNET_TIME_relative_to_absolute (delay); 3300 session->next_receive = GNUNET_TIME_relative_to_absolute (delay);
@@ -3319,7 +3319,7 @@ http_server_plugin_update_inbound_delay (void *cls,
3319 * 3319 *
3320 * @param cls the `struct Plugin` with the monitor callback (`sic`) 3320 * @param cls the `struct Plugin` with the monitor callback (`sic`)
3321 * @param peer peer we send information about 3321 * @param peer peer we send information about
3322 * @param value our `struct Session` to send information about 3322 * @param value our `struct GNUNET_ATS_Session` to send information about
3323 * @return #GNUNET_OK (continue to iterate) 3323 * @return #GNUNET_OK (continue to iterate)
3324 */ 3324 */
3325static int 3325static int
@@ -3328,7 +3328,7 @@ send_session_info_iter (void *cls,
3328 void *value) 3328 void *value)
3329{ 3329{
3330 struct HTTP_Server_Plugin *plugin = cls; 3330 struct HTTP_Server_Plugin *plugin = cls;
3331 struct Session *session = value; 3331 struct GNUNET_ATS_Session *session = value;
3332 3332
3333 notify_session_monitor (plugin, 3333 notify_session_monitor (plugin,
3334 session, 3334 session,
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 453a0095f..38ba2c3ce 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -248,7 +248,7 @@ struct PendingMessage
248/** 248/**
249 * Session handle for TCP connections. 249 * Session handle for TCP connections.
250 */ 250 */
251struct Session 251struct GNUNET_ATS_Session
252{ 252{
253 /** 253 /**
254 * To whom are we talking to (set to our identity 254 * To whom are we talking to (set to our identity
@@ -536,7 +536,7 @@ struct Plugin
536 */ 536 */
537static void 537static void
538notify_session_monitor (struct Plugin *plugin, 538notify_session_monitor (struct Plugin *plugin,
539 struct Session *session, 539 struct GNUNET_ATS_Session *session,
540 enum GNUNET_TRANSPORT_SessionState state) 540 enum GNUNET_TRANSPORT_SessionState state)
541{ 541{
542 struct GNUNET_TRANSPORT_SessionInfo info; 542 struct GNUNET_TRANSPORT_SessionInfo info;
@@ -807,12 +807,12 @@ tcp_plugin_string_to_address (void *cls,
807 * @param client which client to find the session handle for 807 * @param client which client to find the session handle for
808 * @return NULL if no matching session exists 808 * @return NULL if no matching session exists
809 */ 809 */
810static struct Session * 810static struct GNUNET_ATS_Session *
811lookup_session_by_client (struct Plugin *plugin, 811lookup_session_by_client (struct Plugin *plugin,
812 struct GNUNET_SERVER_Client *client) 812 struct GNUNET_SERVER_Client *client)
813{ 813{
814 return GNUNET_SERVER_client_get_user_context (client, 814 return GNUNET_SERVER_client_get_user_context (client,
815 struct Session); 815 struct GNUNET_ATS_Session);
816} 816}
817 817
818 818
@@ -827,7 +827,7 @@ lookup_session_by_client (struct Plugin *plugin,
827 */ 827 */
828static int 828static int
829tcp_plugin_disconnect_session (void *cls, 829tcp_plugin_disconnect_session (void *cls,
830 struct Session *session) 830 struct GNUNET_ATS_Session *session)
831{ 831{
832 struct Plugin *plugin = cls; 832 struct Plugin *plugin = cls;
833 struct PendingMessage *pm; 833 struct PendingMessage *pm;
@@ -956,14 +956,14 @@ tcp_plugin_query_keepalive_factor (void *cls)
956/** 956/**
957 * Session was idle for too long, so disconnect it 957 * Session was idle for too long, so disconnect it
958 * 958 *
959 * @param cls the `struct Session` of the idle session 959 * @param cls the `struct GNUNET_ATS_Session` of the idle session
960 * @param tc scheduler context 960 * @param tc scheduler context
961 */ 961 */
962static void 962static void
963session_timeout (void *cls, 963session_timeout (void *cls,
964 const struct GNUNET_SCHEDULER_TaskContext *tc) 964 const struct GNUNET_SCHEDULER_TaskContext *tc)
965{ 965{
966 struct Session *s = cls; 966 struct GNUNET_ATS_Session *s = cls;
967 struct GNUNET_TIME_Relative left; 967 struct GNUNET_TIME_Relative left;
968 968
969 s->timeout_task = NULL; 969 s->timeout_task = NULL;
@@ -997,7 +997,7 @@ session_timeout (void *cls,
997 * @param s session to increment timeout for 997 * @param s session to increment timeout for
998 */ 998 */
999static void 999static void
1000reschedule_session_timeout (struct Session *s) 1000reschedule_session_timeout (struct GNUNET_ATS_Session *s)
1001{ 1001{
1002 GNUNET_assert (NULL != s->timeout_task); 1002 GNUNET_assert (NULL != s->timeout_task);
1003 s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); 1003 s->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT);
@@ -1016,14 +1016,14 @@ reschedule_session_timeout (struct Session *s)
1016 * the session 1016 * the session
1017 * @return new session object 1017 * @return new session object
1018 */ 1018 */
1019static struct Session * 1019static struct GNUNET_ATS_Session *
1020create_session (struct Plugin *plugin, 1020create_session (struct Plugin *plugin,
1021 const struct GNUNET_HELLO_Address *address, 1021 const struct GNUNET_HELLO_Address *address,
1022 enum GNUNET_ATS_Network_Type scope, 1022 enum GNUNET_ATS_Network_Type scope,
1023 struct GNUNET_SERVER_Client *client, 1023 struct GNUNET_SERVER_Client *client,
1024 int is_nat) 1024 int is_nat)
1025{ 1025{
1026 struct Session *session; 1026 struct GNUNET_ATS_Session *session;
1027 struct PendingMessage *pm; 1027 struct PendingMessage *pm;
1028 1028
1029 if (GNUNET_YES != is_nat) 1029 if (GNUNET_YES != is_nat)
@@ -1037,7 +1037,7 @@ create_session (struct Plugin *plugin,
1037 tcp_plugin_address_to_string (plugin, 1037 tcp_plugin_address_to_string (plugin,
1038 address->address, 1038 address->address,
1039 address->address_length)); 1039 address->address_length));
1040 session = GNUNET_new (struct Session); 1040 session = GNUNET_new (struct GNUNET_ATS_Session);
1041 session->last_activity = GNUNET_TIME_absolute_get (); 1041 session->last_activity = GNUNET_TIME_absolute_get ();
1042 session->plugin = plugin; 1042 session->plugin = plugin;
1043 session->is_nat = is_nat; 1043 session->is_nat = is_nat;
@@ -1102,7 +1102,7 @@ create_session (struct Plugin *plugin,
1102 * @param session for which session should we do this 1102 * @param session for which session should we do this
1103 */ 1103 */
1104static void 1104static void
1105process_pending_messages (struct Session *session); 1105process_pending_messages (struct GNUNET_ATS_Session *session);
1106 1106
1107 1107
1108/** 1108/**
@@ -1121,7 +1121,7 @@ do_transmit (void *cls,
1121 size_t size, 1121 size_t size,
1122 void *buf) 1122 void *buf)
1123{ 1123{
1124 struct Session *session = cls; 1124 struct GNUNET_ATS_Session *session = cls;
1125 struct GNUNET_PeerIdentity pid; 1125 struct GNUNET_PeerIdentity pid;
1126 struct Plugin *plugin; 1126 struct Plugin *plugin;
1127 struct PendingMessage *pos; 1127 struct PendingMessage *pos;
@@ -1275,7 +1275,7 @@ do_transmit (void *cls,
1275 * @param session for which session should we do this 1275 * @param session for which session should we do this
1276 */ 1276 */
1277static void 1277static void
1278process_pending_messages (struct Session *session) 1278process_pending_messages (struct GNUNET_ATS_Session *session)
1279{ 1279{
1280 struct PendingMessage *pm; 1280 struct PendingMessage *pm;
1281 1281
@@ -1323,7 +1323,7 @@ process_pending_messages (struct Session *session)
1323 */ 1323 */
1324static ssize_t 1324static ssize_t
1325tcp_plugin_send (void *cls, 1325tcp_plugin_send (void *cls,
1326 struct Session *session, 1326 struct GNUNET_ATS_Session *session,
1327 const char *msgbuf, 1327 const char *msgbuf,
1328 size_t msgbuf_size, 1328 size_t msgbuf_size,
1329 unsigned int priority, 1329 unsigned int priority,
@@ -1413,7 +1413,7 @@ tcp_plugin_send (void *cls,
1413/** 1413/**
1414 * Closure for #session_lookup_it(). 1414 * Closure for #session_lookup_it().
1415 */ 1415 */
1416struct SessionItCtx 1416struct GNUNET_ATS_SessionItCtx
1417{ 1417{
1418 /** 1418 /**
1419 * Address we are looking for. 1419 * Address we are looking for.
@@ -1423,7 +1423,7 @@ struct SessionItCtx
1423 /** 1423 /**
1424 * Where to store the session (if we found it). 1424 * Where to store the session (if we found it).
1425 */ 1425 */
1426 struct Session *result; 1426 struct GNUNET_ATS_Session *result;
1427 1427
1428}; 1428};
1429 1429
@@ -1431,9 +1431,9 @@ struct SessionItCtx
1431/** 1431/**
1432 * Look for a session by address. 1432 * Look for a session by address.
1433 * 1433 *
1434 * @param cls the `struct SessionItCtx` 1434 * @param cls the `struct GNUNET_ATS_SessionItCtx`
1435 * @param key unused 1435 * @param key unused
1436 * @param value a `struct Session` 1436 * @param value a `struct GNUNET_ATS_Session`
1437 * @return #GNUNET_YES to continue looking, #GNUNET_NO if we found the session 1437 * @return #GNUNET_YES to continue looking, #GNUNET_NO if we found the session
1438 */ 1438 */
1439static int 1439static int
@@ -1441,8 +1441,8 @@ session_lookup_it (void *cls,
1441 const struct GNUNET_PeerIdentity *key, 1441 const struct GNUNET_PeerIdentity *key,
1442 void *value) 1442 void *value)
1443{ 1443{
1444 struct SessionItCtx *si_ctx = cls; 1444 struct GNUNET_ATS_SessionItCtx *si_ctx = cls;
1445 struct Session *session = value; 1445 struct GNUNET_ATS_Session *session = value;
1446 1446
1447 if (0 != 1447 if (0 !=
1448 GNUNET_HELLO_address_cmp (si_ctx->address, 1448 GNUNET_HELLO_address_cmp (si_ctx->address,
@@ -1456,14 +1456,14 @@ session_lookup_it (void *cls,
1456/** 1456/**
1457 * Task cleaning up a NAT connection attempt after timeout 1457 * Task cleaning up a NAT connection attempt after timeout
1458 * 1458 *
1459 * @param cls the `struct Session` 1459 * @param cls the `struct GNUNET_ATS_Session`
1460 * @param tc scheduler context (unused) 1460 * @param tc scheduler context (unused)
1461 */ 1461 */
1462static void 1462static void
1463nat_connect_timeout (void *cls, 1463nat_connect_timeout (void *cls,
1464 const struct GNUNET_SCHEDULER_TaskContext *tc) 1464 const struct GNUNET_SCHEDULER_TaskContext *tc)
1465{ 1465{
1466 struct Session *session = cls; 1466 struct GNUNET_ATS_Session *session = cls;
1467 1467
1468 session->nat_connection_timeout = NULL; 1468 session->nat_connection_timeout = NULL;
1469 LOG (GNUNET_ERROR_TYPE_DEBUG, 1469 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -1489,7 +1489,7 @@ nat_connect_timeout (void *cls,
1489static void 1489static void
1490tcp_plugin_update_session_timeout (void *cls, 1490tcp_plugin_update_session_timeout (void *cls,
1491 const struct GNUNET_PeerIdentity *peer, 1491 const struct GNUNET_PeerIdentity *peer,
1492 struct Session *session) 1492 struct GNUNET_ATS_Session *session)
1493{ 1493{
1494 reschedule_session_timeout (session); 1494 reschedule_session_timeout (session);
1495} 1495}
@@ -1499,14 +1499,14 @@ tcp_plugin_update_session_timeout (void *cls,
1499 * Task to signal the server that we can continue 1499 * Task to signal the server that we can continue
1500 * receiving from the TCP client now. 1500 * receiving from the TCP client now.
1501 * 1501 *
1502 * @param cls the `struct Session *` 1502 * @param cls the `struct GNUNET_ATS_Session *`
1503 * @param tc task context (unused) 1503 * @param tc task context (unused)
1504 */ 1504 */
1505static void 1505static void
1506delayed_done (void *cls, 1506delayed_done (void *cls,
1507 const struct GNUNET_SCHEDULER_TaskContext *tc) 1507 const struct GNUNET_SCHEDULER_TaskContext *tc)
1508{ 1508{
1509 struct Session *session = cls; 1509 struct GNUNET_ATS_Session *session = cls;
1510 1510
1511 session->receive_delay_task = NULL; 1511 session->receive_delay_task = NULL;
1512 reschedule_session_timeout (session); 1512 reschedule_session_timeout (session);
@@ -1528,7 +1528,7 @@ delayed_done (void *cls,
1528static void 1528static void
1529tcp_plugin_update_inbound_delay (void *cls, 1529tcp_plugin_update_inbound_delay (void *cls,
1530 const struct GNUNET_PeerIdentity *peer, 1530 const struct GNUNET_PeerIdentity *peer,
1531 struct Session *session, 1531 struct GNUNET_ATS_Session *session,
1532 struct GNUNET_TIME_Relative delay) 1532 struct GNUNET_TIME_Relative delay)
1533{ 1533{
1534 if (NULL == session->receive_delay_task) 1534 if (NULL == session->receive_delay_task)
@@ -1554,12 +1554,12 @@ tcp_plugin_update_inbound_delay (void *cls,
1554 * @param address the address to use 1554 * @param address the address to use
1555 * @return the session if the address is valid, NULL otherwise 1555 * @return the session if the address is valid, NULL otherwise
1556 */ 1556 */
1557static struct Session * 1557static struct GNUNET_ATS_Session *
1558tcp_plugin_get_session (void *cls, 1558tcp_plugin_get_session (void *cls,
1559 const struct GNUNET_HELLO_Address *address) 1559 const struct GNUNET_HELLO_Address *address)
1560{ 1560{
1561 struct Plugin *plugin = cls; 1561 struct Plugin *plugin = cls;
1562 struct Session *session = NULL; 1562 struct GNUNET_ATS_Session *session = NULL;
1563 int af; 1563 int af;
1564 const void *sb; 1564 const void *sb;
1565 size_t sbs; 1565 size_t sbs;
@@ -1596,7 +1596,7 @@ tcp_plugin_get_session (void *cls,
1596 GNUNET_CONTAINER_multipeermap_contains (plugin->sessionmap, 1596 GNUNET_CONTAINER_multipeermap_contains (plugin->sessionmap,
1597 &address->peer)) 1597 &address->peer))
1598 { 1598 {
1599 struct SessionItCtx si_ctx; 1599 struct GNUNET_ATS_SessionItCtx si_ctx;
1600 1600
1601 si_ctx.address = address; 1601 si_ctx.address = address;
1602 si_ctx.result = NULL; 1602 si_ctx.result = NULL;
@@ -1812,7 +1812,7 @@ tcp_plugin_get_session (void *cls,
1812 * 1812 *
1813 * @param cls the `struct Plugin *` 1813 * @param cls the `struct Plugin *`
1814 * @param key the peer which the session belongs to (unused) 1814 * @param key the peer which the session belongs to (unused)
1815 * @param value the `struct Session` 1815 * @param value the `struct GNUNET_ATS_Session`
1816 * @return #GNUNET_YES (continue to iterate) 1816 * @return #GNUNET_YES (continue to iterate)
1817 */ 1817 */
1818static int 1818static int
@@ -1821,7 +1821,7 @@ session_disconnect_it (void *cls,
1821 void *value) 1821 void *value)
1822{ 1822{
1823 struct Plugin *plugin = cls; 1823 struct Plugin *plugin = cls;
1824 struct Session *session = value; 1824 struct GNUNET_ATS_Session *session = value;
1825 1825
1826 GNUNET_STATISTICS_update (session->plugin->env->stats, 1826 GNUNET_STATISTICS_update (session->plugin->env->stats,
1827 gettext_noop ("# transport-service disconnect requests for TCP"), 1827 gettext_noop ("# transport-service disconnect requests for TCP"),
@@ -2135,7 +2135,7 @@ handle_tcp_nat_probe (void *cls,
2135 const struct GNUNET_MessageHeader *message) 2135 const struct GNUNET_MessageHeader *message)
2136{ 2136{
2137 struct Plugin *plugin = cls; 2137 struct Plugin *plugin = cls;
2138 struct Session *session; 2138 struct GNUNET_ATS_Session *session;
2139 const struct TCP_NAT_ProbeMessage *tcp_nat_probe; 2139 const struct TCP_NAT_ProbeMessage *tcp_nat_probe;
2140 size_t alen; 2140 size_t alen;
2141 void *vaddr; 2141 void *vaddr;
@@ -2281,7 +2281,7 @@ handle_tcp_welcome (void *cls,
2281 struct Plugin *plugin = cls; 2281 struct Plugin *plugin = cls;
2282 const struct WelcomeMessage *wm = (const struct WelcomeMessage *) message; 2282 const struct WelcomeMessage *wm = (const struct WelcomeMessage *) message;
2283 struct GNUNET_HELLO_Address *address; 2283 struct GNUNET_HELLO_Address *address;
2284 struct Session *session; 2284 struct GNUNET_ATS_Session *session;
2285 size_t alen; 2285 size_t alen;
2286 void *vaddr; 2286 void *vaddr;
2287 struct IPv4TcpAddress t4; 2287 struct IPv4TcpAddress t4;
@@ -2444,7 +2444,7 @@ handle_tcp_data (void *cls,
2444 const struct GNUNET_MessageHeader *message) 2444 const struct GNUNET_MessageHeader *message)
2445{ 2445{
2446 struct Plugin *plugin = cls; 2446 struct Plugin *plugin = cls;
2447 struct Session *session; 2447 struct GNUNET_ATS_Session *session;
2448 struct GNUNET_TIME_Relative delay; 2448 struct GNUNET_TIME_Relative delay;
2449 uint16_t type; 2449 uint16_t type;
2450 2450
@@ -2589,7 +2589,7 @@ disconnect_notify (void *cls,
2589 struct GNUNET_SERVER_Client *client) 2589 struct GNUNET_SERVER_Client *client)
2590{ 2590{
2591 struct Plugin *plugin = cls; 2591 struct Plugin *plugin = cls;
2592 struct Session *session; 2592 struct GNUNET_ATS_Session *session;
2593 2593
2594 if (NULL == client) 2594 if (NULL == client)
2595 return; 2595 return;
@@ -2727,7 +2727,7 @@ try_connection_reversal (void *cls,
2727 */ 2727 */
2728static enum GNUNET_ATS_Network_Type 2728static enum GNUNET_ATS_Network_Type
2729tcp_plugin_get_network (void *cls, 2729tcp_plugin_get_network (void *cls,
2730 struct Session *session) 2730 struct GNUNET_ATS_Session *session)
2731{ 2731{
2732 return session->scope; 2732 return session->scope;
2733} 2733}
@@ -2799,7 +2799,7 @@ tcp_plugin_get_network_for_address (void *cls,
2799 * 2799 *
2800 * @param cls the `struct Plugin` with the monitor callback (`sic`) 2800 * @param cls the `struct Plugin` with the monitor callback (`sic`)
2801 * @param peer peer we send information about 2801 * @param peer peer we send information about
2802 * @param value our `struct Session` to send information about 2802 * @param value our `struct GNUNET_ATS_Session` to send information about
2803 * @return #GNUNET_OK (continue to iterate) 2803 * @return #GNUNET_OK (continue to iterate)
2804 */ 2804 */
2805static int 2805static int
@@ -2808,7 +2808,7 @@ send_session_info_iter (void *cls,
2808 void *value) 2808 void *value)
2809{ 2809{
2810 struct Plugin *plugin = cls; 2810 struct Plugin *plugin = cls;
2811 struct Session *session = value; 2811 struct GNUNET_ATS_Session *session = value;
2812 2812
2813 notify_session_monitor (plugin, 2813 notify_session_monitor (plugin,
2814 session, 2814 session,
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c
index 7c8bc3cba..81a914943 100644
--- a/src/transport/plugin_transport_template.c
+++ b/src/transport/plugin_transport_template.c
@@ -51,7 +51,7 @@ struct Plugin;
51/** 51/**
52 * Session handle for connections. 52 * Session handle for connections.
53 */ 53 */
54struct Session 54struct GNUNET_ATS_Session
55{ 55{
56 /** 56 /**
57 * To whom are we talking to (set to our identity 57 * To whom are we talking to (set to our identity
@@ -62,7 +62,7 @@ struct Session
62 /** 62 /**
63 * Stored in a linked list (or a peer map, or ...) 63 * Stored in a linked list (or a peer map, or ...)
64 */ 64 */
65 struct Session *next; 65 struct GNUNET_ATS_Session *next;
66 66
67 /** 67 /**
68 * Pointer to the global plugin struct. 68 * Pointer to the global plugin struct.
@@ -132,7 +132,7 @@ struct Plugin
132 /** 132 /**
133 * List of open sessions (or peer map, or...) 133 * List of open sessions (or peer map, or...)
134 */ 134 */
135 struct Session *sessions; 135 struct GNUNET_ATS_Session *sessions;
136 136
137 /** 137 /**
138 * Function to call about session status changes. 138 * Function to call about session status changes.
@@ -162,7 +162,7 @@ struct Plugin
162 */ 162 */
163static void 163static void
164notify_session_monitor (struct Plugin *plugin, 164notify_session_monitor (struct Plugin *plugin,
165 struct Session *session, 165 struct GNUNET_ATS_Session *session,
166 enum GNUNET_TRANSPORT_SessionState state) 166 enum GNUNET_TRANSPORT_SessionState state)
167{ 167{
168 struct GNUNET_TRANSPORT_SessionInfo info; 168 struct GNUNET_TRANSPORT_SessionInfo info;
@@ -213,7 +213,7 @@ notify_session_monitor (struct Plugin *plugin,
213 */ 213 */
214static ssize_t 214static ssize_t
215template_plugin_send (void *cls, 215template_plugin_send (void *cls,
216 struct Session *session, 216 struct GNUNET_ATS_Session *session,
217 const char *msgbuf, 217 const char *msgbuf,
218 size_t msgbuf_size, 218 size_t msgbuf_size,
219 unsigned int priority, 219 unsigned int priority,
@@ -256,7 +256,7 @@ template_plugin_disconnect_peer (void *cls,
256 */ 256 */
257static int 257static int
258template_plugin_disconnect_session (void *cls, 258template_plugin_disconnect_session (void *cls,
259 struct Session *session) 259 struct GNUNET_ATS_Session *session)
260{ 260{
261 // struct Plugin *plugin = cls; 261 // struct Plugin *plugin = cls;
262 // FIXME 262 // FIXME
@@ -288,7 +288,7 @@ template_plugin_query_keepalive_factor (void *cls)
288 */ 288 */
289static enum GNUNET_ATS_Network_Type 289static enum GNUNET_ATS_Network_Type
290template_plugin_get_network (void *cls, 290template_plugin_get_network (void *cls,
291 struct Session *session) 291 struct GNUNET_ATS_Session *session)
292{ 292{
293 GNUNET_assert (NULL != session); 293 GNUNET_assert (NULL != session);
294 return GNUNET_ATS_NET_UNSPECIFIED; /* Change to correct network type */ 294 return GNUNET_ATS_NET_UNSPECIFIED; /* Change to correct network type */
@@ -423,7 +423,7 @@ template_plugin_string_to_address (void *cls,
423 * @param address pointer to the GNUNET_HELLO_Address 423 * @param address pointer to the GNUNET_HELLO_Address
424 * @return the session if the address is valid, NULL otherwise 424 * @return the session if the address is valid, NULL otherwise
425 */ 425 */
426static struct Session * 426static struct GNUNET_ATS_Session *
427template_plugin_get_session (void *cls, 427template_plugin_get_session (void *cls,
428 const struct GNUNET_HELLO_Address *address) 428 const struct GNUNET_HELLO_Address *address)
429{ 429{
@@ -435,7 +435,7 @@ template_plugin_get_session (void *cls,
435static void 435static void
436template_plugin_update_session_timeout (void *cls, 436template_plugin_update_session_timeout (void *cls,
437 const struct GNUNET_PeerIdentity *peer, 437 const struct GNUNET_PeerIdentity *peer,
438 struct Session *session) 438 struct GNUNET_ATS_Session *session)
439{ 439{
440 440
441} 441}
@@ -448,7 +448,7 @@ template_plugin_update_session_timeout (void *cls,
448 * 448 *
449 * @param cls the `struct Plugin` with the monitor callback (`sic`) 449 * @param cls the `struct Plugin` with the monitor callback (`sic`)
450 * @param peer peer we send information about 450 * @param peer peer we send information about
451 * @param value our `struct Session` to send information about 451 * @param value our `struct GNUNET_ATS_Session` to send information about
452 * @return #GNUNET_OK (continue to iterate) 452 * @return #GNUNET_OK (continue to iterate)
453 */ 453 */
454static int 454static int
@@ -457,7 +457,7 @@ send_session_info_iter (void *cls,
457 void *value) 457 void *value)
458{ 458{
459 struct Plugin *plugin = cls; 459 struct Plugin *plugin = cls;
460 struct Session *session = value; 460 struct GNUNET_ATS_Session *session = value;
461 461
462 notify_session_monitor (plugin, 462 notify_session_monitor (plugin,
463 session, 463 session,
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 66843ed97..af1b412c2 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -151,7 +151,7 @@ struct PrettyPrinterContext
151/** 151/**
152 * Session with another peer. 152 * Session with another peer.
153 */ 153 */
154struct Session 154struct GNUNET_ATS_Session
155{ 155{
156 /** 156 /**
157 * Which peer is this session for? 157 * Which peer is this session for?
@@ -324,7 +324,7 @@ struct UDP_FragmentationContext
324 /** 324 /**
325 * The session this fragmentation context belongs to 325 * The session this fragmentation context belongs to
326 */ 326 */
327 struct Session *session; 327 struct GNUNET_ATS_Session *session;
328 328
329 /** 329 /**
330 * Function to call upon completion of the transmission. 330 * Function to call upon completion of the transmission.
@@ -390,7 +390,7 @@ struct UDP_MessageWrapper
390 /** 390 /**
391 * Session this message belongs to 391 * Session this message belongs to
392 */ 392 */
393 struct Session *session; 393 struct GNUNET_ATS_Session *session;
394 394
395 /** 395 /**
396 * DLL of messages, previous element 396 * DLL of messages, previous element
@@ -506,7 +506,7 @@ GNUNET_NETWORK_STRUCT_END
506 */ 506 */
507static void 507static void
508notify_session_monitor (struct Plugin *plugin, 508notify_session_monitor (struct Plugin *plugin,
509 struct Session *session, 509 struct GNUNET_ATS_Session *session,
510 enum GNUNET_TRANSPORT_SessionState state) 510 enum GNUNET_TRANSPORT_SessionState state)
511{ 511{
512 struct GNUNET_TRANSPORT_SessionInfo info; 512 struct GNUNET_TRANSPORT_SessionInfo info;
@@ -538,7 +538,7 @@ notify_session_monitor (struct Plugin *plugin,
538 * 538 *
539 * @param cls the `struct Plugin` with the monitor callback (`sic`) 539 * @param cls the `struct Plugin` with the monitor callback (`sic`)
540 * @param peer peer we send information about 540 * @param peer peer we send information about
541 * @param value our `struct Session` to send information about 541 * @param value our `struct GNUNET_ATS_Session` to send information about
542 * @return #GNUNET_OK (continue to iterate) 542 * @return #GNUNET_OK (continue to iterate)
543 */ 543 */
544static int 544static int
@@ -547,7 +547,7 @@ send_session_info_iter (void *cls,
547 void *value) 547 void *value)
548{ 548{
549 struct Plugin *plugin = cls; 549 struct Plugin *plugin = cls;
550 struct Session *session = value; 550 struct GNUNET_ATS_Session *session = value;
551 551
552 notify_session_monitor (plugin, 552 notify_session_monitor (plugin,
553 session, 553 session,
@@ -602,7 +602,7 @@ udp_plugin_setup_monitor (void *cls,
602 * @param s session to free 602 * @param s session to free
603 */ 603 */
604static void 604static void
605free_session (struct Session *s) 605free_session (struct GNUNET_ATS_Session *s)
606{ 606{
607 if (NULL != s->address) 607 if (NULL != s->address)
608 { 608 {
@@ -645,7 +645,7 @@ udp_query_keepalive_factor (void *cls)
645 */ 645 */
646static enum GNUNET_ATS_Network_Type 646static enum GNUNET_ATS_Network_Type
647udp_plugin_get_network (void *cls, 647udp_plugin_get_network (void *cls,
648 struct Session *session) 648 struct GNUNET_ATS_Session *session)
649{ 649{
650 return session->scope; 650 return session->scope;
651} 651}
@@ -1350,12 +1350,12 @@ udp_nat_port_map_callback (void *cls,
1350/** 1350/**
1351 * Closure for #session_cmp_it(). 1351 * Closure for #session_cmp_it().
1352 */ 1352 */
1353struct SessionCompareContext 1353struct GNUNET_ATS_SessionCompareContext
1354{ 1354{
1355 /** 1355 /**
1356 * Set to session matching the address. 1356 * Set to session matching the address.
1357 */ 1357 */
1358 struct Session *res; 1358 struct GNUNET_ATS_Session *res;
1359 1359
1360 /** 1360 /**
1361 * Address we are looking for. 1361 * Address we are looking for.
@@ -1367,9 +1367,9 @@ struct SessionCompareContext
1367/** 1367/**
1368 * Find a session with a matching address. 1368 * Find a session with a matching address.
1369 * 1369 *
1370 * @param cls the `struct SessionCompareContext *` 1370 * @param cls the `struct GNUNET_ATS_SessionCompareContext *`
1371 * @param key peer identity (unused) 1371 * @param key peer identity (unused)
1372 * @param value the `struct Session *` 1372 * @param value the `struct GNUNET_ATS_Session *`
1373 * @return #GNUNET_NO if we found the session, #GNUNET_OK if not 1373 * @return #GNUNET_NO if we found the session, #GNUNET_OK if not
1374 */ 1374 */
1375static int 1375static int
@@ -1377,8 +1377,8 @@ session_cmp_it (void *cls,
1377 const struct GNUNET_PeerIdentity *key, 1377 const struct GNUNET_PeerIdentity *key,
1378 void *value) 1378 void *value)
1379{ 1379{
1380 struct SessionCompareContext *cctx = cls; 1380 struct GNUNET_ATS_SessionCompareContext *cctx = cls;
1381 struct Session *s = value; 1381 struct GNUNET_ATS_Session *s = value;
1382 1382
1383 if (0 == GNUNET_HELLO_address_cmp (s->address, 1383 if (0 == GNUNET_HELLO_address_cmp (s->address,
1384 cctx->address)) 1384 cctx->address))
@@ -1400,14 +1400,14 @@ session_cmp_it (void *cls,
1400 * @param address the address we should locate the session by 1400 * @param address the address we should locate the session by
1401 * @return the session if it exists, or NULL if it is not found 1401 * @return the session if it exists, or NULL if it is not found
1402 */ 1402 */
1403static struct Session * 1403static struct GNUNET_ATS_Session *
1404udp_plugin_lookup_session (void *cls, 1404udp_plugin_lookup_session (void *cls,
1405 const struct GNUNET_HELLO_Address *address) 1405 const struct GNUNET_HELLO_Address *address)
1406{ 1406{
1407 struct Plugin *plugin = cls; 1407 struct Plugin *plugin = cls;
1408 const struct IPv6UdpAddress *udp_a6; 1408 const struct IPv6UdpAddress *udp_a6;
1409 const struct IPv4UdpAddress *udp_a4; 1409 const struct IPv4UdpAddress *udp_a4;
1410 struct SessionCompareContext cctx; 1410 struct GNUNET_ATS_SessionCompareContext cctx;
1411 1411
1412 if (NULL == address->address) 1412 if (NULL == address->address)
1413 { 1413 {
@@ -1473,7 +1473,7 @@ udp_plugin_lookup_session (void *cls,
1473 * @param s session to reschedule timeout activity for 1473 * @param s session to reschedule timeout activity for
1474 */ 1474 */
1475static void 1475static void
1476reschedule_session_timeout (struct Session *s) 1476reschedule_session_timeout (struct GNUNET_ATS_Session *s)
1477{ 1477{
1478 if (GNUNET_YES == s->in_destroy) 1478 if (GNUNET_YES == s->in_destroy)
1479 return; 1479 return;
@@ -1495,7 +1495,7 @@ reschedule_session_timeout (struct Session *s)
1495static void 1495static void
1496udp_plugin_update_session_timeout (void *cls, 1496udp_plugin_update_session_timeout (void *cls,
1497 const struct GNUNET_PeerIdentity *peer, 1497 const struct GNUNET_PeerIdentity *peer,
1498 struct Session *session) 1498 struct GNUNET_ATS_Session *session)
1499{ 1499{
1500 struct Plugin *plugin = cls; 1500 struct Plugin *plugin = cls;
1501 1501
@@ -1526,7 +1526,7 @@ static void
1526dequeue (struct Plugin *plugin, 1526dequeue (struct Plugin *plugin,
1527 struct UDP_MessageWrapper *udpw) 1527 struct UDP_MessageWrapper *udpw)
1528{ 1528{
1529 struct Session *session = udpw->session; 1529 struct GNUNET_ATS_Session *session = udpw->session;
1530 1530
1531 if (plugin->bytes_in_buffer < udpw->msg_size) 1531 if (plugin->bytes_in_buffer < udpw->msg_size)
1532 { 1532 {
@@ -1578,7 +1578,7 @@ static void
1578enqueue (struct Plugin *plugin, 1578enqueue (struct Plugin *plugin,
1579 struct UDP_MessageWrapper *udpw) 1579 struct UDP_MessageWrapper *udpw)
1580{ 1580{
1581 struct Session *session = udpw->session; 1581 struct GNUNET_ATS_Session *session = udpw->session;
1582 1582
1583 if (GNUNET_YES == session->in_destroy) 1583 if (GNUNET_YES == session->in_destroy)
1584 { 1584 {
@@ -1644,7 +1644,7 @@ fragmented_message_done (struct UDP_FragmentationContext *frag_ctx,
1644 int result) 1644 int result)
1645{ 1645{
1646 struct Plugin *plugin = frag_ctx->plugin; 1646 struct Plugin *plugin = frag_ctx->plugin;
1647 struct Session *s = frag_ctx->session; 1647 struct GNUNET_ATS_Session *s = frag_ctx->session;
1648 struct UDP_MessageWrapper *udpw; 1648 struct UDP_MessageWrapper *udpw;
1649 struct UDP_MessageWrapper *tmp; 1649 struct UDP_MessageWrapper *tmp;
1650 size_t overhead; 1650 size_t overhead;
@@ -1834,7 +1834,7 @@ enqueue_fragment (void *cls,
1834 struct UDP_FragmentationContext *frag_ctx = cls; 1834 struct UDP_FragmentationContext *frag_ctx = cls;
1835 struct Plugin *plugin = frag_ctx->plugin; 1835 struct Plugin *plugin = frag_ctx->plugin;
1836 struct UDP_MessageWrapper *udpw; 1836 struct UDP_MessageWrapper *udpw;
1837 struct Session *session = frag_ctx->session; 1837 struct GNUNET_ATS_Session *session = frag_ctx->session;
1838 size_t msg_len = ntohs (msg->size); 1838 size_t msg_len = ntohs (msg->size);
1839 1839
1840 LOG (GNUNET_ERROR_TYPE_DEBUG, 1840 LOG (GNUNET_ERROR_TYPE_DEBUG,
@@ -1981,7 +1981,7 @@ qc_message_sent (void *cls,
1981 */ 1981 */
1982static ssize_t 1982static ssize_t
1983udp_plugin_send (void *cls, 1983udp_plugin_send (void *cls,
1984 struct Session *s, 1984 struct GNUNET_ATS_Session *s,
1985 const char *msgbuf, 1985 const char *msgbuf,
1986 size_t msgbuf_size, 1986 size_t msgbuf_size,
1987 unsigned int priority, 1987 unsigned int priority,
@@ -2142,7 +2142,7 @@ read_process_ack (struct Plugin *plugin,
2142 const struct GNUNET_MessageHeader *ack; 2142 const struct GNUNET_MessageHeader *ack;
2143 const struct UDP_ACK_Message *udp_ack; 2143 const struct UDP_ACK_Message *udp_ack;
2144 struct GNUNET_HELLO_Address *address; 2144 struct GNUNET_HELLO_Address *address;
2145 struct Session *s; 2145 struct GNUNET_ATS_Session *s;
2146 struct GNUNET_TIME_Relative flow_delay; 2146 struct GNUNET_TIME_Relative flow_delay;
2147 2147
2148 if (ntohs (msg->size) 2148 if (ntohs (msg->size)
@@ -2246,7 +2246,7 @@ struct FindReceiveContext
2246 /** 2246 /**
2247 * Session associated with this context. 2247 * Session associated with this context.
2248 */ 2248 */
2249 struct Session *session; 2249 struct GNUNET_ATS_Session *session;
2250 2250
2251 /** 2251 /**
2252 * Address to find. 2252 * Address to find.
@@ -2297,7 +2297,7 @@ find_receive_context (void *cls,
2297 * to the service. 2297 * to the service.
2298 * 2298 *
2299 * @param cls the `struct Plugin *` 2299 * @param cls the `struct Plugin *`
2300 * @param client the `struct Session *` 2300 * @param client the `struct GNUNET_ATS_Session *`
2301 * @param hdr the actual message 2301 * @param hdr the actual message
2302 * @return #GNUNET_OK (always) 2302 * @return #GNUNET_OK (always)
2303 */ 2303 */
@@ -2307,7 +2307,7 @@ process_inbound_tokenized_messages (void *cls,
2307 const struct GNUNET_MessageHeader *hdr) 2307 const struct GNUNET_MessageHeader *hdr)
2308{ 2308{
2309 struct Plugin *plugin = cls; 2309 struct Plugin *plugin = cls;
2310 struct Session *session = client; 2310 struct GNUNET_ATS_Session *session = client;
2311 2311
2312 if (GNUNET_YES == session->in_destroy) 2312 if (GNUNET_YES == session->in_destroy)
2313 return GNUNET_OK; 2313 return GNUNET_OK;
@@ -2331,7 +2331,7 @@ process_inbound_tokenized_messages (void *cls,
2331 */ 2331 */
2332static int 2332static int
2333udp_disconnect_session (void *cls, 2333udp_disconnect_session (void *cls,
2334 struct Session *s) 2334 struct GNUNET_ATS_Session *s)
2335{ 2335{
2336 struct Plugin *plugin = cls; 2336 struct Plugin *plugin = cls;
2337 struct UDP_MessageWrapper *udpw; 2337 struct UDP_MessageWrapper *udpw;
@@ -2486,14 +2486,14 @@ udp_disconnect (void *cls,
2486/** 2486/**
2487 * Session was idle, so disconnect it. 2487 * Session was idle, so disconnect it.
2488 * 2488 *
2489 * @param cls the `struct Session` to time out 2489 * @param cls the `struct GNUNET_ATS_Session` to time out
2490 * @param tc scheduler context 2490 * @param tc scheduler context
2491 */ 2491 */
2492static void 2492static void
2493session_timeout (void *cls, 2493session_timeout (void *cls,
2494 const struct GNUNET_SCHEDULER_TaskContext *tc) 2494 const struct GNUNET_SCHEDULER_TaskContext *tc)
2495{ 2495{
2496 struct Session *s = cls; 2496 struct GNUNET_ATS_Session *s = cls;
2497 struct Plugin *plugin = s->plugin; 2497 struct Plugin *plugin = s->plugin;
2498 struct GNUNET_TIME_Relative left; 2498 struct GNUNET_TIME_Relative left;
2499 2499
@@ -2533,15 +2533,15 @@ session_timeout (void *cls,
2533 * @param network_type network type the address belongs to 2533 * @param network_type network type the address belongs to
2534 * @return NULL on error, otherwise session handle 2534 * @return NULL on error, otherwise session handle
2535 */ 2535 */
2536static struct Session * 2536static struct GNUNET_ATS_Session *
2537udp_plugin_create_session (void *cls, 2537udp_plugin_create_session (void *cls,
2538 const struct GNUNET_HELLO_Address *address, 2538 const struct GNUNET_HELLO_Address *address,
2539 enum GNUNET_ATS_Network_Type network_type) 2539 enum GNUNET_ATS_Network_Type network_type)
2540{ 2540{
2541 struct Plugin *plugin = cls; 2541 struct Plugin *plugin = cls;
2542 struct Session *s; 2542 struct GNUNET_ATS_Session *s;
2543 2543
2544 s = GNUNET_new (struct Session); 2544 s = GNUNET_new (struct GNUNET_ATS_Session);
2545 s->plugin = plugin; 2545 s->plugin = plugin;
2546 s->address = GNUNET_HELLO_address_copy (address); 2546 s->address = GNUNET_HELLO_address_copy (address);
2547 s->target = address->peer; 2547 s->target = address->peer;
@@ -2588,12 +2588,12 @@ udp_plugin_create_session (void *cls,
2588 * @param address the address 2588 * @param address the address
2589 * @return the session or NULL of max connections exceeded 2589 * @return the session or NULL of max connections exceeded
2590 */ 2590 */
2591static struct Session * 2591static struct GNUNET_ATS_Session *
2592udp_plugin_get_session (void *cls, 2592udp_plugin_get_session (void *cls,
2593 const struct GNUNET_HELLO_Address *address) 2593 const struct GNUNET_HELLO_Address *address)
2594{ 2594{
2595 struct Plugin *plugin = cls; 2595 struct Plugin *plugin = cls;
2596 struct Session *s; 2596 struct GNUNET_ATS_Session *s;
2597 enum GNUNET_ATS_Network_Type network_type = GNUNET_ATS_NET_UNSPECIFIED; 2597 enum GNUNET_ATS_Network_Type network_type = GNUNET_ATS_NET_UNSPECIFIED;
2598 const struct IPv4UdpAddress *udp_v4; 2598 const struct IPv4UdpAddress *udp_v4;
2599 const struct IPv6UdpAddress *udp_v6; 2599 const struct IPv6UdpAddress *udp_v6;
@@ -2669,7 +2669,7 @@ process_udp_message (struct Plugin *plugin,
2669 size_t udp_addr_len, 2669 size_t udp_addr_len,
2670 enum GNUNET_ATS_Network_Type network_type) 2670 enum GNUNET_ATS_Network_Type network_type)
2671{ 2671{
2672 struct Session *s; 2672 struct GNUNET_ATS_Session *s;
2673 struct GNUNET_HELLO_Address *address; 2673 struct GNUNET_HELLO_Address *address;
2674 2674
2675 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != network_type); 2675 GNUNET_break (GNUNET_ATS_NET_UNSPECIFIED != network_type);
@@ -2806,7 +2806,7 @@ ack_proc (void *cls,
2806 struct UDP_ACK_Message *udp_ack; 2806 struct UDP_ACK_Message *udp_ack;
2807 uint32_t delay; 2807 uint32_t delay;
2808 struct UDP_MessageWrapper *udpw; 2808 struct UDP_MessageWrapper *udpw;
2809 struct Session *s; 2809 struct GNUNET_ATS_Session *s;
2810 struct GNUNET_HELLO_Address *address; 2810 struct GNUNET_HELLO_Address *address;
2811 2811
2812 if (GNUNET_NO == rc->have_sender) 2812 if (GNUNET_NO == rc->have_sender)
@@ -3161,7 +3161,7 @@ remove_timeout_messages_and_select (struct Plugin *plugin,
3161{ 3161{
3162 struct UDP_MessageWrapper *udpw; 3162 struct UDP_MessageWrapper *udpw;
3163 struct GNUNET_TIME_Relative remaining; 3163 struct GNUNET_TIME_Relative remaining;
3164 struct Session *session; 3164 struct GNUNET_ATS_Session *session;
3165 int removed; 3165 int removed;
3166 3166
3167 removed = GNUNET_NO; 3167 removed = GNUNET_NO;
diff --git a/src/transport/plugin_transport_udp.h b/src/transport/plugin_transport_udp.h
index 5f8366636..40c86a402 100644
--- a/src/transport/plugin_transport_udp.h
+++ b/src/transport/plugin_transport_udp.h
@@ -145,7 +145,7 @@ struct Plugin
145 145
146 /** 146 /**
147 * Session of peers with whom we are currently connected, 147 * Session of peers with whom we are currently connected,
148 * map of peer identity to `struct Session *`. 148 * map of peer identity to `struct GNUNET_ATS_Session *`.
149 */ 149 */
150 struct GNUNET_CONTAINER_MultiPeerMap *sessions; 150 struct GNUNET_CONTAINER_MultiPeerMap *sessions;
151 151
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index c6ac0e508..359cf575d 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -137,7 +137,7 @@ struct UNIXMessageWrapper
137 /** 137 /**
138 * Session this message belongs to. 138 * Session this message belongs to.
139 */ 139 */
140 struct Session *session; 140 struct GNUNET_ATS_Session *session;
141 141
142 /** 142 /**
143 * Function to call upon transmission. 143 * Function to call upon transmission.
@@ -174,18 +174,18 @@ struct UNIXMessageWrapper
174/** 174/**
175 * Handle for a session. 175 * Handle for a session.
176 */ 176 */
177struct Session 177struct GNUNET_ATS_Session
178{ 178{
179 179
180 /** 180 /**
181 * Sessions with pending messages (!) are kept in a DLL. 181 * Sessions with pending messages (!) are kept in a DLL.
182 */ 182 */
183 struct Session *next; 183 struct GNUNET_ATS_Session *next;
184 184
185 /** 185 /**
186 * Sessions with pending messages (!) are kept in a DLL. 186 * Sessions with pending messages (!) are kept in a DLL.
187 */ 187 */
188 struct Session *prev; 188 struct GNUNET_ATS_Session *prev;
189 189
190 /** 190 /**
191 * To whom are we talking to (set to our identity 191 * To whom are we talking to (set to our identity
@@ -278,7 +278,7 @@ struct Plugin
278 struct GNUNET_TRANSPORT_PluginEnvironment *env; 278 struct GNUNET_TRANSPORT_PluginEnvironment *env;
279 279
280 /** 280 /**
281 * Sessions (map from peer identity to `struct Session`) 281 * Sessions (map from peer identity to `struct GNUNET_ATS_Session`)
282 */ 282 */
283 struct GNUNET_CONTAINER_MultiPeerMap *session_map; 283 struct GNUNET_CONTAINER_MultiPeerMap *session_map;
284 284
@@ -335,7 +335,7 @@ struct Plugin
335 */ 335 */
336static void 336static void
337notify_session_monitor (struct Plugin *plugin, 337notify_session_monitor (struct Plugin *plugin,
338 struct Session *session, 338 struct GNUNET_ATS_Session *session,
339 enum GNUNET_TRANSPORT_SessionState state) 339 enum GNUNET_TRANSPORT_SessionState state)
340{ 340{
341 struct GNUNET_TRANSPORT_SessionInfo info; 341 struct GNUNET_TRANSPORT_SessionInfo info;
@@ -431,7 +431,7 @@ unix_plugin_address_to_string (void *cls,
431 */ 431 */
432static int 432static int
433unix_plugin_session_disconnect (void *cls, 433unix_plugin_session_disconnect (void *cls,
434 struct Session *session) 434 struct GNUNET_ATS_Session *session)
435{ 435{
436 struct Plugin *plugin = cls; 436 struct Plugin *plugin = cls;
437 struct UNIXMessageWrapper *msgw; 437 struct UNIXMessageWrapper *msgw;
@@ -497,14 +497,14 @@ unix_plugin_session_disconnect (void *cls,
497/** 497/**
498 * Session was idle for too long, so disconnect it 498 * Session was idle for too long, so disconnect it
499 * 499 *
500 * @param cls the `struct Session *` to disconnect 500 * @param cls the `struct GNUNET_ATS_Session *` to disconnect
501 * @param tc scheduler context 501 * @param tc scheduler context
502 */ 502 */
503static void 503static void
504session_timeout (void *cls, 504session_timeout (void *cls,
505 const struct GNUNET_SCHEDULER_TaskContext *tc) 505 const struct GNUNET_SCHEDULER_TaskContext *tc)
506{ 506{
507 struct Session *session = cls; 507 struct GNUNET_ATS_Session *session = cls;
508 struct GNUNET_TIME_Relative left; 508 struct GNUNET_TIME_Relative left;
509 509
510 session->timeout_task = NULL; 510 session->timeout_task = NULL;
@@ -538,7 +538,7 @@ session_timeout (void *cls,
538 * @param session session for which the timeout should be rescheduled 538 * @param session session for which the timeout should be rescheduled
539 */ 539 */
540static void 540static void
541reschedule_session_timeout (struct Session *session) 541reschedule_session_timeout (struct GNUNET_ATS_Session *session)
542{ 542{
543 GNUNET_assert (NULL != session->timeout_task); 543 GNUNET_assert (NULL != session->timeout_task);
544 session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); 544 session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT);
@@ -584,7 +584,7 @@ struct LookupCtx
584 /** 584 /**
585 * Location to store the session, if found. 585 * Location to store the session, if found.
586 */ 586 */
587 struct Session *res; 587 struct GNUNET_ATS_Session *res;
588 588
589 /** 589 /**
590 * Address we are looking for. 590 * Address we are looking for.
@@ -607,7 +607,7 @@ lookup_session_it (void *cls,
607 void *value) 607 void *value)
608{ 608{
609 struct LookupCtx *lctx = cls; 609 struct LookupCtx *lctx = cls;
610 struct Session *session = value; 610 struct GNUNET_ATS_Session *session = value;
611 611
612 if (0 == GNUNET_HELLO_address_cmp (lctx->address, 612 if (0 == GNUNET_HELLO_address_cmp (lctx->address,
613 session->address)) 613 session->address))
@@ -626,7 +626,7 @@ lookup_session_it (void *cls,
626 * @param address the address to find 626 * @param address the address to find
627 * @return NULL if session was not found 627 * @return NULL if session was not found
628 */ 628 */
629static struct Session * 629static struct GNUNET_ATS_Session *
630lookup_session (struct Plugin *plugin, 630lookup_session (struct Plugin *plugin,
631 const struct GNUNET_HELLO_Address *address) 631 const struct GNUNET_HELLO_Address *address)
632{ 632{
@@ -797,7 +797,7 @@ resend:
797 */ 797 */
798static enum GNUNET_ATS_Network_Type 798static enum GNUNET_ATS_Network_Type
799unix_plugin_get_network (void *cls, 799unix_plugin_get_network (void *cls,
800 struct Session *session) 800 struct GNUNET_ATS_Session *session)
801{ 801{
802 GNUNET_assert (NULL != session); 802 GNUNET_assert (NULL != session);
803 return GNUNET_ATS_NET_LOOPBACK; 803 return GNUNET_ATS_NET_LOOPBACK;
@@ -828,12 +828,12 @@ unix_plugin_get_network_for_address (void *cls,
828 * @param address the address 828 * @param address the address
829 * @return the session or NULL of max connections exceeded 829 * @return the session or NULL of max connections exceeded
830 */ 830 */
831static struct Session * 831static struct GNUNET_ATS_Session *
832unix_plugin_get_session (void *cls, 832unix_plugin_get_session (void *cls,
833 const struct GNUNET_HELLO_Address *address) 833 const struct GNUNET_HELLO_Address *address)
834{ 834{
835 struct Plugin *plugin = cls; 835 struct Plugin *plugin = cls;
836 struct Session *session; 836 struct GNUNET_ATS_Session *session;
837 struct UnixAddress *ua; 837 struct UnixAddress *ua;
838 char * addrstr; 838 char * addrstr;
839 uint32_t addr_str_len; 839 uint32_t addr_str_len;
@@ -886,7 +886,7 @@ unix_plugin_get_session (void *cls,
886 } 886 }
887 887
888 /* create a new session */ 888 /* create a new session */
889 session = GNUNET_new (struct Session); 889 session = GNUNET_new (struct GNUNET_ATS_Session);
890 session->target = address->peer; 890 session->target = address->peer;
891 session->address = GNUNET_HELLO_address_copy (address); 891 session->address = GNUNET_HELLO_address_copy (address);
892 session->plugin = plugin; 892 session->plugin = plugin;
@@ -929,7 +929,7 @@ unix_plugin_get_session (void *cls,
929static void 929static void
930unix_plugin_update_session_timeout (void *cls, 930unix_plugin_update_session_timeout (void *cls,
931 const struct GNUNET_PeerIdentity *peer, 931 const struct GNUNET_PeerIdentity *peer,
932 struct Session *session) 932 struct GNUNET_ATS_Session *session)
933{ 933{
934 struct Plugin *plugin = cls; 934 struct Plugin *plugin = cls;
935 935
@@ -961,7 +961,7 @@ unix_demultiplexer (struct Plugin *plugin,
961 const struct UnixAddress *ua, 961 const struct UnixAddress *ua,
962 size_t ua_len) 962 size_t ua_len)
963{ 963{
964 struct Session *session; 964 struct GNUNET_ATS_Session *session;
965 struct GNUNET_HELLO_Address *address; 965 struct GNUNET_HELLO_Address *address;
966 966
967 GNUNET_assert (ua_len >= sizeof (struct UnixAddress)); 967 GNUNET_assert (ua_len >= sizeof (struct UnixAddress));
@@ -1103,7 +1103,7 @@ unix_plugin_do_write (struct Plugin *plugin)
1103{ 1103{
1104 ssize_t sent = 0; 1104 ssize_t sent = 0;
1105 struct UNIXMessageWrapper *msgw; 1105 struct UNIXMessageWrapper *msgw;
1106 struct Session *session; 1106 struct GNUNET_ATS_Session *session;
1107 int did_delete; 1107 int did_delete;
1108 1108
1109 session = NULL; 1109 session = NULL;
@@ -1301,7 +1301,7 @@ unix_plugin_select_write (void *cls,
1301 */ 1301 */
1302static ssize_t 1302static ssize_t
1303unix_plugin_send (void *cls, 1303unix_plugin_send (void *cls,
1304 struct Session *session, 1304 struct GNUNET_ATS_Session *session,
1305 const char *msgbuf, 1305 const char *msgbuf,
1306 size_t msgbuf_size, 1306 size_t msgbuf_size,
1307 unsigned int priority, 1307 unsigned int priority,
@@ -1655,7 +1655,7 @@ address_notification (void *cls,
1655 * 1655 *
1656 * @param cls the plugin 1656 * @param cls the plugin
1657 * @param key peer identity (unused) 1657 * @param key peer identity (unused)
1658 * @param value the `struct Session *` to disconnect 1658 * @param value the `struct GNUNET_ATS_Session *` to disconnect
1659 * @return #GNUNET_YES (always, continue to iterate) 1659 * @return #GNUNET_YES (always, continue to iterate)
1660 */ 1660 */
1661static int 1661static int
@@ -1664,7 +1664,7 @@ get_session_delete_it (void *cls,
1664 void *value) 1664 void *value)
1665{ 1665{
1666 struct Plugin *plugin = cls; 1666 struct Plugin *plugin = cls;
1667 struct Session *session = value; 1667 struct GNUNET_ATS_Session *session = value;
1668 1668
1669 unix_plugin_session_disconnect (plugin, session); 1669 unix_plugin_session_disconnect (plugin, session);
1670 return GNUNET_YES; 1670 return GNUNET_YES;
@@ -1696,7 +1696,7 @@ unix_plugin_peer_disconnect (void *cls,
1696 * 1696 *
1697 * @param cls the `struct Plugin` with the monitor callback (`sic`) 1697 * @param cls the `struct Plugin` with the monitor callback (`sic`)
1698 * @param peer peer we send information about 1698 * @param peer peer we send information about
1699 * @param value our `struct Session` to send information about 1699 * @param value our `struct GNUNET_ATS_Session` to send information about
1700 * @return #GNUNET_OK (continue to iterate) 1700 * @return #GNUNET_OK (continue to iterate)
1701 */ 1701 */
1702static int 1702static int
@@ -1705,7 +1705,7 @@ send_session_info_iter (void *cls,
1705 void *value) 1705 void *value)
1706{ 1706{
1707 struct Plugin *plugin = cls; 1707 struct Plugin *plugin = cls;
1708 struct Session *session = value; 1708 struct GNUNET_ATS_Session *session = value;
1709 1709
1710 notify_session_monitor (plugin, 1710 notify_session_monitor (plugin,
1711 session, 1711 session,
@@ -1849,7 +1849,7 @@ libgnunet_plugin_transport_unix_done (void *cls)
1849 struct UNIXMessageWrapper * msgw; 1849 struct UNIXMessageWrapper * msgw;
1850 struct UnixAddress *ua; 1850 struct UnixAddress *ua;
1851 size_t len; 1851 size_t len;
1852 struct Session *session; 1852 struct GNUNET_ATS_Session *session;
1853 1853
1854 if (NULL == plugin) 1854 if (NULL == plugin)
1855 { 1855 {
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index d5932bb30..f9f76ac7c 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -221,7 +221,7 @@ struct PendingMessage
221/** 221/**
222 * Session handle for connections with other peers. 222 * Session handle for connections with other peers.
223 */ 223 */
224struct Session 224struct GNUNET_ATS_Session
225{ 225{
226 /** 226 /**
227 * To whom are we talking to (set to our identity 227 * To whom are we talking to (set to our identity
@@ -233,13 +233,13 @@ struct Session
233 * We keep all sessions in a DLL at their respective 233 * We keep all sessions in a DLL at their respective
234 * `struct MACEndpoint *`. 234 * `struct MACEndpoint *`.
235 */ 235 */
236 struct Session *next; 236 struct GNUNET_ATS_Session *next;
237 237
238 /** 238 /**
239 * We keep all sessions in a DLL at their respective 239 * We keep all sessions in a DLL at their respective
240 * `struct MACEndpoint *`. 240 * `struct MACEndpoint *`.
241 */ 241 */
242 struct Session *prev; 242 struct GNUNET_ATS_Session *prev;
243 243
244 /** 244 /**
245 * MAC endpoint with the address of this peer. 245 * MAC endpoint with the address of this peer.
@@ -364,12 +364,12 @@ struct MacEndpoint
364 /** 364 /**
365 * Head of sessions that use this MAC. 365 * Head of sessions that use this MAC.
366 */ 366 */
367 struct Session *sessions_head; 367 struct GNUNET_ATS_Session *sessions_head;
368 368
369 /** 369 /**
370 * Tail of sessions that use this MAC. 370 * Tail of sessions that use this MAC.
371 */ 371 */
372 struct Session *sessions_tail; 372 struct GNUNET_ATS_Session *sessions_tail;
373 373
374 /** 374 /**
375 * Head of messages we are currently sending to this MAC. 375 * Head of messages we are currently sending to this MAC.
@@ -539,7 +539,7 @@ struct MacAndSession
539 /** 539 /**
540 * NULL if the identity of the other peer is not known. 540 * NULL if the identity of the other peer is not known.
541 */ 541 */
542 struct Session *session; 542 struct GNUNET_ATS_Session *session;
543 543
544 /** 544 /**
545 * MAC address of the other peer, NULL if not known. 545 * MAC address of the other peer, NULL if not known.
@@ -616,7 +616,7 @@ wlan_plugin_address_to_string (void *cls,
616 */ 616 */
617static void 617static void
618notify_session_monitor (struct Plugin *plugin, 618notify_session_monitor (struct Plugin *plugin,
619 struct Session *session, 619 struct GNUNET_ATS_Session *session,
620 enum GNUNET_TRANSPORT_SessionState state) 620 enum GNUNET_TRANSPORT_SessionState state)
621{ 621{
622 struct GNUNET_TRANSPORT_SessionInfo info; 622 struct GNUNET_TRANSPORT_SessionInfo info;
@@ -780,7 +780,7 @@ wlan_data_message_handler (void *cls,
780 */ 780 */
781static int 781static int
782wlan_plugin_disconnect_session (void *cls, 782wlan_plugin_disconnect_session (void *cls,
783 struct Session *session) 783 struct GNUNET_ATS_Session *session)
784{ 784{
785 struct MacEndpoint *endpoint = session->mac; 785 struct MacEndpoint *endpoint = session->mac;
786 struct Plugin *plugin = endpoint->plugin; 786 struct Plugin *plugin = endpoint->plugin;
@@ -834,7 +834,7 @@ static void
834session_timeout (void *cls, 834session_timeout (void *cls,
835 const struct GNUNET_SCHEDULER_TaskContext *tc) 835 const struct GNUNET_SCHEDULER_TaskContext *tc)
836{ 836{
837 struct Session *session = cls; 837 struct GNUNET_ATS_Session *session = cls;
838 struct GNUNET_TIME_Relative left; 838 struct GNUNET_TIME_Relative left;
839 839
840 session->timeout_task = NULL; 840 session->timeout_task = NULL;
@@ -860,11 +860,11 @@ session_timeout (void *cls,
860 * @param peer peer identity to use for this session 860 * @param peer peer identity to use for this session
861 * @return returns the session or NULL 861 * @return returns the session or NULL
862 */ 862 */
863static struct Session * 863static struct GNUNET_ATS_Session *
864lookup_session (struct MacEndpoint *endpoint, 864lookup_session (struct MacEndpoint *endpoint,
865 const struct GNUNET_PeerIdentity *peer) 865 const struct GNUNET_PeerIdentity *peer)
866{ 866{
867 struct Session *session; 867 struct GNUNET_ATS_Session *session;
868 868
869 for (session = endpoint->sessions_head; NULL != session; session = session->next) 869 for (session = endpoint->sessions_head; NULL != session; session = session->next)
870 if (0 == memcmp (peer, &session->target, sizeof (struct GNUNET_PeerIdentity))) 870 if (0 == memcmp (peer, &session->target, sizeof (struct GNUNET_PeerIdentity)))
@@ -880,17 +880,17 @@ lookup_session (struct MacEndpoint *endpoint,
880 * @param peer peer identity to use for this session 880 * @param peer peer identity to use for this session
881 * @return returns the session or NULL 881 * @return returns the session or NULL
882 */ 882 */
883static struct Session * 883static struct GNUNET_ATS_Session *
884create_session (struct MacEndpoint *endpoint, 884create_session (struct MacEndpoint *endpoint,
885 const struct GNUNET_PeerIdentity *peer) 885 const struct GNUNET_PeerIdentity *peer)
886{ 886{
887 struct Session *session; 887 struct GNUNET_ATS_Session *session;
888 888
889 GNUNET_STATISTICS_update (endpoint->plugin->env->stats, 889 GNUNET_STATISTICS_update (endpoint->plugin->env->stats,
890 _("# Sessions allocated"), 890 _("# Sessions allocated"),
891 1, 891 1,
892 GNUNET_NO); 892 GNUNET_NO);
893 session = GNUNET_new (struct Session); 893 session = GNUNET_new (struct GNUNET_ATS_Session);
894 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head, 894 GNUNET_CONTAINER_DLL_insert_tail (endpoint->sessions_head,
895 endpoint->sessions_tail, 895 endpoint->sessions_tail,
896 session); 896 session);
@@ -928,11 +928,11 @@ create_session (struct MacEndpoint *endpoint,
928 * @param peer peer identity to use for this session 928 * @param peer peer identity to use for this session
929 * @return returns the session 929 * @return returns the session
930 */ 930 */
931static struct Session * 931static struct GNUNET_ATS_Session *
932get_session (struct MacEndpoint *endpoint, 932get_session (struct MacEndpoint *endpoint,
933 const struct GNUNET_PeerIdentity *peer) 933 const struct GNUNET_PeerIdentity *peer)
934{ 934{
935 struct Session *session; 935 struct GNUNET_ATS_Session *session;
936 936
937 if (NULL != (session = lookup_session (endpoint, peer))) 937 if (NULL != (session = lookup_session (endpoint, peer)))
938 return session; 938 return session;
@@ -1165,7 +1165,7 @@ free_macendpoint (struct MacEndpoint *endpoint)
1165{ 1165{
1166 struct Plugin *plugin = endpoint->plugin; 1166 struct Plugin *plugin = endpoint->plugin;
1167 struct FragmentMessage *fm; 1167 struct FragmentMessage *fm;
1168 struct Session *session; 1168 struct GNUNET_ATS_Session *session;
1169 1169
1170 GNUNET_STATISTICS_update (plugin->env->stats, 1170 GNUNET_STATISTICS_update (plugin->env->stats,
1171 _("# MAC endpoints allocated"), 1171 _("# MAC endpoints allocated"),
@@ -1281,7 +1281,7 @@ create_macendpoint (struct Plugin *plugin,
1281 */ 1281 */
1282static enum GNUNET_ATS_Network_Type 1282static enum GNUNET_ATS_Network_Type
1283wlan_plugin_get_network (void *cls, 1283wlan_plugin_get_network (void *cls,
1284 struct Session *session) 1284 struct GNUNET_ATS_Session *session)
1285{ 1285{
1286#if BUILD_WLAN 1286#if BUILD_WLAN
1287 return GNUNET_ATS_NET_WLAN; 1287 return GNUNET_ATS_NET_WLAN;
@@ -1318,7 +1318,7 @@ wlan_plugin_get_network_for_address (void *cls,
1318 * @param address the address 1318 * @param address the address
1319 * @return the session or NULL of max connections exceeded 1319 * @return the session or NULL of max connections exceeded
1320 */ 1320 */
1321static struct Session * 1321static struct GNUNET_ATS_Session *
1322wlan_plugin_get_session (void *cls, 1322wlan_plugin_get_session (void *cls,
1323 const struct GNUNET_HELLO_Address *address) 1323 const struct GNUNET_HELLO_Address *address)
1324{ 1324{
@@ -1357,7 +1357,7 @@ wlan_plugin_disconnect_peer (void *cls,
1357 const struct GNUNET_PeerIdentity *target) 1357 const struct GNUNET_PeerIdentity *target)
1358{ 1358{
1359 struct Plugin *plugin = cls; 1359 struct Plugin *plugin = cls;
1360 struct Session *session; 1360 struct GNUNET_ATS_Session *session;
1361 struct MacEndpoint *endpoint; 1361 struct MacEndpoint *endpoint;
1362 1362
1363 for (endpoint = plugin->mac_head; NULL != endpoint; endpoint = endpoint->next) 1363 for (endpoint = plugin->mac_head; NULL != endpoint; endpoint = endpoint->next)
@@ -1400,7 +1400,7 @@ wlan_plugin_disconnect_peer (void *cls,
1400 */ 1400 */
1401static ssize_t 1401static ssize_t
1402wlan_plugin_send (void *cls, 1402wlan_plugin_send (void *cls,
1403 struct Session *session, 1403 struct GNUNET_ATS_Session *session,
1404 const char *msgbuf, size_t msgbuf_size, 1404 const char *msgbuf, size_t msgbuf_size,
1405 unsigned int priority, 1405 unsigned int priority,
1406 struct GNUNET_TIME_Relative to, 1406 struct GNUNET_TIME_Relative to,
@@ -2143,7 +2143,7 @@ wlan_plugin_setup_monitor (void *cls,
2143{ 2143{
2144 struct Plugin *plugin = cls; 2144 struct Plugin *plugin = cls;
2145 struct MacEndpoint *mac; 2145 struct MacEndpoint *mac;
2146 struct Session *session; 2146 struct GNUNET_ATS_Session *session;
2147 2147
2148 plugin->sic = sic; 2148 plugin->sic = sic;
2149 plugin->sic_cls = sic_cls; 2149 plugin->sic_cls = sic_cls;
@@ -2177,7 +2177,7 @@ wlan_plugin_setup_monitor (void *cls,
2177static void 2177static void
2178wlan_plugin_update_session_timeout (void *cls, 2178wlan_plugin_update_session_timeout (void *cls,
2179 const struct GNUNET_PeerIdentity *peer, 2179 const struct GNUNET_PeerIdentity *peer,
2180 struct Session *session) 2180 struct GNUNET_ATS_Session *session)
2181{ 2181{
2182 GNUNET_assert (NULL != session->timeout_task); 2182 GNUNET_assert (NULL != session->timeout_task);
2183 session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT); 2183 session->timeout = GNUNET_TIME_relative_to_absolute (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT);
@@ -2197,7 +2197,7 @@ wlan_plugin_update_session_timeout (void *cls,
2197static void 2197static void
2198wlan_plugin_update_inbound_delay (void *cls, 2198wlan_plugin_update_inbound_delay (void *cls,
2199 const struct GNUNET_PeerIdentity *peer, 2199 const struct GNUNET_PeerIdentity *peer,
2200 struct Session *session, 2200 struct GNUNET_ATS_Session *session,
2201 struct GNUNET_TIME_Relative delay) 2201 struct GNUNET_TIME_Relative delay)
2202{ 2202{
2203 /* does nothing, as inbound delay is not supported by WLAN */ 2203 /* does nothing, as inbound delay is not supported by WLAN */
diff --git a/src/transport/test_plugin_transport.c b/src/transport/test_plugin_transport.c
index f3c5e260e..d7c53f51b 100644
--- a/src/transport/test_plugin_transport.c
+++ b/src/transport/test_plugin_transport.c
@@ -285,7 +285,7 @@ end_badly_now ()
285static struct GNUNET_TIME_Relative 285static struct GNUNET_TIME_Relative
286env_receive (void *cls, 286env_receive (void *cls,
287 const struct GNUNET_HELLO_Address *address, 287 const struct GNUNET_HELLO_Address *address,
288 struct Session *session, 288 struct GNUNET_ATS_Session *session,
289 const struct GNUNET_MessageHeader *message) 289 const struct GNUNET_MessageHeader *message)
290{ 290{
291 /* do nothing */ 291 /* do nothing */
@@ -520,7 +520,7 @@ env_get_our_hello ()
520static void 520static void
521env_session_end (void *cls, 521env_session_end (void *cls,
522 const struct GNUNET_HELLO_Address *address, 522 const struct GNUNET_HELLO_Address *address,
523 struct Session *session) 523 struct GNUNET_ATS_Session *session)
524{ 524{
525 525
526} 526}
diff --git a/src/transport/transport_api_monitor_plugins.c b/src/transport/transport_api_monitor_plugins.c
index 1a8ec8b7c..56d6f928d 100644
--- a/src/transport/transport_api_monitor_plugins.c
+++ b/src/transport/transport_api_monitor_plugins.c
@@ -79,7 +79,7 @@ struct GNUNET_TRANSPORT_PluginMonitor
79 79
80/** 80/**
81 * Abstract representation of a plugin's session. 81 * Abstract representation of a plugin's session.
82 * Corresponds to the `struct Session` within the TRANSPORT service. 82 * Corresponds to the `struct GNUNET_ATS_Session` within the TRANSPORT service.
83 */ 83 */
84struct GNUNET_TRANSPORT_PluginSession 84struct GNUNET_TRANSPORT_PluginSession
85{ 85{