A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
packet-socket-helper.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008 INRIA
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8
10
11#include "ns3/names.h"
12#include "ns3/packet-socket-factory.h"
13
14namespace ns3
15{
16
17void
19{
20 for (auto i = c.Begin(); i != c.End(); ++i)
21 {
22 Install(*i);
23 }
24}
25
26void
32
33void
35{
36 Ptr<Node> node = Names::Find<Node>(nodeName);
37 Install(node);
38}
39
40} // namespace ns3
keep track of a set of node pointers.
void Install(std::string nodeName) const
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node.
void Install(Ptr< Node > node) const
Aggregate an instance of a ns3::PacketSocketFactory onto the provided node.
Smart pointer class similar to boost::intrusive_ptr.
Definition ptr.h:66
Ptr< T > Create(Ts &&... args)
Create class instances by constructors with varying numbers of arguments and return them by Ptr.
Definition ptr.h:436
Every class exported by the ns3 library is enclosed in the ns3 namespace.