- Tutorials
- API Examples
- User Guide
- Ch 1 - The Basics
- Ch 2 - libpcap
- 2.1 - The Main libpcap API Overview
- 2.2 - Getting a List of Interfaces
- 2.3 - Opening a Network Interface for Capture
- 2.4 - Opening offline capture
- 2.5 - Setting a packet filter
- 2.6 - Reading one packet at a time
- 2.7 - Reading multiple packets with dispatch loops
- 2.8 - Dumping captured packet to an offline file
- 2.9 - Transmitting packets
- 2.10 - Close Pcap and PcapDumper handles
- Ch 3 - Packet Decoding
- Ch 4 - Internals
- Ch 5 - Protocols
- Ch 6 - Native API
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: IpReassemblyExample.java
»
Printer-friendly- Login or register to post comments
Send via Email
PDF Convert