#include <Packet.h>
Public Types | |
enum | _PROTOCOL { PROTO_NONE, PROTO_DATA_PAYLOAD, PROTO_ETHERNET, PROTO_ARP, PROTO_IP, PROTO_IPV6, PROTO_TCP, PROTO_UDP, PROTO_ICMP } |
typedef enum Packet::_PROTOCOL | PROTOCOL |
typedef struct Packet::_PAYLOAD_BUFFER | PAYLOAD_BUFFER |
typedef struct Packet::_PAYLOAD_BUFFER * | PPAYLOAD_BUFFER |
Public Member Functions | |
Packet (void) | |
virtual | ~Packet (void) |
bool | createNextLayer () |
void | setSize (unsigned int len) |
unsigned int | getSize () |
unsigned char * | getBuffer () |
virtual bool | parsePacket ()=0 |
virtual void | assemblePacket ()=0 |
virtual string | toString ()=0 |
virtual unsigned int | getMinProtocolSize ()=0 |
PROTOCOL | getProtocol () |
Packet * | getNextPacket () |
void | setNextPacket (Packet *nextpacket) |
void | setNextProtocol (PROTOCOL proto) |
bool | getChecksumgood () |
void | setChecksumgood (bool good) |
Static Public Member Functions | |
static string | getProtocolName (PROTOCOL proto) |
Static Protected Member Functions | |
static unsigned short | checksum (unsigned char *databuf, int len) |
Protected Attributes | |
unsigned char * | buffer |
unsigned int | size |
unsigned int | layersize |
PROTOCOL | protocol |
PROTOCOL | nextProtocol |
Packet * | nextPacket |
bool | checksumgood |
Classes | |
struct | _PAYLOAD_BUFFER |
typedef enum Packet::_PROTOCOL Packet::PROTOCOL |
typedef struct Packet::_PAYLOAD_BUFFER Packet::PAYLOAD_BUFFER |
typedef struct Packet::_PAYLOAD_BUFFER * Packet::PPAYLOAD_BUFFER |
enum Packet::_PROTOCOL |
Packet::Packet | ( | void | ) |
Packet::~Packet | ( | void | ) | [virtual] |
bool Packet::createNextLayer | ( | ) |
void Packet::setSize | ( | unsigned int | len | ) |
unsigned int Packet::getSize | ( | ) |
unsigned char * Packet::getBuffer | ( | ) |
virtual bool Packet::parsePacket | ( | ) | [pure virtual] |
Implemented in ArpPacket, EthernetPacket, IcmpPacket, IpPacket, Ipv6Packet, PayloadPacket, TcpPacket, and UdpPacket.
virtual void Packet::assemblePacket | ( | ) | [pure virtual] |
Implemented in ArpPacket, EthernetPacket, IcmpPacket, IpPacket, Ipv6Packet, PayloadPacket, TcpPacket, and UdpPacket.
virtual string Packet::toString | ( | ) | [pure virtual] |
Implemented in ArpPacket, EthernetPacket, IcmpPacket, IpPacket, Ipv6Packet, PayloadPacket, TcpPacket, and UdpPacket.
virtual unsigned int Packet::getMinProtocolSize | ( | ) | [pure virtual] |
Implemented in ArpPacket, EthernetPacket, IcmpPacket, IpPacket, Ipv6Packet, PayloadPacket, TcpPacket, and UdpPacket.
Packet::PROTOCOL Packet::getProtocol | ( | ) |
Reimplemented in IpPacket.
string Packet::getProtocolName | ( | PROTOCOL | proto | ) | [static] |
Packet * Packet::getNextPacket | ( | ) |
void Packet::setNextPacket | ( | Packet * | nextpacket | ) |
void Packet::setNextProtocol | ( | PROTOCOL | proto | ) |
bool Packet::getChecksumgood | ( | ) |
void Packet::setChecksumgood | ( | bool | good | ) |
unsigned short Packet::checksum | ( | unsigned char * | databuf, | |
int | len | |||
) | [static, protected] |
unsigned char* Packet::buffer [protected] |
unsigned int Packet::size [protected] |
unsigned int Packet::layersize [protected] |
PROTOCOL Packet::protocol [protected] |
PROTOCOL Packet::nextProtocol [protected] |
Packet* Packet::nextPacket [protected] |
bool Packet::checksumgood [protected] |