IP Reassembly in the Daemon

As noted in the introduction, the daemon version of the reassembler requires more code to handle the fragment reassembly.

The simplest traffic case for this application is when packets are not fragmented. In this case, the application passes the packets through without further examination.

To perform defragmentation, the application sets up some data structures in object-cache shared memory. A shared hashtable allows the code to look up a hash value to access an ordered list of IP fragment packets seen up to that point in the same group. The hash key is composed of the source IP address, the destination IP address, the protocol encapsulated by the IP header, and the fragment group ID.

The reassembly logic is found in the process_fragment() function in the file reassembler_packet.c.

The logic is as follows:

Note:
This application always uses the maximum number of data CPUs available. It is, therefore, possible that the list of packets associated with each hash key is accessed by multiple data CPUs. This will cause increased lock contention. To minimize this, you should enable the data-flow-affinity option in the configuration database for the MultiServices PIC on which the application is run. (For more information, see Flow Affinity on the Data Plane.)
jbuf API Usage in the Daemon Version
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