aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2011-08-30 13:46:42 +0000
committerStig Bjørlykke <stig@bjorlykke.org>2011-08-30 13:46:42 +0000
commit4132d40e50c576ae6cf9e03e4f552ea091035626 (patch)
tree4b1f8343011ca58ba5cd44782166f029cc7e3a8b
parentbb67b92a14c502e2c9841863dbbef869818f3e58 (diff)
Move all crc routines to libwsutil.
This way we can use the crc routines in wiretap. svn path=/trunk/; revision=38800
-rw-r--r--configure.in1
-rw-r--r--epan/CMakeLists.txt6
-rw-r--r--epan/Makefile.am6
-rw-r--r--epan/Makefile.common12
-rw-r--r--epan/Makefile.nmake24
-rw-r--r--epan/crc/Makefile.am54
-rw-r--r--epan/crc/Makefile.common33
-rw-r--r--epan/crc/Makefile.nmake31
-rw-r--r--epan/crypt/airpdcap.c2
-rw-r--r--epan/crypt/airpdcap_wep.c2
-rw-r--r--epan/dissectors/packet-assa_r3.c2
-rw-r--r--epan/dissectors/packet-dcp-etsi.c2
-rw-r--r--epan/dissectors/packet-dmp.c2
-rw-r--r--epan/dissectors/packet-eth.c2
-rw-r--r--epan/dissectors/packet-fc.c2
-rw-r--r--epan/dissectors/packet-fcoe.c2
-rw-r--r--epan/dissectors/packet-fcoib.c2
-rw-r--r--epan/dissectors/packet-ieee80211.c2
-rw-r--r--epan/dissectors/packet-ieee802154.c2
-rw-r--r--epan/dissectors/packet-iscsi.c2
-rw-r--r--epan/dissectors/packet-iuup.c4
-rw-r--r--epan/dissectors/packet-iwarp-mpa.c2
-rw-r--r--epan/dissectors/packet-lapd.c2
-rw-r--r--epan/dissectors/packet-mtp2.c2
-rw-r--r--epan/dissectors/packet-mux27010.c2
-rw-r--r--epan/dissectors/packet-nfs.c4
-rw-r--r--epan/dissectors/packet-ntlmssp.c2
-rw-r--r--epan/dissectors/packet-ppp.c4
-rw-r--r--epan/dissectors/packet-radiotap.c2
-rw-r--r--epan/dissectors/packet-sctp.c2
-rw-r--r--epan/dissectors/packet-srp.c2
-rw-r--r--epan/dissectors/packet-synphasor.c2
-rw-r--r--epan/dissectors/packet-teamspeak2.c2
-rw-r--r--epan/dissectors/packet-zrtp.c2
-rw-r--r--epan/libwireshark.def10
-rw-r--r--epan/sigcomp-udvm.c2
-rw-r--r--gtk/text_import.c2
-rw-r--r--plugins/irda/packet-sir.c2
-rw-r--r--plugins/profinet/packet-pn-rt.c2
-rw-r--r--wsutil/CMakeLists.txt7
-rw-r--r--wsutil/Makefile.common14
-rw-r--r--wsutil/crc10.c (renamed from epan/crc10.c)0
-rw-r--r--wsutil/crc10.h (renamed from epan/crc10.h)0
-rw-r--r--wsutil/crc16-plain.c (renamed from epan/crc/crc-16-plain.c)4
-rw-r--r--wsutil/crc16-plain.h (renamed from epan/crc/crc-16-plain.h)2
-rw-r--r--wsutil/crc16.c (renamed from epan/crc16.c)4
-rw-r--r--wsutil/crc16.h (renamed from epan/crc16.h)0
-rw-r--r--wsutil/crc32.c (renamed from epan/crc32.c)2
-rw-r--r--wsutil/crc32.h (renamed from epan/crc32.h)0
-rw-r--r--wsutil/crc6.c (renamed from epan/crc6.c)0
-rw-r--r--wsutil/crc6.h (renamed from epan/crc6.h)0
-rw-r--r--wsutil/crc8.c (renamed from epan/crc8.c)2
-rw-r--r--wsutil/crc8.h (renamed from epan/crc8.h)0
-rw-r--r--wsutil/crcdrm.c (renamed from epan/crcdrm.c)0
-rw-r--r--wsutil/crcdrm.h (renamed from epan/crcdrm.h)0
-rw-r--r--wsutil/libwsutil.def32
56 files changed, 102 insertions, 208 deletions
diff --git a/configure.in b/configure.in
index aa2bae3883..417e120670 100644
--- a/configure.in
+++ b/configure.in
@@ -1988,7 +1988,6 @@ 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 04fa50bd00..1b9ecc7528 100644
--- a/epan/CMakeLists.txt
+++ b/epan/CMakeLists.txt
@@ -1209,12 +1209,6 @@ 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 a0a224b64e..d624c49c01 100644
--- a/epan/Makefile.am
+++ b/epan/Makefile.am
@@ -46,7 +46,7 @@ wspython_dist_dir = wspython
py_dissectors_dir = -DPYTHONDIR=
endif
-SUBDIRS = crc crypt ftypes dfilter dissectors $(wslua_dir) $(wspython_dir)
+SUBDIRS = 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 crc/libcrc.la crypt/libairpdcap.la \
+ libwireshark_asmopt.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 crc/libcrc.la crypt/libairpdcap.la \
+ libwireshark_asmopt.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 63c35ad076..38fa399ebd 100644
--- a/epan/Makefile.common
+++ b/epan/Makefile.common
@@ -40,12 +40,6 @@ 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 \
@@ -150,12 +144,6 @@ 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 4efc7924cc..8d9cf96324 100644
--- a/epan/Makefile.nmake
+++ b/epan/Makefile.nmake
@@ -52,7 +52,6 @@ libwireshark_LIBS = \
$(GEOIP_LIBS) \
..\wsutil\libwsutil.lib \
..\wiretap\wiretap-$(WTAP_VERSION).lib \
- crc\crc.lib \
crypt\airpdcap.lib \
ftypes\ftypes.lib \
dfilter\dfilter.lib \
@@ -77,17 +76,17 @@ DOXYGEN_DEP=doxygen
!ENDIF
!IFDEF ENABLE_LIBWIRESHARK
-all: crc crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors libwireshark.dll
+all: crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors libwireshark.dll
!ELSE
-all: crc crypt ftypes dfilter $(WSLUA_DIR) $(WSPYTHON_DIR) dissectors libwireshark.lib
+all: 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 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
+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
@echo Linking libwireshark.dll
$(link) $(dlllflags) $(conlibsdll) shell32.lib \
$(LOCAL_LDFLAGS) $(DLL_LDFLAGS) \
@@ -97,8 +96,8 @@ libwireshark.dll: ..\config.h $(LIBWIRESHARK_OBJECTS) libwireshark.def crc crypt
dissectors\register.obj \
$(EXTRA_OBJECTS)
-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
+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
link /lib /out:libwireshark.lib $(LIBWIRESHARK_OBJECTS) \
$(EXTRA_OBJECTS)
@@ -115,8 +114,6 @@ 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
@@ -149,8 +146,6 @@ 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
@@ -168,8 +163,6 @@ 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
@@ -184,11 +177,6 @@ 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
deleted file mode 100644
index 28ad880193..0000000000
--- a/epan/crc/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-# 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
deleted file mode 100644
index 7aa9cb7512..0000000000
--- a/epan/crc/Makefile.common
+++ /dev/null
@@ -1,33 +0,0 @@
-# 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
deleted file mode 100644
index 9b336d8040..0000000000
--- a/epan/crc/Makefile.nmake
+++ /dev/null
@@ -1,31 +0,0 @@
-## 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/epan/crypt/airpdcap.c b/epan/crypt/airpdcap.c
index 740a148c8b..1de4ade2a4 100644
--- a/epan/crypt/airpdcap.c
+++ b/epan/crypt/airpdcap.c
@@ -41,7 +41,7 @@
#endif
#include <epan/tvbuff.h>
-#include <epan/crc32.h>
+#include <wsutil/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 45d02df7eb..6007f115ba 100644
--- a/epan/crypt/airpdcap_wep.c
+++ b/epan/crypt/airpdcap_wep.c
@@ -41,7 +41,7 @@
/* File includes */
#include <epan/tvbuff.h>
-#include <epan/crc32.h>
+#include <wsutil/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 0e5d379fa9..4921ef8070 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 epan/crc routines as ccitt-x25 uses a starting value of 0xffff
+ * Cannot use wsutil/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 32cef5d7f5..d60836182b 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 <epan/crcdrm.h>
+#include <wsutil/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 44586de447..c6b8e7ed32 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 <epan/crc16.h>
+#include <wsutil/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 6c1c720767..8f34f9449b 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 <epan/crc32.h>
+#include <wsutil/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 7aecad064d..6191117a8d 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 <epan/crc32.h>
+#include <wsutil/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 09094df5f6..cedf49790b 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 <epan/crc32.h>
+#include <wsutil/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 c4c298d818..ffd7ae6a9d 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 <epan/crc32.h>
+#include <wsutil/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 dfa5331b64..56de89dfb2 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 <epan/crc32.h>
+#include <wsutil/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 5c970fa6e4..bb04e04c0a 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 <epan/crc16.h>
+#include <wsutil/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 bbbdcf877a..1bad474973 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 <epan/crc32.h>
+#include <wsutil/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 e9ae3a0755..20d2b92991 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 <epan/crc10.h>
-#include <epan/crc6.h>
+#include <wsutil/crc10.h>
+#include <wsutil/crc6.h>
typedef struct _iuup_rfci_t {
diff --git a/epan/dissectors/packet-iwarp-mpa.c b/epan/dissectors/packet-iwarp-mpa.c
index ec85288d90..62e4a81f8e 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 <epan/crc32.h>
+#include <wsutil/crc32.h>
/* DEFINES */
diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c
index 9453808d6f..df07cabd37 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 <epan/crc16.h>
+#include <wsutil/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 24c0519810..eff9502069 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 <epan/crc16.h>
+#include <wsutil/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 5e6c6b6eaa..9d2d9bd9b1 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 <epan/crc8.h>
+#include <wsutil/crc8.h>
#include <expert.h>
#include <string.h>
diff --git a/epan/dissectors/packet-nfs.c b/epan/dissectors/packet-nfs.c
index a775228620..14674ac551 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 <epan/crc32.h>
+#include <wsutil/crc32.h>
#include <epan/expert.h>
-#include <epan/crc16.h>
+#include <wsutil/crc16.h>
#include <glib.h>
#include <glib/gprintf.h>
diff --git a/epan/dissectors/packet-ntlmssp.c b/epan/dissectors/packet-ntlmssp.c
index 8fcb676332..0fa3783b69 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 <epan/crc32.h>
+#include <wsutil/crc32.h>
#include "packet-ntlmssp.h"
diff --git a/epan/dissectors/packet-ppp.c b/epan/dissectors/packet-ppp.c
index 63145bb636..b5760e9bb3 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 <epan/crc16.h>
-#include <epan/crc32.h>
+#include <wsutil/crc16.h>
+#include <wsutil/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 6a7f9e4cdb..86be04c18b 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 <epan/crc32.h>
+#include <wsutil/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 45bed6cadc..081f5ea8c1 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 <epan/crc32.h>
+#include <wsutil/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 415a3057db..a104e7b0b8 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 <epan/crc16.h>
+#include <wsutil/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 799b8ea80f..5aebc8d37b 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 <epan/crc16.h>
+#include <wsutil/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 8873becac4..0e931bdcff 100644
--- a/epan/dissectors/packet-teamspeak2.c
+++ b/epan/dissectors/packet-teamspeak2.c
@@ -29,7 +29,7 @@
#endif
#include <epan/packet.h>
-#include <epan/crc32.h>
+#include <wsutil/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 b9d00d8771..5ce53ceddb 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 <epan/crc32.h>
+#include <wsutil/crc32.h>
#include "packet-rtp.h"
#include "packet-rtcp.h"
diff --git a/epan/libwireshark.def b/epan/libwireshark.def
index afedf81c6a..b3141d604b 100644
--- a/epan/libwireshark.def
+++ b/epan/libwireshark.def
@@ -112,16 +112,6 @@ 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 de28f7f6de..6e87a4adfc 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 "crc16.h"
+#include "wsutil/crc16.h"
#include "except.h"
#define SIGCOMP_INSTR_DECOMPRESSION_FAILURE 0
diff --git a/gtk/text_import.c b/gtk/text_import.c
index 2fe6e34e44..69b67dd829 100644
--- a/gtk/text_import.c
+++ b/gtk/text_import.c
@@ -124,7 +124,7 @@
#include <assert.h>
#include <epan/tvbuff.h>
-#include <epan/crc32.h>
+#include <wsutil/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 ad17b65771..254f3b1c44 100644
--- a/plugins/irda/packet-sir.c
+++ b/plugins/irda/packet-sir.c
@@ -29,7 +29,7 @@
#endif
#include <epan/packet.h>
-#include <epan/crc16.h>
+#include <wsutil/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 50b42a347d..e67fbd48c1 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 <epan/crc16.h>
+#include <wsutil/crc16.h>
#include "packet-pn.h"
diff --git a/wsutil/CMakeLists.txt b/wsutil/CMakeLists.txt
index 25eabb1d64..9501920acb 100644
--- a/wsutil/CMakeLists.txt
+++ b/wsutil/CMakeLists.txt
@@ -35,6 +35,13 @@ 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 cbe90655ac..9f50c297bf 100644
--- a/wsutil/Makefile.common
+++ b/wsutil/Makefile.common
@@ -29,6 +29,13 @@
# 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 \
@@ -36,6 +43,13 @@ 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/epan/crc10.c b/wsutil/crc10.c
index 77d5068624..77d5068624 100644
--- a/epan/crc10.c
+++ b/wsutil/crc10.c
diff --git a/epan/crc10.h b/wsutil/crc10.h
index a0b5a0fa09..a0b5a0fa09 100644
--- a/epan/crc10.h
+++ b/wsutil/crc10.h
diff --git a/epan/crc/crc-16-plain.c b/wsutil/crc16-plain.c
index 863f939d4a..13e31a74a4 100644
--- a/epan/crc/crc-16-plain.c
+++ b/wsutil/crc16-plain.c
@@ -1,5 +1,5 @@
/**
- * \file crc-16-plain.c
+ * \file crc16-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 "crc-16-plain.h"
+#include "crc16-plain.h"
#include <stdlib.h>
/**
diff --git a/epan/crc/crc-16-plain.h b/wsutil/crc16-plain.h
index 2ad0217066..f6593562af 100644
--- a/epan/crc/crc-16-plain.h
+++ b/wsutil/crc16-plain.h
@@ -1,5 +1,5 @@
/**
- * \file crc-16-plain.h
+ * \file crc16-plain.h
* Functions and types for CRC checks.
*
* Generated on Wed Mar 18 14:12:15 2009,
diff --git a/epan/crc16.c b/wsutil/crc16.c
index 5fcd105dca..fe18fead58 100644
--- a/epan/crc16.c
+++ b/wsutil/crc16.c
@@ -39,8 +39,8 @@
#include <glib.h>
#include <epan/tvbuff.h>
-#include <epan/crc16.h>
-#include <epan/crc/crc-16-plain.h>
+#include <wsutil/crc16.h>
+#include <wsutil/crc16-plain.h>
/*****************************************************************/
diff --git a/epan/crc16.h b/wsutil/crc16.h
index 0fb0548dc4..0fb0548dc4 100644
--- a/epan/crc16.h
+++ b/wsutil/crc16.h
diff --git a/epan/crc32.c b/wsutil/crc32.c
index 0fe2b29547..82de71481a 100644
--- a/epan/crc32.c
+++ b/wsutil/crc32.c
@@ -35,7 +35,7 @@
#include <glib.h>
#include <epan/tvbuff.h>
-#include <epan/crc32.h>
+#include <wsutil/crc32.h>
/*****************************************************************/
/* */
diff --git a/epan/crc32.h b/wsutil/crc32.h
index 7bc63bdde4..7bc63bdde4 100644
--- a/epan/crc32.h
+++ b/wsutil/crc32.h
diff --git a/epan/crc6.c b/wsutil/crc6.c
index 333a1a51cd..333a1a51cd 100644
--- a/epan/crc6.c
+++ b/wsutil/crc6.c
diff --git a/epan/crc6.h b/wsutil/crc6.h
index c8abfb4ad4..c8abfb4ad4 100644
--- a/epan/crc6.h
+++ b/wsutil/crc6.h
diff --git a/epan/crc8.c b/wsutil/crc8.c
index 630eda7f6c..92045420f2 100644
--- a/epan/crc8.c
+++ b/wsutil/crc8.c
@@ -38,7 +38,7 @@
#include <glib.h>
#include <epan/tvbuff.h>
-#include <epan/crc8.h>
+#include <wsutil/crc8.h>
/**
* Reversed CRC table
diff --git a/epan/crc8.h b/wsutil/crc8.h
index d8268ba9ab..d8268ba9ab 100644
--- a/epan/crc8.h
+++ b/wsutil/crc8.h
diff --git a/epan/crcdrm.c b/wsutil/crcdrm.c
index 345a232bb9..345a232bb9 100644
--- a/epan/crcdrm.c
+++ b/wsutil/crcdrm.c
diff --git a/epan/crcdrm.h b/wsutil/crcdrm.h
index 195cee09d1..195cee09d1 100644
--- a/epan/crcdrm.h
+++ b/wsutil/crcdrm.h
diff --git a/wsutil/libwsutil.def b/wsutil/libwsutil.def
index 7aadd7e848..09b9d00b6f 100644
--- a/wsutil/libwsutil.def
+++ b/wsutil/libwsutil.def
@@ -9,6 +9,38 @@
;
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