我已经在我的 ubuntu 上使用ns2
了nam
很长时间。现在我必须对其应用补丁 ( OSPF
)。我一直在寻找如何在 linux 中应用补丁(因为我是新手),我得到的只是:
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
我解压缩了 tar 文件,将文件复制到名为.patch
的文件ns-allinone-2.35
夹中10-ospf4ns2.34-base.patch
,转到终端中的目录,使用ln -s ns-2.35/ ns-2.34
然后使用 line 修补4
。之后,我收到以下消息:
The next patch would create the file ns-2.34/classifier/classifier-mtopology.cc,
which already exists! Assume -R? [n] y
patching file ns-2.34/classifier/classifier-mtopology.cc
The next patch would create the file ns-2.34/classifier/classifier-mtopology.h,
which already exists! Assume -R? [n] y
patching file ns-2.34/classifier/classifier-mtopology.h
can't find file to patch at input line 92
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- ns-2.34.old/common/agent.cc 2009-06-14 18:35:45.000000000 +0100
|+++ ns-2.34/common/agent.cc 2010-02-26 23:34:33.161063590 +0000
--------------------------
File to patch:
在这之后我不知道该怎么办。我应该修补什么文件?classifier-mtopology.h
中没有ns-2.34
。在那之后,packet.h
我应该用指定的 new 替换哪个packet.h
?因为有几个common
文件夹。任何帮助将不胜感激,因为我是 linux 的新手。