'for each UDP packet , examine each segment (UDP packet) seperately as each will be a DNS Q/A
pair Q/A by ID and return as pairs'

def packetHandler(self, udp, data):

    addr = udp.addr
    if (addr[0][1] < addr[1][1]):
        addr = (addr[1], addr[0])
    connrqs = self.requests.setdefault(addr, {})
    try:
        dns = dpkt.dns.DNS(data)
    except Exception as e:
        self._exc(e)
    if (dns.qr == dpkt.dns.DNS_Q):
        connrqs[dns.id] = [udp.ts, dns, 0]
    elif (dns.qr == dpkt.dns.DNS_A):
        rq = connrqs.get(dns.id, [None, None, 0])
        rq[2] += 1
        if ('DNSHandler' in dir(self)):
            self.DNSHandler(conn=udp, request=rq[1], response=dns, requesttime=rq[0], responsetime=udp.ts, responsecount=rq[2])
