equal
deleted
inserted
replaced
19 */ |
19 */ |
20 |
20 |
21 #include "packet-sink-helper.h" |
21 #include "packet-sink-helper.h" |
22 #include "ns3/string.h" |
22 #include "ns3/string.h" |
23 #include "ns3/inet-socket-address.h" |
23 #include "ns3/inet-socket-address.h" |
|
24 #include "ns3/object-names.h" |
24 |
25 |
25 namespace ns3 { |
26 namespace ns3 { |
26 |
27 |
27 PacketSinkHelper::PacketSinkHelper (std::string protocol, Address address) |
28 PacketSinkHelper::PacketSinkHelper (std::string protocol, Address address) |
28 { |
29 { |
58 { |
59 { |
59 return ApplicationContainer (InstallPriv (node)); |
60 return ApplicationContainer (InstallPriv (node)); |
60 } |
61 } |
61 |
62 |
62 ApplicationContainer |
63 ApplicationContainer |
|
64 PacketSinkHelper::Install (std::string nodeName) const |
|
65 { |
|
66 Ptr<Node> node = Names::Find<Node> (nodeName); |
|
67 return ApplicationContainer (InstallPriv (node)); |
|
68 } |
|
69 |
|
70 ApplicationContainer |
63 PacketSinkHelper::Install (NodeContainer c) const |
71 PacketSinkHelper::Install (NodeContainer c) const |
64 { |
72 { |
65 ApplicationContainer apps; |
73 ApplicationContainer apps; |
66 for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
74 for (NodeContainer::Iterator i = c.Begin (); i != c.End (); ++i) |
67 { |
75 { |