The IP Reassembler and Passthru Plugin

Files In This Example

Once you create your development sandbox, the source code for this example is available in the following locations:

For information about creating your development sandbox, see "Creating Reference and Development Sandboxes" in the Installation Guide.

Overview of the IP Reassembler

The IP Reassembler sample code demonstrates two ways to handle IP fragment reassembly: using a daemon and using a plugin. Both examples run on the Juniper Networks Multiservices PIC or DPC hardware module. When you use a plugin, however, the plugin framework takes care of any required reassembly automatically. Thus, the plugin version simply passes traffic through and logs any fragment packets that it sees (which should be none).

Daemon Version

The design for the daemon version assumes that the application will operate in the data path. The data component of the application reads the configuration from command-line options and performs the IP reassembly.

Note:
Applications also usually include a management component running in the router's control plane to control the behavior of the application. However, to keep this demonstration focused on the reassembler functionality, this code includes only a data component.

User Interface in the Daemon Version

User interfaces for SDK applications usually derive from the JUNOS user interface, with both configuration and command components (for an introduction, see System and User Interface Configuration). However, this application has no management component to implement the UI, so it uses command-line options with the daemon. These are defined at the time of packaging, not runtime.

The command-line options are as follows:

Plugin Version

The plugin version of Reassembler serves as a good starting point for learning the plugin model and its associated events. You can compare the code to the daemon version to see how to code event handlers to let the plugin framework handle the reassembly logic for you.

When the plugin receives a packet, it writes a log message in the following format:

"<source IP address> -> <destination IP address>" 

These messages are built when observing the first packet of each session, and the strings are stored in the session context for use with subsequent packets in the same session.

IP Reassembly in the Daemon


2007-2009 Juniper Networks, Inc. All rights reserved. The information contained herein is confidential information of Juniper Networks, Inc., and may not be used, disclosed, distributed, modified, or copied without the prior written consent of Juniper Networks, Inc. in an express license. This information is subject to change by Juniper Networks, Inc. Juniper Networks, the Juniper Networks logo, and JUNOS are registered trademarks of Juniper Networks, Inc. in the United States and other countries. All other trademarks, service marks, registered trademarks, or registered service marks are the property of their respective owners.
Generated on Sun May 30 20:26:47 2010 for Juniper Networks Partner Solution Development Platform JUNOS SDK 10.2R1 by Doxygen 1.4.5