A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
bridge-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
* Author: Gustavo Carneiro <gjc@inescporto.pt>
8
*/
9
#ifndef BRIDGE_HELPER_H
10
#define BRIDGE_HELPER_H
11
12
#include "ns3/net-device-container.h"
13
#include "ns3/object-factory.h"
14
15
#include <string>
16
17
/**
18
* \file
19
* \ingroup bridge
20
* ns3::BridgeHelper declaration.
21
*/
22
23
namespace
ns3
24
{
25
26
class
Node;
27
class
AttributeValue;
28
29
/**
30
* \ingroup bridge
31
* \brief Add capability to bridge multiple LAN segments (IEEE 802.1D bridging)
32
*/
33
class
BridgeHelper
34
{
35
public
:
36
/*
37
* Construct a BridgeHelper
38
*/
39
BridgeHelper
();
40
/**
41
* Set an attribute on each ns3::BridgeNetDevice created by
42
* BridgeHelper::Install
43
*
44
* \param n1 the name of the attribute to set
45
* \param v1 the value of the attribute to set
46
*/
47
void
SetDeviceAttribute
(std::string n1,
const
AttributeValue
& v1);
48
/**
49
* This method creates an ns3::BridgeNetDevice with the attributes
50
* configured by BridgeHelper::SetDeviceAttribute, adds the device
51
* to the node, and attaches the given NetDevices as ports of the
52
* bridge.
53
*
54
* \param node The node to install the device in
55
* \param c Container of NetDevices to add as bridge ports
56
* \returns A container holding the added net device.
57
*/
58
NetDeviceContainer
Install
(
Ptr<Node>
node,
NetDeviceContainer
c);
59
/**
60
* This method creates an ns3::BridgeNetDevice with the attributes
61
* configured by BridgeHelper::SetDeviceAttribute, adds the device
62
* to the node, and attaches the given NetDevices as ports of the
63
* bridge.
64
*
65
* \param nodeName The name of the node to install the device in
66
* \param c Container of NetDevices to add as bridge ports
67
* \returns A container holding the added net device.
68
*/
69
NetDeviceContainer
Install
(std::string nodeName,
NetDeviceContainer
c);
70
71
private
:
72
ObjectFactory
m_deviceFactory
;
//!< Object factory
73
};
74
75
}
// namespace ns3
76
77
#endif
/* BRIDGE_HELPER_H */
ns3::AttributeValue
Hold a value for an Attribute.
Definition
attribute.h:59
ns3::BridgeHelper
Add capability to bridge multiple LAN segments (IEEE 802.1D bridging)
Definition
bridge-helper.h:34
ns3::BridgeHelper::SetDeviceAttribute
void SetDeviceAttribute(std::string n1, const AttributeValue &v1)
Set an attribute on each ns3::BridgeNetDevice created by BridgeHelper::Install.
Definition
bridge-helper.cc:32
ns3::BridgeHelper::m_deviceFactory
ObjectFactory m_deviceFactory
Object factory.
Definition
bridge-helper.h:72
ns3::BridgeHelper::Install
NetDeviceContainer Install(Ptr< Node > node, NetDeviceContainer c)
This method creates an ns3::BridgeNetDevice with the attributes configured by BridgeHelper::SetDevice...
Definition
bridge-helper.cc:39
ns3::BridgeHelper::BridgeHelper
BridgeHelper()
Definition
bridge-helper.cc:25
ns3::NetDeviceContainer
holds a vector of ns3::NetDevice pointers
Definition
net-device-container.h:32
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition
object-factory.h:37
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
bridge
helper
bridge-helper.h
Generated on Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0