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(); }