1.1 --- a/src/helper/bridge-helper.h Fri Jul 03 09:08:01 2009 +0200
1.2 +++ b/src/helper/bridge-helper.h Fri Jul 03 14:12:28 2009 +0100
1.3 @@ -1,3 +1,23 @@
1.4 +/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
1.5 +/*
1.6 + * Copyright (c) 2008 INRIA
1.7 + *
1.8 + * This program is free software; you can redistribute it and/or modify
1.9 + * it under the terms of the GNU General Public License version 2 as
1.10 + * published by the Free Software Foundation;
1.11 + *
1.12 + * This program is distributed in the hope that it will be useful,
1.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.15 + * GNU General Public License for more details.
1.16 + *
1.17 + * You should have received a copy of the GNU General Public License
1.18 + * along with this program; if not, write to the Free Software
1.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
1.20 + *
1.21 + * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
1.22 + * Author: Gustavo Carneiro <gjc@inescporto.pt>
1.23 + */
1.24 #ifndef BRIDGE_HELPER_H
1.25 #define BRIDGE_HELPER_H
1.26
1.27 @@ -10,12 +30,42 @@
1.28 class Node;
1.29 class AttributeValue;
1.30
1.31 +/**
1.32 + * \brief Add capability to bridge multiple LAN segments (IEEE 802.1D bridging)
1.33 + */
1.34 class BridgeHelper
1.35 {
1.36 public:
1.37 BridgeHelper ();
1.38 + /**
1.39 + * \param n1 the name of the attribute to set
1.40 + * \param v1 the value of the attribute to set
1.41 + *
1.42 + * Set an attribute on each ns3::BridgeNetDevice created by
1.43 + * BridgeHelper::Install
1.44 + */
1.45 void SetDeviceAttribute (std::string n1, const AttributeValue &v1);
1.46 + /**
1.47 + * This method creates an ns3::BridgeNetDevice with the attributes
1.48 + * configured by BridgeHelper::SetDeviceAttribute, adds the device
1.49 + * to the node, and attaches the given NetDevices as ports of the
1.50 + * bridge.
1.51 + *
1.52 + * \param node The node to install the device in
1.53 + * \param c Container of NetDevices to add as bridge ports
1.54 + * \returns A containter holding the added net device.
1.55 + */
1.56 NetDeviceContainer Install (Ptr<Node> node, NetDeviceContainer c);
1.57 + /**
1.58 + * This method creates an ns3::BridgeNetDevice with the attributes
1.59 + * configured by BridgeHelper::SetDeviceAttribute, adds the device
1.60 + * to the node, and attaches the given NetDevices as ports of the
1.61 + * bridge.
1.62 + *
1.63 + * \param nodeName The name of the node to install the device in
1.64 + * \param c Container of NetDevices to add as bridge ports
1.65 + * \returns A containter holding the added net device.
1.66 + */
1.67 NetDeviceContainer Install (std::string nodeName, NetDeviceContainer c);
1.68 private:
1.69 ObjectFactory m_deviceFactory;