Class Racket::L5::DNS
In: lib/racket/l5/dns.rb  (CVS)
Parent: RacketPart

Domain Name System

Methods

Attributes

additional_rr    Number of additional RR
answer_rr    Number of answer RR
auth    Answer authenticated?
authoritative    Authoritative?
authority_rr    Number of authority RR
nonauth    Non-authenticated data OK?
opcode    Opcode
payload   
question_rr    Number of questions
recursion_a    Recursion Available?
recursion_d    Recursion Desired?
reply_code    Reply Code
reserved    Reserved
response    Response
truncated    Truncated?
tx_id    Transaction ID

Public Class methods

[Source]

# File lib/racket/l5/dns.rb, line 64
  def initialize(*args)
    super
  end

Public Instance methods

Add an additional record. Automatically increases additional_rr

[Source]

# File lib/racket/l5/dns.rb, line 69
  def add_additional(name, type, klass)
    self.payload += self.add_record(name, type, klass).encode
    self.additional_rr += 1
  end

Add an answer record. Automatically increases answer_rr

[Source]

# File lib/racket/l5/dns.rb, line 75
  def add_answer(name, type, klass)
    self.payload += self.add_record(name, type, klass).encode
    self.answer_rr += 1
  end

Add an authority record. Automatically increases authority_rr XXX: broken. authns records are much more complicated than this.

[Source]

# File lib/racket/l5/dns.rb, line 82
  def add_authority(name, type, klass)
    self.payload += self.add_record(name, type, klass).encode
    self.authority_rr += 1
  end

Add a question record. Automatically increases question_rr

[Source]

# File lib/racket/l5/dns.rb, line 88
  def add_question(name, type, klass)
    self.payload += add_record(name, type, klass).encode
    self.question_rr += 1
  end

[Validate]