From Lars Roland: add support for building a libethereal.dll with MSVC:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 9 May 2004 10:03:41 +0000 (10:03 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 9 May 2004 10:03:41 +0000 (10:03 +0000)
add a config.nmake option to control whether to build
libethereal.dll or not;

remove "./wiretap" from PATH to prevent problems due to
wrongly-loaded files;

build dissector.lib with MSVC;

move "print.c" and "ps.c" to the dissector helpers, as "print.c"
imports variables from packet-frame.c and packet-data.c, which
are in libethereal;

move "g711.c" out of the dissector helpers, as they're used only
by Ethereal in a tap, not in Tethereal or in any dissector;

add a .def file for libethereal;

arrange to declare global variables exported from libethereal
with "__declspec(dllimport)" when building programs that import
those variables;

update the NSIS installer.

Make the "configure" script define ETH_VAR_IMPORT as "extern".

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@10834 f5534014-38df-0310-8fa8-9805f1628bb7

51 files changed:
AUTHORS
Makefile.am
Makefile.common
Makefile.nmake
alert_box.c
capture.c
config.h.win32
config.nmake
configure.in
doc/Makefile.nmake
epan/Makefile.common
epan/Makefile.nmake
epan/dfilter/dfilter.h
epan/ftypes/ftypes.h
epan/libethereal.def [new file with mode: 0644]
epan/plugins.h
epan/proto.h
epan/resolv.h
file.c
follow.h
gtk/Makefile.nmake
gtk/follow_dlg.c
packaging/nsis/Makefile.nmake
packaging/nsis/ethereal.nsi
packet-ansi_a.h
packet-ansi_map.h
packet-dcerpc.h
packet-fc.h
packet-gsm_a.h
packet-gsm_map.h
packet-h225.h
packet-isup.h
packet-mtp3.h
packet-rpc.h
packet-smb-sidsnooping.h
packet-wsp.h
plugins/mgcp/Makefile.nmake
plugins/mgcp/packet-mgcp.c
prefs-int.h
prefs.h
print.h
smb.h
tap-ansi_astat.c
tap-gsm_astat.c
tap-h225counter.c
tap-rpcstat.c
tap-smbsids.c
tap-smbstat.c
tap-wspstat.c
tap.h
tethereal.c

diff --git a/AUTHORS b/AUTHORS
index bf21d616e7c68b95b7b74570c191f9e297a4f936..3cd8d013dab677ac04710c7ca4ecf3239b20802f 100644 (file)
--- 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
        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> {
 }
 
 Miha Jemec <m.jemec [AT] iskratel.si> {
index 1f50c03ce60818ca4fcb37e0b7f3f313e8a7b357..7962dc04d877ebcbd741dfa5b48bdea5fda2ae45 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile.am
 # Automake file for Ethereal
 #
 # 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>
 #
 # Ethereal - Network traffic analyzer
 # By Gerald Combs <gerald@ethereal.com>
@@ -427,6 +427,7 @@ EXTRA_DIST = \
        doc/tethereal.pod       \
        doc/text2pcap.pod       \
        editcap.c               \
        doc/tethereal.pod       \
        doc/text2pcap.pod       \
        editcap.c               \
+       epan/libethereal.def    \
        ethereal_be.py          \
        ethereal_gen.py         \
        getopt.c                \
        ethereal_be.py          \
        ethereal_gen.py         \
        getopt.c                \
index 4279572f3b12a9ba4fafd533c017b153fca883de..3ec952c380930830e44513ddd67450cf405fb932 100644 (file)
@@ -3,7 +3,7 @@
 #     a) common to both files and
 #     b) portable between both files
 #
 #     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>
 #
 # Ethereal - Network traffic analyzer
 # By Gerald Combs <gerald@ethereal.com>
@@ -223,7 +223,6 @@ DISSECTOR_SUPPORT_INCLUDES =        \
        etypes.h        \
        follow.h        \
        format-oid.h    \
        etypes.h        \
        follow.h        \
        format-oid.h    \
-       g711.h  \
        greproto.h      \
        h225-persistentdata.h   \
        in_cksum.h      \
        greproto.h      \
        h225-persistentdata.h   \
        in_cksum.h      \
@@ -236,6 +235,8 @@ DISSECTOR_SUPPORT_INCLUDES =        \
        ppptypes.h      \
        prefs-int.h     \
        prefs.h \
        ppptypes.h      \
        prefs-int.h     \
        prefs.h \
+       print.h \
+       ps.h    \
        ptvcursor.h     \
        reassemble.h    \
        req_resp_hdrs.h \
        ptvcursor.h     \
        reassemble.h    \
        req_resp_hdrs.h \
@@ -262,8 +263,6 @@ ETHEREAL_COMMON_SRC =       \
        conditions.c    \
        disabled_protos.c       \
        pcap-util.c     \
        conditions.c    \
        disabled_protos.c       \
        pcap-util.c     \
-       print.c \
-       ps.c    \
        range.c \
        ringbuffer.c    \
        timestats.c     \
        range.c \
        ringbuffer.c    \
        timestats.c     \
@@ -281,8 +280,6 @@ ETHEREAL_COMMON_INCLUDES =  \
        file.h  \
        pcap-util.h     \
        pcap-util-int.h \
        file.h  \
        pcap-util.h     \
        pcap-util-int.h \
-       print.h \
-       ps.h    \
        range.h \
        register.h      \
        ringbuffer.h    \
        range.h \
        register.h      \
        ringbuffer.h    \
@@ -334,6 +331,7 @@ ethereal_SOURCES =  \
        capture.c       \
        file.c  \
        filters.c       \
        capture.c       \
        file.c  \
        filters.c       \
+       g711.c \
        proto_hier_stats.c      \
        summary.c
 
        proto_hier_stats.c      \
        summary.c
 
@@ -342,6 +340,7 @@ ethereal_INCLUDES = \
        alert_box.h     \
        capture.h       \
        filters.h       \
        alert_box.h     \
        capture.h       \
        filters.h       \
+       g711.h  \
        globals.h       \
        menu.h  \
        progress_dlg.h  \
        globals.h       \
        menu.h  \
        progress_dlg.h  \
index 4f8c17bee72accb33af134495a74b71cb7b8ac4e..4dc7acbecdd653d7f9d1876aeae5bbac11e7f4ba 100644 (file)
@@ -1,7 +1,7 @@
 ## Makefile for building ethereal.exe with Microsoft C and nmake
 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
 #
 ## 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>
 
 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=)
 
 # 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)
 
 
 randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
 
@@ -57,24 +55,34 @@ EXTRA_OBJECTS = \
        strptime.obj
 
 ethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
        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 \
        epan\ethereal.lib \
        epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
-       wsock32.lib user32.lib \
        $(ADNS_LIBS) \
        $(PCRE_LIBS) \
        $(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 \
 #      $(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) \
        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) \
        $(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 \
 
 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)
 
        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 \
        wsock32.lib user32.lib \
-       wiretap\wiretap-$(WTAP_VERSION).lib \
        $(GLIB_LIBS) \
        $(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) \
        $(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 \
 
 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
 !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
        @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
 !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
 
        @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
        @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
 <<
 
                /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)
 <<
        $(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)
 <<
 
                /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)/" \
 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_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/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
