Skip to content

JDWX DNSQuery Question

JDW edited this page Jul 17, 2022 · 1 revision

JDWX\DNSQuery\Question

This class handles parsing and constructing the question section of DNS packets.

This is referred to as the "zone" for update per RFC2136

DNS question format - RFC1035 section 4.1.2

 0  1  2  3  4  5  6  7  8  9  0  1  2  3  4  5

+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | / QNAME / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | qType | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | qClass | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+

  • Class name: Question
  • Namespace: \JDWX\DNSQuery

Properties

qName

public  qName
  • Visibility: public

qType

public  qType
  • Visibility: public

qClass

public  qClass
  • Visibility: public

Methods

__construct

mixed JDWX\DNSQuery\Question::__construct(?\JDWX\DNSQuery\Packet\Packet i_packet)

Constructor - builds a new Question object

  • Visibility: public

Arguments

  • i_packet ?\JDWX\DNSQuery\Packet\Packet - either a Packet object, or null to build an empty object

__toString

string JDWX\DNSQuery\Question::__toString()

magic __toString() function to return the Question object as a string

  • Visibility: public

set

void JDWX\DNSQuery\Question::set(\JDWX\DNSQuery\Packet\Packet i_packet)

Populate this Question object from a Packet object

  • Visibility: public

Arguments

get

string JDWX\DNSQuery\Question::get(\JDWX\DNSQuery\Packet\Packet i_packet)

returns a binary packed Question object

  • Visibility: public

Arguments

  • i_packet JDWX\DNSQuery\Packet\Packet - Packet object this question is part of. This needs to be passed in so that the compressed qname value can be packed in with the names of the other parts of the packet.
Clone this wiki locally