/** Interference start **/
InternetStackHelper iStack;
Ipv4StaticRoutingHelper staticRouting;
iStack.SetRoutingHelper (staticRouting);
Ipv4InterfaceContainer iApInterface;
InternetStackHelper stack; stack.Install (csmaNodes); stack.Install (wifiStaNodes);
Ipv4AddressHelper address;
// Create the wired addresses. address.SetBase ("10.1.0.0", "255.255.255.0"); Ipv4InterfaceContainer csmaInterfaces; csmaInterfaces = address.Assign (csmaDevices);
// Create the wifi addresses. address.NewNetwork(); address.Assign (staDevices); address.Assign (apDevices);
/** Interference start **/ InternetStackHelper iStack; Ipv4StaticRoutingHelper staticRouting; iStack.SetRoutingHelper (staticRouting); Ipv4InterfaceContainer iApInterface;
if (interference) { iStack.Install(iWifiStaNodes); iStack.Install(iWifiApNode); address.NewNetwork(); address.Assign (iStaDevices); iApInterface = address.Assign (iApDevice); }
InternetStackHelper stack; Ipv4StaticRoutingHelper staticRouting; // added this stack.SetRoutingHelper (staticRouting); // added this stack.Install (csmaNodes); stack.Install (wifiStaNodes);
Ipv4AddressHelper address;
// Create the wired addresses. address.SetBase ("10.1.0.0", "255.255.255.0"); Ipv4InterfaceContainer csmaInterfaces; csmaInterfaces = address.Assign (csmaDevices);
// Create the wifi addresses. address.NewNetwork(); address.Assign (staDevices); address.Assign (apDevices);
/** Interference start **/ InternetStackHelper iStack;
Ipv4StaticRoutingHelper staticRoutingInterference; // added this iStack.SetRoutingHelper (staticRoutingInterference); // added this Ipv4InterfaceContainer iApInterface;
if (interference) { iStack.Install(iWifiStaNodes); iStack.Install(iWifiApNode); address.NewNetwork(); address.Assign (iStaDevices); iApInterface = address.Assign (iApDevice); }
The model assumes that all nodes on an ns-3 channel are reachable to one another, regardless of whether the nodes can use the channel successfully (in the case of wireless).
2 [node 0] CLOSED -> LISTEN
2 [node 2] Node 2 calculated wscale factor of 2 for buffer size 131072
2 [node 2] 2 Send a scaling factor of 2
2 [node 2] 2 Add option TS, ts=2000 echo=0
2 [node 2] CLOSED -> SYN_SENT
2.0255 [node 2] SYN_SENT -> CLOSED
Strangely, I can not figure out when and where the RST+ACK sent from the server is sent (I can not find the method from where it is initiated). (The RST from the client is sent via the SendRST() function.)
Kind regards, // Create a packet sink.
ObjectFactory factory;
factory.SetTypeId ("ns3::PacketSink");
factory.Set ("Protocol", StringValue ("ns3::TcpSocketFactory"));
factory.Set ("Local", AddressValue (sinkAddress));
Ptr<PacketSink> sinkApp = factory.Create<PacketSink> ();
wiredNodes.Get(0)->AddApplication (sinkApp);
ApplicationContainer sinkApps(sinkApp);
sinkApps.Start (Seconds (simStart));
sinkApps.Stop (Seconds (simStop));