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; }
public RR(IPAddress address) { RECORD = new RecordA(address); }
/// <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); }
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; } }