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_DELIMITER_FRAMES_HH_
00023 # define WIFI_FRAME_STATS_DELIMITER_FRAMES_HH_
00024
00025 # include <wipal/wifi/frame/stats/module.hh>
00026
00027 namespace wifi
00028 {
00029
00030 namespace frame
00031 {
00032
00033 namespace stats
00034 {
00035
00036 struct delimiter_frames: public module
00037 {
00038 delimiter_frames(const void* other_modules);
00039
00040 template <class Frame>
00041 void
00042 account_frame(const Frame& frame,
00043 const size_t& len80211,
00044 const type::frame_type& type,
00045 const unsigned& subtype,
00046 const bool& retx,
00047 const addr* const& receiver,
00048 const addr* const& transmitter,
00049 const bool& from_ap);
00050
00051 std::ostream& print(std::ostream& o) const;
00052 void restart();
00053
00054 private:
00055 typedef std::pair<tool::microseconds, struct timeval>
00056 stamp_pair;
00057 typedef boost::optional<stamp_pair> optional_stamp_pair;
00058
00059 static
00060 std::ostream&
00061 print(std::ostream& o,
00062 const std::string& type,
00063 const optional_stamp_pair& value);
00064
00065
00066 optional_stamp_pair earliest_;
00067 optional_stamp_pair latest_;
00068 };
00069
00070 }
00071
00072 }
00073
00074 }
00075
00076 # include "delimiter_frames.hxx"
00077
00078 #endif // ! WIFI_FRAME_STATS_DELIMITER_FRAMES_HH_