Esempio n. 1
0
 public RR(RecordReader rr)
 {
     TimeLived = 0;
     NAME = rr.ReadDomainName();
     Type = (Type)rr.ReadUInt16();
     Class = (Class)rr.ReadUInt16();
     TTL = rr.ReadUInt32();
     RDLENGTH = rr.ReadUInt16();
     RECORD = rr.ReadRecord(Type);
     RECORD.RR = this;
 }
Esempio n. 2
0
 public RR(IPAddress address)
 {
     RECORD = new RecordA(address);
 }
Esempio n. 3
0
 /// <summary>
 /// sorts the answers from record into the nameserver/addresses
 /// </summary>
 /// <param name="nameservers"></param>
 /// <param name="nameserveraddresses"></param>
 /// <param name="nameserveraddresV6"></param>
 /// <param name="record"></param>
 private static void SortAnswers(List<RecordNS> nameservers, List<RecordA> nameserveraddresses, List<RecordAAAA> nameserveraddresV6, Record record)
 {
     if (record is RecordNS)
         nameservers.Add(record as RecordNS);
     else if (record is RecordA)
         nameserveraddresses.Add(record as RecordA);
     else if (record is RecordAAAA)
         nameserveraddresV6.Add(record as RecordAAAA);
 }
Esempio n. 4
0
		public RR(RecordReader rr)
		{
			TimeLived = 0;
			NAME = rr.ReadDomainName();
            Type = (DNSType)rr.ReadShort();
			Class = (Class)rr.ReadShort();
			TTL = rr.ReadInt();
			RDLENGTH = rr.ReadShort();
            //Console.WriteLine("RDLENGTH : " + RDLENGTH.ToString());
            RECORD = rr.ReadRecord(Type);
            //Console.WriteLine("Type : " + Type.ToString());
			RECORD.RR = this;

            //Console.WriteLine("TTL=" + TTL + ".");

            if (TTL <= 0)
            {
                TTL = MIN_TTL;
            }
		}