Message
in package
Represents a DNS protocol message
Tags
Table of Contents
Properties
- $additionalRecords : RecordCollection
- $answerRecords : RecordCollection
- $authoritative : bool
- $authorityRecords : RecordCollection
- $id : int
- $opCode : int
- $questionRecords : RecordCollection
- $recursionAvailable : bool
- $recursionDesired : bool
- $responseCode : int
- $truncated : bool
- $type : int
Methods
- __construct() : mixed
- Constructor
- getAdditionalRecords() : RecordCollection
- Get the additional records collection
- getAnswerRecords() : RecordCollection
- Get the answer records collection
- getAuthorityRecords() : RecordCollection
- Get the authority records collection
- getID() : int
- Get the value of the message ID field
- getOpCode() : int
- Get the value of the message opcode field
- getQuestionRecords() : RecordCollection
- Get the question records collection
- getResponseCode() : int
- Get the value of the message response code field
- getType() : int
- Get the value of the message type field
- isAuthoritative() : bool
- Inspect the value of the authoritative field and optionally set a new value
- isRecursionAvailable() : bool
- Inspect the value of the recursion available field and optionally set a new value
- isRecursionDesired() : bool
- Inspect the value of the recusion desired field and optionally set a new value
- isTruncated() : bool
- Inspect the value of the truncated field and optionally set a new value
- setID() : mixed
- Set the value of the message ID field
- setOpCode() : mixed
- Set the value of the message opcode field
- setResponseCode() : mixed
- Set the value of the message response code field
- setType() : mixed
- Set the value of the message type field
Properties
$additionalRecords
private
RecordCollection
$additionalRecords
Collection of authority records
$answerRecords
private
RecordCollection
$answerRecords
Collection of question records
$authoritative
private
bool
$authoritative
= false
Whether a response message is authoritative
$authorityRecords
private
RecordCollection
$authorityRecords
Collection of authority records
$id
private
int
$id
= 0
Unsigned short that identifies the DNS transaction
$opCode
private
int
$opCode
= \LibDNS\Messages\MessageOpCodes::QUERY
Message opcode, can be indicated using the MessageOpCodes enum
$questionRecords
private
RecordCollection
$questionRecords
Collection of question records
$recursionAvailable
private
bool
$recursionAvailable
= false
Whether a server could provide recursion in a response
$recursionDesired
private
bool
$recursionDesired
= true
Whether a query desires the server to recurse the lookup
$responseCode
private
int
$responseCode
= \LibDNS\Messages\MessageResponseCodes::NO_ERROR
Message response code, can be indicated using the MessageResponseCodes enum
$truncated
private
bool
$truncated
= false
Whether the message is truncated
$type
private
int
$type
= -1
Indicates the type of the message, can be indicated using the MessageTypes enum
Methods
__construct()
Constructor
public
__construct(RecordCollectionFactory $recordCollectionFactory[, int $type = null ]) : mixed
Parameters
- $recordCollectionFactory : RecordCollectionFactory
-
Factory which makes RecordCollection objects
- $type : int = null
-
Value of the message type field
Tags
getAdditionalRecords()
Get the additional records collection
public
getAdditionalRecords() : RecordCollection
Return values
RecordCollectiongetAnswerRecords()
Get the answer records collection
public
getAnswerRecords() : RecordCollection
Return values
RecordCollectiongetAuthorityRecords()
Get the authority records collection
public
getAuthorityRecords() : RecordCollection
Return values
RecordCollectiongetID()
Get the value of the message ID field
public
getID() : int
Return values
intgetOpCode()
Get the value of the message opcode field
public
getOpCode() : int
Return values
intgetQuestionRecords()
Get the question records collection
public
getQuestionRecords() : RecordCollection
Return values
RecordCollectiongetResponseCode()
Get the value of the message response code field
public
getResponseCode() : int
Return values
intgetType()
Get the value of the message type field
public
getType() : int
Return values
intisAuthoritative()
Inspect the value of the authoritative field and optionally set a new value
public
isAuthoritative([bool $newValue = null ]) : bool
Parameters
- $newValue : bool = null
-
The new value
Return values
bool —The old value
isRecursionAvailable()
Inspect the value of the recursion available field and optionally set a new value
public
isRecursionAvailable([bool $newValue = null ]) : bool
Parameters
- $newValue : bool = null
-
The new value
Return values
bool —The old value
isRecursionDesired()
Inspect the value of the recusion desired field and optionally set a new value
public
isRecursionDesired([bool $newValue = null ]) : bool
Parameters
- $newValue : bool = null
-
The new value
Return values
bool —The old value
isTruncated()
Inspect the value of the truncated field and optionally set a new value
public
isTruncated([bool $newValue = null ]) : bool
Parameters
- $newValue : bool = null
-
The new value
Return values
bool —The old value
setID()
Set the value of the message ID field
public
setID(int $id) : mixed
Parameters
- $id : int
-
The new value
Tags
setOpCode()
Set the value of the message opcode field
public
setOpCode(int $opCode) : mixed
Parameters
- $opCode : int
-
The new value
Tags
setResponseCode()
Set the value of the message response code field
public
setResponseCode(int $responseCode) : mixed
Parameters
- $responseCode : int
-
The new value
Tags
setType()
Set the value of the message type field
public
setType(int $type) : mixed
Parameters
- $type : int
-
The new value