📄 classifier-base.h
字号:
/* Copyright (c) University of Maryland, Baltimore County, 2003. * Original Authors: Ramakrishna Shenai, Sunil Gowda and Krishna Sivalingam. * * This software is developed at the University of Maryland, Baltimore County under * grants from Cisco Systems Inc and the University of Maryland, Baltimore County. * * Permission to use, copy, modify, and distribute this software and its * documentation in source and binary forms for non-commercial purposes * and without fee is hereby granted, provided that the above copyright * notice appear in all copies and that both the copyright notice and * this permission notice appear in supporting documentation. and that * any documentation, advertising materials, and other materials related * to such distribution and use acknowledge that the software was * developed by the University of Maryland, Baltimore County. The name of * the University may not be used to endorse or promote products derived from * this software without specific prior written permission. * * Copyright (C) 2000-2003 Washington State University. All rights reserved. * This software was originally developed at Alcatel USA and subsequently modified * at Washington State University, Pullman, WA through research work which was * supported by Alcatel USA, Inc and Cisco Systems Inc. * The following notice is in adherence to the Washington State University * copyright policy follows. * * License is granted to copy, to use, and to make and to use derivative * works for research and evaluation purposes, provided that Washington * State University is acknowledged in all documentation pertaining to any such * copy or derivative work. Washington State University grants no other * licenses expressed or implied. The Washington State University name * should not be used in any advertising without its written permission. * * WASHINGTON STATE UNIVERSITY MAKES NO REPRESENTATIONS CONCERNING EITHER * THE MERCHANTABILITY OF THIS SOFTWARE OR THE SUITABILITY OF THIS SOFTWARE * FOR ANY PARTICULAR PURPOSE. The software is provided "as is" * without express or implied warranty of any kind. These notices must * be retained in any copies of any part of this software. */#ifndef classifier_base_h#define classifier_base_h#include <stdio.h>#include <assert.h>#include "address.h"#include "classifier-addr.h"#include "packet.h"#include "object.h"#include "ip.h"#include "../debug.h"#include "../integrated_agent.h"#include "../scheduler/scheduler-group.h"#include "../scheduler/Table.h"#include "../fiber-delay.h"#include "../scheduler/fdl-scheduler.h" //GMG - added FDL sched#include "../common/stat-collector.h"class Scheduler_group;/* The base classifier provides the base functionality over which other * OBS classifiers can be derived. * * It provides a scheduler group used to perfom data and control channel * scheduling on a per-link basic. Customs schedulers with different * scheduling algorithms can be built independently and attach via a * TCL interface method. * Refer to the manual on the section of schedulers to perform this * work. * * ver 1.0 08/01/2003 */class BaseClassifier : public Classifier{ public: /* Construct a new BaseClassifier object */ BaseClassifier(); void drop (Packet *p); //GMG -- added drop function for use with trace objects //GMG -- added FDL scheduler for node FdlScheduler FS_; //GMG -- Buffer fills for electronic buffers at edge nodes double buffill_[nqos_classes]; //GMG -- Buffer sizes for electronic buffers at edge nodes static double bufsize_[nqos_classes]; //GMG -- option for electronic buffering at edge nodes // ebuf_option_ = 0: drop BHPs and bursts if burst can't be // scheduled at offset time (but buffer burst // that can be scheduled until they are sent) // ebuf_option_ = 1: for bursts that can't be scheduled at // offset time, schedule at earliest opportunity; // buffer them until then. int ebuf_option_; // nodeType 0- edge node 1-core node int type_; protected: virtual int command( int argc, const char*const* argv ); virtual void recv( Packet *p, Handler *h ); // Get the next hop for the provided destination virtual int getNextHop( nsaddr_t addr ); // Handle the functioning of the control (or BHP) packet virtual void handleControlPacket( Packet *p ); // Handle the functioning of the data-burst virtual void handleDataBurst( Packet *p ); // the group of schedulers (one per link) Scheduler_group sg; // lookup switch object LookupSwitch lswitch; // bhp processing time double proc_time_; // address of this node nsaddr_t address_; NsObject* drop_; //GMG -- added drop target for this edge classifier};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -