mirror of
https://github.com/mfontanini/libtins
synced 2026-01-25 19:51:34 +01:00
Marked PDU::clone_packet as deprecated.
This commit is contained in:
@@ -172,15 +172,6 @@ PDU *EthernetII::recv_response(PacketSender &sender) {
|
||||
#endif // WIN32
|
||||
|
||||
PDU *EthernetII::clone_packet(const uint8_t *ptr, uint32_t total_sz) {
|
||||
if(total_sz < sizeof(_eth))
|
||||
return 0;
|
||||
PDU *child = 0, *cloned;
|
||||
if(total_sz > sizeof(_eth)) {
|
||||
if((child = PDU::clone_inner_pdu(ptr + sizeof(_eth), total_sz - sizeof(_eth))) == 0)
|
||||
return 0;
|
||||
}
|
||||
cloned = new EthernetII(ptr, std::min(total_sz, (uint32_t)sizeof(_eth)));
|
||||
cloned->inner_pdu(child);
|
||||
return cloned;
|
||||
return new EthernetII(ptr, total_sz);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user