use the InetSocketAddress API for ip sockets
This commit is contained in:
@@ -58,10 +58,10 @@
|
||||
#include "ns3/internet-node.h"
|
||||
#include "ns3/point-to-point-channel.h"
|
||||
#include "ns3/point-to-point-net-device.h"
|
||||
#include "ns3/mac-address.h"
|
||||
#include "ns3/ipv4-address.h"
|
||||
#include "ns3/ipv4.h"
|
||||
#include "ns3/socket.h"
|
||||
#include "ns3/inet-socket-address.h"
|
||||
#include "ns3/ipv4-route.h"
|
||||
#include "ns3/point-to-point-topology.h"
|
||||
#include "ns3/onoff-application.h"
|
||||
@@ -82,7 +82,7 @@ int main (int argc, char *argv[])
|
||||
DebugComponentEnable ("PointToPointChannel");
|
||||
DebugComponentEnable ("PointToPointNetDevice");
|
||||
DebugComponentEnable ("GlobalRouter");
|
||||
DebugComponentEnable ("GlobalRouteManager");
|
||||
DebugComponentEnable ("GlobalRouteMaager");
|
||||
#endif
|
||||
|
||||
// Set up some default values for the simulation. Use the Bind ()
|
||||
@@ -143,8 +143,7 @@ int main (int argc, char *argv[])
|
||||
// 210 bytes at a rate of 448 Kb/s
|
||||
Ptr<OnOffApplication> ooff = Create<OnOffApplication> (
|
||||
n0,
|
||||
Ipv4Address ("10.1.3.2"),
|
||||
80,
|
||||
InetSocketAddress ("10.1.3.2", 80).ConvertTo (),
|
||||
"Udp",
|
||||
ConstantVariable (1),
|
||||
ConstantVariable (0));
|
||||
@@ -155,8 +154,7 @@ int main (int argc, char *argv[])
|
||||
// Create a similar flow from n3 to n1, starting at time 1.1 seconds
|
||||
ooff = Create<OnOffApplication> (
|
||||
n3,
|
||||
Ipv4Address ("10.1.2.1"),
|
||||
80,
|
||||
InetSocketAddress ("10.1.2.1", 80).ConvertTo (),
|
||||
"Udp",
|
||||
ConstantVariable (1),
|
||||
ConstantVariable (0));
|
||||
|
||||
Reference in New Issue
Block a user