Index: src/pgbr/model/flow-classifier/ipv4-pgbr-flow-classifier.h |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/src/pgbr/model/flow-classifier/ipv4-pgbr-flow-classifier.h |
@@ -0,0 +1,88 @@ |
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
+/* |
+ * Copyright (c) Waterford Institute of Technology, 2013, Julien Mineraud, BioFINT. |
+ * |
+ * This program is free software; you can redistribute it and/or modify |
+ * it under the terms of the GNU General Public License version 2 as |
+ * published by the Free Software Foundation; |
+ * |
+ * This program is distributed in the hope that it will be useful, |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
+ * GNU General Public License for more details. |
+ * |
+ * You should have received a copy of the GNU General Public License |
+ * along with this program; if not, write to the Free Software |
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
+ * |
+ * Author: Julien Mineraud <julien.mineraud@gmail.com> |
+ * |
+ * Acknowledgements: |
+ * This work has received support from Science Foundation Ireland via the |
+ * "A Biologically inspired framework supporting network management for |
+ * the Future Internet" starting investigator award (grant no. 09/SIRG/I1643). |
+ */ |
+ |
+#ifndef IPV4_PGBR_FLOW_CLASSIFIER_H_ |
+#define IPV4_PGBR_FLOW_CLASSIFIER_H_ |
+ |
+#include "ns3/object.h" |
+#include "ns3/packet.h" |
+#include "ns3/flow-classifier.h" |
+#include "ns3/ipv4-header.h" |
+ |
+/*! |
+ * \namespace ns3::pgbr |
+ * Namespace regrouping all objects and functions to run PGBR. |
+ */ |
+namespace ns3 { |
+namespace pgbr { |
+ |
+/*! |
+ * \class Ipv4FlowClassifier |
+ * This abstract class allows packets to be classified into flows |
+ */ |
+class Ipv4FlowClassifier : public Object |
+{ |
+public: |
+ /*! |
+ * \brief Static function that is required for each ns3::Object. |
+ * |
+ * \fn static TypeId GetTypeId (void) |
+ * \sa ns3::Object::GetTypeId () |
+ * \return the TypeId corresponding to the classifier |
+ */ |
+ static TypeId GetTypeId (void); |
+ |
+ /*! |
+ * The constructor |
+ */ |
+ Ipv4FlowClassifier (); |
+ |
+ /*! |
+ * The destructor |
+ */ |
+ virtual ~Ipv4FlowClassifier (); |
+ |
+ /*! |
+ * This function tells if the packet and packet header contain enough information to be classified. |
+ * \fn virtual bool HasEnoughInformation (Ptr<const Packet> p, const Ipv4Header &header) const = 0 |
+ * \param p The packet to be classified |
+ * \param header The Ipv4 header |
+ * \returns true if the packet can be classified |
+ */ |
+ virtual bool HasEnoughInformation (Ptr<const Packet> p, const Ipv4Header &header) const = 0; |
+ |
+ /*! |
+ * This function returns the flow id corresponding to the packet. |
+ * \fn virtual uint32_t GetFlowId (Ptr<const Packet> p, const Ipv4Header &header) = 0 |
+ * \param p The packet to be classified |
+ * \param header The Ipv4 header |
+ * \returns the flow id |
+ */ |
+ virtual uint32_t GetFlowId (Ptr<const Packet> p, const Ipv4Header &header) = 0; |
+}; |
+ |
+}} // namespace pgbr, ns3 |
+ |
+#endif /* IPV4_PGBR_FLOW_CLASSIFIER_H_ */ |