<< NL_R_AODVRouteRequest NL_R: Routing NL_R_AODVRouteRequestIt >>

NARVAL >> NL_R: Routing > NL_R_AODVRouteRequestIn

NL_R_AODVRouteRequestIn

Initialize the emission of RREQ packets from a source node inside a network (AODV).

Calling Sequence

[M,N] = NL_R_AODVRouteRequestIn(G,S,D,T)

Arguments

G :

Graph.

S :

Source.

D :

Destination.

T :

Time-to-Live.

M :

RREQ packets storage matrix.

N :

Quantity of RREQ packets on the network.

Description

NL_R_AODVRouteRequestIn initializes the emission of RREQ packets from the source node S inside the network G towards the destination node D (WEB). The route discovery is defined by the sequence number I used to distinct old and new routes. The research range is defined by the maximum hop value T. The research is limited by the maximal quantity of nodes T 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]). The current quantity of RREQ packets rates N.

Examples

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)//application of NL_R_AODVRouteRequestIn

Dependency

NL_G_NodeNeighbors, NL_F_DistanceNiNj

Report an issue
<< NL_R_AODVRouteRequest NL_R: Routing NL_R_AODVRouteRequestIt >>