📄 noah.h
字号:
#ifndef __noah_h_#define __noah_h_#include "config.h"#include "agent.h"#include "ip.h"#include "delay.h"#include "trace.h"#include "arp.h"#include "ll.h"#include "mac.h"#define ROUTER_PORT 0xffstruct NOAH_Table { int dst; int hop;};class NOAH_Agent : public Agent {public: NOAH_Agent(); virtual int command(int argc, const char * const * argv); void lost_link(Packet *p); protected: Packet* rtable(int); virtual void recv(Packet *, Handler *); void trace(char* fmt, ...); void forwardPacket (Packet * p); void sendOutBCastPkt(Packet *p); int diff_subnet(int dst); int getEntry(int dst); Trace *tracetarget; // Trace Target int myaddr_; // My address... char *subnet_; // My subnet MobileNode *node_; // My node NsObject *port_dmux_; // my port dmux // for static routes struct NOAH_Table *table_; // Routing Table // Randomness/MAC/logging parameters int be_random_; int use_mac_; int table_size;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -