src/helper/packet-sink-helper.cc
changeset 4140 6bbf05bf4826
parent 3848 affd0834debc
child 4147 5d8530130930
equal deleted inserted replaced
4139:d45e62c78504 4140:6bbf05bf4826
    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     {