Replace DnDns with HeijdenDns

HeijdenDns seems to do a better job at querying SRV records
This commit is contained in:
ORelio 2017-03-11 15:28:32 +01:00
parent a344ac4101
commit 693073edfc
112 changed files with 5491 additions and 5009 deletions

View file

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Heijden.DNS
{
public class Request
{
public Header header;
private List<Question> questions;
public Request()
{
header = new Header();
header.OPCODE = OPCode.Query;
header.QDCOUNT = 0;
questions = new List<Question>();
}
public void AddQuestion(Question question)
{
questions.Add(question);
}
public byte[] Data
{
get
{
List<byte> data = new List<byte>();
header.QDCOUNT = (ushort)questions.Count;
data.AddRange(header.Data);
foreach (Question q in questions)
data.AddRange(q.Data);
return data.ToArray();
}
}
}
}