pcaplibpcapmininetsdnryu

How to convert collected flow statistics to .pcap in Ryu controller


I can now collect the flow statistics from mininet with Ryu controller and write them in a .txt file, and now I'm trying to convert these statistics to a .pcap file. As I have found txt2pcap, I'm not sure if it's useful for this case. Because it requires hexdump and multiple attributes like timestamp, aren't collected by me yet. Can someone help me? Thanks for the help in advance

Below is the statistics I have collected now datapathipv4-dst ipv4_src out-port packets bytes 1 10.0.0.3 10.0.0.1 2 3 294 datapathipv4-dst ipv4_src out-port packets bytes 3 10.0.0.3 10.0.0.1 2 2 196 datapathipv4-dst ipv4_src out-port packets bytes 3 10.0.0.3 10.0.0.1 2 2 196 datapathipv4-dst ipv4_src out-port packets bytes 1 10.0.0.3 10.0.0.1 2 3 294


Solution

  • I'm trying to convert these statistics to a .pcap file

    Pcap files aren't statistics files, they're raw network traffic files. A conversion such as that would be like trying to convert the results of a poll to a listing of the poll preferences of every individual who took the poll - that just can't be done.

    If you want a pcap file, you need a mechanism that captures individual packets and writes out each packet individually (preferably with time stamps).