Commits

Marcin Mincer  committed 7122670

two kinds of tcp app possible on one host

  • Participants
  • Parent commits 893c6c3

Comments (0)

Files changed (1)

File src/nodes/inet/StandardHost.ned

         @labels(node,ethernet-node);
         @display("i=device/pc2");
         int numTcpApps = default(0);
+        int secondNumTcpApps = default(0);
         int numUdpApps = default(0);
         int numSctpApps = default(0);
         string tcpAppType = default("n/a");
+        string secondTcpAppType = default("n/a");
         string udpAppType = default("n/a");
         string sctpAppType = default("n/a");
         string tcpType = default("TCP");  // tcp implementation (e.g. TCP, TCP_old, TCP_NSC)
             parameters:
                 @display("p=186,54");
         }
+        secondTcpApp[secondNumTcpApps]: <secondTcpAppType> like TCPApp {
+        }
         tcp: <tcpType> like ITCP {
             parameters:
                 @display("p=186,141");
             tcpApp[i].tcpOut --> tcp.appIn++;
             tcpApp[i].tcpIn <-- tcp.appOut++;
         }
+        
+        for i=0..secondNumTcpApps-1 {
+            secondTcpApp[i].tcpOut --> tcp.appIn++;
+            secondTcpApp[i].tcpIn <-- tcp.appOut++;
+        }
 
         tcp.ipOut --> networkLayer.tcpIn;
         tcp.ipIn <-- networkLayer.tcpOut;