mirror of
https://gitlab.ibr.cs.tu-bs.de/tschuber/ns-3-leo.git
synced 2025-06-08 18:13:57 +02:00
fixup: UDP server address
This commit is contained in:
parent
db949c09de
commit
533ed74a20
1 changed files with 3 additions and 2 deletions
|
@ -80,11 +80,12 @@ int main (int argc, char *argv[])
|
||||||
|
|
||||||
// we want to ping terminals
|
// we want to ping terminals
|
||||||
UdpEchoServerHelper echoServer (9);
|
UdpEchoServerHelper echoServer (9);
|
||||||
ApplicationContainer serverApps = echoServer.Install (stations.Get (1));
|
ApplicationContainer serverApps = echoServer.Install (stations);
|
||||||
|
|
||||||
// install a client on one of the terminals
|
// install a client on one of the terminals
|
||||||
ApplicationContainer clientApps;
|
ApplicationContainer clientApps;
|
||||||
Address remote = utIp.GetAddress (3, 0);
|
Address remote = stations.Get (1)->GetObject<Ipv4> ()->GetAddress (1, 0).GetLocal ();//utIp.GetAddress (1, 0);
|
||||||
|
std::cerr << remote << std::endl;
|
||||||
UdpEchoClientHelper echoClient (remote, 9);
|
UdpEchoClientHelper echoClient (remote, 9);
|
||||||
echoClient.SetAttribute ("MaxPackets", UintegerValue (10));
|
echoClient.SetAttribute ("MaxPackets", UintegerValue (10));
|
||||||
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
|
echoClient.SetAttribute ("Interval", TimeValue (Seconds (1.0)));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue