
Net::Address::Ethernet - find hardware ethernet address

use Net::Address::Ethernet qw( get_address ); my $sAddress = get_address;

On Windows (MSWin32), before calling this function, you can set package variable $sIpconfigHome to the folder containing ipconfig.exe (for example, if ipconfig.exe is not found your PATH, or if you don't have permission to execute ipconfig.exe in the normal Windows location).
$Net::Address::Ethernet::sIpconfigHome = 'C:\\my\\bin'; my $sAddr = &Net::Address::Ethernet::get_address;

The following functions will be exported to your namespace if you request :all like so:
use Net::Address::Ethernet qw( :all );
Returns the 6-byte ethernet address in canonical form. For example, '1A:2B:3C:4D:5E:6F'.
When called in array context, returns a 6-element list representing the 6 bytes of the address in decimal. For example, (26,43,60,77,94,111).
Returns an array of hashrefs. Each hashref describes one Ethernet adapter found in the current hardware configuration, with the following entries filled in to the best of our ability to determine:
For example:
{
'sAdapter' => 'Ethernet adapter Local Area Connection',
'sEthernet' => '12:34:56:78:9A:BC',
'rasIP' => ['111.222.33.44',],
'sIP' => '111.222.33.44',
'iActive' => 1,
},
Returns a true value if its argument looks like an ethernet address.
Given a 6-byte ethernet address, converts it to canonical form. Canonical form is 2-digit uppercase hexadecimal numbers with colon between the bytes. The address to be converted can have any kind of punctuation between the bytes, the bytes can be 1-digit, and the bytes can be lowercase; but the bytes must already be hex.


arp, ifconfig, ipconfig

Please tell the author if you find any! And please show me the output of `ipconfig /all` or `arp <hostname>` or `ifconfig` or `ifconfig -a` from your system.

Martin Thurn (mthurn@cpan.org). http://www.sandcrawler.com/SWB/cpan-modules.html

This software is released under the same license as Perl itself.