macaddr.rb

Path: lib/macaddr.rb
Last Update: Sun Aug 14 21:23:17 -0400 2011

Cross platform MAC address determination. Works for:

  • /sbin/ifconfig
  • /bin/ifconfig
  • ifconfig
  • ipconfig /all

To return the first MAC address on the system:

  Mac.address

To return an array of all MAC addresses:

  Mac.address.list

Required files

rubygems   systemu  

Constants

MacAddr = Macaddr = Mac

[Validate]