libsmbclient : no workgroups / servers on smbc_opendir browse

Michael Spilo mspilo at skipjam.com
Wed Aug 20 02:50:22 GMT 2003


Hi,
 
I'm using libsmbclient 2.2.7a or 2.2.8a (haven't been able to link with
3.0rc1 but haven't pursued this yet).  
 
My entire Windows network is Win XP Home systems and I'm trying to write
some code to browse the net.
 
I get a -1 return with 0 errno from smbc_opendir("smb://") and from
smbc_opendir("smb://workgroup") for any workgroup name. 
 
I believe I've traced it down to the NetServerEnum2, which seems to be
returning cleanly, but with no data.  In other words the broadcast seems
to complete successfully, but the local master browser responds success
with no list of workgroups or servers as the case may be.  Ethereal
seems to confirm this.  But I'm clueless as to why this would be so or
how to get around it.
 
I am able to get a list of shares if I opendir on a valid server name or
IP address.
 
The smb.conf I'm using allows me to mount drives both ways - from
Windows to Linux and vice versa.
 
I ran across the little lsmbctest program on the e-mail thread, and I
get the same results from that code.
 
FWIW, nmblookup returns what looks to me like the correct IP addresses
for the __MSBROWSE__ servers.
 
The XPHome systems have no problem browsing each other or my Linux
systems, though the trace looks very different when I browse workgroups
from XP.
 
Any thoughts?  Suggestions? Comments?
 
Thanks for your help,
 
Mike Spilo



More information about the samba-technical mailing list