2013-10-18 13:06:05 +00:00
|
|
|
/* column-info.h
|
2001-04-01 03:42:00 +00:00
|
|
|
* Definitions for column structures and routines
|
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2001-04-01 03:42:00 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
2001-04-01 03:42:00 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
2001-04-01 03:42:00 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2001-04-01 03:42:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __COLUMN_INFO_H__
|
|
|
|
#define __COLUMN_INFO_H__
|
|
|
|
|
|
|
|
#include <glib.h>
|
2013-12-22 10:41:27 +00:00
|
|
|
#include <epan/column-utils.h>
|
2001-04-01 03:42:00 +00:00
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/** @file
|
|
|
|
* Column info.
|
|
|
|
*/
|
|
|
|
|
2001-04-01 03:42:00 +00:00
|
|
|
#define COL_MAX_LEN 256
|
|
|
|
#define COL_MAX_INFO_LEN 4096
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/** Column expression */
|
2008-03-01 05:16:45 +00:00
|
|
|
typedef struct {
|
2010-08-29 10:47:38 +00:00
|
|
|
const gchar **col_expr; /**< Filter expression */
|
|
|
|
gchar **col_expr_val; /**< Value for filter expression */
|
2008-03-01 05:16:45 +00:00
|
|
|
} col_expr_t;
|
|
|
|
|
2010-09-22 20:56:14 +00:00
|
|
|
/** Column info */
|
2013-12-22 10:41:27 +00:00
|
|
|
struct epan_column_info {
|
2013-07-21 20:48:30 +00:00
|
|
|
const struct epan_session *epan;
|
2010-08-29 10:47:38 +00:00
|
|
|
gint num_cols; /**< Number of columns */
|
|
|
|
gint *col_fmt; /**< Format of column */
|
|
|
|
gboolean **fmt_matx; /**< Specifies which formats apply to a column */
|
|
|
|
gint *col_first; /**< First column number with a given format */
|
|
|
|
gint *col_last; /**< Last column number with a given format */
|
|
|
|
gchar **col_title; /**< Column titles */
|
|
|
|
gchar **col_custom_field; /**< Custom column field */
|
2010-12-30 20:16:33 +00:00
|
|
|
gint *col_custom_occurrence;/**< Custom column field occurrence */
|
|
|
|
gint *col_custom_field_id; /**< Custom column field id */
|
2013-12-03 20:59:25 +00:00
|
|
|
struct epan_dfilter **col_custom_dfilter; /**< Compiled custom column field */
|
2010-08-29 10:47:38 +00:00
|
|
|
const gchar **col_data; /**< Column data */
|
|
|
|
gchar **col_buf; /**< Buffer into which to copy data for column */
|
|
|
|
int *col_fence; /**< Stuff in column buffer before this index is immutable */
|
|
|
|
col_expr_t col_expr; /**< Column expressions and values */
|
|
|
|
gboolean writable; /**< writable or not @todo Are we still writing to the columns? */
|
2001-04-01 03:42:00 +00:00
|
|
|
};
|
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
2001-04-01 03:42:00 +00:00
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#endif /* __COLUMN_INFO_H__ */
|