Base clase for PHY header widgets (e.g. More...
#include <wscout_gui_phy_header.hh>
Public Types | |
enum | { default_spacing = 16 } |
enum | { protocol = Proto } |
typedef std::pair < protocol::id, const void * > | next_header |
typedef wpl::pcap::indexed_file::packet | packet |
enum | { header_margin = 2 } |
Public Member Functions | |
PHYHeader (const QString &proto, QWidget *parent=0) | |
virtual next_header | setup (const void *bytes, size_t caplen, const Trace &trace, const packet &desc)=0 |
QBoxLayout * | layout () |
Static Public Member Functions | |
static AbstractHeader * | allocator () |
static void | registerProtocol () |
Protected Member Functions | |
void | setTruncated (bool trunc=true) |
void | setTime (uint64_t hosttime, uint64_t mactime) |
void | setRate (float rate) |
void | setChannel (unsigned channel) |
void | setSignal (int rssi, int signal, int noise) |
Base clase for PHY header widgets (e.g.
Prism/AVS).
typedef std::pair<protocol::id, const void*> wscout::gui::AbstractHeader::next_header [inherited] |
Identify this header's next header.
The first element specifies the next header's protocol. The second one points to the next header's beginning of data.
If there is no next protocol, use protocol::NONE. If the next protocol is unknown, use protocol::UNKNOWN.
typedef wpl::pcap::indexed_file ::packet wscout::gui::AbstractHeader::packet [inherited] |
Frame descriptor type used by setup().
anonymous enum [inherited] |
anonymous enum |
wscout::gui::PHYHeader< E, P >::PHYHeader | ( | const QString & | proto, | |
QWidget * | parent = 0 | |||
) | [inline] |
Default constructor.
References wscout::gui::PHYHeader< Exact, Proto >::default_spacing, and wscout::gui::HeaderFrame::layout().
AbstractHeader * wscout::gui::HeaderBase< Exact, Proto >::allocator | ( | ) | [inline, static, inherited] |
Allocate an instance of Exact
using new
.
Referenced by wscout::gui::HeaderBase< Exact, Proto >::registerProtocol().
QBoxLayout * wscout::gui::HeaderFrame::layout | ( | ) | [inline, inherited] |
This protocol header widget's layout.
Referenced by wscout::gui::IPv4Header::IPv4Header(), wscout::gui::IPv6Header::IPv6Header(), wscout::gui::LLCHeader::LLCHeader(), wscout::gui::PcapHeader::PcapHeader(), and wscout::gui::PHYHeader< Exact, Proto >::PHYHeader().
void wscout::gui::HeaderBase< Exact, Proto >::registerProtocol | ( | ) | [inline, static, inherited] |
Register allocator() for protocol.
References wscout::gui::HeaderBase< Exact, Proto >::allocator(), and wscout::gui::HeaderBase< Exact, Proto >::protocol.
virtual next_header wscout::gui::AbstractHeader::setup | ( | const void * | bytes, | |
size_t | caplen, | |||
const Trace & | trace, | |||
const packet & | desc | |||
) | [pure virtual, inherited] |
Setup the widget for a specific packet.
This method is purely abstract. You must define it when subclassing.
[in] | packet | Pointer to the packet's begining. |
[in] | caplen | Number of availabe bytes for this packet. |
[in] | trace | Packet's corresponding gui::Trace. |
[in] | desc | Packet's corresponding frame descriptor. |
Implemented in wscout::gui::AVSHeader, wscout::gui::IEEE80211BeaconHeader, wscout::gui::IEEE80211Header, wscout::gui::IPv4Header, wscout::gui::IPv6Header, wscout::gui::LLCHeader, wscout::gui::PcapHeader, and wscout::gui::PrismHeader.
Referenced by wscout::gui::Packet::setup().