Quote:
Originally Posted by mujtiba
@ mleoking
Add the following lines to the end of ns-default.tcl ("ns-allinone-2.33\ns-2.33\tcl\lib\ns-default.tcl").
# Added by leoking spoof config 0
Agent/TCP set saddr_min 1
Agent/TCP set saddr_max 100
Agent/TCP set spoof_level 0
Agent/UDP set saddr_min 1
Agent/UDP set saddr_max 100
Agent/UDP set spoof_level 0
# Added by leoking spoof config 1
this was not helpful in solving the warning problem
|
Did you get the statistical results like the following:
rate_f1_normal 650.840000 rate_f1_attack 619.410000 nth_f1 0.951709
rate_f2_normal 0.000000 rate_f2_attack 12601.000000 nth_f2
It seems to me that your warning "warning: no class variable Agent/TCP/Newreno::saddr_max" means that you have not finished the steps in integration-of-ip-spoofing.txt. I attached a new version of "integration-of-ip-spoofing.txt" to this thread:
1. Copy the following files into the directory "ns-allinone-2.33\ns-2.33\common".
agent-leo.h
agent-leo.cc
2. Modify tcp.h ("ns-allinone-2.33\ns-2.33\tcp\tcp.h")
2.1. Insert the following line of code after [#include "agent.h"]:
#include "agent-leo.h"
2.2. Replace "public Agent" with "public LeoAgent"
3. Modify tcp.cc ("ns-allinone-2.33\ns-2.33\tcp\tcp.cc")
3.1. Replace "Agent(PT_TCP)" with "LeoAgent(PT_TCP)"
3.2. Replace "Agent::command(argc, argv)" with "LeoAgent::command(argc, argv)"
4. Modify udp.h ("ns-allinone-2.33\ns-2.33\apps\udp.h")
2.1. Insert the following line of code after [#include "agent.h"]:
#include "agent-leo.h"
2.2. Replace "public Agent" with "public LeoAgent"
5. Modify udp.cc ("ns-allinone-2.33\ns-2.33\apps\udp.cc")
3.1. Replace "Agent(PT_UDP)" with "LeoAgent(PT_UDP)"
3.2. Replace "Agent(type)" with "LeoAgent(type)"
3.3. Replace "Agent::command(argc, argv)" with "LeoAgent::command(argc, argv)"
6. Add the following lines to the end of ns-default.tcl ("ns-allinone-2.33\ns-2.33\tcl\lib\ns-default.tcl").
# Added by leoking spoof config 0
Agent/TCP set saddr_min 1
Agent/TCP set saddr_max 100
Agent/TCP set spoof_level 0
Agent/UDP set saddr_min 1
Agent/UDP set saddr_max 100
Agent/UDP set spoof_level 0
# Added by leoking spoof config 1
7. Insert the following line of code before "$(OBJ_STL)" in the Makefile ("ns-allinone-2.33\ns-2.33\Makefile"):
common/agent-leo.o \
8. Recompile the ns-allinone-2.33 system by using the following commands (you should execute these commands in the ns-2.33 directory "ns-allinone-2.33\ns-2.33"):
make clean
make depend
make
Have finished all of the above steps, particular steps 2, 3, 4, 5. Also for the last step, say recompile the ns system, you need to make sure that the ns system is really recompiled. Sometimes, you have to delete all the *.o files and synchronize the time mark of all the files using these two commands:
rm *.o
touch *
under these directories:
ns-allinone-2.33\ns-2.33\common
ns-allinone-2.33\ns-2.33\tcp
ns-allinone-2.33\ns-2.33\apps
and do step8 again to force the ns system to be recompiled.
8. Recompile the ns-allinone-2.33 system by using the following commands (you should execute these commands in the ns-2.33 directory "ns-allinone-2.33\ns-2.33"):
make clean
make depend
make
Hope this helps.