2 * Definitions for column structures and routines
4 * $Id: column_info.h,v 1.3 2002/08/28 20:40:44 jmayer Exp $
6 * Ethereal - Network traffic analyzer
7 * By Gerald Combs <gerald@zing.org>
8 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 #ifndef __COLUMN_INFO_H__
28 #define __COLUMN_INFO_H__
32 #define COL_MAX_LEN 256
33 #define COL_MAX_INFO_LEN 4096
35 typedef struct _column_info {
36 gint num_cols; /* Number of columns */
37 gint *col_fmt; /* Format of column */
38 gboolean **fmt_matx; /* Specifies which formats apply to a column */
39 gint *col_width; /* Column widths to use during a "-S" capture */
40 gchar **col_title; /* Column titles */
41 gchar **col_data; /* Column data */
42 gchar **col_buf; /* Buffer into which to copy data for column */
43 gchar **col_expr; /* Filter expression */
44 gchar **col_expr_val; /* Value for filter expression */
45 gboolean writable; /* Are we stil writing to the columns? */
49 * All of the possible columns in summary listing.
51 * NOTE: The SRC and DST entries MUST remain in this order, or else you
52 * need to fix the offset #defines before get_column_format!
55 COL_NUMBER, /* Packet list item number */
56 COL_CLS_TIME, /* Command line-specified time (default relative) */
57 COL_REL_TIME, /* Relative time */
58 COL_ABS_TIME, /* Absolute time */
59 COL_ABS_DATE_TIME, /* Absolute date and time */
60 COL_DELTA_TIME, /* Delta time */
61 COL_DEF_SRC, /* Source address */
62 COL_RES_SRC, /* Resolved source */
63 COL_UNRES_SRC, /* Unresolved source */
64 COL_DEF_DL_SRC, /* Data link layer source address */
65 COL_RES_DL_SRC, /* Resolved DL source */
66 COL_UNRES_DL_SRC, /* Unresolved DL source */
67 COL_DEF_NET_SRC, /* Network layer source address */
68 COL_RES_NET_SRC, /* Resolved net source */
69 COL_UNRES_NET_SRC, /* Unresolved net source */
70 COL_DEF_DST, /* Destination address */
71 COL_RES_DST, /* Resolved dest */
72 COL_UNRES_DST, /* Unresolved dest */
73 COL_DEF_DL_DST, /* Data link layer dest address */
74 COL_RES_DL_DST, /* Resolved DL dest */
75 COL_UNRES_DL_DST, /* Unresolved DL dest */
76 COL_DEF_NET_DST, /* Network layer dest address */
77 COL_RES_NET_DST, /* Resolved net dest */
78 COL_UNRES_NET_DST, /* Unresolved net dest */
79 COL_DEF_SRC_PORT, /* Source port */
80 COL_RES_SRC_PORT, /* Resolved source port */
81 COL_UNRES_SRC_PORT, /* Unresolved source port */
82 COL_DEF_DST_PORT, /* Destination port */
83 COL_RES_DST_PORT, /* Resolved dest port */
84 COL_UNRES_DST_PORT, /* Unresolved dest port */
85 COL_PROTOCOL, /* Protocol */
86 COL_INFO, /* Description */
87 COL_PACKET_LENGTH, /* Packet length in bytes */
88 NUM_COL_FMTS /* Should always be last */
91 #endif /* __COLUMN_INFO_H__ */