EthMac is the combination of an EthOui and EthNic, used in EthHeader.
Header Definition
EthOui :oui # See EthOui EthNic :nic # See EthNic
Methods
Class Public methods
Source: show
# File lib/packetfu/protos/eth.rb, line 106 def initialize(args={}) super( EthOui.new.read(args[:oui]), EthNic.new.read(args[:nic])) end
Instance Public methods
Reads a string to populate the object.
Source: show
# File lib/packetfu/protos/eth.rb, line 118 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.
Source: show
# File lib/packetfu/protos/eth.rb, line 113 def to_s "#{self[:oui]}#{self[:nic]}" end