Getting a NetBIOS name from the WINS database (like WINSDMP.exe)

Andrew Wallace Andrew_Wallace at
Thu Mar 9 07:50:34 GMT 2000

I hope this isn't too far off the topic.  I would like some suggestions on
what type of NetBIOS packets to construct, such as a NODE STATUS REQUEST,
NAME QUERY REQUEST, ...  (Read on.)

There is a Window NT utility called WINSDMP.EXE that lists the contents of
the WINS database. 
Question 1.  Can I construct a query on my Linux box and send it to the WINS
server database which will give me this information?  (I am guessing no, I

What I would like to do is to find a NetBIOS name from an IP address.  (I
know this is a much asked question but please read on)

After reading rfc1001/rfc1002, searching through the smb/Samba mail archives
and looking at nmblookup I came to the conclusion the only way to do this is
to send a NODE STATUS REQUEST directly to the known IP address. 
Question 2. Am I correct?  Is there a query for the WINS server I could use?

I have implemented a tool based on a NODE STATUS REQUEST that I am _mostly_
happy with, but it has some problems (that you probably know about).  It
will not find a client that has been turned off (obviously) and it needs to
bind to ports 137 to 139 to communicate with some Windows machines.  I would
prefer to directly query the WINS server database to try to overcome these
Question 3. Can I do this?  (How?)

Question 4. Should I use Samba to replicate the WINS database on my linux
Then I could just query the Samba WINS database(?).  (I do not want to
replace the current WINS server, my sys admin would not do very pleasant
things to me)

I would appreciate any help or clarification on points I might have

Thanks,  Andrew Wallace

More information about the samba-technical mailing list