| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
column-info.h
Go to the documentation of this file.
1/* column-info.h
2 * Definitions for internal column structures and routines
3 *
4 * For internal Wireshark use only. Don't include this header in dissectors!
5 *
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
9 *
10 * SPDX-License-Identifier: GPL-2.0-or-later
11 */
12
13#ifndef __COLUMN_INFO_H__
14#define __COLUMN_INFO_H__
15
16#include <epan/column-utils.h>
17
18#ifdef __cplusplus
19 extern "C" {
20#endif /* __cplusplus */
21
26 typedef struct _proto_node proto_tree;
27
28#define COLUMN_FIELD_FILTER "_ws.col."
29
31 typedef struct {
32 const char **col_expr;
33 char **col_expr_val;
34} col_expr_t;
35
39 typedef struct {
40 char *dftext;
41 struct epan_dfilter *dfilter;
42 int field_id;
43} col_custom_t;
44
46 typedef struct {
47 int col_fmt;
48 bool *fmt_matx;
49 char *col_title;
50 char *col_custom_fields;
51 int col_custom_occurrence;
52 GSList *col_custom_fields_ids;
53 struct epan_dfilter *col_custom_dfilter;
54 const char *col_data;
55 char *col_buf;
56 int col_fence;
57 bool writable;
58 int hf_id;
59} col_item_t;
60
62 struct epan_column_info {
63 const struct epan_session *epan;
64 unsigned num_cols;
65 col_item_t *columns;
66 int *col_first;
67 int *col_last;
68 col_expr_t col_expr;
69 bool writable;
70 GRegex *prime_regex;
71};
72
76WS_DLL_PUBLIC void col_setup(column_info *cinfo, const int num_cols);
77
81WS_DLL_PUBLIC void col_cleanup(column_info *cinfo);
82
85 extern void col_init(column_info *cinfo, const struct epan_session *epan);
86
89WS_DLL_PUBLIC void col_fill_in_frame_data(const frame_data *fd, column_info *cinfo, const int col, bool const fill_col_exprs);
90
93WS_DLL_PUBLIC void col_fill_in(packet_info *pinfo, const bool fill_col_exprs, const bool fill_fd_colums);
94
99WS_DLL_PUBLIC void col_fill_in_error(column_info *cinfo, frame_data *fdata, const bool fill_col_exprs, const bool fill_fd_colums);
100
103WS_DLL_PUBLIC bool col_data_changed(void);
104
105 void col_custom_set_edt(struct epan_dissect *edt, column_info *cinfo);
106
107WS_DLL_PUBLIC
108 void col_custom_prime_edt(struct epan_dissect *edt, column_info *cinfo);
109
112WS_DLL_PUBLIC
113 char* col_custom_get_filter(struct epan_dissect *edt, column_info *cinfo, const unsigned col);
114
115WS_DLL_PUBLIC
116 bool have_custom_cols(column_info *cinfo);
117
118WS_DLL_PUBLIC
119 bool have_field_extractors(void);
120
121WS_DLL_PUBLIC
122 bool col_has_time_fmt(column_info *cinfo, const unsigned col);
123
124WS_DLL_PUBLIC
125 bool col_based_on_frame_data(column_info *cinfo, const unsigned col);
126
127 void
128col_register_protocol(void);
129
130 extern
131 void col_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
132
133#ifdef __cplusplus
134}
135#endif /* __cplusplus */
136
137#endif /* __COLUMN_INFO_H__ */
col_init
void col_init(column_info *cinfo, const struct epan_session *epan)
Definition column-utils.c:144
col_fill_in
WS_DLL_PUBLIC void col_fill_in(packet_info *pinfo, const bool fill_col_exprs, const bool fill_fd_colums)
Definition column-utils.c:2030
col_data_changed
WS_DLL_PUBLIC bool col_data_changed(void)
Definition column-utils.c:2187
col_fill_in_error
WS_DLL_PUBLIC void col_fill_in_error(column_info *cinfo, frame_data *fdata, const bool fill_col_exprs, const bool fill_fd_colums)
Definition column-utils.c:2157
col_fill_in_frame_data
WS_DLL_PUBLIC void col_fill_in_frame_data(const frame_data *fd, column_info *cinfo, const int col, bool const fill_col_exprs)
Definition column-utils.c:1950
col_custom_get_filter
WS_DLL_PUBLIC char * col_custom_get_filter(struct epan_dissect *edt, column_info *cinfo, const unsigned col)
Definition column-utils.c:435
col_cleanup
WS_DLL_PUBLIC void col_cleanup(column_info *cinfo)
Definition column-utils.c:106
col_setup
WS_DLL_PUBLIC void col_setup(column_info *cinfo, const int num_cols)
Definition column-utils.c:61
column-utils.h
_packet_info
Definition packet_info.h:43
_proto_node
Definition proto.h:905
col_custom_t
Definition column-info.h:39
col_custom_t::dftext
char * dftext
Definition column-info.h:40
col_custom_t::dfilter
struct epan_dfilter * dfilter
Definition column-info.h:41
col_custom_t::field_id
int field_id
Definition column-info.h:42
col_expr_t
Definition column-info.h:31
col_expr_t::col_expr
const char ** col_expr
Definition column-info.h:32
col_expr_t::col_expr_val
char ** col_expr_val
Definition column-info.h:33
col_item_t
Definition column-info.h:46
col_item_t::col_data
const char * col_data
Definition column-info.h:54
col_item_t::col_custom_occurrence
int col_custom_occurrence
Definition column-info.h:51
col_item_t::col_custom_dfilter
struct epan_dfilter * col_custom_dfilter
Definition column-info.h:53
col_item_t::col_custom_fields_ids
GSList * col_custom_fields_ids
Definition column-info.h:52
col_item_t::col_fence
int col_fence
Definition column-info.h:56
col_item_t::col_buf
char * col_buf
Definition column-info.h:55
col_item_t::col_fmt
int col_fmt
Definition column-info.h:47
col_item_t::fmt_matx
bool * fmt_matx
Definition column-info.h:48
col_item_t::col_title
char * col_title
Definition column-info.h:49
col_item_t::col_custom_fields
char * col_custom_fields
Definition column-info.h:50
col_item_t::writable
bool writable
Definition column-info.h:57
epan_column_info
Definition column-info.h:62
epan_column_info::col_first
int * col_first
Definition column-info.h:66
epan_column_info::prime_regex
GRegex * prime_regex
Definition column-info.h:70
epan_column_info::num_cols
unsigned num_cols
Definition column-info.h:64
epan_column_info::col_expr
col_expr_t col_expr
Definition column-info.h:68
epan_column_info::writable
bool writable
Definition column-info.h:69
epan_column_info::col_last
int * col_last
Definition column-info.h:67
epan_column_info::columns
col_item_t * columns
Definition column-info.h:65
epan_dfilter
Definition dfilter-int.h:35
epan_dissect
Definition epan_dissect.h:28
epan_session
Definition epan.c:502
tvbuff
Definition tvbuff-int.h:36