A Discrete-Event Network Simulator
API
tap-bridge-helper.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2009 University of Washington
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  */
17 
18 #ifndef TAP_BRIDGE_HELPER_H
19 #define TAP_BRIDGE_HELPER_H
20 
21 #include "ns3/net-device-container.h"
22 #include "ns3/object-factory.h"
23 #include "ns3/tap-bridge.h"
24 
25 #include <string>
26 
27 namespace ns3
28 {
29 
30 class Node;
31 class AttributeValue;
32 
38 {
39  public:
46 
56 
64  void SetAttribute(std::string n1, const AttributeValue& v1);
65 
76 
87  Ptr<NetDevice> Install(std::string nodeName, Ptr<NetDevice> nd);
88 
99  Ptr<NetDevice> Install(Ptr<Node> node, std::string ndName);
100 
113  Ptr<NetDevice> Install(std::string nodeName, std::string ndName);
114 
128  Ptr<NetDevice> Install(Ptr<Node> node, Ptr<NetDevice> nd, const AttributeValue& bridgeType);
129 
130  private:
132 };
133 
134 } // namespace ns3
135 
136 #endif /* TAP_BRIDGE_HELPER_H */
Hold a value for an Attribute.
Definition: attribute.h:70
Ipv4 addresses are stored in host order in this class.
Definition: ipv4-address.h:42
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
build TapBridge to allow ns-3 simulations to interact with Linux tap devices and processes on the Lin...
Ptr< NetDevice > Install(Ptr< Node > node, Ptr< NetDevice > nd)
This method installs a TapBridge on the specified Node and forms the bridge with the NetDevice specif...
TapBridgeHelper()
Construct a TapBridgeHelper to make life easier for people wanting to have their simulations interact...
void SetAttribute(std::string n1, const AttributeValue &v1)
Set an attribute in the underlying TapBridge net device when these devices are automatically created.
ObjectFactory m_deviceFactory
Object factory.
Every class exported by the ns3 library is enclosed in the ns3 namespace.