I have a connection stream in a C++ vector, where each element is a single packet's bytes. I'd like to take that vector and produce a working packet capture file (one that can be opened in Wireshark, for example).
I've done some reading on building pcap files, but it seems to revolve around structs where each part of the packet has its own struct member, meaning I have to write code that arranges and gives meaning to all the bytes.
Is there a quick and simple way to just pour the packet bytes, perhaps only giving a timestamp to each packet, and getting a pcap out of it?