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

SimplePacketFilter Class Reference

#include <PacketFilter.h>

Inheritance diagram for SimplePacketFilter:

PacketFilter List of all members.

Public Member Functions

 SimplePacketFilter (const PacketAttribute &attrib, const PacketAttributeValue &val, int comp)
 SimplePacketFilter (const SimplePacketFilter &toCopy)
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.
std::string toString (void) const

Static Public Member Functions

static PacketFilterparse (const std::string &filterString)

Static Public Attributes

static const int EQUAL = 1
static const int LESS = 2
static const int LESS_OR_EQUAL = 3
static const int GREATER = 4
static const int GREATER_OR_EQUAL = 5
static const int NOT_EQUAL = 6
static const int EXISTS = 7

Protected Attributes

PacketAttributeattribute
PacketAttributeValuevalue
int comparison

Friends

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

Detailed Description

Single-criterion packet filter, e.g. "ip.proto == 6"
Examples:

profile_streams_thesis.cc, and test_harness.cc.


Constructor & Destructor Documentation

SimplePacketFilter::SimplePacketFilter const SimplePacketFilter toCopy  ) 
 

parses the given filter string to generate a filter


Member Function Documentation

bool SimplePacketFilter::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 SimplePacketFilter::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

Returns:
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:38 2007 for ANTARES by  doxygen 1.4.2