| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
recent.h File Reference
Main window
`#include <glib.h>`
`#include <stdio.h>`
`#include "epan/timestamp.h"`
`#include "ui/ws_ui_util.h"`

Go to the source code of this file.

## Classes
struct | _col_width_data
struct | recent_settings_tag

## Macros
#define | RECENT_KEY_CAPTURE_FILE "recent.capture_file"
#define | RECENT_KEY_DISPLAY_FILTER "recent.display_filter"
#define | RECENT_KEY_COL_WIDTH "column.width"
#define | RECENT_KEY_CAPTURE_FILTER "recent.capture_filter"
#define | RECENT_KEY_REMOTE_HOST "recent.remote_host"
#define | COLUMN_XALIGN_DEFAULT 0
#define | COLUMN_XALIGN_LEFT 'L'
#define | COLUMN_XALIGN_CENTER 'C'
#define | COLUMN_XALIGN_RIGHT 'R'

## Typedefs
typedef struct _col_width_data | col_width_data
typedef struct recent_settings_tag | recent_settings_t

## Enumerations
enum | bytes_view_type { BYTES_HEX , BYTES_BITS , BYTES_DEC , BYTES_OCT }
enum | bytes_encoding_type { BYTES_ENC_FROM_PACKET , BYTES_ENC_ASCII , BYTES_ENC_EBCDIC }
enum | search_in_type { SEARCH_IN_PACKET_LIST , SEARCH_IN_PACKET_DETAILS , SEARCH_IN_PACKET_BYTES }
enum | search_char_set_type { SEARCH_CHAR_SET_NARROW_AND_WIDE , SEARCH_CHAR_SET_NARROW , SEARCH_CHAR_SET_WIDE }
enum | search_type_type { SEARCH_TYPE_DISPLAY_FILTER , SEARCH_TYPE_HEX_VALUE , SEARCH_TYPE_STRING , SEARCH_TYPE_REGEX }
enum | bytes_show_type { SHOW_ASCII , SHOW_ASCII_CONTROL , SHOW_CARRAY , SHOW_EBCDIC , SHOW_HEXDUMP , SHOW_HTML , SHOW_IMAGE , SHOW_JSON , SHOW_RAW , SHOW_RUSTARRAY , SHOW_CODEC , SHOW_YAML }
enum | follow_delta_type { FOLLOW_DELTA_NONE , FOLLOW_DELTA_TURN , FOLLOW_DELTA_ALL }
enum | bytes_decode_type { DecodeAsNone , DecodeAsBASE64 , DecodeAsCompressed , DecodeAsHexDigits , DecodeAsPercentEncoding , DecodeAsQuotedPrintable , DecodeAsROT13 }

## Functions
void | recent_init (void)
void | recent_cleanup (void)
bool | write_recent (void)
bool | write_profile_recent (void)
bool | recent_read_static (char **rf_path_return, int *rf_errno_return)
bool | recent_read_profile_static (char **rf_path_return, int *rf_errno_return)
bool | recent_read_dynamic (char **rf_path_return, int *rf_errno_return)
int | recent_set_arg (char *prefarg)
void | recent_free_column_width_info (recent_settings_t *rs)
void | recent_insert_column (int col)
void | recent_remove_column (int col)
int | recent_get_column_width (int col)
void | recent_set_column_width (int col, int width)
char | recent_get_column_xalign (int col)
void | recent_set_column_xalign (int col, char xalign)
void | window_geom_save (const char *name, window_geometry_t *geom)
bool | window_geom_load (const char *name, window_geometry_t *geom)
void | window_splitter_save (const char *name, const char *splitter_state)
const char * | window_splitter_load (const char *name)
GList * | recent_get_cfilter_list (const char *ifname)
void | recent_add_cfilter (const char *ifname, const char *s)
struct remote_host * | recent_get_remote_host (const char *host)
int | recent_get_remote_host_list_size (void)
void | recent_remote_host_list_foreach (GFunc func, void *user_data)
void | recent_free_remote_host_list (void)
void | recent_add_remote_host (char *host, struct remote_host *rh)

## Variables
recent_settings_t | recent

## Detailed Description

Definitions for recent "preference" handling routines Copyright 2004, Ulf Lamping ulf.l.nosp@m.ampi.nosp@m.ng@we.nosp@m.b.de

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later

Recent user interface settings.

## Macro Definition Documentation

## ◆ COLUMN_XALIGN_DEFAULT

#define COLUMN_XALIGN_DEFAULT 0

Defines used in col_width_data.xalign

## ◆ RECENT_KEY_CAPTURE_FILE

#define RECENT_KEY_CAPTURE_FILE "recent.capture_file"

???.

## ◆ RECENT_KEY_DISPLAY_FILTER

#define RECENT_KEY_DISPLAY_FILTER "recent.display_filter"

???.

## Typedef Documentation

## ◆ recent_settings_t

typedef struct recent_settings_tag recent_settings_t

Recent settings.

## Function Documentation

## ◆ recent_add_cfilter()

void recent_add_cfilter | ( | const char * | ifname,
|  | const char * | s
| ) |  |
| extern

