internal static void DNSHandler(byte[] packetData) { DNSPacket dns_packet = new DNSPacket(packetData); DnsClient receiver = (DnsClient)UdpClient.Client(dns_packet.DestinationPort); if (receiver != null) { receiver.receiveData(dns_packet); } }
internal static void DNSHandler(byte[] packetData) { DNSPacket dns_packet = new DNSPacket(packetData); if (dns_packet.Questions == 1 && dns_packet.AnswerRRs == 1) { DNSPacketAnswer dns_packetanswer = new DNSPacketAnswer(packetData); DNSClient receiver = DNSClient.Client(dns_packetanswer.DestinationPort); if (receiver != null) { receiver.receiveData(dns_packetanswer); } } }