2 * Definitions for column structures and routines
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
11 #ifndef __COLUMN_INFO_H__
12 #define __COLUMN_INFO_H__
15 #include <epan/column-utils.h>
19 #endif /* __cplusplus */
25 #define COL_MAX_LEN 256
26 #define COL_MAX_INFO_LEN 4096
27 #define COL_CUSTOM_PRIME_REGEX " *([^ \\|]+) *(?:(?:\\|\\|)|(?:or)| *$){1}"
29 /** Column expression */
31 const gchar **col_expr; /**< Filter expression */
32 gchar **col_expr_val; /**< Value for filter expression */
35 /** Individual column info */
37 gint col_fmt; /**< Format of column */
38 gboolean *fmt_matx; /**< Specifies which formats apply to a column */
39 gchar *col_title; /**< Column titles */
40 gchar *col_custom_fields; /**< Custom column fields */
41 gint col_custom_occurrence;/**< Custom column field occurrence */
42 GSList *col_custom_fields_ids;/**< Custom column fields id */
43 struct epan_dfilter *col_custom_dfilter; /**< Compiled custom column field */
44 const gchar *col_data; /**< Column data */
45 gchar *col_buf; /**< Buffer into which to copy data for column */
46 int col_fence; /**< Stuff in column buffer before this index is immutable */
47 gboolean writable; /**< writable or not */
51 struct epan_column_info {
52 const struct epan_session *epan;
53 gint num_cols; /**< Number of columns */
54 col_item_t *columns; /**< All column data */
55 gint *col_first; /**< First column number with a given format */
56 gint *col_last; /**< Last column number with a given format */
57 col_expr_t col_expr; /**< Column expressions and values */
58 gboolean writable; /**< writable or not @todo Are we still writing to the columns? */
59 GRegex *prime_regex; /**< Used to prime custom columns */
64 #endif /* __cplusplus */
66 #endif /* __COLUMN_INFO_H__ */