示例#1
0
        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);
            }
        }
示例#2
0
        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);
                }
            }

        }