1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-26 03:51: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

@@ -181,15 +181,4 @@ PDU* ARP::make_arp_reply(const string& iface, IPv4Address target,
EthernetII* eth = new EthernetII(iface, hw_tgt, hw_snd, arp);
return eth;
}
PDU *ARP::clone_pdu() const {
ARP *new_pdu = new ARP();
new_pdu->copy_fields(this);
new_pdu->copy_inner_pdu(*this);
return new_pdu;
}
void ARP::copy_fields(const ARP *other) {
std::memcpy(&_arp, &other->_arp, sizeof(_arp));
}
}