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

PacketAttribute Class Reference

An attribute of a packet; the available attributes depends on the type of the packet. More...

#include <PacketAttribute.h>

List of all members.

Public Member Functions

 PacketAttribute (const PacketAttribute &toCopy)
 PacketAttribute (const std::string &dom, const std::string &ident)
 PacketAttribute (const std::string &attrib)
virtual PacketAttributeclone (void) const
const std::string & getDomain (void) const
const std::string & getIdent (void) const
virtual std::string toString (void) const

Static Public Attributes

static const std::string GLOBAL

Protected Attributes

std::string domain
std::string identifier


std::ostream & operator<< (std::ostream &os, const PacketAttribute &attrib)

Detailed Description

An attribute of a packet; the available attributes depends on the type of the packet.

Some attributes are universal (e.g. "frame.time"), whereas others are specific to packets of a particular protocol or application (e.g. "ip.src"). Packet attribute names are drawn from Ethereal notation, though there are some notable differences (e.g. only those attributes which refer to a single attribute are supported, so some e.g. "ip.addr" are not).

Examples:, and

Constructor & Destructor Documentation

PacketAttribute::PacketAttribute const std::string &  dom,
const std::string &  ident

Given a domain and identifier, construct the appropriate PacketAttribute object

PacketAttribute::PacketAttribute const std::string &  attrib  ) 

Given an attribute string, parse it and construct the appropriate PacketAttribute object

Member Data Documentation

std::string PacketAttribute::domain [protected]

string indicating the domain of the attribute, e.g. "frame", "ip", "tcp", etc.

std::string PacketAttribute::identifier [protected]

string identifying the attribute itself; an empty string means that the attribute merely specifies that the domain applies; e.g. IPv4Packet should return a value of PacketAttributeValue::TRUE when queried for an attribute of domain "ip" and identifier ""

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