libpcap IP Packet Reassembly [closed]
开发者_运维技巧
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this questionI'm looking for a sample code for IP packet reassembly in C with libpcap*. Is IP packet defragmentation implemented in libpcap library officially? I've found this proposal : http://www.mail-archive.com/tcpdump-workers@lists.tcpdump.org/msg02991.html[this][1] .
Are there any implementation of defragmentation of IP packets.
[1]: http://www.mail-archive.com/tcpdump-workers@lists.tcpdump.org/msg02991.html [+]
*The reason for looking for the sample code is just for fun and learning and i don't want to spend too much time for writing code for IP packet reassembly.
No, I'm pretty sure that the patch didn't make into libpcap. But you can do ip defragmentation (and also follow TCP streams) with libnids.
If you're looking for a tool that does IP reassembly you can checkout IPDefragUtil. You can also check out out IP reassembly source code here and here
Libpcap is a library to capture raw link-layer packets; it is intended to be used by programs and libraries that do their own processing of those packets, including IP fragment reassembly, etc.. Therefore, it does not, and will not ever, do IP reassembly; that belongs in a separate library.
精彩评论