aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-09-24 08:44:05 +0000
committerChristian Grothoff <christian@grothoff.org>2010-09-24 08:44:05 +0000
commitf5db837f7992ea5276bbee9f74bc3a622dd0e354 (patch)
treed239b2595dda12f814f429a9a2a469d76f9ec8de /src/transport/plugin_transport_wlan.h
parentffc8efb1039f1a96c415ddeec1854aec9d09e896 (diff)
downloadgnunet-f5db837f7992ea5276bbee9f74bc3a622dd0e354.tar.gz
gnunet-f5db837f7992ea5276bbee9f74bc3a622dd0e354.zip
fixing warnings
Diffstat (limited to 'src/transport/plugin_transport_wlan.h')
-rw-r--r--src/transport/plugin_transport_wlan.h188
1 files changed, 94 insertions, 94 deletions
diff --git a/src/transport/plugin_transport_wlan.h b/src/transport/plugin_transport_wlan.h
index c870e4d65..dc30b5ff3 100644
--- a/src/transport/plugin_transport_wlan.h
+++ b/src/transport/plugin_transport_wlan.h
@@ -30,13 +30,14 @@ typedef unsigned int uint32_t;
30typedef unsigned short uint16_t; 30typedef unsigned short uint16_t;
31 31
32/* Wlan IEEE80211 header default */ 32/* Wlan IEEE80211 header default */
33static const uint8_t u8aIeeeHeader[] = { 33static const uint8_t u8aIeeeHeader[] =
34 0x08, 0x01, 0x00, 0x00, 34 {
35 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 35 0x08, 0x01, 0x00, 0x00,
36 0x13, 0x22, 0x33, 0x44, 0x55, 0x66, 36 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
37 0x13, 0x22, 0x33, 0x44, 0x55, 0x66, 37 0x13, 0x22, 0x33, 0x44, 0x55, 0x66,
38 0x10, 0x86, 38 0x13, 0x22, 0x33, 0x44, 0x55, 0x66,
39}; 39 0x10, 0x86,
40 };
40 41
41/** 42/**
42 * Wlan header 43 * Wlan header
@@ -44,103 +45,102 @@ static const uint8_t u8aIeeeHeader[] = {
44 45
45struct IeeeHeader 46struct IeeeHeader
46{ 47{
47 /** 48 /**
48 * Wlan flags 49 * Wlan flags
49 */ 50 */
50 uint8_t flags[4] GNUNET_PACKED; 51 uint32_t flags;
51 52
52 /** 53 /**
53 * first mac 54 * first mac
54 */ 55 */
55 uint8_t mac1[6] GNUNET_PACKED; 56 uint8_t mac1[6];
56 57
57 /** 58 /**
58 * second mac 59 * second mac
59 */ 60 */
60 uint8_t mac2[6] GNUNET_PACKED; 61 uint8_t mac2[6];
61 62
62 /** 63 /**
63 * third mac 64 * third mac
64 */ 65 */
65 uint8_t mac3[6] GNUNET_PACKED; 66 uint8_t mac3[6];
66 67
67 /** 68 /**
68 * Wlan flags2 69 * Wlan flags2
69 */ 70 */
70 uint8_t flags2[2] GNUNET_PACKED; 71 uint16_t flags2;
71}; 72};
72 73
73/* this is the template radiotap header we send packets out with */ 74/* this is the template radiotap header we send packets out with */
74 75
75static const uint8_t u8aRadiotapHeader[] = { 76static const uint8_t u8aRadiotapHeader[] =
76 77 {
77 0x00, 0x00, // <-- radiotap version 78 0x00, 0x00, // <-- radiotap version
78 0x19, 0x00, // <- radiotap header length 79 0x19, 0x00, // <- radiotap header length
79 0x6f, 0x08, 0x00, 0x00, // <-- bitmap 80 0x6f, 0x08, 0x00, 0x00, // <-- bitmap
80 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // <-- timestamp 81 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // <-- timestamp
81 0x00, // <-- flags (Offset +0x10) 82 0x00, // <-- flags (Offset +0x10)
82 0x6c, // <-- rate (0ffset +0x11) 83 0x6c, // <-- rate (0ffset +0x11)
83 0x71, 0x09, 0xc0, 0x00, // <-- channel 84 0x71, 0x09, 0xc0, 0x00, // <-- channel
84 0xde, // <-- antsignal 85 0xde, // <-- antsignal
85 0x00, // <-- antnoise 86 0x00, // <-- antnoise
86 0x01, // <-- antenna 87 0x01, // <-- antenna
87
88}; 88};
89 89
90/** 90/**
91 * Radiotap Header 91 * Radiotap Header
92 */ 92 */
93
94struct RadiotapHeader 93struct RadiotapHeader
95{ 94{
96 /** 95 /**
97 * radiotap version 96 * radiotap version
98 */ 97 */
99 uint8_t version[2] GNUNET_PACKED; 98 uint16_t version GNUNET_PACKED;
100 99
101 /** 100 /**
102 * radiotap header length 101 * radiotap header length
103 */ 102 */
104 uint8_t lenght[2] GNUNET_PACKED; 103 uint16_t length GNUNET_PACKED;
105 104
106 /** 105 /**
107 * bitmap 106 * bitmap
108 */ 107 */
109 uint8_t bitmap[4] GNUNET_PACKED; 108 uint32_t bitmap GNUNET_PACKED;
110 109
111 /** 110 /**
112 * timestamp 111 * timestamp
113 */ 112 */
114 uint8_t timestamp[8] GNUNET_PACKED; 113 uint64_t timestamp GNUNET_PACKED;
115 114
116 /** 115 /**
117 * radiotap flags 116 * radiotap flags
118 */ 117 */
119 uint8_t flags GNUNET_PACKED; 118 uint8_t flags;
120 119
121 /** 120 /**
122 * wlan send rate 121 * wlan send rate
123 */ 122 */
124 uint8_t rate GNUNET_PACKED; 123 uint8_t rate;
125 124
126 /** 125 // FIXME: unaligned here, is this OK?
127 * Wlan channel 126 /**
128 */ 127 * Wlan channel
129 uint8_t channel[4] GNUNET_PACKED; 128 */
130 129 uint32_t channel GNUNET_PACKED;
131 /** 130
132 * antsignal 131 /**
133 */ 132 * antsignal
134 uint8_t antsignal GNUNET_PACKED; 133 */
135 134 uint8_t antsignal;
136 /** 135
137 * antnoise 136 /**
138 */ 137 * antnoise
139 uint8_t antnoise GNUNET_PACKED; 138 */
140 139 uint8_t antnoise;
141 /** 140
142 * antenna 141 /**
143 */ 142 * antenna
144 uint8_t antenna GNUNET_PACKED; 143 */
144 uint8_t antenna;
145}; 145};
146 146