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

IP and TCP now calculate checksums always inside write_serialization.

This commit is contained in:
Matias Fontanini
2013-04-11 00:57:36 -03:00
parent 1fbef641da
commit f4522acd44
3 changed files with 37 additions and 27 deletions

View File

@@ -98,6 +98,18 @@ public:
*/
void write(PDU &pdu);
/**
* \brief Writes a PDU to this file.
*
* The template parameter T must at some point yield a PDU& after
* applying operator* one or more than one time. This accepts both
* raw and smartpointers.
*/
template<typename T>
void write(T &pdu) {
write(Utils::dereference_until_pdu(pdu));
}
/**
* \brief Writes all the PDUs in the range [start, end)
* \param start A forward iterator pointing to the first PDU