[DNS_Response] is a helper type which is used to format both DNS requests and responses. Normally a value of this type will only be returned from the [DNS_Lookup] tag when -ShowRequest or -ShowResponse is specified. However, this type can also be used to parse raw DNS requests or response if necessary.
The tag accepts a single parameter which is a byte stream of the DNS request or response to be formatted. The parsed response can then be displayed in several different formats depending on which member tag is used.
[DNS_Response->Answer] wil return an array of answers for most DNS responses. Address lookups or reverse lookups will return an array of IP addresses or host names. MX record lookups wil return an array of pairs each with a priority and an IP address. Other lookups may return an array of strings or other data.
[DNS_Response->Format] formats the DNS request or response so it user readable. This is a good choice for displaying the results of a DNS query to a site visitor since it will include the answer as well as supporting details like the DNS server queried.
[DNS_Response->BitFormat] formats the DNS request or response as low-level data in a user readable format. This might be useful for debugging DNS operation.
[DNS_Response->Data] simply returns the data which was passed into the type. This tag is useful for getting either the raw request or response from the [DNS_Lookup] tag.
[Var: 'myDNSResponse' = (DNS_Lookup: 'www.example.com')] [$myDNSResponse->Answer] [$myDNSResponse->Format] [$myDNSResponse->BitFormat] [$myDNSResponse->Data]
See the Lasso 8 Language Guide for examples of how to use this tag.
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.