src/contrib/flow-id-tag.h
changeset 6941 9d2c79c992d7
parent 6940 afe2960e58b7
child 6942 3b9ce3a727a5
equal deleted inserted replaced
6940:afe2960e58b7 6941:9d2c79c992d7
     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   FlowIdTag (uint32_t flowId);
       
    38   void SetFlowId (uint32_t flowId);
       
    39   uint32_t GetFlowId (void) const;
       
    40   static uint32_t AllocateFlowId (void);
       
    41 private:
       
    42   uint32_t m_flowId;
       
    43 };
       
    44 
       
    45 } // namespace ns3
       
    46 
       
    47 #endif /* FLOW_ID_TAG_H */