[Diameter] Add a couple of command codes from IANA.
[metze/wireshark/wip.git] / Makefile.am
index ed3aafd1cce9657aea990db9bfd2e6f4142e7d86..d771aeb33de8d0b9005a1a4b4398f63e38c2875e 100644 (file)
@@ -45,17 +45,17 @@ bin_PROGRAMS = \
        @dumpcap_bin@           \
        @reordercap_bin@        \
        @rawshark_bin@          \
-       @echld_test_bin@
+       @sharkd_bin@
 
 EXTRA_PROGRAMS = wireshark-gtk wireshark tshark tfshark capinfos captype \
        editcap mergecap dftest randpkt text2pcap dumpcap reordercap \
-       rawshark echld_test
+       rawshark sharkd
 
 #
 # Wireshark configuration files are put in $(pkgdatadir).
 #
 dist_pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
-       smi_modules ipmap.html pdml2html.xsl
+       smi_modules ipmap.html pdml2html.xsl enterprises.tsv
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = wireshark.pc
@@ -84,6 +84,8 @@ dist_diameter_DATA = $(_CUSTOM_diameter_xml_files_) \
        diameter/eap.xml \
        diameter/Ericsson.xml \
        diameter/etsie2e4.xml \
+       diameter/Inovar.xml \
+       diameter/Juniper.xml \
        diameter/mobileipv4.xml \
        diameter/mobileipv6.xml \
        diameter/nasreq.xml \
@@ -133,13 +135,13 @@ dist_radius_DATA = $(_CUSTOM_radius_dict_) \
        radius/dictionary.3gpp2 \
        radius/dictionary.acc \
        radius/dictionary.acme \
-       radius/dictionary.airespace \
        radius/dictionary.actelis \
        radius/dictionary.aerohive \
+       radius/dictionary.airespace \
        radius/dictionary.alcatel \
+       radius/dictionary.alcatel-lucent.aaa \
        radius/dictionary.alcatel.esam \
        radius/dictionary.alcatel.sr \
-       radius/dictionary.alcatel-lucent.aaa \
        radius/dictionary.alteon \
        radius/dictionary.altiga \
        radius/dictionary.alvarion \
@@ -154,16 +156,16 @@ dist_radius_DATA = $(_CUSTOM_radius_dict_) \
        radius/dictionary.avaya \
        radius/dictionary.azaire \
        radius/dictionary.bay \
-       radius/dictionary.bluecoat \
        radius/dictionary.bintec \
+       radius/dictionary.bluecoat \
+       radius/dictionary.bristol \
        radius/dictionary.broadsoft \
        radius/dictionary.brocade \
        radius/dictionary.bskyb \
-       radius/dictionary.bristol \
        radius/dictionary.bt \
-       radius/dictionary.camiant \
        radius/dictionary.cablelabs \
        radius/dictionary.cabletron \
+       radius/dictionary.camiant \
        radius/dictionary.chillispot \
        radius/dictionary.cisco \
        radius/dictionary.cisco.asa \
@@ -172,15 +174,17 @@ dist_radius_DATA = $(_CUSTOM_radius_dict_) \
        radius/dictionary.cisco.vpn5000 \
        radius/dictionary.citrix \
        radius/dictionary.clavister \
+       radius/dictionary.cnergee \
        radius/dictionary.colubris \
        radius/dictionary.columbia_university \
-       radius/dictionary.compatible \
        radius/dictionary.compat \
+       radius/dictionary.compatible \
        radius/dictionary.cosine \
        radius/dictionary.dante \
+       radius/dictionary.dellemc \
        radius/dictionary.dhcp \
-       radius/dictionary.dlink \
        radius/dictionary.digium \
+       radius/dictionary.dlink \
        radius/dictionary.dragonwave \
        radius/dictionary.efficientip \
        radius/dictionary.eltex \
@@ -189,7 +193,6 @@ dist_radius_DATA = $(_CUSTOM_radius_dict_) \
        radius/dictionary.ericsson \
        radius/dictionary.ericsson.ab \
        radius/dictionary.ericsson.packet.core.networks \
-       radius/dictionary.erx \
        radius/dictionary.extreme \
        radius/dictionary.f5 \
        radius/dictionary.fdxtended \
@@ -214,8 +217,8 @@ dist_radius_DATA = $(_CUSTOM_radius_dict_) \
        radius/dictionary.itk \
        radius/dictionary.jradius \
        radius/dictionary.juniper \
-       radius/dictionary.kineto \
        radius/dictionary.karlnet \
+       radius/dictionary.kineto \
        radius/dictionary.lancom \
        radius/dictionary.livingston \
        radius/dictionary.localweb \
