[jcifs] Master Browsing Caching

Matthew Tippett matthew.tippett at sympatico.ca
Fri Oct 25 12:09:40 EST 2002


A quick question about a couple of possible ways to work with the master 

I want to scan the network for all domains, in our network we have a 
number of 'interesting' master browsers.  Some won't let us connect to 
the IPC$ share, others are set up to use plain text passwords.

So, the two areas that I am interested in 'enhancing' are as follows.

	o The __MSBROWSE__ name should not be cached in NbtAddress :- a quick 
change to getCachedAddress stops the cached name ever getting used.

	   	if (hostName.name.equals(NbtAddress.MASTER_BROWSER_NAME)) { return 
null;  }

	o Currently the NameServiceClient  waits on the first Name response 
before continuing, if there is more than one response (if there are 
multiple domains on the network), then we should probably wait for all 
responses within 500 ms of the first response, and then interrogate all 
the master browsers individually you should find yourself with an very 
complete idea of domains on the network.  From my understanding of CIFS 
each WORKGROUP/DOMAIN has it's own Master Browser, even though the 
master browsers should have all DOMAINS in their browselist.

As an aside, I have noticed that in NameServiceClient.java at line 367. 

	name.name != NbtAddress.MASTER_BROWSER_NAME

is used, I would assume that
	(! name.name.equals(NbtAddress.MASTER_BROWSER_NAME))

should be used instead, since the != would only compare the object 

Interested in hearing what people think...


More information about the jcifs mailing list