+           -e "s/@HAVE_LIBETHEREALDLL@/$(LIBETHEREAL_CONFIG)/" \
            < config.h.win32 > $@
 
 ps.c   : rdps.exe print.ps
            < 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) \
 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 \
                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 ..
 
        $(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 ..
        cd epan
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..
index 3dca87a893132428b07e4252fe1cffd3d2a35d40..03cc03f555a1b6fec0e0a1699a727507c4000eb5 100644 (file)
@@ -2,7 +2,7 @@
  * Routines to put up various "standard" alert boxes used in multiple
  * places
  *
  * 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index 79caaadace93e73ceddf6333c23c949be3df3569..3689c66dcb884e64570954cc867e89c84d6df858 100644 (file)
--- a/capture.c
+++ b/capture.c
@@ -1,7 +1,7 @@
 /* capture.c
  * Routines for packet capture windows
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index eefdb9863e265440b5a67aa085e8a9d6022e624d..d84d9ccc312c246106c3969dd237d4bad2187fd6 100644 (file)
@@ -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.  */
 /* config.h.win32 Generated manually. :-) */
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
 @HAVE_LIBPCAP@
 @HAVE_PCAP_FINDALLDEVS@
 @WPCAP_CONSTIFIED@
 @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
 
 #define HAVE_NET_SNMP 1
 #define HAVE_SOME_SNMP 1
 /* Define to use the PCRE library */
 @HAVE_PCRE@
 
 /* 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
 #ifndef WIN32
 #define WIN32                  1
 #endif
index 60f1ecf46313f4780803f0835318d6cb472d54b0..afb47cd43127825ca60dd1f3cc6ad81522cb42a0 100644 (file)
@@ -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
 #
 
 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=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
 
 SH=bash
 PERL=perl
@@ -158,6 +158,9 @@ MAKENSIS="C:/program files/nsis/makensis.exe"
 #
 MAKENSIS_MODERN_UI=USE
 
 #
 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;
 #
 # 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
 
 PCRE_CONFIG=
 !ENDIF
 
+!IFDEF ENABLE_LIBETHEREAL
+LIBETHEREAL_CONFIG=^#define HAVE_LIBETHEREALDLL 1
+!ELSE
+LIBETHEREAL_CONFIG=
+!ENDIF
index 21362b3ecc5c3c5a00234b39de99d3f9e0a9b130..89ff0a454f50ed08169ee82ea7c78dcfa6b71bef 100644 (file)
@@ -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)
 
 #
 AC_INIT(etypes.h)
 
@@ -766,6 +766,12 @@ else
 fi
 AC_SUBST(ADNS_LIBS)
 
 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
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 # AC_C_CONST
 
index c21c42a2b68d8ada9e2e4cca19fdfb151f635e80..5cc030ee5db3e8d02d302e0cd5765fb5e0685ec7 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile.nmake
 # Nmake file for Ethereal documentation
 #
 # 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>
 #
 # 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)                     \
        $(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)                    \
 
 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 ..
 
 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
        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
        cd doc
 
 editcap.1: editcap.pod ../config.h
index 1999c234f829fcca4688b4a872fad64f34b9dace..dd4e17b8a66278bedf31185b53dd3d3498a271bd 100644 (file)
@@ -3,7 +3,7 @@
 #     a) common to both files and
 #     b) portable between both files
 #
 #     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>
 #
 # 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     \
        ../crypt-md5.c  \
        ../crypt-rc4.c  \
        ../follow.c     \
-       ../g711.c       \
        ../h225-persistentdata.c        \
        ../in_cksum.c   \
        ../ipproto.c    \
        ../packet-dcerpc-nt.c   \
        ../prefs.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      \
        ../ptvcursor.c  \
        ../reassemble.c \
        ../req_resp_hdrs.c      \
index 648dffa6026951861ece3db0818b90d593793151..a4052689494498381c54996e4f3b55dc09a82a37 100644 (file)
@@ -1,11 +1,13 @@
 ## Makefile for building ethereal.exe with Microsoft C and nmake
 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
 #
 ## 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 ..\config.nmake
+include <win32.mak>
 include Makefile.common
 
 include Makefile.common
 
+
 ############### no need to modify below this line #########
 
 CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap $(GLIB_CFLAGS) \
 ############### 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
 
 
 CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
 
-# For use when making ethereal.dll
+# For use when making libethereal.dll
 libethereal_LIBS = \
 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 $<
 
 .c.obj::
        $(CC) $(CVARSDLL) $(CFLAGS) -Fd.\ -c $<
@@ -50,12 +58,24 @@ OBJECTS=addr_and_mask.obj \
        tvbuff.obj       \
        value_string.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
 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)
 
 ethereal.lib   : ..\config.h $(OBJECTS)
        lib /out:ethereal.lib $(OBJECTS)
@@ -66,7 +86,7 @@ ethereal.lib  : ..\config.h $(OBJECTS)
        cd epan
 
 clean:
        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
        cd ftypes
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
        cd ../dfilter
index e6b5f3fd8ab7b1f4251daa8f7f07e1385d3d4690..764876223b4a48f7fcd1c0b9b9580e38a8edcb1e 100644 (file)
@@ -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>
  *
  * 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,
 
 
 /* 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
 
 /* Apply compiled dfilter */
 gboolean
index be23651f9f81f411723ebb484b3817139981dc73..01ba4e20f28751f0189e7e2e21f298848d9e1b2f 100644 (file)
@@ -1,7 +1,7 @@
 /* ftypes.h
  * Definitions for field types
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -226,8 +226,12 @@ void
 fvalue_init(fvalue_t *fv, ftenum_t ftype);
 
 
 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;             \
 #define FVALUE_CLEANUP(fv)                                     \
        {                                                       \
                register FvalueFreeFunc free_value;             \
diff --git a/epan/libethereal.def b/epan/libethereal.def
new file mode 100644 (file)
index 0000000..7576baa
--- /dev/null
@@ -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
+
+
+
index 1a3695153ab3473abba0d5666a48f37fae134109..362a4a7e2a6c72c697cdc79bc20b36e6e7cf3c12 100644 (file)
@@ -1,7 +1,7 @@
 /* plugins.h
  * definitions for plugins structures
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -39,7 +39,7 @@ typedef struct _plugin {
     struct _plugin *next;         /* forward link */
 } 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);
 
 void init_plugins(const char *);
 void register_all_plugin_handoffs(void);
