diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2011-08-30 14:17:40 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2011-08-30 14:17:40 +0000 |
commit | 71f903b956ff151f553b791bb43a52959a8be983 (patch) | |
tree | f39d52e05bd3785b6e26c6bda1d4d89f4f4e48cb | |
parent | ebb63d8a7f18802d4fd7aec469fddcd3afed1de0 (diff) | |
download | wireshark-71f903b956ff151f553b791bb43a52959a8be983.tar.gz wireshark-71f903b956ff151f553b791bb43a52959a8be983.tar.bz2 wireshark-71f903b956ff151f553b791bb43a52959a8be983.zip |
Revert r38800, as the crc routines contains some tvb functions.
svn path=/trunk/; revision=38803
56 files changed, 330 insertions, 102 deletions
diff --git a/configure.in b/configure.in index 417e120670..aa2bae3883 100644 --- a/configure.in +++ b/configure.in @@ -1988,6 +1988,7 @@ AC_OUTPUT( doc/Makefile docbook/Makefile epan/Makefile + epan/crc/Makefile epan/crypt/Makefile epan/doxygen.cfg epan/dfilter/Makefile diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 0e44a7131a..bbcad3ab23 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -39,6 +39,10 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/wspython ) +set(CRC_FILES + crc/crc-16-plain.c +) + set(CRYPT_FILES crypt/airpdcap.c crypt/airpdcap_ccmp.c @@ -1205,6 +1209,12 @@ set(LIBWIRESHARK_FILES column.c column-utils.c conversation.c + crc10.c + crc16.c + crc32.c + crc6.c + crc8.c + crcdrm.c dissector_filters.c emem.c epan.c diff --git a/epan/Makefile.am b/epan/Makefile.am index d624c49c01..a0a224b64e 100644 --- a/epan/Makefile.am +++ b/epan/Makefile.am @@ -46,7 +46,7 @@ wspython_dist_dir = wspython py_dissectors_dir = -DPYTHONDIR= endif -SUBDIRS = crypt ftypes dfilter dissectors $(wslua_dir) $(wspython_dir) +SUBDIRS = crc crypt ftypes dfilter dissectors $(wslua_dir) $(wspython_dir) DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir) $(wspython_dist_dir) @@ -133,7 +133,7 @@ MAINTAINERCLEANFILES = \ # libwireshark_la_LIBADD = \ libwireshark_generated.la \ - libwireshark_asmopt.la crypt/libairpdcap.la \ + libwireshark_asmopt.la crc/libcrc.la crypt/libairpdcap.la \ ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la \ dissectors/libdirtydissectors.la $(wslua_lib) $(wspython_lib) @SOCKET_LIBS@ @NSL_LIBS@ \ @C_ARES_LIBS@ @ADNS_LIBS@ @LIBGCRYPT_LIBS@ @LIBGNUTLS_LIBS@ \ @@ -143,7 +143,7 @@ libwireshark_la_LIBADD = \ libwireshark_la_DEPENDENCIES = \ libwireshark_generated.la \ - libwireshark_asmopt.la crypt/libairpdcap.la \ + libwireshark_asmopt.la crc/libcrc.la crypt/libairpdcap.la \ ftypes/libftypes.la dfilter/libdfilter.la dissectors/libdissectors.la \ dissectors/libdirtydissectors.la $(wslua_lib) $(wspython_lib) \ ${top_builddir}/wsutil/libwsutil.la \ diff --git a/epan/Makefile.common b/epan/Makefile.common index 38fa399ebd..63c35ad076 100644 --- a/epan/Makefile.common +++ b/epan/Makefile.common @@ -40,6 +40,12 @@ LIBWIRESHARK_SRC = \ column.c \ column-utils.c \ conversation.c \ + crc10.c \ + crc16.c \ + crc32.c \ + crc6.c \ + crc8.c \ + crcdrm.c \ dissector_filters.c \ emem.c \ epan.c \ @@ -144,6 +150,12 @@ LIBWIRESHARK_INCLUDES = \ column_info.h \ column-utils.h \ conversation.h \ + crc6.h \ + crc8.h \ + crc10.h \ + crc16.h \ + crc32.h \ + crcdrm.h \ diam_dict.h \ dissector_filters.h \ dtd.h \ diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake index 8d9cf96324..4efc7924cc 100644 --- a/epan/Makefile.nmake +++ b/epan/Makefile.nmake @@ -52,6 +52,7 @@ libwireshark_LIBS = \ $(GEOIP_LIBS) \ ..\wsutil\libwsutil.lib \ ..\wiretap\wiretap-$(WTAP_VERSION).lib \ + crc\crc.lib \ crypt\airpdcap.lib \ ftypes\ftypes.lib \ dfilter\dfilter.lib \ @@ -76,17 +77,17 @@ DOXYGEN_DEP=doxygen !ENDIF !IFDEF ENABLE_LIBWIRESHARK -all: crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors libwireshark.dll +all: crc crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors libwireshark.dll !ELSE -all: crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors libwireshark.lib +all: crc crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors libwireshark.lib !ENDIF # For use when making libwireshark.dll libwireshark.lib: libwireshark.dll libwireshark.exp: libwireshark.dll -libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ - crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib dissectors\dissectors.lib $(WSLUA_LIB) $(WSPYTHON_LIB) ..\image\libwireshark.res +libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def crc crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ + crc\crc.lib crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib dissectors\dissectors.lib $(WSLUA_LIB) $(WSPYTHON_LIB) ..\image\libwireshark.res @echo Linking libwireshark.dll $(link) $(dlllflags) $(conlibsdll) shell32.lib \ $(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \ @@ -96,8 +97,8 @@ libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def crypt fty dissectors\register.obj \ $(EXTRA_OBJECTS) -libwireshark.lib : ..\config.h $(LIBWIRESHARK_OBJECTS) crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ - crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib $(WSLUA_LIB) $(WSPYTHON_LIB) dissectors\dissectors.lib +libwireshark.lib : ..\config.h $(LIBWIRESHARK_OBJECTS) crc crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors $(DOXYGEN_DEP) $(EXTRA_OBJECTS) \ + crc\crc.lib crypt\airpdcap.lib ftypes\ftypes.lib dfilter\dfilter.lib $(WSLUA_LIB) $(WSPYTHON_LIB) dissectors\dissectors.lib link /lib /out:libwireshark.lib $(LIBWIRESHARK_OBJECTS) \ $(EXTRA_OBJECTS) @@ -114,6 +115,8 @@ clean-local: if exist html rm -rf html clean: clean-local + cd crc + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean cd ../crypt $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean cd ../ftypes @@ -146,6 +149,8 @@ distclean-local: clean-local dtd_grammar.out sminmpec.c distclean: distclean-local + cd crc + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean cd ../crypt $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean cd ../ftypes @@ -163,6 +168,8 @@ distclean: distclean-local maintainer-clean-local: distclean-local maintainer-clean: maintainer-clean-local + cd crc + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean cd ../crypt $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean cd ../ftypes @@ -177,6 +184,11 @@ maintainer-clean: maintainer-clean-local $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake maintainer-clean cd .. +crc:: ..\config.h + cd crc + $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake + cd .. + crypt:: ..\config.h cd crypt $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake diff --git a/epan/crc/Makefile.am b/epan/crc/Makefile.am new file mode 100644 index 0000000000..193beb92f9 --- /dev/null +++ b/epan/crc/Makefile.am @@ -0,0 +1,108 @@ +# Makefile.am +# Automake file for crc routines for Wireshark +# +# $Id$ +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +INCLUDES = -I$(top_srcdir) + +include Makefile.common + +if HAVE_WARNINGS_AS_ERRORS +AM_CFLAGS = -Werror +endif + +noinst_LTLIBRARIES = libcrc.la + +CLEANFILES = \ + libcrc.a \ + libcrc.la \ + *~ + +DISTCLEANFILES = + +MAINTAINERCLEANFILES = \ + Makefile.in + +libcrc_la_SOURCES = \ + $(CRC_SRC) \ + $(CRC_INCLUDES) + +EXTRA_DIST = \ + Makefile.common \ + Makefile.nmake + +checkapi: + $(PERL) ../../tools/checkAPIs.pl -g termoutput \ + $(CRC_SRC) +# Makefile.am +# Automake file for crc routines for Wireshark +# +# $Id$ +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +INCLUDES = -I$(top_srcdir) + +include Makefile.common + +if HAVE_WARNINGS_AS_ERRORS +AM_CFLAGS = -Werror +endif + +noinst_LTLIBRARIES = libcrc.la + +CLEANFILES = \ + libcrc.a \ + libcrc.la \ + *~ + +DISTCLEANFILES = + +MAINTAINERCLEANFILES = \ + Makefile.in + +libcrc_la_SOURCES = \ + $(CRC_SRC) \ + $(CRC_INCLUDES) + +EXTRA_DIST = \ + Makefile.common \ + Makefile.nmake + +checkapi: + $(PERL) ../../tools/checkAPIs.pl -g termoutput \ + $(CRC_SRC) diff --git a/epan/crc/Makefile.common b/epan/crc/Makefile.common new file mode 100644 index 0000000000..7c897b1245 --- /dev/null +++ b/epan/crc/Makefile.common @@ -0,0 +1,66 @@ +# Makefile.common +# Contains the stuff from Makefile.am and Makefile.nmake that is +# a) common to both files and +# b) portable between both files +# +# $Id$ +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# crc-16-plain.c: pycrc.py --model crc-16 --algorithm table-driven --symbol-prefix crc16_plain_ --crc-type guint16 --include-file glib.h --generate c -o crc-16-plain.c +# crc-16-plain.h: pycrc.py --model crc-16 --algorithm table-driven --symbol-prefix crc16_plain_ --crc-type guint16 --include-file glib.h --generate h -o crc-16-plain.h + +CRC_SRC = \ + crc-16-plain.c + +CRC_INCLUDES = \ + crc-16-plain.h +# Makefile.common +# Contains the stuff from Makefile.am and Makefile.nmake that is +# a) common to both files and +# b) portable between both files +# +# $Id$ +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +# crc-16-plain.c: pycrc.py --model crc-16 --algorithm table-driven --symbol-prefix crc16_plain_ --crc-type guint16 --include-file glib.h --generate c -o crc-16-plain.c +# crc-16-plain.h: pycrc.py --model crc-16 --algorithm table-driven --symbol-prefix crc16_plain_ --crc-type guint16 --include-file glib.h --generate h -o crc-16-plain.h + +CRC_SRC = \ + crc-16-plain.c + +CRC_INCLUDES = \ + crc-16-plain.h diff --git a/epan/crc/Makefile.nmake b/epan/crc/Makefile.nmake new file mode 100644 index 0000000000..5a9dbe6993 --- /dev/null +++ b/epan/crc/Makefile.nmake @@ -0,0 +1,62 @@ +## Makefile for building crc.lib with Microsoft C and nmake +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id$ + +include ..\..\config.nmake +include Makefile.common + +############### no need to modify below this line ######### + +CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ + /I../.. $(GLIB_CFLAGS) + +.c.obj:: + $(CC) $(CFLAGS) -Fd.\ -c $< + +CRC_OBJECTS = $(CRC_SRC:.c=.obj) + +crc.lib: $(CRC_OBJECTS) + link /lib /out:crc.lib $(CRC_OBJECTS) + +clean: + rm -f $(CRC_OBJECTS) crc.lib *.pdb + +distclean: clean + +maintainer-clean: distclean + +checkapi: + $(PERL) ../../tools/checkAPIs.pl -g termoutput \ + $(CRC_SRC) +## Makefile for building crc.lib with Microsoft C and nmake +## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake +# +# $Id$ + +include ..\..\config.nmake +include Makefile.common + +############### no need to modify below this line ######### + +CFLAGS=$(WARNINGS_ARE_ERRORS) $(STANDARD_CFLAGS) \ + /I../.. $(GLIB_CFLAGS) + +.c.obj:: + $(CC) $(CFLAGS) -Fd.\ -c $< + +CRC_OBJECTS = $(CRC_SRC:.c=.obj) + +crc.lib: $(CRC_OBJECTS) + link /lib /out:crc.lib $(CRC_OBJECTS) + +clean: + rm -f $(CRC_OBJECTS) crc.lib *.pdb + +distclean: clean + +maintainer-clean: distclean + +checkapi: + $(PERL) ../../tools/checkAPIs.pl -g termoutput \ + $(CRC_SRC) diff --git a/wsutil/crc16-plain.c b/epan/crc/crc-16-plain.c index 13e31a74a4..863f939d4a 100644 --- a/wsutil/crc16-plain.c +++ b/epan/crc/crc-16-plain.c @@ -1,5 +1,5 @@ /** - * \file crc16-plain.c + * \file crc-16-plain.c * Functions and types for CRC checks. * * Generated on Wed Mar 18 14:12:09 2009, @@ -18,7 +18,7 @@ * appears not to have it; we're using GLib types, instead. *****************************************************************************/ #include "glib.h" -#include "crc16-plain.h" +#include "crc-16-plain.h" #include <stdlib.h> /** diff --git a/wsutil/crc16-plain.h b/epan/crc/crc-16-plain.h index f6593562af..2ad0217066 100644 --- a/wsutil/crc16-plain.h +++ b/epan/crc/crc-16-plain.h @@ -1,5 +1,5 @@ /** - * \file crc16-plain.h + * \file crc-16-plain.h * Functions and types for CRC checks. * * Generated on Wed Mar 18 14:12:15 2009, diff --git a/wsutil/crc10.c b/epan/crc10.c index 77d5068624..77d5068624 100644 --- a/wsutil/crc10.c +++ b/epan/crc10.c diff --git a/wsutil/crc10.h b/epan/crc10.h index a0b5a0fa09..a0b5a0fa09 100644 --- a/wsutil/crc10.h +++ b/epan/crc10.h diff --git a/wsutil/crc16.c b/epan/crc16.c index fe18fead58..5fcd105dca 100644 --- a/wsutil/crc16.c +++ b/epan/crc16.c @@ -39,8 +39,8 @@ #include <glib.h> #include <epan/tvbuff.h> -#include <wsutil/crc16.h> -#include <wsutil/crc16-plain.h> +#include <epan/crc16.h> +#include <epan/crc/crc-16-plain.h> /*****************************************************************/ diff --git a/wsutil/crc16.h b/epan/crc16.h index 0fb0548dc4..0fb0548dc4 100644 --- a/wsutil/crc16.h +++ b/epan/crc16.h diff --git a/wsutil/crc32.c b/epan/crc32.c index 82de71481a..0fe2b29547 100644 --- a/wsutil/crc32.c +++ b/epan/crc32.c @@ -35,7 +35,7 @@ #include <glib.h> #include <epan/tvbuff.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> /*****************************************************************/ /* */ diff --git a/wsutil/crc32.h b/epan/crc32.h index 7bc63bdde4..7bc63bdde4 100644 --- a/wsutil/crc32.h +++ b/epan/crc32.h diff --git a/wsutil/crc6.c b/epan/crc6.c index 333a1a51cd..333a1a51cd 100644 --- a/wsutil/crc6.c +++ b/epan/crc6.c diff --git a/wsutil/crc6.h b/epan/crc6.h index c8abfb4ad4..c8abfb4ad4 100644 --- a/wsutil/crc6.h +++ b/epan/crc6.h diff --git a/wsutil/crc8.c b/epan/crc8.c index 92045420f2..630eda7f6c 100644 --- a/wsutil/crc8.c +++ b/epan/crc8.c @@ -38,7 +38,7 @@ #include <glib.h> #include <epan/tvbuff.h> -#include <wsutil/crc8.h> +#include <epan/crc8.h> /** * Reversed CRC table diff --git a/wsutil/crc8.h b/epan/crc8.h index d8268ba9ab..d8268ba9ab 100644 --- a/wsutil/crc8.h +++ b/epan/crc8.h diff --git a/wsutil/crcdrm.c b/epan/crcdrm.c index 345a232bb9..345a232bb9 100644 --- a/wsutil/crcdrm.c +++ b/epan/crcdrm.c diff --git a/wsutil/crcdrm.h b/epan/crcdrm.h index 195cee09d1..195cee09d1 100644 --- a/wsutil/crcdrm.h +++ b/epan/crcdrm.h diff --git a/epan/crypt/airpdcap.c b/epan/crypt/airpdcap.c index 1de4ade2a4..740a148c8b 100644 --- a/epan/crypt/airpdcap.c +++ b/epan/crypt/airpdcap.c @@ -41,7 +41,7 @@ #endif #include <epan/tvbuff.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/strutil.h> #include <epan/emem.h> #include <epan/pint.h> diff --git a/epan/crypt/airpdcap_wep.c b/epan/crypt/airpdcap_wep.c index 6007f115ba..45d02df7eb 100644 --- a/epan/crypt/airpdcap_wep.c +++ b/epan/crypt/airpdcap_wep.c @@ -41,7 +41,7 @@ /* File includes */ #include <epan/tvbuff.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include "airpdcap_system.h" #include "airpdcap_int.h" diff --git a/epan/dissectors/packet-assa_r3.c b/epan/dissectors/packet-assa_r3.c index 4921ef8070..0e5d379fa9 100644 --- a/epan/dissectors/packet-assa_r3.c +++ b/epan/dissectors/packet-assa_r3.c @@ -3213,7 +3213,7 @@ static mfgFieldDissectorParser_t r3upstreammfgfield_dissect [] = /* * *************************************************************************** * - * Cannot use wsutil/crc routines as ccitt-x25 uses a starting value of 0xffff + * Cannot use epan/crc routines as ccitt-x25 uses a starting value of 0xffff * and we use 0x0000 (legacy compatibility). If an override method to set * the starting value existed, these could be replaced. */ diff --git a/epan/dissectors/packet-dcp-etsi.c b/epan/dissectors/packet-dcp-etsi.c index d60836182b..32cef5d7f5 100644 --- a/epan/dissectors/packet-dcp-etsi.c +++ b/epan/dissectors/packet-dcp-etsi.c @@ -32,7 +32,7 @@ #include <epan/packet.h> #include <epan/reassemble.h> -#include <wsutil/crcdrm.h> +#include <epan/crcdrm.h> #include <epan/reedsolomon.h> #include <epan/emem.h> #include <string.h> diff --git a/epan/dissectors/packet-dmp.c b/epan/dissectors/packet-dmp.c index c6b8e7ed32..44586de447 100644 --- a/epan/dissectors/packet-dmp.c +++ b/epan/dissectors/packet-dmp.c @@ -50,7 +50,7 @@ #include <epan/prefs.h> #include <epan/emem.h> #include <epan/expert.h> -#include <wsutil/crc16.h> +#include <epan/crc16.h> #include <epan/asn1.h> #include <epan/strutil.h> #include <epan/uat.h> diff --git a/epan/dissectors/packet-eth.c b/epan/dissectors/packet-eth.c index 8f34f9449b..6c1c720767 100644 --- a/epan/dissectors/packet-eth.c +++ b/epan/dissectors/packet-eth.c @@ -38,7 +38,7 @@ #include "packet-llc.h" #include "packet-sll.h" #include "packet-usb.h" -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/tap.h> #include <epan/expert.h> diff --git a/epan/dissectors/packet-fc.c b/epan/dissectors/packet-fc.c index 6191117a8d..7aecad064d 100644 --- a/epan/dissectors/packet-fc.c +++ b/epan/dissectors/packet-fc.c @@ -53,7 +53,7 @@ #include "packet-fcbls.h" #include <epan/tap.h> #include <epan/emem.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/expert.h> #define FC_HEADER_SIZE 24 diff --git a/epan/dissectors/packet-fcoe.c b/epan/dissectors/packet-fcoe.c index cedf49790b..09094df5f6 100644 --- a/epan/dissectors/packet-fcoe.c +++ b/epan/dissectors/packet-fcoe.c @@ -40,7 +40,7 @@ #include <epan/packet.h> #include <epan/prefs.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/etypes.h> #include <epan/expert.h> diff --git a/epan/dissectors/packet-fcoib.c b/epan/dissectors/packet-fcoib.c index ffd7ae6a9d..c4c298d818 100644 --- a/epan/dissectors/packet-fcoib.c +++ b/epan/dissectors/packet-fcoib.c @@ -33,7 +33,7 @@ #include <stdlib.h> #include <epan/packet.h> #include <epan/prefs.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/etypes.h> #include <epan/expert.h> #include <errno.h> diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 56de89dfb2..dfa5331b64 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -116,7 +116,7 @@ #include <epan/etypes.h> #include <epan/greproto.h> #include <epan/oui.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/tap.h> #include <epan/emem.h> #include <epan/crypt/wep-wpadefs.h> diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c index bb04e04c0a..5c970fa6e4 100644 --- a/epan/dissectors/packet-ieee802154.c +++ b/epan/dissectors/packet-ieee802154.c @@ -75,7 +75,7 @@ #include <epan/emem.h> #include <epan/packet.h> -#include <wsutil/crc16.h> +#include <epan/crc16.h> #include <epan/expert.h> #include <epan/addr_resolv.h> #include <epan/prefs.h> diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c index 1bad474973..bbbdcf877a 100644 --- a/epan/dissectors/packet-iscsi.c +++ b/epan/dissectors/packet-iscsi.c @@ -49,7 +49,7 @@ #include <epan/nstime.h> #include <epan/emem.h> #include <epan/range.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> /* the absolute values of these constants don't matter as long as * latter revisions of the protocol are assigned a larger number */ diff --git a/epan/dissectors/packet-iuup.c b/epan/dissectors/packet-iuup.c index 20d2b92991..e9ae3a0755 100644 --- a/epan/dissectors/packet-iuup.c +++ b/epan/dissectors/packet-iuup.c @@ -40,8 +40,8 @@ #include <epan/prefs.h> #include <epan/emem.h> #include <epan/expert.h> -#include <wsutil/crc10.h> -#include <wsutil/crc6.h> +#include <epan/crc10.h> +#include <epan/crc6.h> typedef struct _iuup_rfci_t { diff --git a/epan/dissectors/packet-iwarp-mpa.c b/epan/dissectors/packet-iwarp-mpa.c index 62e4a81f8e..ec85288d90 100644 --- a/epan/dissectors/packet-iwarp-mpa.c +++ b/epan/dissectors/packet-iwarp-mpa.c @@ -36,7 +36,7 @@ #include <epan/conversation.h> #include <epan/dissectors/packet-tcp.h> #include <epan/expert.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> /* DEFINES */ diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c index df07cabd37..9453808d6f 100644 --- a/epan/dissectors/packet-lapd.c +++ b/epan/dissectors/packet-lapd.c @@ -46,7 +46,7 @@ #include <epan/packet.h> #include <epan/conversation.h> #include <epan/xdlc.h> -#include <wsutil/crc16.h> +#include <epan/crc16.h> #include <epan/prefs.h> #include <epan/lapd_sapi.h> diff --git a/epan/dissectors/packet-mtp2.c b/epan/dissectors/packet-mtp2.c index eff9502069..24c0519810 100644 --- a/epan/dissectors/packet-mtp2.c +++ b/epan/dissectors/packet-mtp2.c @@ -35,7 +35,7 @@ #include <glib.h> #include <epan/packet.h> #include <epan/prefs.h> -#include <wsutil/crc16.h> +#include <epan/crc16.h> #include <epan/expert.h> /* Initialize the protocol and registered fields */ diff --git a/epan/dissectors/packet-mux27010.c b/epan/dissectors/packet-mux27010.c index 9d2d9bd9b1..5e6c6b6eaa 100644 --- a/epan/dissectors/packet-mux27010.c +++ b/epan/dissectors/packet-mux27010.c @@ -30,7 +30,7 @@ #include <glib.h> #include <epan/packet.h> #include <epan/reassemble.h> -#include <wsutil/crc8.h> +#include <epan/crc8.h> #include <expert.h> #include <string.h> diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c index 14674ac551..a775228620 100644 --- a/epan/dissectors/packet-nfs.c +++ b/epan/dissectors/packet-nfs.c @@ -40,10 +40,10 @@ #include <epan/packet.h> #include <epan/emem.h> #include <epan/strutil.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/expert.h> -#include <wsutil/crc16.h> +#include <epan/crc16.h> #include <glib.h> #include <glib/gprintf.h> diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c index 0fa3783b69..8fcb676332 100644 --- a/epan/dissectors/packet-ntlmssp.c +++ b/epan/dissectors/packet-ntlmssp.c @@ -53,7 +53,7 @@ #include <epan/crypt/crypt-des.h> #include "packet-dcerpc.h" #include "packet-gssapi.h" -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include "packet-ntlmssp.h" diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c index b5760e9bb3..63145bb636 100644 --- a/epan/dissectors/packet-ppp.c +++ b/epan/dissectors/packet-ppp.c @@ -43,8 +43,8 @@ #include "packet-ipx.h" #include "packet-vines.h" #include <epan/nlpid.h> -#include <wsutil/crc16.h> -#include <wsutil/crc32.h> +#include <epan/crc16.h> +#include <epan/crc32.h> #include <epan/ipproto.h> #include "packet-usb.h" #include "packet-sll.h" diff --git a/epan/dissectors/packet-radiotap.c b/epan/dissectors/packet-radiotap.c index 86be04c18b..6a7f9e4cdb 100644 --- a/epan/dissectors/packet-radiotap.c +++ b/epan/dissectors/packet-radiotap.c @@ -33,7 +33,7 @@ #include <errno.h> #include <epan/packet.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/frequency-utils.h> #include <epan/tap.h> #include <epan/prefs.h> diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c index 081f5ea8c1..45bed6cadc 100644 --- a/epan/dissectors/packet-sctp.c +++ b/epan/dissectors/packet-sctp.c @@ -65,7 +65,7 @@ #include <epan/emem.h> #include <epan/expert.h> #include <packet-frame.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/adler32.h> #define LT(x, y) ((gint32)((x) - (y)) < 0) diff --git a/epan/dissectors/packet-srp.c b/epan/dissectors/packet-srp.c index a104e7b0b8..415a3057db 100644 --- a/epan/dissectors/packet-srp.c +++ b/epan/dissectors/packet-srp.c @@ -33,7 +33,7 @@ #include <epan/circuit.h> #include <epan/stream.h> /* #include <epan/reassemble.h> */ -#include <wsutil/crc16.h> +#include <epan/crc16.h> /* Wireshark ID of the protocols */ static int proto_srp = -1; diff --git a/epan/dissectors/packet-synphasor.c b/epan/dissectors/packet-synphasor.c index 5aebc8d37b..799b8ea80f 100644 --- a/epan/dissectors/packet-synphasor.c +++ b/epan/dissectors/packet-synphasor.c @@ -30,7 +30,7 @@ #include <glib.h> #include <epan/conversation.h> -#include <wsutil/crc16.h> +#include <epan/crc16.h> #include <epan/dissectors/packet-tcp.h> #include <epan/packet.h> #include <epan/prefs.h> diff --git a/epan/dissectors/packet-teamspeak2.c b/epan/dissectors/packet-teamspeak2.c index 0e931bdcff..8873becac4 100644 --- a/epan/dissectors/packet-teamspeak2.c +++ b/epan/dissectors/packet-teamspeak2.c @@ -29,7 +29,7 @@ #endif #include <epan/packet.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/reassemble.h> #include <epan/conversation.h> #include <stdlib.h> diff --git a/epan/dissectors/packet-zrtp.c b/epan/dissectors/packet-zrtp.c index 5ce53ceddb..b9d00d8771 100644 --- a/epan/dissectors/packet-zrtp.c +++ b/epan/dissectors/packet-zrtp.c @@ -34,7 +34,7 @@ #include <glib.h> #include <epan/packet.h> #include <epan/strutil.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include "packet-rtp.h" #include "packet-rtcp.h" diff --git a/epan/libwireshark.def b/epan/libwireshark.def index b3141d604b..afedf81c6a 100644 --- a/epan/libwireshark.def +++ b/epan/libwireshark.def @@ -112,6 +112,16 @@ convert_string_to_hex copy_file_binary_mode copy_persconffile_profile copy_prefs +crc16_ccitt_tvb +crc16_plain_tvb_offset +crc32c_calculate +crc32_ccitt +crc32_ccitt_seed +crc32_ccitt_tvb +crc32_ccitt_tvb_offset +crc32_ccitt_tvb_seed +crc32_ccitt_tvb_offset_seed +crc32_802_tvb create_dissector_handle create_persconffile_dir create_persconffile_profile diff --git a/epan/sigcomp-udvm.c b/epan/sigcomp-udvm.c index 6e87a4adfc..de28f7f6de 100644 --- a/epan/sigcomp-udvm.c +++ b/epan/sigcomp-udvm.c @@ -44,7 +44,7 @@ #include "sigcomp-udvm.h" #include "sigcomp_state_hdlr.h" #include "crypt/crypt-sha1.h" -#include "wsutil/crc16.h" +#include "crc16.h" #include "except.h" #define SIGCOMP_INSTR_DECOMPRESSION_FAILURE 0 diff --git a/gtk/text_import.c b/gtk/text_import.c index 69b67dd829..2fe6e34e44 100644 --- a/gtk/text_import.c +++ b/gtk/text_import.c @@ -124,7 +124,7 @@ #include <assert.h> #include <epan/tvbuff.h> -#include <wsutil/crc32.h> +#include <epan/crc32.h> #include <epan/in_cksum.h> #ifdef NEED_STRPTIME_H diff --git a/plugins/irda/packet-sir.c b/plugins/irda/packet-sir.c index 254f3b1c44..ad17b65771 100644 --- a/plugins/irda/packet-sir.c +++ b/plugins/irda/packet-sir.c @@ -29,7 +29,7 @@ #endif #include <epan/packet.h> -#include <wsutil/crc16.h> +#include <epan/crc16.h> /** Serial infrared port. */ #define TCP_PORT_SIR 6417 diff --git a/plugins/profinet/packet-pn-rt.c b/plugins/profinet/packet-pn-rt.c index e67fbd48c1..50b42a347d 100644 --- a/plugins/profinet/packet-pn-rt.c +++ b/plugins/profinet/packet-pn-rt.c @@ -43,7 +43,7 @@ #include <epan/etypes.h> #include <epan/expert.h> #include <epan/dissectors/packet-dcerpc.h> -#include <wsutil/crc16.h> +#include <epan/crc16.h> #include "packet-pn.h" diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt index 9501920acb..25eabb1d64 100644 --- a/wsutil/CMakeLists.txt +++ b/wsutil/CMakeLists.txt @@ -35,13 +35,6 @@ set(WSUTIL_FILES # @INET_PTON_LO@ # inet_pton.c # @STRNCASECMP_LO@ # strncasecmp.c # @STRPTIME_LO@ # strptime.c - crc10.c - crc16.c - crc16-plain.c - crc32.c - crc6.c - crc8.c - crcdrm.c mpeg-audio.c privileges.c str_util.c diff --git a/wsutil/Makefile.common b/wsutil/Makefile.common index 9f50c297bf..cbe90655ac 100644 --- a/wsutil/Makefile.common +++ b/wsutil/Makefile.common @@ -29,13 +29,6 @@ # generated from YACC or Lex files (as Automake doesn't want them in # _SOURCES variables). LIBWSUTIL_SRC = \ - crc10.c \ - crc16.c \ - crc16-plain.c \ - crc32.c \ - crc6.c \ - crc8.c \ - crcdrm.c \ mpeg-audio.c \ privileges.c \ str_util.c \ @@ -43,13 +36,6 @@ LIBWSUTIL_SRC = \ # Header files that are not generated from other files LIBWSUTIL_INCLUDES = \ - crc6.h \ - crc8.h \ - crc10.h \ - crc16.h \ - crc16-plain.h \ - crc32.h \ - crcdrm.h \ mpeg-audio.h \ privileges.h \ str_util.h \ diff --git a/wsutil/libwsutil.def b/wsutil/libwsutil.def index 09b9d00b6f..7aadd7e848 100644 --- a/wsutil/libwsutil.def +++ b/wsutil/libwsutil.def @@ -9,38 +9,6 @@ ; EXPORTS -; crc6.c -update_crc6_by_bytes - -; crc8.c -check_fcs - -; crc10.c -update_crc10_by_bytes - -; crc16.c -crc16_ccitt -crc16_ccitt_seed -crc16_ccitt_tvb -crc16_plain_tvb_offset -crc16_ccitt_tvb_offset -crc16_ccitt_tvb_offset_seed -crc16_ccitt_tvb_seed -crc16_x25_ccitt -crc16_x25_ccitt_tvb - -; crc32.c -crc32_802_tvb -crc32_ccitt -crc32_ccitt_seed -crc32_ccitt_table DATA -crc32_ccitt_tvb -crc32_ccitt_tvb_offset -crc32_ccitt_tvb_seed -crc32_ccitt_tvb_offset_seed -crc32c_calculate -crc32c_table DATA - ; file_util.c getenv_utf8 ws_stdio_fopen |