summaryrefslogtreecommitdiff
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)
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 @@
struct MacAddress
{
- char mac[6];
+ u_int8_t mac[6];
};
struct Wlan_Helper_Control_Message
@@ -67,43 +67,6 @@ static const char mac_bssid[] =
static const char bc_all_mac[] =
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
-/**
- * Wlan header
- */
-
-struct IeeeHeader
-{
- /**
- * Wlan flags
- */
- uint16_t frame_control GNUNET_PACKED;
-
- /**
- * Duration / ID
- */
- uint16_t duration_id GNUNET_PACKED;
-
- /**
- * first mac byte 1
- */
- struct MacAddress mac1;
-
-
- /**
- * second mac
- */
- struct MacAddress mac2;
-
- /**
- * third mac
- */
- struct MacAddress mac3;
-
- /**
- * Wlan Sequence Control
- */
- uint16_t sequence_control GNUNET_PACKED;
-};
/* this is the template radiotap header we send packets out with */
@@ -121,6 +84,36 @@ static const uint8_t u8aRadiotapHeader[] =
0x01, // <-- antenna
};
+struct Radiotap_Send
+{
+ /**
+ * wlan send rate
+ */
+ uint8_t rate;
+
+ /**
+ * antenna
+ */
+ uint8_t antenna;
+
+ /**
+ * Transmit power expressed as unitless distance from max power set at factory calibration.
+ * 0 is max power. Monotonically nondecreasing with lower power levels.
+ */
+
+ uint16_t tx_power;
+};
+
+struct rx_info {
+ uint64_t ri_mactime;
+ int32_t ri_power;
+ int32_t ri_noise;
+ uint32_t ri_channel;
+ uint32_t ri_freq;
+ uint32_t ri_rate;
+ uint32_t ri_antenna;
+};
+
/**
* Radiotap Header
*/