INET Framework for OMNeT++/OMNEST
|
LDP (rfc 3036) protocol implementation. More...
#include <LDP.h>
Classes | |
struct | fec_bind_t |
struct | fec_t |
struct | peer_info |
struct | pending_req_t |
Public Types | |
typedef std::vector< fec_t > | FecVector |
typedef std::vector< fec_bind_t > | FecBindVector |
typedef std::vector< pending_req_t > | PendingVector |
typedef std::vector< peer_info > | PeerVector |
Public Member Functions | |
LDP () | |
virtual | ~LDP () |
virtual bool | handleOperationStage (LifecycleOperation *operation, int stage, IDoneCallback *doneCallback) override |
Perform one stage of a lifecycle operation. More... | |
Public Member Functions inherited from inet::TCPSocket::CallbackInterface | |
virtual | ~CallbackInterface () |
virtual void | socketDeleted (int connId, void *yourPtr) |
Public Member Functions inherited from inet::IClassifier | |
virtual | ~IClassifier () |
Public Member Functions inherited from inet::ILifecycle | |
virtual | ~ILifecycle () |
Protected Member Functions | |
virtual IPv4Address | locateNextHop (IPv4Address dest) |
This method finds next peer in upstream direction. More... | |
virtual IPv4Address | findPeerAddrFromInterface (std::string interfaceName) |
This method maps the peerIP with the interface name in routing table. More... | |
std::string | findInterfaceFromPeerAddr (IPv4Address peerIP) |
virtual int | findPeer (IPv4Address peerAddr) |
Utility: return peer's index in myPeers table, or -1 if not found. More... | |
virtual TCPSocket * | getPeerSocket (IPv4Address peerAddr) |
Utility: return socket for given peer. More... | |
virtual TCPSocket * | findPeerSocket (IPv4Address peerAddr) |
Utility: return socket for given peer, and nullptr if session doesn't exist. More... | |
virtual void | sendToPeer (IPv4Address dest, cMessage *msg) |
FecVector::iterator | findFecEntry (FecVector &fecs, IPv4Address addr, int length) |
FecBindVector::iterator | findFecEntry (FecBindVector &fecs, int fecid, IPv4Address peer) |
virtual void | sendMappingRequest (IPv4Address dest, IPv4Address addr, int length) |
virtual void | sendMapping (int type, IPv4Address dest, int label, IPv4Address addr, int length) |
virtual void | sendNotify (int status, IPv4Address dest, IPv4Address addr, int length) |
virtual void | rebuildFecList () |
virtual void | updateFecList (IPv4Address nextHop) |
virtual void | updateFecListEntry (fec_t oldItem) |
virtual void | announceLinkChange (int tedlinkindex) |
virtual bool | isNodeUp () |
virtual int | numInitStages () const override |
virtual void | initialize (int stage) override |
virtual void | handleMessage (cMessage *msg) override |
virtual void | sendHelloTo (IPv4Address dest) |
virtual void | openTCPConnectionToPeer (int peerIndex) |
virtual void | processLDPHello (LDPHello *msg) |
virtual void | processHelloTimeout (cMessage *msg) |
virtual void | processMessageFromTCP (cMessage *msg) |
virtual void | processLDPPacketFromTCP (LDPPacket *ldpPacket) |
virtual void | processLABEL_MAPPING (LDPLabelMapping *packet) |
virtual void | processLABEL_REQUEST (LDPLabelRequest *packet) |
virtual void | processLABEL_RELEASE (LDPLabelMapping *packet) |
virtual void | processLABEL_WITHDRAW (LDPLabelMapping *packet) |
virtual void | processNOTIFICATION (LDPNotify *packet) |
virtual bool | lookupLabel (IPv4Datagram *ipdatagram, LabelOpVector &outLabel, std::string &outInterface, int &color) override |
The ipdatagram argument is an input parameter, the rest (outLabel, outInterface, color) are output parameters only. More... | |
virtual void | receiveSignal (cComponent *source, simsignal_t signalID, cObject *obj, cObject *details) override |
TCPSocket::CallbackInterface callback methods | |
virtual void | socketEstablished (int connId, void *yourPtr) override |
virtual void | socketDataArrived (int connId, void *yourPtr, cPacket *msg, bool urgent) override |
virtual void | socketPeerClosed (int connId, void *yourPtr) override |
virtual void | socketClosed (int connId, void *yourPtr) override |
virtual void | socketFailure (int connId, void *yourPtr, int code) override |
virtual void | socketStatusArrived (int connId, void *yourPtr, TCPStatusInfo *status) override |
Protected Attributes | |
simtime_t | holdTime |
simtime_t | helloInterval |
FecVector | fecList |
FecBindVector | fecUp |
FecBindVector | fecDown |
PendingVector | pending |
PeerVector | myPeers |
NodeStatus * | nodeStatus = nullptr |
IInterfaceTable * | ift = nullptr |
IIPv4RoutingTable * | rt = nullptr |
LIBTable * | lt = nullptr |
TED * | tedmod = nullptr |
UDPSocket | udpSocket |
std::vector< UDPSocket > | udpSockets |
TCPSocket | serverSocket |
TCPSocketMap | socketMap |
cMessage * | sendHelloMsg = nullptr |
int | maxFecid = 0 |
LDP (rfc 3036) protocol implementation.
typedef std::vector<fec_bind_t> inet::LDP::FecBindVector |
typedef std::vector<fec_t> inet::LDP::FecVector |
typedef std::vector<peer_info> inet::LDP::PeerVector |
typedef std::vector<pending_req_t> inet::LDP::PendingVector |
|
virtual |
|
protectedvirtual |
Referenced by processHelloTimeout(), and processLDPHello().
|
protected |
|
protected |
|
protected |
Referenced by lookupLabel(), processLABEL_MAPPING(), processLABEL_REQUEST(), and updateFecListEntry().
|
protectedvirtual |
Utility: return peer's index in myPeers table, or -1 if not found.
Referenced by findPeerSocket(), processLDPHello(), and processMessageFromTCP().
|
protectedvirtual |
This method maps the peerIP with the interface name in routing table.
It is expected that for MPLS host, entries linked to MPLS peers are available. In case no corresponding peerIP found, a peerIP (not deterministic) will be returned.
Referenced by locateNextHop().
|
protectedvirtual |
Utility: return socket for given peer, and nullptr if session doesn't exist.
Referenced by getPeerSocket(), processLABEL_REQUEST(), and updateFecListEntry().
|
protectedvirtual |
Utility: return socket for given peer.
Throws error if there's no TCP connection
Referenced by sendToPeer().
|
overrideprotectedvirtual |
|
overridevirtual |
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 |
|
protectedvirtual |
Referenced by handleMessage(), and initialize().
|
protectedvirtual |
This method finds next peer in upstream direction.
|
overrideprotectedvirtual |
The ipdatagram argument is an input parameter, the rest (outLabel, outInterface, color) are output parameters only.
In subclasses, this function should be implemented to determine the forwarding equivalence class for the IPv4 datagram passed, and map it to an outLabel and outInterface.
The color parameter (which can be set to an arbitrary value) will only be used for the NAM trace if one will be recorded.
Implements inet::IClassifier.
|
inlineoverrideprotectedvirtual |
|
protectedvirtual |
Referenced by processLDPHello().
|
protectedvirtual |
Referenced by handleMessage().
|
protectedvirtual |
Referenced by processLDPPacketFromTCP().
|
protectedvirtual |
Referenced by processLDPPacketFromTCP().
|
protectedvirtual |
Referenced by processLDPPacketFromTCP().
|
protectedvirtual |
Referenced by processLDPPacketFromTCP().
|
protectedvirtual |
Referenced by handleMessage().
|
protectedvirtual |
Referenced by socketDataArrived().
|
protectedvirtual |
Referenced by handleMessage().
|
protectedvirtual |
Referenced by handleMessage(), and processLDPPacketFromTCP().
|
protectedvirtual |
Referenced by initialize(), and receiveSignal().
|
overrideprotectedvirtual |
|
protectedvirtual |
Referenced by handleMessage(), and processLDPHello().
|
protectedvirtual |
Referenced by processLABEL_MAPPING(), processLABEL_REQUEST(), rebuildFecList(), and updateFecListEntry().
|
protectedvirtual |
Referenced by processNOTIFICATION(), and updateFecListEntry().
|
protectedvirtual |
Referenced by processLABEL_REQUEST().
|
protectedvirtual |
Referenced by processLABEL_WITHDRAW(), sendMapping(), sendMappingRequest(), and sendNotify().
|
overrideprotectedvirtual |
Reimplemented from inet::TCPSocket::CallbackInterface.
|
overrideprotectedvirtual |
Implements inet::TCPSocket::CallbackInterface.
|
overrideprotectedvirtual |
Reimplemented from inet::TCPSocket::CallbackInterface.
|
overrideprotectedvirtual |
Reimplemented from inet::TCPSocket::CallbackInterface.
|
overrideprotectedvirtual |
Reimplemented from inet::TCPSocket::CallbackInterface.
|
inlineoverrideprotectedvirtual |
Reimplemented from inet::TCPSocket::CallbackInterface.
|
protectedvirtual |
Referenced by processHelloTimeout(), and socketEstablished().
|
protectedvirtual |
Referenced by processLABEL_WITHDRAW(), rebuildFecList(), and updateFecList().
|
protected |
|
protected |
|
protected |
|
protected |
Referenced by handleMessage(), and initialize().
|
protected |
Referenced by initialize(), processLDPHello(), and sendHelloTo().
|
protected |
Referenced by findPeerAddrFromInterface(), initialize(), processLDPHello(), and rebuildFecList().
|
protected |
Referenced by initialize(), processLABEL_MAPPING(), processLABEL_RELEASE(), processLABEL_REQUEST(), rebuildFecList(), and updateFecListEntry().
|
protected |
Referenced by initialize(), and rebuildFecList().
|
protected |
Referenced by findPeer(), findPeerAddrFromInterface(), findPeerSocket(), handleOperationStage(), initialize(), openTCPConnectionToPeer(), processHelloTimeout(), processLDPHello(), processMessageFromTCP(), socketClosed(), socketDataArrived(), socketEstablished(), socketFailure(), socketPeerClosed(), and ~LDP().
|
protected |
Referenced by initialize(), and isNodeUp().
|
protected |
Referenced by initialize(), processLABEL_MAPPING(), and processLABEL_REQUEST().
|
protected |
|
protected |
Referenced by handleMessage(), handleOperationStage(), initialize(), and ~LDP().
|
protected |
Referenced by initialize().
|
protected |
Referenced by openTCPConnectionToPeer(), and processMessageFromTCP().
|
protected |
Referenced by initialize(), processHelloTimeout(), and processLDPHello().
|
protected |
Referenced by initialize(), and sendHelloTo().
|
protected |
Referenced by initialize(), and sendHelloTo().