#include <ErrorHandling.h>
Protected Member Functions | |
virtual void | initialize () |
virtual void | handleMessage (cMessage *msg) |
Protected Attributes | |
long | numReceived |
void ErrorHandling::handleMessage | ( | cMessage * | msg | ) | [protected, virtual] |
00039 { 00040 numReceived++; 00041 00042 ICMPMessage *icmpMsg = check_and_cast<ICMPMessage *>(msg); 00043 IPDatagram *d = check_and_cast<IPDatagram *>(icmpMsg->encapsulatedMsg()); 00044 00045 EV << "Error Handler: ICMP message received:\n"; 00046 EV << " Type: " << (int)icmpMsg->getType() 00047 << " Code: " << (int)icmpMsg->getCode() 00048 << " Bytelength: " << d->byteLength() 00049 << " Src: " << d->srcAddress() 00050 << " Dest: " << d->destAddress() 00051 << " Time: " << simTime() 00052 << "\n"; 00053 00054 delete icmpMsg; 00055 00056 char buf[80]; 00057 sprintf(buf, "errors: %ld", numReceived); 00058 displayString().setTagArg("t",0,buf); 00059 }
void ErrorHandling::initialize | ( | ) | [protected, virtual] |
long ErrorHandling::numReceived [protected] |