EthMac is the combination of an EthOui and EthNic, used in EthHeader.
EthOui :oui # See EthOui EthNic :nic # See EthNic
# File lib/packetfu/protos/eth/header.rb, line 105 def initialize(args={}) super( EthOui.new.read(args[:oui]), EthNic.new.read(args[:nic])) end
Reads a string to populate the object.
# File lib/packetfu/protos/eth/header.rb, line 117 def read(str) force_binary(str) return self if str.nil? self.oui.read str[0,3] self.nic.read str[3,3] self end
Returns the object in string form.
# File lib/packetfu/protos/eth/header.rb, line 112 def to_s "#{self[:oui]}#{self[:nic]}" end