This program takes as input a PCAP file and extracts the different network layer headers and prints them out in a csv format. The output is printed in the terminal.
Compile the program:
$ gcc feature_extract.crun the program. The program requires as argument the path to the pcap file:
$ ./a.out ../Input.csvThe output will be printed on the terminal which can be redirected to an output file:
$ ./a.out ../Input.csv >> output.csvcall the script as follows:
tshark_script.sh file.pcap > output.csvwhere file.pcap is the input .pcap file.