docs: def pcapname(dev):
      """Get the device pcap name by device name or Scapy NetworkInterface
  
      """
      if isinstance(dev, NetworkInterface):
          if dev.is_invalid():
              return None
          return dev.pcap_name
      try:
          return IFACES.dev_from_name(dev).pcap_name
      except ValueError:
          return IFACES.dev_from_pcapname(dev).pcap_name