<< NL_R_AODVNextHop NL_R: Routing NL_R_AODVRREQLocation >>

NARVAL >> NL_R: Routing > NL_R_AODVPath

NL_R_AODVPath

Perform the path where a packet needs to be forwarded from its source in order to reach its destination (local routing table).

Calling Sequence

[P] = NL_R_AODVPath(S,D)

Arguments

S :

Source.

D :

Destination.

P :

Path.

Description

NL_R_AODVPath performs the path P where a packet needs to be forwarded from its source S in order to reach its destination D (local routing table). If an intermediate node does not have the information stored inside its routing table, the result is empty.

Examples

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);//creation of a grid topology
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);//generation of routing tables 
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
NL_R_AODVRouteReply(g,Source,Destination,ID,routemat);//routing tables update
[path]=NL_R_AODVPath(Source,Destination)//application of NL_R_AODVPath

Dependency

NL_R_AODVNextHop

Report an issue
<< NL_R_AODVNextHop NL_R: Routing NL_R_AODVRREQLocation >>