Wireshark  4.3.0
The Wireshark network protocol analyzer
Classes | Macros | Typedefs | Enumerations | Functions | Variables
recent.h File Reference
#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  bytes_decode_type {
  DecodeAsNone , DecodeAsBASE64 , DecodeAsCompressed , DecodeAsHexDigits ,
  DecodeAsPercentEncoding , DecodeAsQuotedPrintable , DecodeAsROT13
}
 

Functions

void recent_init (void)
 
void recent_cleanup (void)
 
gboolean write_recent (void)
 
gboolean write_profile_recent (void)
 
gboolean recent_read_static (char **rf_path_return, int *rf_errno_return)
 
gboolean recent_read_profile_static (char **rf_path_return, int *rf_errno_return)
 
gboolean recent_read_dynamic (char **rf_path_return, int *rf_errno_return)
 
int recent_set_arg (char *prefarg)
 
gint recent_get_column_width (gint col)
 
void recent_set_column_width (gint col, gint width)
 
gchar recent_get_column_xalign (gint col)
 
void recent_set_column_xalign (gint col, gchar xalign)
 
void window_geom_save (const gchar *name, window_geometry_t *geom)
 
gboolean window_geom_load (const gchar *name, window_geometry_t *geom)
 
GList * recent_get_cfilter_list (const gchar *ifname)
 
void recent_add_cfilter (const gchar *ifname, const gchar *s)
 
struct remote_host * recent_get_remote_host (const gchar *host)
 
int recent_get_remote_host_list_size (void)
 
void recent_remote_host_list_foreach (GHFunc func, gpointer user_data)
 
void recent_free_remote_host_list (void)
 
void recent_add_remote_host (gchar *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

Recent settings.

Function Documentation

◆ recent_add_cfilter()

void recent_add_cfilter ( const gchar *  ifname,
const gchar *  s 
)

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

Parameters
ifnameinterface name; NULL refers to the global list.
stext of capture filter

◆ recent_add_remote_host()

void recent_add_remote_host ( gchar *  host,
struct remote_host *  rh 
)

Add an entry to the remote_host_list.

Parameters
hostKey of the entry
rhValue of the entry

◆ recent_cleanup()

void recent_cleanup ( void  )

Cleanup/Frees recent settings (done at shutdown)

◆ recent_free_remote_host_list()

void recent_free_remote_host_list ( void  )

Free all entries of the remote host list.

◆ recent_get_cfilter_list()

GList* recent_get_cfilter_list ( const gchar *  ifname)

Returns a list of recent capture filters.

Parameters
ifnameinterface name; NULL refers to the global list.

◆ recent_get_column_width()

gint recent_get_column_width ( gint  col)

Get the column width for the given column

Parameters
colcolumn number

◆ recent_get_column_xalign()

gchar recent_get_column_xalign ( gint  col)

Get the column xalign for the given column

Parameters
colcolumn number

◆ recent_get_remote_host()

struct remote_host* recent_get_remote_host ( const gchar *  host)

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

Parameters
hosthost 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  )

Get the number of entries of the remote host list.

Returns
number of entries in the list.

◆ recent_init()

void recent_init ( void  )

Initialize recent settings module (done at startup)

◆ recent_read_dynamic()

gboolean recent_read_dynamic ( char **  rf_path_return,
int *  rf_errno_return 
)

Read recent settings file (dynamic part).

Parameters
rf_path_returnpath to recent file if function failed
rf_errno_returnif failed
Returns
TRUE if succeeded, FALSE if failed (check parameters for reason).

◆ recent_read_profile_static()

gboolean recent_read_profile_static ( char **  rf_path_return,
int *  rf_errno_return 
)

Read profile recent settings file (static part).

Parameters
rf_path_returnpath to recent file if function failed
rf_errno_returnif failed
Returns
TRUE if succeeded, FALSE if failed (check parameters for reason).

◆ recent_read_static()

gboolean recent_read_static ( char **  rf_path_return,
int *  rf_errno_return 
)

Read recent settings file (static part).

Parameters
rf_path_returnpath to recent file if function failed
rf_errno_returnif failed
Returns
TRUE if succeeded, FALSE if failed (check parameters for reason).

◆ recent_remote_host_list_foreach()

void recent_remote_host_list_foreach ( GHFunc  func,
gpointer  user_data 
)

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

Parameters
funcfunction to be called
user_dataargument to pass as user data to the function

◆ recent_set_arg()

int recent_set_arg ( char *  prefarg)

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
prefarga 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 ( gint  col,
gint  width 
)

Set the column width for the given column

Parameters
colcolumn number
widthcolumn width

◆ recent_set_column_xalign()

void recent_set_column_xalign ( gint  col,
gchar  xalign 
)

Set the column xalign for the given column

Parameters
colcolumn number
xaligncolumn alignment

◆ write_profile_recent()

gboolean write_profile_recent ( void  )

Write profile recent settings file.

Returns
TRUE if succeeded, FALSE if failed

◆ write_recent()

gboolean write_recent ( void  )

Write recent_common settings file.

Returns
TRUE if succeeded, FALSE if failed

Variable Documentation

◆ recent

recent_settings_t recent
extern

Global recent settings.