Class: PacketGen::Header::DNS::Option
- Inherits:
-
Types::TLV
- Object
- Types::Fields
- Types::TLV
- PacketGen::Header::DNS::Option
- Defined in:
- lib/packetgen/header/dns/option.rb
Overview
DNS option
Instance Attribute Summary
Attributes inherited from Types::TLV
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Option
constructor
Force Types::TLV#type and Types::TLV#length fields to be Types::Int16.
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
Force Types::TLV#type and Types::TLV#length fields to be Types::Int16
16 17 18 |
# File 'lib/packetgen/header/dns/option.rb', line 16 def initialize(={}) super .merge!(t: Types::Int16, l: Types::Int16) end |