Error Handling: print out received error for IPv6.
More...
#include <IPv6ErrorHandling.h>
Error Handling: print out received error for IPv6.
void inet::IPv6ErrorHandling::displayType1Msg |
( |
int |
code | ) |
|
|
protectedvirtual |
Referenced by handleMessage().
100 EV_ERROR <<
" Destination Unreachable: ";
103 EV_ERROR <<
"no route to destination\n";
107 EV_ERROR <<
"communication with destination administratively prohibited\n";
111 EV_ERROR <<
"address unreachable\n";
115 EV_ERROR <<
"port unreachable\n";
119 EV_ERROR <<
"Unknown Error Code!\n";
Definition: ICMPv6Message_m.h:109
Definition: ICMPv6Message_m.h:108
Definition: ICMPv6Message_m.h:110
Definition: ICMPv6Message_m.h:107
void inet::IPv6ErrorHandling::displayType2Msg |
( |
| ) |
|
|
protectedvirtual |
void inet::IPv6ErrorHandling::displayType3Msg |
( |
int |
code | ) |
|
|
protectedvirtual |
Referenced by handleMessage().
131 EV_ERROR <<
" Time Exceeded Message: ";
134 EV_ERROR <<
"hop limit exceeded in transit\n";
138 EV_ERROR <<
"fragment reassembly time exceeded\n";
142 EV_ERROR <<
"Unknown Error Code!\n";
Definition: ICMPv6Message_m.h:129
Definition: ICMPv6Message_m.h:128
void inet::IPv6ErrorHandling::displayType4Msg |
( |
int |
code | ) |
|
|
protectedvirtual |
Referenced by handleMessage().
149 EV_ERROR <<
" Parameter Problem Message: ";
152 EV_ERROR <<
"erroneous header field encountered\n";
156 EV_ERROR <<
"unrecognized Next Header type encountered\n";
160 EV_ERROR <<
"unrecognized IPv6 option encountered\n";
164 EV_ERROR <<
"Unknown Error Code!\n";
Definition: ICMPv6Message_m.h:148
Definition: ICMPv6Message_m.h:149
Definition: ICMPv6Message_m.h:150
void inet::IPv6ErrorHandling::handleMessage |
( |
cMessage * |
msg | ) |
|
|
overrideprotectedvirtual |
38 ICMPv6Message *icmpv6Msg = check_and_cast<ICMPv6Message *>(msg);
39 IPv6Datagram *d = check_and_cast<IPv6Datagram *>(icmpv6Msg->getEncapsulatedPacket());
40 int type = (int)icmpv6Msg->getType();
42 EV_ERROR <<
" Type: " << type;
46 ICMPv6DestUnreachableMsg *msg2 = check_and_cast<ICMPv6DestUnreachableMsg *>(icmpv6Msg);
47 int code = msg2->getCode();
48 EV_ERROR <<
" Code: " << code;
54 ICMPv6PacketTooBigMsg *msg2 = check_and_cast<ICMPv6PacketTooBigMsg *>(icmpv6Msg);
55 int code = msg2->getCode();
56 int mtu = msg2->getMTU();
57 EV_ERROR <<
" Code: " << code <<
" MTU: " << mtu;
64 ICMPv6TimeExceededMsg *msg2 = check_and_cast<ICMPv6TimeExceededMsg *>(icmpv6Msg);
65 int code = msg2->getCode();
66 EV_ERROR <<
" Code: " << code;
72 ICMPv6ParamProblemMsg *msg2 = check_and_cast<ICMPv6ParamProblemMsg *>(icmpv6Msg);
73 int code = msg2->getCode();
74 EV_ERROR <<
" Code: " << code;
80 cEnum *
e = cEnum::get(
"inet::ICMPv6Type");
81 const char *str = e->getStringFor(type);
83 EV_ERROR <<
" " << str << endl;
85 EV_ERROR <<
" Unknown Error Type" << endl;
89 EV_DETAIL <<
"Datagram: Byte length: " << d->getByteLength()
90 <<
" Src: " << d->getSrcAddress()
91 <<
" Dest: " << d->getDestAddress()
92 <<
" Time: " << simTime()
Definition: ICMPv6Message_m.h:72
Definition: ICMPv6Message_m.h:74
virtual void displayType1Msg(int code)
Definition: IPv6ErrorHandling.cc:98
Definition: ICMPv6Message_m.h:71
virtual void displayType3Msg(int code)
Definition: IPv6ErrorHandling.cc:129
const value< double, units::C > e(1.602176487e-19)
virtual void displayType4Msg(int code)
Definition: IPv6ErrorHandling.cc:147
Definition: ICMPv6Message_m.h:73
virtual void displayType2Msg()
Definition: IPv6ErrorHandling.cc:124
void inet::IPv6ErrorHandling::initialize |
( |
| ) |
|
|
overrideprotectedvirtual |
The documentation for this class was generated from the following files: