Alex Bikfalvi
SimStream Documentation
LayerIpLocal.h
00001 #pragma once 00002 00003 #include "Layer.h" 00004 #include "PacketIp.h" 00005 #include "Route.h" 00006 00007 class CLayerIpLocal : public CLayer 00008 { 00009 private: 00010 CAddress address; 00011 CRoute* route; 00012 00013 Delegate2<CLayerIpLocal, void, __uint32, CPacketIp*>* delegateRecv; 00014 Delegate2<CLayerIpLocal, void, __uint32, CPacketIp*>* delegateRecvMcast; 00015 Event3<void, __uint32, CPacketIp*, CPacket*>* eventRecv; 00016 00017 Delegate3<CLayerIpLocal, void, CAddress, __byte, CPacket*>* delegateSend; 00018 Event2<void, __uint32, CPacketIp*>* eventSend; 00019 Event1<void, CPacketIp*>* eventSendMcast; 00020 00021 public: 00022 CLayerIpLocal( 00023 CSimHandler* sim, 00024 CAddress address, 00025 CRoute* route 00026 ); 00027 virtual ~CLayerIpLocal(); 00028 00029 inline IDelegate2<void, __uint32, CPacketIp*>* 00030 DelegateRecv() { return this->delegateRecv; } 00031 inline IDelegate2<void, __uint32, CPacketIp*>* 00032 DelegateRecvMcast() { return this->delegateRecvMcast; } 00033 inline Event3<void, __uint32, CPacketIp*, CPacket*>* 00034 EventRecv() { return this->eventRecv; } 00035 00036 inline IDelegate3<void, CAddress, __byte, CPacket*>* 00037 DelegateSend() { return this->delegateSend; } 00038 inline Event2<void, __uint32, CPacketIp*>* 00039 EventSend() { return this->eventSend; } 00040 inline Event1<void, CPacketIp*>* 00041 EventSendMcast() { return this->eventSendMcast; } 00042 00043 virtual void Finalize() { } 00044 00045 private: 00046 void Recv(__uint32 entry, CPacketIp* packet); 00047 void RecvMcast(__uint32 entry, CPacketIp* packet); 00048 void Send(CAddress dst, __byte ttl, CPacket* payload); 00049 };
Last updated: February 8, 2011