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

PacketFilter Class Reference
[Network Data Structures]

#include <PacketFilter.h>

Inheritance diagram for PacketFilter:

CompoundPacketFilter ConsecutivePacketFilter SimplePacketFilter List of all members.

Public Member Functions

virtual PacketFilterclone (void) const =0
virtual bool match (const TraceIterator &pkt) const =0
 Match a packet against a packet filter.
virtual bool match (const StreamKey &key) const =0
 Match a StreamKey representing a Trace against a packet filter.
virtual std::string toString (void) const =0

Static Public Member Functions

static PacketFilterparse (const std::string &filterString)

Friends

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

Detailed Description

A packet filter is used to describe a set of packets; e.g. for selecting a subset of packets from an aggregate. Filters are generally based on Ethereal packet filtering syntax.

Filtering is only permitted on intrinsic attributes; that is, attributes that can be computed from the packet itself, devoid of any context. e.g. filtering on frame.time_delta is not currently supported. This is because trying to deal with relative attributes in this architecture will be bloody difficult.

PacketFilter is an abstract (pure virtual) class which defines the interface to its subclasses.

Examples:

profile_streams_thesis.cc, and test_harness.cc.


Member Function Documentation

virtual bool PacketFilter::match const StreamKey key  )  const [pure 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.

Implemented in SimplePacketFilter, CompoundPacketFilter, and ConsecutivePacketFilter.

virtual bool PacketFilter::match const TraceIterator pkt  )  const [pure 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)

Implemented in SimplePacketFilter, CompoundPacketFilter, and ConsecutivePacketFilter.

Examples:
test_harness.cc.

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

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