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

📄 manual.h

📁 ns2.31下的UWB(Ultra WideBand)实现
💻 H
字号:
/* * Copyright (c) 2004, Stony Brook University * Contributors: Ashish Raniwala * All rights reserved. * * See copyright notice included in the distribution for details * */// raniwala: added for manual routing in wireless scenario//#ifndef manual_h_#define manual_h_#include "config.h"#include "agent.h"#include "ip.h"#include "delay.h"#include "scheduler.h"#include "queue.h"#include "trace.h"#include "arp.h"#include "ll.h"#include "mac.h"#include "priqueue.h"#include "fixedrtable.h"#include "tagtable.h"// Uncomment the following line to perform packet-by-packet load-balancing at each router//#define       SPLIT_FLOWS     1#if defined(WIN32) && !defined(snprintf)#define snprintf _snprintf#endif /* WIN32 && !snprintf */typedef double Time;#define MAX_QUEUE_LENGTH 5#define ROUTER_PORT      0xffclass Manual_Agent : public Agent {public:  Manual_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 tracepkt(Packet *, double, int, const char *);  void forwardPacket (Packet * p);  void startUp();  int diff_subnet(int dst);  void sendOutBCastPkt(Packet *p);    // update old_rte in routing table to to new_rte  Trace *tracetarget;       // Trace Target  FixedRoutingTable *table_;     // Routing Table  TagTable *tagtable_;     // Routing Table  PriQueue *ll_queue;       // link level output queue  int myaddr_;              // My address...    // Extensions for mixed type simulations using wired and wireless  // nodes  char *subnet_;            // My subnet  MobileNode *node_;        // My node  // for debugging  char *address;  NsObject *port_dmux_;    // my port dmux  // raniwala: down-links (ll-1, ll-2)  //NsObject *downtarget1_;    // my port dmux  // NsObject *downtarget2_;    // my port dmux  //NsObject *downtarget3_;    // my port dmux  //NsObject *downtarget4_;    // my port dmux  //NsObject *downtarget5_;    // my port dmux  // Dapeng  NsObject *income;		// the incoming dmux  NsObject *outcome;		// the outcoming dmux  // Randomness/MAC/logging parameters  int use_mac_;  int verbose_;    void output_rte(const char *prefix, fixed_rtable_ent *prte, Manual_Agent *a);};#endif

⌨️ 快捷键说明

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