Wireshark  4.3.0
The Wireshark network protocol analyzer
column.h
Go to the documentation of this file.
1 
14 #ifndef __COLUMN_H__
15 #define __COLUMN_H__
16 
17 #include "ws_symbol_export.h"
18 #include <epan/column-utils.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif /* __cplusplus */
23 
24 typedef struct _fmt_data {
25  char *title; /* title of the column */
26  int fmt; /* format of column */
27  char *custom_fields; /* fields names for COL_CUSTOM */
28  int custom_occurrence; /* optional ordinal of occurrence of that field */
29  bool visible; /* if false, hide this column */
30  bool resolved; /* if true, show a more human-readable name */
31 } fmt_data;
32 
33 WS_DLL_PUBLIC
34 const char *col_format_to_string(const int);
35 WS_DLL_PUBLIC
36 const char *col_format_desc(const int);
37 WS_DLL_PUBLIC
38 const char *col_format_abbrev(const int);
39 WS_DLL_PUBLIC
40 int get_column_format(const int);
41 WS_DLL_PUBLIC
42 void set_column_format(const int, const int);
43 WS_DLL_PUBLIC
44 void get_column_format_matches(bool *, const int);
45 WS_DLL_PUBLIC
46 int get_column_format_from_str(const char *);
47 WS_DLL_PUBLIC
48 char *get_column_title(const int);
49 WS_DLL_PUBLIC
50 void set_column_title(const int, const char *);
51 WS_DLL_PUBLIC
52 bool get_column_visible(const int);
53 WS_DLL_PUBLIC
54 void set_column_visible(const int, bool);
55 WS_DLL_PUBLIC
56 bool get_column_resolved(const int);
57 WS_DLL_PUBLIC
58 void set_column_resolved(const int, bool);
59 WS_DLL_PUBLIC
60 const char *get_column_custom_fields(const int);
61 WS_DLL_PUBLIC
62 void set_column_custom_fields(const int, const char *);
63 WS_DLL_PUBLIC
64 int get_column_custom_occurrence(const int);
65 WS_DLL_PUBLIC
66 void set_column_custom_occurrence(const int, const int);
67 WS_DLL_PUBLIC
68 const char *get_column_longest_string(const int);
69 WS_DLL_PUBLIC
70 const char *get_column_width_string(const int, const int);
71 WS_DLL_PUBLIC
72 int get_column_char_width(const int format);
73 WS_DLL_PUBLIC
74 char *get_column_tooltip(const int col);
75 
86 WS_DLL_PUBLIC
87 const char *get_column_text(column_info *cinfo, const int col);
88 
89 WS_DLL_PUBLIC
90 void
91 col_finalize(column_info *cinfo);
92 
93 WS_DLL_PUBLIC
94 void
95 build_column_format_array(column_info *cinfo, const int num_cols, const bool reset_fences);
96 
97 WS_DLL_PUBLIC
98 void column_dump_column_formats(void);
99 
112 WS_DLL_PUBLIC
113 bool parse_column_format(fmt_data *cfmt, const char *fmt);
114 
122 WS_DLL_PUBLIC
123 void try_convert_to_custom_column(char **fmt);
124 
132 WS_DLL_PUBLIC
133 const char* try_convert_to_column_field(const char *field);
134 
135 WS_DLL_PUBLIC
136 void column_register_fields(void);
137 #ifdef __cplusplus
138 }
139 #endif /* __cplusplus */
140 
141 #endif /* column.h */
WS_DLL_PUBLIC const char * try_convert_to_column_field(const char *field)
Definition: column.c:255
WS_DLL_PUBLIC void try_convert_to_custom_column(char **fmt)
Definition: column.c:350
WS_DLL_PUBLIC const char * get_column_text(column_info *cinfo, const int col)
Definition: column.c:1019
WS_DLL_PUBLIC bool parse_column_format(fmt_data *cfmt, const char *fmt)
Definition: column.c:283
Definition: column.h:24
Definition: column-info.h:63