A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
packet-socket-helper.h
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
9#ifndef PACKET_SOCKET_HELPER_H
10#define PACKET_SOCKET_HELPER_H
11
12#include "node-container.h"
13
14namespace ns3
15{
16
17/**
18 * @brief Give ns3::PacketSocket powers to ns3::Node.
19 */
21{
22 public:
23 /**
24 * Aggregate an instance of a ns3::PacketSocketFactory onto the provided
25 * node.
26 *
27 * @param node Node on which to aggregate the ns3::PacketSocketFactory.
28 */
29 void Install(Ptr<Node> node) const;
30
31 /**
32 * Aggregate an instance of a ns3::PacketSocketFactory onto the provided
33 * node.
34 *
35 * @param nodeName The name of the node on which to aggregate the ns3::PacketSocketFactory.
36 */
37 void Install(std::string nodeName) const;
38
39 /**
40 * For each node in the provided container, aggregate an instance of a
41 * ns3::PacketSocketFactory.
42 *
43 * @param c NodeContainer of the set of nodes to aggregate the
44 * ns3::PacketSocketFactory on.
45 */
46 void Install(NodeContainer c) const;
47};
48
49} // namespace ns3
50
51#endif /* PACKET_SOCKET_HELPER_H */
keep track of a set of node pointers.
Give ns3::PacketSocket powers to ns3::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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.