OLD | NEW |
(Empty) | |
| 1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
| 2 /* |
| 3 * Copyright (c) Waterford Institute of Technology, 2013, Julien Mineraud, BioFI
NT. |
| 4 * |
| 5 * This program is free software; you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 2 as |
| 7 * published by the Free Software Foundation; |
| 8 * |
| 9 * This program is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. |
| 13 * |
| 14 * You should have received a copy of the GNU General Public License |
| 15 * along with this program; if not, write to the Free Software |
| 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 * |
| 18 * Author: Julien Mineraud <julien.mineraud@gmail.com> |
| 19 * |
| 20 * Acknowledgements: |
| 21 * This work has received support from Science Foundation Ireland via the |
| 22 * "A Biologically inspired framework supporting network management for |
| 23 * the Future Internet" starting investigator award (grant no. 09/SIRG/I1643). |
| 24 */ |
| 25 |
| 26 #ifndef IPV4_PGBR_HELPER_H_ |
| 27 #define IPV4_PGBR_HELPER_H_ |
| 28 |
| 29 #include "ipv4-pgbr-gradient-calculator-helper.h" |
| 30 #include "ipv4-pgbr-flow-classifier-helper.h" |
| 31 #include "ns3/node-container.h" |
| 32 #include "ns3/ipv4-routing-helper.h" |
| 33 #include "ns3/object-factory.h" |
| 34 #include "ns3/net-device-container.h" |
| 35 #include "ns3/ipv4-interface-container.h" |
| 36 |
| 37 /*! |
| 38 * \namespace ns3::pgbr |
| 39 * Namespace regrouping all objects and functions to run PGBR. |
| 40 */ |
| 41 namespace ns3 { |
| 42 namespace pgbr { |
| 43 |
| 44 /*! |
| 45 * \class Ipv4PgbrHelper |
| 46 * \brief Helper class for PGBR routing mechanism. |
| 47 * |
| 48 * This class is expected to be used in conjunction with |
| 49 * ns3::InternetStackHelper::SetRoutingHelper |
| 50 */ |
| 51 class Ipv4PgbrHelper : public Ipv4RoutingHelper |
| 52 { |
| 53 public: |
| 54 /*! |
| 55 * Create an Ipv4PgbrHelper that makes life easier for people who want to inst
all |
| 56 * Pgbr routing to nodes. |
| 57 */ |
| 58 Ipv4PgbrHelper (); |
| 59 |
| 60 virtual ~Ipv4PgbrHelper (void); |
| 61 |
| 62 /*! |
| 63 * \brief Construct an Ipv4PgbrHelper from another previously initialized inst
ance |
| 64 * (Copy Constructor). |
| 65 */ |
| 66 Ipv4PgbrHelper (const Ipv4PgbrHelper &ph); |
| 67 |
| 68 /*! |
| 69 * \internal |
| 70 * \returns pointer to clone of this Ipv4PgbrHelper |
| 71 * |
| 72 * This method is mainly for internal use by the other helpers; |
| 73 * clients are expected to free the dynamic memory allocated by this method |
| 74 */ |
| 75 Ipv4PgbrHelper* Copy (void) const; |
| 76 |
| 77 /*! |
| 78 * \param node the node on which the routing protocol will run |
| 79 * \returns a newly-created routing protocol |
| 80 * |
| 81 * This method will be called by ns3::InternetStackHelper::Install |
| 82 */ |
| 83 virtual Ptr<ns3::Ipv4RoutingProtocol> Create (Ptr<Node> node) const; |
| 84 |
| 85 /*! |
| 86 * Set the gradient calculator helper. |
| 87 */ |
| 88 void SetIpv4GradientCalculatorHelper (const Ipv4PgbrGradientCalculatorHelper &
gradientHelper); |
| 89 |
| 90 /*! |
| 91 * Set the flow classifier helper. |
| 92 */ |
| 93 void SetIpv4FlowClassifierHelper (const Ipv4PgbrFlowClassifierHelper &classifi
erHelper); |
| 94 |
| 95 /*! |
| 96 * Set an attribute for the PGBR routing protocol. |
| 97 */ |
| 98 void SetAttribute (std::string name, const AttributeValue &value); |
| 99 |
| 100 /*! |
| 101 * Set an attribute for the PGBR routing protocol flow routing table. |
| 102 */ |
| 103 void SetFlowRoutingTableAttribute (std::string name, const AttributeValue &val
ue); |
| 104 |
| 105 /*! |
| 106 * Initialise the PGBR routing protocol. |
| 107 * TODO once all features of PGBR would be integrated to the protocol, this fu
nction would not be needed any more. |
| 108 */ |
| 109 void Initialise (void); |
| 110 |
| 111 private: |
| 112 |
| 113 /*! |
| 114 * Initialise the neighbours. |
| 115 * TODO once all features of PGBR would be integrated to the protocol, this
function would not be needed any more. |
| 116 */ |
| 117 void InitialiseNeighbour (void); |
| 118 |
| 119 /*! |
| 120 * \internal |
| 121 * \brief Assignment operator declared private and not implemented to disallow |
| 122 * assignment and prevent the compiler from happily inserting its own. |
| 123 */ |
| 124 Ipv4PgbrHelper &operator = (const Ipv4PgbrHelper &ph); |
| 125 |
| 126 ObjectFactory m_pgbrFactory; /*!< The factory used to create Ipv4RoutingProtoc
ol objects */ |
| 127 ObjectFactory m_flowRoutingTableFactory; /*!< The factory used to create Flow
RoutingTable objects */ |
| 128 const Ipv4PgbrGradientCalculatorHelper *m_gradientHelper; /*!< The helper for
the gradient calculator */ |
| 129 const Ipv4PgbrFlowClassifierHelper *m_classifierHelper; /*!< The helper for th
e flow classifier */ |
| 130 }; |
| 131 |
| 132 }} //namespace pgbr, ns3 |
| 133 |
| 134 #endif /* IPV4_PGBR_HELPER_H_ */ |
OLD | NEW |