vendor/xhyve-ruby/lib/xhyve/dhcp.rb
# macos dhcp represents mac addresses differently from xhyve. Specifically, 
# it doesn't display leading zeros. This function normalized the mac
# address to the macos format
macos dhcp represents mac addresses differently from xhyve. Specifically,
it doesn't display leading zeros. This function normalized the mac
address to the macos format
macos dhcp represents mac addresses differently from xhyve . Specifically it doesn ' t display leading zeros . This function normalized the mac address to the macos format
def normalize_mac(mac)
        return mac if mac !~ /.*:.*:.*:.*:.*:.*/
        mac_parts = mac.to_s.split(":")
        normalized_parts = mac_parts.map {|s| Integer(s, 16).to_s(16) }
        normalized_parts.join(":")
    end
def normalize_mac ( mac ) return mac if mac !~ / .*:.*:.*:.*:.*:.* / mac_parts = mac . to_s . split ( ":" ) normalized_parts = mac_parts . map { | s | Integer ( s , 16 ) . to_s ( 16 ) } normalized_parts . join ( ":" ) end
macos dhcp represents mac addresses differently from xhyve.
macos dhcp represents mac addresses differently from xhyve .
# don't try to normalize if it doesn't seem like a mac...
mac
<not_specific>