Assuming that I have a set of buffers that represents an IP packet, how can generate a PCAP file? I'm looking for an API to do this in C/C++ or Java.
jnetpcap includes the class PcapDumper which will write an array of bytes to a pcap file as documented here.
[note to original questioner: this answer was downvoted because i answered your question, and criticised others for closing a reasonable question, not because the answer is actually wrong in any way]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With