[jcifs] SmbFile.exists( "smb://server" )

Christopher R. Hertel crh at ubiqx.mn.org
Sun Feb 23 17:36:30 EST 2003


I was fiddling with the Exists.java tool in the examples directory and 
noticed that when given a URL with just a server name it sends a name 
query.  That is:

$ java Exists smb://server

sends a broadcast name query for SERVER<20>.

Now, that is a valid test on a broadcast NBT network.  If a response to
the broadcast is received it means that there is a node claiming that 
name.

Unfortuantely, I don't have my network set up for WINS testing at the 
moment.  What I want to know is this:  If WINS is in use, does the Exists 
test query the WINS server and, if so, what does it do afterward?

See, the problem I'm concerned about is that a name may exist in the WINS 
database even though the machine that registered the name has been shut 
down.  Good behavior is that a cleanly shut-down system would release the 
name first, but that doesn't always happen and some WINS implementations 
are flakey.  So the proper test would be to send an Adapter Status query 
following the WINS lookup to verify the name.

This is just something that occurred to my troubled brain as I tried to 
handle some other problem...

Chris -)-----

-- 
Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org


More information about the jcifs mailing list