[jcifs] Cannot discover master browser if master browser happens to be the computer jcifs code runs on

Andrew Barnham andrew.barnham at gmail.com
Wed Apr 28 23:26:02 MDT 2010


Hi

Now - have two computers. Computer A and B. I run code:

 NbtAddress.getByName(name,0x00,null,baddr) on both machines.

The code will work on the computer which is NOT The master browser. But the
computer that is the master browser will not work.

Tried number of things, setting baddr to local host, iterating over all IP and
broadcasts addresses on all network interfaces on the system. No result.

Is there are way to do a getByName lookup when you happen, at that point in
time, to be on the computer that is hosting the master browser?

Quick background: Looking to employ jcifs to help resolve hostnames to ip
addresses. Have certain networks where they are running a strange VPN whereby
pinging a machine on the network causes ping to go somewhere else because of the
VPN. But you can browse computers and shares no problem. VPN is impacting my
java programs ability to resolve hostname of a locally hosted postgres server.

Andrew



More information about the jCIFS mailing list