Ldp

Package: inet.networklayer.ldp

Ldp

simple module

Handles and processes LDP messages.

The LDP protocol is used by one LSR (Label Switched Router) to inform another LSR of the label bindings it has made. The LSR uses this protocol to establish label switched paths through a network by mapping network layer routing information directly to data-link layer switched paths.

Operations

All LDP message types are subclassed from LdpPacket, and include LdpHello, LdpNotify, LdpLabelRequest, LdpIni and LdpAddress.

Message processing in the Ldp module is explained in LDP Message Processing

Author: Vojta Janota

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Used in compound modules

Name Type Description
LdpMplsRouter compound module

An LDP-capable router.

Parameters

Name Type Default value Description
interfaceTableModule string

The path to the InterfaceTable module

routingTableModule string
libTableModule string
tedModule string
holdTime double 15s
helloInterval double 5s
stopOperationExtraTime double -1s

extra time after lifecycle stop operation finished

stopOperationTimeout double 2s

timeout value for lifecycle stop operation

Properties

Name Value Description
display i=block/control
lifecycleSupport

Gates

Name Direction Size Description
socketIn input
socketOut output

Scheduled messages (observed)

msgkindctrltagsmsgnamecontext
omnetpp::cMessage0LDPSendHello

Direct method calls (observed)

call tofunctioninfo
MessageDispatcherinet::MessageDispatcher::arrivedarrived
ScenarioManagerinet::ScenarioManager::moduleOperationStageCompletedmoduleOperationStageCompleted

Called methods (observed)

functioninfocall from
inet::Ldp::handleOperationStagehandleOperationStageScenarioManager
inet::Ldp::receiveSignalrouteAddedIpv4RoutingTable
inet::Ldp::receiveSignalrouteDeletedIpv4RoutingTable

Incoming messages (observed)

gatemsgkindctrlsrcModuletags
socketInIndication2 (UdpStatusInd::UDP_I_SOCKET_CLOSED)UdpSocketClosedIndicationUdpSocketInd
socketInIndication6 (TcpStatusInd::TCP_I_CLOSED)TcpCommandTcpSocketInd

Outgoing messages (observed)

gatemsgkindctrldestModuletags
socketOutPacket0 (UdpCommandCode::UDP_C_DATA)UdpDispatchProtocolReq, L3AddressReq, L4PortReq, SocketReq
socketOutRequest1 (UdpCommandCode::UDP_C_BIND)UdpBindCommandUdpDispatchProtocolReq, SocketReq
socketOutRequest2 (TcpCommandCode::TCP_C_OPEN_PASSIVE)TcpOpenCommandTcpDispatchProtocolReq, SocketReq
socketOutRequest3 (UdpCommandCode::UDP_C_SETOPTION)UdpSetMulticastInterfaceCommandUdpDispatchProtocolReq, SocketReq
socketOutRequest3 (UdpCommandCode::UDP_C_SETOPTION)UdpSetMulticastLoopCommandUdpDispatchProtocolReq, SocketReq
socketOutRequest4 (UdpCommandCode::UDP_C_CLOSE)UdpCloseCommandUdpDispatchProtocolReq, SocketReq
socketOutRequest5 (TcpCommandCode::TCP_C_CLOSE)TcpCommandTcpDispatchProtocolReq, SocketReq

Packet operations (observed)

chunkTypepacketAction
LdpHelloinsertAtBack

Shared Tagging operations (observed)

tagTypetagAction
DispatchProtocolReqaddTagIfAbsent
L3AddressReqaddTagIfAbsent
L4PortReqaddTagIfAbsent
SocketIndfindTag, getTag
SocketReqaddTagIfAbsent

Tagging operations (observed)

tagTypetagAction
inet::Ipv4InterfaceDatafindTag

Source code

//
// Handles and processes LDP messages.
//
// The LDP protocol is used by one LSR (Label Switched Router) to inform
// another LSR of the label bindings it has made. The LSR uses this protocol
// to establish label switched paths through a network by mapping network layer
// routing information directly to data-link layer switched paths.
//
// Operations
//
// All LDP message types are subclassed from ~LdpPacket, and include
// ~LdpHello, ~LdpNotify, ~LdpLabelRequest, ~LdpIni and ~LdpAddress.
//
// Message processing in the ~Ldp module is explained in
// <a href="ldp-processing.html">LDP Message Processing</a>
//
// @author Vojta Janota
//
simple Ldp like IApp
{
    parameters:
        string interfaceTableModule;   // The path to the InterfaceTable module
        string routingTableModule;
        string libTableModule;
        string tedModule;
        double holdTime @unit(s) = default(15s);
        double helloInterval @unit(s) = default(5s);
        @display("i=block/control");
        @lifecycleSupport;
        double stopOperationExtraTime @unit(s) = default(-1s);    // extra time after lifecycle stop operation finished
        double stopOperationTimeout @unit(s) = default(2s);    // timeout value for lifecycle stop operation

    gates:
        input socketIn @labels(TcpCommand/up,UdpControlInfo/up);
        output socketOut @labels(TcpCommand/down,UdpControlInfo/down);
}

File: src/inet/networklayer/ldp/Ldp.ned