Intel IXA SDK ACE Programming Framework - Department of ...
Intel IXA SDK ACE Programming Framework - Department of ...
Intel IXA SDK ACE Programming Framework - Department of ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>ACE</strong>s and Support Structures<br />
l<br />
l<br />
For more information on crosscalls, see Chapter 11, “Communication Within an<br />
Application.”<br />
For detailed reference information on OMS functions, see the <strong>IXA</strong> <strong>SDK</strong> Reference.<br />
<strong>ACE</strong>s and Support Structures<br />
The primary processing element on an <strong>IXA</strong> application is the <strong>ACE</strong>. An application<br />
can contain multiple <strong>ACE</strong>s to perform different processing operations, can start and<br />
stop <strong>ACE</strong>s at run time, and can change how packets flow from ports, through <strong>ACE</strong>s,<br />
and out <strong>of</strong> ports.<br />
The <strong>IXA</strong> <strong>SDK</strong> defines system <strong>ACE</strong>s to represent the physical network interfaces and<br />
the Linux TCP/IP stack, and library <strong>ACE</strong>s to perform typical network processing<br />
tasks. You define additional <strong>ACE</strong>s to process packets as needed by your application.<br />
Creating <strong>ACE</strong>s<br />
To define and create an <strong>ACE</strong>, you must first create the <strong>ACE</strong> single object executable.<br />
To do this:<br />
1. Define the <strong>ACE</strong>’s initialization phase in a C source file. This file must contain a<br />
definition for the initialization function ix_init. This function definition must, at<br />
least, allocate an <strong>ACE</strong> structure (ix_ace) and call ix_ace_init, which creates the<br />
<strong>ACE</strong> object. The function should also create and initialize any other structures<br />
that belong to the <strong>ACE</strong>, such as targets and sets. The file must also define a corresponding<br />
termination function (ix_fini) that cleans up the created structures.<br />
2. Define the <strong>ACE</strong>’s action phase in a C source file. The action code must contain<br />
definitions for the <strong>ACE</strong>’s action functions, which implement the handling and<br />
disposition <strong>of</strong> classified packets.<br />
3. Define the crosscall interfaces for interobject communication in an <strong>IXA</strong> IDL source<br />
file, compile it with the tao_idl compiler. This results in additional C source files<br />
for the <strong>ACE</strong>. See “Supporting Languages” on page 23.<br />
4. Define the <strong>ACE</strong>’s classification phase in an NCL source file. See “Supporting<br />
Languages” on page 23.<br />
5. Compile and link the initialization, action, and classification code into a single<br />
executable. (See Chapter 3, “Compiling and Testing Applications.”)<br />
An application’s manager program can create and initialize the application’s <strong>ACE</strong>s<br />
by calling Resolver functions in the OMS. To do this, it must first create a CAP<br />
channel through which to communicate with the Resolver. In the manager program:<br />
1. Create a CAP channel to the OMS using the ASL function ix_cap_init.<br />
2. Open a Resolver session by passing the CAP to the OMS function ix_res_open.<br />
3. Create the <strong>ACE</strong> using the function ix_res_create_ace, passing the Resolver<br />
session handle, the name <strong>of</strong> the <strong>ACE</strong>, and the path to the <strong>ACE</strong> executable in the<br />
development file system.<br />
You can also create <strong>ACE</strong>s from the command line or a script using the utility ixace.<br />
This utility creates a Resolver session and calls the ix_res_create_ace function.<br />
22 Elements <strong>of</strong> an Application<br />
Revision 3.3, August 2001