tutorial/tutorial-csma-echo-pcap-trace.cc
changeset 2592 3ebf97150166
parent 2494 1c69ea12779c
child 2600 6c389d0c717d
equal deleted inserted replaced
2591:83a605082fb6 2592:3ebf97150166
    68   CsmaIpv4Topology::AddIpv4Address (n3, nd3, "10.1.1.4", "255.255.255.0");
    68   CsmaIpv4Topology::AddIpv4Address (n3, nd3, "10.1.1.4", "255.255.255.0");
    69 
    69 
    70   uint16_t port = 7;
    70   uint16_t port = 7;
    71 
    71 
    72   Ptr<UdpEchoClient> client = 
    72   Ptr<UdpEchoClient> client = 
    73     CreateObjectWith<UdpEchoClient> ("Node", n0, 
    73     CreateObject<UdpEchoClient> ("Node", n0, 
    74                                      "RemoteIpv4", Ipv4Address ("10.1.1.2"),
    74                                      "RemoteIpv4", Ipv4Address ("10.1.1.2"),
    75                                      "RemotePort", Uinteger (port), 
    75                                      "RemotePort", Uinteger (port), 
    76                                      "MaxPackets", Uinteger (1), 
    76                                      "MaxPackets", Uinteger (1), 
    77                                      "Interval", Seconds(1.), 
    77                                      "Interval", Seconds(1.), 
    78                                      "PacketSize", Uinteger (1024));
    78                                      "PacketSize", Uinteger (1024));
    79   n0->AddApplication (client);
    79   n0->AddApplication (client);
    80 
    80 
    81   Ptr<UdpEchoServer> server = 
    81   Ptr<UdpEchoServer> server = 
    82     CreateObjectWith<UdpEchoServer> ("Node", n1, 
    82     CreateObject<UdpEchoServer> ("Node", n1, 
    83                                      "Port", Uinteger (port));
    83                                      "Port", Uinteger (port));
    84   n1->AddApplication (server);
    84   n1->AddApplication (server);
    85 
    85 
    86   server->Start(Seconds(1.));
    86   server->Start(Seconds(1.));
    87   client->Start(Seconds(2.));
    87   client->Start(Seconds(2.));