flood.h
来自「code that can compile NS-2.27 on Fedora 」· C头文件 代码 · 共 65 行
H
65 行
/*/******************************************************************* 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 + =
减小字号Ctrl + -
显示快捷键?