Thanks all,
I got lots to chew on.
Nice to have such good help.
--
Dan
-----Original Message-----
From: Dans Lists
Sent: Sunday, March 24, 2002 1:01 PM
To: [EMAIL PROTECTED]
Subject: MAC address for Multi-NIC systems
The following snipit of code returns a MAC address this is true but when
I try and get the MAC addresses for systems that have more than one NIC
it only returns one of the MAC addresses.
I can not figure out what all is in the hash returned in $ref as well. I
would like to be able to link the IP address to the MAC address.
Can anybody tell me what is going wrong?
--
Dan
use Win32::NetAdmin;
$ref = {};
$host = $ARGV[0];
Win32::NetAdmin::GetTransports( $host, $ref ) || die "Could not get the
MAC Address!";
foreach $trans(keys %{$ref}){
$mac = $ref->{$trans}->{'transport_address'};
print "The hardware address is $mac.\n";
}
_______________________________________________
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