Put a serialized packet into a Tins::PDU &packet with libtins

Viewed 13

I am trying to put a serialized PDU &packet (serialization_type) back into a PDU &packet to send it with libtins.

my Code:

PDU *new_pdu = sniffer.next_packet();
PDU &packet = *new_pdu;
auto ser_packet = packet.serialize();

//then i do some changes in my serialized pdu....

sender.send(ser_packet); // Here the Error occures, because the send function needs a Tins::PDU &pdu
delete new_pdu;

Can you please help me to solve this problem?

0 Answers
Related