2001-04-01 07:32:35 +00:00
|
|
|
/* column-utils.h
|
|
|
|
* Definitions for column utility structures and routines
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2001-04-01 07:32:35 +00:00
|
|
|
*
|
|
|
|
* Ethereal - Network traffic analyzer
|
Put "extern" in front of a pile of function declarations.
It makes no difference if they really are function declarations;
however, in plugins, when building on OSes that don't let
dynamically-loaded modules access functions in the main program (e.g.,
Windows), when compiling a plugin, <plugin_api.h> defines the names of
those functions as (*pointer_name), so they turn into declarations of
pointer variables pointing to the functions in question, and, on
platforms with a def/ref model in the linker, if a plugin has more than
one source file that gets linked into the plugin, the linker may get
upset at two definitions of the same variable.
svn path=/trunk/; revision=4114
2001-10-31 07:47:27 +00:00
|
|
|
* By Gerald Combs <gerald@ethereal.com>
|
2001-04-01 07:32:35 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 20:41:00 +00:00
|
|
|
*
|
2001-04-01 07:32:35 +00:00
|
|
|
* 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 07:32:35 +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 07:32:35 +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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __COLUMN_UTILS_H__
|
|
|
|
#define __COLUMN_UTILS_H__
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#define COL_MAX_LEN 256
|
|
|
|
#define COL_MAX_INFO_LEN 4096
|
|
|
|
|
2005-09-13 04:00:47 +00:00
|
|
|
#include "gnuc_format_check.h"
|
2001-04-01 07:32:35 +00:00
|
|
|
#include "column_info.h"
|
2001-11-21 23:16:26 +00:00
|
|
|
#include "packet_info.h"
|
2001-04-01 07:32:35 +00:00
|
|
|
|
|
|
|
/* Allocate all the data structures for constructing column data, given
|
|
|
|
the number of columns. */
|
2003-04-16 05:55:41 +00:00
|
|
|
extern void col_setup(column_info *, gint);
|
|
|
|
|
|
|
|
/* Initialize the data structures for constructing column data. */
|
|
|
|
extern void col_init(column_info *);
|
2001-04-01 07:32:35 +00:00
|
|
|
|
|
|
|
/* Utility routines used by packet*.c */
|
|
|
|
|
Instead of tweaking a "Protocol configuration options" extension header
item to look more-or-less like a PPP packet, just dissect it in place
and hand off to the appropriate subdissector using the PPP dissector's
handoff table (which we export, along with its value_string table for
protocol IDs, which we use to report the protocol ID symbolically).
This means there's no point in having a configurable option to control
whether to do that tweaking; make it an obsolete option.
Bring "col_get_writable()" back from the dead, and have the GTP
dissector save the current "writable" flag for columns, mark the columns
non-writable before calling the subdissector for the PPP configuration
protocol, and restore the state of the writable flag, rather than
putting the columns back after the PPP configuration protocol's
dissector is done.
Fix some more typos in comments.
Don't register the IP dissector in the "ppp.protocol" table in the GTP
dissector's handoff registration routine - it's already being done in
the IP dissector's handoff routine.
Fix the name for CHAP to match what RFC 1994 calls it (if the name
changed, it should be changed in all places, but, at least according to
this message, a while ago, from Bob Sutterfield, "since the RFC defines
the protocol, the RFC defines the name":
http://mail-index.netbsd.org/netbsd-help/1996/05/16/0011.html
and the RFC defines the name as "PPP Challenge Handshake Authentication
Protocol (CHAP)").
svn path=/trunk/; revision=6617
2002-11-11 19:23:14 +00:00
|
|
|
extern gboolean col_get_writable(column_info *);
|
2001-12-10 00:26:21 +00:00
|
|
|
extern void col_set_writable(column_info *, gboolean);
|
|
|
|
extern gint check_col(column_info *, gint);
|
2003-04-16 04:52:55 +00:00
|
|
|
extern void col_set_fence(column_info *, gint);
|
2001-12-10 00:26:21 +00:00
|
|
|
extern void col_clear(column_info *, gint);
|
2004-12-30 23:57:29 +00:00
|
|
|
extern void col_set_str(column_info *, gint, const gchar *);
|
2002-12-02 23:34:40 +00:00
|
|
|
extern void col_add_fstr(column_info *, gint, const gchar *, ...)
|
2005-09-13 04:00:47 +00:00
|
|
|
GNUC_FORMAT_CHECK(printf, 3, 4);
|
2002-12-02 23:34:40 +00:00
|
|
|
extern void col_append_fstr(column_info *, gint, const gchar *, ...)
|
2005-09-13 04:00:47 +00:00
|
|
|
GNUC_FORMAT_CHECK(printf, 3, 4);
|
2004-02-05 23:57:15 +00:00
|
|
|
extern void col_append_sep_fstr(column_info *, gint, const gchar *sep,
|
|
|
|
const gchar *fmt, ...)
|
2005-09-13 04:00:47 +00:00
|
|
|
GNUC_FORMAT_CHECK(printf, 4, 5);
|
2002-12-02 23:34:40 +00:00
|
|
|
extern void col_prepend_fstr(column_info *, gint, const gchar *, ...)
|
2005-09-13 04:00:47 +00:00
|
|
|
GNUC_FORMAT_CHECK(printf, 3, 4);
|
2001-12-10 00:26:21 +00:00
|
|
|
extern void col_add_str(column_info *, gint, const gchar *);
|
2002-12-02 23:34:40 +00:00
|
|
|
extern void col_append_str(column_info *, gint, const gchar *);
|
2004-02-05 23:57:15 +00:00
|
|
|
extern void col_append_sep_str(column_info *, gint, const gchar *sep,
|
|
|
|
const gchar *str);
|
2001-12-10 00:26:21 +00:00
|
|
|
extern void col_set_cls_time(frame_data *, column_info *, int);
|
|
|
|
extern void fill_in_columns(packet_info *);
|
2001-04-01 07:32:35 +00:00
|
|
|
|
|
|
|
#endif /* __COLUMN_UTILS_H__ */
|