aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-29 10:19:43 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-29 10:19:43 +0000
commitcddbdf5b928c68ab71b40c950b9f01ea68a9fbdb (patch)
treeb704e00a3af618b2cd174a7f89514eaebd82a1cf /src/transport
parentbb4fc4f4007988874f910d4de5492f9629301641 (diff)
downloadgnunet-cddbdf5b928c68ab71b40c950b9f01ea68a9fbdb.tar.gz
gnunet-cddbdf5b928c68ab71b40c950b9f01ea68a9fbdb.zip
run indent twice, it alternates between two 'canonical' forms, also run whitespace remover
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/gnunet-service-transport-new.c26
-rw-r--r--src/transport/gnunet-service-transport.c10
-rw-r--r--src/transport/gnunet-service-transport_blacklist.c6
-rw-r--r--src/transport/gnunet-service-transport_blacklist.h4
-rw-r--r--src/transport/gnunet-service-transport_clients.c3
-rw-r--r--src/transport/gnunet-service-transport_hello.c2
-rw-r--r--src/transport/gnunet-service-transport_neighbours.c12
-rw-r--r--src/transport/gnunet-service-transport_neighbours.h6
-rw-r--r--src/transport/gnunet-service-transport_plugins.c2
-rw-r--r--src/transport/gnunet-service-transport_plugins.h2
-rw-r--r--src/transport/gnunet-service-transport_validation.c5
-rw-r--r--src/transport/gnunet-transport-wlan-helper.c2
-rw-r--r--src/transport/plugin_transport_tcp.c2
-rw-r--r--src/transport/plugin_transport_udp.c8
-rw-r--r--src/transport/test_transport_api.c7
-rw-r--r--src/transport/test_transport_startonly.c13
-rw-r--r--src/transport/transport-testing.c5
-rw-r--r--src/transport/transport_api.c6
-rw-r--r--src/transport/wlan/byteorder.h114
-rw-r--r--src/transport/wlan/ieee80211.h4
20 files changed, 119 insertions, 120 deletions
diff --git a/src/transport/gnunet-service-transport-new.c b/src/transport/gnunet-service-transport-new.c
index 54af9cade..b605954ac 100644
--- a/src/transport/gnunet-service-transport-new.c
+++ b/src/transport/gnunet-service-transport-new.c
@@ -20,7 +20,7 @@
20 20
21/** 21/**
22 * @file transport/gnunet-service-transport-new.c 22 * @file transport/gnunet-service-transport-new.c
23 * @brief 23 * @brief
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
@@ -156,8 +156,7 @@ static struct GNUNET_TIME_Relative
156plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer, 156plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
157 const struct GNUNET_MessageHeader *message, 157 const struct GNUNET_MessageHeader *message,
158 const struct GNUNET_TRANSPORT_ATS_Information *ats, 158 const struct GNUNET_TRANSPORT_ATS_Information *ats,
159 uint32_t ats_count, 159 uint32_t ats_count, struct Session *session,
160 struct Session *session,
161 const char *sender_address, 160 const char *sender_address,
162 uint16_t sender_address_len) 161 uint16_t sender_address_len)
163{ 162{
@@ -202,7 +201,7 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
202 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT: 201 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_CONNECT:
203 (void) GST_blacklist_test_allowed (peer, NULL, &try_connect_if_allowed, 202 (void) GST_blacklist_test_allowed (peer, NULL, &try_connect_if_allowed,
204 NULL); 203 NULL);
205 /* TODO: if 'session != NULL', maybe notify ATS that this is now the preferred 204 /* TODO: if 'session != NULL', maybe notify ATS that this is now the preferred
206 * way to communicate with this peer (other peer switched transport) */ 205 * way to communicate with this peer (other peer switched transport) */
207 break; 206 break;
208 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT: 207 case GNUNET_MESSAGE_TYPE_TRANSPORT_SESSION_DISCONNECT:
@@ -224,21 +223,20 @@ plugin_env_receive_callback (void *cls, const struct GNUNET_PeerIdentity *peer,
224 &do_forward); 223 &do_forward);
225 if (do_forward == GNUNET_YES) 224 if (do_forward == GNUNET_YES)
226 { 225 {
227 struct InboundMessage * im; 226 struct InboundMessage *im;
228 size_t size = 227 size_t size = sizeof (struct InboundMessage) + ntohs (message->size);
229 sizeof (struct InboundMessage) +
230 ntohs (message->size);
231 228
232 im = GNUNET_malloc (size); 229 im = GNUNET_malloc (size);
233 im->header.size = htons (size); 230 im->header.size = htons (size);
234 im->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_RECV); 231 im->header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_RECV);
235 im->ats_count = htonl (0); 232 im->ats_count = htonl (0);
236 memcpy (&(im->peer), peer, sizeof(struct GNUNET_PeerIdentity)); 233 memcpy (&(im->peer), peer, sizeof (struct GNUNET_PeerIdentity));
237 memcpy (&im[1], message, ntohs (message->size)); 234 memcpy (&im[1], message, ntohs (message->size));
238 235
239 GST_clients_broadcast ((const struct GNUNET_MessageHeader *) im, GNUNET_YES); 236 GST_clients_broadcast ((const struct GNUNET_MessageHeader *) im,
237 GNUNET_YES);
240 238
241 GNUNET_free(im); 239 GNUNET_free (im);
242 } 240 }
243 break; 241 break;
244 } 242 }
@@ -280,9 +278,9 @@ plugin_env_address_change_notification (void *cls, int add_remove,
280 * use NULL wherever a session pointer is needed. This function 278 * use NULL wherever a session pointer is needed. This function
281 * should be called BEFORE a potential "TransmitContinuation" 279 * should be called BEFORE a potential "TransmitContinuation"
282 * from the "TransmitFunction". 280 * from the "TransmitFunction".
283 * 281 *
284 * @param cls closure 282 * @param cls closure
285 * @param peer which peer was the session for 283 * @param peer which peer was the session for
286 * @param session which session is being destoyed 284 * @param session which session is being destoyed
287 */ 285 */
288static void 286static void
@@ -297,7 +295,7 @@ plugin_env_session_end (void *cls, const struct GNUNET_PeerIdentity *peer,
297 * Function called by ATS to notify the callee that the 295 * Function called by ATS to notify the callee that the
298 * assigned bandwidth or address for a given peer was changed. If the 296 * assigned bandwidth or address for a given peer was changed. If the
299 * callback is called with address/bandwidth assignments of zero, the 297 * callback is called with address/bandwidth assignments of zero, the
300 * ATS disconnect function will still be called once the disconnect 298 * ATS disconnect function will still be called once the disconnect
301 * actually happened. 299 * actually happened.
302 * 300 *
303 * @param cls closure 301 * @param cls closure
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index d6b5ac23f..67dc4e962 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -439,7 +439,7 @@ struct ReadyList
439 439
440 440
441/** 441/**
442 * Entry in neighbours. 442 * Entry in neighbours.
443 */ 443 */
444struct NeighbourMapEntry 444struct NeighbourMapEntry
445{ 445{
@@ -2270,12 +2270,12 @@ try_fast_reconnect (struct TransportPlugin *p, struct NeighbourMapEntry *nl)
2270 * quickly (much faster than timeout) `if a connection was lost and 2270 * quickly (much faster than timeout) `if a connection was lost and
2271 * could not be re-established (i.e. other peer went down or is 2271 * could not be re-established (i.e. other peer went down or is
2272 * unable / refuses to communicate); 2272 * unable / refuses to communicate);
2273 * 2273 *
2274 * So we should consider: 2274 * So we should consider:
2275 * 1) ideally: our own willingness / need to connect 2275 * 1) ideally: our own willingness / need to connect
2276 * 2) prior failures to connect to this peer (by plugin) 2276 * 2) prior failures to connect to this peer (by plugin)
2277 * 3) ideally: reasons why other peer terminated (as far as knowable) 2277 * 3) ideally: reasons why other peer terminated (as far as knowable)
2278 * 2278 *
2279 * Most importantly, it must be POSSIBLE for another peer to terminate 2279 * Most importantly, it must be POSSIBLE for another peer to terminate
2280 * a connection for a while (without us instantly re-establishing it). 2280 * a connection for a while (without us instantly re-establishing it).
2281 * Similarly, if another peer is gone we should quickly notify CORE. 2281 * Similarly, if another peer is gone we should quickly notify CORE.
@@ -2284,7 +2284,7 @@ try_fast_reconnect (struct TransportPlugin *p, struct NeighbourMapEntry *nl)
2284 * services never even notice. 2284 * services never even notice.
2285 * Furthermore, the same mechanism (or small variation) could be used 2285 * Furthermore, the same mechanism (or small variation) could be used
2286 * to switch to a better-performing plugin (ATS). 2286 * to switch to a better-performing plugin (ATS).
2287 * 2287 *
2288 * Finally, this needs to be tested throughly... */ 2288 * Finally, this needs to be tested throughly... */
2289 2289
2290 /* 2290 /*
@@ -4002,7 +4002,7 @@ check_pending_validation (void *cls, const GNUNET_HashCode * key, void *value)
4002 GNUNET_i2s (&pong->pid), a2s (ve->transport_name, &addr[slen], 4002 GNUNET_i2s (&pong->pid), a2s (ve->transport_name, &addr[slen],
4003 alen)); 4003 alen));
4004 /* FIXME: since the sender of the PONG currently uses the 4004 /* FIXME: since the sender of the PONG currently uses the
4005 * wrong address (see FIMXE there!), we cannot run a 4005 * wrong address (see FIMXE there!), we cannot run a
4006 * proper check here... */ 4006 * proper check here... */
4007#if FIXME_URGENT 4007#if FIXME_URGENT
4008 return GNUNET_NO; 4008 return GNUNET_NO;
diff --git a/src/transport/gnunet-service-transport_blacklist.c b/src/transport/gnunet-service-transport_blacklist.c
index 21ad49652..36abbf85c 100644
--- a/src/transport/gnunet-service-transport_blacklist.c
+++ b/src/transport/gnunet-service-transport_blacklist.c
@@ -648,7 +648,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client,
648 bl->waiting_for_reply = GNUNET_NO; 648 bl->waiting_for_reply = GNUNET_NO;
649 if (NULL != bc) 649 if (NULL != bc)
650 { 650 {
651 /* only run this if the blacklist check has not been 651 /* only run this if the blacklist check has not been
652 * cancelled in the meantime... */ 652 * cancelled in the meantime... */
653 if (ntohl (msg->is_allowed) == GNUNET_SYSERR) 653 if (ntohl (msg->is_allowed) == GNUNET_SYSERR)
654 { 654 {
@@ -683,7 +683,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client,
683 683
684/** 684/**
685 * Add the given peer to the blacklist (for the given transport). 685 * Add the given peer to the blacklist (for the given transport).
686 * 686 *
687 * @param peer peer to blacklist 687 * @param peer peer to blacklist
688 * @param transport_name transport to blacklist for this peer, NULL for all 688 * @param transport_name transport to blacklist for this peer, NULL for all
689 */ 689 */
@@ -780,7 +780,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
780 780
781/** 781/**
782 * Cancel a blacklist check. 782 * Cancel a blacklist check.
783 * 783 *
784 * @param bc check to cancel 784 * @param bc check to cancel
785 */ 785 */
786void 786void
diff --git a/src/transport/gnunet-service-transport_blacklist.h b/src/transport/gnunet-service-transport_blacklist.h
index 64a800664..68da7e4ce 100644
--- a/src/transport/gnunet-service-transport_blacklist.h
+++ b/src/transport/gnunet-service-transport_blacklist.h
@@ -71,7 +71,7 @@ GST_blacklist_handle_reply (void *cls, struct GNUNET_SERVER_Client *client,
71 71
72/** 72/**
73 * Add the given peer to the blacklist (for the given transport). 73 * Add the given peer to the blacklist (for the given transport).
74 * 74 *
75 * @param peer peer to blacklist 75 * @param peer peer to blacklist
76 * @param transport_name transport to blacklist for this peer, NULL for all 76 * @param transport_name transport to blacklist for this peer, NULL for all
77 */ 77 */
@@ -117,7 +117,7 @@ GST_blacklist_test_allowed (const struct GNUNET_PeerIdentity *peer,
117 117
118/** 118/**
119 * Cancel a blacklist check. 119 * Cancel a blacklist check.
120 * 120 *
121 * @param bc check to cancel 121 * @param bc check to cancel
122 */ 122 */
123void 123void
diff --git a/src/transport/gnunet-service-transport_clients.c b/src/transport/gnunet-service-transport_clients.c
index 73d1220e4..6a29edc34 100644
--- a/src/transport/gnunet-service-transport_clients.c
+++ b/src/transport/gnunet-service-transport_clients.c
@@ -377,8 +377,7 @@ clients_handle_start (void *cls, struct GNUNET_SERVER_Client *client,
377#if DEBUG_TRANSPORT 377#if DEBUG_TRANSPORT
378 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK, 378 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG | GNUNET_ERROR_TYPE_BULK,
379 "TransportClient %X ServerClient %X sent multiple START messages\n", 379 "TransportClient %X ServerClient %X sent multiple START messages\n",
380 tc, 380 tc, tc->client);
381 tc->client);
382#endif 381#endif
383 GNUNET_break (0); 382 GNUNET_break (0);
384 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 383 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index 3c51c5df2..2793ce5eb 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -128,7 +128,7 @@ struct GeneratorContext
128 128
129/** 129/**
130 * Add an address from the 'OwnAddressList' to the buffer. 130 * Add an address from the 'OwnAddressList' to the buffer.
131 * 131 *
132 * @param cls the 'struct GeneratorContext' 132 * @param cls the 'struct GeneratorContext'
133 * @param max maximum number of bytes left 133 * @param max maximum number of bytes left
134 * @param buf where to write the address 134 * @param buf where to write the address
diff --git a/src/transport/gnunet-service-transport_neighbours.c b/src/transport/gnunet-service-transport_neighbours.c
index 76e27bf2e..d971e7cf9 100644
--- a/src/transport/gnunet-service-transport_neighbours.c
+++ b/src/transport/gnunet-service-transport_neighbours.c
@@ -47,7 +47,7 @@
47 47
48 48
49/** 49/**
50 * Entry in neighbours. 50 * Entry in neighbours.
51 */ 51 */
52struct NeighbourMapEntry; 52struct NeighbourMapEntry;
53 53
@@ -105,7 +105,7 @@ struct MessageQueue
105 105
106 106
107/** 107/**
108 * Entry in neighbours. 108 * Entry in neighbours.
109 */ 109 */
110struct NeighbourMapEntry 110struct NeighbourMapEntry
111{ 111{
@@ -171,7 +171,7 @@ struct NeighbourMapEntry
171 171
172 /** 172 /**
173 * ID of task scheduled to run when we should try transmitting 173 * ID of task scheduled to run when we should try transmitting
174 * the head of the message queue. 174 * the head of the message queue.
175 */ 175 */
176 GNUNET_SCHEDULER_TaskIdentifier transmission_task; 176 GNUNET_SCHEDULER_TaskIdentifier transmission_task;
177 177
@@ -622,7 +622,7 @@ GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target)
622 622
623/** 623/**
624 * Test if we're connected to the given peer. 624 * Test if we're connected to the given peer.
625 * 625 *
626 * @param target peer to test 626 * @param target peer to test
627 * @return GNUNET_YES if we are connected, GNUNET_NO if not 627 * @return GNUNET_YES if we are connected, GNUNET_NO if not
628 */ 628 */
@@ -839,7 +839,7 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour)
839 * Change the incoming quota for the given peer. 839 * Change the incoming quota for the given peer.
840 * 840 *
841 * @param neighbour identity of peer to change qutoa for 841 * @param neighbour identity of peer to change qutoa for
842 * @param quota new quota 842 * @param quota new quota
843 */ 843 */
844void 844void
845GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, 845GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour,
@@ -912,7 +912,7 @@ neighbours_iterate (void *cls, const GNUNET_HashCode * key, void *value)
912/** 912/**
913 * Iterate over all connected neighbours. 913 * Iterate over all connected neighbours.
914 * 914 *
915 * @param cb function to call 915 * @param cb function to call
916 * @param cb_cls closure for cb 916 * @param cb_cls closure for cb
917 */ 917 */
918void 918void
diff --git a/src/transport/gnunet-service-transport_neighbours.h b/src/transport/gnunet-service-transport_neighbours.h
index db29d66aa..d7b234889 100644
--- a/src/transport/gnunet-service-transport_neighbours.h
+++ b/src/transport/gnunet-service-transport_neighbours.h
@@ -66,7 +66,7 @@ GST_neighbours_try_connect (const struct GNUNET_PeerIdentity *target);
66 66
67/** 67/**
68 * Test if we're connected to the given peer. 68 * Test if we're connected to the given peer.
69 * 69 *
70 * @param target peer to test 70 * @param target peer to test
71 * @return GNUNET_YES if we are connected, GNUNET_NO if not 71 * @return GNUNET_YES if we are connected, GNUNET_NO if not
72 */ 72 */
@@ -129,7 +129,7 @@ GST_neighbours_keepalive (const struct GNUNET_PeerIdentity *neighbour);
129 * Change the incoming quota for the given peer. 129 * Change the incoming quota for the given peer.
130 * 130 *
131 * @param neighbour identity of peer to change qutoa for 131 * @param neighbour identity of peer to change qutoa for
132 * @param quota new quota 132 * @param quota new quota
133 */ 133 */
134void 134void
135GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour, 135GST_neighbours_set_incoming_quota (const struct GNUNET_PeerIdentity *neighbour,
@@ -164,7 +164,7 @@ typedef void (*GST_NeighbourIterator) (void *cls,
164/** 164/**
165 * Iterate over all connected neighbours. 165 * Iterate over all connected neighbours.
166 * 166 *
167 * @param cb function to call 167 * @param cb function to call
168 * @param cb_cls closure for cb 168 * @param cb_cls closure for cb
169 */ 169 */
170void 170void
diff --git a/src/transport/gnunet-service-transport_plugins.c b/src/transport/gnunet-service-transport_plugins.c
index c32ac3acc..12ee231c4 100644
--- a/src/transport/gnunet-service-transport_plugins.c
+++ b/src/transport/gnunet-service-transport_plugins.c
@@ -189,7 +189,7 @@ GST_plugins_find (const char *name)
189/** 189/**
190 * Convert a given address to a human-readable format. Note that the 190 * Convert a given address to a human-readable format. Note that the
191 * return value will be overwritten on the next call to this function. 191 * return value will be overwritten on the next call to this function.
192 * 192 *
193 * @param name plugin name 193 * @param name plugin name
194 * @param addr binary address in plugin-specific format 194 * @param addr binary address in plugin-specific format
195 * @param addrlen number of bytes in 'addr' 195 * @param addrlen number of bytes in 'addr'
diff --git a/src/transport/gnunet-service-transport_plugins.h b/src/transport/gnunet-service-transport_plugins.h
index 856b594cd..3a49f004f 100644
--- a/src/transport/gnunet-service-transport_plugins.h
+++ b/src/transport/gnunet-service-transport_plugins.h
@@ -68,7 +68,7 @@ GST_plugins_find (const char *name);
68/** 68/**
69 * Convert a given address to a human-readable format. Note that the 69 * Convert a given address to a human-readable format. Note that the
70 * return value will be overwritten on the next call to this function. 70 * return value will be overwritten on the next call to this function.
71 * 71 *
72 * @param name plugin name 72 * @param name plugin name
73 * @param addr binary address in plugin-specific format 73 * @param addr binary address in plugin-specific format
74 * @param addrlen number of bytes in 'addr' 74 * @param addrlen number of bytes in 'addr'
diff --git a/src/transport/gnunet-service-transport_validation.c b/src/transport/gnunet-service-transport_validation.c
index c6ee515fe..8b652ceaa 100644
--- a/src/transport/gnunet-service-transport_validation.c
+++ b/src/transport/gnunet-service-transport_validation.c
@@ -409,7 +409,7 @@ add_valid_address (void *cls, const char *tname,
409 409
410 410
411/** 411/**
412 * Function called for any HELLO known to PEERINFO. 412 * Function called for any HELLO known to PEERINFO.
413 * 413 *
414 * @param cls unused 414 * @param cls unused
415 * @param peer id of the peer, NULL for last call 415 * @param peer id of the peer, NULL for last call
@@ -737,7 +737,8 @@ transmit_ping_if_allowed (void *cls, const struct GNUNET_PeerIdentity *pid,
737 hsize = ntohs (hello->size); 737 hsize = ntohs (hello->size);
738 tsize = sizeof (struct TransportPingMessage) + ve->addrlen + slen + hsize; 738 tsize = sizeof (struct TransportPingMessage) + ve->addrlen + slen + hsize;
739 739
740 ping.header.size = htons (sizeof (struct TransportPingMessage) + ve->addrlen + slen); 740 ping.header.size =
741 htons (sizeof (struct TransportPingMessage) + ve->addrlen + slen);
741 ping.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PING); 742 ping.header.type = htons (GNUNET_MESSAGE_TYPE_TRANSPORT_PING);
742 ping.challenge = htonl (ve->challenge); 743 ping.challenge = htonl (ve->challenge);
743 ping.target = *pid; 744 ping.target = *pid;
diff --git a/src/transport/gnunet-transport-wlan-helper.c b/src/transport/gnunet-transport-wlan-helper.c
index 3fca1f85f..ad6810233 100644
--- a/src/transport/gnunet-transport-wlan-helper.c
+++ b/src/transport/gnunet-transport-wlan-helper.c
@@ -611,7 +611,7 @@ stdin_send_hw (void *cls, void *client, const struct GNUNET_MessageHeader *hdr)
611 rtheader.rate = header->rate; 611 rtheader.rate = header->rate;
612 memcpy (write_pout->buf, &rtheader, sizeof (rtheader)); 612 memcpy (write_pout->buf, &rtheader, sizeof (rtheader));
613 memcpy (write_pout->buf + sizeof (rtheader), &header[1], sendsize); 613 memcpy (write_pout->buf + sizeof (rtheader), &header[1], sendsize);
614 /* payload contains MAC address, but we don't trust it, so we'll 614 /* payload contains MAC address, but we don't trust it, so we'll
615 * overwrite it with OUR MAC address again to prevent mischief */ 615 * overwrite it with OUR MAC address again to prevent mischief */
616 wlanheader = (struct ieee80211_frame *) (write_pout->buf + sizeof (rtheader)); 616 wlanheader = (struct ieee80211_frame *) (write_pout->buf + sizeof (rtheader));
617 mac_set (wlanheader, dev); 617 mac_set (wlanheader, dev);
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index d6084d9f0..452f55e1a 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -385,7 +385,7 @@ struct Plugin
385 385
386/** 386/**
387 * Function to check if an inbound connection is acceptable. 387 * Function to check if an inbound connection is acceptable.
388 * Mostly used to limit the total number of open connections 388 * Mostly used to limit the total number of open connections
389 * we can have. 389 * we can have.
390 * 390 *
391 * @param cls the 'struct Plugin' 391 * @param cls the 'struct Plugin'
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index 07a3df362..92fa8d2f5 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -170,7 +170,7 @@ struct PeerSession
170 170
171/** 171/**
172 * Data structure to track defragmentation contexts based 172 * Data structure to track defragmentation contexts based
173 * on the source of the UDP traffic. 173 * on the source of the UDP traffic.
174 */ 174 */
175struct ReceiveContext 175struct ReceiveContext
176{ 176{
@@ -272,7 +272,7 @@ struct Plugin
272 struct GNUNET_NETWORK_Handle *sockv6; 272 struct GNUNET_NETWORK_Handle *sockv6;
273 273
274 /** 274 /**
275 * expected delay for ACKs 275 * expected delay for ACKs
276 */ 276 */
277 struct GNUNET_TIME_Relative last_expected_delay; 277 struct GNUNET_TIME_Relative last_expected_delay;
278 278
@@ -557,7 +557,7 @@ struct SourceInformation
557 557
558 558
559/** 559/**
560 * Message tokenizer has broken up an incomming message. Pass it on 560 * Message tokenizer has broken up an incomming message. Pass it on
561 * to the service. 561 * to the service.
562 * 562 *
563 * @param cls the 'struct Plugin' 563 * @param cls the 'struct Plugin'
@@ -588,7 +588,7 @@ process_inbound_tokenized_messages (void *cls, void *client,
588 * 588 *
589 * @param plugin plugin context 589 * @param plugin plugin context
590 * @param msg the message 590 * @param msg the message
591 * @param sender_addr sender address 591 * @param sender_addr sender address
592 * @param sender_addr_len number of bytes in sender_addr 592 * @param sender_addr_len number of bytes in sender_addr
593 */ 593 */
594static void 594static void
diff --git a/src/transport/test_transport_api.c b/src/transport/test_transport_api.c
index 303709136..29b465845 100644
--- a/src/transport/test_transport_api.c
+++ b/src/transport/test_transport_api.c
@@ -109,8 +109,8 @@ end_badly (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
109 if (send_task != GNUNET_SCHEDULER_NO_TASK) 109 if (send_task != GNUNET_SCHEDULER_NO_TASK)
110 GNUNET_SCHEDULER_cancel (send_task); 110 GNUNET_SCHEDULER_cancel (send_task);
111 111
112 if (cc != NULL) 112 if (cc != NULL)
113 GNUNET_TRANSPORT_TESTING_connect_peers_cancel(cc); 113 GNUNET_TRANSPORT_TESTING_connect_peers_cancel (cc);
114 114
115 if (th != NULL) 115 if (th != NULL)
116 GNUNET_TRANSPORT_notify_transmit_ready_cancel (th); 116 GNUNET_TRANSPORT_notify_transmit_ready_cancel (th);
@@ -229,7 +229,8 @@ run (void *cls, char *const *args, const char *cfgfile,
229 p2 = GNUNET_TRANSPORT_TESTING_start_peer (cfg_file_p2, &notify_receive, 229 p2 = GNUNET_TRANSPORT_TESTING_start_peer (cfg_file_p2, &notify_receive,
230 &notify_connect, &notify_disconnect, 230 &notify_connect, &notify_disconnect,
231 NULL); 231 NULL);
232 cc = GNUNET_TRANSPORT_TESTING_connect_peers (p1, p2, &testing_connect_cb, NULL); 232 cc = GNUNET_TRANSPORT_TESTING_connect_peers (p1, p2, &testing_connect_cb,
233 NULL);
233} 234}
234 235
235static int 236static int
diff --git a/src/transport/test_transport_startonly.c b/src/transport/test_transport_startonly.c
index 35c9e546b..075c10527 100644
--- a/src/transport/test_transport_startonly.c
+++ b/src/transport/test_transport_startonly.c
@@ -119,11 +119,10 @@ static void
119run (void *cls, char *const *args, const char *cfgfile, 119run (void *cls, char *const *args, const char *cfgfile,
120 const struct GNUNET_CONFIGURATION_Handle *cfg) 120 const struct GNUNET_CONFIGURATION_Handle *cfg)
121{ 121{
122 timeout_task = 122 timeout_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL);
123 GNUNET_SCHEDULER_add_delayed (TIMEOUT, &end_badly, NULL);
124 123
125 i = 1; 124 i = 1;
126 fprintf(stderr,"%i",i); 125 fprintf (stderr, "%i", i);
127 while (i <= ITERATIONS) 126 while (i <= ITERATIONS)
128 { 127 {
129 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting peer\n"); 128 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Starting peer\n");
@@ -142,14 +141,14 @@ run (void *cls, char *const *args, const char *cfgfile,
142 141
143 //sleep (5); 142 //sleep (5);
144 143
145 GNUNET_TRANSPORT_TESTING_stop_peer(p1); 144 GNUNET_TRANSPORT_TESTING_stop_peer (p1);
146 145
147 i++; 146 i++;
148 if (i <= ITERATIONS) 147 if (i <= ITERATIONS)
149 fprintf(stderr,"..%i",i); 148 fprintf (stderr, "..%i", i);
150 } 149 }
151 fprintf(stderr,"\n"); 150 fprintf (stderr, "\n");
152 end(); 151 end ();
153} 152}
154 153
155int 154int
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 61c392d77..162024eb4 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -321,10 +321,11 @@ GNUNET_TRANSPORT_TESTING_connect_peers (struct PeerContext *p1,
321 * Tou MUST cancel the request if you stop the peers before the peers connected succesfully 321 * Tou MUST cancel the request if you stop the peers before the peers connected succesfully
322 * @param cc a connect request handle 322 * @param cc a connect request handle
323 */ 323 */
324void 324void GNUNET_TRANSPORT_TESTING_connect_peers_cancel
325GNUNET_TRANSPORT_TESTING_connect_peers_cancel (GNUNET_TRANSPORT_TESTING_ConnectRequest ccr) 325 (GNUNET_TRANSPORT_TESTING_ConnectRequest ccr)
326{ 326{
327 struct ConnectingContext *cc = ccr; 327 struct ConnectingContext *cc = ccr;
328
328 /* clean up */ 329 /* clean up */
329 GNUNET_TRANSPORT_get_hello_cancel (cc->th_p2, &exchange_hello_last, cc); 330 GNUNET_TRANSPORT_get_hello_cancel (cc->th_p2, &exchange_hello_last, cc);
330 GNUNET_TRANSPORT_get_hello_cancel (cc->th_p1, &exchange_hello, cc); 331 GNUNET_TRANSPORT_get_hello_cancel (cc->th_p1, &exchange_hello, cc);
diff --git a/src/transport/transport_api.c b/src/transport/transport_api.c
index fed611e49..a6d2fa0ba 100644
--- a/src/transport/transport_api.c
+++ b/src/transport/transport_api.c
@@ -86,7 +86,7 @@ struct GNUNET_TRANSPORT_TransmitHandle
86 struct GNUNET_TIME_Absolute timeout; 86 struct GNUNET_TIME_Absolute timeout;
87 87
88 /** 88 /**
89 * Task to trigger request timeout if the request is stalled due to 89 * Task to trigger request timeout if the request is stalled due to
90 * congestion. 90 * congestion.
91 */ 91 */
92 GNUNET_SCHEDULER_TaskIdentifier timeout_task; 92 GNUNET_SCHEDULER_TaskIdentifier timeout_task;
@@ -520,7 +520,7 @@ demultiplexer (void *cls, const struct GNUNET_MessageHeader *msg)
520 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != n->th->timeout_task); 520 GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != n->th->timeout_task);
521 GNUNET_SCHEDULER_cancel (n->th->timeout_task); 521 GNUNET_SCHEDULER_cancel (n->th->timeout_task);
522 n->th->timeout_task = GNUNET_SCHEDULER_NO_TASK; 522 n->th->timeout_task = GNUNET_SCHEDULER_NO_TASK;
523 /* we've been waiting for this (congestion, not quota, 523 /* we've been waiting for this (congestion, not quota,
524 * caused delayed transmission) */ 524 * caused delayed transmission) */
525 n->hn = GNUNET_CONTAINER_heap_insert (h->ready_heap, n, 0); 525 n->hn = GNUNET_CONTAINER_heap_insert (h->ready_heap, n, 0);
526 schedule_transmission (h); 526 schedule_transmission (h);
@@ -1082,7 +1082,7 @@ send_try_connect (void *cls, size_t size, void *buf)
1082 1082
1083 1083
1084/** 1084/**
1085 * Ask the transport service to establish a connection to 1085 * Ask the transport service to establish a connection to
1086 * the given peer. 1086 * the given peer.
1087 * 1087 *
1088 * @param handle connection to transport service 1088 * @param handle connection to transport service
diff --git a/src/transport/wlan/byteorder.h b/src/transport/wlan/byteorder.h
index 1abc631b8..1a13470e9 100644
--- a/src/transport/wlan/byteorder.h
+++ b/src/transport/wlan/byteorder.h
@@ -54,12 +54,12 @@
54 54
55#ifndef __int8_t_defined 55#ifndef __int8_t_defined
56typedef uint64_t u_int64_t; 56typedef uint64_t u_int64_t;
57 typedef uint32_t u_int32_t; 57typedef uint32_t u_int32_t;
58 typedef uint16_t u_int16_t; 58typedef uint16_t u_int16_t;
59 typedef uint8_t u_int8_t; 59typedef uint8_t u_int8_t;
60 60
61 61
62#endif /* */ 62#endif /* */
63 63
64#ifndef htole16 64#ifndef htole16
65#if __BYTE_ORDER == __LITTLE_ENDIAN 65#if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -77,7 +77,7 @@ typedef uint64_t u_int64_t;
77#define htole64(x) (x) 77#define htole64(x) (x)
78#define be64toh(x) ___my_swab64 (x) 78#define be64toh(x) ___my_swab64 (x)
79#define le64toh(x) (x) 79#define le64toh(x) (x)
80#else /* */ 80#else /* */
81#define htobe16(x) (x) 81#define htobe16(x) (x)
82#define htole16(x) ___my_swab16 (x) 82#define htole16(x) ___my_swab16 (x)
83#define be16toh(x) (x) 83#define be16toh(x) (x)
@@ -92,10 +92,10 @@ typedef uint64_t u_int64_t;
92#define htole64(x) ___my_swab64 (x) 92#define htole64(x) ___my_swab64 (x)
93#define be64toh(x) (x) 93#define be64toh(x) (x)
94#define le64toh(x) ___my_swab64 (x) 94#define le64toh(x) ___my_swab64 (x)
95#endif /* */ 95#endif /* */
96#endif /* */ 96#endif /* */
97 97
98#endif /* */ 98#endif /* */
99 /* 99 /*
100 * Cygwin 100 * Cygwin
101 */ 101 */
@@ -115,7 +115,7 @@ typedef uint64_t u_int64_t;
115#define __cpu_to_le32(x) (x) 115#define __cpu_to_le32(x) (x)
116#define __cpu_to_le16(x) (x) 116#define __cpu_to_le16(x) (x)
117#define AIRCRACK_NG_BYTE_ORDER_DEFINED 117#define AIRCRACK_NG_BYTE_ORDER_DEFINED
118#endif /* */ 118#endif /* */
119 /* 119 /*
120 * Windows (DDK) 120 * Windows (DDK)
121 */ 121 */
@@ -134,7 +134,7 @@ typedef uint64_t u_int64_t;
134#define __cpu_to_le32(x) (x) 134#define __cpu_to_le32(x) (x)
135#define __cpu_to_le16(x) (x) 135#define __cpu_to_le16(x) (x)
136#define AIRCRACK_NG_BYTE_ORDER_DEFINED 136#define AIRCRACK_NG_BYTE_ORDER_DEFINED
137#endif /* */ 137#endif /* */
138 /* 138 /*
139 * MAC (Darwin) 139 * MAC (Darwin)
140 */ 140 */
@@ -156,7 +156,7 @@ typedef uint64_t u_int64_t;
156#define __cpu_to_le64(x) (unsigned long long) OSSwapHostToLittleInt64((uint64_t)x) 156#define __cpu_to_le64(x) (unsigned long long) OSSwapHostToLittleInt64((uint64_t)x)
157#define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x) 157#define __cpu_to_le32(x) (unsigned long) OSSwapHostToLittleInt32((uint32_t)x)
158#define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x) 158#define __cpu_to_le16(x) (unsigned short) OSSwapHostToLittleInt16((uint16_t)x)
159#else /* */ 159#else /* */
160#include <architecture/byte_order.h> 160#include <architecture/byte_order.h>
161#define __swab64(x) NXSwapLongLong(x) 161#define __swab64(x) NXSwapLongLong(x)
162#define __swab32(x) NXSwapLong(x) 162#define __swab32(x) NXSwapLong(x)
@@ -173,13 +173,13 @@ typedef uint64_t u_int64_t;
173#define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x) 173#define __cpu_to_le64(x) NXSwapHostLongLongToLittle(x)
174#define __cpu_to_le32(x) NXSwapHostLongToLittle(x) 174#define __cpu_to_le32(x) NXSwapHostLongToLittle(x)
175#define __cpu_to_le16(x) NXSwapHostShortToLittle(x) 175#define __cpu_to_le16(x) NXSwapHostShortToLittle(x)
176#endif /* */ 176#endif /* */
177#define __LITTLE_ENDIAN 1234 177#define __LITTLE_ENDIAN 1234
178#define __BIG_ENDIAN 4321 178#define __BIG_ENDIAN 4321
179#define __PDP_ENDIAN 3412 179#define __PDP_ENDIAN 3412
180#define __BYTE_ORDER __BIG_ENDIAN 180#define __BYTE_ORDER __BIG_ENDIAN
181#define AIRCRACK_NG_BYTE_ORDER_DEFINED 181#define AIRCRACK_NG_BYTE_ORDER_DEFINED
182#endif /* */ 182#endif /* */
183 /* 183 /*
184 * Solaris 184 * Solaris
185 * ------- 185 * -------
@@ -200,14 +200,14 @@ typedef uint64_t u_int64_t;
200#define __cpu_to_le64(x) ___my_swab64(x) 200#define __cpu_to_le64(x) ___my_swab64(x)
201#define __cpu_to_le32(x) ___my_swab32(x) 201#define __cpu_to_le32(x) ___my_swab32(x)
202#define __cpu_to_le16(x) ___my_swab16(x) 202#define __cpu_to_le16(x) ___my_swab16(x)
203 typedef uint64_t u_int64_t; 203typedef uint64_t u_int64_t;
204 typedef uint32_t u_int32_t; 204typedef uint32_t u_int32_t;
205 typedef uint16_t u_int16_t; 205typedef uint16_t u_int16_t;
206 typedef uint8_t u_int8_t; 206typedef uint8_t u_int8_t;
207 207
208 208
209#define AIRCRACK_NG_BYTE_ORDER_DEFINED 209#define AIRCRACK_NG_BYTE_ORDER_DEFINED
210#endif /* */ 210#endif /* */
211 /* 211 /*
212 * Custom stuff 212 * Custom stuff
213 */ 213 */
@@ -216,12 +216,12 @@ typedef uint64_t u_int64_t;
216#define __cpu_to_be64(x) = OSSwapHostToBigInt64(x) 216#define __cpu_to_be64(x) = OSSwapHostToBigInt64(x)
217#define __cpu_to_be32(x) = OSSwapHostToBigInt32(x) 217#define __cpu_to_be32(x) = OSSwapHostToBigInt32(x)
218#define AIRCRACK_NG_BYTE_ORDER_DEFINED 218#define AIRCRACK_NG_BYTE_ORDER_DEFINED
219#endif /* */ 219#endif /* */
220 220
221 // FreeBSD 221 // FreeBSD
222#ifdef __FreeBSD__ 222#ifdef __FreeBSD__
223#include <machine/endian.h> 223#include <machine/endian.h>
224#endif /* */ 224#endif /* */
225 // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...? 225 // XXX: Is there anything to include on OpenBSD/NetBSD/DragonFlyBSD/...?
226 226
227 // XXX: Mac: Check http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h 227 // XXX: Mac: Check http://www.opensource.apple.com/source/CF/CF-476.18/CFByteOrder.h
@@ -233,39 +233,39 @@ typedef uint64_t u_int64_t;
233#define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN 233#define AIRCRACK_NG_LITTLE_ENDIAN __LITTLE_ENDIAN
234#elif defined(_LITTLE_ENDIAN) 234#elif defined(_LITTLE_ENDIAN)
235#define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN 235#define AIRCRACK_NG_LITTLE_ENDIAN _LITTLE_ENDIAN
236#endif /* */ 236#endif /* */
237#if defined(BIG_ENDIAN) 237#if defined(BIG_ENDIAN)
238#define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN 238#define AIRCRACK_NG_BIG_ENDIAN BIG_ENDIAN
239#elif defined(__BIG_ENDIAN) 239#elif defined(__BIG_ENDIAN)
240#define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN 240#define AIRCRACK_NG_BIG_ENDIAN __BIG_ENDIAN
241#elif defined(_BIG_ENDIAN) 241#elif defined(_BIG_ENDIAN)
242#define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN 242#define AIRCRACK_NG_BIG_ENDIAN _BIG_ENDIAN
243#endif /* */ 243#endif /* */
244#if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN) 244#if !defined(AIRCRACK_NG_LITTLE_ENDIAN) && !defined(AIRCRACK_NG_BIG_ENDIAN)
245#error Impossible to determine endianness (Little or Big endian), please contact the author. 245#error Impossible to determine endianness (Little or Big endian), please contact the author.
246#endif /* */ 246#endif /* */
247#if defined(BYTE_ORDER) 247#if defined(BYTE_ORDER)
248#if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) 248#if (BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
249#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN 249#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
250#elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) 250#elif (BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
251#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN 251#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
252#endif /* */ 252#endif /* */
253#elif defined(__BYTE_ORDER) 253#elif defined(__BYTE_ORDER)
254#if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) 254#if (__BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
255#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN 255#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
256#elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) 256#elif (__BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
257#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN 257#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
258#endif /* */ 258#endif /* */
259#elif defined(_BYTE_ORDER) 259#elif defined(_BYTE_ORDER)
260#if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) 260#if (_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
261#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN 261#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_LITTLE_ENDIAN
262#elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) 262#elif (_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
263#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN 263#define AIRCRACK_NG_BYTE_ORDER AIRCRACK_NG_BIG_ENDIAN
264#endif /* */ 264#endif /* */
265#endif /* */ 265#endif /* */
266#ifndef AIRCRACK_NG_BYTE_ORDER 266#ifndef AIRCRACK_NG_BYTE_ORDER
267#error Impossible to determine endianness (Little or Big endian), please contact the author. 267#error Impossible to determine endianness (Little or Big endian), please contact the author.
268#endif /* */ 268#endif /* */
269#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN) 269#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_LITTLE_ENDIAN)
270#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED 270#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
271#define __be64_to_cpu(x) ___my_swab64(x) 271#define __be64_to_cpu(x) ___my_swab64(x)
@@ -280,32 +280,32 @@ typedef uint64_t u_int64_t;
280#define __cpu_to_le64(x) (x) 280#define __cpu_to_le64(x) (x)
281#define __cpu_to_le32(x) (x) 281#define __cpu_to_le32(x) (x)
282#define __cpu_to_le16(x) (x) 282#define __cpu_to_le16(x) (x)
283#endif /* */ 283#endif /* */
284#ifndef htobe16 284#ifndef htobe16
285#define htobe16 ___my_swab16 285#define htobe16 ___my_swab16
286#endif /* */ 286#endif /* */
287#ifndef htobe32 287#ifndef htobe32
288#define htobe32 ___my_swab32 288#define htobe32 ___my_swab32
289#endif /* */ 289#endif /* */
290#ifndef betoh16 290#ifndef betoh16
291#define betoh16 ___my_swab16 291#define betoh16 ___my_swab16
292#endif /* */ 292#endif /* */
293#ifndef betoh32 293#ifndef betoh32
294#define betoh32 ___my_swab32 294#define betoh32 ___my_swab32
295#endif /* */ 295#endif /* */
296#ifndef htole16 296#ifndef htole16
297#define htole16(x) (x) 297#define htole16(x) (x)
298#endif /* */ 298#endif /* */
299#ifndef htole32 299#ifndef htole32
300#define htole32(x) (x) 300#define htole32(x) (x)
301#endif /* */ 301#endif /* */
302#ifndef letoh16 302#ifndef letoh16
303#define letoh16(x) (x) 303#define letoh16(x) (x)
304#endif /* */ 304#endif /* */
305#ifndef letoh32 305#ifndef letoh32
306#define letoh32(x) (x) 306#define letoh32(x) (x)
307#endif /* */ 307#endif /* */
308#endif /* */ 308#endif /* */
309#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN) 309#if (AIRCRACK_NG_BYTE_ORDER == AIRCRACK_NG_BIG_ENDIAN)
310#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED 310#ifndef AIRCRACK_NG_BYTE_ORDER_DEFINED
311#define __be64_to_cpu(x) (x) 311#define __be64_to_cpu(x) (x)
@@ -320,32 +320,32 @@ typedef uint64_t u_int64_t;
320#define __cpu_to_le64(x) ___my_swab64(x) 320#define __cpu_to_le64(x) ___my_swab64(x)
321#define __cpu_to_le32(x) ___my_swab32(x) 321#define __cpu_to_le32(x) ___my_swab32(x)
322#define __cpu_to_le16(x) ___my_swab16(x) 322#define __cpu_to_le16(x) ___my_swab16(x)
323#endif /* */ 323#endif /* */
324#ifndef htobe16 324#ifndef htobe16
325#define htobe16(x) (x) 325#define htobe16(x) (x)
326#endif /* */ 326#endif /* */
327#ifndef htobe32 327#ifndef htobe32
328#define htobe32(x) (x) 328#define htobe32(x) (x)
329#endif /* */ 329#endif /* */
330#ifndef betoh16 330#ifndef betoh16
331#define betoh16(x) (x) 331#define betoh16(x) (x)
332#endif /* */ 332#endif /* */
333#ifndef betoh32 333#ifndef betoh32
334#define betoh32(x) (x) 334#define betoh32(x) (x)
335#endif /* */ 335#endif /* */
336#ifndef htole16 336#ifndef htole16
337#define htole16 ___my_swab16 337#define htole16 ___my_swab16
338#endif /* */ 338#endif /* */
339#ifndef htole32 339#ifndef htole32
340#define htole32 ___my_swab32 340#define htole32 ___my_swab32
341#endif /* */ 341#endif /* */
342#ifndef letoh16 342#ifndef letoh16
343#define letoh16 ___my_swab16 343#define letoh16 ___my_swab16
344#endif /* */ 344#endif /* */
345#ifndef letoh32 345#ifndef letoh32
346#define letoh32 ___my_swab32 346#define letoh32 ___my_swab32
347#endif /* */ 347#endif /* */
348#endif /* */ 348#endif /* */
349 // Common defines 349 // Common defines
350#define cpu_to_le64 __cpu_to_le64 350#define cpu_to_le64 __cpu_to_le64
351#define le64_to_cpu __le64_to_cpu 351#define le64_to_cpu __le64_to_cpu
@@ -361,27 +361,27 @@ typedef uint64_t u_int64_t;
361#define be16_to_cpu __be16_to_cpu 361#define be16_to_cpu __be16_to_cpu
362#ifndef le16toh 362#ifndef le16toh
363#define le16toh le16_to_cpu 363#define le16toh le16_to_cpu
364#endif /* */ 364#endif /* */
365#ifndef be16toh 365#ifndef be16toh
366#define be16toh be16_to_cpu 366#define be16toh be16_to_cpu
367#endif /* */ 367#endif /* */
368#ifndef le32toh 368#ifndef le32toh
369#define le32toh le32_to_cpu 369#define le32toh le32_to_cpu
370#endif /* */ 370#endif /* */
371#ifndef be32toh 371#ifndef be32toh
372#define be32toh be32_to_cpu 372#define be32toh be32_to_cpu
373#endif /* */ 373#endif /* */
374 374
375#ifndef htons 375#ifndef htons
376#define htons be16_to_cpu 376#define htons be16_to_cpu
377#endif /* */ 377#endif /* */
378#ifndef htonl 378#ifndef htonl
379#define htonl cpu_to_be16 379#define htonl cpu_to_be16
380#endif /* */ 380#endif /* */
381#ifndef ntohs 381#ifndef ntohs
382#define ntohs cpu_to_be16 382#define ntohs cpu_to_be16
383#endif /* */ 383#endif /* */
384#ifndef ntohl 384#ifndef ntohl
385#define ntohl cpu_to_be32 385#define ntohl cpu_to_be32
386#endif /* */ 386#endif /* */
387#endif /* */ 387#endif /* */
diff --git a/src/transport/wlan/ieee80211.h b/src/transport/wlan/ieee80211.h
index a952674ca..fd297f4a4 100644
--- a/src/transport/wlan/ieee80211.h
+++ b/src/transport/wlan/ieee80211.h
@@ -646,7 +646,7 @@ enum
646 646
647#define IEEE80211_AID(b) ((b) &~ 0xc000) 647#define IEEE80211_AID(b) ((b) &~ 0xc000)
648 648
649/* 649/*
650 * RTS frame length parameters. The default is specified in 650 * RTS frame length parameters. The default is specified in
651 * the 802.11 spec as 512; we treat it as implementation-dependent 651 * the 802.11 spec as 512; we treat it as implementation-dependent
652 * so it's defined in ieee80211_var.h. The max may be wrong 652 * so it's defined in ieee80211_var.h. The max may be wrong
@@ -655,7 +655,7 @@ enum
655#define IEEE80211_RTS_MIN 1 655#define IEEE80211_RTS_MIN 1
656#define IEEE80211_RTS_MAX 2346 656#define IEEE80211_RTS_MAX 2346
657 657
658/* 658/*
659 * TX fragmentation parameters. As above for RTS, we treat 659 * TX fragmentation parameters. As above for RTS, we treat
660 * default as implementation-dependent so define it elsewhere. 660 * default as implementation-dependent so define it elsewhere.
661 */ 661 */