aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--Makefile.am3
-rw-r--r--Makefile.common11
-rw-r--r--Makefile.nmake65
-rw-r--r--alert_box.c6
-rw-r--r--capture.c6
-rw-r--r--config.h.win3223
-rw-r--r--config.nmake12
-rw-r--r--configure.in8
-rw-r--r--doc/Makefile.nmake9
-rw-r--r--epan/Makefile.common5
-rw-r--r--epan/Makefile.nmake36
-rw-r--r--epan/dfilter/dfilter.h10
-rw-r--r--epan/ftypes/ftypes.h10
-rw-r--r--epan/libethereal.def482
-rw-r--r--epan/plugins.h4
-rw-r--r--epan/proto.h14
-rw-r--r--epan/resolv.h4
-rw-r--r--file.c6
-rw-r--r--follow.h5
-rw-r--r--gtk/Makefile.nmake4
-rw-r--r--gtk/follow_dlg.c6
-rw-r--r--packaging/nsis/Makefile.nmake5
-rw-r--r--packaging/nsis/ethereal.nsi5
-rw-r--r--packet-ansi_a.h9
-rw-r--r--packet-ansi_map.h8
-rw-r--r--packet-dcerpc.h8
-rw-r--r--packet-fc.h10
-rw-r--r--packet-gsm_a.h24
-rw-r--r--packet-gsm_map.h7
-rw-r--r--packet-h225.h33
-rw-r--r--packet-isup.h10
-rw-r--r--packet-mtp3.h9
-rw-r--r--packet-rpc.h12
-rw-r--r--packet-smb-sidsnooping.h8
-rw-r--r--packet-wsp.h13
-rw-r--r--plugins/mgcp/Makefile.nmake21
-rw-r--r--plugins/mgcp/packet-mgcp.c14
-rw-r--r--prefs-int.h7
-rw-r--r--prefs.h4
-rw-r--r--print.h22
-rw-r--r--smb.h15
-rw-r--r--tap-ansi_astat.c6
-rw-r--r--tap-gsm_astat.c6
-rw-r--r--tap-h225counter.c6
-rw-r--r--tap-rpcstat.c6
-rw-r--r--tap-smbsids.c6
-rw-r--r--tap-smbstat.c6
-rw-r--r--tap-wspstat.c6
-rw-r--r--tap.h7
-rw-r--r--tethereal.c6
51 files changed, 860 insertions, 169 deletions
diff --git a/AUTHORS b/AUTHORS
index bf21d616e7..3cd8d013da 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1721,6 +1721,7 @@ Lars Roland <Lars.Roland [AT] gmx.net> {
H.225 message and reason tag counter taps and Service Response
Times
Tethereal version of SIP statistics tap
+ Support for building libethereal.dll with MSVC
}
Miha Jemec <m.jemec [AT] iskratel.si> {
diff --git a/Makefile.am b/Makefile.am
index 1f50c03ce6..7962dc04d8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
# Makefile.am
# Automake file for Ethereal
#
-# $Id: Makefile.am,v 1.728 2004/04/29 16:49:29 ulfl Exp $
+# $Id: Makefile.am,v 1.729 2004/05/09 10:03:36 guy Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
@@ -427,6 +427,7 @@ EXTRA_DIST = \
doc/tethereal.pod \
doc/text2pcap.pod \
editcap.c \
+ epan/libethereal.def \
ethereal_be.py \
ethereal_gen.py \
getopt.c \
diff --git a/Makefile.common b/Makefile.common
index 4279572f3b..3ec952c380 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -3,7 +3,7 @@
# a) common to both files and
# b) portable between both files
#
-# $Id: Makefile.common,v 1.41 2004/05/01 21:18:09 guy Exp $
+# $Id: Makefile.common,v 1.42 2004/05/09 10:03:36 guy Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
@@ -223,7 +223,6 @@ DISSECTOR_SUPPORT_INCLUDES = \
etypes.h \
follow.h \
format-oid.h \
- g711.h \
greproto.h \
h225-persistentdata.h \
in_cksum.h \
@@ -236,6 +235,8 @@ DISSECTOR_SUPPORT_INCLUDES = \
ppptypes.h \
prefs-int.h \
prefs.h \
+ print.h \
+ ps.h \
ptvcursor.h \
reassemble.h \
req_resp_hdrs.h \
@@ -262,8 +263,6 @@ ETHEREAL_COMMON_SRC = \
conditions.c \
disabled_protos.c \
pcap-util.c \
- print.c \
- ps.c \
range.c \
ringbuffer.c \
timestats.c \
@@ -281,8 +280,6 @@ ETHEREAL_COMMON_INCLUDES = \
file.h \
pcap-util.h \
pcap-util-int.h \
- print.h \
- ps.h \
range.h \
register.h \
ringbuffer.h \
@@ -334,6 +331,7 @@ ethereal_SOURCES = \
capture.c \
file.c \
filters.c \
+ g711.c \
proto_hier_stats.c \
summary.c
@@ -342,6 +340,7 @@ ethereal_INCLUDES = \
alert_box.h \
capture.h \
filters.h \
+ g711.h \
globals.h \
menu.h \
progress_dlg.h \
diff --git a/Makefile.nmake b/Makefile.nmake
index 4f8c17bee7..4dc7acbecd 100644
--- a/Makefile.nmake
+++ b/Makefile.nmake
@@ -1,7 +1,7 @@
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
-# $Id: Makefile.nmake,v 1.416 2004/05/06 20:48:35 obiot Exp $
+# $Id: Makefile.nmake,v 1.417 2004/05/09 10:03:36 guy Exp $
include config.nmake
include <win32.mak>
@@ -42,11 +42,9 @@ DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
# creation and compilation of register.c has been moved to epan.
DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_OBJECTS:register.obj=)
-ethereal_OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(ethereal_SOURCES:.c=.obj)
-
-tethereal_OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(tethereal_SOURCES:.c=.obj)
-
-dftest_OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(dftest_SOURCES:.c=.obj)
+ethereal_OBJECTS = $(ethereal_SOURCES:.c=.obj)
+tethereal_OBJECTS = $(tethereal_SOURCES:.c=.obj)
+dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
@@ -57,24 +55,34 @@ EXTRA_OBJECTS = \
strptime.obj
ethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
+ wsock32.lib user32.lib \
+ $(NET_SNMP_DIR)\win32\lib\netsnmp.lib \
+!IFDEF ENABLE_LIBETHEREAL
+ epan\libethereal.lib \
+!ELSE
+ dissectors.lib \
epan\ethereal.lib \
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
- wsock32.lib user32.lib \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
- $(ZLIB_LIBS) \
- $(NET_SNMP_DIR)\win32\lib\netsnmp.lib
+ $(ZLIB_LIBS)
+!ENDIF
# $(PCAP_DIR)\lib\wpcap.lib
tethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
- epan\ethereal.lib \
- epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
wsock32.lib user32.lib \
$(GLIB_LIBS) \
+ $(NET_SNMP_DIR)\win32\lib\netsnmp.lib \
+!IFDEF ENABLE_LIBETHEREAL
+ epan\libethereal.lib \
+!ELSE
+ dissectors.lib \
+ epan\ethereal.lib \
+ epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
- $(ZLIB_LIBS) \
- $(NET_SNMP_DIR)\win32\lib\netsnmp.lib
+ $(ZLIB_LIBS)
+!ENDIF
editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
@@ -84,15 +92,20 @@ mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
$(GLIB_LIBS)
-dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib epan\ethereal.lib \
- epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
+dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
wsock32.lib user32.lib \
- wiretap\wiretap-$(WTAP_VERSION).lib \
$(GLIB_LIBS) \
+ $(NET_SNMP_DIR)\win32\lib\netsnmp.lib \
+!IFDEF ENABLE_LIBETHEREAL
+ epan\libethereal.lib \
+!ELSE
+ dissectors.lib \
+ epan\ethereal.lib \
+ epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
$(ADNS_LIBS) \
$(PCRE_LIBS) \
- $(ZLIB_LIBS) \
- $(NET_SNMP_DIR)\win32\lib\netsnmp.lib
+ $(ZLIB_LIBS)
+!ENDIF
randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
user32.lib \
@@ -131,7 +144,7 @@ wiretap\wiretap-$(WTAP_VERSION).lib: wiretap
!IFNDEF GTK1_DIR
ethereal.exe :
!ELSE
-ethereal.exe : config.h cvsversion.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan gtk image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk\libui.lib plugins
+ethereal.exe : config.h cvsversion.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan gtk image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk\libui.lib dissectors.lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:ethereal.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(GTK1_LIBS) gtk\libui.lib $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res
@@ -141,14 +154,14 @@ ethereal.exe : config.h cvsversion.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan g
!IFNDEF GTK2_DIR
ethereal-gtk2.exe :
!ELSE
-ethereal-gtk2.exe : config.h cvsversion.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan gtk2 image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk2.tmp\libui.lib plugins
+ethereal-gtk2.exe : config.h cvsversion.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan gtk2 image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk2.tmp\libui.lib dissectors.lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:ethereal-gtk2.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(GTK2_LIBS) gtk2.tmp\libui.lib $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res
<<
!ENDIF
-tethereal.exe : config.h cvsversion.h $(tethereal_OBJECTS) $(EXTRA_OBJECTS) epan image\tethereal.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
+tethereal.exe : config.h cvsversion.h $(tethereal_OBJECTS) $(EXTRA_OBJECTS) epan image\tethereal.res wiretap\wiretap-$(WTAP_VERSION).lib dissectors.lib plugins
@echo Linking $@
$(LINK) @<<
/OUT:tethereal.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(tethereal_LIBS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS) image\tethereal.res
@@ -172,7 +185,7 @@ text2pcap.exe : config.h text2pcap.obj text2pcap-scanner.obj getopt.obj strptime
/OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
<<
-dftest.exe : $(dftest_OBJECTS) $(EXTRA_OBJECTS)
+dftest.exe : $(dftest_OBJECTS) $(EXTRA_OBJECTS) dissectors.lib
$(LINK) @<<
/OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS) $(EXTRA_OBJECTS)
<<
@@ -182,6 +195,9 @@ randpkt.exe : $(randpkt_OBJECTS) $(EXTRA_OBJECTS)
/OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS)
<<
+dissectors.lib: config.h $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(EXTRA_OBJECTS)
+ lib /out:dissectors.lib $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(EXTRA_OBJECTS)
+
config.h : config.h.win32 config.nmake
sed -e s/@VERSION@/$(VERSION)/ \
-e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
@@ -189,7 +205,9 @@ config.h : config.h.win32 config.nmake
-e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
-e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
-e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
+ -e "s/@HAVE_LIBETHEREALDLL@/$(LIBETHEREAL_CONFIG)/" \
-e "s/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
+ -e "s/@HAVE_LIBETHEREALDLL@/$(LIBETHEREAL_CONFIG)/" \
< config.h.win32 > $@
ps.c : rdps.exe print.ps
@@ -255,6 +273,7 @@ gtk2_distclean:
clean: gtk2_distclean
rm -f $(ethereal_OBJECTS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS) \
$(EXECUTABLES) $(PDB_FILE) \
+ $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) dissectors.lib\
editcap.obj mergecap.obj text2pcap.obj getopt.obj\
text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
rdps.pdb config.h ps.c \
@@ -334,7 +353,7 @@ gtk2:: help config.h cvsversion.h
$(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK2_CFLAGS)" GTK_LIBS="$(GTK2_LIBS)" libui.lib
cd ..
-epan:: packet-ncp2222.c x11-declarations.h x11-register-info.h
+epan:: packet-ncp2222.c x11-declarations.h x11-register-info.h dissectors.lib
cd epan
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
cd ..
diff --git a/alert_box.c b/alert_box.c
index 3dca87a893..03cc03f555 100644
--- a/alert_box.c
+++ b/alert_box.c
@@ -2,7 +2,7 @@
* Routines to put up various "standard" alert boxes used in multiple
* places
*
- * $Id: alert_box.c,v 1.6 2004/04/16 23:16:28 guy Exp $
+ * $Id: alert_box.c,v 1.7 2004/05/09 10:03:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -23,6 +23,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/capture.c b/capture.c
index 79caaadace..3689c66dcb 100644
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
/* capture.c
* Routines for packet capture windows
*
- * $Id: capture.c,v 1.250 2004/04/17 01:07:47 guy Exp $
+ * $Id: capture.c,v 1.251 2004/05/09 10:03:36 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -22,6 +22,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/config.h.win32 b/config.h.win32
index eefdb9863e..d84d9ccc31 100644
--- a/config.h.win32
+++ b/config.h.win32
@@ -1,4 +1,4 @@
-/* $Id: config.h.win32,v 1.44 2004/05/06 20:48:35 obiot Exp $ */
+/* $Id: config.h.win32,v 1.45 2004/05/09 10:03:36 guy Exp $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
@@ -44,6 +44,16 @@
@HAVE_LIBPCAP@
@HAVE_PCAP_FINDALLDEVS@
@WPCAP_CONSTIFIED@
+@HAVE_LIBETHEREALDLL@
+
+/* define macro for importing variables from an dll
+ * it depends on HAVE_LIBETHEREAL and _NEED_VAR_IMPORT_
+ */
+#if defined (_NEED_VAR_IMPORT_) && defined (HAVE_LIBETHEREALDLL)
+# define ETH_VAR_IMPORT __declspec(dllimport) extern
+#else
+# define ETH_VAR_IMPORT extern
+#endif
#define HAVE_NET_SNMP 1
#define HAVE_SOME_SNMP 1
@@ -118,6 +128,17 @@
/* Define to use the PCRE library */
@HAVE_PCRE@
+@HAVE_LIBETHEREALDLL@
+
+/* define macro for importing variables from an dll
+ * it depends on HAVE_LIBETHEREAL and _NEED_VAR_IMPORT_
+ */
+#if defined (_NEED_VAR_IMPORT_) && defined (HAVE_LIBETHEREALDLL)
+# define ETH_VAR_IMPORT __declspec(dllimport) extern
+#else
+# define ETH_VAR_IMPORT extern
+#endif
+
#ifndef WIN32
#define WIN32 1
#endif
diff --git a/config.nmake b/config.nmake
index 60f1ecf463..afb47cd431 100644
--- a/config.nmake
+++ b/config.nmake
@@ -1,4 +1,4 @@
-# $Id: config.nmake,v 1.85 2004/04/08 20:36:09 gerald Exp $
+# $Id: config.nmake,v 1.86 2004/05/09 10:03:36 guy Exp $
VERSION=0.10.3
#
@@ -133,7 +133,7 @@ PDB_FILE=vc*.pdb
PATH=c:\cygwin\bin;c:\python23;$(PATH)
# Set path to some required DLLs
-PATH=.\wiretap;$(GLIB_DIR)\bin;$(GETTEXT_DIR)\bin;$(ICONV_DIR)\bin;$(PATH)
+PATH=$(GLIB_DIR)\bin;$(GETTEXT_DIR)\bin;$(ICONV_DIR)\bin;$(PATH)
SH=bash
PERL=perl
@@ -158,6 +158,9 @@ MAKENSIS="C:/program files/nsis/makensis.exe"
#
MAKENSIS_MODERN_UI=USE
+# If you wan't to build a libethereal.dll, you should comment out the following line
+#ENABLE_LIBETHEREAL=USE
+
#
# You should not have to change anything below this comment.
# If you do, it's a deficiency in the Makefile.nmake files;
@@ -248,3 +251,8 @@ PCRE_LIBS=
PCRE_CONFIG=
!ENDIF
+!IFDEF ENABLE_LIBETHEREAL
+LIBETHEREAL_CONFIG=^#define HAVE_LIBETHEREALDLL 1
+!ELSE
+LIBETHEREAL_CONFIG=
+!ENDIF
diff --git a/configure.in b/configure.in
index 21362b3ecc..89ff0a454f 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
-# $Id: configure.in,v 1.257 2004/04/25 21:07:15 obiot Exp $
+# $Id: configure.in,v 1.258 2004/05/09 10:03:36 guy Exp $
#
AC_INIT(etypes.h)
@@ -766,6 +766,12 @@ else
fi
AC_SUBST(ADNS_LIBS)
+#
+# Define ETH_VAR_IMPORT appropriately for declarations of external
+# variables exported from dynamically-linked libraries.
+#
+AC_DEFINE(ETH_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries])
+
dnl Checks for typedefs, structures, and compiler characteristics.
# AC_C_CONST
diff --git a/doc/Makefile.nmake b/doc/Makefile.nmake
index c21c42a2b6..5cc030ee5d 100644
--- a/doc/Makefile.nmake
+++ b/doc/Makefile.nmake
@@ -1,7 +1,7 @@
# Makefile.nmake
# Nmake file for Ethereal documentation
#
-# $Id: Makefile.nmake,v 1.13 2004/04/25 09:02:02 ulfl Exp $
+# $Id: Makefile.nmake,v 1.14 2004/05/09 10:03:39 guy Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
@@ -62,7 +62,7 @@ ethereal-filter.4: ethereal-filter.pod ../config.h
$(POD2MAN) \
--center="The Ethereal Network Analyzer" \
--release=$(VERSION) \
- ethereal-filter.pod > ethereal.4
+ ethereal-filter.pod > ethereal.4
ethereal-filter.html: ethereal-filter.pod ../config.h
$(POD2HTML) \
@@ -72,7 +72,12 @@ ethereal-filter.html: ethereal-filter.pod ../config.h
ethereal-filter.pod: ethereal-filter.pod.template ../tethereal.exe
cd ..
+ cp --update --preserve wiretap/wiretap-$(WTAP_VERSION).dll wiretap-$(WTAP_VERSION).dll
+!IFDEF ENABLE_LIBETHEREAL
+ cp --update --preserve epan/libethereal.dll libethereal.dll
+!ENDIF
tethereal.exe -G | $(PERL) doc\dfilter2pod.pl doc\ethereal-filter.pod.template > doc\ethereal-filter.pod
+ rm -f libethereal.dll wiretap-$(WTAP_VERSION).dll
cd doc
editcap.1: editcap.pod ../config.h
diff --git a/epan/Makefile.common b/epan/Makefile.common
index 1999c234f8..dd4e17b8a6 100644
--- a/epan/Makefile.common
+++ b/epan/Makefile.common
@@ -3,7 +3,7 @@
# a) common to both files and
# b) portable between both files
#
-# $Id: Makefile.common,v 1.22 2004/05/08 08:49:02 guy Exp $
+# $Id: Makefile.common,v 1.23 2004/05/09 10:03:40 guy Exp $
#
# Ethereal - Network traffic analyzer
# By Gerald Combs <gerald@ethereal.com>
@@ -498,12 +498,13 @@ DISSECTOR_SUPPORT_SRC = \
../crypt-md5.c \
../crypt-rc4.c \
../follow.c \
- ../g711.c \
../h225-persistentdata.c \
../in_cksum.c \
../ipproto.c \
../packet-dcerpc-nt.c \
../prefs.c \
+ ../print.c \
+ ../ps.c \
../ptvcursor.c \
../reassemble.c \
../req_resp_hdrs.c \
diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake
index 648dffa602..a405268949 100644
--- a/epan/Makefile.nmake
+++ b/epan/Makefile.nmake
@@ -1,11 +1,13 @@
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
-# $Id: Makefile.nmake,v 1.39 2004/05/06 20:48:36 obiot Exp $
+# $Id: Makefile.nmake,v 1.40 2004/05/09 10:03:40 guy Exp $
include ..\config.nmake
+include <win32.mak>
include Makefile.common
+
############### no need to modify below this line #########
CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap $(GLIB_CFLAGS) \
@@ -14,10 +16,16 @@ CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap $(GLIB_CFLAGS) \
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
-# For use when making ethereal.dll
+# For use when making libethereal.dll
libethereal_LIBS = \
- wsock32.lib user32.lib \
- $(GLIB_LIBS)
+ $(GLIB_LIBS) \
+ $(ADNS_LIBS) \
+ $(PCRE_LIBS) \
+ $(ZLIB_LIBS) \
+ $(NET_SNMP_DIR)\win32\lib\netsnmp.lib \
+ ftypes\ftypes.lib \
+ dfilter\dfilter.lib \
+ ..\dissectors.lib
.c.obj::
$(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
@@ -50,12 +58,24 @@ OBJECTS=addr_and_mask.obj \
tvbuff.obj \
value_string.obj
+all: ftypes dfilter ethereal.lib
+!IFDEF ENABLE_LIBETHEREAL
+all: ftypes dfilter libethereal.dll
+!ELSE
all: ftypes dfilter ethereal.lib
+!ENDIF
+
+# For use when making libethereal.dll
+libethereal.lib: libethereal.dll
+libethereal.exp: libethereal.dll
-# For use when making ethereal.dll
-#ethereal.dll ethereal.lib : ..\config.h $(OBJECTS)
-# link /DLL /out:ethereal.dll $(OBJECTS) $(libethereal_LIBS)
+libethereal.dll: ..\config.h $(OBJECTS) libethereal.def ftypes dfilter
+ $(link) $(dlllflags) $(conlibsdll) \
+ $(LOCAL_LDFLAGS) \
+ /DEF:libethereal.def /OUT:libethereal.dll \
+ /IMPLIB:libethereal.lib $(OBJECTS) $(libethereal_LIBS)
+
ethereal.lib : ..\config.h $(OBJECTS)
lib /out:ethereal.lib $(OBJECTS)
@@ -66,7 +86,7 @@ ethereal.lib : ..\config.h $(OBJECTS)
cd epan
clean:
- rm -f $(OBJECTS) ethereal.lib $(PDB_FILE)
+ rm -f $(OBJECTS) ethereal.lib libethereal.dll libethereal.lib libethereal.exp $(PDB_FILE)
cd ftypes
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../dfilter
diff --git a/epan/dfilter/dfilter.h b/epan/dfilter/dfilter.h
index e6b5f3fd8a..764876223b 100644
--- a/epan/dfilter/dfilter.h
+++ b/epan/dfilter/dfilter.h
@@ -1,5 +1,5 @@
/*
- * $Id: dfilter.h,v 1.8 2002/12/02 23:28:16 guy Exp $
+ * $Id: dfilter.h,v 1.9 2004/05/09 10:03:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -65,8 +65,12 @@ dfilter_free(dfilter_t *df);
/* dfilter_error_msg is NULL if there was no error during dfilter_compile,
- * otherwise it points to a displayable error message. */
-extern gchar *dfilter_error_msg;
+ * otherwise it points to a displayable error message. With MSVC and a
+ * libethereal.dll, we need a special declaration.
+ */
+
+ETH_VAR_IMPORT gchar *dfilter_error_msg;
+
/* Apply compiled dfilter */
gboolean
diff --git a/epan/ftypes/ftypes.h b/epan/ftypes/ftypes.h
index be23651f9f..01ba4e20f2 100644
--- a/epan/ftypes/ftypes.h
+++ b/epan/ftypes/ftypes.h
@@ -1,7 +1,7 @@
/* ftypes.h
* Definitions for field types
*
- * $Id: ftypes.h,v 1.31 2004/02/27 12:00:32 obiot Exp $
+ * $Id: ftypes.h,v 1.32 2004/05/09 10:03:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -226,8 +226,12 @@ void
fvalue_init(fvalue_t *fv, ftenum_t ftype);
-/* Free all memory used by an fvalue_t */
-extern fvalue_t *fvalue_free_list;
+/* Free all memory used by an fvalue_t. With MSVC and a
+ * libethereal.dll, we need a special declaration.
+ */
+ETH_VAR_IMPORT fvalue_t *fvalue_free_list;
+
+
#define FVALUE_CLEANUP(fv) \
{ \
register FvalueFreeFunc free_value; \
diff --git a/epan/libethereal.def b/epan/libethereal.def
new file mode 100644
index 0000000000..7576baa35b
--- /dev/null
+++ b/epan/libethereal.def
@@ -0,0 +1,482 @@
+EXPORTS
+abs_time_to_str
+address_to_str
+add_new_data_source
+AdmissionRejectReason_vals DATA
+ansi_a_ios401_bsmap_strings DATA
+ansi_a_ios401_dtap_strings DATA
+ansi_map_opr_code_strings DATA
+asn1_bits_decode
+asn1_bool_decode
+asn1_close
+asn1_eoc
+asn1_eoc_decode
+asn1_err_to_str
+asn1_header_decode
+asn1_id_decode
+asn1_id_decode1
+asn1_int32_decode
+asn1_int32_value_decode
+asn1_length_decode
+asn1_null_decode
+asn1_octet_decode
+asn1_octet_string_decode
+asn1_oid_decode
+asn1_oid_value_decode
+asn1_open
+asn1_sequence_decode
+asn1_string_decode
+asn1_string_value_decode
+asn1_subid_decode
+asn1_tag_decode
+asn1_uint32_decode
+asn1_uint32_value_decode
+BandRejectReason_vals DATA
+build_follow_filter
+call_dissector
+capture_ap1394
+capture_arcnet
+capture_atm
+capture_chdlc
+capture_clip
+capture_eth
+capture_fddi
+capture_ieee80211
+capture_ipfc
+capture_llap
+capture_null
+capture_ppp_hdlc
+capture_prism
+capture_raw
+capture_sll
+capture_tr
+check_col
+close_print_dest
+col_add_fstr
+col_add_str
+col_append_fstr
+col_append_str
+col_clear
+col_format_desc
+col_format_to_string
+col_get_writable
+col_prepend_fstr
+col_setup
+col_set_cls_time
+col_set_fence
+col_set_str
+col_set_writable
+compute_timestamp_diff
+conversation_add_proto_data
+conversation_delete_proto_data
+conversation_get_proto_data
+conversation_new
+conversation_set_dissector
+copy_prefs
+create_dissector_handle
+create_persconffile_dir
+create_tempfile
+data_out_file DATA
+dcerpc_get_proto_hf_opnum
+dcerpc_get_proto_name
+dcerpc_get_proto_sub_dissector
+dcerpc_uuids DATA
+decode_boolean_bitfield
+decode_enumerated_bitfield
+decode_enumerated_bitfield_shifted
+decode_numeric_bitfield
+deletefile
+dfilter_apply_edt
+dfilter_compile
+dfilter_error_msg DATA
+dfilter_free
+DisengageReason_vals DATA
+DisengageRejectReason_vals DATA
+dissector_add
+dissector_add_handle
+dissector_add_string
+dissector_all_tables_foreach_changed
+dissector_all_tables_foreach_table
+dissector_change
+dissector_change_string
+dissector_delete
+dissector_delete_string
+dissector_get_port_handle
+dissector_get_string_handle
+dissector_handle_get_protocol_index
+dissector_handle_get_short_name
+dissector_reset
+dissector_reset_string
+dissector_table_foreach_handle
+dissector_try_heuristic
+dissector_try_port
+dissector_try_string
+dissect_ber_bitstring
+dissect_ber_boolean
+dissect_ber_choice
+dissect_ber_generalized_time
+dissect_ber_identifier
+dissect_ber_integer
+dissect_ber_length
+dissect_ber_object_identifier
+dissect_ber_octet_string
+dissect_ber_restricted_string
+dissect_ber_sequence
+dissect_ber_sequence_of
+dissect_ber_set_of
+dissect_per_bit_string
+dissect_per_BMPString
+dissect_per_boolean
+dissect_per_choice
+dissect_per_constrained_integer
+dissect_per_constrained_sequence_of
+dissect_per_constrained_set_of
+dissect_per_GeneralString
+dissect_per_IA5String
+dissect_per_integer
+dissect_per_NumericString
+dissect_per_object_identifier
+dissect_per_octet_string
+dissect_per_PrintableString
+dissect_per_restricted_character_string
+dissect_per_sequence
+dissect_per_sequence_of
+dissect_per_set_of
+dissect_tpkt_encap
+dissect_xdlc_control
+draw_tap_listeners
+dtbl_entry_get_handle
+dtbl_entry_get_initial_handle
+EBCDIC_to_ASCII
+EBCDIC_to_ASCII1
+epan_cleanup
+epan_dissect_fill_in_columns
+epan_dissect_free
+epan_dissect_new
+epan_dissect_prime_dfilter
+epan_dissect_run
+epan_init
+except_alloc
+except_deinit
+except_free
+except_init
+except_pop
+except_rethrow
+except_setup_try
+except_set_allocator
+except_take_data
+except_throw
+except_throwd
+except_throwf
+except_unhandled_catcher
+FacilityReason_vals DATA
+fc_fc4_val DATA
+file_open_error_message
+file_write_error_message
+find_conversation
+find_dissector
+find_dissector_table
+find_protocol_by_id
+find_tap_id
+find_val_for_string
+follow_tcp_stats
+fragment_add
+fragment_add_seq
+fragment_add_seq_check
+fragment_add_seq_next
+fragment_delete
+fragment_get
+fragment_get_tot_len
+fragment_set_partial_reassembly
+fragment_set_tot_len
+fragment_table_init
+free_prefs
+ftype_can_contains
+ftype_can_eq
+ftype_can_ge
+ftype_can_gt
+ftype_can_le
+ftype_can_lt
+ftype_can_matches
+ftype_can_ne
+ftype_can_slice
+ftype_pretty_name
+fvalue_free_list DATA
+fvalue_from_unparsed
+fvalue_get
+fvalue_get_integer
+GatekeeperRejectReason_vals DATA
+get_args_as_string
+get_basename
+get_ber_identifier
+get_ber_last_created_item
+get_ber_length
+get_CDR_any
+get_CDR_boolean
+get_CDR_char
+get_CDR_double
+get_CDR_encap_info
+get_CDR_enum
+get_CDR_fixed
+get_CDR_float
+get_CDR_interface
+get_CDR_long
+get_CDR_object
+get_CDR_octet
+get_CDR_octet_seq
+get_CDR_short
+get_CDR_string
+get_CDR_typeCode
+get_CDR_ulong
+get_CDR_ushort
+get_CDR_wchar
+get_CDR_wstring
+get_column_char_width
+get_column_format
+get_column_format_from_str
+get_column_format_matches
+get_column_longest_string
+get_column_title
+get_conn_cfilter
+get_datafile_path
+get_dirname
+get_dissector_table_base
+get_dissector_table_selector_type
+get_dissector_table_ui_name
+get_hostname
+get_hostname6
+get_persconffile_path
+get_tcp_port
+get_tempfile_path
+get_timestamp_setting
+get_udp_port
+gsm_a_bssmap_msg_strings DATA
+gsm_a_dtap_msg_cc_strings DATA
+gsm_a_dtap_msg_gmm_strings DATA
+gsm_a_dtap_msg_mm_strings DATA
+gsm_a_dtap_msg_rr_strings DATA
+gsm_a_dtap_msg_sms_strings DATA
+gsm_a_dtap_msg_sm_strings DATA
+gsm_a_dtap_msg_ss_strings DATA
+gsm_a_pd_str DATA
+gsm_map_opr_code_strings DATA
+g_resolv_flags DATA
+h323_message_body_vals DATA
+heur_dissector_add
+host_name_lookup_process
+incomplete_tcp_stream DATA
+InfoRequestNakReason_vals DATA
+init_dissection
+ip6_to_str
+ipv4_get_net_order_addr
+ip_to_str
+isup_message_type_value DATA
+isup_message_type_value_acro DATA
+is_big_endian
+is_tpkt
+LocationRejectReason_vals DATA
+match_strval
+mtp3_addr_to_str_buf
+mtp3_service_indicator_code_short_vals DATA
+new_create_dissector_handle
+new_register_dissector
+nt_cmd_vals DATA
+num_tap_filters DATA
+num_tree_types DATA
+open_print_dest
+plugin_list DATA
+postseq_cleanup_all_protocols
+prefs DATA
+prefs_apply_all
+prefs_get_title_by_name
+prefs_is_registered_protocol
+prefs_modules_foreach
+prefs_module_list_foreach
+prefs_pref_foreach
+prefs_register_bool_preference
+prefs_register_enum_preference
+prefs_register_modules
+prefs_register_obsolete_preference
+prefs_register_protocol
+prefs_register_string_preference
+prefs_register_uint_preference
+prefs_set_pref
+print_finale
+print_formfeed
+print_hex_data
+print_line
+print_packet_header
+print_preamble
+protocols_module DATA
+proto_can_match_selected
+proto_can_toggle_protocol
+proto_construct_dfilter_string
+proto_find_field_from_offset
+proto_find_finfo
+proto_get_finfo_ptr_array
+proto_get_first_protocol
+proto_get_first_protocol_field
+proto_get_id_by_filter_name
+proto_get_next_protocol
+proto_get_next_protocol_field
+proto_get_protocol_filter_name
+proto_get_protocol_name
+proto_get_protocol_short_name
+proto_is_protocol_enabled
+proto_item_add_subtree
+proto_item_append_text
+proto_item_fill_label
+proto_item_get_len
+proto_item_get_parent
+proto_item_get_parent_nth
+proto_item_get_subtree
+proto_item_set_end
+proto_item_set_len
+proto_item_set_text
+proto_register_field_array
+proto_register_protocol
+proto_register_subtree_array
+proto_registrar_dump_fields
+proto_registrar_dump_protocols
+proto_registrar_get_abbrev
+proto_registrar_get_byname
+proto_registrar_get_ftype
+proto_registrar_get_nth
+proto_registrar_get_parent
+proto_registrar_is_protocol
+proto_registrar_n
+proto_set_cant_toggle
+proto_set_decoding
+proto_tree_add_boolean
+proto_tree_add_boolean_format
+proto_tree_add_boolean_hidden
+proto_tree_add_bytes
+proto_tree_add_bytes_format
+proto_tree_add_bytes_hidden
+proto_tree_add_double
+proto_tree_add_double_format
+proto_tree_add_double_hidden
+proto_tree_add_ether
+proto_tree_add_ether_format
+proto_tree_add_ether_hidden
+proto_tree_add_int
+proto_tree_add_int_format
+proto_tree_add_int_hidden
+proto_tree_add_ipv4
+proto_tree_add_ipv4_format
+proto_tree_add_ipv4_hidden
+proto_tree_add_ipv6
+proto_tree_add_ipv6_format
+proto_tree_add_ipv6_hidden
+proto_tree_add_ipxnet
+proto_tree_add_ipxnet_format
+proto_tree_add_ipxnet_hidden
+proto_tree_add_item
+proto_tree_add_item_hidden
+proto_tree_add_none_format
+proto_tree_add_protocol_format
+proto_tree_add_string
+proto_tree_add_string_format
+proto_tree_add_string_hidden
+proto_tree_add_text
+proto_tree_add_time
+proto_tree_add_time_format
+proto_tree_add_time_hidden
+proto_tree_add_uint
+proto_tree_add_uint_format
+proto_tree_add_uint_hidden
+proto_tree_children_foreach
+proto_tree_get_parent
+proto_tree_print
+p_add_proto_data
+p_get_proto_data
+RasMessage_vals DATA
+read_prefs
+read_prefs_file
+reassembled_table_init
+register_all_protocols
+register_all_protocol_handoffs
+register_dissector
+register_dissector_table
+register_giop_user
+register_giop_user_module
+register_heur_dissector_list
+register_init_routine
+register_postseq_cleanup_routine
+register_tap
+register_tap_listener
+RegistrationRejectReason_vals DATA
+ReleaseCompleteReason_vals DATA
+remove_tap_listener
+report_failure
+report_open_failure
+report_read_failure
+reset_tap_listeners
+reset_tcp_reassembly
+rpc_procs DATA
+rpc_proc_name
+rpc_progs DATA
+rpc_prog_hf
+rpc_prog_name
+set_actual_length
+set_timestamp_setting
+show_fragment_seq_tree
+show_fragment_tree
+sid_name_snooping DATA
+sid_name_table DATA
+smb_cmd_vals DATA
+string_to_name_resolve
+tap_push_tapped_queue
+tap_queue_init
+tap_queue_packet
+tcp_dissect_pdus
+test_for_directory
+test_for_fifo
+time_msecs_to_str
+time_secs_to_str
+trans2_cmd_vals DATA
+tree_is_expanded DATA
+tvb_bytes_exist
+tvb_bytes_to_str
+tvb_find_guint8
+tvb_find_line_end
+tvb_find_line_end_unquoted
+tvb_format_text
+tvb_get_guint8
+tvb_get_letoh24
+tvb_get_letohl
+tvb_get_letohs
+tvb_get_nstringz
+tvb_get_nstringz0
+tvb_get_ntoh24
+tvb_get_ntohl
+tvb_get_ntohs
+tvb_get_ptr
+tvb_get_string
+tvb_get_stringz
+tvb_length
+tvb_length_remaining
+tvb_memcpy
+tvb_memdup
+tvb_new_real_data
+tvb_new_subset
+tvb_offset_exists
+tvb_pbrk_guint8
+tvb_reported_length
+tvb_reported_length_remaining
+tvb_set_child_real_data_tvbuff
+tvb_set_free_cb
+tvb_strncaseeql
+tvb_strneql
+tvb_strnlen
+tvb_strsize
+UnregRejectReason_vals DATA
+UnregRequestReason_vals DATA
+vals_pdu_type DATA
+vals_status DATA
+val_to_str
+write_prefs
+xml_escape
+
+
+
diff --git a/epan/plugins.h b/epan/plugins.h
index 1a3695153a..362a4a7e2a 100644
--- a/epan/plugins.h
+++ b/epan/plugins.h
@@ -1,7 +1,7 @@
/* plugins.h
* definitions for plugins structures
*
- * $Id: plugins.h,v 1.9 2002/08/28 20:40:44 jmayer Exp $
+ * $Id: plugins.h,v 1.10 2004/05/09 10:03:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -39,7 +39,7 @@ typedef struct _plugin {
struct _plugin *next; /* forward link */
} plugin;
-extern plugin *plugin_list;
+ETH_VAR_IMPORT plugin *plugin_list;
void init_plugins(const char *);
void register_all_plugin_handoffs(void);
diff --git a/epan/proto.h b/epan/proto.h
index 9aeca9e9a7..4b3d5e9666 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1,7 +1,7 @@
/* proto.h
* Definitions for protocol display
*
- * $Id: proto.h,v 1.62 2004/05/09 09:26:31 ulfl Exp $
+ * $Id: proto.h,v 1.63 2004/05/09 10:03:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -665,11 +665,15 @@ extern void proto_registrar_dump_fields(void);
/* Points to the first element of an array of Booleans, indexed by
a subtree item type; that array element is TRUE if subtrees of
- an item of that type are to be expanded. */
-extern gboolean *tree_is_expanded;
+ an item of that type are to be expanded. With MSVC and a
+ libethereal.dll, we need a special declaration.
+ */
+ETH_VAR_IMPORT gboolean *tree_is_expanded;
-/* Number of elements in that array. */
-extern int num_tree_types;
+/* Number of elements in that array. With MSVC and a
+ * libethereal.dll, we need a special declaration.
+ */
+ETH_VAR_IMPORT int num_tree_types;
/* glib doesn't have g_ptr_array_len of all things!*/
#ifndef g_ptr_array_len
diff --git a/epan/resolv.h b/epan/resolv.h
index 323e5cc1ed..1eef0da6fc 100644
--- a/epan/resolv.h
+++ b/epan/resolv.h
@@ -1,7 +1,7 @@
/* resolv.h
* Definitions for network object lookup
*
- * $Id: resolv.h,v 1.16 2004/02/13 01:09:51 guy Exp $
+ * $Id: resolv.h,v 1.17 2004/05/09 10:03:40 guy Exp $
*
* Laurent Deniel <laurent.deniel@free.fr>
*
@@ -34,7 +34,7 @@
/*
* Flag controlling what names to resolve.
*/
-extern guint32 g_resolv_flags;
+ETH_VAR_IMPORT guint32 g_resolv_flags;
/* 32 types are sufficient (as are 640k of RAM) */
/* FIXME: Maybe MANUF/m, IP/i, IP6/6, IPX/x, UDP+TCP/t etc would be
diff --git a/file.c b/file.c
index 6143797aa4..c95f602103 100644
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
/* file.c
* File I/O routines
*
- * $Id: file.c,v 1.382 2004/05/02 15:04:14 ulfl Exp $
+ * $Id: file.c,v 1.383 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -22,6 +22,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/follow.h b/follow.h
index 80b9290781..3510bb2d8c 100644
--- a/follow.h
+++ b/follow.h
@@ -1,6 +1,6 @@
/* follow.h
*
- * $Id: follow.h,v 1.14 2004/01/23 01:42:45 jmayer Exp $
+ * $Id: follow.h,v 1.15 2004/05/09 10:03:37 guy Exp $
*
* Copyright 1998 Mike Hall <mlh@io.com>
*
@@ -31,7 +31,8 @@
#define MAX_IPADDR_LEN 16
-extern gboolean incomplete_tcp_stream;
+/* With MSVC and a libethereal.dll, we need a special declaration. */
+ETH_VAR_IMPORT gboolean incomplete_tcp_stream;
typedef struct _tcp_stream_chunk {
guint8 src_addr[MAX_IPADDR_LEN];
diff --git a/gtk/Makefile.nmake b/gtk/Makefile.nmake
index 74467c65e3..84c8c49086 100644
--- a/gtk/Makefile.nmake
+++ b/gtk/Makefile.nmake
@@ -1,7 +1,7 @@
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
-# $Id: Makefile.nmake,v 1.72 2004/01/22 18:08:58 ulfl Exp $
+# $Id: Makefile.nmake,v 1.73 2004/05/09 10:03:40 guy Exp $
include ..\config.nmake
@@ -11,7 +11,7 @@ CFLAGS=-DHAVE_CONFIG_H /I.. /I../wiretap $(GTK_CFLAGS) \
/I$(PCAP_DIR)\WPCAP\LIBPCAP /I$(PCAP_DIR)\WPCAP\LIBPCAP\bpf \
/I$(PCAP_DIR)\WPCAP\LIBPCAP\lbl \
/I$(PCAP_DIR)\include /I$(NET_SNMP_DIR)\include \
- /I$(NET_SNMP_DIR)\win32 /Zm800 -D_U_="" $(LOCAL_CFLAGS)
+ /I$(NET_SNMP_DIR)\win32 /Zm800 -D_U_="" -D_NEED_VAR_IMPORT_ $(LOCAL_CFLAGS)
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
diff --git a/gtk/follow_dlg.c b/gtk/follow_dlg.c
index ebee4044f4..33fd895bd4 100644
--- a/gtk/follow_dlg.c
+++ b/gtk/follow_dlg.c
@@ -1,6 +1,6 @@
/* follow_dlg.c
*
- * $Id: follow_dlg.c,v 1.57 2004/04/21 00:48:22 obiot Exp $
+ * $Id: follow_dlg.c,v 1.58 2004/05/09 10:03:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -107,8 +107,8 @@ static void follow_stream_om_client(GtkWidget * w, gpointer data);
static void follow_stream_om_server(GtkWidget * w, gpointer data);
-extern FILE *data_out_file;
-
+/* With MSVC and a libethereal.dll, we need a special declaration. */
+ETH_VAR_IMPORT FILE *data_out_file;
#define E_FOLLOW_INFO_KEY "follow_info_key"
diff --git a/packaging/nsis/Makefile.nmake b/packaging/nsis/Makefile.nmake
index 28b74492f8..7408c45f7b 100644
--- a/packaging/nsis/Makefile.nmake
+++ b/packaging/nsis/Makefile.nmake
@@ -1,5 +1,5 @@
#
-# $Id: Makefile.nmake,v 1.39 2004/03/25 11:21:06 guy Exp $
+# $Id: Makefile.nmake,v 1.40 2004/05/09 10:03:41 guy Exp $
#
# NSIS is a free packager/installer/uninstaller program for Win32.
# It was originally written for the Winamp package, but various
@@ -89,6 +89,9 @@ $(DEST)-setup-$(VERSION).exe : ethereal.nsi $(DELIVERABLES) Makefile.nmake
!IF "$(MAKENSIS_MODERN_UI)" != ""
/DMAKENSIS_MODERN_UI=$(MAKENSIS_MODERN_UI) \
!ENDIF
+!IF "$(ENABLE_LIBETHEREAL)" != ""
+ /DENABLE_LIBETHEREAL=$(ENABLE_LIBETHEREAL) \
+!ENDIF
!IFDEF GTK1_DIR
/DGTK1_DIR=$(GTK1_DIR) \
!ENDIF
diff --git a/packaging/nsis/ethereal.nsi b/packaging/nsis/ethereal.nsi
index 2a89ea0a77..003feaf98e 100644
--- a/packaging/nsis/ethereal.nsi
+++ b/packaging/nsis/ethereal.nsi
@@ -1,7 +1,7 @@
;
; ethereal.nsi
;
-; $Id: ethereal.nsi,v 1.52 2004/03/25 11:21:06 guy Exp $
+; $Id: ethereal.nsi,v 1.53 2004/05/09 10:03:41 guy Exp $
!ifdef MAKENSIS_MODERN_UI
@@ -136,6 +136,9 @@ SetShellVarContext all
SetOutPath $INSTDIR
File "..\..\wiretap\wiretap-${WTAP_VERSION}.dll"
+!ifdef ENABLE_LIBETHEREAL
+File "..\..\epan\libethereal.dll"
+!endif
File "${GLIB_DIR}\bin\libglib-2.0-0.dll"
File "${GLIB_DIR}\bin\libgmodule-2.0-0.dll"
File "${GLIB_DIR}\bin\libgobject-2.0-0.dll"
diff --git a/packet-ansi_a.h b/packet-ansi_a.h
index 85cc483e9a..f3601f77e4 100644
--- a/packet-ansi_a.h
+++ b/packet-ansi_a.h
@@ -1,6 +1,6 @@
/* packet-ansi_a.h
*
- * $Id: packet-ansi_a.h,v 1.3 2003/12/12 19:55:26 guy Exp $
+ * $Id: packet-ansi_a.h,v 1.4 2004/05/09 10:03:37 guy Exp $
*
* Copyright 2003, Michael Lum <mlum [AT] telostech.com>,
* In association with Telos Technology Inc.
@@ -35,10 +35,11 @@ typedef struct _ansi_a_tap_rec_t {
/*
* the following allows TAP code access to the messages
- * without having to duplicate it
+ * without having to duplicate it. With MSVC and a
+ * libethereal.dll, we need a special declaration.
*/
-extern const value_string ansi_a_ios401_bsmap_strings[];
-extern const value_string ansi_a_ios401_dtap_strings[];
+ETH_VAR_IMPORT const value_string ansi_a_ios401_bsmap_strings[];
+ETH_VAR_IMPORT const value_string ansi_a_ios401_dtap_strings[];
/*
* allows ANSI MAP to use this for IS-880 enhancements
diff --git a/packet-ansi_map.h b/packet-ansi_map.h
index 512ce7b2c6..6b3d1e5e80 100644
--- a/packet-ansi_map.h
+++ b/packet-ansi_map.h
@@ -1,6 +1,6 @@
/* packet-ansi_map.h
*
- * $Id: packet-ansi_map.h,v 1.2 2004/04/21 05:53:55 guy Exp $
+ * $Id: packet-ansi_map.h,v 1.3 2004/05/09 10:03:37 guy Exp $
*
* Copyright 2003, Michael Lum <mlum [AT] telostech.com>,
* In association with Telos Technology Inc.
@@ -34,6 +34,8 @@ typedef struct _ansi_map_tap_rec_t {
/*
* the following allows TAP code access to the messages
- * without having to duplicate it
+ * without having to duplicate it. With MSVC and a
+ * libethereal.dll, we need a special declaration.
*/
-extern const value_string ansi_map_opr_code_strings[];
+ETH_VAR_IMPORT const value_string ansi_map_opr_code_strings[];
+
diff --git a/packet-dcerpc.h b/packet-dcerpc.h
index 702b59e03b..84e7d236cf 100644
--- a/packet-dcerpc.h
+++ b/packet-dcerpc.h
@@ -2,7 +2,7 @@
* Copyright 2001, Todd Sabin <tas@webspan.net>
* Copyright 2003, Tim Potter <tpot@samba.org>
*
- * $Id: packet-dcerpc.h,v 1.41 2004/05/07 11:24:02 ulfl Exp $
+ * $Id: packet-dcerpc.h,v 1.42 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -271,8 +271,10 @@ typedef struct _dcerpc_info {
} dcerpc_info;
-/* the registered subdissectors */
-extern GHashTable *dcerpc_uuids;
+/* the registered subdissectors. With MSVC and a
+ * libethereal.dll, we need a special declaration.
+ */
+ETH_VAR_IMPORT GHashTable *dcerpc_uuids;
typedef struct _dcerpc_uuid_key {
e_uuid_t uuid;
diff --git a/packet-fc.h b/packet-fc.h
index fb17ba505e..a542382e88 100644
--- a/packet-fc.h
+++ b/packet-fc.h
@@ -2,7 +2,7 @@
* Basic Fibre Channel Header definitions
* Copyright 2002 Dinesh G Dutt (ddutt@cisco.com)
*
- * $Id: packet-fc.h,v 1.5 2003/10/30 02:06:11 guy Exp $
+ * $Id: packet-fc.h,v 1.6 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -52,7 +52,13 @@
#define FC_TYPE_AL 0x23
#define FC_TYPE_SNMP 0x24
-extern const value_string fc_fc4_val[];
+
+/*
+ * the following allows TAP code access to the messages
+ * without having to duplicate it. With MSVC and a
+ * libethereal.dll, we need a special declaration.
+ */
+ETH_VAR_IMPORT const value_string fc_fc4_val[];
/* DF_CTL bits */
#define FC_DFCTL_DH 0x03 /* Device_Header type bits: */
diff --git a/packet-gsm_a.h b/packet-gsm_a.h
index 201e186679..1c44b5f9d9 100644
--- a/packet-gsm_a.h
+++ b/packet-gsm_a.h
@@ -1,6 +1,6 @@
/* packet-gsm_a.h
*
- * $Id: packet-gsm_a.h,v 1.1 2003/12/09 18:49:30 guy Exp $
+ * $Id: packet-gsm_a.h,v 1.2 2004/05/09 10:03:37 guy Exp $
*
* Copyright 2003, Michael Lum <mlum [AT] telostech.com>,
* In association with Telos Technology Inc.
@@ -61,15 +61,17 @@ typedef struct _gsm_a_tap_rec_t {
/*
* the following allows TAP code access to the messages
- * without having to duplicate it
+ * without having to duplicate it. With MSVC and a
+ * libethereal.dll, we need a special declaration.
*/
-extern const value_string gsm_a_bssmap_msg_strings[];
-extern const value_string gsm_a_dtap_msg_mm_strings[];
-extern const value_string gsm_a_dtap_msg_rr_strings[];
-extern const value_string gsm_a_dtap_msg_cc_strings[];
-extern const value_string gsm_a_dtap_msg_gmm_strings[];
-extern const value_string gsm_a_dtap_msg_sms_strings[];
-extern const value_string gsm_a_dtap_msg_sm_strings[];
-extern const value_string gsm_a_dtap_msg_ss_strings[];
+ETH_VAR_IMPORT const value_string gsm_a_bssmap_msg_strings[];
+ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_mm_strings[];
+ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_rr_strings[];
+ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_cc_strings[];
+ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_gmm_strings[];
+ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_sms_strings[];
+ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_sm_strings[];
+ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_ss_strings[];
+ETH_VAR_IMPORT const gchar *gsm_a_pd_str[];
+
-extern const gchar *gsm_a_pd_str[];
diff --git a/packet-gsm_map.h b/packet-gsm_map.h
index c8c482ca26..7c7c90743c 100644
--- a/packet-gsm_map.h
+++ b/packet-gsm_map.h
@@ -1,6 +1,6 @@
/* packet-gsm_map.h
*
- * $Id: packet-gsm_map.h,v 1.2 2004/04/21 05:53:56 guy Exp $
+ * $Id: packet-gsm_map.h,v 1.3 2004/05/09 10:03:37 guy Exp $
*
* Copyright 2004, Michael Lum <mlum [AT] telostech.com>,
* In association with Telos Technology Inc.
@@ -36,6 +36,7 @@ typedef struct _gsm_map_tap_rec_t {
/*
* the following allows TAP code access to the operations
- * without having to duplicate it
+ * without having to duplicate it. With MSVC and a
+ * libethereal.dll, we need a special declaration.
*/
-extern const value_string gsm_map_opr_code_strings[];
+ETH_VAR_IMPORT const value_string gsm_map_opr_code_strings[];
diff --git a/packet-h225.h b/packet-h225.h
index 92df0707f6..c5ab623084 100644
--- a/packet-h225.h
+++ b/packet-h225.h
@@ -2,7 +2,7 @@
* Routines for H.225 packet dissection
* 2003 Tomas Kukosa
*
- * $Id: packet-h225.h,v 1.7 2004/03/04 07:07:00 guy Exp $
+ * $Id: packet-h225.h,v 1.8 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -49,21 +49,22 @@ typedef struct _h225_packet_info {
/*
* the following allows TAP code access to the messages
- * without having to duplicate it
+ * without having to duplicate it. With MSVC and a
+ * libethereal.dll, we need a special declaration.
*/
-extern const value_string RasMessage_vals[];
-extern const value_string h323_message_body_vals[];
-extern const value_string FacilityReason_vals[];
-extern const value_string GatekeeperRejectReason_vals[];
-extern const value_string UnregRequestReason_vals[];
-extern const value_string UnregRejectReason_vals[];
-extern const value_string BandRejectReason_vals[];
-extern const value_string DisengageReason_vals[];
-extern const value_string DisengageRejectReason_vals[];
-extern const value_string InfoRequestNakReason_vals[];
-extern const value_string ReleaseCompleteReason_vals[];
-extern const value_string AdmissionRejectReason_vals[];
-extern const value_string LocationRejectReason_vals[];
-extern const value_string RegistrationRejectReason_vals[];
+ETH_VAR_IMPORT const value_string RasMessage_vals[];
+ETH_VAR_IMPORT const value_string h323_message_body_vals[];
+ETH_VAR_IMPORT const value_string FacilityReason_vals[];
+ETH_VAR_IMPORT const value_string GatekeeperRejectReason_vals[];
+ETH_VAR_IMPORT const value_string UnregRequestReason_vals[];
+ETH_VAR_IMPORT const value_string UnregRejectReason_vals[];
+ETH_VAR_IMPORT const value_string BandRejectReason_vals[];
+ETH_VAR_IMPORT const value_string DisengageReason_vals[];
+ETH_VAR_IMPORT const value_string DisengageRejectReason_vals[];
+ETH_VAR_IMPORT const value_string InfoRequestNakReason_vals[];
+ETH_VAR_IMPORT const value_string ReleaseCompleteReason_vals[];
+ETH_VAR_IMPORT const value_string AdmissionRejectReason_vals[];
+ETH_VAR_IMPORT const value_string LocationRejectReason_vals[];
+ETH_VAR_IMPORT const value_string RegistrationRejectReason_vals[];
#endif /* __PACKET_H225_H__ */
diff --git a/packet-isup.h b/packet-isup.h
index 564b54c4bc..cc93ca5ff2 100644
--- a/packet-isup.h
+++ b/packet-isup.h
@@ -1,6 +1,6 @@
/* packet-isup.h
*
- * $Id: packet-isup.h,v 1.2 2004/04/21 05:53:56 guy Exp $
+ * $Id: packet-isup.h,v 1.3 2004/05/09 10:03:37 guy Exp $
*
* Copyright 2003, Michael Lum <mlum [AT] telostech.com>,
* In association with Telos Technology Inc.
@@ -33,7 +33,9 @@ typedef struct _isup_tap_rec_t {
/*
* the following allows TAP code access to the messages
- * without having to duplicate it
+ * without having to duplicate it. With MSVC and a
+ * libethereal.dll, we need a special declaration.
*/
-extern const value_string isup_message_type_value[];
-extern const value_string isup_message_type_value_acro[];
+ETH_VAR_IMPORT const value_string isup_message_type_value[];
+ETH_VAR_IMPORT const value_string isup_message_type_value_acro[];
+
diff --git a/packet-mtp3.h b/packet-mtp3.h
index e6b3bb58c0..7b5272c92a 100644
--- a/packet-mtp3.h
+++ b/packet-mtp3.h
@@ -1,6 +1,6 @@
/* packet-mtp3.h
*
- * $Id: packet-mtp3.h,v 1.5 2004/04/21 05:53:57 guy Exp $
+ * $Id: packet-mtp3.h,v 1.6 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -67,10 +67,11 @@ typedef struct _mtp3_tap_rec_t {
extern void mtp3_addr_to_str_buf(const guint8 *data, gchar *buf);
/*
- * the following allows TAP code access to the different SIs
- * without having to duplicate it
+ * the following allows TAP code access to the messages
+ * without having to duplicate it. With MSVC and a
+ * libethereal.dll, we need a special declaration.
*/
-extern const value_string mtp3_service_indicator_code_short_vals[];
+ETH_VAR_IMPORT const value_string mtp3_service_indicator_code_short_vals[];
/*
* I only want to gather stats for non-spare SI codes
diff --git a/packet-rpc.h b/packet-rpc.h
index 2a26246db7..706810d967 100644
--- a/packet-rpc.h
+++ b/packet-rpc.h
@@ -1,6 +1,6 @@
/* packet-rpc.h
*
- * $Id: packet-rpc.h,v 1.44 2003/11/16 23:17:21 guy Exp $
+ * $Id: packet-rpc.h,v 1.45 2004/05/09 10:03:37 guy Exp $
*
* (c) 1999 Uwe Girlich
*
@@ -170,7 +170,10 @@ typedef struct _rpc_prog_info_value {
GArray *procedure_hfs;
} rpc_prog_info_value;
-extern GHashTable *rpc_progs;
+/* rpc_progs is also used in tap. With MSVC and a
+ * libethereal.dll, we need a special declaration.
+ */
+ETH_VAR_IMPORT GHashTable *rpc_progs;
typedef struct _rpc_proc_info_key {
guint32 prog;
@@ -184,7 +187,10 @@ typedef struct _rpc_proc_info_value {
dissect_function_t *dissect_reply;
} rpc_proc_info_value;
-extern GHashTable *rpc_procs;
+/* rpc_procs is also used in tap. With MSVC and a
+ * libethereal.dll, we need a special declaration.
+ */
+ETH_VAR_IMPORT GHashTable *rpc_procs;
#endif /* packet-rpc.h */
diff --git a/packet-smb-sidsnooping.h b/packet-smb-sidsnooping.h
index 227998696a..ee633acbea 100644
--- a/packet-smb-sidsnooping.h
+++ b/packet-smb-sidsnooping.h
@@ -2,7 +2,7 @@
* Routines for snooping SID to name mappings
* Copyright 2003, Ronnie Sahlberg
*
- * $Id: packet-smb-sidsnooping.h,v 1.2 2003/06/09 10:08:05 sahlberg Exp $
+ * $Id: packet-smb-sidsnooping.h,v 1.3 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,7 +26,11 @@
#ifndef _PACKET_SMB_SID_SNOOPING_H_
#define _PACKET_SMB_SID_SNOOPING_H_
-extern GHashTable *sid_name_table;
+/* With MSVC and a libethereal.dll, we need a
+ * special declaration for sid_name_table.
+ */
+ETH_VAR_IMPORT GHashTable *sid_name_table;
+
typedef struct _sid_name {
char *sid;
char *name;
diff --git a/packet-wsp.h b/packet-wsp.h
index ca362c91ac..b66f684027 100644
--- a/packet-wsp.h
+++ b/packet-wsp.h
@@ -2,7 +2,7 @@
*
* Declarations for disassembly of WSP component of WAP traffic.
*
- * $Id: packet-wsp.h,v 1.10 2004/01/04 02:55:03 obiot Exp $
+ * $Id: packet-wsp.h,v 1.11 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -35,10 +35,13 @@
* assumed to be WSP */
extern const value_string vals_wsp_reason_codes[];
-/* These are exported to taps. */
-extern const value_string vals_pdu_type[];
-extern const value_string vals_status[];
-
+/*
+ * the following allows TAP code access to the messages
+ * without having to duplicate it. With MSVC and a
+ * libethereal.dll, we need a special declaration.
+ */
+ETH_VAR_IMPORT const value_string vals_pdu_type[];
+ETH_VAR_IMPORT const value_string vals_status[];
/*
* exported functionality
*/
diff --git a/plugins/mgcp/Makefile.nmake b/plugins/mgcp/Makefile.nmake
index def2123ad3..91a785222b 100644
--- a/plugins/mgcp/Makefile.nmake
+++ b/plugins/mgcp/Makefile.nmake
@@ -1,18 +1,33 @@
#
-# $Id: Makefile.nmake,v 1.9 2003/11/06 09:05:13 guy Exp $
+# $Id: Makefile.nmake,v 1.10 2004/05/09 10:03:41 guy Exp $
#
include ..\..\config.nmake
+# If you want this plugin to use libethereal.lib instead
+# of the standard plugin api, you have to comment out the next line
+#USE_LIBETHEREAL_LIB=YES
+
############### no need to modify below this line #########
CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../wiretap $(GLIB_CFLAGS) \
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
+!IFDEF ENABLE_LIBETHEREAL
+!IFDEF USE_LIBETHEREAL_LIB
+LINK_PLUGIN_WITH=..\..\epan\libethereal.lib
+CFLAGS=/DHAVE_WIN32_LIBETHEREAL_LIB $(CFLAGS)
+!ENDIF
+!ENDIF
+
+!IFNDEF LINK_PLUGIN_WITH
+LINK_PLUGIN_WITH=..\plugin_api.obj
+!ENDIF
+
OBJECTS=packet-mgcp.obj
-mgcp.dll mgcp.exp mgcp.lib : $(OBJECTS) ..\plugin_api.obj
- link -dll /out:mgcp.dll $(OBJECTS) ..\plugin_api.obj \
+mgcp.dll mgcp.exp mgcp.lib : $(OBJECTS) $(LINK_PLUGIN_WITH)
+ link -dll /out:mgcp.dll $(OBJECTS) $(LINK_PLUGIN_WITH) \
$(GLIB_LIBS)
clean:
diff --git a/plugins/mgcp/packet-mgcp.c b/plugins/mgcp/packet-mgcp.c
index 25f1e14eb9..79e022256c 100644
--- a/plugins/mgcp/packet-mgcp.c
+++ b/plugins/mgcp/packet-mgcp.c
@@ -2,7 +2,7 @@
* Routines for mgcp packet disassembly
* RFC 2705
*
- * $Id: packet-mgcp.c,v 1.43 2003/12/05 09:25:41 guy Exp $
+ * $Id: packet-mgcp.c,v 1.44 2004/05/09 10:03:41 guy Exp $
*
* Copyright (c) 2000 by Ed Warnicke <hagbard@physics.rutgers.edu>
*
@@ -29,7 +29,9 @@
#include "config.h"
#endif
+#ifndef HAVE_WIN32_LIBETHEREAL_LIB
#include "plugins/plugin_api.h"
+#endif
#include "moduleinfo.h"
@@ -45,8 +47,11 @@
#include <epan/strutil.h>
#include <epan/conversation.h>
#include "packet-mgcp.h"
+#include "../../tap.h"
+#ifndef HAVE_WIN32_LIBETHEREAL_LIB
#include "plugins/plugin_api_defs.h"
+#endif
#ifndef ENABLE_STATIC
G_MODULE_EXPORT const gchar version[] = VERSION;
@@ -1532,6 +1537,8 @@ plugin_reg_handoff(void){
proto_reg_handoff_mgcp();
}
+#ifndef HAVE_WIN32_LIBETHEREAL_LIB
+
G_MODULE_EXPORT void
plugin_init(plugin_address_table_t *pat
#ifndef PLUGINS_NEED_ADDRESS_TABLE
@@ -1540,6 +1547,11 @@ _U_
){
/* initialise the table of pointers needed in Win32 DLLs */
plugin_address_table_init(pat);
+
+#else /* HAVE_WIN32_LIBETHEREAL_LIB */
+G_MODULE_EXPORT void plugin_init(void *dummy _U_)
+{
+#endif
/* register the new protocol, protocol fields, and subtrees */
if (proto_mgcp == -1) { /* execute protocol initialization only once */
proto_register_mgcp();
diff --git a/prefs-int.h b/prefs-int.h
index 176d0e2b55..8e425bc85e 100644
--- a/prefs-int.h
+++ b/prefs-int.h
@@ -2,7 +2,7 @@
* Definitions for implementation of preference handling routines;
* used by "friends" of the preferences type.
*
- * $Id: prefs-int.h,v 1.11 2003/12/13 17:24:47 ulfl Exp $
+ * $Id: prefs-int.h,v 1.12 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -39,9 +39,10 @@ struct pref_module {
};
/*
- * Module used for protocol preferences.
+ * Module used for protocol preferences. With MSVC and a
+ * libethereal.dll, we need a special declaration.
*/
-extern module_t *protocols_module;
+ETH_VAR_IMPORT module_t *protocols_module;
/*
* PREF_OBSOLETE is used for preferences that a module used to support
diff --git a/prefs.h b/prefs.h
index f882b5c72b..7e788f0133 100644
--- a/prefs.h
+++ b/prefs.h
@@ -1,7 +1,7 @@
/* prefs.h
* Definitions for preference handling routines
*
- * $Id: prefs.h,v 1.60 2004/05/05 07:31:05 guy Exp $
+ * $Id: prefs.h,v 1.61 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -132,7 +132,7 @@ typedef struct _e_prefs {
gboolean capture_auto_scroll;
} e_prefs;
-extern e_prefs prefs;
+ETH_VAR_IMPORT e_prefs prefs;
/*
* Routines to let modules that have preference settings register
diff --git a/print.h b/print.h
index 25512c73de..51670c597a 100644
--- a/print.h
+++ b/print.h
@@ -1,7 +1,7 @@
/* print.h
* Definitions for printing packet analysis trees.
*
- * $Id: print.h,v 1.43 2004/04/25 12:04:07 ulfl Exp $
+ * $Id: print.h,v 1.44 2004/05/09 10:03:37 guy Exp $
*
* Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -72,15 +72,15 @@ typedef struct {
/* Functions in print.h */
-FILE *open_print_dest(int to_file, const char *dest);
-gboolean close_print_dest(int to_file, FILE *fh);
-void print_preamble(FILE *fh, print_format_e format, gchar *filename);
-void print_packet_header(FILE *fh, print_format_e format, guint32 number, gchar *summary);
-void print_formfeed(FILE *fh, print_format_e format);
-void print_finale(FILE *fh, print_format_e format);
-void proto_tree_print(print_args_t *print_args, epan_dissect_t *edt,
- FILE *fh);
-void print_hex_data(FILE *fh, print_format_e format, epan_dissect_t *edt);
-void print_line(FILE *fh, int indent, print_format_e format, char *line);
+extern FILE *open_print_dest(int to_file, const char *dest);
+extern gboolean close_print_dest(int to_file, FILE *fh);
+extern void print_preamble(FILE *fh, print_format_e format, gchar *filename);
+extern void print_packet_header(FILE *fh, print_format_e format, guint32 number, gchar *summary);
+extern void print_formfeed(FILE *fh, print_format_e format);
+extern void print_finale(FILE *fh, print_format_e format);
+extern void proto_tree_print(print_args_t *print_args, epan_dissect_t *edt,
+ FILE *fh);
+extern void print_hex_data(FILE *fh, print_format_e format, epan_dissect_t *edt);
+extern void print_line(FILE *fh, int indent, print_format_e format, char *line);
#endif /* print.h */
diff --git a/smb.h b/smb.h
index 8663fb5e43..6724974a31 100644
--- a/smb.h
+++ b/smb.h
@@ -2,7 +2,7 @@
* Defines for smb packet dissection
* Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
*
- * $Id: smb.h,v 1.54 2003/12/18 00:18:55 guy Exp $
+ * $Id: smb.h,v 1.55 2004/05/09 10:03:37 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -26,12 +26,15 @@
#ifndef _SMB_H
#define _SMB_H
-extern gboolean sid_name_snooping;
+ETH_VAR_IMPORT gboolean sid_name_snooping;
+
+/* SMB command codes, from the SNIA CIFS spec. With MSVC and a
+ * libethereal.dll, we need a special declaration.
+ */
+ETH_VAR_IMPORT const value_string smb_cmd_vals[];
+ETH_VAR_IMPORT const value_string trans2_cmd_vals[];
+ETH_VAR_IMPORT const value_string nt_cmd_vals[];
-/* SMB command codes, from the SNIA CIFS spec. */
-extern const value_string smb_cmd_vals[];
-extern const value_string trans2_cmd_vals[];
-extern const value_string nt_cmd_vals[];
#define SMB_COM_CREATE_DIRECTORY 0x00
#define SMB_COM_DELETE_DIRECTORY 0x01
diff --git a/tap-ansi_astat.c b/tap-ansi_astat.c
index 7091d6fd85..53eae264e7 100644
--- a/tap-ansi_astat.c
+++ b/tap-ansi_astat.c
@@ -3,7 +3,7 @@
* Copyright 2003, Michael Lum <mlum [AT] telostech.com>
* In association with Telos Technology Inc.
*
- * $Id: tap-ansi_astat.c,v 1.3 2003/12/09 18:49:30 guy Exp $
+ * $Id: tap-ansi_astat.c,v 1.4 2004/05/09 10:03:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,6 +28,10 @@
* This TAP provides statistics for the ANSI A Interface:
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/tap-gsm_astat.c b/tap-gsm_astat.c
index a19229acbc..33b6f91120 100644
--- a/tap-gsm_astat.c
+++ b/tap-gsm_astat.c
@@ -3,7 +3,7 @@
* Copyright 2003, Michael Lum <mlum [AT] telostech.com>
* In association with Telos Technology Inc.
*
- * $Id: tap-gsm_astat.c,v 1.1 2003/12/09 18:49:30 guy Exp $
+ * $Id: tap-gsm_astat.c,v 1.2 2004/05/09 10:03:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,6 +28,10 @@
* This TAP provides statistics for the GSM A Interface:
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/tap-h225counter.c b/tap-h225counter.c
index 294e2e1f41..400c9f3a64 100644
--- a/tap-h225counter.c
+++ b/tap-h225counter.c
@@ -2,7 +2,7 @@
* h225 message counter for ethereal
* Copyright 2003 Lars Roland
*
- * $Id: tap-h225counter.c,v 1.2 2003/12/15 04:23:54 guy Exp $
+ * $Id: tap-h225counter.c,v 1.3 2004/05/09 10:03:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -23,6 +23,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/tap-rpcstat.c b/tap-rpcstat.c
index 761a57d079..f523515221 100644
--- a/tap-rpcstat.c
+++ b/tap-rpcstat.c
@@ -1,7 +1,7 @@
/* tap-rpcstat.c
* rpcstat 2002 Ronnie Sahlberg
*
- * $Id: tap-rpcstat.c,v 1.11 2003/11/27 22:15:05 guy Exp $
+ * $Id: tap-rpcstat.c,v 1.12 2004/05/09 10:03:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -28,6 +28,10 @@
* It serves as an example on how to use the tap api.
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/tap-smbsids.c b/tap-smbsids.c
index 7a4dd61e5d..2923cb8a4e 100644
--- a/tap-smbsids.c
+++ b/tap-smbsids.c
@@ -1,7 +1,7 @@
/* tap-smbsids.c
* smbstat 2003 Ronnie Sahlberg
*
- * $Id: tap-smbsids.c,v 1.1 2003/06/09 10:08:40 sahlberg Exp $
+ * $Id: tap-smbsids.c,v 1.2 2004/05/09 10:03:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -22,6 +22,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/tap-smbstat.c b/tap-smbstat.c
index 6a383e61ae..1ed8ae2193 100644
--- a/tap-smbstat.c
+++ b/tap-smbstat.c
@@ -1,7 +1,7 @@
/* tap-smbstat.c
* smbstat 2003 Ronnie Sahlberg
*
- * $Id: tap-smbstat.c,v 1.5 2003/09/28 00:00:36 sahlberg Exp $
+ * $Id: tap-smbstat.c,v 1.6 2004/05/09 10:03:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -22,6 +22,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/tap-wspstat.c b/tap-wspstat.c
index a9ddfd38b7..7aff157f1c 100644
--- a/tap-wspstat.c
+++ b/tap-wspstat.c
@@ -1,7 +1,7 @@
/* tap-rpcstat.c
* wspstat 2003 Jean-Michel FAYARD
*
- * $Id: tap-wspstat.c,v 1.3 2003/12/10 22:27:41 obiot Exp $
+ * $Id: tap-wspstat.c,v 1.4 2004/05/09 10:03:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,6 +27,10 @@
*
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/tap.h b/tap.h
index aba541f47c..0d02da6ee3 100644
--- a/tap.h
+++ b/tap.h
@@ -1,7 +1,7 @@
/* tap.h
* packet tap interface 2002 Ronnie Sahlberg
*
- * $Id: tap.h,v 1.8 2003/04/23 08:20:02 guy Exp $
+ * $Id: tap.h,v 1.9 2004/05/09 10:03:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -27,7 +27,10 @@
#include "epan/epan.h"
-extern int num_tap_filters;
+/* With MSVC and a libethereal.dll, we need a
+ * special declaration of num_tap_filters.
+ */
+ETH_VAR_IMPORT int num_tap_filters;
typedef void (*tap_reset_cb)(void *tapdata);
typedef int (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, void *data);
diff --git a/tethereal.c b/tethereal.c
index ad7f625f9c..b7cf0ebe9f 100644
--- a/tethereal.c
+++ b/tethereal.c
@@ -1,6 +1,6 @@
/* tethereal.c
*
- * $Id: tethereal.c,v 1.238 2004/04/24 23:13:46 ulfl Exp $
+ * $Id: tethereal.c,v 1.239 2004/05/09 10:03:39 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -24,6 +24,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+/* With MSVC and a libethereal.dll this file needs to import some variables
+ in a special way. Therefore _NEED_VAR_IMPORT_ is defined. */
+#define _NEED_VAR_IMPORT_
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif