00001 #include "Headers.h"
00002 #include "PacketUdp.h"
00003
00004 CPacketUdp::CPacketUdp(
00005 __uint16 src,
00006 __uint16 dst,
00007 CPacket* payload
00008 ) : CPacket(PACKET_UDP_HEADER + (payload?payload->Size():0), payload, payload?payload->Tos():PACKET_TOS_LOW)
00009 {
00010 this->src = src;
00011 this->dst = dst;
00012 }
00013
00014 CPacket* CPacketUdp::Copy()
00015 {
00016 CPacket* packet = new CPacketUdp(
00017 this->src,
00018 this->dst,
00019 this->payload->Copy());
00020
00021 return packet;
00022 }