Add LibXml2 to the required library list
Library is supported by all OS, and we effectivly already require the library due to GLIB, libgcrypt, and GnuTLS also require LibXml2. Ping #20508
This commit is contained in:
parent
728b1d0ead
commit
812f277d0e
1
.github/workflows/options.yml
vendored
1
.github/workflows/options.yml
vendored
@ -28,7 +28,6 @@ jobs:
|
|||||||
-DENABLE_CHECKHF_CONFLICT=ON
|
-DENABLE_CHECKHF_CONFLICT=ON
|
||||||
-DENABLE_GNUTLS=OFF
|
-DENABLE_GNUTLS=OFF
|
||||||
-DENABLE_KERBEROS=OFF
|
-DENABLE_KERBEROS=OFF
|
||||||
-DENABLE_LIBXML2=OFF
|
|
||||||
-DENABLE_ILBC=OFF
|
-DENABLE_ILBC=OFF
|
||||||
-DENABLE_LUA=OFF
|
-DENABLE_LUA=OFF
|
||||||
-DENABLE_LZ4=OFF
|
-DENABLE_LZ4=OFF
|
||||||
|
@ -963,7 +963,7 @@ No options:
|
|||||||
script: |
|
script: |
|
||||||
cmake -GNinja -DENABLE_CCACHE=ON \
|
cmake -GNinja -DENABLE_CCACHE=ON \
|
||||||
-DENABLE_BROTLI=OFF -DENABLE_CAP=OFF -DENABLE_CHECKHF_CONFLICT=ON -DENABLE_GNUTLS=OFF \
|
-DENABLE_BROTLI=OFF -DENABLE_CAP=OFF -DENABLE_CHECKHF_CONFLICT=ON -DENABLE_GNUTLS=OFF \
|
||||||
-DENABLE_KERBEROS=OFF -DENABLE_LIBXML2=OFF -DENABLE_ILBC=OFF -DENABLE_LUA=OFF -DENABLE_LZ4=OFF \
|
-DENABLE_KERBEROS=OFF -DENABLE_ILBC=OFF -DENABLE_LUA=OFF -DENABLE_LZ4=OFF \
|
||||||
-DENABLE_MINIZIP=OFF -DENABLE_NETLINK=OFF -DENABLE_NGHTTP2=OFF -DENABLE_NGHTTP3=OFF \
|
-DENABLE_MINIZIP=OFF -DENABLE_NETLINK=OFF -DENABLE_NGHTTP2=OFF -DENABLE_NGHTTP3=OFF \
|
||||||
-DENABLE_BCG729=OFF -DENABLE_OPUS=OFF -DENABLE_PCAP=OFF -DENABLE_PLUGIN_IFDEMO=ON \
|
-DENABLE_BCG729=OFF -DENABLE_OPUS=OFF -DENABLE_PCAP=OFF -DENABLE_PLUGIN_IFDEMO=ON \
|
||||||
-DENABLE_PLUGINS=OFF -DENABLE_SBC=OFF -DENABLE_SMI=OFF -DENABLE_SNAPPY=OFF -DENABLE_SPANDSP=OFF \
|
-DENABLE_PLUGINS=OFF -DENABLE_SBC=OFF -DENABLE_SMI=OFF -DENABLE_SNAPPY=OFF -DENABLE_SPANDSP=OFF \
|
||||||
|
@ -1349,6 +1349,8 @@ endif ()
|
|||||||
find_package(LEX REQUIRED)
|
find_package(LEX REQUIRED)
|
||||||
reset_find_package(PCRE2 PCRE2_DEBUG_LIBRARY)
|
reset_find_package(PCRE2 PCRE2_DEBUG_LIBRARY)
|
||||||
find_package(PCRE2 REQUIRED)
|
find_package(PCRE2 REQUIRED)
|
||||||
|
reset_find_package(LibXml2)
|
||||||
|
find_package(LibXml2 "2.9.7" REQUIRED)
|
||||||
|
|
||||||
if (NOT WIN32)
|
if (NOT WIN32)
|
||||||
find_package(Gettext)
|
find_package(Gettext)
|
||||||
@ -1568,24 +1570,6 @@ if (BUILD_stratoshark)
|
|||||||
ws_find_package(Sinsp ENABLE_SINSP HAVE_SINSP "0.17.1")
|
ws_find_package(Sinsp ENABLE_SINSP HAVE_SINSP "0.17.1")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# CMake 3.9 and below used 'LIBXML2_LIBRARIES' as the name of the cache entry
|
|
||||||
# storing the find_library result. Transfer it to the new cache variable such
|
|
||||||
# that reset_find_package can detect and clear outdated cache variables.
|
|
||||||
if(DEFINED LIBXML2_LIBRARIES AND NOT DEFINED LIBXML2_LIBRARY)
|
|
||||||
set(LIBXML2_LIBRARY ${LIBXML2_LIBRARIES} CACHE FILEPATH "")
|
|
||||||
endif()
|
|
||||||
# Call reset_find_package explicitly since variables are in upper case.
|
|
||||||
reset_find_package(LIBXML2)
|
|
||||||
ws_find_package(LibXml2 ENABLE_LIBXML2 HAVE_LIBXML2)
|
|
||||||
if(NOT LIBXML2_FOUND)
|
|
||||||
# CMake 3.9 and below used LIBXML2_LIBRARIES as the name of
|
|
||||||
# the cache entry storing the find_library result.
|
|
||||||
# Current CMake (3.13) and below sets LIBXML2_LIBRARIES and LIBXML2_INCLUDE_DIRS
|
|
||||||
# to a non-empty value, be sure to clear it when not found.
|
|
||||||
set(LIBXML2_LIBRARIES "")
|
|
||||||
set(LIBXML2_INCLUDE_DIRS "")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Capabilities to run dumpcap as non-root user.
|
# Capabilities to run dumpcap as non-root user.
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||||
ws_find_package(CAP ENABLE_CAP HAVE_LIBCAP)
|
ws_find_package(CAP ENABLE_CAP HAVE_LIBCAP)
|
||||||
@ -2428,14 +2412,12 @@ if(USE_REPOSITORY)
|
|||||||
if (OPUS_FOUND)
|
if (OPUS_FOUND)
|
||||||
list (APPEND THIRD_PARTY_DLLS "${OPUS_DLL_DIR}/${OPUS_DLL}")
|
list (APPEND THIRD_PARTY_DLLS "${OPUS_DLL_DIR}/${OPUS_DLL}")
|
||||||
endif(OPUS_FOUND)
|
endif(OPUS_FOUND)
|
||||||
if (LIBXML2_FOUND)
|
foreach( _dll ${LIBXML2_DLLS} )
|
||||||
foreach( _dll ${LIBXML2_DLLS} )
|
list (APPEND THIRD_PARTY_DLLS "${LIBXML2_DLL_DIR}/${_dll}")
|
||||||
list (APPEND THIRD_PARTY_DLLS "${LIBXML2_DLL_DIR}/${_dll}")
|
endforeach(_dll)
|
||||||
endforeach(_dll)
|
foreach( _pdb ${LIBXML2_PDBS} )
|
||||||
foreach( _pdb ${LIBXML2_PDBS} )
|
list (APPEND THIRD_PARTY_PDBS "${LIBXML2_DLL_DIR}/${_pdb}")
|
||||||
list (APPEND THIRD_PARTY_PDBS "${LIBXML2_DLL_DIR}/${_pdb}")
|
endforeach(_pdb)
|
||||||
endforeach(_pdb)
|
|
||||||
endif(LIBXML2_FOUND)
|
|
||||||
if (SMI_FOUND)
|
if (SMI_FOUND)
|
||||||
list (APPEND THIRD_PARTY_DLLS "${SMI_DLL_DIR}/${SMI_DLL}")
|
list (APPEND THIRD_PARTY_DLLS "${SMI_DLL_DIR}/${SMI_DLL}")
|
||||||
# Wireshark.nsi wants SMI_DIR which is the base SMI directory
|
# Wireshark.nsi wants SMI_DIR which is the base SMI directory
|
||||||
@ -3976,9 +3958,6 @@ if(RPMBUILD_EXECUTABLE)
|
|||||||
if (OPUS_FOUND)
|
if (OPUS_FOUND)
|
||||||
list(APPEND _rpmbuild_with_args --with opus)
|
list(APPEND _rpmbuild_with_args --with opus)
|
||||||
endif()
|
endif()
|
||||||
if (LIBXML2_FOUND)
|
|
||||||
list(APPEND _rpmbuild_with_args --with libxml2)
|
|
||||||
endif()
|
|
||||||
if (NGHTTP2_FOUND)
|
if (NGHTTP2_FOUND)
|
||||||
list(APPEND _rpmbuild_with_args --with nghttp2)
|
list(APPEND _rpmbuild_with_args --with nghttp2)
|
||||||
endif()
|
endif()
|
||||||
|
@ -117,7 +117,6 @@ option(ENABLE_SPANDSP "Build with G.722/G.726 codecs support in RTP Player" O
|
|||||||
option(ENABLE_BCG729 "Build with G.729 codec support in RTP Player" ON)
|
option(ENABLE_BCG729 "Build with G.729 codec support in RTP Player" ON)
|
||||||
option(ENABLE_AMRNB "Build with AMRNB codec support in RTP Player" ON)
|
option(ENABLE_AMRNB "Build with AMRNB codec support in RTP Player" ON)
|
||||||
option(ENABLE_ILBC "Build with iLBC codec support in RTP Player" ON)
|
option(ENABLE_ILBC "Build with iLBC codec support in RTP Player" ON)
|
||||||
option(ENABLE_LIBXML2 "Build with libxml2 support" ON)
|
|
||||||
option(ENABLE_OPUS "Build with opus support" ON)
|
option(ENABLE_OPUS "Build with opus support" ON)
|
||||||
option(ENABLE_SINSP "Build with libsinsp+libscap support" ON)
|
option(ENABLE_SINSP "Build with libsinsp+libscap support" ON)
|
||||||
|
|
||||||
|
@ -260,9 +260,6 @@
|
|||||||
/* Define to 1 if you have the opus library. */
|
/* Define to 1 if you have the opus library. */
|
||||||
#cmakedefine HAVE_OPUS 1
|
#cmakedefine HAVE_OPUS 1
|
||||||
|
|
||||||
/* Define to 1 if you have the lixbml2 library. */
|
|
||||||
#cmakedefine HAVE_LIBXML2 1
|
|
||||||
|
|
||||||
/* Define to 1 if you have the `setresgid' function. */
|
/* Define to 1 if you have the `setresgid' function. */
|
||||||
#cmakedefine HAVE_SETRESGID 1
|
#cmakedefine HAVE_SETRESGID 1
|
||||||
|
|
||||||
|
@ -194,6 +194,8 @@ for Arm64 and Intel. wsbuglink:17294[]
|
|||||||
current OS default on Windows and macOS, if Wireshark is built with
|
current OS default on Windows and macOS, if Wireshark is built with
|
||||||
Qt 6.8 or later as the official installers do. wsbuglink:19328[]
|
Qt 6.8 or later as the official installers do. wsbuglink:19328[]
|
||||||
|
|
||||||
|
* LibXml2 is now a required dependency.
|
||||||
|
|
||||||
=== Removed Features and Support
|
=== Removed Features and Support
|
||||||
|
|
||||||
Wireshark no longer supports AirPcap and WinPcap.
|
Wireshark no longer supports AirPcap and WinPcap.
|
||||||
|
@ -956,6 +956,7 @@ This guide assumes `paru` is being used.
|
|||||||
paru -S mingw-w64-cmake
|
paru -S mingw-w64-cmake
|
||||||
paru -S mingw-w64-glib2
|
paru -S mingw-w64-glib2
|
||||||
paru -S mingw-w64-libgcrypt
|
paru -S mingw-w64-libgcrypt
|
||||||
|
paru -S mingw-w64-libxml2
|
||||||
paru -S mingw-w64-c-ares
|
paru -S mingw-w64-c-ares
|
||||||
paru -S mingw-w64-speexdsp
|
paru -S mingw-w64-speexdsp
|
||||||
paru -S mingw-w64-libpcap
|
paru -S mingw-w64-libpcap
|
||||||
@ -971,7 +972,6 @@ This guide assumes `paru` is being used.
|
|||||||
paru -S mingw-w64-snappy
|
paru -S mingw-w64-snappy
|
||||||
paru -S mingw-w64-opus
|
paru -S mingw-w64-opus
|
||||||
paru -S mingw-w64-opencore-amr
|
paru -S mingw-w64-opencore-amr
|
||||||
paru -S mingw-w64-libxml2
|
|
||||||
paru -S mingw-w64-libnghttp2
|
paru -S mingw-w64-libnghttp2
|
||||||
paru -S mingw-w64-libssh
|
paru -S mingw-w64-libssh
|
||||||
paru -S mingw-w64-minizip
|
paru -S mingw-w64-minizip
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
#include <wsutil/wslog.h>
|
#include <wsutil/wslog.h>
|
||||||
#include <epan/wmem_scopes.h>
|
#include <epan/wmem_scopes.h>
|
||||||
|
|
||||||
#if defined HAVE_LIBXML2
|
|
||||||
#include <libxml/xmlversion.h>
|
#include <libxml/xmlversion.h>
|
||||||
|
|
||||||
#if defined LIBXML_XPATH_ENABLED \
|
#if defined LIBXML_XPATH_ENABLED \
|
||||||
@ -78,8 +77,6 @@ static struct xpath {
|
|||||||
|
|
||||||
#endif /* LIBXML_XPATH_ENABLED && LIBXML_SAX1_ENABLED && LIBXML_TREE_ENABLED */
|
#endif /* LIBXML_XPATH_ENABLED && LIBXML_SAX1_ENABLED && LIBXML_TREE_ENABLED */
|
||||||
|
|
||||||
#endif /* HAVE_LIBXML2 */
|
|
||||||
|
|
||||||
struct datatype {
|
struct datatype {
|
||||||
uint16_t id;
|
uint16_t id;
|
||||||
const struct epl_datatype *ptr;
|
const struct epl_datatype *ptr;
|
||||||
@ -568,13 +565,11 @@ populate_object_list(xmlNodeSetPtr nodes, void *_profile)
|
|||||||
|
|
||||||
#else /* ! PARSE_XDD */
|
#else /* ! PARSE_XDD */
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
struct profile *
|
struct profile *
|
||||||
epl_xdd_load(struct profile *profile _U_, const char *xml_file _U_)
|
epl_xdd_load(struct profile *profile _U_, const char *xml_file _U_)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LIBXML2 */
|
|
||||||
|
|
||||||
#endif /* ! PARSE_XDD */
|
#endif /* ! PARSE_XDD */
|
||||||
|
|
||||||
|
@ -76,11 +76,7 @@
|
|||||||
#include <wsutil/wslog.h>
|
#include <wsutil/wslog.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
#define IF_LIBXML(x) x
|
||||||
#define IF_LIBXML(x) x
|
|
||||||
#else
|
|
||||||
#define IF_LIBXML(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void proto_register_epl(void);
|
void proto_register_epl(void);
|
||||||
void proto_reg_handoff_epl(void);
|
void proto_reg_handoff_epl(void);
|
||||||
@ -5238,14 +5234,14 @@ static struct profile *profile_load(wmem_allocator_t *allocator, const char *pat
|
|||||||
if (!epl_eds_load(profile, path))
|
if (!epl_eds_load(profile, path))
|
||||||
profile_del(profile);
|
profile_del(profile);
|
||||||
}
|
}
|
||||||
#if HAVE_LIBXML2
|
|
||||||
else if (g_str_has_suffix(path, ".xdd") || g_str_has_suffix(path, ".xdc"))
|
else if (g_str_has_suffix(path, ".xdd") || g_str_has_suffix(path, ".xdc"))
|
||||||
{
|
{
|
||||||
profile = profile_new(allocator);
|
profile = profile_new(allocator);
|
||||||
if (!epl_xdd_load(profile, path))
|
if (!epl_xdd_load(profile, path))
|
||||||
profile_del(profile);
|
profile_del(profile);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (!profile)
|
if (!profile)
|
||||||
report_failure("Profile '%s' couldn't be parsed", path);
|
report_failure("Profile '%s' couldn't be parsed", path);
|
||||||
|
|
||||||
@ -6384,10 +6380,8 @@ proto_register_epl(void)
|
|||||||
prefs_register_bool_preference(epl_module, "use_sdo_mappings", "Use SDO ObjectMappings for PDO dissection",
|
prefs_register_bool_preference(epl_module, "use_sdo_mappings", "Use SDO ObjectMappings for PDO dissection",
|
||||||
"Partition PDOs according to ObjectMappings sent via SDO", &use_sdo_mappings);
|
"Partition PDOs according to ObjectMappings sent via SDO", &use_sdo_mappings);
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
prefs_register_bool_preference(epl_module, "use_xdc_mappings", "Use XDC ObjectMappings for PDO dissection",
|
prefs_register_bool_preference(epl_module, "use_xdc_mappings", "Use XDC ObjectMappings for PDO dissection",
|
||||||
"If you want to parse the defaultValue (XDD) and actualValue (XDC) attributes for ObjectMappings in order to detect default PDO mappings, which may not be sent over SDO ", &use_xdc_mappings);
|
"If you want to parse the defaultValue (XDD) and actualValue (XDC) attributes for ObjectMappings in order to detect default PDO mappings, which may not be sent over SDO ", &use_xdc_mappings);
|
||||||
#endif
|
|
||||||
|
|
||||||
prefs_register_bool_preference(epl_module, "interpret_untyped_as_le", "Interpret short (<64bit) data as little endian integers",
|
prefs_register_bool_preference(epl_module, "interpret_untyped_as_le", "Interpret short (<64bit) data as little endian integers",
|
||||||
"If a data field has untyped data under 8 byte long, interpret it as unsigned little endian integer and show decimal and hexadecimal representation thereof. Otherwise use stock data dissector", &interpret_untyped_as_le);
|
"If a data field has untyped data under 8 byte long, interpret it as unsigned little endian integer and show decimal and hexadecimal representation thereof. Otherwise use stock data dissector", &interpret_untyped_as_le);
|
||||||
@ -6517,13 +6511,8 @@ epl_profile_uat_fld_fileopen_check_cb(void *record _U_, const char *path, unsign
|
|||||||
|
|
||||||
if (g_str_has_suffix(path, ".xdd") || g_str_has_suffix(path, ".xdc"))
|
if (g_str_has_suffix(path, ".xdd") || g_str_has_suffix(path, ".xdc"))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
*err = NULL;
|
*err = NULL;
|
||||||
return true;
|
return true;
|
||||||
#else
|
|
||||||
*err = ws_strdup_printf("*.xdd and *.xdc support not compiled in. %s", supported);
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*err = g_strdup(supported);
|
*err = g_strdup(supported);
|
||||||
|
13
epan/epan.c
13
epan/epan.c
@ -100,10 +100,8 @@
|
|||||||
#include <brotli/decode.h>
|
#include <brotli/decode.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
#include <libxml/xmlversion.h>
|
#include <libxml/xmlversion.h>
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
@ -325,10 +323,9 @@ epan_init(register_cb cb, void *client_data, bool load_plugins)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
xmlInitParser();
|
xmlInitParser();
|
||||||
LIBXML_TEST_VERSION;
|
LIBXML_TEST_VERSION;
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
// We might receive a SIGPIPE due to maxmind_db.
|
// We might receive a SIGPIPE due to maxmind_db.
|
||||||
@ -458,9 +455,9 @@ epan_cleanup(void)
|
|||||||
#ifdef HAVE_LIBGNUTLS
|
#ifdef HAVE_LIBGNUTLS
|
||||||
gnutls_global_deinit();
|
gnutls_global_deinit();
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
xmlCleanupParser();
|
xmlCleanupParser();
|
||||||
#endif
|
|
||||||
except_deinit();
|
except_deinit();
|
||||||
addr_resolv_cleanup();
|
addr_resolv_cleanup();
|
||||||
|
|
||||||
@ -917,11 +914,7 @@ epan_gather_compile_info(feature_list l)
|
|||||||
#endif /* HAVE_SNAPPY */
|
#endif /* HAVE_SNAPPY */
|
||||||
|
|
||||||
/* libxml2 */
|
/* libxml2 */
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
with_feature(l, "libxml2 %s", LIBXML_DOTTED_VERSION);
|
with_feature(l, "libxml2 %s", LIBXML_DOTTED_VERSION);
|
||||||
#else
|
|
||||||
without_feature(l, "libxml2");
|
|
||||||
#endif /* HAVE_LIBXML2 */
|
|
||||||
|
|
||||||
/* libsmi */
|
/* libsmi */
|
||||||
#ifdef HAVE_LIBSMI
|
#ifdef HAVE_LIBSMI
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
%bcond_with spandsp
|
%bcond_with spandsp
|
||||||
%bcond_with bcg729
|
%bcond_with bcg729
|
||||||
%bcond_with amrnb
|
%bcond_with amrnb
|
||||||
%bcond_with libxml2
|
|
||||||
%bcond_with nghttp2
|
%bcond_with nghttp2
|
||||||
%bcond_with nghttp3
|
%bcond_with nghttp3
|
||||||
%bcond_with sdjournal
|
%bcond_with sdjournal
|
||||||
@ -161,9 +160,7 @@ BuildRequires: speexdsp-devel
|
|||||||
BuildRequires: (lua-devel or lua53-devel or compat-lua-devel or lua52-devel or lua51-devel)
|
BuildRequires: (lua-devel or lua53-devel or compat-lua-devel or lua52-devel or lua51-devel)
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with libxml2}
|
|
||||||
BuildRequires: libxml2-devel
|
BuildRequires: libxml2-devel
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with nghttp2}
|
%if %{with nghttp2}
|
||||||
BuildRequires: libnghttp2-devel
|
BuildRequires: libnghttp2-devel
|
||||||
@ -427,11 +424,6 @@ This package contains the Stratoshark GUI and desktop integration files.
|
|||||||
%else
|
%else
|
||||||
-DENABLE_AMRNB=OFF \
|
-DENABLE_AMRNB=OFF \
|
||||||
%endif
|
%endif
|
||||||
%if %{with libxml2}
|
|
||||||
-DENABLE_LIBXML2=ON \
|
|
||||||
%else
|
|
||||||
-DENABLE_LIBXML2=OFF \
|
|
||||||
%endif
|
|
||||||
%if %{with nghttp2}
|
%if %{with nghttp2}
|
||||||
-DENABLE_NGHTTP2=ON \
|
-DENABLE_NGHTTP2=ON \
|
||||||
%else
|
%else
|
||||||
|
@ -71,13 +71,11 @@
|
|||||||
#include <wsutil/file_util.h>
|
#include <wsutil/file_util.h>
|
||||||
#include <epan/prefs.h>
|
#include <epan/prefs.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
#include <wsutil/strtoi.h>
|
#include <wsutil/strtoi.h>
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
#include <libxml/xpath.h>
|
#include <libxml/xpath.h>
|
||||||
#include <libxml/xpathInternals.h>
|
#include <libxml/xpathInternals.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "packet-pn.h"
|
#include "packet-pn.h"
|
||||||
|
|
||||||
@ -4307,7 +4305,6 @@ pnio_gsd_device_equal(const void *key1, const void *key2)
|
|||||||
return (a->vendor_id == b->vendor_id) && (a->device_id == b->device_id);
|
return (a->vendor_id == b->vendor_id) && (a->device_id == b->device_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
static wmem_map_t *
|
static wmem_map_t *
|
||||||
pnio_load_gsd_device_modules(const xmlNodePtr deviceNode, xmlXPathContextPtr xpathCtx)
|
pnio_load_gsd_device_modules(const xmlNodePtr deviceNode, xmlXPathContextPtr xpathCtx)
|
||||||
{
|
{
|
||||||
@ -4535,7 +4532,6 @@ pnio_load_gsd_device_profile(xmlNodePtr deviceNode, xmlXPathContextPtr xpathCtx,
|
|||||||
value->modules = pnio_load_gsd_device_modules(deviceNode, xpathCtx);
|
value->modules = pnio_load_gsd_device_modules(deviceNode, xpathCtx);
|
||||||
value->submodules = pnio_load_gsd_device_submodules(deviceNode, xpathCtx);
|
value->submodules = pnio_load_gsd_device_submodules(deviceNode, xpathCtx);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LIBXML2 */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pnio_load_gsd_files(void)
|
pnio_load_gsd_files(void)
|
||||||
@ -4547,7 +4543,6 @@ pnio_load_gsd_files(void)
|
|||||||
wmem_free_all(pnio_pref_scope);
|
wmem_free_all(pnio_pref_scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
char *diropen = NULL; /* saves the final networkpath to open for GSD-files */
|
char *diropen = NULL; /* saves the final networkpath to open for GSD-files */
|
||||||
GDir *dir;
|
GDir *dir;
|
||||||
const char *filename; /* saves the found GSD-file name */
|
const char *filename; /* saves the found GSD-file name */
|
||||||
@ -4611,7 +4606,6 @@ pnio_load_gsd_files(void)
|
|||||||
|
|
||||||
g_dir_close(dir);
|
g_dir_close(dir);
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LIBXML2 */
|
|
||||||
}
|
}
|
||||||
typedef struct {
|
typedef struct {
|
||||||
address* device;
|
address* device;
|
||||||
@ -22044,11 +22038,9 @@ proto_register_pn_io (void)
|
|||||||
"Folder containing GSD files", /* Title */
|
"Folder containing GSD files", /* Title */
|
||||||
"Place GSD files in this folder.", /* Description */
|
"Place GSD files in this folder.", /* Description */
|
||||||
&pnio_ps_networkpath); /* Variable in which to save the GSD file folder path */
|
&pnio_ps_networkpath); /* Variable in which to save the GSD file folder path */
|
||||||
#ifndef HAVE_LIBXML2
|
|
||||||
prefs_register_static_text_preference(pnio_module, "pnio_no_libxml2",
|
prefs_register_static_text_preference(pnio_module, "pnio_no_libxml2",
|
||||||
"This version of Wireshark was built without support for reading GSDML files.",
|
"This version of Wireshark was built without support for reading GSDML files.",
|
||||||
"This version of Wireshark was built without libxml2 and does not support reading GSDML files.");
|
"This version of Wireshark was built without libxml2 and does not support reading GSDML files.");
|
||||||
#endif
|
|
||||||
prefs_register_filename_preference(pnio_module, "pnio_configpath",
|
prefs_register_filename_preference(pnio_module, "pnio_configpath",
|
||||||
"Config file for manual extraction",
|
"Config file for manual extraction",
|
||||||
"Choose a config XML file",
|
"Choose a config XML file",
|
||||||
|
@ -457,9 +457,7 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
|
|||||||
|
|
||||||
proto_item *data_item;
|
proto_item *data_item;
|
||||||
proto_item *IODataObject_item;
|
proto_item *IODataObject_item;
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
proto_item *IODataObject_item_info;
|
proto_item *IODataObject_item_info;
|
||||||
#endif
|
|
||||||
proto_tree *IODataObject_tree;
|
proto_tree *IODataObject_tree;
|
||||||
proto_item *ModuleID_item;
|
proto_item *ModuleID_item;
|
||||||
proto_item *ModuleDiff_item;
|
proto_item *ModuleDiff_item;
|
||||||
@ -613,8 +611,6 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
|
|||||||
proto_tree_add_string_format_value(data_tree, hf_pn_io_frame_info_nameofstation, tvb, 0,
|
proto_tree_add_string_format_value(data_tree, hf_pn_io_frame_info_nameofstation, tvb, 0,
|
||||||
0, station_info->nameofstation, "\"%s\"", station_info->nameofstation);
|
0, station_info->nameofstation, "\"%s\"", station_info->nameofstation);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
if (station_info->gsdPathLength == true) { /* given path isn't too long for the array */
|
if (station_info->gsdPathLength == true) { /* given path isn't too long for the array */
|
||||||
if (station_info->gsdFound == true) { /* found a GSD-file */
|
if (station_info->gsdFound == true) { /* found a GSD-file */
|
||||||
if (station_info->gsdLocation != NULL) {
|
if (station_info->gsdLocation != NULL) {
|
||||||
@ -633,9 +629,6 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
|
|||||||
IODataObject_item_info = proto_tree_add_item(data_tree, hf_pn_io_frame_info_gsd_path, tvb, offset, 0, ENC_NA);
|
IODataObject_item_info = proto_tree_add_item(data_tree, hf_pn_io_frame_info_gsd_path, tvb, offset, 0, ENC_NA);
|
||||||
proto_item_append_text(IODataObject_item_info, " Please check your GSD-file networkpath. (No Path configured)");
|
proto_item_append_text(IODataObject_item_info, " Please check your GSD-file networkpath. (No Path configured)");
|
||||||
}
|
}
|
||||||
#else /* HAVE_LIBXML2 */
|
|
||||||
proto_tree_add_none_format(data_tree, hf_pn_io_frame_info_gsd_error, tvb, offset, 0, "This copy of Wireshark was built without support for reading GSDML files.");
|
|
||||||
#endif /* HAVE_LIBXML2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---- Input IOData-/IOCS-Object Handling ---- */
|
/* ---- Input IOData-/IOCS-Object Handling ---- */
|
||||||
@ -827,8 +820,6 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
|
|||||||
proto_tree_add_string_format_value(data_tree, hf_pn_io_frame_info_nameofstation, tvb, 0,
|
proto_tree_add_string_format_value(data_tree, hf_pn_io_frame_info_nameofstation, tvb, 0,
|
||||||
0, station_info->nameofstation, "\"%s\"", station_info->nameofstation);
|
0, station_info->nameofstation, "\"%s\"", station_info->nameofstation);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
if (station_info->gsdPathLength == true) { /* given path isn't too long for the array */
|
if (station_info->gsdPathLength == true) { /* given path isn't too long for the array */
|
||||||
if (station_info->gsdFound == true) { /* found a GSD-file */
|
if (station_info->gsdFound == true) { /* found a GSD-file */
|
||||||
if (station_info->gsdLocation != NULL) {
|
if (station_info->gsdLocation != NULL) {
|
||||||
@ -847,9 +838,6 @@ dissect_PNIO_C_SDU_RTC1(tvbuff_t *tvb, int offset,
|
|||||||
IODataObject_item_info = proto_tree_add_item(data_tree, hf_pn_io_frame_info_gsd_path, tvb, offset, 0, ENC_NA);
|
IODataObject_item_info = proto_tree_add_item(data_tree, hf_pn_io_frame_info_gsd_path, tvb, offset, 0, ENC_NA);
|
||||||
proto_item_append_text(IODataObject_item_info, " Please check your GSD-file networkpath. (No Path configured)");
|
proto_item_append_text(IODataObject_item_info, " Please check your GSD-file networkpath. (No Path configured)");
|
||||||
}
|
}
|
||||||
#else /* HAVE_LIBXML2 */
|
|
||||||
proto_tree_add_none_format(data_tree, hf_pn_io_frame_info_gsd_error, tvb, offset, 0, "This copy of Wireshark was built without support for reading GSDML files.");
|
|
||||||
#endif /* HAVE_LIBXML2 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---- Output IOData-/IOCS-Object Handling ---- */
|
/* ---- Output IOData-/IOCS-Object Handling ---- */
|
||||||
|
@ -57,6 +57,7 @@ BASIC_LIST="
|
|||||||
g++
|
g++
|
||||||
glib-dev
|
glib-dev
|
||||||
libgcrypt-dev
|
libgcrypt-dev
|
||||||
|
libxml2-dev
|
||||||
flex
|
flex
|
||||||
tiff-dev
|
tiff-dev
|
||||||
c-ares-dev
|
c-ares-dev
|
||||||
@ -78,7 +79,6 @@ ADDITIONAL_LIST="
|
|||||||
libcap-dev
|
libcap-dev
|
||||||
libcap-setcap
|
libcap-setcap
|
||||||
libpcap-dev
|
libpcap-dev
|
||||||
libxml2-dev
|
|
||||||
libmaxminddb-dev
|
libmaxminddb-dev
|
||||||
krb5-dev
|
krb5-dev
|
||||||
lz4-dev
|
lz4-dev
|
||||||
|
@ -106,6 +106,8 @@ BASIC_LIST="
|
|||||||
libpcap-dev
|
libpcap-dev
|
||||||
libpcre2-dev
|
libpcre2-dev
|
||||||
libspeexdsp-dev
|
libspeexdsp-dev
|
||||||
|
libxml2-dev
|
||||||
|
libxml2-utils
|
||||||
make
|
make
|
||||||
python3
|
python3
|
||||||
"
|
"
|
||||||
@ -193,7 +195,6 @@ ADDITIONAL_LIST="
|
|||||||
libsnappy-dev
|
libsnappy-dev
|
||||||
libspandsp-dev
|
libspandsp-dev
|
||||||
libsystemd-dev
|
libsystemd-dev
|
||||||
libxml2-dev
|
|
||||||
libzstd-dev
|
libzstd-dev
|
||||||
ninja-build
|
ninja-build
|
||||||
perl
|
perl
|
||||||
@ -214,7 +215,6 @@ DEBDEPS_LIST="
|
|||||||
dh-python
|
dh-python
|
||||||
docbook-xml
|
docbook-xml
|
||||||
docbook-xsl
|
docbook-xsl
|
||||||
libxml2-utils
|
|
||||||
lintian
|
lintian
|
||||||
lsb-release
|
lsb-release
|
||||||
po-debconf
|
po-debconf
|
||||||
|
@ -104,6 +104,7 @@ REQUIRED_LIST=(
|
|||||||
c-ares
|
c-ares
|
||||||
glib
|
glib
|
||||||
libgcrypt
|
libgcrypt
|
||||||
|
libxml2
|
||||||
pcre2
|
pcre2
|
||||||
qt6
|
qt6
|
||||||
speexdsp
|
speexdsp
|
||||||
@ -119,7 +120,6 @@ OPTIONAL_LIST=(
|
|||||||
libnghttp3
|
libnghttp3
|
||||||
libsmi
|
libsmi
|
||||||
libssh
|
libssh
|
||||||
libxml2
|
|
||||||
lua
|
lua
|
||||||
lz4
|
lz4
|
||||||
minizip
|
minizip
|
||||||
|
@ -81,6 +81,7 @@ BASIC_LIST="
|
|||||||
glib2-devel
|
glib2-devel
|
||||||
libgcrypt-devel
|
libgcrypt-devel
|
||||||
libpcap-devel
|
libpcap-devel
|
||||||
|
libxml2-devel
|
||||||
pcre2-devel
|
pcre2-devel
|
||||||
python3
|
python3
|
||||||
"
|
"
|
||||||
@ -89,7 +90,6 @@ ADDITIONAL_LIST="
|
|||||||
krb5-devel
|
krb5-devel
|
||||||
libcap-devel
|
libcap-devel
|
||||||
libssh-devel
|
libssh-devel
|
||||||
libxml2-devel
|
|
||||||
lz4
|
lz4
|
||||||
perl
|
perl
|
||||||
perl-Parse-Yapp
|
perl-Parse-Yapp
|
||||||
|
@ -24,11 +24,9 @@
|
|||||||
#include <wsutil/report_message.h>
|
#include <wsutil/report_message.h>
|
||||||
#include <wsutil/filesystem.h>
|
#include <wsutil/filesystem.h>
|
||||||
#include <wsutil/strtoi.h>
|
#include <wsutil/strtoi.h>
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
#include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
#include <libxml/parser.h>
|
#include <libxml/parser.h>
|
||||||
#include <libxml/xpath.h>
|
#include <libxml/xpath.h>
|
||||||
#endif
|
|
||||||
#include "file_wrappers.h"
|
#include "file_wrappers.h"
|
||||||
#include "wtap-int.h"
|
#include "wtap-int.h"
|
||||||
|
|
||||||
@ -2266,7 +2264,6 @@ static ttl_result_t ttl_read_entry(wtap* wth, wtap_rec* rec, int* err, char** er
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
static bool
|
static bool
|
||||||
ttl_xml_node_get_number(xmlNodePtr node, xmlXPathContextPtr ctx, double *ret) {
|
ttl_xml_node_get_number(xmlNodePtr node, xmlXPathContextPtr ctx, double *ret) {
|
||||||
xmlXPathObjectPtr result;
|
xmlXPathObjectPtr result;
|
||||||
@ -2383,7 +2380,6 @@ ttl_process_xml_config(ttl_t* ttl, const char* text, int size) {
|
|||||||
xmlFreeDoc(doc);
|
xmlFreeDoc(doc);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LIBXML2 */
|
|
||||||
|
|
||||||
/* Maximum supported line length of preference files */
|
/* Maximum supported line length of preference files */
|
||||||
#define MAX_LINELEN 1024
|
#define MAX_LINELEN 1024
|
||||||
@ -2717,7 +2713,6 @@ ttl_open(wtap* wth, int* err, char** err_info) {
|
|||||||
return WTAP_OPEN_ERROR;
|
return WTAP_OPEN_ERROR;
|
||||||
}
|
}
|
||||||
offset += TTL_LOGFILE_INFO_SIZE;
|
offset += TTL_LOGFILE_INFO_SIZE;
|
||||||
#ifdef HAVE_LIBXML2
|
|
||||||
unsigned int xml_len = header.header_size - offset;
|
unsigned int xml_len = header.header_size - offset;
|
||||||
if (xml_len != 0) {
|
if (xml_len != 0) {
|
||||||
unsigned char* xml = g_try_malloc(xml_len);
|
unsigned char* xml = g_try_malloc(xml_len);
|
||||||
@ -2738,7 +2733,6 @@ ttl_open(wtap* wth, int* err, char** err_info) {
|
|||||||
g_free(xml);
|
g_free(xml);
|
||||||
offset += xml_len;
|
offset += xml_len;
|
||||||
}
|
}
|
||||||
#endif /* HAVE_LIBXML2 */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user