android - Fetch host name & its type while scaning network using (NDR) Network Discovery Repository -
i'm trying fetch connected device details of network
. have refereed network discovery repository i'm able ip address , mac address(hardware address) not able host name
& device type
.
i have used following code different stackoverflow's suggested post.i have implement jcifs jar
. no luck i'm not able fetch host name , type network.
code:
1) nbtaddress nbtaddress = nbtaddress.getbyname("base"); inetaddress address = nbtaddress.getinetaddress(); string hostname = address.gethostaddress(); 2) inetaddress addr = nbtaddress.getbyname(strip).getinetaddress(); host.hostname =addr.getcanonicalhostname();
your suggestion appreciable?
if using 1.3.17 jcifs has bug causes not return hostname. can try use older version of jcifs , give host name. older version of jcifs (1.2.25) has other issues depends use for.
Comments
Post a Comment