diff --git a/include/packet.h b/include/packet.h index 4b779c9..2e56939 100644 --- a/include/packet.h +++ b/include/packet.h @@ -125,6 +125,14 @@ public: Packet() : pdu_(0) { } + /** + * \brief Constructs a Packet from a PDU* and a Timestamp. + * + * The PDU* is cloned using PDU::clone. + */ + Packet(PDU *apdu, const Timestamp &tstamp) + : pdu_(apdu->clone()), ts(tstamp) {} + /** * \brief Constructs a Packet from a RefPacket. *