The Basics

Each overlay network is encapsulated by an Overlay Convergence Dependent ( OCD for short) module. So, the first task is to write an OCD module for your new network architecture.

Writing an OCD module

The OCD base class is defined in the file ocd/OCD.h. Your new OCD module should extend this class (see SampleOCD.h in directory sampleOCD). The OCD class implements many utility functions for use by the overlay. Your main task will be to provide overlay specific implementations of a few key functions, which are declared in ocd/OCD_API.h. OCD_API.h groups together in one place, all the member functions of OCD which are usually overloaded. The functions that MUST be overloaded are appropriately marked in this file. An example barebones OCD module is defined in the directory sampleOCD. Please refer to the sample and the inline documentation of the OCD class for more information on how to write an OCD module.

You can generate a new OCD module based on SampleOCD by running the makeNewOCD.sh script located inside the sampleOCD directory. This will give you a ready to compile OCD with the desired name. You can then customize this OCD for your needs. The main purpose of the script is to save you the trouble of copy and renaming files and changing the variable and class names of SampleOCD.

Your OCD module needs to interface with the Proxy and OCI layers for various functions. Rather than including the headers for each of these modules, you can simply include the file OCD_include.h in your code.

At the end of the source code for your main OCD class you should add the following lines. Replace YourClassName with the name of your OCD class (eg: SampleOCD) and YourOCDTypeString with a unique type for your OCD (eg: sampleOCD). Note that YourClassName is the real name of a C++ class and should not be in quotes. YourOCDTypeString is just an identifying string and needs to be in quotes. The following code makes your OCD automatically register with the proxy when it is dynamically loaded.

// Register the OCD with the proxy when the code is dynamically loaded
// The following line sets the name of the OCD's main class
#define MY_OCD_CLASS_NAME YourClassName
// The following line sets the type name of the OCD
#define MY_OCD_TYPE_STR "YourOCDTypeString"
#include "OCDRegister.h"

Please have a look at the SampleOCD implementation. SampleOCD is a barebones OCD which does IP-in-IP tunnelling. More information about SampleOCD can be found in the README in the sampleOCD directory.

Questions?

Please first check out the OCALA wiki at http://ocala.cs.berkeley.edu for a list of frequently asked questions. Please mail .