How to convert user ip address into a nametag

I am working on a listen server multiplayer game. But by default to play with others you have to put her IP address there.

What I want is when a user click on the join button it display the currently hosted game with there nametag chosen by the host. to join where other player will be waiting for him in the lobby. So, basically I want to convert the host IP address into a nametag.

Thanks.