Class: PacketGen::Header::DHCP

Inherits:
Object
  • Object
show all
Defined in:
lib/pcap2json/packetgen_extensions.rb

Instance Method Summary collapse

Instance Method Details

#to_hObject



24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/pcap2json/packetgen_extensions.rb', line 24

def to_h
  data = Hash.new
  
  data["magic"] = self.magic
  
  data["options"] = []

  self.options.each do |option|
    data["options"] << option.to_human
  end
  
  data
end