aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/plugin_transport_wlan.c')
-rw-r--r--src/transport/plugin_transport_wlan.c48
1 files changed, 24 insertions, 24 deletions
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 */