I am implementing a new protocol in NS2.
I stucked at a point. kindly help me.
Is it possible to make two different type of packets(containing different headers) in the same simulation
In my protocol there are two types of struct header { } . At few instances i want to use one and at other instances want to use another.One of the structure has very less fields compared to other so this would reduce the size of packet i'm sending.
Is it possible ? and if yes then how to implement that?
I have a typical requirement, I want to have a converter module, that can convert UDP packet to TCP packet. And I need to do it before the packet can be processed in IP layer.
I will explain this complete scenario using an example
Lets say we have 3 machines A, B and C.
A sent an UDP packet
B received UDP packet
At B, when packet is being given to IP layer (from Link / MAC / Ethernet layer) , I want to get hold of packet. I want to delete the UDP and IP header in packet. I want to add TCP and IP header (assuming C is the destination host).
Now from B machine, packet is sent to C machine
Can somebody help me how this can be done. I am using linux machines.
Though libpcap can be one of the option (from wireshark), but it is not suitable for me because of performance reasons. I want a very light weight solution for this problem.
I did some changes in the LAR protocol and suppose the new protocol is named as ABC .
When i am doing make clean and then make.
object file "ABC.o" was successfully created.
Then i tried to run tcl file , nothing has been written in the trace file and it gave me the following error
21052015$ ns234 new.tcl scen1 setting other default settings...
removing unecessary packet headers...
num_nodes is set 100
INITIALIZE THE LIST xListHead
loading mobility file
loading traffic file
Starting Simulation...
Segmentation fault (core dumped)
I tried a lot but unable to find out where is the error. I am unable to find out the point of error . Is it in .cc file or in .tcl file.
Could someone please help me.
My work is stucked and i searched a lot but didn't get anything.
please please .............. help me
Hello!
I want to implement a new protocol Ting which is exactly similar to Ping but for learning purpose I have changed its name and its classes for ping to ting.
Even I am able to make but while validation it is giving Agent/Ting command doesn't exist.
Kindly help me!
I am trying to implement since 4 days but couldn't succeed.
hello
As part of my research paper,I want to implement blackhole attack in manet using AODV protocol in NS2.Also I want to make changes in AODV protocol to implement my solution to detect blackhole attack and prevent it. How can I configure the attacker node? Which files should be changed to improve AODV protocol? and how run aodv protocol?
Could you please tell me the difference between agent->function name() vs this->function name ().
Actually i am taking about LAR.cc file (LAR routing protocol) but these function calls can be part of any routing protocol.
As you can see below , they are calling the same function with this and agent in LAR.cc . What is the difference between when we are calling a function with "agent" or calling with "this"
>
> void LARRouteRequestTimer::expire(Event *e)
> {
> ......
> .....
> agent->sendRouteRequest(this->dest, forwardMethod, this->routeInfo, false); //ringZero=false
> .....
> ...
> }
>
>
> void LARAgent::routeRequest(Packet *p)
> {
> .....
> ....
> ...
> this->sendRouteRequest(dest, larhdr->forwardCode(), &(destPtr->second), useRingZeroSearch);
> .....
> .....
> }
I have to do some changes in this file . kindly give some information on this issue .
Hi.. I want to implement a LEACH protocol in ns-2.30 (ubuntu 10.04 version) for my project. Can anyone help me out..
I have implemented black hole attack in AODV protocol. I simulated it through NS2 simulator and every time during building the simulator the simulator is built but after the result analysis and observing the NAM simulation I saw that the black hole is not working properly . The packets are not being dropped. So if anybody has done that please suggest me where should I correct my errors.
I'm trying to find out if Iptables supports creating jitter, like it does for packet loss. I'm using 'iptables -A INPUT -m statistic --mode random --probability 0.02 -j DROP' to simulate packet loss, but can I do something similar to create jitter? I think TC will do it, but our firmware does not support it. If there is an alternate solution, any advice would be greatly appreciated.
when i try to access macSuperframeOrder in new routing protocol, i am getting segmentation fault(core dumped). kindly tell me , how to access macSuperframeOrder in my newroutingprotcol.cc and to change the value based on some condition.
Hi,
i wana implement the watchdog & pathrater on AODV protocol in MANETS for misbehaving nodes on NS2.35. I wana show its performance analysis via xgraph. I have added a malicious node on AODV protocol after that i couldnt figure out how can i implement watchdog and pathrater and show analysis via xgraph. I have chcked the similar threads here but it was for ns 2.34 but still i tried it and m getting errors. I downloaded the watchdog zip files and followed the instructions of text file of it. One more thing, is it necessary to set all nodes for promiscuous mode??I also need code for that. I put the watchdog-basic.zip folder in AODV folder which was inside of ns-2.35 but what should be the tcl script for watch dog i have aodv tcl file in which malicious node is added too. I am new to ns2 and linux. Please help anyone i urgently need answers.