Ip address to NetBIOS/FQDN name in Java/Android

后端 未结 3 1884
梦毁少年i
梦毁少年i 2021-02-06 18:58

given the ip address of a computer on the same network of my Android device, i have to find its NetBIOS/FQDN name ... is there any \"clean\" solution to accomplish this with the

3条回答
  •  [愿得一人]
    2021-02-06 19:16

    You can use JCIFS open source library.

     InetAddress addr = NbtAddress.getByName( "hostname" ).getInetAddress();
    

    works both ways, ip address to hostname and vice versa.

提交回复
热议问题