1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 04:11:35 +01:00

Refactored several classes.

This commit is contained in:
Matias Fontanini
2012-08-03 13:08:24 -03:00
parent c4a92d2b96
commit c5fce38c3a
18 changed files with 204 additions and 306 deletions

View File

@@ -326,17 +326,3 @@ uint8_t *Tins::TCP::TCPOption::write(uint8_t *buffer) {
}
}
void Tins::TCP::copy_fields(const TCP *other) {
std::memcpy(&_tcp, &other->_tcp, sizeof(_tcp));
_options = other->_options;
_options_size = other->_options_size;
_total_options_size = other->_total_options_size;
}
Tins::PDU *Tins::TCP::clone_pdu() const {
TCP *new_pdu = new TCP();
new_pdu->copy_fields(this);
new_pdu->copy_inner_pdu(*this);
return new_pdu;
}