Net::Address::Ethernet - find hardware ethernet address
use Net::Address::Ethernet qw( get_address ); my $sAddress = get_address; my $sMethod = &Net::Address::Ethernet::method;
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).
After a successful call to get_address(), the method() function will tell you how the information was derived. Currently there are two possibilities: 'arp' for Unix-like systems, or 'ipconfig' for Win32. If you haven't called get_address(), 'N/A' will be returned. If something went wrong during get_address, 'failed' will be returned by method().
Returns a true value if its argument is 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.
ipconfig, arp
Please tell the author if you find any! And please show me the output format of `ipconfig /all` or `arp` from your system.
Martin Thurn (mthurn@cpan.org).
To install Net::Address::Ethernet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Address::Ethernet
CPAN shell
perl -MCPAN -e shell install Net::Address::Ethernet
For more information on module installation, please visit the detailed CPAN module installation guide.