To patch, you need to completely remove the original NS2, and then re-unzip a copy of the NS2, put the patch file to ns-allinone-2.35 (my ns2 version is
2.35), then execute the following command in this directory:
<span style= "FONT-SIZE:18PX;" >patch-p0 < patch file name .patch</span>
</pre><p><span style= "FONT-SIZE:18PX;" ></span></p><p><span style= "FONT-SIZE:18PX;" > When creating a patch, first create a new folder, delete all trace files in ns2 and do clean, then copy the ns-2.35 folder to the new </span></p><p><span Style= "FONT-SIZE:18PX;" > folder, then rename the ns-allinone-2.35 now, and unzip a new original NS2, execute the installation command after the installation is complete in Ns-2.35</span></p><p><span Style= "FONT-SIZE:18PX;" > directory to do clean and rename the ns-2.35 folder (such as ns-2.35-org) to the new folder, and finally to the newly created text </span></p><p><span Style= "FONT-SIZE:18PX;" > folder execute the following command: </span></p><p><pre name= "code" class= "plain" ><span style= "font-size:18px ;" >diff-unra ns-2.35-org ns-2.35 > patch file name .patch</span>
The last patch file generated is the one that needs to be patched.
Patch and build patches in Ubuntu under NS2