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 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23 #ifndef __COLUMN_INFO_H__
24 #define __COLUMN_INFO_H__
27 #include <epan/column-utils.h>
31 #endif /* __cplusplus */
37 #define COL_MAX_LEN 256
38 #define COL_MAX_INFO_LEN 4096
39 #define COL_CUSTOM_PRIME_REGEX " *([^ \\|]+) *(?:(?:\\|\\|)|(?:or)| *$){1}"
41 /** Column expression */
43 const gchar **col_expr; /**< Filter expression */
44 gchar **col_expr_val; /**< Value for filter expression */
47 /** Individual column info */
49 gint col_fmt; /**< Format of column */
50 gboolean *fmt_matx; /**< Specifies which formats apply to a column */
51 gchar *col_title; /**< Column titles */
52 gchar *col_custom_fields; /**< Custom column fields */
53 gint col_custom_occurrence;/**< Custom column field occurrence */
54 GSList *col_custom_fields_ids;/**< Custom column fields id */
55 struct epan_dfilter *col_custom_dfilter; /**< Compiled custom column field */
56 const gchar *col_data; /**< Column data */
57 gchar *col_buf; /**< Buffer into which to copy data for column */
58 int col_fence; /**< Stuff in column buffer before this index is immutable */
59 gboolean writable; /**< writable or not */
63 struct epan_column_info {
64 const struct epan_session *epan;
65 gint num_cols; /**< Number of columns */
66 col_item_t *columns; /**< All column data */
67 gint *col_first; /**< First column number with a given format */
68 gint *col_last; /**< Last column number with a given format */
69 col_expr_t col_expr; /**< Column expressions and values */
70 gboolean writable; /**< writable or not @todo Are we still writing to the columns? */
71 GRegex *prime_regex; /**< Used to prime custom columns */
76 #endif /* __cplusplus */
78 #endif /* __COLUMN_INFO_H__ */