DNS Response Header
Ejemplo n.º 1
0
		public Response(IPEndPoint iPEndPoint, byte[] data)
		{
			Error = "";
			Server = iPEndPoint;
			TimeStamp = DateTime.Now;
			MessageSize = data.Length;
			RecordReader rr = new RecordReader(data);

			Questions = new List<Question>();
			Answers = new List<AnswerRR>();
			Authorities = new List<AuthorityRR>();
			Additionals = new List<AdditionalRR>();

			header = new Header(rr);

			for (int intI = 0; intI < header.QDCOUNT; intI++)
			{
				Questions.Add(new Question(rr));
			}

			for (int intI = 0; intI < header.ANCOUNT; intI++)
			{
				Answers.Add(new AnswerRR(rr));
			}

			for (int intI = 0; intI < header.NSCOUNT; intI++)
			{
				Authorities.Add(new AuthorityRR(rr));
			}
			for (int intI = 0; intI < header.ARCOUNT; intI++)
			{
				Additionals.Add(new AdditionalRR(rr));
			}
		}
Ejemplo n.º 2
0
		public Request()
		{
			header = new Header();
			header.OPCODE = OPCode.Query;
			header.QDCOUNT = 0;

			questions = new List<Question>();
		}
Ejemplo n.º 3
0
		public DNSRequest()
		{
			header = new Header();
			header.OPCODE = OPCode.QUERY;
			header.QDCOUNT = 0;

			Questions = new List<Question>();
		}
Ejemplo n.º 4
0
		public DNSResponse()
		{
			Questions = new List<Question>();
			Answers = new List<AnswerRR>();
			Authorities = new List<AuthorityRR>();
			Additionals = new List<AdditionalRR>();

			Server = new IPEndPoint(0,0);
			MessageSize = 0;
			TimeStamp = DateTime.Now;
			header = new Header();
		}