Skip to main content

Posts

Showing posts with the label protocol implementation

SRM Implementation in NS

This section gives an overview of the implementation of SRM in NS. Running an SRM simulation requires creating and configuring the agent, attaching an application level data source (a traffic generator), and starting the agent and the traffic generator. The key steps in configuring a virgin SRM agent are to assign its multicast group and attach it to a node. Other useful configuration parameters are to assign a separate flow id to traffic originating from this agent, to open log file for statistics, and a trace file for trace data. The agent does not generate any application data on its own; instead the simulation user can connect any traffic generation module to any SRM agent to generate data. The user can attach any traffic generator to n SRM agent. The SRM agent will add the SRM headers, set the destination address to the multicast group and deliver the packet to its target. SRM header contains the type of message, identity of the sender, the sequence number of the message, the roun...

MODIFYING AODV PROTOCOL

 Many people doing project on AODV modification, but most of them have trouble in doing the same. The best way to modify aodv is to study aodv.cc and aodv.h well before starting your work. So here we are going to provide some help to modify AODV protocol. First of all you have to study the function of each timer in aodv.cc; for that put a printf message inside each function of aodv.cc separately and then you can see how many times each function calls while executing a simple aodv program. Step 1: open /ns-allinone-2.35/ns-2.35/aodv directory Step 2: open aodv.cc file and add the commands which is shown in yellow outline. void HelloTimer::handle(Event*) {   // Begin ns2blogger.blogspot.in printf("DEBUG TEST TEST \n"); // End ns2blogger.blogspot.in    agent->sendHello();    double interval = MinHelloInterval +                  ((MaxHelloInterval - MinHelloInterval) * Random::un...

IMPLEMENTING A NEW PROTOCOL

  Tutorial to implement protoname in ns2.35 This is an Implementation tutorial of new manet( M obile  A d-hoc  NET works) unicast protocol name protoname. List of files to be modified ~/ns-allinone-2.35/ns-2.35/common/packet.h ~/ns-allinone-2.35/ns-2.35/trace/cmu-trace.h ~/ns-allinone-2.35/ns-2.35/trace/cmu-trace.cc ~/ns-allinone-2.35/ns-2.35/tcl/lib/ns-packet.tcl ~/ns-allinone-2.35/ns-2.35/tcl/lib/ns-default.tcl  ~/ns-allinone-2.35/ns-2.35/tcl/lib/ns-lib.tcl ~/ns-allinone-2.35/ns-2.35/queue/priqueue.cc   ** Note: Text in  red  is the part that is to be added or modified in given file and location and  purple  colour denotes the terminal commands. ** Note: mod stands for modification. ** Note: Line number is approx and is provided for your convenience. Please check the methods below and above before inserting. Step 1: download protoname.rar http://www.cs.nccu.edu.tw/~g10031/protoname.rar Extract the files and place them in ~/ns-allinone-2.35/...