23 #include "ns3/abort.h"
25 #include "ns3/uinteger.h"
26 #include "ns3/inet-socket-address.h"
27 #include "ns3/point-to-point-helper.h"
28 #include "ns3/internet-stack-helper.h"
29 #include "ns3/ipv4-address-helper.h"
30 #include "ns3/ipv4-header.h"
31 #include "ns3/packet-sink-helper.h"
32 #include "ns3/udp-client-server-helper.h"
33 #include "ns3/udp-header.h"
34 #include "ns3/simulator.h"
35 #include "ns3/wimax-helper.h"
36 #include "ns3/mobility-helper.h"
37 #include "ns3/global-route-manager.h"
38 #include "ns3/wimax-tlv.h"
39 #include "ns3/ipcs-classifier-record.h"
40 #include "ns3/service-flow.h"
55 virtual void DoRun (
void);
60 :
TestCase (
"Test the CS parameters tlv implementation.")
93 sfVectorTlvValue.
Add (csParam.
ToTlv ());
100 packet->RemoveHeader (tlvReceived);
101 if (tlvReceived.
GetType () == Tlv::UPLINK_SERVICE_FLOW)
105 for (std::vector<Tlv*>::const_iterator iter = sfVecValue->
Begin (); iter
106 != sfVecValue->
End (); ++iter)
108 if ((*iter)->GetType () == SfVectorTlvValue::IPV4_CS_Parameters)
118 17),
false,
"The classifier address did not match.");
123 6),
false,
"The classifier address did not match.");
128 17),
false,
"The classifier addresses matched.");
133 8),
false,
"The classifier addresses matched.");
150 virtual void DoRun (
void);
155 :
TestCase (
"Test the service flow tlv implementation.")
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
uint32_t GetMinTolerableTrafficRate(void) const
void SetMaxSustainedTrafficRate(uint32_t)
uint32_t GetMaxTrafficBurst(void) const
a class to represent an Ipv4 address mask
bool CheckMatch(Ipv4Address srcAddress, Ipv4Address dstAddress, uint16_t srcPort, uint16_t dstPort, uint8_t proto) const
check if a packets can be used with this classifier
uint32_t GetSfid(void) const
virtual uint32_t GetSerializedSize(void) const
static Ns3WimaxTlvTestSuite ns3WimaxTlvTestSuite
void SetMinReservedTrafficRate(uint32_t)
This class implements the Type-Len-Value structure channel encodings as described by "IEEE Standard f...
void SetServiceSchedulingType(enum ServiceFlow::SchedulingType)
virtual void DoRun(void)
Implementation to actually run this TestCase.
uint32_t GetMinReservedTrafficRate(void) const
void SetMaxTrafficBurst(uint32_t)
void AddSrcAddr(Ipv4Address srcAddress, Ipv4Mask srcMask)
add a new source ip address to the classifier
void AddSrcPortRange(uint16_t srcPortLow, uint16_t srcPortHigh)
add a range of source port to the classifier
virtual ~Ns3WimaxCsParamTlvTestCase()
virtual void DoRun(void)
Implementation to actually run this TestCase.
Tlv ToTlv(void) const
creates a tlv from the classifier record
enum CsSpecification GetCsSpecification(void) const
void AddDstAddr(Ipv4Address dstAddress, Ipv4Mask dstMask)
add a new destination ip address to the classifier
uint8_t GetType(void) const
uint32_t GetMaximumLatency(void) const
void SetTrafficPriority(uint8_t)
void SetConvergenceSublayerParam(CsParameters)
uint8_t GetTrafficPriority(void) const
TlvValue * PeekValue(void)
This class implements service flows as described by the IEEE-802.16 standard.
void SetMaximumLatency(uint32_t)
void AddTestCase(TestCase *testCase) NS_DEPRECATED
Add an individual child TestCase case to this TestCase.
void AddDstPortRange(uint16_t dstPortLow, uint16_t dstPortHigh)
add a range of destination port to the classifier
virtual ~Ns3WimaxSfTlvTestCase()
Ipv4 addresses are stored in host order in this class.
enum Direction GetDirection(void) const
void SetMinTolerableTrafficRate(uint32_t)
void AddProtocol(uint8_t proto)
add a protocol to the classifier
void SetIndex(uint16_t index)
Set the index of the classifier.
uint32_t GetMaxSustainedTrafficRate(void) const
Tlv ToTlv(void) const
creates a TLV from this service flow
void SetCsSpecification(enum CsSpecification)
IpcsClassifierRecord GetPacketClassifierRule(void) const
enum ServiceFlow::SchedulingType GetServiceSchedulingType(void) const
void AddHeader(const Header &header)
Add header to this packet.
Ns3WimaxCsParamTlvTestCase()
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.