Generating random packets with certain characteristics and writing them to pcap file

Joined
Oct 2, 2013
Messages
1
Reaction score
0
Hi,

I'm trying to generate random packets (not so much random in contents but more so random in wait times between them) and output them to a pcap file.

Is there any way to do this using the libpcap library? I know I've included a <pcap.h> in the past to read through existing pcap files and traverse the packets in a sequential manner (to replay them back out), but what about generating random timestamps and writing certain payloads to a pcap file? I want to be able to do this for arbitrary Ethernet frames (not just IP, UDP, TCP, etc. just the raw Ethernet frames), and provide microsecond timestamps.

Any experience with this? Am I better off doing this in a language like Python (or Haskell, etc.) -- is there an easier way in one of those?

Thank you all!

Cheers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top