⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wfqclassifier.h

📁 c++编写的ns环境下关于wfq算法的仿真源代码
💻 H
字号:
/* * Copyright (c) 1999-2000 Paolo Losi (p.losi@hypersonic.it) * * Copyright (c) 2001-2004 Paolo Losi (p.losi@hypersonic.it) *                         Alexander Sayenko (sayenko@cc.jyu.fi) * * All rights reserved * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. */#ifndef WFQ_CLASSIFIER_H#define WFQ_CLASSIFIER_H#include "packet.h"#include "queue.h"#include <map>class WFQClass { public:   WFQClass::WFQClass (unsigned int ID);   unsigned int mID;        /* ID of a class */   unsigned int mPackets;   /* current number of packets in a class */   unsigned int mMaxLength; /* maximum number of packets in a class */   unsigned int B;      double mFinishTime; /* finish time of the last packet in a class */   double mWeight;     /* weight associated with a class */    };class WFQClassifier : public TclObject {  public:    virtual WFQClass* get_queue (Packet *p) = 0;    virtual double get_safe_limit() { return min_weight/1000; }  protected:    double min_weight;};class WFQDefaultClassifier : public WFQClassifier {  public:    WFQDefaultClassifier();     WFQClass* get_queue (Packet *p); // da modificare};class WFQAggregClassifier : public WFQClassifier {  public:    WFQAggregClassifier();    ~WFQAggregClassifier ();    virtual int command(int argc, const char*const* argv);    WFQClass* get_queue(Packet *p);     std::map<unsigned int, unsigned int> mFlowToClass;    std::map<unsigned int, WFQClass*> mWFQClasses;};#endif // end of WFQ_CLASSIFIER_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -