code: def capture_udp_packets():
      
      dev = ev(
          "CAP_DEVICE",
          "lo")
  
      """
      Ignore ports for forwarding to consolidators:
  
      Redis VM: 6379, 16379
      RabbitMQ VM: 5672, 15672, 25672
  
      """
  
      # http://biot.com/capstats/bpf.html
      default_filter = "udp"
      custom_filter = ev(
          "NETWORK_FILTER",
          default_filter)
  
      log.info(("starting device={} filter={}")
               .format(
                  dev,
                  custom_filter))
  
      kamene.sniff(
          filter=custom_filter,
          prn=handle_packets)
  
      log.info("done")
docs: capture_udp_packets
  
      Capture ``UDP`` packets and call the ``handle_packets`` method
  
      Change the network interface by ``export CAP_DEVICE=eth0``