I'd like to send packets according to a .pcap file.

31 views
Skip to first unread message

杨天幸

unread,
Jun 24, 2015, 9:20:51 PM6/24/15
to ns-3-...@googlegroups.com
I tried to add a for loop to read the data from the file but failed. Where can I find the key file of generating packets? Or how can I send packets that the size of them are read from the file?

Tommaso Pecorella

unread,
Jun 25, 2015, 4:04:47 PM6/25/15
to ns-3-...@googlegroups.com
Hi,

the best suggestion I can do is:
1) Use something like tshark to print the packets relevant info (time, packet size, protocol, content, etc. Anything.
2) Select the traffic you want to reinject in ns-3 (can't be all, there will be some traffic to be skipped, e.g., ARP).
3) Use Ip RAW sockets or simular to inject the traffic. 

For point 3, you'll need to create a new application. There's nothing similar in ns-3.

Have fun,

T.
Reply all
Reply to author
Forward
0 new messages