//-------------------------------------------------------------------------------------------
private string LookupA(string recordname, string sectiontext)
{
Dns_Client dc = new LumiSoft.Net.Dns.Client.Dns_Client();
DnsServerResponse dsr = null;
try
{
dsr = dc.Query(recordname, LumiSoft.Net.Dns.Client.QTYPE.A);
}
catch (Exception ex)
{
throw new Exception("DNS A record query for " + recordname + " failed.", ex);
}
DNS_rr_A[] records = dsr.GetARecords();
string response = sectiontext;
if (records.Length < 1)
{
fail = true;
}
for (int i = 0; i < records.Length; i++)
{
response += (i + 1) + ". ";
response += records[i].IP + " with a TTL of " + records[i].TTL + "<br>";
response += CheckPort(records[i].IP.ToString(), 5222);
response += CheckPort(records[i].IP.ToString(), 5223);
response += CheckPort(records[i].IP.ToString(), 5269);
response += CheckPort(records[i].IP.ToString(), 5270);
}
return(response);
}