@@ -224,6 +227,7 @@ dist_radius_DATA = $(_CUSTOM_radius_dict_) \
        radius/dictionary.meinberg \
        radius/dictionary.merit \
        radius/dictionary.meru \
+       radius/dictionary.microsemi \
        radius/dictionary.microsoft \
        radius/dictionary.mikrotik \
        radius/dictionary.motorola \
@@ -280,6 +284,7 @@ dist_radius_DATA = $(_CUSTOM_radius_dict_) \
        radius/dictionary.rfc7155 \
        radius/dictionary.rfc7268 \
        radius/dictionary.rfc7499 \
+       radius/dictionary.rfc7930 \
        radius/dictionary.riverbed \
        radius/dictionary.riverstone \
        radius/dictionary.roaringpenguin \
@@ -306,6 +311,7 @@ dist_radius_DATA = $(_CUSTOM_radius_dict_) \
        radius/dictionary.travelping \
        radius/dictionary.tropos \
        radius/dictionary.ukerna \
+       radius/dictionary.unisphere \
        radius/dictionary.unix \
        radius/dictionary.usr \
        radius/dictionary.utstarcom \
@@ -416,7 +422,6 @@ WIRESHARK_COMMON_SRC = \
        capture_opts.c          \
        file.c                  \
        fileset.c               \
-       filter_files.c          \
        summary.c               \
        ws_version_info.c
 
@@ -424,7 +429,6 @@ WIRESHARK_COMMON_SRC = \
 WIRESHARK_COMMON_INCLUDES = \
        capture_info.h          \
        capture_opts.h          \
-       filter_files.h          \
        globals.h               \
        log.h                   \
        summary.h               \
@@ -440,6 +444,14 @@ else
 EXTRALINKFLAGS = -export-dynamic
 endif
 
+EPAN_EXTRA_LIBS = \
+       @SSL_LIBS@                      \
+       @C_ARES_LIBS@                   \
+       @KRB5_LIBS@                     \
+       @LIBGCRYPT_LIBS@                \
+       @LIBGNUTLS_LIBS@                \
+       @LIBSMI_LDFLAGS@
+
 # Libraries and plugin flags with which to link wireshark.
 #
 # GTK_CFLAGS/GTK_LIBS is a strict superset of GLIB_CFLAGS/GLIB_LIBS
@@ -454,17 +466,12 @@ wireshark_common_ldadd = \
        wiretap/libwiretap.la           \
        epan/libwireshark.la            \
        wsutil/libwsutil.la             \
-       @SSL_LIBS@                      \
        $(plugin_ldadd)                 \
        @PCAP_LIBS@                     \
-       @C_ARES_LIBS@                   \
-       @KRB5_LIBS@                     \
        @APPLICATIONSERVICES_FRAMEWORKS@        \
        @SYSTEMCONFIGURATION_FRAMEWORKS@        \
        @COREFOUNDATION_FRAMEWORKS@     \
-       @LIBGCRYPT_LIBS@                \
-       @LIBGNUTLS_LIBS@                \
-       @LIBSMI_LDFLAGS@                \
+       $(EPAN_EXTRA_LIBS)                      \
        @LIBNL_LIBS@
 
 if HAVE_Qt
@@ -502,7 +509,6 @@ endif
 tshark_SOURCES = \
        $(SHARK_COMMON_SRC)     \
        capture_opts.c          \
-       filter_files.c          \
        tshark.c                \
        ws_version_info.c
 
@@ -519,17 +525,12 @@ tshark_LDADD = \
        wiretap/libwiretap.la           \
        epan/libwireshark.la            \
        wsutil/libwsutil.la             \
-       @SSL_LIBS@                      \
        $(plugin_ldadd)                 \
        @GLIB_LIBS@                     \
        @PCAP_LIBS@                     \
-       @C_ARES_LIBS@                   \
-       @KRB5_LIBS@                     \
+       ${EPAN_EXTRA_LIBS}      \
        @SYSTEMCONFIGURATION_FRAMEWORKS@        \
-       @COREFOUNDATION_FRAMEWORKS@     \
-       @LIBGCRYPT_LIBS@                \
-       @LIBGNUTLS_LIBS@                \
-       @LIBSMI_LDFLAGS@
+       @COREFOUNDATION_FRAMEWORKS@
 
 tfshark_SOURCES = \
        $(SHARK_COMMON_SRC)     \
@@ -547,15 +548,12 @@ tfshark_LDADD = \
        wiretap/libwiretap.la           \
        epan/libwireshark.la            \
        wsutil/libwsutil.la             \
