MATE Reference Manual

Attribute Value Pairs

MATEs uses them for doing almost everything. MATE uses AVPs to keep the data it has extracted from the frames' trees. As well as to keep the elements of the configuration.

These pairs are made of a name, a value and in the configuration an operator. Names and values are strings. AVPs with operators diverse than '=' are used only in the configuration and are used for matching AVPs of PDUs GoPs and GoGs in the analysis phase.

Name

The name is a string used to refer to a class of AVPs. Two attributes won't match unless their names are identical. Capitalized names are reserved for keywords (you can use them for your elements if you want but I think it's not the case).

Value

The value is a string it is either set in the configuration (for configuration AVPs) or by Wireshark while extracting interesting fields from a tree. The values extracted from fields use the same representation as they do in filter strings.

Operators

Currently only match operators are defined (There are plans to (re)add transform attributes but some internal issues have to be solved before that).

The defined match operators are:

Equal AVP Operator

This operator test whether the values of the operator and the operand AVP are equal.

Example

Not equal AVP operator

This operator matches if the value strings of two AVPs are not equal.

Examples

"One of" AVP operator

The "one of" operator matches if the operand value is equal to one of the values listen in the "one of" AVP.

Examples

"Starts with" AVP operator

The "starts with" operator matches if the first characters of the operand are identical to the operator.

Examples

"Ends with" operator

The ends with operator will match if the last bytes of the operand are equal to the operator.

Examples

Contains operator

Example

"Lower than" operator

The "lower than" operator will match if the operand is semantically lower than the operator.

Examples

BUGS

It should check whether the values are numbers and compare them numerically

"Higher than" operator

The "higher than" operator will match if the operand is semantically higher than the operator.

Examples

BUGS

It should check whether the values are numbers and compare them numerically

Exists operator

The exists operator will always match as far as the two operands have the same name.

Examples

Attribute/Value Pair List (AVPL)

Operations between AVPLs

Loose Match

A loose match between AVPLs will return if at least one of the operand's AVPs matches one of the operator's AVPs.

Loose matches are used between GopExtras and PDUs, and, GogExtras and Gops. These might be used in Transforms.

Loose Match Examples

Every Match

An "every" match between AVPLs will return if none of the operator's AVPs that exists in the operand AVPL fails to match.

These might be used in Transforms.

Examples

Strict Match

Examples

AVPL Merge

Examples

Transformations

TODO: write this part

Action=Transform; Name=mi_mgw; Match=Every; Mode=Insert; m3pc=11522; cic=24; .term=DS1/1/2/24;
Action=Transform; Name=mi_mgw; Match=Every; Mode=Insert; m3pc=11522; cic=25; .term=DS1/1/2/25;

Action=Transform; Name=radius_same_port; Mode=Insert; Match=Strict; radius_port; radius_port;
Action=Transform; Name=radius_same_port; Mode=Insert; Match=Every; radius_port; .radius_port=0;

Configuration AVPLs

PDU's configuration actions

The following configuration AVPLs deal with PDU creation and data extraction.

Action=PduDef

    Action=PduDef; Name=pduname; Proto=protoname; Transport=l2p[/l3p[/l4p[/...]]]; [Payload=l2p[/l3p[/l4p[/...]]];] 
[DropPduIfUnassigned={TRUE|FALSE};] [DiscardPduData={TRUE|FALSE};]  [Stop={TRUE|FALSE};] .... attrname=filterable.field; ....

PduDef's Name AVP

PduDef's Proto AVP

PduDef's Transport AVP

PduDef's Payload AVP

PduDef's DropPduIfUnassigned AVP

PduDef's DiscardPduData AVP

PduDef's Stop AVP

Remaining part of the AVPL

Example: addr=ip.addr; port=udp.port; datum=proto.datum;

Action=PduExtra

        Action=PduExtra; For=pduname; [DropPduIfUnassigned={TRUE|FALSE};] [DiscardPduData={TRUE|FALSE};]  [Stop={TRUE|FALSE};] .... attrname=filterable.field; ....

Action=PduCriteria

        Action=PduCriteria; For=pduname; [Mode={Accept|Reject};] [Match={Strict|Every|Loose};] ....

PduCriteria's For AVP

PduCriteria's Mode AVP

PduCriteria's Match AVP

Action=PduTransform

        Action=PduTransform; Name=transformname; For=pduname;

