summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/pidl/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/pidl/CMakeLists.txt')
-rw-r--r--epan/dissectors/pidl/CMakeLists.txt76
1 files changed, 70 insertions, 6 deletions
diff --git a/epan/dissectors/pidl/CMakeLists.txt b/epan/dissectors/pidl/CMakeLists.txt
index 2e4dc7ba..556f6622 100644
--- a/epan/dissectors/pidl/CMakeLists.txt
+++ b/epan/dissectors/pidl/CMakeLists.txt
@@ -7,12 +7,12 @@
# SPDX-License-Identifier: GPL-2.0-or-later
#
-# TODO fix srvsvc wkssvc
set(PIDL_DISSECTOR_NAMES
atsvc
+ browser
clusapi
- dfs
dnsserver
+ dfs
drsuapi
dssetup
efs
@@ -22,6 +22,9 @@ set(PIDL_DISSECTOR_NAMES
fsrvp
initshutdown
iwbemlevel1login
+ iwbemloginclientid
+ iwbemloginclientidex
+ iwbemservices
lsa
mapi
mdssvc
@@ -29,20 +32,45 @@ set(PIDL_DISSECTOR_NAMES
nspi
rfr
samr
- #srvsvc
+ srvsvc
svcctl
winreg
winspool
witness
- #wkssvc
+ wkssvc
wzcsvc
)
+#
+# These can give some (not-fatal) errors building from source:
+#
+# dnsserver - "dnsserver.idl:159: error: Inline arrays not supported"
+# eventlog - "eventlog.idl:54: error: Inline arrays not supported"
+# nspi - "nspi.idl:154: error: Syntax error near '/'"
+# mapi - includes nspi.idl, so it gets the above error
+# winspool - we have a hand-written spoolss dissector we use instead of spoolss.idl
+#
+# XXX - the "Syntax error near '/'" errors show up if cpp doesn't strip
+# C99/C++ comments and the file in question - nspi.idl - contains
+# C99/C++ comments, because the parser runs cpp, by default, to strip
+# comments and proccess #includes. Those errors may cause
+# packet-dcerpc-nspi.c, and possibly packet-dcerpc-mapi.c not to be
+# generated. GCC's cpp appears to strip them by default, but Xcode's
+# cpp, at least as of Xcode 15.2, does not - cc -E does, however,
+# strip them. (Both of them strip "classic C" /* ... */ comments.)
+#
+
+set(PIDL_DISSECTOR_browser_EXTRA_DEPS
+ srvsvc/srvsvc.idl
+)
set(PIDL_DISSECTOR_clusapi_EXTRA_DEPS
- clusapi/clusapi.idl
+ winreg/winreg.idl
+ misc/misc.idl
)
set(PIDL_DISSECTOR_drsuapi_EXTRA_DEPS
misc/misc.idl
+ lsa/lsa.idl
+ samr/samr.idl
)
set(PIDL_DISSECTOR_dssetup_EXTRA_DEPS
misc/misc.idl
@@ -68,11 +96,21 @@ set(PIDL_DISSECTOR_initshutdown_EXTRA_DEPS
set(PIDL_DISSECTOR_iwbemlevel1login_EXTRA_DEPS
idl_types.h
)
+set(PIDL_DISSECTOR_iwbemloginclientid_EXTRA_DEPS
+ idl_types.h
+)
+set(PIDL_DISSECTOR_iwbemloginclientidex_EXTRA_DEPS
+ idl_types.h
+)
+set(PIDL_DISSECTOR_iwbemservices_EXTRA_DEPS
+ idl_types.h
+)
set(PIDL_DISSECTOR_lsa_EXTRA_DEPS
idl_types.h
)
set(PIDL_DISSECTOR_mapi_EXTRA_DEPS
idl_types.h
+ nspi/nspi.idl
mapicodes_enum.h
mapitags_enum.h
)
@@ -93,6 +131,8 @@ set(PIDL_DISSECTOR_rfr_EXTRA_DEPS
)
set(PIDL_DISSECTOR_samr_EXTRA_DEPS
idl_types.h
+ misc/misc.idl
+ lsa/lsa.idl
)
set(PIDL_DISSECTOR_srvsvc_EXTRA_DEPS
idl_types.h
@@ -103,6 +143,9 @@ set(PIDL_DISSECTOR_winreg_EXTRA_DEPS
set(PIDL_DISSECTOR_winspool_EXTRA_DEPS
idl_types.h
misc/misc.idl
+ winreg/winreg.idl
+ # Wireshark supplies the spoolss elements through a hand-written dissector
+ #spoolss/spoolss.idl
)
set(PIDL_DISSECTOR_witness_EXTRA_DEPS
misc/misc.idl
@@ -117,13 +160,32 @@ set(PIDL_DISSECTOR_wkssvc_EXTRA_DEPS
set(PIDL_DISSECTOR_TARGETS)
foreach(PROTOCOL_NAME IN LISTS PIDL_DISSECTOR_NAMES)
+ #
+ # Construct, from the list of extra dependencies for
+ # this dissector, a list of --includedir options
+ # for all the directories in which those dependencies
+ # reside. We add --includedir .. for all targets.
+ #
+ set(INCLUDE_DIRS "")
+ list(APPEND INCLUDE_DIRS --includedir ..)
+ foreach(DEPENDENCY in ${PIDL_DISSECTOR_${PROTOCOL_NAME}_EXTRA_DEPS})
+ get_filename_component(PARENT_DIR ${DEPENDENCY} DIRECTORY)
+ if (NOT PARENT_DIR STREQUAL "")
+ list(APPEND INCLUDE_DIRS --includedir ../${PARENT_DIR})
+ endif()
+ endforeach()
+ #
+ # COMMAND_EXPAND_LISTS is required to cause the list
+ # INCLUDE_DIRS to be expanded into a set of individual
+ # arguments to the pidl command.
+ #
add_custom_command(
OUTPUT packet-dcerpc-${PROTOCOL_NAME}-stamp
COMMAND "${PERL_EXECUTABLE}"
"${CMAKE_SOURCE_DIR}/tools/pidl/pidl"
--ws-parser
--outputdir ../..
- --includedir ..
+ ${INCLUDE_DIRS}
--
${PROTOCOL_NAME}.idl
COMMAND
@@ -132,10 +194,12 @@ foreach(PROTOCOL_NAME IN LISTS PIDL_DISSECTOR_NAMES)
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${PROTOCOL_NAME}"
DEPENDS
"${CMAKE_SOURCE_DIR}/tools/pidl/pidl"
+ "${CMAKE_SOURCE_DIR}/tools/pidl/lib/Parse/Pidl/Wireshark/NDR.pm"
${PROTOCOL_NAME}/${PROTOCOL_NAME}.idl
${PROTOCOL_NAME}/${PROTOCOL_NAME}.cnf
${PIDL_DISSECTOR_${PROTOCOL_NAME}_EXTRA_DEPS}
VERBATIM
+ COMMAND_EXPAND_LISTS
)
add_custom_target(generate_dissector-dcerpc-${PROTOCOL_NAME}
DEPENDS packet-dcerpc-${PROTOCOL_NAME}-stamp