[jcifs] browsing a smaller network using netserverenum2

Christopher R. Hertel crh at ubiqx.mn.org
Sat Feb 5 17:46:26 GMT 2005


On Fri, Feb 04, 2005 at 06:25:08PM -0500, Michael B Allen wrote:
> On Fri, 4 Feb 2005 17:04:18 -0600
> "Christopher R. Hertel" <crh at ubiqx.mn.org> wrote:
> 
> > There may be a difference in what jCIFS is seeing, based on my input, but 
> > there is no difference between the two requests that I can see on the 
> > wire.  (I could be missing something, of course.)
> > 
> > > > I can send along a trace and a log dump.  Easy enough to replicate, 
> > >
> > > Send me the trace.
> > 
> > Attached.
> 
> Yeah, that's messed up. I guess you can't do it. The redundant null creds
> are causing something strange to happen. What are you trying to do anyway?
> If you're just trying to do a listing of smb://server/ with null credentials
> that is the default behavior.

I'm trying to get a list of the workgroups on my local LAN.  That's the 
definition of "SMB://".  It's basically a NetServerEnum2 to an LMB to list 
the workgroups (not the servers).  In other words, it's the top of the 
Network Neighborhood tree.

Thing is, from the trace it seems that jCIFS is doing the right thing...at
first.  It does a name lookup on the ..__MSBROWSE__.. name, connects to
the first one it finds (the only one, in this case), and does the
SessionSetup/TreeConnect to the IPC$ share.  The next thing it should do
is issue the NetServerEnum2 with the workgroup flag set to obtain the list
of workgroups.

KDE's Konqueror does this (thought it's slightly broken because it uses 
"SMB:/" instead of two slashes, but they're working on it...).  I can 
enter "SMB:/" in Konqueror and see a list of workgroups.  Click on a 
workgroup and I see the list of servers in the workgroup, etc...

Chris -)-----

--
"Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
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