#include <IPv4Packet.h>
Inheritance diagram for IPv4Packet:

Public Member Functions | |
| IPv4Packet (const IPv4Packet &rhs) | |
| IPv4Packet (const Timeval &time, uint32_t pktLen, uint32_t capLen, const u_char *data) | |
| virtual IPv4Packet * | clone (void) const |
| uint32_t | getIPHdrLen (void) const |
| uint32_t | getIPTotalLen (void) const |
| const IPv4Addr | getSrcAddr (void) const |
| const IPv4Addr | getDstAddr (void) const |
| uint32_t | getNextProto (void) const |
| virtual std::string | toString (void) const |
| virtual const PacketAttributeValue & | getAttribLocal (const PacketAttribute &attrib) const throw ( UnknownAttributeException ) |
| 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 | |
| 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 Member Functions | |
| static std::string | translateProto (uint32_t protoId) |
| static utility for translating protocol IDs to names | |
Static Public Attributes | |
| static const int | ATTRIB_SEARCH_FORWARD = 1 |
| static const int | ATTRIB_SEARCH_BACKWARD = 2 |
| static const int | ATTRIB_SEARCH_BOTH = 3 |
|
||||||||||||||||||||
|
Create a new IPv4Packet
|
|
|
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.
|
|
|
get IPv4 packet information 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 IPv4 destination address |
|
|
get the IPv4 header length in bytes |
|
|
get the IPv4 header length in bytes |
|
|
get the previous packet in this packet's context
|
|
|
get the IPv4 next protocol |
|
|
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 IPv4 source address |
|
|
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:
|
|
|
create a string representing the packet Reimplemented from Packet. |
|
|
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 |
1.4.2