public DnsName GetNameAtOffset(int offset) { if (!Names.ContainsKey(offset)) { var name = new DnsName(this, PacketContent, offset); Names.Add(offset, name); } return Names[offset]; }
private IDnsQueryAnswer GetDnsQueryAnswer(IDnsNameParser parser, DnsName name, DnsRecordType recordType, DnsRecordClass recordClass, UInt32 ttl, short recordDataLength, int recordDataOffset, byte[] packetContent) { var answer = GetDnsQueryAnswer(parser, recordType, recordDataLength, null, packetContent, recordDataOffset); answer.Name = name; answer.RecordType = recordType; answer.RecordClass = recordClass; answer.Ttl = ttl; answer.RecordDataLength = recordDataLength; //answer.RecordData = recordData; return answer; }
public DnsQueryQuestion(string name, DnsRecordType recordType) : this() { Name = new DnsName(name); RecordType = recordType; }