|
Example:
|
The node N receives a ROUTE REQUEST message.
if ( Destination = N (myself) )
{
return a ROUTE REPLY message containing the
recorded source route to the sender
(See note in NEXT section !!!)
}
else if ( Source = N (myself) )
{ /* My neighbor is forwarding my RReq and I got it back....*/
Discard ROUTE REQUEST message;
}
else if ( RReqID ∈ RReqIDCache )
{ /* The node has received this Route Req before !!! */
Discard ROUTE REQUEST message;
}
else if ( N ∈ Route Record in ROUTE REQUEST message )
{ /* The node has also received this Route Req before !!! */
Discard ROUTE REQUEST message;
}
else
{
Append N to the Route Record of ROUTE REQUEST message;
TTL = TTL - 1;
if ( TTL > 0 )
{
Broadcast the modified ROUTE REQUEST message;
}
else
{
Discard the ROUTE REQUEST message;
}
}
Save RReqID in ROUTE REQUEST message in RReqIDCache;
|
|
|
(See page 2 of the article)