C.3 S-NAPTR procedure candidate list

29.3033GPPDomain Name System ProceduresRelease 17Stage 3TS

The following procedure will get the complete candidate list. This is the "sorted list of matches" described in Appendix A.2 of IETF RFC 3958 [9]. This is used for an exhaustive search of all matches.

If the "topon" feature is specifically applicable to find "close" nodes, or collocation is applicable, then the simple approach of getting the first match as described in clause C.2 cannot be used. The S-NAPTR must be performed by exhaustive searching for all matching records since the best match by "topon" node name can be any record independent of S-NAPTR record ordering.

/*

* The Callback function called by the S-NAPTR procedure for

* each found match..

*/

procedure private_store_candidate_list (hostname,service_and_protocol_set, port,IP4_list,IP6_list)

Begin procedure

increment snaptr_output_order;

create structure with fields

(hostname, service_and_protocol_set,port,IP4_list,IP6_list,snaptr_output_order,List_Name)

add structure to end of candidate_list;

return(looking);

End procedure;

/*

* The procedure to find all candidate nodes.

*

*/

procedure get_candidate_list (targetFQDN, desired_service_and_protocol_set, List_Name)

Begin procedure

candidate_list:= empty;

snaptr_output_order:=0;

/*

* The S-NAPTR resolving starts here.

*/

status:=S_NAPTR_to_callback(targetFQDN,

desired_service_and_protocol_set ,

private_store_candidate_list);

return(candidate_list);

End procedure;

The procedure includes the NAPTR output ordering explicitly as a field with each record which is important in the context of "topon" matches and checks for collocated nodes.