SetupUdp -> SetUdpLocal, SetupTcp -> SetTcpLocal

This commit is contained in:
Mathieu Lacage
2008-04-07 10:44:06 -07:00
parent 3a43bd4987
commit 4400054ebe
10 changed files with 13 additions and 13 deletions

View File

@@ -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));

View File

@@ -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));

View File

@@ -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));
//

View File

@@ -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));

View File

@@ -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));

View File

@@ -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));

View File

@@ -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));

View File

@@ -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));

View File

@@ -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)));

View File

@@ -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: