00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef WIFI_FRAME_STATS_BSS_STATS_HH_
00023 # define WIFI_FRAME_STATS_BSS_STATS_HH_
00024
00025 # include <map>
00026
00027 # include <wipal/wifi/frame/stats/abstract_stats.hh>
00028 # include <wipal/wifi/addr.hh>
00029
00030 namespace wifi
00031 {
00032
00033 namespace frame
00034 {
00035
00036 namespace stats
00037 {
00038
00039 struct bss_stats: public abstract_stats
00040 {
00041 bss_stats();
00042
00043 void account_beacon(const addr& bss, const addr& ap);
00044 std::ostream& print(std::ostream& o) const;
00045
00046 private:
00047 struct single_bss_stats
00048 {
00049 typedef std::map<addr, unsigned> ap_stats;
00050
00051 single_bss_stats();
00052
00053 bool operator < (const single_bss_stats& rhs) const;
00054
00055 unsigned total_;
00056 ap_stats ap_stats_;
00057 };
00058
00059 typedef std::map<wifi::addr, single_bss_stats> internal_stats;
00060
00061 unsigned beacon_count_;
00062 internal_stats bss_stats_;
00063 };
00064
00065 }
00066
00067 }
00068
00069 }
00070
00071 # include "bss_stats.hxx"
00072
00073 #endif // ! WIFI_FRAME_STATS_BSS_STATS_HH_