aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_wlan.h
diff options
context:
space:
mode:
authorDavid Brodski <david@brodski.eu>2011-03-28 21:52:47 +0000
committerDavid Brodski <david@brodski.eu>2011-03-28 21:52:47 +0000
commit76b1f350c95e6f4e28a0bc9d915f20e354fff1ab (patch)
tree939433ea0a6937ae5326539a62d1ea9e0ebb9597 /src/transport/plugin_transport_wlan.h
parentc31a1ce379ec7ade3225ddda0364cf09a65d1689 (diff)
downloadgnunet-76b1f350c95e6f4e28a0bc9d915f20e354fff1ab.tar.gz
gnunet-76b1f350c95e6f4e28a0bc9d915f20e354fff1ab.zip
First test of wlan driver, sends beacon every 2 seconds
Diffstat (limited to 'src/transport/plugin_transport_wlan.h')
-rw-r--r--src/transport/plugin_transport_wlan.h69
1 files changed, 31 insertions, 38 deletions
diff --git a/src/transport/plugin_transport_wlan.h b/src/transport/plugin_transport_wlan.h
index ac214a07c..2f811809f 100644
--- a/src/transport/plugin_transport_wlan.h
+++ b/src/transport/plugin_transport_wlan.h
@@ -34,7 +34,7 @@
34 34
35struct MacAddress 35struct MacAddress
36{ 36{
37 char mac[6]; 37 u_int8_t mac[6];
38}; 38};
39 39
40struct Wlan_Helper_Control_Message 40struct Wlan_Helper_Control_Message
@@ -67,43 +67,6 @@ static const char mac_bssid[] =
67static const char bc_all_mac[] = 67static const char bc_all_mac[] =
68 { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; 68 { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
69 69
70/**
71 * Wlan header
72 */
73
74struct IeeeHeader
75{
76 /**
77 * Wlan flags
78 */
79 uint16_t frame_control GNUNET_PACKED;
80
81 /**
82 * Duration / ID
83 */
84 uint16_t duration_id GNUNET_PACKED;
85
86 /**
87 * first mac byte 1
88 */
89 struct MacAddress mac1;
90
91
92 /**
93 * second mac
94 */
95 struct MacAddress mac2;
96
97 /**
98 * third mac
99 */
100 struct MacAddress mac3;
101
102 /**
103 * Wlan Sequence Control
104 */
105 uint16_t sequence_control GNUNET_PACKED;
106};
107 70
108/* this is the template radiotap header we send packets out with */ 71/* this is the template radiotap header we send packets out with */
109 72
@@ -121,6 +84,36 @@ static const uint8_t u8aRadiotapHeader[] =
121 0x01, // <-- antenna 84 0x01, // <-- antenna
122}; 85};
123 86
87struct Radiotap_Send
88{
89 /**
90 * wlan send rate
91 */
92 uint8_t rate;
93
94 /**
95 * antenna
96 */
97 uint8_t antenna;
98
99 /**
100 * Transmit power expressed as unitless distance from max power set at factory calibration.
101 * 0 is max power. Monotonically nondecreasing with lower power levels.
102 */
103
104 uint16_t tx_power;
105};
106
107struct rx_info {
108 uint64_t ri_mactime;
109 int32_t ri_power;
110 int32_t ri_noise;
111 uint32_t ri_channel;
112 uint32_t ri_freq;
113 uint32_t ri_rate;
114 uint32_t ri_antenna;
115};
116
124/** 117/**
125 * Radiotap Header 118 * Radiotap Header
126 */ 119 */