将ospf补丁包安装到NS2.35

来源:互联网 发布:想做淘宝兼职 编辑:程序博客网 时间:2024/05/28 14:56

原文http://www.linuxquestions.org/questions/linux-newbie-8/ospf-patch-for-ns-2-35-a-4175492253/


1) $ tar xvf ns-allinone-2.35.tar.gz
2) $ cd ns-allinone-2.35/
3) $ ln -s ns-2.35/ ns-2.34
... Then the patch will work, except for one line. (commom/packet.h).
4) $ patch -p0 < 10-ospf4ns2.34-base.patch
http://sourceforge.net/projects/ospf4ns/
5) Replace commom/packet.h with the attached "packet.h" : Edited by hand.
6) export CC=gcc44 CXX=g++44 && ./install
... Or whatever gcc/g++ version 4.4.x you have available.


>>> 20-ospf4ns2.34-examples.patch

7) $ cd ns-allinone-2.35/
8) $ patch -p0 < 20-ospf4ns2.34-examples.patch

9) $ cd ns-2.35/
10)# make install

11)$ cd tcl/ex/ospf/
12)$ mkdir out_ospf0 out_ospf1 out_ospf2 out_ospf3 out_ospf4 out_ospf5 out_ospf6 out_ospf7 out_ospf8 out_ospf9
13)$ ns out_ospf0.tcl
... Etc. etc. : All the examples work OK, and will open a 'nam' window.

0 0