Add a capture filter to the global recent capture filter list or the recent capture filter list for an interface.

Parameters

  ifname | interface name; NULL refers to the global list.
  s | text of capture filter

## ◆ recent_add_remote_host()

void recent_add_remote_host | ( | char * | host,
|  | struct remote_host * | rh
| ) |  |
| extern

Add an entry to the remote_host_list.

Parameters

  host | Key of the entry
  rh | Value of the entry

## ◆ recent_cleanup()

void recent_cleanup | ( | void |  | ) |
| extern

Cleanup/Frees recent settings (done at shutdown)

## ◆ recent_free_column_width_info()

void recent_free_column_width_info | ( | recent_settings_t * | rs | ) |
| extern

Free the recent settings list of column width information

Parameters

  rs | the recent settings (currently a global)

## ◆ recent_free_remote_host_list()

void recent_free_remote_host_list | ( | void |  | ) |
| extern

Free all entries of the remote host list.

## ◆ recent_get_cfilter_list()

GList * recent_get_cfilter_list | ( | const char * | ifname | ) |
| extern

Returns a list of recent capture filters.

Parameters

  ifname | interface name; NULL refers to the global list.

## ◆ recent_get_column_width()

int recent_get_column_width | ( | int | col | ) |
| extern

Get the column width for the given column

Parameters

  col | column number

## ◆ recent_get_column_xalign()

char recent_get_column_xalign | ( | int | col | ) |
| extern

Get the column xalign for the given column

Parameters

  col | column number

## ◆ recent_get_remote_host()

struct remote_host * recent_get_remote_host | ( | const char * | host | ) |
| extern

Get the value of an entry for a remote host from the remote host list.

Parameters

  host | host name for the remote host.

Returns
  pointer to the entry for the remote host.

## ◆ recent_get_remote_host_list_size()

int recent_get_remote_host_list_size | ( | void |  | ) |
| extern

Get the number of entries of the remote host list.

Returns
  number of entries in the list.

## ◆ recent_init()

void recent_init | ( | void |  | ) |
| extern

Initialize recent settings module (done at startup)

## ◆ recent_insert_column()

void recent_insert_column | ( | int | col | ) |
| extern

Insert an entry in the recent column width setting for the given column, which should have been just added to the column list preference. (This keeps them in sync.)

Parameters

  col | column number

## ◆ recent_read_dynamic()

bool recent_read_dynamic | ( | char ** | rf_path_return,
|  | int * | rf_errno_return
| ) |  |
| extern

Read recent settings file (dynamic part).

Parameters

  rf_path_return | path to recent file if function failed
  rf_errno_return | if failed

Returns
  true if succeeded, false if failed (check parameters for reason).

## ◆ recent_read_profile_static()

bool recent_read_profile_static | ( | char ** | rf_path_return,
|  | int * | rf_errno_return
| ) |  |
| extern

Read profile recent settings file (static part).

Parameters

  rf_path_return | path to recent file if function failed
  rf_errno_return | if failed

Returns
  true if succeeded, false if failed (check parameters for reason).

## ◆ recent_read_static()

bool recent_read_static | ( | char ** | rf_path_return,
|  | int * | rf_errno_return
| ) |  |
| extern

Read recent settings file (static part).

Parameters

  rf_path_return | path to recent file if function failed
  rf_errno_return | if failed

Returns
  true if succeeded, false if failed (check parameters for reason).

## ◆ recent_remote_host_list_foreach()

void recent_remote_host_list_foreach | ( | GFunc | func,
|  | void * | user_data
| ) |  |
| extern

Iterate over all items in the remote host list, calling a function for each member

Parameters

  func | function to be called
  user_data | argument to pass as user data to the function

## ◆ recent_remove_column()

void recent_remove_column | ( | int | col | ) |
| extern

Remove an entry in the recent column width setting for the given column, which should have been just removed to the column list preference. (This keeps them in sync.)

Parameters

  col | column number

## ◆ recent_set_arg()

int recent_set_arg | ( | char * | prefarg | ) |
| extern

Given a -o command line string, parse it and set the recent value in question. Return an indication of whether it succeeded or failed in some fashion.

Parameters

  prefarg | a string of the form "<recent name>:<recent value>", as might appear as an argument to a "-o" command line option

Returns
  PREFS_SET_OK or PREFS_SET_SYNTAX_ERR

## ◆ recent_set_column_width()

void recent_set_column_width | ( | int | col,
|  | int | width
| ) |  |
| extern

Set the column width for the given column

Parameters

  col | column number
  width | column width

## ◆ recent_set_column_xalign()

void recent_set_column_xalign | ( | int | col,
|  | char | xalign
| ) |  |
| extern

Set the column xalign for the given column

Parameters

  col | column number
  xalign | column alignment

## ◆ write_profile_recent()

bool write_profile_recent | ( | void |  | ) |
| extern

Write profile recent settings file.

Returns
  true if succeeded, false if failed

## ◆ write_recent()

bool write_recent | ( | void |  | ) |
| extern

Write recent_common settings file.

Returns
  true if succeeded, false if failed

## Variable Documentation

## ◆ recent

recent_settings_t recent
| extern

Global recent settings.