How to Add Custom Decodes to Transaction Analyzer

There are two general actions you must take to add your custom decoder to Transaction Analyzer:

  1. Create a shared object library containing the code.
  2. Notify Transaction Analyzer to use it.

Compiling and Linking

All functions used by a custom decoder must be contained in the same <decoder_name>.ets.c file. Be sure to include ace_client_api.h, ace_externals.h, and the headers for any other packages you use. Compile this file with the following command (see “op_mko” on page 181 for more details about this program):

op_mko -m <decoder_name> -type ets

After compiling them, put your custom decoders into one or more shared object files using op_mkso (described in “op_mkso” on page 187). For example:

op_mkso   -type ets
          -f <decoder_name_1>.dev32.i0.ets.obj ... <decoder_name_n>.dev32.i0.ets.obj
          -m <decoder_library_name>.dll

where

  • -f specifies a list of one or more object files to include in the library (file names with extensions).
  • -m specifies the output file (file name with extension).

Note: The preceding example uses Windows file extensions. On Linux, object files end in .o and libraries end in .so.

Notifying Transaction Analyzer

For a custom decoder to be recognized and used, it must be listed in the ace_decoder_config.gdf file, which is located in the <reldir>\sys\configs directory. Open this file and edit it as follows:

  • Add an entry for each decoder library you have created, as follows (bold text is added):
# IN THIS SECTION OF THE GDF FILE WE DEFINE WHAT DECODERS
# ARE PRESENT IN A PARTICULAR SHARED OBJECT FILE
Shared_Object   ace_decoder
Decoder_List    op_dlc op_tr op_ri op_udp op_tcp op_llc op_snap op_ip op_prn op_nai
	op_nai_enhance op_csv op_http op_ica


Shared_Object   <decoder_library_name>
Decoder_List    <decoder_name_1> ... <decoder_name_n>
  • Add each decoder in your decoder library to one or more of the existing decoder sets. Typically, they will be added to the op_binary sets for Windows and Linux, as follows:
# IN THIS SECTION OF THE GDF FILE WE DEFINE WHICH DECODERS
# Should be used depending on what type of file is being
imported.
Decoder_Set_Sequence  op_binary
File_Type   binary
Platform  UNIX
Product_Options NONE
Decoder_Set  op_tr op_ri op_dlc op_llc op_snap op_ip op_udp op_tcp <decoder_name_1>
	... <decoder_name_n>

. . .

Decoder_Set_Sequence  op_binary
File_Type   binary
Platform  WINDOWS
Product_Options NONE
Decoder_Set  op_tr op_ri op_dlc op_llc op_snap op_ip op_udp op_tcp <decoder_name_1>
	... <decoder_name_n>

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com