-       @SSL_LIBS@                      \
        $(plugin_ldadd)                 \
        @GLIB_LIBS@                     \
        @PCAP_LIBS@                     \
-       @KRB5_LIBS@                     \
+       ${EPAN_EXTRA_LIBS}      \
        @SYSTEMCONFIGURATION_FRAMEWORKS@        \
-       @COREFOUNDATION_FRAMEWORKS@     \
-       @LIBGNUTLS_LIBS@                \
-       @LIBSMI_LDFLAGS@
+       @COREFOUNDATION_FRAMEWORKS@
 
 rawshark_SOURCES = \
        $(SHARK_COMMON_SRC)     \
@@ -573,17 +571,47 @@ rawshark_LDADD = \
        wiretap/libwiretap.la           \
        epan/libwireshark.la            \
        wsutil/libwsutil.la             \
-       @SSL_LIBS@                      \
        $(plugin_ldadd)                 \
        @GLIB_LIBS@                     \
        @PCAP_LIBS@                     \
-       @C_ARES_LIBS@                   \
-       @KRB5_LIBS@                     \
+       ${EPAN_EXTRA_LIBS}      \
        @SYSTEMCONFIGURATION_FRAMEWORKS@        \
-       @COREFOUNDATION_FRAMEWORKS@     \
-       @LIBGCRYPT_LIBS@                \
-       @LIBGNUTLS_LIBS@                \
-       @LIBSMI_LDFLAGS@
+       @COREFOUNDATION_FRAMEWORKS@
+
+sharkd_SOURCES = \
+       $(SHARK_COMMON_SRC)     \
+       sharkd.c                \
+       sharkd.h                \
+       sharkd_daemon.c         \
+       sharkd_session.c        \
+       ws_version_info.c
+
+sharkd_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
+
+if HAVE_SPEEXDSP
+sharkd_CPPFLAGS += $(SPEEXDSP_CFLAGS)
+endif
+
+sharkd_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
+
+# Libraries and plugin flags with which to link sharkd.
+sharkd_LDADD = \
+       ui/cli/libcliui.a               \
+       ui/libui.a                      \
+       codecs/libwscodecs.la           \
+       wiretap/libwiretap.la           \
+       epan/libwireshark.la            \
+       wsutil/libwsutil.la             \
+       $(plugin_ldadd)                 \
+       @GLIB_LIBS@                     \
+       @PCAP_LIBS@                     \
+       ${EPAN_EXTRA_LIBS}      \
+       @SYSTEMCONFIGURATION_FRAMEWORKS@        \
+       @COREFOUNDATION_FRAMEWORKS@
+
+if HAVE_SPEEXDSP
+sharkd_LDADD += $(SPEEXDSP_LIBS)
+endif
 
 text2pcap_SOURCES = \
        text2pcap.c             \
@@ -612,6 +640,7 @@ mergecap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
 
 # Libraries with which to link mergecap.
 mergecap_LDADD = \
+       ui/libui.a                      \
        wiretap/libwiretap.la           \
        wsutil/libwsutil.la             \
        @GLIB_LIBS@
@@ -624,6 +653,7 @@ capinfos_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
 
 # Libraries with which to link capinfos.
 capinfos_LDADD = \
+       ui/libui.a                      \
        wiretap/libwiretap.la           \
        wsutil/libwsutil.la             \
        @GLIB_LIBS@                     \
@@ -637,6 +667,7 @@ captype_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
 
 # Libraries with which to link captype.
 captype_LDADD = \
+       ui/libui.a                      \
        wiretap/libwiretap.la           \
        wsutil/libwsutil.la             \
        @GLIB_LIBS@
@@ -649,9 +680,11 @@ editcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
 
 # Libraries with which to link editcap.
 editcap_LDADD = \
+       ui/libui.a                      \
        wiretap/libwiretap.la           \
        wsutil/libwsutil.la             \
-       @GLIB_LIBS@
+       @GLIB_LIBS@                     \
+       @LIBGCRYPT_LIBS@
 
 reordercap_SOURCES = \
        reordercap.c    \
@@ -661,6 +694,7 @@ reordercap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
 
 # Libraries with which to link reordercap.
 reordercap_LDADD = \
+       ui/libui.a                      \
        wiretap/libwiretap.la           \
        wsutil/libwsutil.la             \
        @GLIB_LIBS@
@@ -674,6 +708,7 @@ randpkt_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
 # Libraries with which to link randpkt.
 randpkt_LDADD = \
        randpkt_core/librandpkt_core.a  \
+       ui/libui.a                      \
        wiretap/libwiretap.la           \
        wsutil/libwsutil.la             \
        @GLIB_LIBS@                     \
