Tagger is extension for automatic PDU tagging.

## Tag rule

For each tag you have to create rule:

- Name: for clarity.
- Description: for clarity.
- Enabled
- Tag: with what tag should be the PDU tagged.
- Subrules: list of subrules (more about subrules below).
- Expression: boolean logic expression (condition for tagging).
  Symbols:
  - 0-...: index of subrule (displayed in column "N." in subrule table).
  - &: logical AND.
  - |: logical OR.
  - ^: logical XOR.
  - !: logical NOT.
  - (): parenthesis.
  Example: 0 & !(1 | 2) & 3
  Default: Expressions are generated using logical AND.

## Tag subrule

Tag subrules are rules that can be used in condition for tagging. Using subrules, you can describe, for example, what the PDU has to contain, from which direction it has to come etc.

### Subrule types

- Contains: PDU has to contain the specified data.
- Starts with: PDU has to start with the specified data.
- Ends with: PDU has to end with the specified data.
- Has tag: PDU has to have the specified tag.
- Destination: PDU has to be sent to the specified destination (client / server).
- Proxy: PDU has to be from the specified proxy.
- Size: PDU has to be exactly the specified size.

## Tag group

Tag groups contain tag rules. These groups can be then bound with particular tag interceptors.

It is possible to bind one tag group to multiple interceptors, so it is up to you, if you will create just one group or multiple groups.

## Tag interceptor

In order to setup automatic tagging, you have to create tag interceptors in one or both directions and you have to specify, which tag group should these interceptors use.

## Special tags

Special tags will make the Tagger run a special action instead of tagging the PDU. You cannot use these tags for normal tagging. Right now, you can use the following tags:

- drop - PDU will be dropped,
- no_tagger - tagged PDU won't be processed in tagger,
- tagger - tagged PDU will be processed in tagger even if it already has no_tagger tag.