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

📄 sa.h.h

📁 在网络的边缘路由器中并不能完全接受所到的包
💻 H
字号:
/* -*-	Mode:C++; c-basic-offset:8; tab-width:8; indent-tabs-mode:t -*- */
/*
 * Copyright (c) Xerox Corporation 1997. All rights reserved.
 *
 * License is granted to copy, to use, and to make and to use derivative
 * works for research and evaluation purposes, provided that Xerox is
 * acknowledged in all documentation pertaining to any such copy or
 * derivative work. Xerox grants no other licenses expressed or
 * implied. The Xerox trade name should not be used in any advertising
 * without its written permission. 
 *
 * XEROX CORPORATION 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 ns_sa_h
#define ns_sa_h

#include "resv.h"
#include "agent.h"
#include "timer-handler.h"
#include "trafgen.h"
#include "rtp.h"
#include "random.h"

class SA_Agent;

class SA_Timer : public TimerHandler {
public:
        SA_Timer(SA_Agent *a) : TimerHandler() { a_ = a; }
protected:
        virtual void expire(Event *e);
        SA_Agent *a_;
};


class SA_Agent : public Agent {
public:
	SA_Agent();
	~SA_Agent();
	int command(int, const char*const*);
	virtual void timeout(int);
	virtual void sendmsg(int nbytes, const char *flags = 0);
protected:
	void start(); 
	void stop(); 
	void sendreq();
	void sendteardown();
	void recv(Packet *, Handler *);
        void stoponidle(const char *);
	virtual void sendpkt();
	int off_resv_;
	double rate_;
	int bucket_;
	NsObject* ctrl_target_;
        TrafficGenerator *trafgen_;
        int rtd_;  /* ready-to-die: waiting for last burst to end */
	char* callback_;

	SA_Timer sa_timer_;
	double nextPkttime_;
	int off_rtp_;
	int running_;
	int seqno_;
	int size_;
        int off_ip_;

        //begin archanakrishna
          int ingressnodeofpacket_;
          int egressnodeofpacket_;
          int classofpacket_;
        //end archanakrishna

};


#endif

⌨️ 快捷键说明

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