Class: PacketGen::Header::DNS::Option

Inherits:
Types::TLV show all
Defined in:
lib/packetgen/header/dns/option.rb

Overview

DNS option

Author:

  • Sylvain Daubert

Since:

  • 1.3.0

Instance Attribute Summary

Attributes inherited from Types::TLV

#length, #type, #value

Instance Method Summary collapse

Methods inherited from Types::TLV

#human_type, #old_type=, #read, #to_human

Methods inherited from Types::Fields

#[], #[]=, #bits_on, define_bit_fields_on, define_field, define_field_after, define_field_before, #fields, fields, inherited, #inspect, #offset_of, #optional?, #optional_fields, #present?, #read, remove_bit_fields_on, remove_field, #sz, #to_h, #to_s, update_field

Constructor Details

#initialize(options = {}) ⇒ Option

See Also:

  • TLV#initialize

Since:

  • 1.3.0



16
17
18
# File 'lib/packetgen/header/dns/option.rb', line 16

def initialize(options={})
  super options.merge!(t: Types::Int16, l: Types::Int16)
end