The ONL Tutorial

Tutorial >> More Plugins TOC

Overview

Plugins allow a user to perform custom packet processing. Below is a list of typical operations that a user may want to perform. There is a standard plugin that demonstrates some aspect of each operation. Each Web page in this section describes how one of these operations can be done with a plugin. And, in many cases, a standard plugin code can be used as a basis for your own custom processing.

The plugin code described in this section is located in the directory ~onl/stdPlugins. However, the code shown here has been simplified by omitting debug code and any empty code blocks resulting from the removal.

In most cases, the operations are confined to the handle_packet routine where the plugin is given the packet. In the case of the pdelay plugin, a callback function is called periodically so that the plugin can decide whether a packet's delay has expired and should be forwarded.

During the tour of these plugin snippets, you will encounter functions that access fields in a packet buffer or fields in an IP packet, UDP packet or TCP packet. These functions are summarized in Summary_Information => SPC_Macros_and_Functions.


Revised: Fri, June 9, 2006
  

Tutorial >> More Plugins TOC