Join_query_handle_function ( Join_query_packet
jq_packet) {
If jq_packet isn’t a new Join Query then exit;
If (type==0) do both Dl_jq and fuzzy algorithms
If (type==1) do only fuzzy algorithm
If (type==2) do only Dl_jq algorithm
If (type==3) do the basic ODMRP
}
Algorithm 2