The Add Expression Dialog

When you are accustomed to Ethereal's filtering system and know what labels you wish to use in your filters it can be very quick to simply type a filter string. However if you are new to Ethereal or are working with a slightly unfamiliar protocol it can be very confusing to try to figure out what to type. The Add Expression dialog box helps with this.

Figure 25. The Ethereal Add Expression dialog box, view 1

When you first bring up the Add Expression dialog box you are shown a tree list of field names, organized by protocol, and a box for selecting a relation.

Field Name

Select a protocols field from the protocol field tree. Every protocol with filterable fields is listed at the top level. By clicking on the "+" next to a protocol name you can get a list of the field names available for filtering for that protocol.

Relation

Select a relation from the list of available relation. The is present is a unary relation which is true if the selected field is present in a packet. All other listed relations are binary relations require additional data ( ie a Value to match ) to complete.

Figure 26. The Ethereal Add Expression dialog box, view 2

When you select a field from the field name list and select a binary relation ( like the equality relation == ) you will be given the opportunity to enter a value, and possible some range information.

Value

You may enter an appropriate value in the Value text box. The Value will also indicate the type of value for the field name you have selected ( like character string ).

Accept

When you have built a satisfactory expression click Accept and a filter string will be built for you.

Close

You can leave the Add Expression... dialog box without any effect by clicking the Close

Figure 27. The result of building a filter string using the Add Expression dialog box.

The Add Expression dialog box is an excellent way to learn to write Ethereal display filter strings.