Introspection did not find any typical Config paths. More...
#include "qkd-packet-filter.h"
Public Types | |
enum | QKDTrafficClassMode { PF_MODE_TOS, PF_MODE_DSCP } |
Enumeration of modes of Ipv4 header traffic class semantics. More... | |
Public Member Functions | |
PfifoFastQKDPacketFilter () | |
virtual | ~PfifoFastQKDPacketFilter () |
uint32_t | TosToBand (uint8_t tos) const |
![]() | |
QKDPacketFilter () | |
virtual | ~QKDPacketFilter () |
![]() | |
PacketFilter () | |
virtual | ~PacketFilter () |
int32_t | Classify (Ptr< QueueDiscItem > item) const |
Classify a packet. More... | |
![]() | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
![]() | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
![]() | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
![]() | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
virtual int32_t | DoClassify (Ptr< QueueDiscItem > item) const |
Classify a packet. More... | |
uint32_t | DscpToBand (Ipv4Header::DscpType dscpType) const |
Private Attributes | |
QKDTrafficClassMode | m_trafficClassMode |
traffic class mode More... | |
const uint32_t | prio2band [16] = {1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1} |
Additional Inherited Members | |
![]() | |
static const int | PF_NO_MATCH = -1 |
Standard value used by packet filters to indicate that no match was possible. More... | |
![]() | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoDispose (void) |
Destructor implementation. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
![]() | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
![]() | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Introspection did not find any typical Config paths.
Return the priority corresponding to a given TOS value.
No TraceSources are defined for this type.
Size of this type is 96 bytes (on a 64-bit architecture).
We use it for sorting of packets in waiting queues based on TOS value
This function is implemented after the Linux rt_tos2priority function. The usage of the TOS byte has been originally defined by RFC 1349 (http://www.ietf.org/rfc/rfc1349.txt):
0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ | PRECEDENCE | TOS | MBZ | +-----+-----+-----+-----+-----+-----+-----+-----+
where MBZ stands for 'must be zero'.
The Linux rt_tos2priority function ignores the precedence bits and maps each of the 16 values coded in bits 3-6 as follows:
Bits 3-6 | Means | Linux Priority |
---|---|---|
0 | Normal Service | Best Effort (0) |
1 | Minimize Monetary Cost | Best Effort (0) |
2 | Maximize Reliability | Best Effort (0) |
3 | mmc+mr | Best Effort (0) |
4 | Maximize Throughput | Bulk (2) |
5 | mmc+mt | Bulk (2) |
6 | mr+mt | Bulk (2) |
7 | mmc+mr+mt | Bulk (2) |
8 | Minimize Delay | Interactive (6) |
9 | mmc+md | Interactive (6) |
10 | mr+md | Interactive (6) |
11 | mmc+mr+md | Interactive (6) |
12 | mt+md | Int. Bulk (4) |
13 | mmc+mt+md | Int. Bulk (4) |
14 | mr+mt+md | Int. Bulk (4) |
15 | mmc+mr+mt+md | Int. Bulk (4) |
RFC 2474 (http://www.ietf.org/rfc/rfc2474.txt) redefines the TOS byte:
0 1 2 3 4 5 6 7 +-----+-----+-----+-----+-----+-----+-----+-----+ | DSCP | CU | +-----+-----+-----+-----+-----+-----+-----+-----+
where DSCP is the Differentiated Services Code Point and CU stands for 'currently unused' (actually, RFC 3168 proposes to use these two bits for ECN purposes). The table above allows to determine how the Linux rt_tos2priority function maps each DSCP value to a priority value. Such a mapping is shown below.
DSCP | Hex | TOS (binary) | bits 3-6 | Linux Priority |
---|---|---|---|---|
EF | 0x2E | 101110xx | 12-13 | Int. Bulk (4) |
AF11 | 0x0A | 001010xx | 4-5 | Bulk (2) |
AF21 | 0x12 | 010010xx | 4-5 | Bulk (2) |
AF31 | 0x1A | 011010xx | 4-5 | Bulk (2) |
AF41 | 0x22 | 100010xx | 4-5 | Bulk (2) |
AF12 | 0x0C | 001100xx | 8-9 | Interactive (6) |
AF22 | 0x14 | 010100xx | 8-9 | Interactive (6) |
AF32 | 0x1C | 011100xx | 8-9 | Interactive (6) |
AF42 | 0x24 | 100100xx | 8-9 | Interactive (6) |
AF13 | 0x0E | 001110xx | 12-13 | Int. Bulk (4) |
AF23 | 0x16 | 010110xx | 12-13 | Int. Bulk (4) |
AF33 | 0x1E | 011110xx | 12-13 | Int. Bulk (4) |
AF43 | 0x26 | 100110xx | 12-13 | Int. Bulk (4) |
CS0 | 0x00 | 000000xx | 0-1 | Best Effort (0) |
CS1 | 0x08 | 001000xx | 0-1 | Best Effort (0) |
CS2 | 0x10 | 010000xx | 0-1 | Best Effort (0) |
CS3 | 0x18 | 011000xx | 0-1 | Best Effort (0) |
CS4 | 0x20 | 100000xx | 0-1 | Best Effort (0) |
CS5 | 0x28 | 101000xx | 0-1 | Best Effort (0) |
CS6 | 0x30 | 110000xx | 0-1 | Best Effort (0) |
CS7 | 0x38 | 111000xx | 0-1 | Best Effort (0) |
ipTos | the TOS value (in the range 0..255) |
Definition at line 136 of file qkd-packet-filter.h.
Enumeration of modes of Ipv4 header traffic class semantics.
Enumerator | |
---|---|
PF_MODE_TOS |
use legacy TOS semantics to interpret TOS byte |
PF_MODE_DSCP |
use DSCP semantics to interpret TOS byte |
Definition at line 150 of file qkd-packet-filter.h.
ns3::PfifoFastQKDPacketFilter::PfifoFastQKDPacketFilter | ( | ) |
Definition at line 83 of file qkd-packet-filter.cc.
References NS_LOG_FUNCTION.
|
virtual |
Definition at line 88 of file qkd-packet-filter.cc.
References NS_LOG_FUNCTION.
|
privatevirtual |
Classify a packet.
item | the packet to classify. |
Implements ns3::QKDPacketFilter.
Definition at line 94 of file qkd-packet-filter.cc.
References ns3::SocketIpTosTag::GetTos(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::Packet::PeekPacketTag().
|
private |
Definition at line 143 of file qkd-packet-filter.cc.
References ns3::Ipv4Header::DSCP_AF11, ns3::Ipv4Header::DSCP_AF12, ns3::Ipv4Header::DSCP_AF13, ns3::Ipv4Header::DSCP_AF21, ns3::Ipv4Header::DSCP_AF22, ns3::Ipv4Header::DSCP_AF23, ns3::Ipv4Header::DSCP_AF31, ns3::Ipv4Header::DSCP_AF32, ns3::Ipv4Header::DSCP_AF33, ns3::Ipv4Header::DSCP_AF41, ns3::Ipv4Header::DSCP_AF42, ns3::Ipv4Header::DSCP_AF43, ns3::Ipv4Header::DSCP_CS1, ns3::Ipv4Header::DSCP_CS2, ns3::Ipv4Header::DSCP_CS3, ns3::Ipv4Header::DSCP_CS4, ns3::Ipv4Header::DSCP_CS5, ns3::Ipv4Header::DSCP_CS6, ns3::Ipv4Header::DSCP_CS7, ns3::Ipv4Header::DSCP_EF, ns3::Ipv4Header::DscpDefault, NS_LOG_DEBUG, and NS_LOG_FUNCTION.
|
static |
Get the type ID.
Definition at line 67 of file qkd-packet-filter.cc.
References m_trafficClassMode, ns3::MakeEnumAccessor(), ns3::MakeEnumChecker(), and ns3::TypeId::SetParent().
uint32_t ns3::PfifoFastQKDPacketFilter::TosToBand | ( | uint8_t | tos | ) | const |
Definition at line 132 of file qkd-packet-filter.cc.
References NS_LOG_DEBUG, and NS_LOG_FUNCTION.
|
private |
|
private |
Definition at line 160 of file qkd-packet-filter.h.