Creates a Fast Response Cache Accelerator (FRCA) control instance.
FRCA Library (libfrca.a)
#include <frca.h>
int32_t FrcaCtrlCreate ( FrcaHandle, InstanceSpec);
int32_t * FrcaHandle;
frca_ctrl_create_t * InstanceSpec;
The FrcaCtrlCreate subroutine creates and configures an FRCA instance that is associated with a previously configured TCP listen socket. TCP connections derived from the TCP listen socket are intercepted by the FRCA instance and, if applicable, adequate responses are generated by the in-kernel code on behalf of the user-level application.
The only FRCA instance type that is currently supported handles static GET requests as part of the Hypertext Transfer Protocol (HTTP).
FrcaHandle | Returns a handle that is required by the other FRCA API subroutines to refer to the newly configured FRCA instance. |
InstanceSpec | Points to a frca_ctrl_create_t structure, which specifies the
parameters used to configure the newly created FRCA instance. The
structure contains the following members:
uint32_t serverType; char * serverName; uint32_t nListenSockets; uint32_t * ListenSockets; uint32_t flags; uint32_t nMaxConnections; uint32_t nLogBufs; char * logFile;
Note: Structure members do not necessarily appear in this order.
|
|
|
0 | The subroutine completed successfully. |
-1 | The subroutine failed. The global variable errno is set to indicate the specific type of error. |
EINVAL | The FrcaHandle or the InstanceSpec parameter is zero or is not of the correct type or the listenSockets components do not specify any socket descriptors. |
EFAULT | The FrcaHandle or the InstanceSpec or a component of the InstanceSpec points to an invalid address. |
ENOTREADY | The kernel extension is currently being loaded or unloaded. |
ENOTSOCK | A TCP listen socket does not exist. |
The FrcaCacheCreate subroutine, the FrcaCacheDelete subroutine, the FrcaCacheLoadFile subroutine, the FrcaCacheUnloadFile subroutine, the FrcaCtrlDelete subroutine, the FrcaCtrlLog subroutine, the FrcaCtrlStart subroutine, the FrcaCtrlStop subroutine.