rtqueue.h

来自「ns2.1b5版本中cbrp碼」· C头文件 代码 · 共 60 行

H
60
字号
/* -*- c++ -*-   $Id: rtqueue.h,v 1.3 1998/08/16 20:45:03 broch Exp $*/#ifndef __ifqueue_h__#define __ifqueue_h_#include <packet.h>#include <agent.h>/* * The maximum number of packets that we allow a routing protocol to buffer. */#define RTQ_MAX_LEN     64      // packets/* *  The maximum period of time that a routing protocol is allowed to buffer *  a packet for. */#define RTQ_TIMEOUT     30	// secondsclass rtqueue : public Connector { public:        rtqueue();        void            recv(Packet *, Handler*) { abort(); }        void            enque(Packet *p);	inline int      command(int argc, const char * const* argv) 	  { return Connector::command(argc, argv); }        /*         *  Returns a packet from the head of the queue.         */        Packet*         deque(void);        /*         * Returns a packet for destination "D".         */        Packet*         deque(nsaddr_t dst); private:        Packet*         remove_head();        void            purge(void);	void		findPacketWithDst(nsaddr_t dst, Packet*& p, Packet*& prev);	void		verifyQueue(void);        Packet          *head_;        Packet          *tail_;        int             len_;        int             limit_;        double          timeout_;};#endif /* __ifqueue_h__ */

⌨️ 快捷键说明

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