Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(81)

Unified Diff: src/wifi/model/wifi-net-device.cc

Issue 277230044: class of service
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/wifi/model/wifi-net-device.cc
===================================================================
--- a/src/wifi/model/wifi-net-device.cc
+++ b/src/wifi/model/wifi-net-device.cc
@@ -23,6 +23,7 @@
#include "wifi-phy.h"
#include "wifi-remote-station-manager.h"
#include "wifi-channel.h"
+#include "qos-tag.h"
#include "ns3/llc-snap-header.h"
#include "ns3/packet.h"
#include "ns3/uinteger.h"
@@ -30,6 +31,7 @@
#include "ns3/node.h"
#include "ns3/trace-source-accessor.h"
#include "ns3/log.h"
+#include "ns3/class-of-service-tag.h"
namespace ns3 {
@@ -277,6 +279,19 @@
{
NS_ASSERT (Mac48Address::IsMatchingType (dest));
+ // Convert to Wifi QosTag for later use by EDCA code
+ ClassOfServiceTag cosTag;
+ bool found = packet->RemovePacketTag (cosTag);
+ if (!found)
+ {
+ NS_LOG_WARN ("No Class of Service tag found");
+ }
+ else
+ {
+ QosTag qosTag = QosTag (cosTag.GetClassOfService ());
+ packet->AddPacketTag (qosTag);
+ }
+
Mac48Address realTo = Mac48Address::ConvertFrom (dest);
LlcSnapHeader llc;

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b