File Nodes/INET/TCPSpoofingHost.ned
Contains:
import
"NotificationBoard",
"NAMTraceWriter",
"InterfaceTable",
"RoutingTable",
"TCPApp.ned",
"TCP.ned",
"UDP",
"UDPApp",
"TCPSpoof",
"NetworkLayer",
"PingApp",
"PPPInterface",
"EthernetInterface";
module TCPSpoofingHost
parameters:
numTcpApps: numeric const,
numUdpApps: numeric const,
tcpAppType: string,
udpAppType: string,
IPForward: bool,
namid: numeric const,
routingFile: string;
gates:
in: in[];
out: out[];
in: ethIn[];
out: ethOut[];
submodules:
namTrace: NAMTraceWriter;
parameters:
namid = namid;
display: "p=71,294;i=block/sink";
notificationBoard: NotificationBoard;
display: "p=71,54;i=block/control";
interfaceTable: InterfaceTable;
display: "p=71,134;i=block/table";
routingTable: RoutingTable;
parameters:
IPForward = IPForward,
routerId = "",
routingFile = routingFile;
display: "p=71,214;i=block/table";
tcpSpoof: TCPSpoof;
display: "p=168,122;i=block/square";
networkLayer: NetworkLayer;
parameters:
proxyARP = false;
gatesizes:
ifIn[sizeof(out)+sizeof(ethOut)],
ifOut[sizeof(out)+sizeof(ethOut)];
display: "p=248,247;i=block/fork;q=queue";
ppp: PPPInterface[sizeof(out)];
display: "p=205,350,row,90;q=txQueue;i=block/ifcard";
eth: EthernetInterface[sizeof(ethOut)];
display: "p=240,350,row,90;q=txQueue;i=block/ifcard";
connections nocheck:
tcpSpoof.ipv4Out --> networkLayer.TCPIn;
for i=0..sizeof(out)-1 do
in[i] --> ppp[i].physIn;
out[i] <-- ppp[i].physOut;
ppp[i].netwOut --> networkLayer.ifIn[i];
ppp[i].netwIn <-- networkLayer.ifOut[i];
endfor;
for i=0..sizeof(ethOut)-1 do
ethIn[i] --> eth[i].physIn;
ethOut[i] <-- eth[i].physOut;
eth[i].netwOut --> networkLayer.ifIn[sizeof(out)+i];
eth[i].netwIn <-- networkLayer.ifOut[sizeof(out)+i];
endfor;
endmodule