📄 flood.h
字号:
/*/******************************************************************* Copyright (C) 2004 Thomas Kunz, CRC Canada, BCAST for IPv4. DISTRIBUTED WITH NO WARRANTY, EXPRESS OR IMPLIED. See the GNU Library General Public License (file COPYING in the MANET_multicast directory) for conditions of use and redistribution.*********************************************************************//* Simple FLOODING routing protocol, derived from AODV code. */#ifndef __flood_h__#define __flood_h__#include <cmu-trace.h>#include <priqueue.h>#include <classifier/classifier-port.h>#include <MANET_multicast/mttable.h>#include <MANET_multicast/unique_id.h>class FLOOD;// Should be set by the user using best guess (conservative) #define NETWORK_DIAMETER 30 // 30 hops/* The Routing Agent*/class FLOOD: public Agent { friend class mttable; public: FLOOD(nsaddr_t id); void recv(Packet *p, Handler *); protected: int command(int, const char *const *); int initialized() { return 1 && target_; } nsaddr_t index; // IP Address of this node mttable mtable; // Multicast Groups node joined /* * Handle duplicate packets */ UniqueIDHandler uid_handler; /* * A mechanism for logging the contents of the routing * table. */ Trace *logtarget; /* * A pointer to the network interface queue that sits * between the "classifier" and the "link layer". */ PriQueue *ifqueue; /* for passing packets up to agents */ PortClassifier *dmux_;};#endif /* __flood_h__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -