code: def handle_packets(pk):
      
  
      log.info(("processing with pub={}")
               .format(pub))
  
      # get the lowest layer
      eth = pk.getlayer(kamene.Ether)
  
      should_forward = False
      send_msg = {"data": {},
                  "created": rnow(),
                  "source": SOURCE}
  
      if eth:
          # parse all layer frames under ethernet
          send_msg["data"] = convert_pkt_to_json(eth)
          should_forward = True
      else:
          log.error(("unsupported pk={}")
                    .format(pk))
      # end of if supported
  
      if should_forward:
  
          log.info("forwarding")
  
          # Publish the message:
          msg_sent = pub.publish(body=send_msg,
                                 exchange=FORWARD_EXCHANGE,
                                 routing_key=FORWARD_ROUTING_KEY,
                                 queue=FORWARD_QUEUE,
                                 serializer="json",
                                 retry=True)
  
          log.info("done forwarding={}".format(msg_sent))
docs: handle_packets
  
      :param pk: data packet that kamene sends in