A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
flow-id-tag.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2008 INRIA
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: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19  */
20 #ifndef FLOW_ID_TAG_H
21 #define FLOW_ID_TAG_H
22 
23 #include "ns3/tag.h"
24 
25 namespace ns3 {
26 
27 class FlowIdTag : public Tag
28 {
29 public:
30  static TypeId GetTypeId (void);
31  virtual TypeId GetInstanceTypeId (void) const;
32  virtual uint32_t GetSerializedSize (void) const;
33  virtual void Serialize (TagBuffer buf) const;
34  virtual void Deserialize (TagBuffer buf);
35  virtual void Print (std::ostream &os) const;
36  FlowIdTag ();
37 
43  FlowIdTag (uint32_t flowId);
48  void SetFlowId (uint32_t flowId);
53  uint32_t GetFlowId (void) const;
58  static uint32_t AllocateFlowId (void);
59 private:
60  uint32_t m_flowId;
61 };
62 
63 } // namespace ns3
64 
65 #endif /* FLOW_ID_TAG_H */
virtual void Serialize(TagBuffer buf) const
Definition: flow-id-tag.cc:51
virtual TypeId GetInstanceTypeId(void) const
Definition: flow-id-tag.cc:40
virtual void Print(std::ostream &os) const
Definition: flow-id-tag.cc:63
static TypeId GetTypeId(void)
Definition: flow-id-tag.cc:31
uint32_t GetFlowId(void) const
Gets the flow id for the tag.
Definition: flow-id-tag.cc:88
virtual void Deserialize(TagBuffer buf)
Definition: flow-id-tag.cc:57
tag a set of bytes in a packet
Definition: tag.h:36
read and write tag data
Definition: tag-buffer.h:51
virtual uint32_t GetSerializedSize(void) const
Definition: flow-id-tag.cc:45
Doxygen introspection did not find any typical Config paths.
Definition: flow-id-tag.h:27
static uint32_t AllocateFlowId(void)
Uses a static variable to generate sequential flow id.
Definition: flow-id-tag.cc:95
void SetFlowId(uint32_t flowId)
Sets the flow id for the tag.
Definition: flow-id-tag.cc:82
uint32_t m_flowId
Definition: flow-id-tag.h:60
a unique identifier for an interface.
Definition: type-id.h:49