diff options
author | Richard van der Hoff <richardv@mxtelecom.com> | 2007-04-11 00:22:58 +0000 |
---|---|---|
committer | Richard van der Hoff <richardv@mxtelecom.com> | 2007-04-11 00:22:58 +0000 |
commit | d1f795d28e9d8abf0fe244524bcca5604b0a6103 (patch) | |
tree | be18eb1f8c2d69e54aaf4c2a9a1058228ee1a239 | |
parent | 161c7f8b8c9a2524a606c5e9dd1b854819285d55 (diff) |
right; this is going badly.
Let's take a different tack: include only the bare minimum, and set up stubs for everything else.
svn path=/trunk/; revision=21379
-rw-r--r-- | epan/Makefile.am | 8 | ||||
-rw-r--r-- | epan/Makefile.nmake | 22 | ||||
-rw-r--r-- | epan/reassemble_test.c | 58 |
3 files changed, 47 insertions, 41 deletions
diff --git a/epan/Makefile.am b/epan/Makefile.am index e79c5caf7b..efbf1c05b4 100644 --- a/epan/Makefile.am +++ b/epan/Makefile.am @@ -108,8 +108,12 @@ MAINTAINERCLEANFILES = \ libwireshark_la_LIBADD = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib) @ADNS_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @KRB5_LIBS@ @SNMP_LIBS@ @SSL_LIBS@ -lm libwireshark_la_DEPENDENCIES = @G_ASCII_STRTOULL_LO@ @INET_ATON_LO@ @INET_PTON_LO@ @INET_NTOP_LO@ crypt/libairpdcap.la ftypes/libftypes.la dfilter/libdfilter.la dissectors/libcleandissectors.la dissectors/libdissectors.la dissectors/libasndissectors.la dissectors/libpidldissectors.la $(wslua_lib) -EXTRA_PROGRAMS = reassemble_test -reassemble_test_LDADD = $(GLIB_LIBS) @LIBGCRYPT_LIBS@ libwireshark.la +#EXTRA_PROGRAMS = reassemble_test +#reassemble_test_LDADD = $(GLIB_LIBS) + +reassemble_test: reassemble_test.o tvbuff.o except.o strutil.o emem.o \ + reassemble.o + $(LINK) $^ $(GLIB_LIBS) -lz tvbtest: tvbtest.o tvbuff.o except.o strutil.o emem.o $(LINK) $^ $(GLIB_LIBS) -lz diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake index 1eed9bca17..ea34f346c8 100644 --- a/epan/Makefile.nmake +++ b/epan/Makefile.nmake @@ -192,21 +192,6 @@ exntest: exntest.exe reassemble_test: reassemble_test.exe tvbtest: tvbtest.exe -# don't really understand why we need all this extra guff - shouldn't -# they be in libwireshark.lib, otherwise how does tshark.exe link? -REASSEMBLE_TEST_LIBS=\ - $(NET_SNMP_LIBS) \ - dissectors\dissectors.lib \ - crypt\airpdcap.lib \ - dfilter\dfilter.lib \ - ftypes\ftypes.lib \ - $(ADNS_LIBS) \ - $(PCRE_LIBS) \ - $(ZLIB_LIBS) \ - $(GLIB_LIBS) \ - $(GNUTLS_LIBS) \ - $(WSLUA_LIB) \ - libwireshark.lib exntest.exe: exntest.obj except.obj @@ -219,11 +204,12 @@ tvbtest.exe: tvbtest.obj tvbuff.obj except.obj strutil.obj emem.obj $(LINK) /OUT:$@ $(LOCAL_LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console \ $(GLIB_LIBS) tvbtest.obj tvbuff.obj except.obj strutil.obj emem.obj -reassemble_test.exe: reassemble_test.obj $(REASSEMBLE_TEST_LIBS) +reassemble_test.exe: reassemble_test.obj tvbuff.o except.o strutil.o emem.o \ + reassemble.o @echo Linking $@ $(LINK) /OUT:$@ $(LOCAL_LDFLAGS) /LARGEADDRESSAWARE /SUBSYSTEM:console \ - wsock32.lib user32.lib \ - $(REASSEMBLE_TEST_LIBS) reassemble_test.obj + $(GLIB_LIBS) $(ZLIB_LIBS) reassemble_test.obj tvbuff.o except.o strutil.o emem.o \ + reassemble.o # (Windows only) Copy some sources from /trunk to /trunk/epan. # It is a cleaner to compile these sources seperately with this makefile than diff --git a/epan/reassemble_test.c b/epan/reassemble_test.c index 4433fc6c3f..e5e745f18d 100644 --- a/epan/reassemble_test.c +++ b/epan/reassemble_test.c @@ -1057,31 +1057,47 @@ int main(int argc, char **argv) } -/* the following are used by packet-mpeg-audio.c; define them here to avoid - * pulling in libwiretap. */ -const int mpa_versions[4]; -const int mpa_layers[4]; -const unsigned mpa_samples[3][3]; -const unsigned mpa_bitrates[3][3][16]; -const unsigned mpa_frequencies[3][4]; -const unsigned mpa_padding[3]; - -#include "wiretap/file_util.h" - -/* these are used by the wiretap file_util stuffs under win32 */ -int eth_stdio_stat (const gchar *filename _U_, struct stat *buf _U_) -{ return -1; } - -FILE *eth_stdio_fopen (const gchar *filename _U_, const gchar *mode _U_) +/* stubs */ +void add_new_data_source(packet_info *pinfo _U_, tvbuff_t *tvb _U_, + const char *name _U_) +{} + +proto_item * +proto_tree_add_uint(proto_tree *tree _U_, int hfindex _U_, tvbuff_t *tvb _U_, + gint start _U_, gint length _U_, guint32 value _U_) +{ return NULL; } + +void proto_item_append_text(proto_item *ti _U_, const char *format _U_, ...) +{} + +proto_item *proto_tree_add_uint_format(proto_tree *tree _U_, int hfindex _U_, + tvbuff_t *tvb _U_, gint start _U_, + gint length _U_, guint32 value _U_, + const char *format _U_, ...) +{ return NULL; } + +proto_tree* proto_item_add_subtree(proto_item *ti _U_, gint idx _U_) +{ return NULL; } + +proto_item *proto_tree_add_boolean(proto_tree *tree _U_, int hfindex _U_, + tvbuff_t *tvb _U_, gint start _U_, + gint length _U_, guint32 value _U_) +{ return NULL; } + +proto_item *proto_tree_add_item(proto_tree *tree _U_, int hfindex _U_, + tvbuff_t *tvb _U_, gint start _U_, + gint length _U_, gboolean little_endian _U_) +{ return NULL; } + +gint check_col(column_info *cinfo _U_, gint col _U_) { return 0; } -int eth_stdio_mkdir (const gchar *filename _U_, int mode _U_) -{ return -1; } +void col_add_fstr(column_info *cinfo _U_, gint col _U_, const gchar *format _U_, + ...) +{} -int eth_stdio_unlink (const gchar *filename _U_) -{ return -1; } + - |