A Discrete-Event Network Simulator
API
cs-parameters.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 INRIA, UDcast
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  * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19  *
20  */
21 #include "wimax-tlv.h"
22 #include "cs-parameters.h"
23 
24 namespace ns3 {
26 {
28 }
30 {
31 
32 }
33 
35 {
37  "Invalid TLV");
39 
40  for (std::vector<Tlv*>::const_iterator iter = param->Begin (); iter
41  != param->End (); ++iter)
42  {
43  switch ((*iter)->GetType ())
44  {
46  {
48  = (enum CsParameters::Action)((U8TlvValue*)((*iter)->PeekValue ()))->GetValue ();
49  break;
50  }
52  {
54  = IpcsClassifierRecord (*(*iter));
55  break;
56  }
57  }
58  }
59 }
60 
62  IpcsClassifierRecord classifier)
63 {
64  m_classifierDscAction = classifierDscAction;
65  m_packetClassifierRule = classifier;
66 }
67 void
69 {
70  m_classifierDscAction = action;
71 }
72 void
74 {
75  m_packetClassifierRule = packetClassifierRule;
76 }
79 {
80  return m_classifierDscAction;
81 }
82 IpcsClassifierRecord
84 {
86 }
87 Tlv
88 CsParameters::ToTlv (void) const
89 {
94 }
95 }
ns3::IpcsClassifierRecord::ToTlv
Tlv ToTlv(void) const
Creates a TLV from this classifier.
Definition: ipcs-classifier-record.cc:307
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::CsParameters::ADD
@ ADD
Definition: cs-parameters.h:41
ns3::CsParameters::Action
Action
Action enumeration.
Definition: cs-parameters.h:40
ns3::VectorTlvValue::GetSerializedSize
virtual uint32_t GetSerializedSize(void) const
Get serialized size in bytes.
Definition: wimax-tlv.cc:251
wimax-tlv.h
ns3::CsParameters::GetClassifierDscAction
enum Action GetClassifierDscAction(void) const
Definition: cs-parameters.cc:78
ns3::Tlv::GetType
uint8_t GetType(void) const
Get type value.
Definition: wimax-tlv.cc:214
ns3::VectorTlvValue::Begin
Iterator Begin() const
Begin iterator.
Definition: wimax-tlv.cc:272
ns3::CsParameters::ToTlv
Tlv ToTlv(void) const
creates a tlv from the classifier record
Definition: cs-parameters.cc:88
ns3::CsParameters::m_packetClassifierRule
IpcsClassifierRecord m_packetClassifierRule
packet classifier rule
Definition: cs-parameters.h:84
ns3::CsParamVectorTlvValue
this class implements the convergence sub-layer descriptor as a tlv vector
Definition: wimax-tlv.h:377
ns3::CsParameters::~CsParameters
~CsParameters()
Definition: cs-parameters.cc:29
ns3::CsParamVectorTlvValue::Classifier_DSC_Action
@ Classifier_DSC_Action
Definition: wimax-tlv.h:382
ns3::CsParameters::m_classifierDscAction
enum Action m_classifierDscAction
classifier DSC action
Definition: cs-parameters.h:83
ns3::VectorTlvValue::Add
void Add(const Tlv &val)
Add a TLV.
Definition: wimax-tlv.cc:284
ns3::CsParameters::SetPacketClassifierRule
void SetPacketClassifierRule(IpcsClassifierRecord packetClassifierRule)
sets the packet classifier rules
Definition: cs-parameters.cc:73
ns3::U8TlvValue
U8TlvValue class.
Definition: wimax-tlv.h:171
NS_ASSERT_MSG
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:88
ns3::Tlv
This class implements the Type-Len-Value structure channel encodings as described by "IEEE Standard f...
Definition: wimax-tlv.h:84
ns3::CsParameters::GetPacketClassifierRule
IpcsClassifierRecord GetPacketClassifierRule(void) const
Definition: cs-parameters.cc:83
ns3::CsParameters::SetClassifierDscAction
void SetClassifierDscAction(enum Action action)
sets the dynamic service classifier action to ADD, Change or delete.
Definition: cs-parameters.cc:68
ns3::CsParameters::CsParameters
CsParameters()
Definition: cs-parameters.cc:25
cs-parameters.h
ns3::Tlv::PeekValue
TlvValue * PeekValue(void)
Peek value.
Definition: wimax-tlv.cc:224
ns3::CsParamVectorTlvValue::Packet_Classification_Rule
@ Packet_Classification_Rule
Definition: wimax-tlv.h:383
ns3::SfVectorTlvValue::IPV4_CS_Parameters
@ IPV4_CS_Parameters
Definition: wimax-tlv.h:363
ns3::VectorTlvValue::End
Iterator End() const
End iterator.
Definition: wimax-tlv.cc:278
ns3::IpcsClassifierRecord
IpcsClassifierRecord class.
Definition: ipcs-classifier-record.h:36