nmblookup / samba on w32

Luke Kenneth Casson Leighton lkcl at switchboard.net
Mon Dec 15 21:47:06 GMT 1997


> 'nbtstat -A' is slightly more useful, but is not exactly a
> getcomputernamebyaddr() call, which would really be cool, and is (I
> believe) what people are REALLY looking for.

the source code is all there in samba if you need it.

1) call the name_status() function with a netbios name of "*<01>".
2) parse the results (there's code that already does this) and get the
first unique <20> NetBIOS name.  assume that this is the server name.

if you ever receive a unique <20> NetBIOS name that _isn't_ the server
name, then report this as a bug to the vendor of the target machine's
operating system.

regards,

luke

> 
> On Tue, 16 Dec 1997, Jeff Foster  wrote:
> 
> > You can the the nbtstat program to do what you want.  If you have the IP
> > address use this command -
> > 
> > 	nbtstat -A IPAddress
> > 	
> > If you have a machine name -
> > 
> > 	nbtstat -a MachineName
> > 	
> > This queries the machine in question, so it will fail it the machine is not
> > on the network.
> > 
> > Jeff Foster
> 
>                                 [Darrin]
> 
>  "I have no special gift. I am only passionately curious."
> 				- A. Einstein
> 
> Darrin M. Gorski, Research Computer Systems Network Support
> Scientific Research Laboratories, Ford Motor Company
> Internet: dgorski at ford.com | Tel/Fax: +1 (313) 248-3753
> 
> 

<a href="mailto:lkcl at switchboard.net"  > Luke Kenneth Casson Leighton  </a>
<a href="http://mailhost.cb1.com/~lkcl"> Samba Consultancy and Support </a>



More information about the samba mailing list