class Dashed::Packet
Attributes
raw_packet[R]
Public Class Methods
new(raw_packet)
click to toggle source
# File lib/dashed/packet.rb, line 5 def initialize(raw_packet) @raw_packet = raw_packet end
Public Instance Methods
host_mac_address()
click to toggle source
# File lib/dashed/packet.rb, line 9 def host_mac_address raw_packet. data. unpack("C*"). map { |i| i.to_s(16) }. map { |i| if i.length == 1 then "0#{i}" else i end}. slice(6, 6). join(":") end