- Joined
- Oct 1, 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
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