| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Functions | Variables
preference_utils.h File Reference
`#include <glib.h>`

Go to the source code of this file.

## Functions
void | prefs_to_capture_opts (capture_options *capture_opts)
void | prefs_main_write (void)
unsigned int | prefs_store_ext (const char *module, const char *key, const char *value)
bool | prefs_store_ext_multiple (const char *module, GHashTable *pref_values)
int | column_prefs_add_custom (int fmt, const char *title, const char *custom_field, int position)
int | column_prefs_has_custom (const char *custom_field)
bool | column_prefs_custom_display_strings (const char *custom_field)
bool | column_prefs_custom_display_details (const char *custom_field)
void | column_prefs_remove_link (GList *col_link)
void | column_prefs_remove_nth (int col)
void | save_migrated_uat (const char *uat_name, bool *old_pref)

## Variables
bool | auto_scroll_live

## Detailed Description

Routines for handling preferences

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

Preference utility routines.

## Function Documentation

## ◆ column_prefs_add_custom()

int column_prefs_add_custom | ( | int | fmt,
|  | const char * | title,
|  | const char * | custom_field,
|  | int | position )

Add a custom column.

Parameters

  fmt | column format
  title | column title
  custom_field | column custom field
  position | the intended position of the insert

Returns
  The index of the inserted column

## ◆ column_prefs_custom_display_details()

bool column_prefs_custom_display_details | ( | const char * | custom_field | ) |

Check if a custom column's data can be displayed with details, e.g. it has a field.

This is for when adding or editing custom columns.

Parameters

  custom_field | column custom field

Returns
  true if a custom column has at least one single field.

## ◆ column_prefs_custom_display_strings()

bool column_prefs_custom_display_strings | ( | const char * | custom_field | ) |

Check if a custom column's data can be displayed differently resolved or unresolved, e.g. it has a field with a value string.

This is for when adding or editing custom columns. Compare with display_column_strings() in packet_list_utils.h, which is for columns that have already been added.

Parameters

  custom_field | column custom field

Returns
  true if a custom column with the field description would support being displayed differently resolved or unresolved, false otherwise.

## ◆ column_prefs_has_custom()

int column_prefs_has_custom | ( | const char * | custom_field | ) |

Check if a custom column exists.

Parameters

  custom_field | column custom field

Returns
  The index of the column if existing, -1 if not existing

## ◆ column_prefs_remove_link()

void column_prefs_remove_link | ( | GList * | col_link | ) |

Remove a column.

Parameters

  col_link | Column list entry

## ◆ column_prefs_remove_nth()

void column_prefs_remove_nth | ( | int | col | ) |

Remove a column.

Parameters

  col | Column number

## ◆ prefs_main_write()

void prefs_main_write | ( | void |  | ) |
| extern

Save all preferences

## ◆ prefs_store_ext()

unsigned int prefs_store_ext | ( | const char * | module,
|  | const char * | key,
|  | const char * | value )
| extern

Convenient function for plugin_if

Note: The preferences must exist, it is not possible to create entries using this function

Parameters

  module | the module for the preference
  key | the key for the preference
  value | the new value as string for the preference

Returns
  flags of types of preferences changed, non-zero if the value has been stored successfully

## ◆ prefs_store_ext_multiple()

bool prefs_store_ext_multiple | ( | const char * | module,
|  | GHashTable * | pref_values )
| extern

Convenient function for the writing of multiple preferences, without explicitly having prefs_t variables.

Note: The preferences must exist, it is not possible to create entries using this function

Parameters

  module | the module for the preference
  pref_values | a hash table

Returns
  true if the value has been stored successfully

## ◆ prefs_to_capture_opts()

void prefs_to_capture_opts | ( | capture_options * | capture_opts | ) |
| extern

Fill in capture options with values from the preferences

## ◆ save_migrated_uat()

void save_migrated_uat | ( | const char * | uat_name,
|  | bool * | old_pref )

Save the UAT and complete migration of old preferences by writing the main preferences file (if necessary).

## Variable Documentation

## ◆ auto_scroll_live

bool auto_scroll_live
| extern

If autoscroll in live captures is active or not