Find the location of RREQs inside a network for a route request from a source (AODV).
[L] = NARVAL_R_AodvRreqs(M)
RREQ packets storage matrix.
List of nodes where a RREQ is located.
NL_R_AODVRREQLocation finds the location of RREQs inside a network (WEB). M is the RREQ packets storage matrix created during the propagation of RREQs from a source. L provides the list of nodes where a RREQ is located.
name='network';//graph name node_number=5;//quantity of nodes tail=[2 3 3 4 5 5];//head vector (links) head=[1 1 2 2 2 4];//tail vector (links) node_x=[100 500 300 700 900];//x-coordinates of nodes node_y=[500 500 900 100 500];//y-coordinates of nodes [g]=NL_G_MakeGraph(name,node_number,tail,head,node_x,node_y);//generation of a topology with 3 nodes w=1;//window index f1=NL_G_ShowGraphN(g,w);//graph visualization for i=1:g.node_number global ('rt'+string(i));//creation of empty routing tables end bss=10;//maximum buffer size bs=bss*ones(1,g.node_number);//buffer matrix NL_R_AODVRTInit(g,bs);//generation of routing tables //rti=final routing table of node i TTL=5;//research Time-To-Live ID=0;//index of the route discovery Source=1;//source node Dest=5;//destination node [RREQmat,np]=NL_R_AODVRouteRequestIn(g,Source,Dest,TTL);//initialization of RREQs [l]=NL_R_AODVRREQLocation(RREQmat)//application of NL_R_AODVRREQLocation | ![]() | ![]() |