aboutsummaryrefslogtreecommitdiff
path: root/src/transport/wlan
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/wlan
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/wlan')
-rw-r--r--src/transport/wlan/byteorder.h114
-rw-r--r--src/transport/wlan/ieee80211.h4
2 files changed, 59 insertions, 59 deletions
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 */