00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef WSCOUT_GUI_IEEE802_11_BEACON_HEADER_HH_
00024 # define WSCOUT_GUI_IEEE802_11_BEACON_HEADER_HH_
00025
00026 # include <QtGui/QLabel>
00027
00028 # include <wipal/wifi/timestamp.hh>
00029
00030 # include "wscout_gui_header_base.hh"
00031
00032 namespace wscout
00033 {
00034
00035 namespace gui
00036 {
00037
00043 struct IEEE80211BeaconHeader:
00044 public HeaderBase<IEEE80211BeaconHeader, protocol::IEEE802_11_BEACON>
00045 {
00047 IEEE80211BeaconHeader(QWidget* parent = 0);
00048
00050 virtual next_header setup(const void* header,
00051 size_t caplen,
00052 const Trace& trace,
00053 const packet& desc);
00054 private:
00055
00056 struct frame_info_element
00057 {
00058 uint8_t id;
00059 uint8_t len;
00060 uint8_t info[];
00061 };
00062
00063 struct frame_body
00064 {
00065 wpl::wifi::timestamp timestamp;
00066 uint16_t beacon_interval;
00067 uint16_t capability;
00068 uint8_t info_elements[];
00069 };
00070
00071 void setupTimestamp(const frame_body& body);
00072 void setupBeaconInterval(const frame_body&, bool s);
00073 void setupCapability(const frame_body&, bool s);
00074
00075 void setupInfoElements(const frame_body& body,
00076 size_t caplen,
00077 bool swap);
00078
00079 const frame_info_element* handleInfoElement(const frame_info_element* e,
00080 bool s);
00081
00082 QLabel ssid;
00083 QLabel capability;
00084 QLabel timestamp;
00085 QLabel beaconInterval;
00086 };
00087
00088 }
00089
00090 }
00091
00092 #endif // ! WSCOUT_GUI_IEEE802_11_BEACON_HEADER_HH_