INET Framework for OMNeT++/OMNEST
|
Implements a minimalistic link state routing protocol that employs flooding. More...
#include <LinkStateRouting.h>
Public Member Functions | |
LinkStateRouting () | |
virtual | ~LinkStateRouting () |
Protected Member Functions | |
virtual void | initialize (int stage) override |
virtual int | numInitStages () const override |
virtual void | handleMessage (cMessage *msg) override |
virtual void | processLINK_STATE_MESSAGE (LinkStateMsg *msg, IPv4Address sender) |
virtual void | receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override |
virtual void | sendToPeers (const std::vector< TELinkStateInfo > &list, bool req, IPv4Address exceptPeer) |
virtual void | sendToPeer (IPv4Address peer, const std::vector< TELinkStateInfo > &list, bool req) |
virtual void | sendToIP (LinkStateMsg *msg, IPv4Address destAddr) |
Protected Attributes | |
TED * | tedmod = nullptr |
cMessage * | announceMsg = nullptr |
IPv4Address | routerId |
IPAddressVector | peerIfAddrs |
Implements a minimalistic link state routing protocol that employs flooding.
Flooding works like this:
When a router receives a link state packet, it merges the packet contents into its own link state database (ted). If the packet contained new information (ted got updated), the router broadcasts the ted contents to all its other neighbours; otherwise (when the packet didn't contain any new info), nothing happens.
Also: when the announceMsg timer expires, LinkStateRouting sends out an initial link state message. (Currently this happens only once, at the beginning of the simulation). The "request" bit in the message is set then, asking neighbours to send back their link state databases. (FIXME why's this? redundant messaging: same msg is often sent twice: both as reply and as voluntary "announce").
TODO discover peers by "hello". Peers are those from which the router has received a Hello in the last X seconds. Link info to all peers are maintained; links to ex-peers (those haven't heard of for more than X seconds) are assumed to be down.
See NED file for more info.
|
virtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
inlineoverrideprotectedvirtual |
|
protectedvirtual |
Referenced by handleMessage().
|
overrideprotectedvirtual |
|
protectedvirtual |
Referenced by sendToPeer().
|
protectedvirtual |
Referenced by processLINK_STATE_MESSAGE(), and sendToPeers().
|
protectedvirtual |
Referenced by handleMessage(), processLINK_STATE_MESSAGE(), and receiveSignal().
|
protected |
Referenced by handleMessage(), initialize(), and ~LinkStateRouting().
|
protected |
Referenced by initialize(), and sendToPeers().
|
protected |
Referenced by initialize(), sendToIP(), and sendToPeers().
|
protected |
Referenced by handleMessage(), initialize(), processLINK_STATE_MESSAGE(), receiveSignal(), and sendToPeers().