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

📄 slp-sa.h

📁 the User Agent and Service Agent functionality of the Service Location Protocol, based on RFC 2608:
💻 H
字号:
#include "slp/slp-common.h"class SLPsa;class URLnode; class urlExpireTimer : public TimerHandler { public:  	urlExpireTimer(SLPsa* s, URLnode* n, double timeout) : TimerHandler(), s_(s), n_(n) {		sched(timeout);	} 	inline virtual void expire(Event*);	 protected: 	SLPsa*		s_; 	URLnode *	n_; };  class URLnode {  public:   	hdr_slp_url		data;   	URLnode*		next;   	urlExpireTimer		expireTimer; 	URLnode (SLPsa* s, double timeout) : expireTimer(s, this, timeout) {} }; 	// SLP SA Class Definitionclass SLPsa : public Application {	friend class URLnode;	friend class urlExpireTimer; public:	SLPsa();	void send_srvrply_pkt(u_int16_t url_count, const char *service_type, u_int16_t xid, ns_addr_t dest);	void send_saadvert_pkt(u_int16_t xid, ns_addr_t dest);  protected:	int command(int argc, const char*const* argv);	void start();       // Start sending data packets (Sender)	void stop();        // Stop sending data packets (Sender) private:	void init();	virtual void recv_slpmsg(ns_addr_t src, int nbytes, const char *msg = 0);	void add_scope(const char *newscope);	void remove_scope(const char *removescope);	void add_service(const char *newservice, int timeout, int lifetime);	void remove_service(URLnode *removeservice_url);        bool checkscope(const char* scope_list, u_int16_t length_scope);	u_int16_t checkservice(const char* service_type);	char *get_urls (u_int16_t &no_urls, const char *serv_type, int size_so_far);	char *  SLPsa::get_local_scopes() const;	int		running_; 	int		pktsize_;		char *		local_services_[SLP_MAX_SERVICE];	//array implementation	int		number_of_scopes_;	char *		local_scopes_[SLP_MAX_SCOPE];		//array implementation	bool checkprlist(const char* pr_list, u_int16_t length_pr_list);	URLnode *	url_head;};

⌨️ 快捷键说明

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