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

CompoundPacketFilter Class Reference

#include <PacketFilter.h>

Inheritance diagram for CompoundPacketFilter:

PacketFilter List of all members.

Public Member Functions

 CompoundPacketFilter (const CompoundPacketFilter &toCopy)
 CompoundPacketFilter (const PacketFilter &l, const PacketFilter &r, int oper)
 CompoundPacketFilter (const PacketFilter &r, int oper)
virtual PacketFilterclone (void) const
virtual bool match (const TraceIterator &pkt) const
 Match a packet against a packet filter.
virtual bool match (const StreamKey &key) const
 Match a StreamKey representing a Trace against a packet filter.
virtual std::string toString (void) const

Static Public Member Functions

static PacketFilterparse (const std::string &filterString)

Static Public Attributes

static const int NOT = 1
static const int MAX_UNARY = 16
static const int AND = 17
static const int OR = 18

Protected Attributes

int op


std::ostream & operator<< (std::ostream &os, const PacketFilter &filter)

Detailed Description

Compound packet filter, e.g. "( ( ip.proto == 6 ) and ( tcp.port == 22 ) ) or ip.proto == 17"
Examples:, and

Constructor & Destructor Documentation

CompoundPacketFilter::CompoundPacketFilter const PacketFilter l,
const PacketFilter r,
int  oper

create a binary CompoundPacketFilter

CompoundPacketFilter::CompoundPacketFilter const PacketFilter r,
int  oper

create a unary CompoundPacketFilter

Member Function Documentation

bool CompoundPacketFilter::match const StreamKey key  )  const [virtual]

Match a StreamKey representing a Trace against a packet filter.

Used to determine if all packets in a Trace are guaranteed to match the filter.

Implements PacketFilter.

bool CompoundPacketFilter::match const TraceIterator pkt  )  const [virtual]

Match a packet against a packet filter.

Match is done against a TraceIterator (a custom iterator defined relative to a Trace) so that the filter has access to relative features (e.g. frame.time_delta)

Implements PacketFilter.

PacketFilter * PacketFilter::parse const std::string &  filterString  )  [static, inherited]

parser to generate packet filters from a filter string

pointer to a new PacketFilter (allocated using new; caller is responsible for deallocating when finished)

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