mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.89k stars 374 forks source link

PacketWriter write custom PDU with own timestamp #470

Open 0blu opened 2 years ago

0blu commented 2 years ago

Hey there,

how do I tell the PacketWriter which timestamp to write when I use a custom PDU?

void write(PDU& pdu, const struct timeval& tv); is private and void PacketWriter::write(PDU& pdu) does not create a timeval on Windows. https://github.com/mfontanini/libtins/blob/7204fbd68855f3019ac87c7dccf1750a9937d011/src/packet_writer.cpp#L54-L63

Maybe https://stackoverflow.com/a/58162122 will help.