AceT_Decoder_Plugin_Load_Proc
摘要
回调:用于装配自定义解码器插件。
语法
<decoder_name>_ace_decoder_load (import_ptr, state_pptr)
| 参数 | 类型 | 说明 |
|---|---|---|
import_ptr |
AceT_Import_Handle * |
Riverbed 分析软件提供的上下文信息。 |
state_pptr |
void ** |
将被设置为自定义解码器状态信息的指针;若操作失败则为 NIL。 |
返回类型
int
状态(1 表示成功,0 表示失败)。
头文件
ace_client_api.h
示例
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);
}
详情
Riverbed 分析软件在初始化 Transaction Analyzer 期间调用该函数,调用时机是在调用自定义解码器的初始化函数(AceT_Decoder_Plugin_Init_Proc)之后。该回调负责挂接状态信息,并加载解码器所需的文件或其他信息。
该回调必须命名为 <decoder_name>_ace_decoder_load,其中 <decoder_name> 与定义该回调的文件名一致(即 <decoder_name>.ets.c)。
如果该回调分配了任何内存,应当定义一个 AceT_Decoder_Delete_Proc,在 Transaction Analyzer 关闭时释放这些内存。