[jcifs] querying a wins server for a list of workgroups
icc at po.cwru.edu
Thu Jul 26 14:06:42 EST 2001
Hey guys. I'll be as brief as I can. I have a network with [for our purposes] 3 segments: A, B, and
C. Each segment is on its own switch, and broadcasts between switches are blocked by the router
connecting the switches. This means we must use WINS so netbios clients and servers can find each
On segment A, I have a Windows NT 4 server named "wins1" running WINS.
On segment B, I have a Win2k workstation named "workhorse"
On segment C, I have a linux box running Samba.
Now, on the linux box I use jcifs and the "List" example program to look up smb://workhorse and it
works just fine. Using tcpdump I see jcifs send a unicast netbios query to "wins1" and the response
comes in just fine, and then jcifs queries "workhorse" directly for its shares, and the response
comes in and the shares get printed out on my console, and I'm a happy camper! So, now we know that
I set the properties correctly and that jcifs is able to talk to the wins server.
However, now I try to look up smb:// (to get a list of workgroups) .... but jcifs doesn't ask the
wins server this time. Instead, jcifs sends a netbios NameQueryRequest to the broadcast address to
find a master browser, and then it asks the master browser for a list of workgroups. Well, the
master browser only knows of the workgroups within its network segment. There are a *lot* of
segments on this network.
The WINS server knows about all the workgroups in all the segments, so why isn't jcifs asking the
wins server for this information? Am I doing something wrong? Is there a way to get jcifs to ask the
wins server for a list of workgroups?
Any help would be greatly appreciated,
More information about the jcifs