#include <ProtocolParser.h>
Inheritance diagram for ProtocolParser:
Public Member Functions | |
ProtocolParser (const PacketFilter &filter) | |
virtual void | handlePassedPacket (TraceIterator &newPkt)=0 |
virtual void | handlePacket (TraceIterator &newPkt) |
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.
|
checks the packet against the filter and calls handlePassedPacket if it passes or if the filter is NULL Implements PacketListener. |
|
send a packet to the parser to be processed Implements FilteredPacketListener. Implemented in IPv4Demux, IPv4Sessionizer, SingleOutputParser, StreamedOutputParser, SimpleTCPParser, StreamedTCPParser, and StreamedUDPParser. |