- use proper signedness
[oweals/gnunet.git] / src / transport / plugin_transport_wlan.h
index 2b70fc0f5c1686581656309d160fd451d6f9e4ac..c265edcab28c6a82f9c372f96ad1733d23309a9e 100644 (file)
 #ifndef PLUGIN_TRANSPORT_WLAN
 #define PLUGIN_TRANSPORT_WLAN
 
-#include <stdint.h>
+#include "gnunet_crypto_lib.h"
 #include "gnunet_common.h"
 
 /**
  * Number fo bytes in a mac address.
  */
-#define MAC_ADDR_SIZE 6
+#ifdef MINGW
+  #define MAC_ADDR_SIZE 8
+  typedef uint8_t u_int8_t;
+#else
+  #define MAC_ADDR_SIZE 6
+#endif
 
 /**
  * Value for "Management" in the 'frame_control' field of the
- * struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame.  
+ * struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame.
  */
 #define IEEE80211_FC0_TYPE_MGT                  0x00
 
@@ -80,6 +85,29 @@ struct GNUNET_TRANSPORT_WLAN_HelperControlMessage
   struct GNUNET_TRANSPORT_WLAN_MacAddress mac;
 };
 
+/**
+ * generic definitions for IEEE 802.3 frames
+ */
+struct GNUNET_TRANSPORT_WLAN_Ieee8023Frame
+{
+
+  /**
+   * Address 1: destination address in ad-hoc mode or AP, BSSID if station,
+   */
+  struct GNUNET_TRANSPORT_WLAN_MacAddress dst;
+
+  /**
+   * Address 2: source address if in ad-hoc-mode or station, BSSID if AP
+   */
+  struct GNUNET_TRANSPORT_WLAN_MacAddress src;
+
+  /**
+   * Packet type ID.
+   */
+  uint16_t type;
+
+};
+
 
 /**
  * generic definitions for IEEE 802.11 frames