Alex Bikfalvi
SimStream Documentation
LayerUdp.h
00001 #pragma once 00002 00003 #include "Layer.h" 00004 #include "PacketIp.h" 00005 #include "PacketUdp.h" 00006 00007 class CLayerUdp : public CLayer 00008 { 00009 private: 00010 Delegate3<CLayerUdp, void, __uint32, CPacketIp*, CPacket*>* delegateRecv; 00011 Event4<void, __uint32, CPacketIp*, CPacketUdp*, CPacket*>* eventRecv; 00012 00013 Delegate5<CLayerUdp, void, __uint16, __uint16, CAddress, __byte, CPacket*>* delegateSend; 00014 Event3<void, CAddress, __byte, CPacket*>* eventSend; 00015 00016 public: 00017 CLayerUdp(CSimHandler* sim); 00018 virtual ~CLayerUdp(); 00019 00020 inline IDelegate3<void, __uint32, CPacketIp*, CPacket*>* 00021 DelegateRecv() { return this->delegateRecv; } 00022 inline Event4<void, __uint32, CPacketIp*, CPacketUdp*, CPacket*>* 00023 EventRecv() { return this->eventRecv; } 00024 00025 inline IDelegate5<void, __uint16, __uint16, CAddress, __byte, CPacket*>* 00026 DelegateSend() { return this->delegateSend; } 00027 inline Event3<void, CAddress, __byte, CPacket*>* 00028 EventSend() { return this->eventSend; } 00029 00030 virtual void Finalize() { } 00031 00032 private: 00033 void Recv(__uint32 entry, CPacketIp* ip, CPacket* packet); 00034 void Send(__uint16 src, __uint16 dst, CAddress address, __byte ttl, CPacket* payload); 00035 };
Last updated: February 8, 2011