def pktkey(pkt):
    """
    Return a key representing this packet

    This key is a tuple that may be used as a dictionary key.

    It consists of the ``(protocol, pkt_type, <string representing the payload>)``
    """
    return pkt.protocol, pkt.pkt_type, repr(pkt.payload)