index 9aeca9e9a781a40f9e0a04b63fca52003da8e761..4b3d5e966612b3156d8fc8278cd680b591193807 100644 (file)
@@ -1,7 +1,7 @@
 /* proto.h
  * Definitions for protocol display
  *
 /* 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>
  *
  * 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
 
 /* 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
 
 /* glib doesn't have g_ptr_array_len of all things!*/
 #ifndef g_ptr_array_len
index 323e5cc1ed1de307eabd709f922ef642e875f03e..1eef0da6fca474faff40aecb06474ade907b3978 100644 (file)
@@ -1,7 +1,7 @@
 /* resolv.h
  * Definitions for network object lookup
  *
 /* 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>
  *
  *
  * Laurent Deniel <laurent.deniel@free.fr>
  *
@@ -34,7 +34,7 @@
 /*
  * Flag controlling what names to resolve.
  */
 /*
  * 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
 
 /* 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 6143797aa4e844e13660b77faaec209c4e305aee..c95f602103aebe4c6909f65ceb17e936944089e7 100644 (file)
--- a/file.c
+++ b/file.c
@@ -1,7 +1,7 @@
 /* file.c
  * File I/O routines
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index 80b9290781c183e899f443e18532171820de6ccf..3510bb2d8c7b5acbb9285a8807d698a9e21ba573 100644 (file)
--- a/follow.h
+++ b/follow.h
@@ -1,6 +1,6 @@
 /* follow.h
  *
 /* 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>
  *
  *
  * Copyright 1998 Mike Hall <mlh@io.com>
  *
@@ -31,7 +31,8 @@
 
 #define MAX_IPADDR_LEN 16
 
 
 #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];
 
 typedef struct _tcp_stream_chunk {
   guint8      src_addr[MAX_IPADDR_LEN];
index 74467c65e3d7c3dc0bfd6e5c2cd2c506de1214e5..84c8c49086581718d59da0a8d21f9fd409fcab10 100644 (file)
@@ -1,7 +1,7 @@
 ## Makefile for building ethereal.exe with Microsoft C and nmake
 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
 #
 ## 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
 
 
 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$(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
 
 
 CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
 
index ebee4044f477affb02a78df8d5bfac40ff6d703f..33fd895bd40250bd9cfd382d6f5258a59c6f1d4b 100644 (file)
@@ -1,6 +1,6 @@
 /* follow_dlg.c
  *
 /* 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>
  *
  * 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);
 
 
 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"
 
 
 #define E_FOLLOW_INFO_KEY "follow_info_key"
 
index 28b74492f81ea72bd768d1ffc569274e7c16716f..7408c45f7b4fcac3d5905fb420bd5281a6f291ad 100644 (file)
@@ -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
 #
 # 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 "$(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
 !IFDEF GTK1_DIR
        /DGTK1_DIR=$(GTK1_DIR) \
 !ENDIF
index 2a89ea0a770944aa54998b05bd5c2e4ac5c095d3..003feaf98eb56c927665d755e80e4bcccf6a8e6d 100644 (file)
@@ -1,7 +1,7 @@
 ;
 ; ethereal.nsi
 ;
 ;
 ; 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
 
  
 !ifdef MAKENSIS_MODERN_UI
@@ -136,6 +136,9 @@ SetShellVarContext all
 
 SetOutPath $INSTDIR
 File "..\..\wiretap\wiretap-${WTAP_VERSION}.dll"
 
 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"
 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"
index 85cc483e9a240fe53bdce3ed2c4ba1004c0e9a4e..f3601f77e4d378c4872e5ac85ad2257c3fb3d4bf 100644 (file)
@@ -1,6 +1,6 @@
 /* packet-ansi_a.h
  *
 /* 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.
  *
  * 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
 
 /*
  * 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
 
 /*
  * allows ANSI MAP to use this for IS-880 enhancements
index 512ce7b2c69e85c16705fd8318e666a00528bfb7..6b3d1e5e806dabc0a37238fb14006a05d3b8a03d 100644 (file)
@@ -1,6 +1,6 @@
 /* packet-ansi_map.h
  *
 /* 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.
  *
  * 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
 
 /*
  * 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[];
+
index 702b59e03b8684113d57eb0ed35c8a74bab383ce..84e7d236cf4bc7805c4065e0d1f7d57a6ec2a802 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright 2001, Todd Sabin <tas@webspan.net>
  * Copyright 2003, Tim Potter <tpot@samba.org>
  *
  * 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -271,8 +271,10 @@ typedef struct _dcerpc_info {
 } 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;
 
 typedef struct _dcerpc_uuid_key {
     e_uuid_t uuid;
index fb17ba505ebe6a0f9d6236febbd80dd378a943cf..a542382e885ae4c552a914306a191b8538d97721 100644 (file)
@@ -2,7 +2,7 @@
  * Basic Fibre Channel Header definitions
  * Copyright 2002 Dinesh G Dutt (ddutt@cisco.com)
  *
  * 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #define FC_TYPE_AL             0x23
 #define FC_TYPE_SNMP           0x24
 
 #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: */
 
 /* DF_CTL bits */
 #define FC_DFCTL_DH         0x03   /* Device_Header type bits: */
