1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Implemented matches_response on several PDUs. Added some test cases.

This commit is contained in:
Matias Fontanini
2013-04-02 21:05:53 -03:00
parent 97049140af
commit f2a5f73337
16 changed files with 352 additions and 12 deletions

View File

@@ -134,6 +134,15 @@ namespace Tins {
*/
PDUType pdu_type() const { return PDU::RAW; }
/**
* \brief Constructs the given PDU type from the raw data stored
* in this RawPDU.
*/
template<typename T>
T to() const {
return T(&_payload[0], _payload.size());
}
/**
* \sa PDU::clone
*/