SetupUdp -> SetUdpLocal, SetupTcp -> SetTcpLocal
This commit is contained in:
@@ -106,7 +106,7 @@ main (int argc, char *argv[])
|
||||
|
||||
// Create an optional packet sink to receive these packets
|
||||
PacketSinkHelper sink;
|
||||
sink.SetupUdp (Ipv4Address::GetAny (), port);
|
||||
sink.SetUdpLocal (Ipv4Address::GetAny (), port);
|
||||
sink.Install (c0.Get (1));
|
||||
sink.Install (c1.Get (1));
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ main (int argc, char *argv[])
|
||||
|
||||
// Create an optional packet sink to receive these packets
|
||||
PacketSinkHelper sink;
|
||||
sink.SetupUdp (Ipv4Address::GetAny(), multicastPort);
|
||||
sink.SetUdpLocal (Ipv4Address::GetAny(), multicastPort);
|
||||
ApplicationContainer sinkC = sink.Install (c1.Get (2)); // Node n4
|
||||
// Start the sink
|
||||
sinkC.Start (Seconds (1.0));
|
||||
|
||||
@@ -106,7 +106,7 @@ main (int argc, char *argv[])
|
||||
|
||||
// Create an optional packet sink to receive these packets
|
||||
PacketSinkHelper sink;
|
||||
sink.SetupUdp (Ipv4Address::GetAny (), port);
|
||||
sink.SetUdpLocal (Ipv4Address::GetAny (), port);
|
||||
sink.Install (c.Get (1));
|
||||
|
||||
//
|
||||
|
||||
@@ -150,7 +150,7 @@ main (int argc, char *argv[])
|
||||
|
||||
// Create a packet sink to receive these packets
|
||||
PacketSinkHelper sink;
|
||||
sink.SetupUdp (Ipv4Address::GetAny (), port);
|
||||
sink.SetUdpLocal (Ipv4Address::GetAny (), port);
|
||||
apps = sink.Install (c.Get (1));
|
||||
apps.Start (Seconds (1.1));
|
||||
apps.Stop (Seconds (10.0));
|
||||
|
||||
@@ -130,7 +130,7 @@ main (int argc, char *argv[])
|
||||
|
||||
// Create an optional packet sink to receive these packets
|
||||
PacketSinkHelper sink;
|
||||
sink.SetupUdp (Ipv4Address::GetAny (), port);
|
||||
sink.SetUdpLocal (Ipv4Address::GetAny (), port);
|
||||
apps = sink.Install (c.Get (3));
|
||||
apps.Start (Seconds (1.0));
|
||||
apps.Stop (Seconds (10.0));
|
||||
@@ -142,7 +142,7 @@ main (int argc, char *argv[])
|
||||
apps.Stop (Seconds(10.0));
|
||||
|
||||
// Create a packet sink to receive these packets
|
||||
sink.SetupUdp (Ipv4Address::GetAny (), port);
|
||||
sink.SetUdpLocal (Ipv4Address::GetAny (), port);
|
||||
apps = sink.Install (c.Get (1));
|
||||
apps.Start (Seconds (1.1));
|
||||
apps.Stop (Seconds (10.0));
|
||||
|
||||
@@ -131,7 +131,7 @@ main (int argc, char *argv[])
|
||||
|
||||
// Create a packet sink to receive these packets
|
||||
PacketSinkHelper sink;
|
||||
sink.SetupUdp (Ipv4Address::GetAny (), port);
|
||||
sink.SetUdpLocal (Ipv4Address::GetAny (), port);
|
||||
apps = sink.Install (c.Get (3));
|
||||
apps.Start (Seconds (1.0));
|
||||
apps.Stop (Seconds (10.0));
|
||||
|
||||
@@ -135,7 +135,7 @@ main (int argc, char *argv[])
|
||||
|
||||
// Create a packet sink to receive these packets
|
||||
PacketSinkHelper sink;
|
||||
sink.SetupUdp (Ipv4Address::GetAny (), port);
|
||||
sink.SetUdpLocal (Ipv4Address::GetAny (), port);
|
||||
apps = sink.Install (c.Get (3));
|
||||
apps.Start (Seconds (1.0));
|
||||
apps.Stop (Seconds (10.0));
|
||||
|
||||
@@ -170,7 +170,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
// Create a packet sink to receive these packets
|
||||
PacketSinkHelper sink;
|
||||
sink.SetupTcp (Ipv4Address::GetAny (), servPort);
|
||||
sink.SetTcpLocal (Ipv4Address::GetAny (), servPort);
|
||||
ApplicationContainer apps = sink.Install (c1.Get (1));
|
||||
apps.Start (Seconds (0.0));
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@ PacketSinkHelper::PacketSinkHelper ()
|
||||
}
|
||||
|
||||
void
|
||||
PacketSinkHelper::SetupUdp (Ipv4Address ip, uint16_t port)
|
||||
PacketSinkHelper::SetUdpLocal (Ipv4Address ip, uint16_t port)
|
||||
{
|
||||
m_factory.Set ("Protocol", String ("ns3::Udp"));
|
||||
m_factory.Set ("Local", Address (InetSocketAddress (ip, port)));
|
||||
}
|
||||
void
|
||||
PacketSinkHelper::SetupTcp (Ipv4Address ip, uint16_t port)
|
||||
PacketSinkHelper::SetTcpLocal (Ipv4Address ip, uint16_t port)
|
||||
{
|
||||
m_factory.Set ("Protocol", String ("ns3::Tcp"));
|
||||
m_factory.Set ("Local", Address (InetSocketAddress (ip, port)));
|
||||
|
||||
@@ -32,8 +32,8 @@ class PacketSinkHelper
|
||||
public:
|
||||
PacketSinkHelper ();
|
||||
|
||||
void SetupUdp (Ipv4Address ip, uint16_t port);
|
||||
void SetupTcp (Ipv4Address ip, uint16_t port);
|
||||
void SetUdpLocal (Ipv4Address ip, uint16_t port);
|
||||
void SetTcpLocal (Ipv4Address ip, uint16_t port);
|
||||
|
||||
ApplicationContainer Install (NodeContainer c);
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user