index 201e186679ce1556c808250855547c40b5fdc0f4..1c44b5f9d99a19b75f7264807ab98c572152e11a 100644 (file)
@@ -1,6 +1,6 @@
 /* packet-gsm_a.h
  *
 /* 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.
  *
  * 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
 
 /*
  * 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[];
index c8c482ca261151e89bc8150ae35315989478741c..7c7c90743ca84531db1e7c4f7a5f3683cf1bcf56 100644 (file)
@@ -1,6 +1,6 @@
 /* packet-gsm_map.h
  *
 /* 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.
  *
  * 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
 
 /*
  * 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[];
index 92df0707f6f9b0905ad54d98bff803deda7f22d1..c5ab623084dd07cccfe223ad53987b897c5b6866 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for H.225 packet dissection
  * 2003  Tomas Kukosa
  *
  * 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>
  *
  * 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
 
 /*
  * 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__ */
 
 #endif  /* __PACKET_H225_H__ */
index 564b54c4bc532a48876348b12042c4ab56340e20..cc93ca5ff286c8580376fc72e8dc9cae5f6bf132 100644 (file)
@@ -1,6 +1,6 @@
 /* packet-isup.h
  *
 /* 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.
  *
  * 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
 
 /*
  * 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[];
+
index e6b3bb58c044529222e82fd5ffe1b95daac6d0c0..7b5272c92a7d5ac5fb9fd8a0ea963500f8fc8a4e 100644 (file)
@@ -1,6 +1,6 @@
 /* packet-mtp3.h
  *
 /* 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>
  *
  * 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);
 
 /*
 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
 
 /*
  * I only want to gather stats for non-spare SI codes
index 2a26246db76287c0e412fbec35cecda52992f723..706810d967914817075461f8400f506672fba111 100644 (file)
@@ -1,6 +1,6 @@
 /* packet-rpc.h
  *
 /* 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
  *
  *
  * (c) 1999 Uwe Girlich
  *
@@ -170,7 +170,10 @@ typedef struct _rpc_prog_info_value {
        GArray *procedure_hfs;
 } 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;
 
 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;
 
        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 */
 
 
 #endif /* packet-rpc.h */
 
