|
NAMENet::Address::Ethernet - find hardware ethernet addressSYNOPSISuse Net::Address::Ethernet qw( get_address ); my $sAddress = get_address; FUNCTIONSThe following functions will be exported to your namespace if you request :all like so:use Net::Address::Ethernet qw( :all );
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, }, If any non-zero argument is given, debugging information will be printed to STDERR.
NOTESSEE ALSOarp, ifconfig, ipconfigBUGSPlease tell the author if you find any! And please show me the output of `arp <hostname>` or `ifconfig` or `ifconfig -a` from your system.AUTHORMartin 'Kingpin' Thurn, "mthurn at cpan.org", <http://tinyurl.com/nn67z>.LICENSEThis software is released under the same license as Perl itself.#### This is an example of @ahInfo on MSWin32: ( { 'sAdapter' => 'Ethernet adapter Local Area Connection', 'sEthernet' => '00-0C-F1-EE-F0-39', 'sIP' => '16.25.10.14', 'iActive' => 1, }, { 'sAdapter' => 'Ethernet adapter Wireless Network Connection', 'sEthernet' => '00-33-BD-F3-33-E3', 'sIP' => '19.16.20.12', 'iActive' => 1, }, { 'sAdapter' => '{gobbledy-gook}', 'sDesc' => 'PPP adapter Verizon Online', 'sEthernet' => '00-53-45-00-00-00', 'sIP' => '71.24.23.85', 'iActive' => 1, }, ) #### This is Solaris 8: > /usr/sbin/arp myhost myhost (14.81.16.10) at 03:33:ba:46:f2:ef permanent published #### This is Solaris 8: > /usr/sbin/ifconfig -a lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 bge0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 14.81.16.10 netmask ffffff00 broadcast 14.81.16.255 #### This is Fedora Core 6: $ /sbin/arp Address HWtype HWaddress Flags Mask Iface 19.16.11.11 ether 03:53:53:e3:43:93 C eth0 #### This is amd64-freebsd: $ ifconfig fwe0: flags=108802<BROADCAST,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 options=8<VLAN_MTU> ether 02:31:38:31:35:35 ch 1 dma -1 vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet6 fe8d::2500:bafd:fecd:cdcd%vr0 prefixlen 64 scopeid 0x2 inet 19.16.12.52 netmask 0xffffff00 broadcast 19.16.12.255 ether 00:53:b3:c3:3d:39 media: Ethernet autoselect (100baseTX <full-duplex>) status: active nfe0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=8<VLAN_MTU> inet6 fe8e::21e:31ef:fee1:26eb%nfe0 prefixlen 64 scopeid 0x3 ether 00:13:33:53:23:13 media: Ethernet autoselect (100baseTX <full-duplex>) status: active plip0: flags=108810<POINTOPOINT,SIMPLEX,MULTICAST,NEEDSGIANT> mtu 1500 lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 inet 127.0.0.1 netmask 0xff000000 inet 127.0.0.2 netmask 0xffffffff inet 127.0.0.3 netmask 0xffffffff tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1492 inet 83.173.73.3 --> 233.131.83.3 netmask 0xffffffff Opened by PID 268
Visit the GSP FreeBSD Man Page Interface. |