#include <EthernetPacket.h>
Inheritance diagram for EthernetPacket:
Public Member Functions | |
EthernetPacket (const EthernetPacket &rhs) | |
EthernetPacket (const Timeval &time, uint32_t pktLen, uint32_t capLen, const u_char *data) | |
virtual EthernetPacket * | clone (void) const |
uint32_t | getEthType (void) const |
virtual const PacketAttributeValue & | getAttribLocal (const PacketAttribute &attrib) const throw ( UnknownAttributeException, InsufficientDataException ) |
virtual uint32_t | getPayloadOffset (void) const throw ( InsufficientDataException ) |
Packet * | ghost () |
const Timeval & | getTimestamp (void) const |
get the timestamp of the packet | |
Timeval | getTimeDelta (void) const throw ( UnknownAttributeException ) |
get the difference in timestamps between this packet and the previous one in the packet's context | |
uint32_t | getPacketLength (void) const |
get the length of the packet on the wire | |
uint32_t | getCapturedLength (void) const |
get the number of bytes of the packet captured | |
uint32_t | getDataLength (void) const |
get the number of contiguous bytes of packet data returned by getPacketData | |
const u_char * | getPacketData (void) const |
TraceIterator | getPrevPacket (void) const throw ( IndexOutOfBoundsException ) |
get the next packet in this packet's context | |
TraceIterator | getNextPacket (void) const throw ( IndexOutOfBoundsException ) |
get the previous packet in this packet's context | |
const std::vector< TraceIterator > & | getAncestors (void) const |
get a reference to the ancestors list | |
const std::vector< TraceIterator > & | getDescendants (void) const |
get a reference to the descendants list | |
const TraceIterator & | getContext (void) const |
const PacketAttributeValue & | getAttrib (const PacketAttribute &attrib) const throw ( UnknownAttributeException ) |
get the value of an attribute | |
const PacketAttributeValue & | getAttrib (const PacketAttribute &attrib, int direction) const throw ( UnknownAttributeException, InsufficientDataException ) |
get the value of an attribute | |
virtual std::string | toString (void) const |
u_char | operator[] (int index) const throw ( IndexOutOfBoundsException ) |
TraceIterator & | getRealPacket (void) |
const TraceIterator & | getRealPacket (void) const |
const u_char * | getData (uint32_t offset, uint32_t length) const throw ( IndexOutOfBoundsException ) |
virtual uint32_t | getPayloadLength (void) const throw ( InsufficientDataException ) |
virtual uint32_t | getCapturedPayloadLength (void) const throw ( InsufficientDataException ) |
bool | addAncestor (const TraceIterator &it) throw ( UnseatedPacketUseException ) |
bool | addDescendant (const TraceIterator &it) throw ( UnseatedPacketUseException ) |
void | removeAncestor (const TraceIterator &it) |
void | removeDescendant (const TraceIterator &it) |
void | setContext (const TraceIterator &it) |
bool | setData (const TraceIterator &it, uint32_t offset, uint32_t length) |
bool | setData (const u_char *pktData, uint32_t length) |
Static Public Attributes | |
static const int | ETH_HEADER_LENGTH = 14 |
static const int | ETH_TYPE_OFFSET = 12 |
static const int | ETH_TYPE_LENGTH = 2 |
static const int | ATTRIB_SEARCH_FORWARD = 1 |
static const int | ATTRIB_SEARCH_BACKWARD = 2 |
static const int | ATTRIB_SEARCH_BOTH = 3 |
|
add a reference to an ancestor packet from which this packet was derived
|
|
add a reference to a descendant packet derived from this one
|
|
clone() creates a copy of this packet NOTE: packet relationships are not copied Reimplemented from Packet. |
|
get the value of an attribute If the attribute is not found locally, attempt to obtain it from the packet's ancestors. |
|
get the value of an attribute If the attribute is not found locally, attempt to obtain it from the packet's ancestors.
|
|
WARNING: The return value from getAttrib references a static local variable that will be deleted the next time the function is called! DO NOT expect it to hang around; whatever you need it for, do it quick. Reimplemented from Packet. |
|
return the length of the actual payload part of the packet, i.e. captured packet length less the current layer's header
|
|
get a pointer to the raw data of the packet.
Notes:
|
|
get the previous packet in this packet's context
|
|
return the length of the payload part of the packet, i.e. packet length on the wire less the current layer's header
|
|
return the offset of the payload part of the packet, i.e. less the IPv4 header Reimplemented from Packet. |
|
get the next packet in this packet's context
|
|
Obtain a reference to a TraceIterator over the real Packet represented by this Packet. That may be this packet itself, or it may be another packet if this one is a ghost. |
|
get the difference in timestamps between this packet and the previous one in the packet's context
|
|
ghost() creates a ghost copy of this packet NOTE: Should be const, but cannot be, with the current implementation of ghosting. |
|
the public operator[] does not allow modifications
|
|
remove a specified ancestor from this packet's family tree. Notes:
|
|
remove a specified descendant from this packet's family. Notes:
|
|
set the 'context' of the packet - i.e. where it lives Notes:
|
|
set the data of the packet (i.e. including the header) to the given data; forces a copy. This is the preferred form for reassembled packets. |
|
set the data of the packet (i.e. including the header) to the given substring of another packet. Notes:
|
|
Attribute search is to be performed backwards in the hierarchy - called by a descendant |
|
Attribute search is to be performed both forward and backwards in the hierarchy |
|
Attribute search is to be performed forward in the hierarchy - called by an ancestor |