index 227998696a00f324ca26d6c4f3d92c986a475bfc..ee633acbea3e8eaa0e68e929470d1ab8181f769e 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for snooping SID to name mappings
  * Copyright 2003, Ronnie Sahlberg
  *
  * 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #ifndef _PACKET_SMB_SID_SNOOPING_H_
 #define _PACKET_SMB_SID_SNOOPING_H_
 
 #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;
 typedef struct _sid_name {
        char *sid;
        char *name;
index ca362c91ac4fbbe68426f3a1590cdc944a9f415d..b66f6840276770a863301659a7fa56fde57a491a 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Declarations for disassembly of WSP component of WAP traffic.
  *
  *
  * 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * assumed to be WSP */
 extern const value_string vals_wsp_reason_codes[];
 
  * 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
  */
 /*
  * exported functionality
  */
index def2123ad3a6a58a888a742c8c10bbcb35c59c87..91a785222b4eea581c807c77ad5df2c8a98ed0f9 100644 (file)
@@ -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
 
 #
 
 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)
 
 ############### 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 
 
 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:
        $(GLIB_LIBS)
 
 clean:
index 25f1e14eb98b09f3eda257f0fd4d7e62ccfc4802..79e022256c8086f123cd17fb16797ef565e81c17 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for mgcp packet disassembly
  * RFC 2705
  *
  * 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>
  *
  *
  * Copyright (c) 2000 by Ed Warnicke <hagbard@physics.rutgers.edu>
  *
