beacons recognized, minimal gui working
[my-code/hdw-sniff.git] / parse.h
diff --git a/parse.h b/parse.h
index 31aa94b..3d1d290 100644 (file)
--- a/parse.h
+++ b/parse.h
@@ -60,8 +60,8 @@ typedef struct s_frame1_hdr {
 #define FCTL_ORDER(X) ((X&0x800)>>15)
 
 #define FCTL_TYPE_MGMT 0
-#define FCTL_TYPE_CTRL 1
-#define FCTL_TYPE_DATA 2
+#define FCTL_TYPE_CTRL 2
+#define FCTL_TYPE_DATA 1
 
 #define FCTL_STYPE_ASSOC_REQ 0x0
 #define FCTL_STYPE_ASSOC_RESP 0x1
@@ -103,6 +103,9 @@ typedef struct s_beacon_fb {
   u8 rest; /* go on here ... */
 } __attribute__ ((packed)) t_beacon_fb;
 
+#define CAP_INFO_ESS(X) ((X&0x0001))
+#define CAP_INFO_IBSS(X) ((X&0x0002)>>1)
+#define CAP_INFO_PRIVACY(X) ((X&0x0010)>>4)
 
 /* hdw-sniff stuff */
 
@@ -119,6 +122,7 @@ typedef struct s_sta {
   int count_mgmt;
   int count_ctrl;
   int count_data;
+  char active;
   char key[WEP_MAX_DIGITS];
 } t_sta;