beautypg.com

Module data – Teledyne LeCroy Protocol Analyzers File-Based Decoding User Manual User Manual

Page 74

background image

File-based Decoding User Manual

68

LeCroy Corporation

Module Data

There are several standard global variables that should be defined in a module which are
queried by the application to figure out what the module is supposed to do.

ModuleType

Required. A string describing the role of the script. Currently, only
Transaction Decoder is valid.
E

XAMPLE

set ModuleType = "Transaction Decoder";

Note: The following applies to transaction decoding:

When a script is first invoked, it is given an input context that corresponds to a packet or
transaction that is a candidate for being a part of a larger transaction. The output context
is initially empty. It is the script's job to examine the input context and decide if it qualifies
for membership in the type of transaction that the script was designed to decode. If it
qualifies, the appropriate values are decoded and put in the output context symbol table,
and if the transaction is complete, it is done. If the transaction is not complete, the script
indicates this to the application based on its return value, and is invoked again with the
same output context, but a new input context. The script then must decide if this new
input context is a member of the transaction, and keep doing this until the transaction is
complete.

In order to accomplish all this, state information should be placed in the output context. It
should be possible to use the output context of one transaction as an input context to
another transaction.

OutputType

Required. A string label describing the output of the script. Example: AVC Transaction
E

XAMPLE

set OutputType = "BNEP";

InputType

Required. A string label describing the input to the script. Input and output types should
be matched by the application in order to decide which modules to invoke on which
contexts.

E

XAMPLE

set InputType = "L2CAP";

LevelName

Optional. A string that names this decoder.

E

XAMPLE

set LevelName = "BNEP Transactions";