INET Framework for OMNeT++/OMNEST
|
ICMPv6 implementation. More...
#include <ICMPv6.h>
Public Member Functions | |
virtual void | sendErrorMessage (IPv6Datagram *datagram, ICMPv6Type type, int code) |
This method can be called from other modules to send an ICMPv6 error packet. More... | |
virtual void | sendErrorMessage (cPacket *transportPacket, IPv6ControlInfo *ctrl, ICMPv6Type type, int code) |
This method can be called from other modules to send an ICMP error packet in response to a received bogus packet from the transport layer (like UDP). More... | |
Public Member Functions inherited from inet::ILifecycle | |
virtual | ~ILifecycle () |
Protected Types | |
typedef std::map< long, int > | PingMap |
Protected Member Functions | |
virtual void | sendToIP (ICMPv6Message *msg, const IPv6Address &dest) |
virtual void | sendToIP (ICMPv6Message *msg) |
virtual ICMPv6Message * | createDestUnreachableMsg (int code) |
virtual ICMPv6Message * | createPacketTooBigMsg (int mtu) |
virtual ICMPv6Message * | createTimeExceededMsg (int code) |
virtual ICMPv6Message * | createParamProblemMsg (int code) |
virtual void | initialize (int stage) override |
Initialization. More... | |
virtual int | numInitStages () const override |
virtual void | handleMessage (cMessage *msg) override |
Processing of messages that arrive in this module. More... | |
virtual void | processICMPv6Message (ICMPv6Message *) |
virtual bool | handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override |
Perform one stage of a lifecycle operation. More... | |
virtual void | processEchoRequest (ICMPv6EchoRequestMsg *) |
Respond to the machine that tried to ping us. More... | |
virtual void | processEchoReply (ICMPv6EchoReplyMsg *) |
Forward the ping reply to the "pingOut" of this module. More... | |
virtual void | sendEchoRequest (PingPayload *) |
Ping a machine. More... | |
virtual bool | validateDatagramPromptingError (IPv6Datagram *datagram) |
Validate the received IPv6 datagram before responding with error message. More... | |
virtual void | errorOut (ICMPv6Message *) |
Protected Attributes | |
PingMap | pingMap |
ICMPv6 implementation.
|
protected |
|
protectedvirtual |
Referenced by sendErrorMessage().
|
protectedvirtual |
Referenced by sendErrorMessage().
|
protectedvirtual |
Referenced by sendErrorMessage().
|
protectedvirtual |
Referenced by sendErrorMessage().
|
protectedvirtual |
Referenced by processICMPv6Message().
|
overrideprotectedvirtual |
Processing of messages that arrive in this module.
Messages arrived here could be for ICMP ping requests or ICMPv6 messages that require processing.
|
overrideprotectedvirtual |
Perform one stage of a lifecycle operation.
Processing may be done entirely within this method, or may be a longer process that involves nonzero simulation time or several events, and is triggered by this method call.
Return value: true = "done"; false = "not yet done, will invoke doneCallback when done"
Implements inet::ILifecycle.
|
overrideprotectedvirtual |
Initialization.
|
inlineoverrideprotectedvirtual |
|
protectedvirtual |
Forward the ping reply to the "pingOut" of this module.
Referenced by processICMPv6Message().
|
protectedvirtual |
Respond to the machine that tried to ping us.
Referenced by processICMPv6Message().
|
protectedvirtual |
Referenced by handleMessage(), and sendErrorMessage().
|
protectedvirtual |
Ping a machine.
The information needed to do this is in the cMessage parameter. TODO where in cMessage? document!!!
Referenced by handleMessage().
|
virtual |
This method can be called from other modules to send an ICMPv6 error packet.
RFC 2463, Section 3: ICMPv6 Error Messages There are a total of 4 ICMPv6 error messages as described in the RFC. This method will construct and send error messages corresponding to the given type. Error Types:
Referenced by inet::IPv6FragBuf::addFragment(), inet::IPv6NeighbourDiscovery::dropQueuedPacketsAwaitingAR(), inet::IPv6NeighbourDiscovery::processIPv6Datagram(), inet::UDP::processUndeliverablePacket(), inet::IPv6FragBuf::purgeStaleFragments(), and sendErrorMessage().
|
virtual |
This method can be called from other modules to send an ICMP error packet in response to a received bogus packet from the transport layer (like UDP).
The ICMP error packet needs to include (part of) the original IP datagram, so this function will wrap back the transport packet into the IP datagram based on its IPv4ControlInfo.
|
protectedvirtual |
Referenced by processEchoRequest(), sendEchoRequest(), and sendErrorMessage().
|
protectedvirtual |
|
protectedvirtual |
Validate the received IPv6 datagram before responding with error message.
Referenced by sendErrorMessage().
|
protected |
Referenced by processEchoReply(), and sendEchoRequest().