@@ -691,46 +726,16 @@ dftest_LDADD = \
        wiretap/libwiretap.la           \
        wsutil/libwsutil.la             \
        epan/libwireshark.la            \
-       @SSL_LIBS@                      \
        $(plugin_ldadd)                 \
        @GLIB_LIBS@                     \
        @PCAP_LIBS@                     \
-       @C_ARES_LIBS@                   \
-       @KRB5_LIBS@                     \
-       @LIBGCRYPT_LIBS@                \
-       @LIBGNUTLS_LIBS@                \
-       @LIBSMI_LDFLAGS@
-
-echld_test_SOURCES = \
-       echld_test.c                    \
-       capture_opts.c                  \
-       capture_stop_conditions.c       \
-       cfile.c                         \
-       conditions.c                    \
-       ringbuffer.c                    \
-       sync_pipe_write.c
-
-echld_test_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
-
-echld_test_LDADD = \
-       epan/libwireshark.la            \
-       echld/libechld.la               \
-       writecap/libwritecap.a          \
-       wsutil/libwsutil.la             \
-       @GLIB_LIBS@                     \
-       @PCAP_LIBS@                     \
-       @C_ARES_LIBS@
-
-echld_test_DEPENDENCIES = \
-       echld/libechld.la       \
-       epan/libwireshark.la
+       ${EPAN_EXTRA_LIBS}
 
 dumpcap_SOURCES = \
        capture_opts.c                  \
        capture_stop_conditions.c       \
        conditions.c                    \
        dumpcap.c                       \
-       filter_files.c                  \
        ringbuffer.c                    \
        sync_pipe_write.c               \
        ws_version_info.c
@@ -744,6 +749,7 @@ dumpcap_LDFLAGS = $(AM_LDFLAGS) $(PIE_LDFLAGS)
 # Libraries with which to link dumpcap.
 dumpcap_LDADD = \
        caputils/libcaputils.a          \
+       ui/libui.a                      \
        writecap/libwritecap.a          \
        wsutil/libwsutil.la             \
        @GLIB_LIBS@                     \
@@ -830,7 +836,6 @@ EXTRA_DIST = \
        README.hpux             \
        README.linux            \
        README.macos            \
-       README.tru64            \
        README.vmware           \
        README.windows          \
        abi-descriptor.template \
@@ -841,6 +846,7 @@ EXTRA_DIST = \
        dfilters                \
        doxygen_global.cfg      \
        doxygen.cfg.in          \
+       enterprises.tsv         \
        fix                     \
        idl                     \
        image                   \
@@ -892,7 +898,6 @@ DIST_SUBDIRS = \
        codecs          \
        doc             \
        epan            \
-       echld           \
        ui              \
        ui/cli          \
        ui/gtk          \
@@ -916,11 +921,11 @@ SUBDIRS = \
        epan                    \
        capchild                \
        caputils                \
-       @echld_dir@             \
        @plugins_dir@           \
        packaging               \
        help                    \
        ui                      \
+       codecs                  \
        @wireshark_SUBDIRS@     \
        ui/cli                  \
        randpkt_core            \
@@ -936,26 +941,6 @@ libtool: $(LIBTOOL_DEPS)
        $(SHELL) ./config.status --recheck
 
 
-# Used by patch-bzip2
-# Trim off any extra version information and find the previous micro release.
-BASE_VERSION=`echo "$(VERSION)" | awk -F. '{$$3 = $$3 + 0 ; printf("%d.%d.%d"), $$1, $$2, $$3}'`
-PREV_VERSION=`echo "$(VERSION)" | awk -F. '{$$3 = $$3 + 0 ; if ($$3 > 0) $$3-- ; printf("%d.%d.%d"), $$1, $$2, $$3}'`
-PREV_DIR="wireshark-$(PREV_VERSION)"
-PREV_FILE="$(PREV_DIR).tar.bz2"
-PREV_URL="https://www.wireshark.org/download/src/all-versions/$(PREV_FILE)"
-
-patch-bzip2: distdir
-       if test x$(BASE_VERSION) != x$(PREV_VERSION) ; then \
-               curl --time-cond $(PREV_FILE) --location --output $(PREV_FILE) $(PREV_URL) && \
-               tar -xjf $(PREV_FILE) && \
-               diff -urN $(PREV_DIR) $(distdir) | bzip2 > patch-wireshark-$(PREV_VERSION)-to-$(VERSION).bz2 && \
-               echo "Created patch-bzip2" ; \
-               rm -rf "$(PREV_FILE)" "$(PREV_DIR)" ; \
-       else \
-               echo "This appears to be the first micro version ($(PREV_VERSION)). Skipping." ; \
-       fi
-       $(am__remove_distdir)
-
 #
 # Install icons and other desktop files for (for use with GNOME, KDE, or
 # any other freedesktop.org-compliant desktops).
