equal
deleted
inserted
replaced
29 #include "ns3/nstime.h" |
29 #include "ns3/nstime.h" |
30 #include "ns3/internet-node.h" |
30 #include "ns3/internet-node.h" |
31 #include "ns3/ipv4-address.h" |
31 #include "ns3/ipv4-address.h" |
32 #include "ns3/ipv4.h" |
32 #include "ns3/ipv4.h" |
33 #include "ns3/queue.h" |
33 #include "ns3/queue.h" |
|
34 #include "ns3/drop-tail-queue.h" |
34 |
35 |
35 #include "point-to-point-channel.h" |
36 #include "point-to-point-channel.h" |
36 #include "point-to-point-net-device.h" |
37 #include "point-to-point-net-device.h" |
37 #include "point-to-point-topology.h" |
38 #include "point-to-point-topology.h" |
38 |
39 |
49 |
50 |
50 Ptr<PointToPointNetDevice> net1 = CreateObjectWith<PointToPointNetDevice> ("Node", n1, |
51 Ptr<PointToPointNetDevice> net1 = CreateObjectWith<PointToPointNetDevice> ("Node", n1, |
51 "Address", Mac48Address::Allocate ()); |
52 "Address", Mac48Address::Allocate ()); |
52 n1->AddDevice (net1); |
53 n1->AddDevice (net1); |
53 |
54 |
54 Ptr<Queue> q = Queue::CreateDefault (); |
55 Ptr<Queue> q = CreateObjectWith<DropTailQueue> (); |
55 net1->AddQueue(q); |
56 net1->AddQueue(q); |
56 net1->Attach (channel); |
57 net1->Attach (channel); |
57 |
58 |
58 Ptr<PointToPointNetDevice> net2 = CreateObjectWith<PointToPointNetDevice> ("Node", n2, |
59 Ptr<PointToPointNetDevice> net2 = CreateObjectWith<PointToPointNetDevice> ("Node", n2, |
59 "Address", Mac48Address::Allocate ()); |
60 "Address", Mac48Address::Allocate ()); |
60 n2->AddDevice (net2); |
61 n2->AddDevice (net2); |
61 |
62 |
62 q = Queue::CreateDefault (); |
63 q = CreateObjectWith<DropTailQueue> (); |
63 net2->AddQueue(q); |
64 net2->AddQueue(q); |
64 net2->Attach (channel); |
65 net2->Attach (channel); |
65 |
66 |
66 return channel; |
67 return channel; |
67 } |
68 } |