reassembling fragmented ip packets from a pcap file and save the results into another pcap file
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
reassembling fragmented ip packets from a pcap file and save the results into another pcap file
Hi all
I need to know is it possible to read a pcap file from a c/c++ programming language and reassemble the ip fragmented packets then save the results into another pcap file ?
I googling a lot but i cant find a solution to reassemble fragmented packets and save the results into another pcap file, most of the solutions are reassembling and printing results onto console.
Is it possible to do this with libpcap library ?
A note: IP packets might be bigger than the maximal size of Ethernet packets.
I know that but I dont want to reinject packets into the network, I just want to have complete packets in my pcap file not fragmented packets.
I just wanna analyse that pcap file which does not have fragmented packets.
Last edited by kikilinux; 02-12-2016 at 07:11 AM.
Reason: to clarify subject better
It's been a long time for me using Wireshark. I think it's called something else these days. Either case, are the pcap files ASCII readable? If so, then just open() the file, parse it, grab what you want, and process it however you wish. An alternative is to use the tool which generates and reviews the pcap file and have it export the relevant sections as CSV or something and then do the processing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.