#include <Aggregate.h>
Inheritance diagram for Decomposition:
Public Types | |
typedef std::map< StreamKeyWrapper, Aggregate * >::const_iterator | const_iterator |
Public Member Functions | |
Decomposition (const Decomposition &toCopy) | |
Decomposition * | clone (void) const |
virtual const TraceIterator & | addPacket (const StreamKey &stream, Packet *pkt) |
add a packet to the specified stream | |
virtual std::map< StreamKeyWrapper, Aggregate * >::iterator | addSubstream (const StreamKey &stream, Aggregate *aggr) throw ( DuplicateElementException ) |
Add a substream to the Decomposition. | |
void | expireSubstream (const StreamKey &stream) throw ( ElementNotFoundException ) |
move an active substream to the expired list | |
void | eraseSubstream (const StreamKey &stream) throw ( ElementNotFoundException ) |
erase an active substream | |
bool | addStreamAttrib (const std::string &ident, const Attribute &attrib) |
Add an attribute to the Decomposition that is to be computed on a per-stream basis, as opposed to for the entire Decomposition. | |
bool | addStreamListener (StreamListener &listener) |
add an object listening for stream events | |
uint32_t | callSubstreamListeners (StreamEvent &e) throw ( ListenerConflictException ) |
call entities listening for new substreams to be added | |
std::map< StreamKeyWrapper, Aggregate * >::iterator | activeSubstreamsBegin (void) |
std::map< StreamKeyWrapper, Aggregate * >::const_iterator | activeSubstreamsBegin (void) const |
std::map< StreamKeyWrapper, Aggregate * >::iterator | activeSubstreamsEnd (void) |
std::map< StreamKeyWrapper, Aggregate * >::const_iterator | activeSubstreamsEnd (void) const |
std::map< StreamKeyWrapper, Aggregate * >::iterator | activeSubstreamsFind (const StreamKey &key) |
std::map< StreamKeyWrapper, Aggregate * >::const_iterator | activeSubstreamsFind (const StreamKey &key) const |
std::vector< Aggregate * >::iterator | expiredSubstreamsBegin (void) |
std::vector< Aggregate * >::const_iterator | expiredSubstreamsBegin (void) const |
std::vector< Aggregate * >::iterator | expiredSubstreamsEnd (void) |
std::vector< Aggregate * >::const_iterator | expiredSubstreamsEnd (void) const |
virtual int | getPacketCount (void) const |
Return the number of packets contained within the aggregate. | |
const Attribute & | getAttrib (const std::string &ident) const throw ( UnknownAttributeException ) |
Return a reference to the requested attribute, or throw an exception if the attribute doesn't exist for this aggregate. | |
const StreamKey & | getStreamKey (void) const |
virtual void | addAttrib (const std::string &ident, const Attribute &attrib, uint32_t tier=0) |
Add an attribute to the aggregate. | |
void | addListener (PacketListener &listener) |
void | setParent (Aggregate &p) |
void | setStreamKey (const StreamKey &stream) |
virtual void | handlePacket (TraceIterator &newPkt) |
void | copyFrom (const Aggregate &toCopy) |
void | clear (void) |
Static Public Attributes | |
static const uint32_t | MAX_FOLLOWON_DEPTH = 3 |
Protected Member Functions | |
Decomposition & | operator= (const Decomposition &rhs) |
void | callListeners (TraceIterator &newPkt) |
Protected Attributes | |
std::map< std::string, Attribute * > | attributes |
std::vector< std::vector< Attribute * > > | tiers |
std::map< std::string, Aggregate * > | aggregates |
std::vector< PacketListener * > | listeners |
StreamKey * | streamKey |
Aggregate * | parent |
Static Protected Attributes | |
static const PacketCountAttribute | countAttrib |
A Decomposition is an aggregate of aggregates that are derived from a common Aggregate, subdivided according to some criterion or criteria. For example, a stream of IPv4Packets could be decomposed by ( ip.src, ip.dst ) to give a set of packet streams where each stream corresponds to all packets exchanged between a particular pair of hosts; a stream of such packets could be decomposed by ( ip.proto ), then the ip.proto == 6 stream could be passed through a TCP sessionizer to create a decomposition by ( tcp.src_port, tcp.dst_port, tcp.sessionID ), where each stream is a TCP session. (Note that tcp.sessionID in that example would be a pseudo-attribute generated by the TCP sessionizer to distinguish sessions)
A Decomposition is fairly passive; most of the heavy lifting is done by classes using it.
|
Add an attribute to the aggregate.
|
|
Add a PacketListener for the aggregate
|
|
add a packet to the specified stream
|
|
Add an attribute to the Decomposition that is to be computed on a per-stream basis, as opposed to for the entire Decomposition. Each new stream created as part of the Decomposition will take a copy of the attribute for itself.
|
|
add an object listening for stream events
|
|
Add a substream to the Decomposition. Add a new substream to the Decomposition. It's assumed that the Aggregate being added has already been appropriately configured wrt attributes and listeners.
|
|
Notify any listeners that a packet has been added to the Aggregate.
|
|
erase an active substream
|
|
Return a reference to the requested attribute, or throw an exception if the attribute doesn't exist for this aggregate.
|
|
Return the number of packets contained within the aggregate. The count of packets in an Aggregate can also be accessed via the 'count' attribute - for non-Trace Aggregates, that may be the only reliable way to get it, as this method probably will not be implemented properly.
Reimplemented in Trace. |
|
handler for a new packet Implements PacketListener. |
|
not implemented; provided to avoid implicit definitions and for later implementation |
|
sub-aggregates |
|
attributes |
|
prototype packet count attribute - a clone will be added by individual aggregates |
|
ProtocolParsers listening for new packets |
|
Aggregate containing this one, if any |
|
Key indicating to which stream this Trace belongs, if applicable |
|
tiers for prioritizing attributes
|