Name AVP

For AVP

Gop's configuration actions

Action=GopDef

Declares a Gop type and its prematch candidate key.

        Action=GopDef; Name=gopname; On=pduname; [DiscardUnassignedGop={FALSE|TRUE};]  [ShowPduTree={NoTree|PduTree|FrameTree};]  [ShowGopTimes={TRUE|FALSE};] [GopExpiration=seconds;] [GopIdleTimeout=seconds;] [GopLifetime=seconds;]....

Name AVP

The Name given to the Gop. The name is used to refer to this type of Gop elsewhere in the configuration and as a prefix for the name of the fields related to the Gop. This attribute is mandatory.

On AVP

The Pdu's Name which this type of Gop is supposed to be groupping. This attribute is mandatory.

GopDef's DiscardUnassignedGop AVP

Whether or not a Gop that has not being assigned to any Gog should be discarded. If TRUE the Gop is discarded right after creation, If FALSE, the default, the unassigned Gop is kept. Helps saving memory and to speed up filtering.

GopDef ShowPduTree AVP

Controls the Pdus subtree of the Gop:

GopDef ShowGopTimes AVP

Whether or not to show the times subtree of the Gop. If TRUE, the default, the subtree with the timers is added to the Gop's tree, . If false the subtree is suppressed.

GopDef GopExpiration AVP

Floating number: Number of seconds after a Gop is released after which no more Pdus are to be assigned to the Gop. If zero, the default, Pdus not matching the key but not the start condition will be assigned to Gop even after release.

GopDef GopIdleTimeout AVP

Floating number: Number of seconds after which if the Gop hasn't being assigned Pdus the gop will be considered released. If zero, the default, the Gop won't be released if no pdus arrive (unless it's lifetime is expires).

GopDef GopLifetime AVP

Floating number: Number of seconds after the Gop Start after which the Gop will be considered released regardless of any other thing. If zero, the default, the lifetime is infinite.

Action=GopStart

If given it tells MATE when a Pdu matching a Gop's key is supposed to start a Gop. If not given a Pdu whose AVPL matches an existing GogKey will act as a start for a Gop.

        Action=GopStart; For=gopname; .....

For AVP

The name of the Gop type for which this start condition is declared

Action=GopStop

If given it tells MATE in which condition a Gop should be stopped. If omitted the Gop is said to be auto-stopped, that is, the Gop is going to be marked as stop as soon as it's created.

        Action=GopStop; For=gopname; .....

For AVP

Action=GopExtra

Tells MATE which attributes from the Pdu's AVPL other than the Gop's key ones are to be copied into the Gop's AVPL. It is used as well to set attributes of the Gop after its GopDef has being already declared.

        Action=GopExtra; For=gopname; [DiscardUnassignedGop={FALSE|TRUE};]  [ShowPduTree={NoTree|PduTree|FrameTree};]  [ShowGopTimes={TRUE|FALSE};] ....

For AVP

GopExtra's DiscardUnassignedGop AVP

GopExtra ShowPduTree AVP

GopExtra ShowGopTimes AVP

Action=GopTransform

        Action=GopTransform; Name=transformname; For=gopname;

Name AVP

For AVP

GoG's Configuration AVPLs

Action=GogDef

        Action=GogDef; Name=gogname; [GogExpiration=(float);] [GopTree={FALSE|TRUE};]

Name AVP

GogExpiration

Action=GogKey

        Action=GogKey; For=gogname; On=gopname; ....

For AVP

On AVP

Action=GogExtra

                Action=GogDef; For=gogname; [GogExpiration=(float);] [GopTree={FALSE|TRUE};] .....

For AVP

GogExpiration

Action=GogTransform

        Action=GogTransform; Name=transformname; For=gogname;

Name AVP

For AVP

Settings Config AVPL

The Settings config element is used to pass to MATE various operational parameters. the possible parameters are

GogExpiration

DiscardPduData

DiscardUnassignedPdu

DiscardUnassignedGop

ShowPduTree

ShowGopTimes

Debugging Stuff

Debug_Filename

Debug_Level

Debug_Pdu

Debug_Gop

Debug_Gog

Settings Example

Action=Include

        Action=Include; {Filename=filename;|Lib=libname;}

Filename

Lib

Include Example

Mate/Reference (last edited 2008-04-12 17:50:37 by localhost)