6.7. Defining And Saving Filter Macros

You can define a filter macro with Wireshark and label it for later use. This can save time in remembering and retyping some of the more complex filters you use.

To define and save your own filter macros, follow the steps below:

  1. In the main menu select AnalyzeDisplay Filter Macros…​. Wireshark will open a corresponding dialog Figure 6.10, “Display Filter Macros window”.

    Figure 6.10. Display Filter Macros window

    ws filter macros

  2. To add a new filter macro, click the + button in the bottom-left corner. A new row will appear in the Display Filter Macros table above.
  3. Enter the name of your macro in the Name column. Enter your filter macro in the Text column.

    [Note]Note

    To learn more about the filter macros syntax, see the wireshark-filter man page.

  4. To save your modifications, click the OK button in the bottom-right corner of the Figure 6.10, “Display Filter Macros window”.