C.2 S-NAPTR procedure – no topon
29.3033GPPDomain Name System ProceduresRelease 17Stage 3TS
If topological closeness is not stated as specifically applicable to a procedure, or all node names are prefixed with "topoff", and if collocation is stated as not applicable to a procedure, then the first interface that can be successfully connected to would be sufficient to be returned from the S-NAPTR procedure. The following pseudo-code shows how the procedure works.
/*
* The Callback function called from the S-NAPTR procedure
* for each FQDN the S-NAPTR procedure finds..
*/
procedure try_to_connect (hostname, service_and_protocol_set, port, IP4_list, IP6_list)
Begin procedure
// Comment does procedure as outlined in C.1
Use 3GPP procedures to try to connect in turn to all combinations
of the service/protocols and IP addresses provided in the input.
Upon first success return(stop);
If all fail return(looking);
End procedure;
};
/*
* The S-NAPTR procedure follows
*
*/
procedure connect_first_match (targetFQDN, desired_protocol_set)
Begin procedure
status:=S_NAPTR_to_callback(targetFQDN,
desired_service_and_protocol_set ,
try_to_connect);
if status equals looking return(failure) else return(success);
End procedure;