Main Page | Modules | Class Hierarchy | Class List | Directories | Class Members | Related Pages | Examples

ProtocolParser Class Reference

encapsulates the processing of a packet stream to create another packet stream More...

#include <ProtocolParser.h>

Inheritance diagram for ProtocolParser:

FilteredPacketListener PacketListener SingleOutputParser StreamedOutputParser SimpleTCPParser IPv4Demux IPv4Sessionizer StreamedTCPParser StreamedUDPParser List of all members.

Public Member Functions

 ProtocolParser (const PacketFilter &filter)
virtual void handlePassedPacket (TraceIterator &newPkt)=0
virtual void handlePacket (TraceIterator &newPkt)

Detailed Description

encapsulates the processing of a packet stream to create another packet stream

A ProtocolParser can be one-to-one, one-to-many, many-to-one, or many-to-many in terms of the input and output streams. Note that a one-to-one parser doesn't guarantee one output packet per input packet, it guarantees one output stream per input stream. For example, a ProtocolParser that takes a stream of EthernetPackets and creates IPv4Packets from them would be one-to-one, one that takes a stream of IPv4Packets and decomposes it by src/dst address pair would be one-to-many, one that takes streams of host-paired IPv4Packets and produces host-paired and reassembled IPv4Packets would be many-to-many, and one that takes streams of reassembled host-paired IPv4Packets and produces sessionized TCPPackets would also be many-to-many. The distinction is made by the subclass of ProtocolParser: SingleOutputParser vs StreamedOutputParser.

A ProtocolParser is a subclass of FilteredPacketListener so that it can be added as a listener to an Aggregate.

Don't try to create an 'handlePacket' method in a ProtocolParser - that's a virtual method in FilteredPacketListener that you don't want to override.

Member Function Documentation

void FilteredPacketListener::handlePacket TraceIterator newPkt  )  [virtual, inherited]

checks the packet against the filter and calls handlePassedPacket if it passes or if the filter is NULL

Implements PacketListener.

virtual void ProtocolParser::handlePassedPacket TraceIterator newPkt  )  [pure virtual]

send a packet to the parser to be processed

Implements FilteredPacketListener.

Implemented in IPv4Demux, IPv4Sessionizer, SingleOutputParser, StreamedOutputParser, SimpleTCPParser, StreamedTCPParser, and StreamedUDPParser.

The documentation for this class was generated from the following files:
Generated on Thu Apr 5 01:02:38 2007 for ANTARES by  doxygen 1.4.2