Discussion:
libsmbclient: Any way to resolve IP<->NetBIOS Name?
Tim Hutt
20 years ago
Permalink
Hi.

Is there any way to resolve IP addresses to NetBIOS names or vice versa? I've
looked at the nmblookup code and it appears to use code internal to samba. I
want to do this just using libsmbclient, and there appears to be no way to do
it. I would have though it's a fairly common thing to do... Maybe I will just
have to spawn nmblookup for now, ugly as that is.

Also, I have written a C++ wrapper for libsmbclient called libsmbmm. If anyone
would like it send me an email. It is complete but entirely untested at the
moment.

Thanks

-Tim

PS: Not subscribed. CC me please :-)
Gerald (Jerry) Carter
20 years ago
Permalink
Post by Tim Hutt
Hi.
Is there any way to resolve IP addresses to NetBIOS names or vice versa? I've
looked at the nmblookup code and it appears to use code internal to samba. I
want to do this just using libsmbclient, and there appears to be no way to do
it. I would have though it's a fairly common thing to do... Maybe I will just
have to spawn nmblookup for now, ugly as that is.
name_status_find(). Note that if you install libnss_wins.so, you can
just run gethostbyaddr().





cheers, jerry
Tim Hutt
20 years ago
Permalink
Post by Gerald (Jerry) Carter
Post by Tim Hutt
Hi.
Is there any way to resolve IP addresses to NetBIOS names or vice versa?
I've looked at the nmblookup code and it appears to use code internal to
samba. I want to do this just using libsmbclient, and there appears to be
no way to do it. I would have though it's a fairly common thing to do...
Maybe I will just have to spawn nmblookup for now, ugly as that is.
name_status_find(). Note that if you install libnss_wins.so, you can
just run gethostbyaddr().
Yeah, but isn't that something internal to Samba? I don't seem to be able to
access it through libsmbclient.

-Tim
Gerald (Jerry) Carter
20 years ago
Permalink
...
Talk to ***@samba.org about it but patches to libsmbclient
are always welcome :-) Of course if you know that libnss_wins.so
is installed, then the standard libc calls will work. But this does
require some additional software on the host system.





cheers, jerry
=====================================================================
Alleviating the pain of Windows(tm) ------- http://www.samba.org
Centeris ----------- http://www.centeris.com
"There's an anonymous coward in all of us." --anonymous
Loading...