Have you looked at the dns_spy component? It may be useful as a starting point...
-- Murphy On Sep 18, 2014, at 2:03 AM, Anil Kumar K K <aniluvc...@gmail.com> wrote: > Hi Folks, > > I have been struggling to write a program to dump all the questions and > answers fields of DNS Query and response packets in POX controller. I am new > to python. I have gone through the dns.py library, but did not find any API > to get questions and answers. > > Could you please help me with the code ? > > Here is the code that I tried to find the DNS packet: > dns = packet.find('dns') > 84 if dns is None: > 85 print "Not a DNS packet" > 86 else: > 87 print "DNS Packet" > 88 #self.handle_dns_packet(event) > > > Thanks > Anil