dispatcher: add base function for w_ds_select_domain and w_ds_select_dst