Wireshark  2.9.0-477-g68ec514b
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 }
 
enum  bytes_encoding_type { BYTES_ENC_FROM_PACKET, BYTES_ENC_ASCII, BYTES_ENC_EBCDIC }
 

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

Recent user interface settings.

Macro Definition Documentation

#define COLUMN_XALIGN_DEFAULT   0

Defines used in col_width_data.xalign

#define RECENT_KEY_CAPTURE_FILE   "recent.capture_file"

???.

#define RECENT_KEY_DISPLAY_FILTER   "recent.display_filter"

???.

Typedef Documentation

Recent settings.

Function Documentation

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
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
void recent_cleanup ( void  )

Cleanup/Frees recent settings (done at shutdown)

void recent_free_remote_host_list ( void  )

Free all entries of the remote host 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.
gint recent_get_column_width ( gint  col)

Get the column width for the given column

Parameters
colcolumn number
gchar recent_get_column_xalign ( gint  col)

Get the column xalign for the given column

Parameters
colcolumn number
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.
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.
void recent_init ( void  )

Initialize recent settings module (done at startup)

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).
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).
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).
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
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
void recent_set_column_width ( gint  col,
gint  width 
)

Set the column width for the given column

Parameters
colcolumn number
widthcolumn width
void recent_set_column_xalign ( gint  col,
gchar  xalign 
)

Set the column xalign for the given column

Parameters
colcolumn number
xaligncolumn alignment
gboolean write_profile_recent ( void  )

Write profile recent settings file.

Returns
TRUE if succeeded, FALSE if failed
gboolean write_recent ( void  )

Write recent settings file.

Returns
TRUE if succeeded, FALSE if failed

Variable Documentation

Global recent settings.