Class: NetAddr::EUI48
Overview
EUI-48 Address - Inherits all methods from NetAddr::EUI. Addresses of this class have a 24-bit OUI and a 24-bit EI.
Instance Method Summary collapse
-
#to_eui64 ⇒ Object
Synopsis Return an EUI64 address based on the current EUI48 address.
Methods inherited from EUI
#address, create, #ei, #initialize, #link_local, #oui, #to_i, #to_ipv6, #to_s
Constructor Details
This class inherits a constructor from NetAddr::EUI
Instance Method Details
#to_eui64 ⇒ Object
Synopsis
Return an EUI64 address based on the current EUI48 address.
Example: addr = NetAddr::EUI.create(‘aabb.ccdd.eeff’) addr.to_eui64 => NetAddr::EUI64
Arguments:
-
none
Returns:
-
NetAddr::EUI64 object
446 447 448 449 |
# File 'lib/eui.rb', line 446 def to_eui64() eui = @oui + 'fffe' + @ei return( NetAddr::EUI64.new(eui.to_i(16)) ) end |