code: def _low_level_dispatch(pcapdev, devname, pktqueue):
          '''
          Thread entrypoint for doing low-level receive and dispatch
          for a single pcap device.
          '''
          while LLNetReal.running:
              # a non-zero timeout value is ok here; this is an
              # independent thread that handles input for this
              # one pcap device.  it throws any packets received
              # into the shared queue (which is read by the actual
              # user code)
              pktinfo = pcapdev.recv_packet(timeout=0.2)
              if pktinfo is None:
                  continue
              pktqueue.put( (devname,pcapdev.dlt,pktinfo) )
  
          log_debug("Receiver thread for {} exiting".format(devname))
          stats = pcapdev.stats()
          log_debug("Final device statistics {}: {} received, {} dropped, {} dropped/if".format(devname, stats.ps_recv, stats.ps_drop, stats.ps_ifdrop)f _low_level_dispatch(pcapdev, devname, pktqueue):
          '''
          Thread entrypoint for doing low-level receive and dispatch
          for a single pcap device.
          '''
          while LLNetReal.running:
              # a non-zero timeout value is ok here; this is an
              # independent thread that handles input for this
              # one pcap device.  it throws any packets received
              # into the shared queue (which is read by the actual
              # user code)
              pktinfo = pcapdev.recv_packet(timeout=0.2)
              if pktinfo is None:
                  continue
              pktqueue.put( (devname,pcapdev.dlt,pktinfo) )
  
          log_debug("Receiver thread for {} exiting".format(devname))
          stats = pcapdev.stats()
          log_debug("Final device statistics {}: {} received, {} dropped, {} dropped/if".format(devname, stats.ps_recv, stats.ps_drop, stats.ps_ifdrop))
docs: Thread entrypoint for doing low-level receive and dispatch
          for a single pcap device.