| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
column.h
Go to the documentation of this file.
1
13#pragma once
14#include "ws_symbol_export.h"
15#include <epan/column-utils.h>
16
17#ifdef __cplusplus
18 extern "C" {
19#endif /* __cplusplus */
20
24#define COLUMN_DISPLAY_VALUES 'U'
25#define COLUMN_DISPLAY_STRINGS 'R'
26#define COLUMN_DISPLAY_DETAILS 'D'
27
31 typedef struct _fmt_data {
32 char *title;
33 int fmt;
34 char *custom_fields;
35 int custom_occurrence;
36 bool visible;
37 char display;
38} fmt_data;
39
46WS_DLL_PUBLIC
47 const char *col_format_to_string(const int fmt);
48
55WS_DLL_PUBLIC
56 const char *col_format_desc(const int fmt_num);
57
64WS_DLL_PUBLIC
65 const char *col_format_abbrev(const int fmt_num);
66
73WS_DLL_PUBLIC
74 int get_column_format(const int col);
75
82WS_DLL_PUBLIC
83 void set_column_format(const int col, const int fmt);
84
91WS_DLL_PUBLIC
92 void get_column_format_matches(bool *fmt_list, const int format);
93
100WS_DLL_PUBLIC
101 int get_column_format_from_str(const char *str);
102
109WS_DLL_PUBLIC
110 char *get_column_title(const int col);
111
118WS_DLL_PUBLIC
119 void set_column_title(const int col, const char *title);
120
127WS_DLL_PUBLIC
128 bool get_column_visible(const int col);
129
136WS_DLL_PUBLIC
137 void set_column_visible(const int col, bool visible);
138
145WS_DLL_PUBLIC
146 char get_column_display_format(const int col);
147
154WS_DLL_PUBLIC
155 void set_column_display_format(const int col, char display);
156
163WS_DLL_PUBLIC
164 const char *get_column_custom_fields(const int col);
165
172WS_DLL_PUBLIC
173 void set_column_custom_fields(const int col, const char *custom_fields);
174
181WS_DLL_PUBLIC
182 int get_column_custom_occurrence(const int col);
183
190WS_DLL_PUBLIC
191 void set_column_custom_occurrence(const int col, const int custom_occurrence);
192
201WS_DLL_PUBLIC
202 const char *get_column_longest_string(const int format);
203
213WS_DLL_PUBLIC
214 const char *get_column_width_string(const int format, const int col);
215
222WS_DLL_PUBLIC
223 int get_column_char_width(const int format);
224
235WS_DLL_PUBLIC
236 char *get_column_tooltip(const int col);
237
251WS_DLL_PUBLIC
252 const char *get_column_text(column_info *cinfo, const int col);
253
259WS_DLL_PUBLIC
260 void
261 col_finalize(column_info *cinfo);
262
270WS_DLL_PUBLIC
271 void
272 build_column_format_array(column_info *cinfo, const int num_cols, const bool reset_fences);
273
277WS_DLL_PUBLIC
278 void column_dump_column_formats(void);
279
294WS_DLL_PUBLIC
295 bool parse_column_format(fmt_data *cfmt, const char *fmt);
296
308 extern
309 char * column_fmt_data_to_str(const fmt_data *cfmt);
310
319WS_DLL_PUBLIC
320 void try_convert_to_custom_column(char **fmt);
321
330WS_DLL_PUBLIC
331 const char* try_convert_to_column_field(const char *field);
332
340WS_DLL_PUBLIC
341 void column_register_fields(void);
342#ifdef __cplusplus
343}
344#endif /* __cplusplus */
column-utils.h
get_column_format_from_str
WS_DLL_PUBLIC int get_column_format_from_str(const char *str)
Get the column format number from a string representation.
Definition column.c:920
set_column_title
WS_DLL_PUBLIC void set_column_title(const int col, const char *title)
Set the title of a column.
Definition column.c:948
get_column_custom_fields
WS_DLL_PUBLIC const char * get_column_custom_fields(const int col)
Get custom fields for a specific column.
Definition column.c:1019
col_format_abbrev
WS_DLL_PUBLIC const char * col_format_abbrev(const int fmt_num)
Get the abbreviation of a column format.
Definition column.c:172
build_column_format_array
WS_DLL_PUBLIC void build_column_format_array(column_info *cinfo, const int num_cols, const bool reset_fences)
Build an array of column formats based on the provided parameters.
Definition column.c:1239
column_register_fields
WS_DLL_PUBLIC void column_register_fields(void)
Registers all fields for Wireshark columns.
Definition column.c:1279
column_dump_column_formats
WS_DLL_PUBLIC void column_dump_column_formats(void)
Dump the available column formats and their descriptions to the console.
Definition column.c:403
try_convert_to_column_field
WS_DLL_PUBLIC const char * try_convert_to_column_field(const char *field)
Checks a column field string to see if it is a name of a filter field created using a default column ...
Definition column.c:271
get_column_visible
WS_DLL_PUBLIC bool get_column_visible(const int col)
Get the visibility status of a column.
Definition column.c:963
get_column_format
WS_DLL_PUBLIC int get_column_format(const int col)
Get the format of a column.
Definition column.c:892
get_column_tooltip
WS_DLL_PUBLIC char * get_column_tooltip(const int col)
Get the tooltip text of a column element.
Definition column.c:1104
get_column_format_matches
WS_DLL_PUBLIC void get_column_format_matches(bool *fmt_list, const int format)
Get column format matches based on a boolean array and an integer value.
Definition column.c:474
set_column_display_format
WS_DLL_PUBLIC void set_column_display_format(const int col, char display)
Set the display format for a specific column.
Definition column.c:1005
set_column_custom_occurrence
WS_DLL_PUBLIC void set_column_custom_occurrence(const int col, const int custom_occurrence)
Set a custom occurrence for a specific column.
Definition column.c:1062
column_fmt_data_to_str
char * column_fmt_data_to_str(const fmt_data *cfmt)
Given a fmt_data struct, returns the column format string that should be written to the preferences t...
Definition column.c:366
try_convert_to_custom_column
WS_DLL_PUBLIC void try_convert_to_custom_column(char **fmt)
Checks a column format string to see if it is a deprecated column that has been migrated to a custom ...
Definition column.c:384
get_column_longest_string
WS_DLL_PUBLIC const char * get_column_longest_string(const int format)
Get the text of a column element.
Definition column.c:790
col_format_to_string
WS_DLL_PUBLIC const char * col_format_to_string(const int fmt)
Convert a column format number to its corresponding string representation.
Definition column.c:36
get_column_title
WS_DLL_PUBLIC char * get_column_title(const int col)
Get the title of a column.
Definition column.c:934
get_column_text
WS_DLL_PUBLIC const char * get_column_text(column_info *cinfo, const int col)
Get the text of a column element.
Definition column.c:1146
get_column_width_string
WS_DLL_PUBLIC const char * get_column_width_string(const int format, const int col)
Get a string representing the width of a column.
Definition column.c:874
set_column_format
WS_DLL_PUBLIC void set_column_format(const int col, const int fmt)
Set the format for a column.
Definition column.c:906
get_column_custom_occurrence
WS_DLL_PUBLIC int get_column_custom_occurrence(const int col)
Get the custom occurrence of a column.
Definition column.c:1048
fmt_data
struct _fmt_data fmt_data
Describes the configuration of a single column in the packet list.
col_finalize
WS_DLL_PUBLIC void col_finalize(column_info *cinfo)
Finalizes a column by compiling custom filters and splitting fields.
Definition column.c:1160
set_column_visible
WS_DLL_PUBLIC void set_column_visible(const int col, bool visible)
Set the visibility of a column.
Definition column.c:977
set_column_custom_fields
WS_DLL_PUBLIC void set_column_custom_fields(const int col, const char *custom_fields)
Set custom fields for a specific column.
Definition column.c:1033
get_column_char_width
WS_DLL_PUBLIC int get_column_char_width(const int format)
Get the character width of a column format.
Definition column.c:886
get_column_display_format
WS_DLL_PUBLIC char get_column_display_format(const int col)
Get the current display format for a column.
Definition column.c:991
col_format_desc
WS_DLL_PUBLIC const char * col_format_desc(const int fmt_num)
Get the description of a column format.
Definition column.c:101
parse_column_format
WS_DLL_PUBLIC bool parse_column_format(fmt_data *cfmt, const char *fmt)
Parse a column format string into a fmt_data struct.
Definition column.c:299
_fmt_data
Describes the configuration of a single column in the packet list.
Definition column.h:31
_fmt_data::visible
bool visible
Definition column.h:36
_fmt_data::custom_occurrence
int custom_occurrence
Definition column.h:35
_fmt_data::fmt
int fmt
Definition column.h:33
_fmt_data::title
char * title
Definition column.h:32
_fmt_data::display
char display
Definition column.h:37
_fmt_data::custom_fields
char * custom_fields
Definition column.h:34