public static MemBlock BuildFailedReplyPacket(DnsPacket Packet, bool refused_implemented) { byte[] res = new byte[Packet.Packet.Length]; Packet.Packet.CopyTo(res, 0); if(refused_implemented) { res[3] |= 5; } else { res[3] |= 4; } res[2] |= 0x80; return MemBlock.Reference(res); }