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

📄 cip.h

📁 运行于linux上的CIMS套件
💻 H
字号:
#ifndef ns_cip_h#define ns_cip_h#include <assert.h>#include "agent.h"#include "classifier-addr.h"#define CIP_TIMER_SIMPLE	0#define CIP_TIMER_AGTLIST	1struct hdr_ipinip {	hdr_ip hdr_;	struct hdr_ipinip *next_;	// XXX multiple encapsulation OK};typedef enum {	CIPT_BEACON} CipRegType;struct hdr_cip {	int haddr_;	int ha_;	int coa_;	CipRegType type_;	double lifetime_;	int seqno_;	int priority_;                     /* JCW */};class SimpleTimer : public TimerHandler {public: 	SimpleTimer(Agent *a) : TimerHandler() { a_ = a; }protected:	inline void expire(Event *) { a_->timeout(CIP_TIMER_SIMPLE); }	Agent *a_;};class CIPBSAgent : public Agent {public:	CIPBSAgent();	virtual void recv(Packet *, Handler *);	void timeout(int);protected:	int command(int argc, const char*const*argv);	void send_ads(int dst = -1, NsObject *target = NULL);	double beacon_; /* beacon period */	NsObject *bcast_target_; /* where to send out ads */	NsObject *ragent_;     /* where to send reg-replies to MH */	SimpleTimer timer_;	int seqno_;		/* current ad seqno */	int priority_;	double adlftm_;	/* ads lifetime */	int off_cip_;};class CIPMHAgent : public Agent {public:        CIPMHAgent();        void recv(Packet *, Handler *);protected:	int off_cip_;        MobileNode *node_;        int  command(int argc, const char*const*argv);};#endif

⌨️ 快捷键说明

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