wscout::gui::AbstractHeader Struct Reference

Interface for protocol header widgets. More...

#include <wscout_gui_abstract_header.hh>

Inheritance diagram for wscout::gui::AbstractHeader:

wscout::gui::HeaderBase< ExactIPHeader, Protocol > wscout::gui::HeaderBase< wscout::gui::AVSHeader, Proto > wscout::gui::HeaderBase< wscout::gui::IEEE80211BeaconHeader, protocol::IEEE802_11_BEACON > wscout::gui::HeaderBase< wscout::gui::IEEE80211Header, protocol::IEEE802_11 > wscout::gui::HeaderBase< wscout::gui::IPv4Header, Protocol > wscout::gui::HeaderBase< wscout::gui::IPv6Header, Protocol > wscout::gui::HeaderBase< wscout::gui::LLCHeader, protocol::LLC > wscout::gui::HeaderBase< wscout::gui::PcapHeader, protocol::PCAP > wscout::gui::HeaderBase< wscout::gui::PrismHeader, Proto > wscout::gui::HeaderBase< Exact, Proto >

List of all members.

Public Types

typedef std::pair
< protocol::id, const void * > 
next_header
typedef
pcapxx::frame_descriptor
< pcapxx::descriptor<> > 
frame_descriptor

Public Member Functions

virtual ~AbstractHeader ()
virtual next_header setup (const void *packet, size_t caplen, const Trace &trace, const frame_descriptor &desc)=0


Detailed Description

Interface for protocol header widgets.

WScout models packets as a list of protocol headers. Each header is a Qt Widget that gets embedded inside the packet widget (Packet). In order to have Packet be independent of protocols, each protocol must satisfy a unified interface. AbstractHeader specify this interface.

To implement a new protocol, subclass HeaderBase and implement setup().

See also:
HeaderBase, Packet, HeaderFrame

Member Typedef Documentation

typedef std::pair<protocol::id, const void*> wscout::gui::AbstractHeader::next_header

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.

See also:
protocol::id

typedef pcapxx::frame_descriptor< pcapxx::descriptor<> > wscout::gui::AbstractHeader::frame_descriptor

Frame descriptor type used by setup().


Constructor & Destructor Documentation

wscout::gui::AbstractHeader::~AbstractHeader (  )  [virtual]

Default destructor.


Member Function Documentation

virtual next_header wscout::gui::AbstractHeader::setup ( const void *  packet,
size_t  caplen,
const Trace trace,
const frame_descriptor desc 
) [pure virtual]

Setup the widget for a specific packet.

This method is purely abstract. You must define it when subclassing.

Parameters:
[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.
Returns:
The next header's type and address.
See also:
next_header

Referenced by wscout::gui::Packet::setup().


The documentation for this struct was generated from the following files:

Generated on Thu Jul 31 16:39:09 2008 for WScout by  doxygen 1.5.6