41 #ifndef _networkpacket_cpp
42 #define _networkpacket_cpp
44 #include "Network/platformincludes.h.cpp"
46 #include "Network/packet.h"
52 SmallestIPv4MTU = 576,
53 IPv4HeaderBaseSize = 20,
54 IPv4HeaderOptionsMaxSize = 40,
56 SmallestIPv6MTU = 1500,
57 IPv6HeaderBaseSize = 40,
58 IPv6HeaderOptionsEstSize = 40,
60 TCPHeaderBaseSize = 40,
61 TCPHeaderOptionsMaxSize = 40,
78 const Whole Packet::DefaultTCPv4MsgSize = SmallestIPv4MTU - ( ( IPv4HeaderBaseSize + IPv4HeaderOptionsMaxSize ) + ( TCPHeaderBaseSize + TCPHeaderOptionsMaxSize ) );
79 const Whole Packet::DefaultTCPv6MsgSize = SmallestIPv6MTU - ( ( IPv6HeaderBaseSize + IPv6HeaderOptionsEstSize ) + ( TCPHeaderBaseSize + TCPHeaderOptionsMaxSize ) );
static const Whole DefaultUDPv6MsgSize
The maximum size the message portion of a UDP packet can be without being rejected with IPv6...
bool Boole
Generally acts a single bit, true or false.
static const Whole DefaultTCPv6MsgSize
The maximum size the message portion of a TCP packet can be without segmenting with IPv6...
static const Whole DefaultIPv4MTU
The maximum size an entire single transmission can be without fragmenting/rejection over IPv4...
virtual ~Packet()
Class destructor.
static const Whole DefaultTCPv4MsgSize
The maximum size the message portion of a TCP packet can be without segmenting with IPv4...
virtual Whole GetExpectedSize() const =0
Gets the size this packet should be according to it's type.
Packet()
Class constructor.
Boole IsExpectedSize() const
Gets whether or not this packet is the size it should be.
static const Whole DefaultUDPv4MsgSize
The maximum size the message portion of a UDP packet can be without fragmenting/rejection with IPv4...
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
virtual Whole GetSize() const =0
Gets the actual size of this packet.
static const Whole DefaultIPv6MTU
The maximum size an entire single transmission can be without fragmenting/rejection over IPv6...