introduce typeclass Packet for a protocol packet