@@ -999,12 +984,12 @@ patch-bzip2: distdir
 # FreeBSD install command has a -T flag that takes an argument and
 # that has completely different semantics.
 #
-# We neither need nor want any of this on OS X, nor do we want it if
+# We neither need nor want any of this on macOS, nor do we want it if
 # we're not building Wireshark (that being the only desktop app).
 #
 install-data-local:
 if BUILDING_WIRESHARK
-if NOT_OS_X
+if NOT_MACOS
        mkdir -p $(DESTDIR)$(datadir)/mime/packages
        install -m 644 $(srcdir)/wireshark-mime-package.xml $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
        mkdir -p $(DESTDIR)$(datadir)/appdata
@@ -1029,7 +1014,7 @@ endif
 
 uninstall-local:
 if BUILDING_WIRESHARK
-if NOT_OS_X
+if NOT_MACOS
        rm -f $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
        rm -f $(DESTDIR)$(datadir)/applications/wireshark.desktop
        rm -f $(DESTDIR)$(datadir)/applications/wireshark-gtk.desktop
@@ -1070,12 +1055,12 @@ uninstall-hook: update-databases-and-caches-uninstall
 # We only need to run gtk-update-icon-cache if we're installing a GTK+
 # version of Wireshark.
 #
-# We neither need nor want any of this on OS X, nor do we want it if
+# We neither need nor want any of this on macOS, nor do we want it if
 # we're not building Wireshark (that being the only desktop app).
 #
 update-databases-and-caches-common:
 if BUILDING_WIRESHARK
-if NOT_OS_X
+if NOT_MACOS
        @echo "You may need to run \"ldconfig\" as root"
        @echo "You may need to run \"update-desktop-database $(datadir)/applications\""
        @echo "You may need to run \"update-mime-database $(datadir)/mime\""
@@ -1118,15 +1103,15 @@ rpm-package: dist
        @cd $(rpm_topdir) && \
          mkdir -p BUILD RPMS SOURCES SRPMS && \
          cd SOURCES && \
-         ln -sf ../../../$(distdir).tar.bz2 && \
+         ln -sf ../../../$(distdir).tar.xz && \
          cd .. && \
          $(RPMBUILD) --define "_topdir `cd . && pwd`" --define "_prefix $(prefix)" \
                @RPMBUILD_WITH_ARGS@ --clean -ba SPECS/wireshark.spec && \
          echo "Package successfully built in `pwd`/RPMS." ; \
-         rm -f SOURCES/$(distdir).tar.bz2 ../../$(distdir).tar.bz2
+         rm -f SOURCES/$(distdir).tar.xz ../../$(distdir).tar.xz
 else
 rpm-package:
-       @echo "RPM executable not available." ; \
+       @echo "'rpmbuild' executable not available." ; \
          false
 endif
 
@@ -1143,7 +1128,7 @@ osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
                        --extcap-path ../staging/$(PACKAGE).inst$(extcapdir) \
                        --library-path ../staging/$(PACKAGE).inst$(libdir) ; \
        else \
-               echo "Error: OS X packaging tools not found." ; \
+               echo "Error: macOS packaging tools not found." ; \
                echo "Package build abandoned." ; \
        fi
 
@@ -1202,6 +1187,22 @@ checkapi: checkapi_local
        cd writecap && $(MAKE) checkapi
        cd wsutil && $(MAKE) checkapi
 
+if HAVE_SHELLCHECK
+# --external-sources requires 0.4.0 or later.
+shellcheck:
+       cd $(top_srcdir) && \
+       shellcheck --external-sources \
+         tools/fuzz-test.sh \
+         tools/randpkt-test.sh \
+         tools/runa2x.sh \
+         tools/test-captures.sh \
+         tools/valgrind-wireshark.sh
+else
+shellcheck:
+       @echo "Shellcheck not available." ; \
+         false
+endif
+
 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
 if HAVE_DOXYGEN
        rm -rf wsar_html
@@ -1222,3 +1223,7 @@ endif
 # Update AUTHORS file with entries from git shortlog
 gen-authors:
        cd $(top_srcdir) && $(PERL) tools/generate_authors.pl AUTHORS.src > AUTHORS
+
+dist-hook:
+       printf "git_description=%s\n" "$$(git -C $(top_srcdir) describe --match 'v[1-9]*')" \
+               > $(top_distdir)/version.conf