Tutorial 1 - creating IP fragment reassembler

IP fragment reassembly is a bit more advanced topic. The tutorial will demonstrate more typical usage of Packet Decoding Framework, part of jNetPcap API.

In order to understand some of the networking concepts discussed in this tutorial you need to first study IP fragmentation and reassembly. Wikipedia has a nice short write up on Ip fragmentation and reassembly (link: Wikipedia). Only a cursory overview understanding is needed to follow the tutorial.

Then we will plan out our strategy for our little application and implement it.

Here are some key concepts about the API that are covered in this tutorial:

  • Building a custom handler that will dispatch reassembled datagram buffers
  • Working with multiple buffers and peering protocol headers to them
  • Overriding specific protocol header fields with our custom values
  • Working with JMemoryPacket to create our custom IP only packet and telling the scanner to decode the reassembled datagram

The complete application source code can be downloaded here: