|
From: <sat...@us...> - 2010-03-05 13:45:19
|
Revision: 228
http://w-meter.svn.sourceforge.net/w-meter/?rev=228&view=rev
Author: sathakselva
Date: 2010-03-05 13:45:13 +0000 (Fri, 05 Mar 2010)
Log Message:
-----------
code cleanup for sniffer.h file
Modified Paths:
--------------
framework/tags/selvam/sniffer.h
Modified: framework/tags/selvam/sniffer.h
===================================================================
--- framework/tags/selvam/sniffer.h 2010-03-05 13:40:15 UTC (rev 227)
+++ framework/tags/selvam/sniffer.h 2010-03-05 13:45:13 UTC (rev 228)
@@ -1,12 +1,11 @@
-
-#define MAX_CAPTURE_SIZE 2346 /* maximum size of packets to capture in bytes */
-#define RADIOTAP_HEADER_SIZE 32 /* Length of radiotap header (in bytes) */
-#define CRC_STATUS_INDEX 16 /* Position in radiotap for the CRC related information */
+#define MAX_CAPTURE_SIZE 2346 /* maximum size of packets to capture in bytes */
+#define RADIOTAP_HEADER_SIZE 32 /* Length of radiotap header (in bytes) */
+#define CRC_STATUS_INDEX 16 /* Position in radiotap for the CRC related information */
#define CRC_PRESENT_MASK 0x10 /* mask to check the presence of CRC in radiotap header */
#define CRC_STATUS_MASK 0x40 /* Mask to check the status of CRC in radiotap header */
-#define FCS_LENGTH 4 /* Length of 802.11 Frame check sequence (FCS) in bytes */
-#define MAC_ADDRESS_LEN 6 /* Length of MAC address in bytes */
+#define FCS_LENGTH 4 /* Length of Frame check sequence (FCS) in bytes */
+#define MAC_ADDRESS_LEN 6 /* Length of MAC address in bytes */
#define PROTOCOL_VERSION_MASK 0x03
#define FRAME_TYPE_MASK 0x0C
@@ -24,7 +23,7 @@
#define FROM_DS_BIT_MASK 0x02
#define TO_DS_BIT_MASK 0x01
-#define AID_MASK 0x3FFF /* For Association ID */
+#define AID_MASK 0x3FFF /* For Association ID */
#define QoS_HEADER_PRESENT_MASK 0x80 /* Mask to check the presence of QoS control field in data frames */
/* Flags that are present in the capability information element */
@@ -187,7 +186,6 @@
#define GET_RATE(x) ((x)&(SUPPORTED_RATE_MASK))
-
enum
{
FALSE =0,
@@ -305,31 +303,36 @@
BlockAck
};
+
+
class WLAN_sniffer
{
private:
- int ssid_start_pos, support_rate_start_pos, channel_start_pos, tim_start_pos, erp_start_pos, extended_rate_pos, challenge_txt_start_pos, ibss_param_start_pos;
+ int ssid_start_pos, support_rate_start_pos, channel_start_pos, tim_start_pos, erp_start_pos, extended_rate_pos, challenge_txt_start_pos, ibss_param_start_pos;
+
public:
WLAN_sniffer();
- void reset_global_variables(void);
void init(char *, pcap_t ** );
- void dissect_wlan(const unsigned char *, int );
void copy_receiver_address (unsigned char * , unsigned char *);
void copy_transmitter_address (unsigned char *, unsigned char *);
void copy_bssid (unsigned char *, unsigned char *, int);
- void remove_radiotap_hdr(const uint8_t *, uint8_t *, int );
- unsigned int check_qos_header_presence(unsigned char *);
- long long int get_timestamp(unsigned char *, int);
+
+ //void copy_mac_address (unsigned char *, unsigned char *, int);
void disp_frame_ctrl_flags(unsigned char *);
void disp_capability_info(unsigned char *, int);
+ void parse_info_element(unsigned char *, int, int);
void copy_ssid(unsigned char *, unsigned char *, int , int);
- int check_challenge_txt_presence(int , int);
void display_rates (unsigned char *, int);
int check_challenge_txt_presence(int , int);
int is_non_erp_present(unsigned char *);
int is_use_protection_set(unsigned char *);
int is_barker_preamble_set(unsigned char *);
- void parse_info_element(unsigned char *, int, int);
-
+ unsigned int check_qos_header_presence(unsigned char *);
+ long long int get_timestamp(unsigned char *, int);
+ void reset_global_variables(void);
+ void remove_radiotap_hdr(const uint8_t *, uint8_t *, int );
+ void copy_challenge_text(unsigned char *, unsigned char *, int , int );
+ void dissect_wlan(const unsigned char *, int );
};
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|