aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am39
-rw-r--r--configure.in7
-rw-r--r--epan/.cvsignore8
-rw-r--r--epan/Makefile.am74
-rw-r--r--epan/conversation.c (renamed from conversation.c)2
-rw-r--r--epan/conversation.h (renamed from conversation.h)2
-rw-r--r--epan/dfilter-grammar.y (renamed from dfilter-grammar.y)2
-rw-r--r--epan/dfilter-int.h (renamed from dfilter-int.h)2
-rw-r--r--epan/dfilter-scanner.l (renamed from dfilter-scanner.l)2
-rw-r--r--epan/dfilter.c (renamed from dfilter.c)2
-rw-r--r--epan/dfilter.h (renamed from dfilter.h)2
-rw-r--r--epan/epan.c41
-rw-r--r--epan/epan.h49
-rw-r--r--epan/except.c (renamed from except.c)4
-rw-r--r--epan/except.h (renamed from except.h)2
-rw-r--r--epan/exceptions.h (renamed from exceptions.h)0
-rw-r--r--epan/pint.h (renamed from pint.h)2
-rw-r--r--epan/plugins.c (renamed from plugins.c)2
-rw-r--r--epan/plugins.h (renamed from plugins.h)2
-rw-r--r--epan/proto.c (renamed from proto.c)2
-rw-r--r--epan/proto.h (renamed from proto.h)2
-rw-r--r--epan/strutil.c (renamed from strutil.c)2
-rw-r--r--epan/strutil.h (renamed from strutil.h)2
-rw-r--r--epan/tvbtest.c (renamed from tvbtest.c)2
-rw-r--r--epan/tvbuff.c (renamed from tvbuff.c)2
-rw-r--r--epan/tvbuff.h (renamed from tvbuff.h)2
-rw-r--r--file.c8
-rw-r--r--gtk/main.c8
-rw-r--r--packet.c23
-rw-r--r--tethereal.c19
30 files changed, 222 insertions, 94 deletions
diff --git a/Makefile.am b/Makefile.am
index 7bc8278ae6..3339223125 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
# Makefile.am
# Automake file for Ethereal
#
-# $Id: Makefile.am,v 1.227 2000/09/22 16:37:48 gram Exp $
+# $Id: Makefile.am,v 1.228 2000/09/27 04:54:23 gram Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@zing.org>
@@ -31,9 +31,6 @@ man_MANS = ethereal.1 editcap.1 tethereal.1
sysconf_DATA = manuf
-# Any POSIX-compatible YACC should honor the -p flag
-YFLAGS=-d -p dfilter_
-
DISSECTOR_SOURCES = \
packet-aarp.c \
packet-afs.c \
@@ -262,17 +259,7 @@ ETHEREAL_COMMON_SOURCES = \
asn1.h \
column.c \
column.h \
- conversation.c \
- conversation.h \
- dfilter-int.h \
- dfilter-grammar.y \
- dfilter-scanner.l \
- dfilter.c \
- dfilter.h \
etypes.h \
- except.c \
- except.h \
- exceptions.h \
follow.c \
follow.h \
inet_aton.h \
@@ -285,17 +272,12 @@ ETHEREAL_COMMON_SOURCES = \
oui.h \
packet.c \
packet.h \
- pint.h \
- plugins.c \
- plugins.h \
ppptypes.h \
prefs.c \
prefs.h \
prefs-int.h \
print.c \
print.h \
- proto.c \
- proto.h \
ps.c \
ps.h \
ptvcursor.c \
@@ -305,11 +287,7 @@ ETHEREAL_COMMON_SOURCES = \
resolv.c \
resolv.h \
smb.h \
- strutil.c \
- strutil.h \
timestamp.h \
- tvbuff.c \
- tvbuff.h \
util.c \
util.h \
xdlc.c \
@@ -333,9 +311,6 @@ ethereal_static_SOURCES = \
$(ethereal_SOURCES)
EXTRA_ethereal_SOURCES = \
- dfilter-grammar.c \
- dfilter-grammar.h \
- dfilter-scanner.c \
snprintf.c \
snprintf.h \
snprintf-imp.h \
@@ -363,7 +338,7 @@ ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
# Additional libs that I know how to build. These will be
# linked into the ethereal executable.
-ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a
+ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a epan/libepan.a
# This is the automake dependency variable for the executable
ethereal_DEPENDENCIES = \
@@ -405,7 +380,7 @@ tethereal_SOURCES = \
# Additional libs that I know how to build. These will be
# linked into the tethereal executable.
-tethereal_additional_libs = wiretap/libwiretap.a
+tethereal_additional_libs = wiretap/libwiretap.a epan/libepan.a
# This is the automake dependency variable for the executable
tethereal_DEPENDENCIES = \
@@ -473,9 +448,6 @@ randpkt.o: randpkt.c
randpkt: randpkt.o wiretap/libwiretap.a
$(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
-tvbtest: tvbtest.o tvbuff.o except.o strutil.o
- $(LINK) -o tvbtest tvbtest.o tvbuff.o except.o strutil.o `glib-config --libs`
-
DISTCLEANFILES = \
register.c \
rdps \
@@ -568,7 +540,7 @@ endif
#dist-hook:
# @rm -f $(distdir)/register.c
-SUBDIRS = wiretap gtk plugins packaging @ethereal_SUBDIRS@
+SUBDIRS = wiretap epan gtk plugins packaging @ethereal_SUBDIRS@
ethereal.1: ethereal doc/ethereal.pod.template
(cd doc ; \
@@ -582,9 +554,6 @@ editcap.1: doc/editcap.pod
(cd doc ; \
$(MAKE) ../editcap.1 )
-dfilter-scanner.c : dfilter-scanner.l
- $(LEX) -Pdfilter_ -odfilter-scanner.c $(srcdir)/dfilter-scanner.l
-
packet-ncp2222.c : ncp2222.py
$(PYTHON) $(srcdir)/ncp2222.py > $@
diff --git a/configure.in b/configure.in
index 423343487d..6db797125b 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.102 2000/09/17 03:20:05 guy Exp $
+# $Id: configure.in,v 1.103 2000/09/27 04:54:24 gram Exp $
dnl
dnl Process this file with autoconf 2.13 or later to produce a
dnl configure script; 2.12 doesn't generate a "configure" script that
@@ -126,8 +126,8 @@ fi
# as various packages we use ("libpcap", "zlib", an SNMP library)
# may have been installed under "/usr/local/include".
#
-CFLAGS="$CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I/usr/local/include"
-CPPFLAGS="$CPPFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I/usr/local/include"
+CFLAGS="$CFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I\$(top_srcdir)/epan -I/usr/local/include"
+CPPFLAGS="$CPPFLAGS -I\$(top_srcdir) -I\$(top_srcdir)/wiretap -I\$(top_srcdir)/epan -I/usr/local/include"
#
# Arrange that we search for libraries in "/usr/local/lib".
@@ -447,6 +447,7 @@ AC_CONFIG_SUBDIRS(wiretap)
AC_OUTPUT(
Makefile
doc/Makefile
+ epan/Makefile
gtk/Makefile
packaging/Makefile
packaging/rpm/Makefile
diff --git a/epan/.cvsignore b/epan/.cvsignore
new file mode 100644
index 0000000000..d438f6b552
--- /dev/null
+++ b/epan/.cvsignore
@@ -0,0 +1,8 @@
+.deps
+.libs
+Makefile
+Makefile.in
+dfilter-grammar.c
+dfilter-grammar.h
+dfilter-scanner.c
+tvbtest
diff --git a/epan/Makefile.am b/epan/Makefile.am
new file mode 100644
index 0000000000..651a204ece
--- /dev/null
+++ b/epan/Makefile.am
@@ -0,0 +1,74 @@
+# Makefile.am
+# Automake file for the EPAN library
+# (Ethereal Protocol ANalyzer Library)
+#
+# $Id: Makefile.am,v 1.1 2000/09/27 04:54:46 gram Exp $
+#
+# Ethereal - Network traffic analyzer
+# By Gerald Combs <gerald@zing.org>
+# 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.
+#
+# 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.
+#
+# 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.
+
+
+# Any POSIX-compatible YACC should honor the -p flag
+YFLAGS=-d -p dfilter_
+
+# EPAN will eventually be a shared library. While I move source code around,
+# however, it is an archive library.
+
+noinst_LIBRARIES = libepan.a
+
+
+libepan_a_SOURCES = \
+ conversation.c \
+ conversation.h \
+ dfilter-int.h \
+ dfilter-grammar.y \
+ dfilter-scanner.l \
+ dfilter.c \
+ dfilter.h \
+ epan.c \
+ epan.h \
+ except.c \
+ except.h \
+ exception.h \
+ pint.h \
+ plugins.c \
+ plugins.h \
+ proto.c \
+ proto.h \
+ strutil.c \
+ strutil.h \
+ tvbtest.c \
+ tvbuff.c \
+ tvbuff.h
+
+EXTRA_libepan_a_SOURCES = \
+ dfilter-grammar.c \
+ dfilter-grammar.h \
+ dfilter-scanner.c
+
+CLEANFILES = \
+ libepan.a \
+ *~
+
+dfilter-scanner.c : dfilter-scanner.l
+ $(LEX) -Pdfilter_ -odfilter-scanner.c $(srcdir)/epan/dfilter-scanner.l
+
+tvbtest: tvbtest.o tvbuff.o except.o strutil.o
+ $(LINK) -o tvbtest tvbtest.o tvbuff.o except.o strutil.o `glib-config --libs`
+
diff --git a/conversation.c b/epan/conversation.c
index 7ee68d399c..144f27b993 100644
--- a/conversation.c
+++ b/epan/conversation.c
@@ -1,7 +1,7 @@
/* conversation.c
* Routines for building lists of packets that are part of a "conversation"
*
- * $Id: conversation.c,v 1.10 2000/08/21 18:36:35 guy Exp $
+ * $Id: conversation.c,v 1.1 2000/09/27 04:54:47 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/conversation.h b/epan/conversation.h
index 12a5d0646f..b8c066d0a5 100644
--- a/conversation.h
+++ b/epan/conversation.h
@@ -1,7 +1,7 @@
/* conversation.h
* Routines for building lists of packets that are part of a "conversation"
*
- * $Id: conversation.h,v 1.7 2000/08/21 18:36:35 guy Exp $
+ * $Id: conversation.h,v 1.1 2000/09/27 04:54:47 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/dfilter-grammar.y b/epan/dfilter-grammar.y
index 6e4a1638eb..61e1775f7e 100644
--- a/dfilter-grammar.y
+++ b/epan/dfilter-grammar.y
@@ -3,7 +3,7 @@
/* dfilter-grammar.y
* Parser for display filters
*
- * $Id: dfilter-grammar.y,v 1.40 2000/08/01 18:10:04 gram Exp $
+ * $Id: dfilter-grammar.y,v 1.1 2000/09/27 04:54:47 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/dfilter-int.h b/epan/dfilter-int.h
index cf7a1c71e8..207584e49c 100644
--- a/dfilter-int.h
+++ b/epan/dfilter-int.h
@@ -2,7 +2,7 @@
* Definitions for routines common to multiple modules in the display
* filter code, but not used outside that code.
*
- * $Id: dfilter-int.h,v 1.13 2000/08/01 18:10:05 gram Exp $
+ * $Id: dfilter-int.h,v 1.1 2000/09/27 04:54:48 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/dfilter-scanner.l b/epan/dfilter-scanner.l
index 12a301768b..b78ddcb2c4 100644
--- a/dfilter-scanner.l
+++ b/epan/dfilter-scanner.l
@@ -3,7 +3,7 @@
/* dfilter-scanner.l
* Scanner for display filters
*
- * $Id: dfilter-scanner.l,v 1.33 2000/08/30 02:49:59 gram Exp $
+ * $Id: dfilter-scanner.l,v 1.1 2000/09/27 04:54:48 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/dfilter.c b/epan/dfilter.c
index 24266bc13d..73fe5253e0 100644
--- a/dfilter.c
+++ b/epan/dfilter.c
@@ -1,7 +1,7 @@
/* dfilter.c
* Routines for display filters
*
- * $Id: dfilter.c,v 1.38 2000/09/13 20:30:48 gram Exp $
+ * $Id: dfilter.c,v 1.1 2000/09/27 04:54:48 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/dfilter.h b/epan/dfilter.h
index 0a0a3e9dec..200430001e 100644
--- a/dfilter.h
+++ b/epan/dfilter.h
@@ -1,7 +1,7 @@
/* dfilter.h
* Definitions for display filters
*
- * $Id: dfilter.h,v 1.18 2000/08/11 13:34:40 deniel Exp $
+ * $Id: dfilter.h,v 1.1 2000/09/27 04:54:49 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/epan/epan.c b/epan/epan.c
new file mode 100644
index 0000000000..d8ad05b6b6
--- /dev/null
+++ b/epan/epan.c
@@ -0,0 +1,41 @@
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan.h>
+
+#include "conversation.h"
+#include "dfilter.h"
+#include "except.h"
+#include "proto.h"
+#include "tvbuff.h"
+
+void
+epan_init(void)
+{
+ except_init();
+ tvbuff_init();
+ proto_init();
+ dfilter_init();
+#ifdef HAVE_PLUGINS
+ init_plugins(epan);
+#endif
+}
+
+void
+epan_cleanup(void)
+{
+ dfilter_cleanup();
+ proto_cleanup();
+ tvbuff_cleanup();
+ except_deinit();
+}
+
+
+void
+epan_conversation_init(void)
+{
+ conversation_init();
+}
diff --git a/epan/epan.h b/epan/epan.h
new file mode 100644
index 0000000000..87463449ea
--- /dev/null
+++ b/epan/epan.h
@@ -0,0 +1,49 @@
+/* epan.h
+ *
+ * Ethereal Protocol Analyzer Library
+ *
+ */
+
+#ifndef EPAN_H
+
+
+void epan_init(void);
+void epan_cleanup(void);
+void epan_conversation_init(void);
+
+/* A client will create one epan_t for an entire dissection session.
+ * A single epan_t will be used to analyze the entire sequence of packets,
+ * sequentially, in a single session. A session corresponds to a single
+ * packet trace file. The reaons epan_t exists is that some packets in
+ * some protocols cannot be decoded without knowledge of previous packets.
+ * This inter-packet "state" is stored in the epan_t.
+ */
+typedef struct epan_session epan_t;
+
+
+epan_t*
+epan_new(void);
+
+void
+epan_free(epan_t*);
+
+
+
+
+/* Dissection of a single byte array. Holds tvbuff info as
+ * well as proto_tree info. As long as the epan_dissect_t for a byte
+ * array is in existence, you must not free or move that byte array,
+ * as the structures that the epan_dissect_t contains might have pointers
+ * to addresses in your byte array.
+ */
+typedef struct epan_dissect epan_dissect_t;
+
+
+epan_dissect_t*
+epan_dissect_new(epan_t*, guint8* data, guint len, guint32 wtap_encap,
+ void* pseudo_header);
+
+void
+epan_dissect_free(epan_t*, epan_dissect_t*);
+
+#endif /* EPAN_H */
diff --git a/except.c b/epan/except.c
index 14440aa107..a9c02d74ab 100644
--- a/except.c
+++ b/epan/except.c
@@ -13,7 +13,7 @@
* This source code may be translated into executable form and incorporated
* into proprietary software; there is no requirement for such software to
* contain a copyright notice related to this source.
- * $Id: except.c,v 1.1 2000/05/11 08:14:49 gram Exp $
+ * $Id: except.c,v 1.1 2000/09/27 04:54:49 gram Exp $
* $Name: $
*/
@@ -27,7 +27,7 @@
#define XCEPT_BUFFER_SIZE 1024
#ifdef KAZLIB_RCSID
-static const char rcsid[] = "$Id: except.c,v 1.1 2000/05/11 08:14:49 gram Exp $";
+static const char rcsid[] = "$Id: except.c,v 1.1 2000/09/27 04:54:49 gram Exp $";
#endif
#define group except_group
diff --git a/except.h b/epan/except.h
index f551c9d651..bb2e6edcf4 100644
--- a/except.h
+++ b/epan/except.h
@@ -14,7 +14,7 @@
* into proprietary software; there is no requirement for such software to
* contain a copyright notice related to this source.
*
- * $Id: except.h,v 1.1 2000/05/11 08:14:49 gram Exp $
+ * $Id: except.h,v 1.1 2000/09/27 04:54:50 gram Exp $
* $Name: $
*/
diff --git a/exceptions.h b/epan/exceptions.h
index 19eda9fe2b..19eda9fe2b 100644
--- a/exceptions.h
+++ b/epan/exceptions.h
diff --git a/pint.h b/epan/pint.h
index ed7ec971ff..38f9201ffc 100644
--- a/pint.h
+++ b/epan/pint.h
@@ -2,7 +2,7 @@
* Definitions for extracting and translating integers safely and portably
* via pointers.
*
- * $Id: pint.h,v 1.2 2000/09/14 11:50:59 gram Exp $
+ * $Id: pint.h,v 1.1 2000/09/27 04:54:50 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/plugins.c b/epan/plugins.c
index 4ca2085a39..8ef8800844 100644
--- a/plugins.c
+++ b/epan/plugins.c
@@ -1,7 +1,7 @@
/* plugins.c
* plugin routines
*
- * $Id: plugins.c,v 1.24 2000/09/14 10:03:02 gram Exp $
+ * $Id: plugins.c,v 1.1 2000/09/27 04:54:50 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/plugins.h b/epan/plugins.h
index cff14e6419..f66674aaeb 100644
--- a/plugins.h
+++ b/epan/plugins.h
@@ -1,7 +1,7 @@
/* plugins.h
* definitions for plugins structures
*
- * $Id: plugins.h,v 1.7 2000/08/11 13:34:27 deniel Exp $
+ * $Id: plugins.h,v 1.1 2000/09/27 04:54:51 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/proto.c b/epan/proto.c
index e1d4958e84..99c5c16867 100644
--- a/proto.c
+++ b/epan/proto.c
@@ -1,7 +1,7 @@
/* proto.c
* Routines for protocol tree
*
- * $Id: proto.c,v 1.80 2000/08/30 02:50:02 gram Exp $
+ * $Id: proto.c,v 1.1 2000/09/27 04:54:51 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/proto.h b/epan/proto.h
index f0087b6477..2c388db283 100644
--- a/proto.h
+++ b/epan/proto.h
@@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.42 2000/08/30 02:50:03 gram Exp $
+ * $Id: proto.h,v 1.1 2000/09/27 04:54:52 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/strutil.c b/epan/strutil.c
index e08a9a9250..bfdfd8ef43 100644
--- a/strutil.c
+++ b/epan/strutil.c
@@ -1,7 +1,7 @@
/* strutil.c
* String utility routines
*
- * $Id: strutil.c,v 1.2 2000/09/11 20:05:13 gram Exp $
+ * $Id: strutil.c,v 1.1 2000/09/27 04:54:52 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/strutil.h b/epan/strutil.h
index 5e738482e4..fdd95ca891 100644
--- a/strutil.h
+++ b/epan/strutil.h
@@ -1,7 +1,7 @@
/* util.h
* Utility definitions
*
- * $Id: strutil.h,v 1.3 2000/09/11 23:31:05 guy Exp $
+ * $Id: strutil.h,v 1.1 2000/09/27 04:54:53 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
diff --git a/tvbtest.c b/epan/tvbtest.c
index 172aea76d9..c528f7c837 100644
--- a/tvbtest.c
+++ b/epan/tvbtest.c
@@ -2,7 +2,7 @@
*
* tvbtest : tvbtest.o tvbuff.o except.o
*
- * $Id: tvbtest.c,v 1.3 2000/08/30 02:50:04 gram Exp $
+ * $Id: tvbtest.c,v 1.1 2000/09/27 04:54:53 gram Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org>
*
diff --git a/tvbuff.c b/epan/tvbuff.c
index 3b307cd3f2..74071276ad 100644
--- a/tvbuff.c
+++ b/epan/tvbuff.c
@@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
- * $Id: tvbuff.c,v 1.18 2000/09/14 16:04:28 gram Exp $
+ * $Id: tvbuff.c,v 1.1 2000/09/27 04:54:53 gram Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org>
*
diff --git a/tvbuff.h b/epan/tvbuff.h
index 96cf658f0c..2b69584f04 100644
--- a/tvbuff.h
+++ b/epan/tvbuff.h
@@ -9,7 +9,7 @@
* the data of a backing tvbuff, or can be a composite of
* other tvbuffs.
*
- * $Id: tvbuff.h,v 1.12 2000/09/13 20:17:23 gram Exp $
+ * $Id: tvbuff.h,v 1.1 2000/09/27 04:54:54 gram Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@xiexie.org>
*
diff --git a/file.c b/file.c
index ed804bc606..2e719265fe 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.222 2000/09/17 07:58:39 guy Exp $
+ * $Id: file.c,v 1.223 2000/09/27 04:54:28 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -69,6 +69,8 @@
# include <netinet/in.h>
#endif
+#include <epan.h>
+
#include "gtk/main.h"
#include "column.h"
#include "packet.h"
@@ -142,7 +144,7 @@ open_cap_file(char *fname, gboolean is_tempfile, capture_file *cf)
close_cap_file(cf, info_bar);
/* Initialize the table of conversations. */
- conversation_init();
+ epan_conversation_init();
/* Initialize protocol-specific variables */
init_all_protocols();
@@ -901,7 +903,7 @@ rescan_packets(capture_file *cf, const char *action, gboolean refilter,
by that dissector. */
/* Initialize the table of conversations. */
- conversation_init();
+ epan_conversation_init();
/* Initialize protocol-specific variables */
init_all_protocols();
diff --git a/gtk/main.c b/gtk/main.c
index ca7da46fbf..e62ad75602 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -1,6 +1,6 @@
/* main.c
*
- * $Id: main.c,v 1.158 2000/09/15 05:32:49 guy Exp $
+ * $Id: main.c,v 1.159 2000/09/27 04:55:05 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -95,6 +95,8 @@
#include "getopt.h"
#endif
+#include <epan.h>
+
#include "main.h"
#include "timestamp.h"
#include "packet.h"
@@ -854,7 +856,7 @@ main(int argc, char *argv[])
"-G" flag, as the "-G" flag dumps a list of fields registered
by the dissectors, and we must do it before we read the preferences,
in case any dissectors register preferences. */
- dissect_init();
+ epan_init();
/* Now register the preferences for any non-dissector modules.
We must do that before we read the preferences as well. */
@@ -1357,7 +1359,7 @@ main(int argc, char *argv[])
gtk_main();
- dissect_cleanup();
+ epan_cleanup();
g_free(rc_file);
#ifdef WIN32
diff --git a/packet.c b/packet.c
index a5b0cf8282..29c27e8569 100644
--- a/packet.c
+++ b/packet.c
@@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
- * $Id: packet.c,v 1.110 2000/09/23 05:58:17 guy Exp $
+ * $Id: packet.c,v 1.111 2000/09/27 04:54:29 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -952,27 +952,6 @@ void blank_packetinfo(void)
pi.p2p_dir = P2P_DIR_UNKNOWN;
}
-/* Do all one-time initialization. */
-void
-dissect_init(void)
-{
- except_init();
- tvbuff_init();
- proto_init();
- dfilter_init();
-#ifdef HAVE_PLUGINS
- init_plugins();
-#endif
-}
-
-void
-dissect_cleanup(void)
-{
- dfilter_cleanup();
- proto_cleanup();
- tvbuff_cleanup();
- except_deinit();
-}
/* Allow protocols to register "init" routines, which are called before
we make a pass through a capture file and dissect all its packets
diff --git a/tethereal.c b/tethereal.c
index ae58baec1d..bbcb539532 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.47 2000/09/20 08:28:43 guy Exp $
+ * $Id: tethereal.c,v 1.48 2000/09/27 04:54:33 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -75,6 +75,9 @@
#include "getopt.h"
#endif
+#include <glib.h>
+#include <epan.h>
+
#include "globals.h"
#include "timestamp.h"
#include "packet.h"
@@ -187,7 +190,7 @@ main(int argc, char *argv[])
"-G" flag, as the "-G" flag dumps a list of fields registered
by the dissectors, and we must do it before we read the preferences,
in case any dissectors register preferences. */
- dissect_init();
+ epan_init();
/* Now register the preferences for any non-dissector modules.
We must do that before we read the preferences as well. */
@@ -457,7 +460,7 @@ main(int argc, char *argv[])
if (rfilter != NULL) {
if (dfilter_compile(rfilter, &rfcode) != 0) {
fprintf(stderr, "tethereal: %s\n", dfilter_error_msg);
- dissect_cleanup();
+ epan_cleanup();
exit(2);
}
}
@@ -465,12 +468,12 @@ main(int argc, char *argv[])
if (cf_name) {
err = open_cap_file(cf_name, FALSE, &cfile);
if (err != 0) {
- dissect_cleanup();
+ epan_cleanup();
exit(2);
}
err = load_cap_file(&cfile, out_file_type);
if (err != 0) {
- dissect_cleanup();
+ epan_cleanup();
exit(2);
}
cf_name[0] = '\0';
@@ -507,7 +510,7 @@ main(int argc, char *argv[])
#endif
}
- dissect_cleanup();
+ epan_cleanup();
exit(0);
}
@@ -529,7 +532,7 @@ capture(int packet_count, int out_file_type)
#endif
/* Initialize the table of conversations. */
- conversation_init();
+ epan_conversation_init();
/* Initialize protocol-specific variables */
init_all_protocols();
@@ -1080,7 +1083,7 @@ open_cap_file(char *fname, gboolean is_tempfile, capture_file *cf)
/* The open succeeded. Fill in the information for this file. */
/* Initialize the table of conversations. */
- conversation_init();
+ epan_conversation_init();
/* Initialize protocol-specific variables */
init_all_protocols();