File Nodes/MPLS/LDP_LSR.ned
Contains:
import
"NotificationBoard",
"RoutingTable",
"InterfaceTable",
"NetworkLayer",
"LDP",
"TCP",
"UDP",
"LinkStateRouting",
"TED",
"MPLS",
"PPPInterface",
"LIBTable",
"NAMTraceWriter";
module LDP_LSR
parameters:
holdTime: numeric,
helloInterval: numeric,
namid: numeric,
peers: string,
routerId: string,
routingFile: string;
gates:
in: in[];
out: out[];
submodules:
notificationBoard: NotificationBoard;
display: "p=70,60;i=block/control";
interfaceTable: InterfaceTable;
display: "p=70,150;i=block/table";
routingTable: RoutingTable;
parameters:
IPForward = true,
routerId = routerId,
routingFile = routingFile;
display: "p=70,240;i=block/table";
ldp: LDP;
parameters:
holdTime = holdTime,
helloInterval = helloInterval;
display: "p=222,67;i=block/control";
ted: TED;
display: "p=340,244;i=block/table";
linkStateRouting: LinkStateRouting;
parameters:
peers = peers;
display: "p=360,150;i=block/network2";
tcp: TCP;
display: "p=177,145;i=block/wheelbarrow";
udp: UDP;
display: "p=267,145;i=block/transport";
networkLayer: NetworkLayer;
gatesizes:
ifIn[sizeof(out)],
ifOut[sizeof(out)];
display: "p=224,223;i=block/fork";
ppp: PPPInterface[sizeof(out)];
display: "p=105,388,row,90;q=l2queue;i=block/ifcard";
mpls: MPLS;
parameters:
classifier = "ldp";
gatesizes:
netwIn[sizeof(out)],
netwOut[sizeof(out)],
ifIn[sizeof(out)],
ifOut[sizeof(out)];
display: "p=224,302;i=block/switch";
libTable: LIBTable;
parameters:
display: "p=340,305;i=block/table2";
namTrace: NAMTraceWriter;
parameters:
namid = namid;
display: "p=70,310;i=old/floppy1";
connections nocheck:
linkStateRouting.to_ip --> networkLayer.OSPFIn;
linkStateRouting.from_ip <-- networkLayer.OSPFOut;
ldp.tcpIn <-- tcp.to_appl++;
ldp.tcpOut --> tcp.from_appl++;
ldp.udpOut --> udp.from_app++;
ldp.udpIn <-- udp.to_app++;
udp.to_ip --> networkLayer.UDPIn;
udp.from_ip <-- networkLayer.UDPOut;
tcp.to_ip --> networkLayer.TCPIn;
tcp.from_ip <-- networkLayer.TCPOut;
for i=0..sizeof(out)-1 do
in[i] --> ppp[i].physIn;
out[i] <-- ppp[i].physOut;
ppp[i].netwOut --> mpls.ifIn[i];
ppp[i].netwIn <-- mpls.ifOut[i];
mpls.netwOut[i] --> networkLayer.ifIn[i];
mpls.netwIn[i] <-- networkLayer.ifOut[i];
endfor;
endmodule