INET Framework for OMNeT++/OMNEST
|
#include <IPv6.h>
Classes | |
class | QueuedDatagramForHook |
Represents an IPv4Datagram, queued by a Hook. More... | |
class | ScheduledDatagram |
Public Member Functions | |
IPv6 () | |
~IPv6 () | |
virtual void | registerHook (int priority, IHook *hook) override |
Adds the provided hook to the list of registered hooks that will be called by the network layer when it processes datagrams. More... | |
virtual void | unregisterHook (int priority, IHook *hook) override |
Removes the provided hook from the list of registered hooks. More... | |
virtual void | dropQueuedDatagram (const INetworkDatagram *daragram) override |
Requests the network layer to drop the datagram, because it's no longer needed. More... | |
virtual void | reinjectQueuedDatagram (const INetworkDatagram *datagram) override |
Requests the network layer to restart the processing of the datagram. More... | |
Public Member Functions inherited from inet::QueueBase | |
QueueBase () | |
Public Member Functions inherited from inet::AbstractQueue | |
AbstractQueue () | |
virtual | ~AbstractQueue () |
Public Member Functions inherited from inet::ILifecycle | |
virtual | ~ILifecycle () |
Public Member Functions inherited from inet::INetfilter | |
virtual | ~INetfilter () |
Public Member Functions inherited from inet::INetworkProtocol | |
virtual | ~INetworkProtocol () |
Protected Types | |
typedef std::multimap< int, IHook * > | HookList |
typedef std::list< QueuedDatagramForHook > | DatagramQueueForHooks |
Protected Member Functions | |
virtual InterfaceEntry * | getSourceInterfaceFrom (cPacket *msg) |
virtual void | refreshDisplay () const override |
virtual IPv6Datagram * | encapsulate (cPacket *transportPacket, IPv6ControlInfo *ctrlInfo) |
Encapsulate packet coming from higher layers into IPv6Datagram. More... | |
virtual void | preroutingFinish (IPv6Datagram *datagram, const InterfaceEntry *fromIE, const InterfaceEntry *destIE, IPv6Address nextHopAddr) |
virtual void | handleMessageFromHL (cPacket *msg) |
Handle messages (typically packets to be send in IPv6) from transport or ICMP. More... | |
virtual void | datagramLocalOut (IPv6Datagram *datagram, const InterfaceEntry *destIE, IPv6Address requestedNextHopAddress) |
virtual void | handleReceivedICMP (ICMPv6Message *msg) |
Handle incoming ICMP messages. More... | |
virtual void | routePacket (IPv6Datagram *datagram, const InterfaceEntry *destIE, IPv6Address requestedNextHopAddress, bool fromHL) |
Performs routing. More... | |
virtual void | resolveMACAddressAndSendPacket (IPv6Datagram *datagram, int interfaceID, IPv6Address nextHop, bool fromHL) |
virtual void | routeMulticastPacket (IPv6Datagram *datagram, const InterfaceEntry *destIE, const InterfaceEntry *fromIE, bool fromHL) |
Forwards packets to all multicast destinations, using fragmentAndSend(). More... | |
virtual void | fragmentAndSend (IPv6Datagram *datagram, const InterfaceEntry *destIE, const MACAddress &nextHopAddr, bool fromHL) |
Performs fragmentation if needed, and sends the original datagram or the fragments through the specified interface. More... | |
virtual void | localDeliver (IPv6Datagram *datagram) |
Perform reassembly of fragmented datagrams, then send them up to the higher layers using sendToHL(). More... | |
virtual cPacket * | decapsulate (IPv6Datagram *datagram) |
Decapsulate and return encapsulated packet after attaching IPv6ControlInfo. More... | |
virtual void | sendDatagramToOutput (IPv6Datagram *datagram, const InterfaceEntry *destIE, const MACAddress &macAddr) |
Last hoplimit check, then send datagram on the given interface. More... | |
IHook::Result | datagramPreRoutingHook (INetworkDatagram *datagram, const InterfaceEntry *inIE, const InterfaceEntry *&outIE, L3Address &nextHopAddr) |
called before a packet arriving from the network is routed More... | |
IHook::Result | datagramForwardHook (INetworkDatagram *datagram, const InterfaceEntry *inIE, const InterfaceEntry *&outIE, L3Address &nextHopAddr) |
called before a packet arriving from the network is delivered via the network More... | |
IHook::Result | datagramPostRoutingHook (INetworkDatagram *datagram, const InterfaceEntry *inIE, const InterfaceEntry *&outIE, L3Address &nextHopAddr) |
called before a packet is delivered via the network More... | |
IHook::Result | datagramLocalInHook (INetworkDatagram *datagram, const InterfaceEntry *inIE) |
called before a packet arriving from the network is delivered locally More... | |
IHook::Result | datagramLocalOutHook (INetworkDatagram *datagram, const InterfaceEntry *&outIE, L3Address &nextHopAddr) |
called before a packet arriving locally is delivered More... | |
virtual void | initialize (int stage) override |
Initialization. More... | |
virtual int | numInitStages () const override |
virtual void | handleMessage (cMessage *msg) override |
Handle message. More... | |
virtual void | endService (cPacket *msg) override |
Processing of IPv6 datagrams. More... | |
virtual bool | handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override |
Perform one stage of a lifecycle operation. More... | |
bool | determineOutputInterface (const IPv6Address &destAddress, IPv6Address &nextHop, int &interfaceId, IPv6Datagram *datagram, bool fromHL) |
Determines the correct interface for the specified destination address. More... | |
bool | processExtensionHeaders (IPv6Datagram *datagram) |
Process the extension headers of the datagram. More... | |
Protected Member Functions inherited from inet::QueueBase | |
virtual void | initialize () override |
virtual void | arrival (cPacket *msg) override |
Functions to (re)define behaviour. More... | |
virtual cPacket * | arrivalWhenIdle (cPacket *msg) override |
Called when a message arrives at the module when the queue is empty. More... | |
virtual simtime_t | startService (cPacket *msg) override |
Called when a message starts service, and should return the service time. More... | |
Protected Member Functions inherited from inet::AbstractQueue | |
virtual cPacket * | cancelService () |
If a message is under service, aborts its service and returns the message. More... | |
Protected Attributes | |
IInterfaceTable * | ift = nullptr |
IPv6RoutingTable * | rt = nullptr |
IPv6NeighbourDiscovery * | nd = nullptr |
ICMPv6 * | icmp = nullptr |
IPv6Tunneling * | tunneling = nullptr |
unsigned int | curFragmentId = -1 |
IPv6FragBuf | fragbuf |
simtime_t | lastCheckTime |
ProtocolMapping | mapping |
int | numMulticast = 0 |
int | numLocalDeliver = 0 |
int | numDropped = 0 |
int | numUnroutable = 0 |
int | numForwarded = 0 |
HookList | hooks |
DatagramQueueForHooks | queuedDatagramsForHooks |
Protected Attributes inherited from inet::QueueBase | |
simtime_t | delay |
Protected Attributes inherited from inet::AbstractQueue | |
cPacketQueue | queue |
The queue. More... | |
IPv6 implementation.
|
protected |
|
protected |
inet::IPv6::IPv6 | ( | ) |
|
protected |
called before a packet arriving from the network is delivered via the network
|
protected |
called before a packet arriving from the network is delivered locally
|
protectedvirtual |
Referenced by endService(), handleMessageFromHL(), and reinjectQueuedDatagram().
|
protected |
called before a packet arriving locally is delivered
Referenced by endService(), and handleMessageFromHL().
|
protected |
called before a packet is delivered via the network
|
protected |
called before a packet arriving from the network is routed
Referenced by endService().
|
protectedvirtual |
Decapsulate and return encapsulated packet after attaching IPv6ControlInfo.
Referenced by localDeliver().
|
protected |
Determines the correct interface for the specified destination address.
The nextHop and interfaceId are output parameter.
Referenced by routePacket().
|
overridevirtual |
Requests the network layer to drop the datagram, because it's no longer needed.
This function may be used by a reactive routing protocol when it cancels the route discovery process.
Implements inet::INetfilter.
|
protectedvirtual |
Encapsulate packet coming from higher layers into IPv6Datagram.
Referenced by handleMessageFromHL().
|
overrideprotectedvirtual |
Processing of IPv6 datagrams.
Called when a datagram reaches the front of the queue.
Implements inet::AbstractQueue.
|
protectedvirtual |
Performs fragmentation if needed, and sends the original datagram or the fragments through the specified interface.
Referenced by datagramLocalOut(), endService(), resolveMACAddressAndSendPacket(), and routeMulticastPacket().
|
protectedvirtual |
Referenced by decapsulate(), and endService().
|
overrideprotectedvirtual |
Handle message.
Reimplemented from inet::AbstractQueue.
|
protectedvirtual |
Handle messages (typically packets to be send in IPv6) from transport or ICMP.
Invokes encapsulate(), then routePacket().
Referenced by endService().
|
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.
|
protectedvirtual |
Handle incoming ICMP messages.
Referenced by localDeliver().
|
overrideprotectedvirtual |
Initialization.
|
protectedvirtual |
Perform reassembly of fragmented datagrams, then send them up to the higher layers using sendToHL().
Referenced by routeMulticastPacket(), and routePacket().
|
inlineoverrideprotectedvirtual |
|
protectedvirtual |
Referenced by endService(), and reinjectQueuedDatagram().
|
protected |
Process the extension headers of the datagram.
Returns true if all have been processed successfully and false if errors occured and the packet has to be dropped or if the datagram has been forwarded to another module for further processing.
Referenced by localDeliver().
|
overrideprotectedvirtual |
|
overridevirtual |
Adds the provided hook to the list of registered hooks that will be called by the network layer when it processes datagrams.
Implements inet::INetfilter.
|
overridevirtual |
Requests the network layer to restart the processing of the datagram.
This function may be used by a reactive routing protocol when it completes the route discovery process.
Implements inet::INetfilter.
|
protectedvirtual |
Referenced by endService(), and routePacket().
|
protectedvirtual |
Forwards packets to all multicast destinations, using fragmentAndSend().
Referenced by datagramLocalOut(), and preroutingFinish().
|
protectedvirtual |
Performs routing.
Based on the routing decision, it dispatches to localDeliver() for local packets, to fragmentAndSend() for forwarded packets, to routeMulticastPacket() for multicast packets, or drops the packet if it's unroutable or forwarding is off.
Referenced by datagramLocalOut(), and preroutingFinish().
|
protectedvirtual |
Last hoplimit check, then send datagram on the given interface.
Referenced by fragmentAndSend().
|
overridevirtual |
|
protected |
Referenced by fragmentAndSend(), and initialize().
|
protected |
Referenced by initialize(), and localDeliver().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by initialize(), and localDeliver().
|
protected |
Referenced by handleMessage(), handleReceivedICMP(), and localDeliver().
|
protected |
Referenced by initialize(), and resolveMACAddressAndSendPacket().
|
protected |
Referenced by initialize(), refreshDisplay(), resolveMACAddressAndSendPacket(), and routePacket().
|
protected |
Referenced by endService(), initialize(), refreshDisplay(), and resolveMACAddressAndSendPacket().
|
protected |
Referenced by initialize(), refreshDisplay(), routeMulticastPacket(), and routePacket().
|
protected |
Referenced by initialize(), refreshDisplay(), and routeMulticastPacket().
|
protected |
Referenced by determineOutputInterface(), initialize(), and refreshDisplay().
|
protected |
|
protected |
|
protected |
Referenced by initialize(), and routePacket().