@@ -29,7 +29,9 @@
 #include "config.h"
 #endif
 
 #include "config.h"
 #endif
 
+#ifndef HAVE_WIN32_LIBETHEREAL_LIB
 #include "plugins/plugin_api.h"
 #include "plugins/plugin_api.h"
+#endif
 
 #include "moduleinfo.h"
 
 
 #include "moduleinfo.h"
 
 #include <epan/strutil.h>
 #include <epan/conversation.h>
 #include "packet-mgcp.h"
 #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"
 #include "plugins/plugin_api_defs.h"
+#endif
 
 #ifndef ENABLE_STATIC
 G_MODULE_EXPORT const gchar version[] = VERSION;
 
 #ifndef ENABLE_STATIC
 G_MODULE_EXPORT const gchar version[] = VERSION;
@@ -1532,6 +1537,8 @@ plugin_reg_handoff(void){
   proto_reg_handoff_mgcp();
 }
 
   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
 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);
 ){
   /* 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();
   /* register the new protocol, protocol fields, and subtrees */
   if (proto_mgcp == -1) { /* execute protocol initialization only once */
     proto_register_mgcp();
index 176d0e2b5578a32526d6c717b7360b162d9b59f9..8e425bc85e123ade558cb020654626568c6aa15f 100644 (file)
@@ -2,7 +2,7 @@
  * Definitions for implementation of preference handling routines;
  * used by "friends" of the preferences type.
  *
  * 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>
  *
  * 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
 
 /*
  * PREF_OBSOLETE is used for preferences that a module used to support
diff --git a/prefs.h b/prefs.h
index f882b5c72b14d55590d32fd076764b203f4e435d..7e788f013323e8ccc1be0e97e6e88c8fff851a6b 100644 (file)
--- a/prefs.h
+++ b/prefs.h
@@ -1,7 +1,7 @@
 /* prefs.h
  * Definitions for preference handling routines
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -132,7 +132,7 @@ typedef struct _e_prefs {
   gboolean capture_auto_scroll;
 } 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
 
 /*
  * Routines to let modules that have preference settings register
diff --git a/print.h b/print.h
index 25512c73de3522d41fbe2acd88e7f8b4dcde57c1..51670c597a67dc209fd60c26c09ea405efcb6006 100644 (file)
--- a/print.h
+++ b/print.h
@@ -1,7 +1,7 @@
 /* print.h
  * Definitions for printing packet analysis trees.
  *
 /* 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>
  *
  *
  * Gilbert Ramirez <gram@alumni.rice.edu>
  *
@@ -72,15 +72,15 @@ typedef struct {
 
 /* Functions in print.h */
 
 
 /* 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 */
 
 #endif /* print.h */
diff --git a/smb.h b/smb.h
index 8663fb5e434612721e70ac69a1395ee38c2e1c26..6724974a313aa47cfff1c13b46e3691350244cd1 100644 (file)
--- a/smb.h
+++ b/smb.h
@@ -2,7 +2,7 @@
  * Defines for smb packet dissection
  * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
  *
  * 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 #ifndef _SMB_H
 #define _SMB_H
 
 #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
 
 #define SMB_COM_CREATE_DIRECTORY               0x00
 #define SMB_COM_DELETE_DIRECTORY               0x01
index 7091d6fd85db16b02d3a1564964e3a92f40e3ad3..53eae264e7c3f7fab772baa1fa1882c8ee198cee 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
  * In association with Telos Technology Inc.
  *
  * 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * This TAP provides statistics for the ANSI A Interface:
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index a19229acbcf6e264f8647c322e620ae06a145a4f..33b6f91120016348bc79bc178148bff23b4217d0 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 2003, Michael Lum <mlum [AT] telostech.com>
  * In association with Telos Technology Inc.
  *
  * 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * This TAP provides statistics for the GSM A Interface:
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index 294e2e1f41dc06be51cd4ee909e49fd69fa51746..400c9f3a64d91cdb2bac5c081e01624006f80af0 100644 (file)
@@ -2,7 +2,7 @@
  * h225 message counter for ethereal
  * Copyright 2003 Lars Roland
  *
  * 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index 761a57d0790d61aa798969374e5cadad31065b85..f523515221ce9535c2c61c7fa8a6a1d7785a024a 100644 (file)
@@ -1,7 +1,7 @@
 /* tap-rpcstat.c
  * rpcstat   2002 Ronnie Sahlberg
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * It serves as an example on how to use the tap api.
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index 7a4dd61e5db012ab4d7a7e9f4ead5f3055004fca..2923cb8a4e366c78efddc02096b547a750726b42 100644 (file)
@@ -1,7 +1,7 @@
 /* tap-smbsids.c
  * smbstat   2003 Ronnie Sahlberg
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index 6a383e61aea42c628981b8441ed624ec0c6169a1..1ed8ae2193d051decdf7f084f6d8f31576b92cca 100644 (file)
@@ -1,7 +1,7 @@
 /* tap-smbstat.c
  * smbstat   2003 Ronnie Sahlberg
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
index a9ddfd38b73b546b94d4e3a64a0eec32cc7b4c8c..7aff157f1ce774caaeb5f41bc01f1e4e22475507 100644 (file)
@@ -1,7 +1,7 @@
 /* tap-rpcstat.c
  * wspstat   2003 Jean-Michel FAYARD
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  *
  */
 
  *
  */
 
+/* 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif
diff --git a/tap.h b/tap.h
index aba541f47c516f1e76c7a0cdf890c24aa138abd2..0d02da6ee32ddcafc33437065434a2841c67bdea 100644 (file)
--- a/tap.h
+++ b/tap.h
@@ -1,7 +1,7 @@
 /* tap.h
  * packet tap interface   2002 Ronnie Sahlberg
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
 
 #include "epan/epan.h"
 
 
 #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);
 
 typedef void (*tap_reset_cb)(void *tapdata);
 typedef int  (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, void *data);
index ad7f625f9c6fd8eb961624b90e9bc321a4351f44..b7cf0ebe9fe1252b605910b29c6ed6e58de3223a 100644 (file)
@@ -1,6 +1,6 @@
 /* tethereal.c
  *
 /* 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>
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
  * 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
 #ifdef HAVE_CONFIG_H
 # include "config.h"
 #endif