Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

semantic-rio.cc

Go to the documentation of this file.
00001 /* -*-  Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
00002 /*
00003  * A RIO queue that allows certain operations to be done in a way
00004  * that depends on higher-layer semantics. The only such operation
00005  * at present is pickPacketToDrop(), which invokes the corresponding
00006  * member function in SemanticPacketQueue.
00007  */
00008 
00009 #include "rio.h"
00010 #include "semantic-packetqueue.h"
00011 
00012 class SemanticRIOQueue : public RIOQueue {
00013 public:
00014         SemanticRIOQueue() : RIOQueue() {}
00015         Packet* pickPacketToDrop() {
00016                 return(((SemanticPacketQueue*) pq_)->pickPacketToDrop());
00017         }
00018         Packet* pickPacketForECN(Packet *pkt) {
00019                 return(((SemanticPacketQueue*) pq_)->pickPacketForECN(pkt));
00020         }
00021 };
00022 
00023 static class SemanticRIOClass : public TclClass {
00024 public:
00025         SemanticRIOClass() : TclClass("Queue/RED/RIO/Semantic") {}
00026         TclObject* create(int, const char*const*) {
00027                 return (new SemanticRIOQueue);
00028         }
00029 } class_semantic_rio;
00030 

Generated on Tue Apr 20 12:14:31 2004 for NS2.26SourcesOriginal by doxygen 1.3.3