-
Notifications
You must be signed in to change notification settings - Fork 1
JDWX DNSQuery RR NS
NS Resource Record - RFC1035 section 3.3.11
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / NSD NAME / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
- Class name: NS
- Namespace: \JDWX\DNSQuery\RR
- Parent class: JDWX\DNSQuery\RR\RR
public nsdName
- Visibility: public
public name
- Visibility: public
public type
- Visibility: public
public class
- Visibility: public
public ttl
- Visibility: public
public rdLength
- Visibility: public
public rdata = ''
- Visibility: public
array JDWX\DNSQuery\RR\RR::getPHPRData()
Get the rdata in the format used by PHP's dns_get_record() function.
- Visibility: public
- This method is defined by JDWX\DNSQuery\RR\RR
bool JDWX\DNSQuery\RR\RR::rrFromString(string[] i_rData)
Parse the rdata portion from a standard DNS config line
- Visibility: protected
- This method is abstract.
- This method is defined by JDWX\DNSQuery\RR\RR
- i_rData string[] - a string split line of values for the rdata
?string JDWX\DNSQuery\RR\RR::rrGet(\JDWX\DNSQuery\Packet\Packet i_packet)
Returns the rdata portion of the RR, advancing the referenced packet offset by the correct size.
- Visibility: protected
- This method is abstract.
- This method is defined by JDWX\DNSQuery\RR\RR
- i_packet JDWX\DNSQuery\Packet\Packet - Packet to use for compressed names
bool JDWX\DNSQuery\RR\RR::rrSet(\JDWX\DNSQuery\Packet\Packet i_packet)
Parse the rdata from the current position of the provided Packet object, advancing the packet's internal offset accordingly.
- Visibility: protected
- This method is abstract.
- This method is defined by JDWX\DNSQuery\RR\RR
- i_packet JDWX\DNSQuery\Packet\Packet - a Packet to parse the RR from
string JDWX\DNSQuery\RR\RR::rrToString()
Return the rdata portion of the packet as a string.
This is not the same as the __toString() magic method, which returns the whole RR.
- Visibility: protected
- This method is abstract.
- This method is defined by JDWX\DNSQuery\RR\RR
mixed JDWX\DNSQuery\RR\RR::__construct(?\JDWX\DNSQuery\Packet\Packet i_packet, ?array i_rr)
Constructor - builds a new RR object
- Visibility: public
- This method is defined by JDWX\DNSQuery\RR\RR
- i_packet ?\JDWX\DNSQuery\Packet\Packet - a Packet or null to create an empty object
- i_rr ?array - an array with RR parse values or null to create an empty object
static JDWX\DNSQuery\RR\RR::fromString(string line)
parses a standard RR format lines, as defined by rfc1035 (kinda)
In our implementation, the domain must be specified- format must be
<name> [<ttl>] [<class>] <type> <rdata>
or [] []
name, title, class and type are parsed by this function, rdata is passed to the RR specific classes for parsing.
- Visibility: public
- This method is static.
- This method is defined by JDWX\DNSQuery\RR\RR
- line string - a standard DNS config line
?\JDWX\DNSQuery\RR\RR JDWX\DNSQuery\RR\RR::parse(\JDWX\DNSQuery\Packet\Packet packet)
parses a binary packet, and returns the appropriate RR object, based on the RR type of the binary content.
- Visibility: public
- This method is static.
- This method is defined by JDWX\DNSQuery\RR\RR
- packet JDWX\DNSQuery\Packet\Packet - a Packet used for decompressing names
string JDWX\DNSQuery\RR\RR::__toString()
magic __toString() method to return the RR object as a string
- Visibility: public
- This method is defined by JDWX\DNSQuery\RR\RR
array JDWX\DNSQuery\RR\RR::asArray()
return the same data as __toString(), but as an array, so each value can be used without having to parse the string.
- Visibility: public
- This method is defined by JDWX\DNSQuery\RR\RR
string JDWX\DNSQuery\RR\RR::cleanString(string i_data)
cleans up some RR data
- Visibility: public
- This method is defined by JDWX\DNSQuery\RR\RR
- i_data string - the text string to clean
string JDWX\DNSQuery\RR\RR::get(\JDWX\DNSQuery\Packet\Packet i_packet)
returns a binary packed DNS RR object
- Visibility: public
- This method is defined by JDWX\DNSQuery\RR\RR
- i_packet JDWX\DNSQuery\Packet\Packet - a Packet used for compressing names
array JDWX\DNSQuery\RR\RR::getPHPRecord()
Get the whole record in the format used by PHP's dns_get_record() function.
See the caveats in getPHPRData() about RR-specific data.
- Visibility: public
- This method is defined by JDWX\DNSQuery\RR\RR
bool JDWX\DNSQuery\RR\RR::set(\JDWX\DNSQuery\Packet\Packet i_packet, array i_rr)
builds a new RR object
- Visibility: public
- This method is defined by JDWX\DNSQuery\RR\RR
- i_packet JDWX\DNSQuery\Packet\Packet - (output) a Packet or null to create an empty object
- i_rr array - an array with RR parse values or null to create an empty object
string[] JDWX\DNSQuery\RR\RR::buildString(string[] i_chunks)
Build an array of strings from an array of chunks of text split by spaces.
- Visibility: protected
- This method is defined by JDWX\DNSQuery\RR\RR
- i_chunks string[] - an array of chunks of text split by spaces
string JDWX\DNSQuery\RR\RR::formatString(string i_str)
return a formatted string; if a string has spaces in it, then return it with double quotes around it, otherwise, return it as it was passed in.
- Visibility: protected
- This method is defined by JDWX\DNSQuery\RR\RR
- i_str string - the string to format
string JDWX\DNSQuery\RR\RR::rrGetEx(\JDWX\DNSQuery\Packet\Packet i_packet)
returns a binary packet DNS RR object and throws an exception if it fails
- Visibility: protected
- This method is defined by JDWX\DNSQuery\RR\RR
- i_packet JDWX\DNSQuery\Packet\Packet - Packet to use for compressed names