[jcifs] querying a wins server for a list of workgroups

Christopher R. Hertel crh at ubiqx.mn.org
Fri Jul 27 14:51:35 EST 2001

"Allen, Michael B (RSCH)" wrote:
> > The PDC also registers the <ntdomain>0x1B name, which does dual duty.
> > The 0x1B name is a unique name, not a group name.  It identifies that
> > particular DC as the PDC, and it also identifies that node as a DMB.
> >
>         Ahh, yes, maybe it was 0x1B that I saw.


> > You *cannot* use WINS to find Local Master Browsers on remote subnets.
> > WINS doesn't store 0x1D names, and it only stores the
> > address for the __MSBROWSE__ name.
> >
>         Well what about a 0x1B lookup to WINS?

That will find a Domain Master Browser, not a Local Master Browser.  Still,
a DMB can be useful, if you know how to talk to it.

BTW, I found something very, very interesting when I was grubbing around
in some old docs.  You can send a query to the WINS server for *0x1B (that's
a wildcard query with a suffix of 0x1B) and the WINS server will
return a list of all the DMBs it knows about.

I don't know if the padding character on that is a space or a nul.  I
*think* I got the information while looking in the Samba source, so I
*think* Samba supports this.  Worth testing.

> > this.  The draft could, however, be changed to allow:
> >
> >   http://<dns_or_ip>/
> >
> > to go through the same semantic 'is it a server or a workgroup' hoops
> > that
> >
> >   http://<nbt_name>/
> >
> > goes through.
> >
>         Actually jCIFS doesn't quite do this. If the netbios name in an
> NbtAddress object is not defined, attempting to retrieve the name for
> it will trap and result in a reverse lookup (i.e. Node Status Request)
> on the IP (which must be defined or the NbtAddress object could not have
> been created in the first place).  All of these names are cached but
> this doesn't change the code that tries to determine wheather or not
> the name is a workgroup/domain/name. At no point would jCIFS try to
> connect by IP and retrieve a browse list. Trying to reiterates the same
> old problem of deciding what name to use for session establishment.

Yes, I see the problem.  It would be nice to be able to query remote LMBs,
but as I think about it I don't see this as something that should be done in
an SMB URL string.  LMBs have a habit of 'moving' around within a subnet, so
the URL string would not be reliable.  That's not consistent with the
purpose of URLs.

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

More information about the jcifs mailing list