add find peer name and peer name by idx.
migrate bsppeer functions.