Пример #1
0
        public DnsName GetNameAtOffset(int offset)
        {
            if (!Names.ContainsKey(offset))
            {
                var name = new DnsName(this, PacketContent, offset);
                Names.Add(offset, name);
            }

            return Names[offset];
        }
Пример #2
0
        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;
        }
Пример #3
0
 public DnsQueryQuestion(string name, DnsRecordType recordType)
     : this()
 {
     Name = new DnsName(name);
     RecordType = recordType;
 }