Method: Dnsruby::RR::OPT#encode_rdata

Defined in:
lib/dnsruby/resource/OPT.rb

#encode_rdata(msg, canonical = false) ⇒ Object



240
241
242
243
244
245
246
247
248
# File 'lib/dnsruby/resource/OPT.rb', line 240

def encode_rdata(msg, canonical=false)
  if (@options)
    @options.each do |opt|
      msg.put_pack('n', opt.code)
      msg.put_pack('n', opt.data.length)
      msg.put_pack('a*', opt.data)
    end
  end
end