Perform the AODV Route Reply from the destination node (or intermediate node knowing a path to the destination).
NL_R_AODVRouteReply(G,S,D,I,R)
Graph.
Source.
Destination.
Sequence number.
Route storage matrix.
NL_R_AODVRouteReply performs the AODV Route Reply process from the source node S towards the destination node D inside the network graph G (WEB). The sequence number I is assigned to the process in order to distinguish between old and fresh routes. The research is limited by the maximal quantity of nodes TTL that a discovery packet can cross before its rejection by the network. The set of possible routes is stored into the matrix M (route|arrival|TTL|route length).
l=3;//number of lines c=4;//number of columns Lx=1000;//network area x-side Ly=1000;//network area x-side [g]=NL_T_Grid(l,c,Lx,Ly);//application of NL_T_Grid 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=1;//index of the route discovery Source=1;//source node Destination=7;//destination node [mat,routemat]=NL_R_AODVRouteRequest(g,Source,Destination,TTL);//route discovery from the source node NL_R_AODVRouteReply(g,Source,Destination,ID,routemat);//application of NL_R_AODVRouteReply //status of related local routing tables rt1 rt5 rt6 Source=2;//source node ID=2;//index of the route discovery [mat,routemat]=NL_R_AODVRouteRequest(g,Source,Destination,TTL);//route discovery from the source node NL_R_AODVRouteReply(g,Source,Destination,ID,routemat);//application of NL_R_AODVRouteReply //status of related local routing tables rt2 rt6 Source=1;//source node ID=13;//index of the route discovery [mat,routemat]=NL_R_AODVRouteRequest(g,Source,Destination,TTL); NL_R_AODVRouteReply(g,Source,Destination,ID,routemat); //status of related local routing tables rt1 rt5 rt6 Source=5;//source node Destination=3;//destination node ID=1;//index of the route discovery [mat,routemat]=NL_R_AODVRouteRequest(g,Source,Destination,TTL);//route discovery from the source node NL_R_AODVRouteReply(g,Source,Destination,ID,routemat);//application of NARVAL_R_AodvRrep //status of related local routing tables rt5 rt1 rt2 rt3 | ![]() | ![]() |