摘要
网络仿真软件NS-2具有源代码公开、可扩展性强等特点,已广泛用于网络分析、研究和教学,是目前网络仿真最流行的软件之一。网络的迅速发展需要人们不断研究新的网络协议和算法以及通过仿真分析网络性能。NS-2由于其源代码开放的特点,允许用户根据实际需求添加新的协议模块并通过仿真分析协议性能,这一特性成倍加速了新协议开发过程。该文给出了在NS-2中添加新功能模块的模版———编译层实现;解释层实现;编译层与解释层的接口;对原有相关文件的修改;编译及测试。并以自组网路由协议为例,从这五个方面详细介绍了在NS-2软件中添加新模块的过程。
The network simulation software NS- 2, which is source code opened, very scalable and efficient, has been used in scientific research and education. It is one of the most popular network simulation softwares today. The rapid growth of rietwork technology requires developing more protocols and algorithms and analyzing its performance. Because NS -2 is source code opened, people can add new modules into NS -2 on demand. It accelerates the progress of developing new protocols and algorithms. A general stencil of developing new modules in NS - 2 is introduced. The progress composes of five parts : implementing algorithm in C + + and in Tcl respectively, the interface of C + + and Tcl, changing some of the original files, compiling and debugging. A concrete example about a routing protocol in ad hoc network is taken in this paper to sbow how to develop new modules in NS- 2.
出处
《计算机仿真》
CSCD
2006年第11期120-123,共4页
Computer Simulation
基金
国家863资助项目(2003AA123340)
国家自然科学基金(60472064)
关键词
网络仿真
编译层
编译对象
解释层
解释对象
Network simulation
Compiling layer
Compiling object
Interpretive layer
Interpretive object