internal void Deserialize(ref DnsBufferReader buffer) { this.UniqueID = buffer.ReadUShort(); byte b = buffer.ReadByte(); this.IsRequest = ((b & 0x80) == 0); this.OpCode = (DnsStandard.OpCode)(byte)((b >> 3) & 0x0F); this.IsAuthoritativeAnswer = ((b & 0x04) != 0); this.IsTruncated = ((b & 0x02) != 0); this.IsRecursionDesired = ((b & 0x01) != 0); b = buffer.ReadByte(); this.IsRecursionAvailable = ((b & 0x80) != 0); this.ResponseCode = (DnsStandard.ResponseCode)(byte)(b & 0x0F); this.QuestionCount = buffer.ReadShort(); this.AnswerCount = buffer.ReadShort(); this.NameServerAnswerCount = buffer.ReadShort(); this.AdditionalAnswerCount = buffer.ReadShort(); }
internal void Deserialize(ref DnsBufferReader buffer) { this.UniqueID = buffer.ReadUShort(); byte b = buffer.ReadByte(); this.IsRequest = ((b & 0x80) == 0); this.OpCode = (DnsStandard.OpCode)(byte)((b >> 3) & 0x0F); this.IsAuthoritativeAnswer = ((b & 0x04) != 0); this.IsTruncated = ((b & 0x02) != 0); this.IsRecursionDesired = ((b & 0x01) != 0); b = buffer.ReadByte(); this.IsRecursionAvailable = ((b & 0x80) != 0); this.ResponseCode = (DnsStandard.ResponseCode) (byte)(b & 0x0F); this.QuestionCount = buffer.ReadShort(); this.AnswerCount = buffer.ReadShort(); this.NameServerAnswerCount = buffer.ReadShort(); this.AdditionalAnswerCount = buffer.ReadShort(); }
/// <summary> /// Reads data into this RR from the DNS wire format data in <paramref name="reader"/> /// </summary> /// <param name="reader">Reader in which wire format data for this RR is already buffered.</param> protected override void DeserializeRecordData(ref DnsBufferReader reader) { this.Preference = reader.ReadShort(); this.Exchange = reader.ReadDomainName(); }