tcpflow  1.6.1
About: tcpflow is a TCP/IP packet demultiplexer that captures data transmitted as part of TCP connections (flows), and stores the data in a way that is convenient for protocol analysis and debugging.
  Fossies Dox: tcpflow-1.6.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Go to the documentation of this file.
4 #include <algorithm>
5 #include <map>
6 #include "wifipcap.h"
8 //#define DEBUG_WIFI
10 class TFCB : public WifipcapCallbacks {
11 private:
13 public:
16  typedef struct mac_ssid {
17  mac_ssid(const MAC &mac_,const std::string &ssid_):mac(mac_),ssid(ssid_){}
18  const MAC mac;
19  const std::string ssid;
20  bool operator<(const struct mac_ssid &b) const{
21  if (mac < b.mac) return true;
22  if (b.mac < mac) return false;
23  return ssid < b.ssid;
24  };
27  typedef struct {
28  bool operator() (const struct mac_ssid &a, const struct mac_ssid &b) const {
29  if (a.mac < b.mac) return true;
30  if (b.mac < a.mac) return false;
31  return a.ssid < b.ssid;
32  }
33  } mac_ssid_lt;
34  typedef std::set<mac_ssid_t,mac_ssid_lt> mac_ssid_set_t;
35  typedef std::map<mac_ssid_t,uint64_t> mac_ssid_map_t;
36  mac_ssid_map_t mac_to_ssid; // mapping of macs to SSIDs
38  static TFCB theTFCB;
41  virtual bool Check80211FCS(const WifiPacket &p) { return opt_check_fcs; }
42  virtual void Handle80211(const WifiPacket &p,u_int16_t fc, const MAC& sa, const MAC& da,
43  const MAC& ra, const MAC& ta, const u_char *ptr, size_t len) ;
45  void HandleLLC(const WifiPacket &p,const struct llc_hdr_t *hdr, const u_char *rest, size_t len) ;
46  void Handle80211MgmtBeacon(const WifiPacket &p,const mgmt_header_t *hdr, const mgmt_body_t *body) ;
47 };
49 #endif
std::set< mac_ssid_t, mac_ssid_lt > mac_ssid_set_t
Definition: datalink_wifi.h:34
std::map< mac_ssid_t, uint64_t > mac_ssid_map_t
Definition: datalink_wifi.h:35
void HandleLLC(const WifiPacket &p, const struct llc_hdr_t *hdr, const u_char *rest, size_t len)
void Handle80211MgmtBeacon(const WifiPacket &p, const mgmt_header_t *hdr, const mgmt_body_t *body)
static TFCB theTFCB
Definition: datalink_wifi.h:38
struct TFCB::mac_ssid mac_ssid_t
bool opt_check_fcs
Definition: datalink_wifi.h:14
virtual void Handle80211(const WifiPacket &p, u_int16_t fc, const MAC &sa, const MAC &da, const MAC &ra, const MAC &ta, const u_char *ptr, size_t len)
virtual bool Check80211FCS(const WifiPacket &p)
Definition: datalink_wifi.h:41
mac_ssid_map_t mac_to_ssid
Definition: datalink_wifi.h:36
Definition: wifipcap.h:118
const MAC mac
Definition: datalink_wifi.h:18
const std::string ssid
Definition: datalink_wifi.h:19
bool operator<(const struct mac_ssid &b) const
Definition: datalink_wifi.h:20
mac_ssid(const MAC &mac_, const std::string &ssid_)
Definition: datalink_wifi.h:17
Definition: llc.h:125