摘要:
1. check the source code of Bayesian Watchdog.2. check the solutions towards the three attacks defined by myself.关于贝叶斯的理解,参考http://www.cnblogs.com/LeftNotEasy/archive/2010/09/27/1837163.html 阅读全文
摘要:
/** * A packet from a neighbour has been detected. */voidWATCHDOG::neighboursPacketDetected(int32_t source_ip, int32_t destination_ip, int source_mac, int destination_mac, int sourcePort, int destinationPort, char * tmp_data, packet_t packet_type, double pktime) { if (debug > 2) printf("Neig 阅读全文
摘要:
节点发送数据包,则将数据包缓存。/** * I read my own packet. */voidWATCHDOG::ownPacketDetected(int32_t source_ip, int32_t destination_ip, int sourcePort, int destinationPort, int mac_dst, char * tmp_data, packet_t packet_type, double pktime) { if (debug > 2) printf("Ownpacket\n"); int data_size; neighbo 阅读全文
摘要:
1.tcl脚本传入一个int变量给c++代码 在command解析里 int nodenum=atoi(argv[2]); printf("%d",nodenum); 2.在nam中输出结果 Tcl::instance().evalf("$ns trace-annotate \"node send d_\""); 3.改变node颜色$node1 color red 4.注册顶级命令 即tcl脚本写init_topology class InitTopologyCommand : public TclCommand { public: 阅读全文