title: How to use Python to extract packet information from hexdump?
body: <p>I am working on a network project where I have hexdump of packets and I need to dissect that hexdump packet to display all the packet information.</p>
  
  <p>Example : Packet Information Fields - </p>
  
  <pre><code>source address
  destination address
  encapsulation type
  frame number
  frame length
  FCS
  data
  epoch time
  </code></pre>
  
  <p>We are not supposed to use file as input and output because it will increase memory utilization and might crash server.</p>
  
  <p>I tried with below code but this doesn't work in my case:</p>
  
  <pre><code># imports scapy Utility
  
  from scapy.all import *
  from scapy.utils import *
  
  # variable to store hexdump
  
  hexdump = '0000  49 47 87 95 4a 30 9e 9c f7 09 70 7f....'
  
  # Initialize a 802.11 structure from raw bytes
  
  packet = Dot11(bytearray.fromhex(hexdump))
  
  #scapy function to view the info
  
  packet.summary()
  packet.show()
  </code></pre>
  
  <p>Are there any suggestions to achieve this as I am new to this technology? I might lack some proper directions to solve this.</p>