IP to Name Resolution

Herb Lewis herb at chomps.engr.sgi.com
Fri Apr 7 17:42:32 GMT 2000


James Willard wrote:
> 
> I don't suppose there's any way to grab the hostname from the IP address, is
> there? It would be nice to be able to reverse resolve the name from the IP
> using gethostbyaddr(). Currently, I have hacked up something which calls
> nmblookup and grabs the <20> machine name from the output.
> 
> On a similar note, is there also a way to grab the whole <03> username field
> from a given IP or machine name? Nmblookup truncates the display at 15
> characters. I have tried perusing the source to change that output, but
> since I'm not very proficient with C, I couldn't find what I needed.
> Ideally, another utility that doesn't require parsing nmblookup output would
> be best.
> 
> Thanks,
> 
> James Willard
> james at whispering.org

name registrations are limited to 15 characters (plus the "type")

-- 
======================================================================
Herb Lewis                                   Silicon Graphics 
Networking Engineer                          2011 N Shoreline Blvd
Strategic Software Organization              Mountain View, CA  94043  
herb at sgi.com                                 Tel: 650-933-2177
http://www.sgi.com                           Fax: 650-932-2177          
======================================================================


More information about the samba-technical mailing list