AceT_Decoder_Plugin_Load_Proc
Abstract
Callback: Used to set up a custom decoder plug-in.
Syntax
<decoder_name>_ace_decoder_load (import_ptr, state_pptr)
| Argument | Type | Description |
|---|---|---|
import_ptr |
AceT_Import_Handle * |
Context information supplied by Riverbed analysis software. |
state_pptr |
void ** |
Pointer to be set to the state information for the custom decoder, or NIL if the operation fails. |
Return Type
int
Status (1 for success, 0 for failure).
Header
ace_client_api.h
Example
int
op_ica_ace_decoder_load (AceT_Import_Handle * import_handle_ptr,
void ** state_ptr)
{
FIN (op_ica_ace_decoder_load);
/* Prevent the use of the ICA decoder for people without the ADM */
/* module. The ICA decoder could be used with or without ADM */
/* decodes, however it should not be. */
if (ADM_Sec_Check () == VOSC_FAILURE)
FRET (0);
// Initialize the state
*state_ptr = op_ica_decoder_state_create ();
Ace_Decoder_Decode_Version_Add (import_handle_ptr,
OPC_ICA_ATTRS_DECODE_VERSION1);
FRET (1);
}
Details
Riverbed analysis software calls this function during initialization of Transaction Analyzer, after calling the initialization function (AceT_Decoder_Plugin_Init_Proc) for the custom decoder. This callback is responsible for attaching state information and loading any files or other information needed by the decoder.
This callback must be named <decoder_name>_ace_decoder_load, where <decoder_name> matches the name of the file in which the callback is defined (that is, <decoder_name>.ets.c).
If this callback allocates any memory, you should define an AceT_Decoder_Delete_Proc to free that memory when Transaction Analyzer is closed.