多拉口NS2代码报错的问题
我在这里提供了一个修改的NS2的多接口代码,有朋友反应在运行多接口示例的代码时报错,错误发生在调用change-numifs函数的时候。之前我回复说无法复现这个问题,估计是因为我的代码确实没问题。今天师弟叫我帮忙看看,我发现报的错跟那两位朋友是一样的。然后我去ns-2.33/tcl/lib/ns-lib.tcl里面调试,发现他的这个文件里面根本没有change-numifs函数,这个函数应该是在2277行。后来师弟发现解压没搞正确,没有覆盖掉原来的ns-lib.tcl,所以没有增加修改后的那部分代码。遇到这个错误的朋友可以打开这个文件确认一下是不是修改过的版本。
Tags:
相关日志推荐
包子 | 2010-03-30 21:29:16
兄弟,最近在研究你Yblog的源码,想跟你做个朋友,可否加我qq:84019331lulu | 2010-04-04 07:20:27
Hi, I comapred between my code(Ramon's) and your modifications, and I found some parts I forgot to do.. BUT the main problem is that I still have the error that all of you had..(change-numifs).. Did you find any solution for this problem? Please help me.. Thanks in advance :)yhustc | 2010-04-04 22:01:41
Please check ns-lib.tcl, make sure the ns class has the process change-numifs. When I came across this error last time, I found that ns-lib.tcl haven't been overwritted, change-numifs is not here (I don't know why, because I unpacked the modified files into my NS2 DIR), so when you scenario tcl script calls change-numifs, exception occurs. Also, when modification has been made on these core tcl files, you should re-compile NS2, not just make.wenwen | 2011-05-20 03:06:54
您好,我确实在ns-lib.tcl中没找到change-numifs函数,请问怎么解决啊?您能给我发一个正确的tcl文件吗?不胜感激啊!!! 邮箱:chi0130@yahoo.cnyhustc | 2011-05-23 04:36:49
我下载压缩包看了啊,在ns-lib.tcl文件,倒数第四个函数就是 Simulator instproc change-numifs {newnumifs}