Define App_Type, No_of _Paths;
Gen_RREQ()
If (no valid entry in route table for destination)
RREQ is created with unknown Seq_No
Else If (Have a valid destination in route table)
    RREQ is created with last Seq_No
SAVE [RREQ_ID]
Call Forward_RREQ()
Forward_RREQ()
If (Node listen a RREQ)
   If (Same as forwarded previously)
  Discard;      
                  If (Node is destination) (Node has route to destination)
  Send_RREP;
                      Discard RREQ;   
                  Else                Forward_RREQ();    
    
Gen_RREP
    If (App_Type == “DEFAULT”;)
    
    Create number of reply according to No_of _Paths;
    Destination will unicast reply to the shortest paths;
    
    If (App_Type == “MULTIMEDIA”;)
    
    Create number of reply according to No_of _Paths;
    Destination will unicast reply considering the maximum bandwidth and minimum delay;
    
    If (App_Type == “SECURE”;)
    
    Create number of reply according to No_of _Paths;
    Destination will unicast reply considering the most secure path preference wise;
    
Data_Transmission()
Source node will start transmission after receiving RREP
     If (RERR occur)
      Gen_RREQ(); 
Algorithm 1: Algorithm for generating route request and route reply.