There are several ways. You can use the the Socket modules gethostbyaddr
function or the Net::Domain module which offers the following functions:

hostfqdn ()- Identify and return the FQDN of the current host.
hostname () - Returns the smallest part of the FQDN which can be used to
identify the host.
hostdomain () - Returns the remainder of the FQDN after the hostname has
been removed.

Hope this helps.

Kind regards,
Trevor J. Joerges
--------------------------------------------
$_=q;rrUSFWPSZK.ZKPFSHFT,rkvtuZbopuifsZQZibdl
rrqpxfsfeZcyZQ,,riuuq://xxx.%.dpn,ru~@%.dpn ,rrr8-)
;;s;\~;kpfshft;g;s;\%;tfoenjnf;g;y;B-x;A-w;;
s;P;perl;g;s;,;\n;g;s;Y; ;g;s;q;\t;g;print;
--------------------------------------------

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 16, 2002 12:11 PM
Subject: Using an API how do you translate a tcp/ip address to NetBIOS name?


Does anyone know the API interface to translate an tcp/ip address
(ie: 123.456.789.123) to the corresponding NETBIOS name(ie: \\workstation)?

>From the command line you can do this function with

NBTSTAT -A 123.456.789.123

I know I could use system or back ticks and use a regular expression to
compile the info. I was just hoping to collect the information directly
with a API.

Howard Jares
University of Houston
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to