Replace PacketType annotation by an enum