Use the same rules as cmake submodule to reformat Zeek

This commit is contained in:
Tim Wojtulewicz 2023-05-08 10:19:26 -07:00
parent fd72d81bad
commit 84e3f414a7
125 changed files with 1423 additions and 1670 deletions

80
.cmake-format.json Normal file
View file

@ -0,0 +1,80 @@
{
"parse": {
"additional_commands": {
"CheckIPProto": {
"kwargs": {
"_proto": "*"
}
},
"CheckType": {
"kwargs": {
"_type": "*",
"_alt_type": "*",
"_var": "*"
}
},
"SetPackageVersion": {
"kwargs": {
"_version": "*"
}
},
"SetPackageFileName": {
"kwargs": {
"_version": "*"
}
},
"SetPackageInstallScripts": {
"kwargs": {
"VERSION": "*"
}
},
"ConfigurePackaging": {
"kwargs": {
"_version": "*"
}
},
"SetPackageGenerators": {},
"SetPackageMetadata": {},
"FindRequiredPackage": {
"kwargs": {
"packageName": "*"
}
},
"InstallClobberImmune": {
"kwargs": {
"_srcfile": "*",
"_dstfile": "*"
}
},
"InstallPackageConfigFile": {
"kwargs": {
"_srcfile": "*",
"_dstdir": "*",
"_dstfilename": "*"
}
},
"InstallShellScript": {
"kwargs": {
"_srcfile": "*",
"_dstfile": "*"
}
},
"InstallSymLink": {
"kwargs": {
"_filepath": "*",
"_sympath": "*"
}
}
}
},
"format": {
"line_width": 100,
"tab_size": 4,
"separate_ctrl_name_with_space": true,
"max_subgroups_hwrap": 3,
"line_ending": "unix"
},
"markup": {
"enable_markup": false
}
}

View file

@ -17,3 +17,9 @@ repos:
rev: v0.31.0 rev: v0.31.0
hooks: hooks:
- id: yapf - id: yapf
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
exclude: '^auxil/.*$'

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,5 @@
install(
install(DIRECTORY . DESTINATION ${ZEEK_MAN_INSTALL_PATH}/man8 FILES_MATCHING DIRECTORY .
PATTERN "*.8" DESTINATION ${ZEEK_MAN_INSTALL_PATH}/man8
) FILES_MATCHING
PATTERN "*.8")

View file

@ -1,22 +1,22 @@
include(InstallPackageConfigFile) include(InstallPackageConfigFile)
install(DIRECTORY ./ DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH} FILES_MATCHING install(
PATTERN "site/local*" EXCLUDE DIRECTORY ./
PATTERN "*.zeek" DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}
PATTERN "*.sig" FILES_MATCHING
PATTERN "*.fp" PATTERN "site/local*" EXCLUDE
) PATTERN "*.zeek"
PATTERN "*.sig"
PATTERN "*.fp")
# Install local script as a config file since it's meant to be modified directly. # Install local script as a config file since it's meant to be modified
InstallPackageConfigFile( # directly.
${CMAKE_CURRENT_SOURCE_DIR}/site/local.zeek InstallPackageConfigFile(${CMAKE_CURRENT_SOURCE_DIR}/site/local.zeek
${ZEEK_SCRIPT_INSTALL_PATH}/site ${ZEEK_SCRIPT_INSTALL_PATH}/site local.zeek)
local.zeek)
# Substitute values in templated script files, and install them. # Substitute values in templated script files, and install them.
configure_file( configure_file(${CMAKE_CURRENT_SOURCE_DIR}/base/misc/installation.zeek.in
${CMAKE_CURRENT_SOURCE_DIR}/base/misc/installation.zeek.in ${CMAKE_CURRENT_BINARY_DIR}/base/misc/installation.zeek @ONLY)
${CMAKE_CURRENT_BINARY_DIR}/base/misc/installation.zeek @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/base/misc/installation.zeek install(FILES ${CMAKE_CURRENT_BINARY_DIR}/base/misc/installation.zeek
DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}/base/misc) DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}/base/misc)

View file

@ -1,24 +1,16 @@
include_directories(BEFORE include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}/include)
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/include
)
# Force creation of includes symlink. This can't just be in the src directory # Force creation of includes symlink. This can't just be in the src directory
# because MSVC will end up with an include loop. # because MSVC will end up with an include loop.
execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_SOURCE_DIR}/include")
"${CMAKE_CURRENT_SOURCE_DIR}/include") execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink ".."
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_CURRENT_SOURCE_DIR}/include/zeek")
".."
"${CMAKE_CURRENT_SOURCE_DIR}/include/zeek")
# Allows header file inclusion via zeek/ within the build tree # Allows header file inclusion via zeek/ within the build tree
execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory execute_process(COMMAND "${CMAKE_COMMAND}" -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/include")
"${CMAKE_CURRENT_BINARY_DIR}/include") execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink ".."
execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_CURRENT_BINARY_DIR}/include/zeek")
".."
"${CMAKE_CURRENT_BINARY_DIR}/include/zeek")
# Poor man's JSON escaping as this is rendered into a C string. # Poor man's JSON escaping as this is rendered into a C string.
string(REPLACE "\"" "\\\"" ZEEK_BUILD_INFO_ESCAPED "${ZEEK_BUILD_INFO}") string(REPLACE "\"" "\\\"" ZEEK_BUILD_INFO_ESCAPED "${ZEEK_BUILD_INFO}")
@ -26,96 +18,85 @@ string(REPLACE "\n" "\\n" ZEEK_BUILD_INFO_ESCAPED "${ZEEK_BUILD_INFO_ESCAPED}")
configure_file(version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c) configure_file(version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c)
configure_file(util-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/util-config.h) configure_file(util-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/util-config.h)
# This creates a custom command to transform a bison output file (inFile) # This creates a custom command to transform a bison output file (inFile) into
# into outFile in order to avoid symbol conflicts: # outFile in order to avoid symbol conflicts: - replaces instances of 'yylex' in
# - replaces instances of 'yylex' in inFile with yylexPrefix # inFile with yylexPrefix - replaces instances of 'yy' in inFile with yyPrefix -
# - replaces instances of 'yy' in inFile with yyPrefix # deletes instances of 'extern char.*getenv' in inFile - writes results to
# - deletes instances of 'extern char.*getenv' in inFile # outFile and adds it to list TRANSFORMED_BISON_OUTPUTS
# - writes results to outFile and adds it to list TRANSFORMED_BISON_OUTPUTS macro (REPLACE_YY_PREFIX_TARGET inFile outFile yylexPrefix yyPrefix)
macro(REPLACE_YY_PREFIX_TARGET inFile outFile yylexPrefix yyPrefix)
set(args "\"/extern char.*getenv/d") set(args "\"/extern char.*getenv/d")
set(args "${args}\;s/yylex/${yylexPrefix}lex/") set(args "${args}\;s/yylex/${yylexPrefix}lex/")
set(args "${args}\;s/yy/${yyPrefix}/g\"" < ${inFile} > ${outFile}) set(args "${args}\;s/yy/${yyPrefix}/g\"" < ${inFile} > ${outFile})
add_custom_command(OUTPUT ${outFile} add_custom_command(
COMMAND ${SED_EXE} OUTPUT ${outFile}
ARGS ${args} COMMAND ${SED_EXE} ARGS ${args}
DEPENDS ${inFile} DEPENDS ${inFile}
COMMENT "[sed] replacing stuff in ${inFile}" COMMENT "[sed] replacing stuff in ${inFile}")
)
list(APPEND TRANSFORMED_BISON_OUTPUTS ${outFile}) list(APPEND TRANSFORMED_BISON_OUTPUTS ${outFile})
endmacro(REPLACE_YY_PREFIX_TARGET) endmacro (REPLACE_YY_PREFIX_TARGET)
######################################################################## # ##############################################################################
## Create targets to generate parser and scanner code # Create targets to generate parser and scanner code
set(BISON_FLAGS "--debug") set(BISON_FLAGS "--debug")
if ( MSVC ) if (MSVC)
set(SIGN_COMPARE_FLAG "/wd4018") set(SIGN_COMPARE_FLAG "/wd4018")
else() else ()
set(SIGN_COMPARE_FLAG "-Wno-sign-compare") set(SIGN_COMPARE_FLAG "-Wno-sign-compare")
endif() endif ()
# Rule parser/scanner # Rule parser/scanner
bison_target(RuleParser rule-parse.y bison_target(
${CMAKE_CURRENT_BINARY_DIR}/rup.cc RuleParser rule-parse.y ${CMAKE_CURRENT_BINARY_DIR}/rup.cc HEADER
HEADER ${CMAKE_CURRENT_BINARY_DIR}/rup.h ${CMAKE_CURRENT_BINARY_DIR}/rup.h
#VERBOSE ${CMAKE_CURRENT_BINARY_DIR}/rule_parse.output # VERBOSE ${CMAKE_CURRENT_BINARY_DIR}/rule_parse.output
COMPILE_FLAGS "${BISON_FLAGS}") COMPILE_FLAGS "${BISON_FLAGS}")
replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/rup.cc replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/rup.cc
${CMAKE_CURRENT_BINARY_DIR}/rule-parse.cc ${CMAKE_CURRENT_BINARY_DIR}/rule-parse.cc rules_ rules_)
rules_ rules_) replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/rup.h ${CMAKE_CURRENT_BINARY_DIR}/rule-parse.h
replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/rup.h
${CMAKE_CURRENT_BINARY_DIR}/rule-parse.h
rules_ rules_) rules_ rules_)
flex_target(RuleScanner rule-scan.l ${CMAKE_CURRENT_BINARY_DIR}/rule-scan.cc flex_target(RuleScanner rule-scan.l ${CMAKE_CURRENT_BINARY_DIR}/rule-scan.cc
COMPILE_FLAGS "-Prules_") COMPILE_FLAGS "-Prules_")
set_property(SOURCE rule-scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "${SIGN_COMPARE_FLAG}") set_property(SOURCE rule-scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "${SIGN_COMPARE_FLAG}")
# RE parser/scanner # RE parser/scanner
bison_target(REParser re-parse.y bison_target(
${CMAKE_CURRENT_BINARY_DIR}/rep.cc REParser re-parse.y ${CMAKE_CURRENT_BINARY_DIR}/rep.cc HEADER
HEADER ${CMAKE_CURRENT_BINARY_DIR}/re-parse.h ${CMAKE_CURRENT_BINARY_DIR}/re-parse.h
#VERBOSE ${CMAKE_CURRENT_BINARY_DIR}/re_parse.output # VERBOSE ${CMAKE_CURRENT_BINARY_DIR}/re_parse.output
COMPILE_FLAGS "${BISON_FLAGS}") COMPILE_FLAGS "${BISON_FLAGS}")
replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/rep.cc replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/rep.cc ${CMAKE_CURRENT_BINARY_DIR}/re-parse.cc
${CMAKE_CURRENT_BINARY_DIR}/re-parse.cc
re_ RE_) re_ RE_)
flex_target(REScanner re-scan.l ${CMAKE_CURRENT_BINARY_DIR}/re-scan.cc flex_target(REScanner re-scan.l ${CMAKE_CURRENT_BINARY_DIR}/re-scan.cc COMPILE_FLAGS "-Pre_")
COMPILE_FLAGS "-Pre_")
add_flex_bison_dependency(REScanner REParser) add_flex_bison_dependency(REScanner REParser)
set_property(SOURCE re-scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "${SIGN_COMPARE_FLAG}") set_property(SOURCE re-scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "${SIGN_COMPARE_FLAG}")
# Parser/Scanner # Parser/Scanner
bison_target(Parser parse.y bison_target(
${CMAKE_CURRENT_BINARY_DIR}/p.cc Parser parse.y ${CMAKE_CURRENT_BINARY_DIR}/p.cc HEADER ${CMAKE_CURRENT_BINARY_DIR}/zeekparse.h
HEADER ${CMAKE_CURRENT_BINARY_DIR}/zeekparse.h # VERBOSE ${CMAKE_CURRENT_BINARY_DIR}/parse.output
#VERBOSE ${CMAKE_CURRENT_BINARY_DIR}/parse.output COMPILE_FLAGS "${BISON_FLAGS}")
COMPILE_FLAGS "${BISON_FLAGS}") replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/p.cc ${CMAKE_CURRENT_BINARY_DIR}/parse.cc zeek
replace_yy_prefix_target(${CMAKE_CURRENT_BINARY_DIR}/p.cc yy)
${CMAKE_CURRENT_BINARY_DIR}/parse.cc flex_target(Scanner scan.l ${CMAKE_CURRENT_BINARY_DIR}/scan.cc COMPILE_FLAGS "-Pzeek")
zeek yy)
flex_target(Scanner scan.l ${CMAKE_CURRENT_BINARY_DIR}/scan.cc
COMPILE_FLAGS "-Pzeek")
set_property(SOURCE scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "${SIGN_COMPARE_FLAG}") set_property(SOURCE scan.cc APPEND_STRING PROPERTY COMPILE_FLAGS "${SIGN_COMPARE_FLAG}")
# Add a dependency for the generated files to zeek_autogen_files. # Add a dependency for the generated files to zeek_autogen_files.
add_custom_target( add_custom_target(
zeek_bison_outputs zeek_bison_outputs
DEPENDS DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/parse.cc
${CMAKE_CURRENT_BINARY_DIR}/parse.cc ${CMAKE_CURRENT_BINARY_DIR}/re-parse.cc
${CMAKE_CURRENT_BINARY_DIR}/re-parse.cc ${CMAKE_CURRENT_BINARY_DIR}/re-parse.h
${CMAKE_CURRENT_BINARY_DIR}/re-parse.h ${CMAKE_CURRENT_BINARY_DIR}/re-scan.cc
${CMAKE_CURRENT_BINARY_DIR}/re-scan.cc ${CMAKE_CURRENT_BINARY_DIR}/rule-parse.cc
${CMAKE_CURRENT_BINARY_DIR}/rule-parse.cc ${CMAKE_CURRENT_BINARY_DIR}/rule-parse.h
${CMAKE_CURRENT_BINARY_DIR}/rule-parse.h ${CMAKE_CURRENT_BINARY_DIR}/rule-scan.cc
${CMAKE_CURRENT_BINARY_DIR}/rule-scan.cc ${CMAKE_CURRENT_BINARY_DIR}/scan.cc)
${CMAKE_CURRENT_BINARY_DIR}/scan.cc
)
add_dependencies(zeek_autogen_files zeek_bison_outputs) add_dependencies(zeek_autogen_files zeek_bison_outputs)
######################################################################## # ##############################################################################
## bifcl-dependent targets # bifcl-dependent targets
include(BifCl) include(BifCl)
@ -131,34 +112,30 @@ set(BIF_SRCS
strings.bif strings.bif
reporter.bif reporter.bif
option.bif option.bif
# Note: the supervisor BIF file is treated like other top-level BIFs # Note: the supervisor BIF file is treated like other top-level BIFs instead
# instead of contained in its own subdirectory CMake logic because # of contained in its own subdirectory CMake logic because subdirectory BIFs
# subdirectory BIFs are treated differently and don't support being called # are treated differently and don't support being called *during* parsing
# *during* parsing (e.g. within an @if directive). # (e.g. within an @if directive).
supervisor/supervisor.bif supervisor/supervisor.bif
# The packet analysis BIF is treated like other top-level BIFs because # The packet analysis BIF is treated like other top-level BIFs because it's
# it's needed before parsing the packet protocol scripts, which happen # needed before parsing the packet protocol scripts, which happen very near
# very near to the start of parsing. # to the start of parsing.
packet_analysis/packet_analysis.bif packet_analysis/packet_analysis.bif
# The C++ loading BIF is treated like other top-level BIFs to give # The C++ loading BIF is treated like other top-level BIFs to give us
# us flexibility regarding when it's called. # flexibility regarding when it's called.
script_opt/CPP/CPP-load.bif script_opt/CPP/CPP-load.bif)
)
foreach (bift ${BIF_SRCS}) foreach (bift ${BIF_SRCS})
bif_target(${bift} "standard") bif_target(${bift} "standard")
endforeach () endforeach ()
######################################################################## # ##############################################################################
## BinPAC-dependent targets # BinPAC-dependent targets
include(BinPAC) include(BinPAC)
set(BINPAC_AUXSRC set(BINPAC_AUXSRC ${CMAKE_CURRENT_SOURCE_DIR}/binpac.pac ${CMAKE_CURRENT_SOURCE_DIR}/zeek.pac
${CMAKE_CURRENT_SOURCE_DIR}/binpac.pac ${CMAKE_CURRENT_SOURCE_DIR}/binpac_zeek.h)
${CMAKE_CURRENT_SOURCE_DIR}/zeek.pac
${CMAKE_CURRENT_SOURCE_DIR}/binpac_zeek.h
)
set(BINPAC_OUTPUTS "") set(BINPAC_OUTPUTS "")
@ -168,8 +145,8 @@ list(APPEND BINPAC_OUTPUTS "${BINPAC_OUTPUT_CC}")
binpac_target(binpac_zeek-lib.pac) binpac_target(binpac_zeek-lib.pac)
list(APPEND BINPAC_OUTPUTS "${BINPAC_OUTPUT_CC}") list(APPEND BINPAC_OUTPUTS "${BINPAC_OUTPUT_CC}")
######################################################################## # ##############################################################################
## Gen-ZAM setup # Gen-ZAM setup
include(Gen-ZAM) include(Gen-ZAM)
@ -177,9 +154,9 @@ set(GEN_ZAM_SRC ${CMAKE_CURRENT_SOURCE_DIR}/script_opt/ZAM/Ops.in)
gen_zam_target(${GEN_ZAM_SRC}) gen_zam_target(${GEN_ZAM_SRC})
######################################################################## # ##############################################################################
## Including subdirectories. # Including subdirectories.
######################################################################## # ##############################################################################
option(USE_SQLITE "Should Zeek use SQLite?" ON) option(USE_SQLITE "Should Zeek use SQLite?" ON)
@ -195,8 +172,8 @@ add_subdirectory(logging)
add_subdirectory(probabilistic) add_subdirectory(probabilistic)
add_subdirectory(session) add_subdirectory(session)
######################################################################## # ##############################################################################
## Build in the discovered external plugins and create the autogenerated scripts. # Build in the discovered external plugins and create the autogenerated scripts.
set(PRELOAD_SCRIPT ${PROJECT_BINARY_DIR}/scripts/builtin-plugins/__preload__.zeek) set(PRELOAD_SCRIPT ${PROJECT_BINARY_DIR}/scripts/builtin-plugins/__preload__.zeek)
file(WRITE ${PRELOAD_SCRIPT} "# Warning, this is an autogenerated file!\n") file(WRITE ${PRELOAD_SCRIPT} "# Warning, this is an autogenerated file!\n")
@ -204,14 +181,14 @@ set(LOAD_SCRIPT ${PROJECT_BINARY_DIR}/scripts/builtin-plugins/__load__.zeek)
file(WRITE ${LOAD_SCRIPT} "# Warning, this is an autogenerated file!\n") file(WRITE ${LOAD_SCRIPT} "# Warning, this is an autogenerated file!\n")
# TODO: this really should be a function to make sure we have an isolated scope. # TODO: this really should be a function to make sure we have an isolated scope.
# However, for historic reasons, we're not doing that yet. Some plugin # However, for historic reasons, we're not doing that yet. Some plugin modify
# modify global state such as `zeekdeps`. # global state such as `zeekdeps`.
macro(add_extra_builtin_plugin plugin_dir) macro (add_extra_builtin_plugin plugin_dir)
get_filename_component(plugin_name "${plugin_dir}" NAME) get_filename_component(plugin_name "${plugin_dir}" NAME)
if(IS_DIRECTORY "${plugin_dir}/cmake") if (IS_DIRECTORY "${plugin_dir}/cmake")
list(APPEND CMAKE_MODULE_PATH "${plugin_dir}/cmake") list(APPEND CMAKE_MODULE_PATH "${plugin_dir}/cmake")
endif() endif ()
# Set this flag so that ZeekPluginStatic.cmake knows that this plugin is not # Set this flag so that ZeekPluginStatic.cmake knows that this plugin is not
# from our source tree but from an external source (or git submodule). This # from our source tree but from an external source (or git submodule). This
@ -222,36 +199,36 @@ macro(add_extra_builtin_plugin plugin_dir)
# TODO: drop once we turn this into a function. # TODO: drop once we turn this into a function.
set(ZEEK_BUILDING_EXTRA_PLUGINS OFF) set(ZEEK_BUILDING_EXTRA_PLUGINS OFF)
endmacro() endmacro ()
foreach (plugin_dir ${BUILTIN_PLUGIN_LIST}) foreach (plugin_dir ${BUILTIN_PLUGIN_LIST})
add_extra_builtin_plugin("${plugin_dir}") add_extra_builtin_plugin("${plugin_dir}")
endforeach() endforeach ()
install(FILES ${PRELOAD_SCRIPT} DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}/builtin-plugins/) install(FILES ${PRELOAD_SCRIPT} DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}/builtin-plugins/)
install(FILES ${LOAD_SCRIPT} DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}/builtin-plugins/) install(FILES ${LOAD_SCRIPT} DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}/builtin-plugins/)
######################################################################## # ##############################################################################
## This has to happen after the parts for builtin plugins, or else # This has to happen after the parts for builtin plugins, or else symbols are
## symbols are missing when it goes to link the fuzzer binaries. # missing when it goes to link the fuzzer binaries.
add_subdirectory(fuzzers) add_subdirectory(fuzzers)
######################################################################## # ##############################################################################
## zeek target # zeek target
find_package (Threads) find_package(Threads)
# Avoid CMake warning about "3rdparty" looking like a number. # Avoid CMake warning about "3rdparty" looking like a number.
cmake_policy(PUSH) cmake_policy(PUSH)
if (POLICY CMP0012) if (POLICY CMP0012)
cmake_policy(SET CMP0012 NEW) cmake_policy(SET CMP0012 NEW)
endif () endif ()
# This macro stores associated headers for any C/C++ source files given # This macro stores associated headers for any C/C++ source files given as
# as arguments (past _var) as a list in the CMake variable named "_var". # arguments (past _var) as a list in the CMake variable named "_var".
macro(COLLECT_HEADERS _var) macro (COLLECT_HEADERS _var)
foreach (src ${ARGN}) foreach (src ${ARGN})
get_filename_component(ext ${src} EXT) get_filename_component(ext ${src} EXT)
if ("${ext}" STREQUAL ".cc" OR "${ext}" STREQUAL ".c") if ("${ext}" STREQUAL ".cc" OR "${ext}" STREQUAL ".c")
@ -266,39 +243,34 @@ macro(COLLECT_HEADERS _var)
endif () endif ()
endif () endif ()
endforeach () endforeach ()
endmacro(COLLECT_HEADERS _var) endmacro (COLLECT_HEADERS _var)
cmake_policy(POP) cmake_policy(POP)
# define a command that's used to run the make_dbg_constants.py script # define a command that's used to run the make_dbg_constants.py script building
# building the zeek binary depends on the outputs of this script # the zeek binary depends on the outputs of this script
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h add_custom_command(
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc
ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py COMMAND ${PYTHON_EXECUTABLE} ARGS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in ${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/make_dbg_constants.py
${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in ${CMAKE_CURRENT_SOURCE_DIR}/DebugCmdInfoConstants.in
COMMENT "[Python] Processing debug commands" COMMENT "[Python] Processing debug commands"
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
)
add_custom_target( add_custom_target(zeek_debugcmd_gen DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
zeek_debugcmd_gen ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc)
DEPENDS
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc
)
add_dependencies(zeek_autogen_files zeek_debugcmd_gen) add_dependencies(zeek_autogen_files zeek_debugcmd_gen)
set(_gen_zeek_script_cpp ${CMAKE_CURRENT_BINARY_DIR}/../CPP-gen.cc) set(_gen_zeek_script_cpp ${CMAKE_CURRENT_BINARY_DIR}/../CPP-gen.cc)
add_custom_command(OUTPUT ${_gen_zeek_script_cpp} add_custom_command(OUTPUT ${_gen_zeek_script_cpp} COMMAND ${CMAKE_COMMAND} -E touch
COMMAND ${CMAKE_COMMAND} -E touch ${_gen_zeek_script_cpp}) ${_gen_zeek_script_cpp})
if (!MSVC) if (!MSVC)
set_source_files_properties(legacy-netvar-init.cc PROPERTIES COMPILE_FLAGS set_source_files_properties(legacy-netvar-init.cc PROPERTIES COMPILE_FLAGS
-Wno-deprecated-declarations) -Wno-deprecated-declarations)
endif() endif ()
set(MAIN_SRCS set(MAIN_SRCS
digest.cc digest.cc
@ -386,9 +358,7 @@ set(MAIN_SRCS
ZeekArgs.cc ZeekArgs.cc
ZeekString.cc ZeekString.cc
ZVal.cc ZVal.cc
${SUPERVISOR_SRCS} ${SUPERVISOR_SRCS}
threading/BasicThread.cc threading/BasicThread.cc
threading/Formatter.cc threading/Formatter.cc
threading/Manager.cc threading/Manager.cc
@ -396,12 +366,10 @@ set(MAIN_SRCS
threading/SerialTypes.cc threading/SerialTypes.cc
threading/formatters/Ascii.cc threading/formatters/Ascii.cc
threading/formatters/JSON.cc threading/formatters/JSON.cc
plugin/Component.cc plugin/Component.cc
plugin/ComponentManager.h plugin/ComponentManager.h
plugin/Manager.cc plugin/Manager.cc
plugin/Plugin.cc plugin/Plugin.cc
script_opt/CPP/Attrs.cc script_opt/CPP/Attrs.cc
script_opt/CPP/Consts.cc script_opt/CPP/Consts.cc
script_opt/CPP/DeclFunc.cc script_opt/CPP/DeclFunc.cc
@ -421,9 +389,7 @@ set(MAIN_SRCS
script_opt/CPP/Types.cc script_opt/CPP/Types.cc
script_opt/CPP/Util.cc script_opt/CPP/Util.cc
script_opt/CPP/Vars.cc script_opt/CPP/Vars.cc
${_gen_zeek_script_cpp} ${_gen_zeek_script_cpp}
script_opt/Expr.cc script_opt/Expr.cc
script_opt/GenIDDefs.cc script_opt/GenIDDefs.cc
script_opt/IDOptInfo.cc script_opt/IDOptInfo.cc
@ -435,7 +401,6 @@ set(MAIN_SRCS
script_opt/TempVar.cc script_opt/TempVar.cc
script_opt/UsageAnalyzer.cc script_opt/UsageAnalyzer.cc
script_opt/UseDefs.cc script_opt/UseDefs.cc
script_opt/ZAM/AM-Opt.cc script_opt/ZAM/AM-Opt.cc
script_opt/ZAM/Branches.cc script_opt/ZAM/Branches.cc
script_opt/ZAM/BuiltIn.cc script_opt/ZAM/BuiltIn.cc
@ -450,9 +415,7 @@ set(MAIN_SRCS
script_opt/ZAM/ZBody.cc script_opt/ZAM/ZBody.cc
script_opt/ZAM/ZInst.cc script_opt/ZAM/ZInst.cc
script_opt/ZAM/ZOp.cc script_opt/ZAM/ZOp.cc
digest.h)
digest.h
)
set(THIRD_PARTY_SRCS set(THIRD_PARTY_SRCS
3rdparty/bro_inet_ntop.c # Remove in v6.1. 3rdparty/bro_inet_ntop.c # Remove in v6.1.
@ -464,69 +427,58 @@ set(THIRD_PARTY_SRCS
3rdparty/patricia.c 3rdparty/patricia.c
3rdparty/setsignal.c 3rdparty/setsignal.c
$<$<BOOL:USE_SQLITE>:3rdparty/sqlite3.c> $<$<BOOL:USE_SQLITE>:3rdparty/sqlite3.c>
3rdparty/strsep.c 3rdparty/strsep.c)
)
# Highwayhash. Highwayhash is a bit special since it has architecture dependent code... # Highwayhash. Highwayhash is a bit special since it has architecture dependent
# code...
set(hhash_dir ${PROJECT_SOURCE_DIR}/auxil/highwayhash/highwayhash) set(hhash_dir ${PROJECT_SOURCE_DIR}/auxil/highwayhash/highwayhash)
zeek_add_subdir_library( zeek_add_subdir_library(
hhash hhash
SOURCES SOURCES
${hhash_dir}/sip_hash.cc ${hhash_dir}/sip_hash.cc
${hhash_dir}/sip_tree_hash.cc ${hhash_dir}/sip_tree_hash.cc
${hhash_dir}/scalar_sip_tree_hash.cc ${hhash_dir}/scalar_sip_tree_hash.cc
${hhash_dir}/arch_specific.cc ${hhash_dir}/arch_specific.cc
${hhash_dir}/instruction_sets.cc ${hhash_dir}/instruction_sets.cc
${hhash_dir}/nanobenchmark.cc ${hhash_dir}/nanobenchmark.cc
${hhash_dir}/os_specific.cc ${hhash_dir}/os_specific.cc
${hhash_dir}/hh_portable.cc ${hhash_dir}/hh_portable.cc)
)
if (${COMPILER_ARCHITECTURE} STREQUAL "arm") if (${COMPILER_ARCHITECTURE} STREQUAL "arm")
check_c_source_compiles(" check_c_source_compiles(
"
#if defined(__ARM_NEON__) || defined(__ARM_NEON) #if defined(__ARM_NEON__) || defined(__ARM_NEON)
int main() { return 0; } int main() { return 0; }
#else #else
#error #error
#endif #endif
" test_arm_neon) "
test_arm_neon)
if (test_arm_neon) if (test_arm_neon)
target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_neon.cc) target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_neon.cc)
endif () endif ()
target_compile_options( target_compile_options(zeek_hhash_obj PRIVATE -mfloat-abi=hard -march=armv7-a -mfpu=neon)
zeek_hhash_obj
PRIVATE
-mfloat-abi=hard
-march=armv7-a
-mfpu=neon
)
elseif (${COMPILER_ARCHITECTURE} STREQUAL "aarch64") elseif (${COMPILER_ARCHITECTURE} STREQUAL "aarch64")
target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_neon.cc) target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_neon.cc)
elseif (${COMPILER_ARCHITECTURE} STREQUAL "power") elseif (${COMPILER_ARCHITECTURE} STREQUAL "power")
target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_vsx.cc) target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_vsx.cc)
set_source_files_properties(${hhash_dir}/hh_vsx.cc PROPERTIES COMPILE_FLAGS set_source_files_properties(${hhash_dir}/hh_vsx.cc PROPERTIES COMPILE_FLAGS -mvsx)
-mvsx) elseif (${COMPILER_ARCHITECTURE} STREQUAL "x86_64")
elseif(${COMPILER_ARCHITECTURE} STREQUAL "x86_64") target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_avx2.cc ${hhash_dir}/hh_sse41.cc)
target_sources( if (MSVC)
zeek_hhash_obj set(_avx_flag /arch:AVX2)
PRIVATE # Using an undocumentd compiler flag:
${hhash_dir}/hh_avx2.cc # https://stackoverflow.com/questions/64053597/how-do-i-enable-sse4-1-and-sse3-but-not-avx-in-msvc/69328426#69328426
${hhash_dir}/hh_sse41.cc) set(_sse_flag /d2archSSE42)
if (MSVC) else ()
set(_avx_flag /arch:AVX2) set(_avx_flag -mavx2)
# Using an undocumentd compiler flag: https://stackoverflow.com/questions/64053597/how-do-i-enable-sse4-1-and-sse3-but-not-avx-in-msvc/69328426#69328426 set(_sse_flag -msse4.1)
set(_sse_flag /d2archSSE42) endif ()
else()
set(_avx_flag -mavx2)
set(_sse_flag -msse4.1)
endif()
set_source_files_properties(${hhash_dir}/hh_avx2.cc PROPERTIES COMPILE_FLAGS set_source_files_properties(${hhash_dir}/hh_avx2.cc PROPERTIES COMPILE_FLAGS ${_avx_flag})
${_avx_flag}) set_source_files_properties(${hhash_dir}/hh_sse41.cc PROPERTIES COMPILE_FLAGS ${_sse_flag})
set_source_files_properties(${hhash_dir}/hh_sse41.cc PROPERTIES COMPILE_FLAGS
${_sse_flag})
endif () endif ()
set(zeek_SRCS set(zeek_SRCS
@ -550,8 +502,7 @@ set(zeek_SRCS
${CMAKE_CURRENT_BINARY_DIR}/ZAM-MethodDecls.h ${CMAKE_CURRENT_BINARY_DIR}/ZAM-MethodDecls.h
${THIRD_PARTY_SRCS} ${THIRD_PARTY_SRCS}
${HH_SRCS} ${HH_SRCS}
${MAIN_SRCS} ${MAIN_SRCS})
)
collect_headers(zeek_HEADERS ${zeek_SRCS}) collect_headers(zeek_HEADERS ${zeek_SRCS})
@ -564,35 +515,31 @@ zeek_target_link_libraries(zeek_objs)
if (TARGET zeek_exe) if (TARGET zeek_exe)
target_sources(zeek_exe PRIVATE main.cc ${zeek_HEADERS}) target_sources(zeek_exe PRIVATE main.cc ${zeek_HEADERS})
# npcap/winpcap need to be loaded in delayed mode so that we can set the load path # npcap/winpcap need to be loaded in delayed mode so that we can set the load
# correctly at runtime. See https://npcap.com/guide/npcap-devguide.html#npcap-feature-native # path correctly at runtime. See
# for why this is necessary. # https://npcap.com/guide/npcap-devguide.html#npcap-feature-native for why
if ( MSVC AND HAVE_WPCAP ) # this is necessary.
if (MSVC AND HAVE_WPCAP)
set(zeekdeps ${zeekdeps} delayimp.lib) set(zeekdeps ${zeekdeps} delayimp.lib)
set_target_properties(zeek_exe PROPERTIES LINK_FLAGS "/DELAYLOAD:wpcap.dll") set_target_properties(zeek_exe PROPERTIES LINK_FLAGS "/DELAYLOAD:wpcap.dll")
endif() endif ()
target_link_libraries(zeek_exe PRIVATE ${zeekdeps} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) target_link_libraries(zeek_exe PRIVATE ${zeekdeps} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
# Export symbols from zeek executable for use by plugins # Export symbols from zeek executable for use by plugins
set_target_properties(zeek_exe PROPERTIES ENABLE_EXPORTS TRUE) set_target_properties(zeek_exe PROPERTIES ENABLE_EXPORTS TRUE)
if ( MSVC ) if (MSVC)
set(WINDOWS_EXPORT_ALL_SYMBOLS ON) set(WINDOWS_EXPORT_ALL_SYMBOLS ON)
endif () endif ()
endif() endif ()
if (TARGET zeek_lib) if (TARGET zeek_lib)
target_sources(zeek_lib PRIVATE ${zeek_HEADERS}) target_sources(zeek_lib PRIVATE ${zeek_HEADERS})
target_link_libraries( target_link_libraries(zeek_lib PUBLIC ${zeekdeps} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
zeek_lib endif ()
PUBLIC
${zeekdeps}
${CMAKE_THREAD_LIBS_INIT}
${CMAKE_DL_LIBS})
endif()
zeek_include_directories( zeek_include_directories(
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
@ -601,21 +548,23 @@ zeek_include_directories(
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/zeek/src ${CMAKE_SOURCE_DIR}/zeek/src
${CMAKE_SOURCE_DIR}/zeek/src/include ${CMAKE_SOURCE_DIR}/zeek/src/include)
)
# Install *.bif.zeek. # Install *.bif.zeek.
install(DIRECTORY ${PROJECT_BINARY_DIR}/scripts/base/bif DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}/base) install(DIRECTORY ${PROJECT_BINARY_DIR}/scripts/base/bif
DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}/base)
# Create plugin directory at install time. # Create plugin directory at install time.
install(DIRECTORY DESTINATION ${ZEEK_PLUGIN_DIR}) install(DIRECTORY DESTINATION ${ZEEK_PLUGIN_DIR})
# Make clean removes the bif directory. # Make clean removes the bif directory.
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES ${PROJECT_BINARY_DIR}/scripts/base/bif) set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
${PROJECT_BINARY_DIR}/scripts/base/bif)
# Remove some stale files and scripts that previous Zeek versions put in # Remove some stale files and scripts that previous Zeek versions put in place,
# place, yet make confuse us now. This makes upgrading easier. # yet make confuse us now. This makes upgrading easier.
install(CODE " install(
CODE "
file(REMOVE_RECURSE file(REMOVE_RECURSE
${ZEEK_SCRIPT_INSTALL_PATH}/base/frameworks/logging/writers/dataseries.bro ${ZEEK_SCRIPT_INSTALL_PATH}/base/frameworks/logging/writers/dataseries.bro
${ZEEK_SCRIPT_INSTALL_PATH}/base/frameworks/logging/writers/elasticsearch.bro ${ZEEK_SCRIPT_INSTALL_PATH}/base/frameworks/logging/writers/elasticsearch.bro
@ -623,60 +572,59 @@ install(CODE "
) )
") ")
# Make sure to escape a bunch of special characters in the path before trying to use it as a # Make sure to escape a bunch of special characters in the path before trying to
# regular expression below. # use it as a regular expression below.
string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" escaped_include_path "${CMAKE_CURRENT_SOURCE_DIR}/include/*") string(REGEX REPLACE "([][+.*()^])" "\\\\\\1" escaped_include_path
"${CMAKE_CURRENT_SOURCE_DIR}/include/*")
if (WIN32) if (WIN32)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/windows/usr.include/ install(
DESTINATION include/ DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/windows/usr.include/
FILES_MATCHING DESTINATION include/
PATTERN "*.h"
)
endif()
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
DESTINATION include/zeek
FILES_MATCHING FILES_MATCHING
PATTERN "*.h" PATTERN "*.h")
PATTERN "*.pac" endif ()
PATTERN "3rdparty/*" EXCLUDE
# The "zeek -> ." symlink isn't needed in the install-tree
REGEX "${escaped_include_path}$" EXCLUDE
# FILES_MATCHING creates empty directories: install(
# https://gitlab.kitware.com/cmake/cmake/-/issues/17122 DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/
# Exclude the ones that this affects explicitly. DESTINATION include/zeek
PATTERN "script_opt/CPP/maint" EXCLUDE FILES_MATCHING
PATTERN "fuzzers/corpora" EXCLUDE PATTERN "*.h"
) PATTERN "*.pac"
PATTERN "3rdparty/*" EXCLUDE
# The "zeek -> ." symlink isn't needed in the install-tree
REGEX "${escaped_include_path}$" EXCLUDE
# FILES_MATCHING creates empty directories:
# https://gitlab.kitware.com/cmake/cmake/-/issues/17122 Exclude the ones that
# this affects explicitly.
PATTERN "script_opt/CPP/maint" EXCLUDE
PATTERN "fuzzers/corpora" EXCLUDE)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ install(
DESTINATION include/zeek DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/
FILES_MATCHING DESTINATION include/zeek
PATTERN "*.bif.func_h" FILES_MATCHING
PATTERN "*.bif.netvar_h" PATTERN "*.bif.func_h"
PATTERN "*.bif.h" PATTERN "*.bif.netvar_h"
PATTERN "CMakeFiles" EXCLUDE PATTERN "*.bif.h"
# The "include/zeek -> .." symlink isn't needed in the install-tree PATTERN "CMakeFiles" EXCLUDE
REGEX "${escaped_include_path}$" EXCLUDE # The "include/zeek -> .." symlink isn't needed in the install-tree
) REGEX "${escaped_include_path}$" EXCLUDE)
install(FILES install(
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/ConvertUTF.h FILES ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/ConvertUTF.h
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/bro_inet_ntop.h # Remove in v6.1 ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/bro_inet_ntop.h # Remove in v6.1
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/zeek_inet_ntop.h ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/zeek_inet_ntop.h
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/bsd-getopt-long.h ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/bsd-getopt-long.h
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/modp_numtoa.h ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/modp_numtoa.h
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/patricia.h ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/patricia.h
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/setsignal.h ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/setsignal.h
$<$<BOOL:USE_SQLITE>:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/sqlite3.h> $<$<BOOL:USE_SQLITE>:${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/sqlite3.h>
${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/doctest.h ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/doctest.h
DESTINATION include/zeek/3rdparty DESTINATION include/zeek/3rdparty)
)
######################################################################## # ##############################################################################
## Clang-tidy target now that we have all of the sources # Clang-tidy target now that we have all of the sources
add_clang_tidy_files(${MAIN_SRCS}) add_clang_tidy_files(${MAIN_SRCS})
@ -685,23 +633,22 @@ add_clang_tidy_files(${MAIN_SRCS})
# *.bif.register.cc) # *.bif.register.cc)
create_clang_tidy_target() create_clang_tidy_target()
######################################################################## # ##############################################################################
## CTest setup. # CTest setup.
# Scan all .cc files for TEST_CASE macros and generate CTest targets. # Scan all .cc files for TEST_CASE macros and generate CTest targets.
if (ENABLE_ZEEK_UNIT_TESTS) if (ENABLE_ZEEK_UNIT_TESTS)
set(test_cases "") set(test_cases "")
foreach (cc_file ${TIDY_SRCS}) foreach (cc_file ${TIDY_SRCS})
file (STRINGS ${cc_file} test_case_lines REGEX "TEST_CASE") file(STRINGS ${cc_file} test_case_lines REGEX "TEST_CASE")
foreach (line ${test_case_lines}) foreach (line ${test_case_lines})
string(REGEX REPLACE "TEST_CASE\\(\"(.+)\"\\)" "\\1" test_case "${line}") string(REGEX REPLACE "TEST_CASE\\(\"(.+)\"\\)" "\\1" test_case "${line}")
list(APPEND test_cases "${test_case}") list(APPEND test_cases "${test_case}")
endforeach () endforeach ()
endforeach () endforeach ()
list(LENGTH test_cases num_test_cases) list(LENGTH test_cases num_test_cases)
MESSAGE(STATUS "-- Found ${num_test_cases} test cases for CTest") message(STATUS "-- Found ${num_test_cases} test cases for CTest")
foreach (test_case ${test_cases}) foreach (test_case ${test_cases})
add_test(NAME "\"${test_case}\"" add_test(NAME "\"${test_case}\"" COMMAND zeek --test "--test-case=${test_case}")
COMMAND zeek --test "--test-case=${test_case}")
endforeach () endforeach ()
endif () endif ()

View file

@ -1,12 +1,14 @@
zeek_add_subdir_library( zeek_add_subdir_library(
analyzer analyzer
INTERNAL_DEPENDENCIES ${BIF_BUILD_TARGET} INTERNAL_DEPENDENCIES
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${BIF_BUILD_TARGET}
INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
SOURCES SOURCES
Analyzer.cc Analyzer.cc
Component.cc Component.cc
Manager.cc Manager.cc)
)
# Treat BIFs as builtin (alternative mode). # Treat BIFs as builtin (alternative mode).
bif_target(analyzer.bif) bif_target(analyzer.bif)

View file

@ -2,13 +2,12 @@ zeek_add_plugin(
Zeek Zeek
BitTorrent BitTorrent
SOURCES SOURCES
BitTorrent.cc BitTorrent.cc
BitTorrentTracker.cc BitTorrentTracker.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
bittorrent.pac bittorrent.pac
bittorrent-analyzer.pac bittorrent-analyzer.pac
bittorrent-protocol.pac bittorrent-protocol.pac)
)

View file

@ -2,9 +2,8 @@ zeek_add_plugin(
Zeek Zeek
ConnSize ConnSize
SOURCES SOURCES
ConnSize.cc ConnSize.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
functions.bif functions.bif)
)

View file

@ -2,17 +2,16 @@ zeek_add_plugin(
Zeek Zeek
DCE_RPC DCE_RPC
SOURCES SOURCES
DCE_RPC.cc DCE_RPC.cc
Plugin.cc Plugin.cc
BIFS BIFS
consts.bif consts.bif
types.bif types.bif
events.bif events.bif
PAC PAC
dce_rpc.pac dce_rpc.pac
dce_rpc-protocol.pac dce_rpc-protocol.pac
dce_rpc-analyzer.pac dce_rpc-analyzer.pac
dce_rpc-auth.pac dce_rpc-auth.pac
endpoint-atsvc.pac endpoint-atsvc.pac
endpoint-epmapper.pac endpoint-epmapper.pac)
)

View file

@ -2,14 +2,13 @@ zeek_add_plugin(
Zeek Zeek
DHCP DHCP
SOURCES SOURCES
DHCP.cc DHCP.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
types.bif types.bif
PAC PAC
dhcp.pac dhcp.pac
dhcp-protocol.pac dhcp-protocol.pac
dhcp-analyzer.pac dhcp-analyzer.pac
dhcp-options.pac dhcp-options.pac)
)

View file

@ -2,13 +2,12 @@ zeek_add_plugin(
Zeek Zeek
DNP3 DNP3
SOURCES SOURCES
DNP3.cc DNP3.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
dnp3.pac dnp3.pac
dnp3-analyzer.pac dnp3-analyzer.pac
dnp3-protocol.pac dnp3-protocol.pac
dnp3-objects.pac dnp3-objects.pac)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
DNS DNS
SOURCES SOURCES
DNS.cc DNS.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
File File
SOURCES SOURCES
File.cc File.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -1,9 +1,8 @@
spicy_add_analyzer( spicy_add_analyzer(
NAME NAME
Finger Finger
SOURCES SOURCES
finger.spicy finger.spicy
finger.evt finger.evt
LEGACY LEGACY
legacy legacy)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
Finger Finger
SOURCES SOURCES
Finger.cc Finger.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,9 +2,8 @@ zeek_add_plugin(
Zeek Zeek
FTP FTP
SOURCES SOURCES
FTP.cc FTP.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
functions.bif functions.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
Gnutella Gnutella
SOURCES SOURCES
Gnutella.cc Gnutella.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,13 +2,12 @@ zeek_add_plugin(
Zeek Zeek
GSSAPI GSSAPI
SOURCES SOURCES
GSSAPI.cc GSSAPI.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
gssapi.pac gssapi.pac
gssapi-protocol.pac gssapi-protocol.pac
gssapi-analyzer.pac gssapi-analyzer.pac
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac ${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac)
)

View file

@ -2,9 +2,8 @@ zeek_add_plugin(
Zeek Zeek
HTTP HTTP
SOURCES SOURCES
HTTP.cc HTTP.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
functions.bif functions.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
Ident Ident
SOURCES SOURCES
Ident.cc Ident.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,12 +2,11 @@ zeek_add_plugin(
Zeek Zeek
IMAP IMAP
SOURCES SOURCES
Plugin.cc Plugin.cc
IMAP.cc IMAP.cc
BIFS BIFS
events.bif events.bif
PAC PAC
imap.pac imap.pac
imap-analyzer.pac imap-analyzer.pac
imap-protocol.pac imap-protocol.pac)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
IRC IRC
SOURCES SOURCES
IRC.cc IRC.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,28 +2,27 @@ zeek_add_plugin(
Zeek Zeek
KRB KRB
SOURCES SOURCES
Plugin.cc Plugin.cc
KRB.cc KRB.cc
KRB_TCP.cc KRB_TCP.cc
BIFS BIFS
types.bif types.bif
events.bif events.bif
PAC PAC
krb.pac krb.pac
krb-protocol.pac krb-protocol.pac
krb-analyzer.pac krb-analyzer.pac
krb-asn1.pac krb-asn1.pac
krb-defs.pac krb-defs.pac
krb-types.pac krb-types.pac
krb-padata.pac krb-padata.pac
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac ${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac
PAC PAC
krb_TCP.pac krb_TCP.pac
krb-protocol.pac krb-protocol.pac
krb-analyzer.pac krb-analyzer.pac
krb-asn1.pac krb-asn1.pac
krb-defs.pac krb-defs.pac
krb-types.pac krb-types.pac
krb-padata.pac krb-padata.pac
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac ${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac)
)

View file

@ -2,13 +2,12 @@ zeek_add_plugin(
Zeek Zeek
Login Login
SOURCES SOURCES
Login.cc Login.cc
RSH.cc RSH.cc
Telnet.cc Telnet.cc
Rlogin.cc Rlogin.cc
NVT.cc NVT.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
functions.bif functions.bif)
)

View file

@ -7,8 +7,7 @@ zeek_add_plugin(
Zeek Zeek
MIME MIME
SOURCES SOURCES
MIME.cc MIME.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,12 +2,11 @@ zeek_add_plugin(
Zeek Zeek
Modbus Modbus
SOURCES SOURCES
Modbus.cc Modbus.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
modbus.pac modbus.pac
modbus-analyzer.pac modbus-analyzer.pac
modbus-protocol.pac modbus-protocol.pac)
)

View file

@ -2,26 +2,25 @@ zeek_add_plugin(
Zeek Zeek
MQTT MQTT
SOURCES SOURCES
MQTT.cc MQTT.cc
Plugin.cc Plugin.cc
BIFS BIFS
types.bif types.bif
events.bif events.bif
PAC PAC
mqtt.pac mqtt.pac
mqtt-protocol.pac mqtt-protocol.pac
commands/connect.pac commands/connect.pac
commands/connack.pac commands/connack.pac
commands/publish.pac commands/publish.pac
commands/puback.pac commands/puback.pac
commands/pubrec.pac commands/pubrec.pac
commands/pubrel.pac commands/pubrel.pac
commands/pubcomp.pac commands/pubcomp.pac
commands/subscribe.pac commands/subscribe.pac
commands/suback.pac commands/suback.pac
commands/unsuback.pac commands/unsuback.pac
commands/unsubscribe.pac commands/unsubscribe.pac
commands/disconnect.pac commands/disconnect.pac
commands/pingreq.pac commands/pingreq.pac
commands/pingresp.pac commands/pingresp.pac)
)

View file

@ -2,12 +2,11 @@ zeek_add_plugin(
Zeek Zeek
MySQL MySQL
SOURCES SOURCES
MySQL.cc MySQL.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
mysql.pac mysql.pac
mysql-analyzer.pac mysql-analyzer.pac
mysql-protocol.pac mysql-protocol.pac)
)

View file

@ -2,11 +2,10 @@ zeek_add_plugin(
Zeek Zeek
NCP NCP
SOURCES SOURCES
NCP.cc NCP.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
consts.bif consts.bif
PAC PAC
ncp.pac ncp.pac)
)

View file

@ -2,9 +2,8 @@ zeek_add_plugin(
Zeek Zeek
NetBIOS NetBIOS
SOURCES SOURCES
NetbiosSSN.cc NetbiosSSN.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
functions.bif functions.bif)
)

View file

@ -2,13 +2,12 @@ zeek_add_plugin(
Zeek Zeek
NTLM NTLM
SOURCES SOURCES
NTLM.cc NTLM.cc
Plugin.cc Plugin.cc
BIFS BIFS
types.bif types.bif
events.bif events.bif
PAC PAC
ntlm.pac ntlm.pac
ntlm-protocol.pac ntlm-protocol.pac
ntlm-analyzer.pac ntlm-analyzer.pac)
)

View file

@ -2,14 +2,13 @@ zeek_add_plugin(
Zeek Zeek
NTP NTP
SOURCES SOURCES
NTP.cc NTP.cc
Plugin.cc Plugin.cc
BIFS BIFS
types.bif types.bif
events.bif events.bif
PAC PAC
ntp.pac ntp.pac
ntp-analyzer.pac ntp-analyzer.pac
ntp-mode7.pac ntp-mode7.pac
ntp-protocol.pac ntp-protocol.pac)
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(Zeek PIA SOURCES PIA.cc Plugin.cc)
Zeek
PIA
SOURCES
PIA.cc
Plugin.cc
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
POP3 POP3
SOURCES SOURCES
POP3.cc POP3.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,12 +2,11 @@ zeek_add_plugin(
Zeek Zeek
RADIUS RADIUS
SOURCES SOURCES
RADIUS.cc RADIUS.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
radius.pac radius.pac
radius-analyzer.pac radius-analyzer.pac
radius-protocol.pac radius-protocol.pac)
)

View file

@ -2,19 +2,18 @@ zeek_add_plugin(
Zeek Zeek
RDP RDP
SOURCES SOURCES
RDPEUDP.cc RDPEUDP.cc
RDP.cc RDP.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
types.bif types.bif
PAC PAC
rdp.pac rdp.pac
rdp-analyzer.pac rdp-analyzer.pac
rdp-protocol.pac rdp-protocol.pac
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac ${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac
PAC PAC
rdpeudp.pac rdpeudp.pac
rdpeudp-analyzer.pac rdpeudp-analyzer.pac
rdpeudp-protocol.pac rdpeudp-protocol.pac)
)

View file

@ -2,12 +2,11 @@ zeek_add_plugin(
Zeek Zeek
RFB RFB
SOURCES SOURCES
RFB.cc RFB.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
rfb.pac rfb.pac
rfb-analyzer.pac rfb-analyzer.pac
rfb-protocol.pac rfb-protocol.pac)
)

View file

@ -2,12 +2,11 @@ zeek_add_plugin(
Zeek Zeek
RPC RPC
SOURCES SOURCES
RPC.cc RPC.cc
NFS.cc NFS.cc
MOUNT.cc MOUNT.cc
Portmap.cc Portmap.cc
XDR.cc XDR.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,17 +2,16 @@ zeek_add_plugin(
Zeek Zeek
SIP SIP
SOURCES SOURCES
Plugin.cc Plugin.cc
SIP.cc SIP.cc
SIP_TCP.cc SIP_TCP.cc
BIFS BIFS
events.bif events.bif
PAC PAC
sip.pac sip.pac
sip-analyzer.pac sip-analyzer.pac
sip-protocol.pac sip-protocol.pac
PAC PAC
sip_TCP.pac sip_TCP.pac
sip-protocol.pac sip-protocol.pac
sip-analyzer.pac sip-analyzer.pac)
)

View file

@ -2,88 +2,87 @@ zeek_add_plugin(
Zeek Zeek
SMB SMB
SOURCES SOURCES
SMB.cc SMB.cc
Plugin.cc Plugin.cc
BIFS BIFS
# SMB 1. # SMB 1.
smb1_com_check_directory.bif smb1_com_check_directory.bif
smb1_com_close.bif smb1_com_close.bif
smb1_com_create_directory.bif smb1_com_create_directory.bif
smb1_com_echo.bif smb1_com_echo.bif
smb1_com_logoff_andx.bif smb1_com_logoff_andx.bif
smb1_com_negotiate.bif smb1_com_negotiate.bif
smb1_com_nt_create_andx.bif smb1_com_nt_create_andx.bif
smb1_com_nt_cancel.bif smb1_com_nt_cancel.bif
smb1_com_query_information.bif smb1_com_query_information.bif
smb1_com_read_andx.bif smb1_com_read_andx.bif
smb1_com_session_setup_andx.bif smb1_com_session_setup_andx.bif
smb1_com_transaction.bif smb1_com_transaction.bif
smb1_com_transaction_secondary.bif smb1_com_transaction_secondary.bif
smb1_com_transaction2.bif smb1_com_transaction2.bif
smb1_com_transaction2_secondary.bif smb1_com_transaction2_secondary.bif
smb1_com_tree_connect_andx.bif smb1_com_tree_connect_andx.bif
smb1_com_tree_disconnect.bif smb1_com_tree_disconnect.bif
smb1_com_write_andx.bif smb1_com_write_andx.bif
smb1_events.bif smb1_events.bif
# SMB 2. # SMB 2.
smb2_com_close.bif smb2_com_close.bif
smb2_com_create.bif smb2_com_create.bif
smb2_com_negotiate.bif smb2_com_negotiate.bif
smb2_com_read.bif smb2_com_read.bif
smb2_com_session_setup.bif smb2_com_session_setup.bif
smb2_com_set_info.bif smb2_com_set_info.bif
smb2_com_tree_connect.bif smb2_com_tree_connect.bif
smb2_com_tree_disconnect.bif smb2_com_tree_disconnect.bif
smb2_com_write.bif smb2_com_write.bif
smb2_com_transform_header.bif smb2_com_transform_header.bif
smb2_events.bif smb2_events.bif
# Common boilerplate. # Common boilerplate.
events.bif events.bif
consts.bif consts.bif
types.bif types.bif
PAC PAC
# Common boilerplate. # Common boilerplate.
smb.pac smb.pac
smb-common.pac smb-common.pac
smb-strings.pac smb-strings.pac
smb-time.pac smb-time.pac
smb-pipe.pac smb-pipe.pac
smb-gssapi.pac smb-gssapi.pac
smb-mailslot.pac smb-mailslot.pac
# SMB 1. # SMB 1.
smb1-protocol.pac smb1-protocol.pac
smb1-com-check-directory.pac smb1-com-check-directory.pac
smb1-com-close.pac smb1-com-close.pac
smb1-com-create-directory.pac smb1-com-create-directory.pac
smb1-com-echo.pac smb1-com-echo.pac
smb1-com-locking-andx.pac smb1-com-locking-andx.pac
smb1-com-logoff-andx.pac smb1-com-logoff-andx.pac
smb1-com-negotiate.pac smb1-com-negotiate.pac
smb1-com-nt-cancel.pac smb1-com-nt-cancel.pac
smb1-com-nt-create-andx.pac smb1-com-nt-create-andx.pac
smb1-com-nt-transact.pac smb1-com-nt-transact.pac
smb1-com-query-information.pac smb1-com-query-information.pac
smb1-com-read-andx.pac smb1-com-read-andx.pac
smb1-com-session-setup-andx.pac smb1-com-session-setup-andx.pac
smb1-com-transaction-secondary.pac smb1-com-transaction-secondary.pac
smb1-com-transaction.pac smb1-com-transaction.pac
smb1-com-transaction2.pac smb1-com-transaction2.pac
smb1-com-transaction2-secondary.pac smb1-com-transaction2-secondary.pac
smb1-com-tree-connect-andx.pac smb1-com-tree-connect-andx.pac
smb1-com-tree-disconnect.pac smb1-com-tree-disconnect.pac
smb1-com-write-andx.pac smb1-com-write-andx.pac
# SMB 2. # SMB 2.
smb2-protocol.pac smb2-protocol.pac
smb2-com-close.pac smb2-com-close.pac
smb2-com-create.pac smb2-com-create.pac
smb2-com-ioctl.pac smb2-com-ioctl.pac
smb2-com-lock.pac smb2-com-lock.pac
smb2-com-negotiate.pac smb2-com-negotiate.pac
smb2-com-read.pac smb2-com-read.pac
smb2-com-session-setup.pac smb2-com-session-setup.pac
smb2-com-set-info.pac smb2-com-set-info.pac
smb2-com-tree-connect.pac smb2-com-tree-connect.pac
smb2-com-tree-disconnect.pac smb2-com-tree-disconnect.pac
smb2-com-write.pac smb2-com-write.pac
smb2-com-transform-header.pac smb2-com-transform-header.pac)
)

View file

@ -2,9 +2,8 @@ zeek_add_plugin(
Zeek Zeek
SMTP SMTP
SOURCES SOURCES
SMTP.cc SMTP.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
functions.bif functions.bif)
)

View file

@ -2,14 +2,13 @@ zeek_add_plugin(
Zeek Zeek
SNMP SNMP
SOURCES SOURCES
SNMP.cc SNMP.cc
Plugin.cc Plugin.cc
BIFS BIFS
types.bif types.bif
events.bif events.bif
PAC PAC
snmp.pac snmp.pac
snmp-protocol.pac snmp-protocol.pac
snmp-analyzer.pac snmp-analyzer.pac
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac ${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac)
)

View file

@ -2,12 +2,11 @@ zeek_add_plugin(
Zeek Zeek
SOCKS SOCKS
SOURCES SOURCES
SOCKS.cc SOCKS.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
socks.pac socks.pac
socks-protocol.pac socks-protocol.pac
socks-analyzer.pac socks-analyzer.pac)
)

View file

@ -2,14 +2,13 @@ zeek_add_plugin(
Zeek Zeek
SSH SSH
SOURCES SOURCES
SSH.cc SSH.cc
Plugin.cc Plugin.cc
BIFS BIFS
types.bif types.bif
events.bif events.bif
PAC PAC
ssh.pac ssh.pac
ssh-analyzer.pac ssh-analyzer.pac
ssh-protocol.pac ssh-protocol.pac
consts.pac consts.pac)
)

View file

@ -2,34 +2,33 @@ zeek_add_plugin(
Zeek Zeek
SSL SSL
SOURCES SOURCES
SSL.cc SSL.cc
DTLS.cc DTLS.cc
Plugin.cc Plugin.cc
BIFS BIFS
types.bif types.bif
events.bif events.bif
functions.bif functions.bif
consts.bif consts.bif
PAC PAC
tls-handshake.pac tls-handshake.pac
tls-handshake-protocol.pac tls-handshake-protocol.pac
tls-handshake-analyzer.pac tls-handshake-analyzer.pac
ssl-defs.pac ssl-defs.pac
proc-certificate.pac proc-certificate.pac
tls-handshake-signed_certificate_timestamp.pac tls-handshake-signed_certificate_timestamp.pac
PAC PAC
ssl.pac ssl.pac
ssl-dtls-analyzer.pac ssl-dtls-analyzer.pac
ssl-analyzer.pac ssl-analyzer.pac
ssl-dtls-protocol.pac ssl-dtls-protocol.pac
ssl-protocol.pac ssl-protocol.pac
ssl-defs.pac ssl-defs.pac
proc-certificate.pac proc-certificate.pac
PAC PAC
dtls.pac dtls.pac
ssl-dtls-analyzer.pac ssl-dtls-analyzer.pac
dtls-analyzer.pac dtls-analyzer.pac
ssl-dtls-protocol.pac ssl-dtls-protocol.pac
dtls-protocol.pac dtls-protocol.pac
ssl-defs.pac ssl-defs.pac)
)

View file

@ -1,9 +1,8 @@
spicy_add_analyzer( spicy_add_analyzer(
NAME NAME
Syslog Syslog
SOURCES SOURCES
syslog.spicy syslog.spicy
syslog.evt syslog.evt
LEGACY LEGACY
legacy legacy)
)

View file

@ -2,12 +2,11 @@ zeek_add_plugin(
Zeek Zeek
Syslog Syslog
SOURCES SOURCES
Syslog.cc Syslog.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
syslog.pac syslog.pac
syslog-analyzer.pac syslog-analyzer.pac
syslog-protocol.pac syslog-protocol.pac)
)

View file

@ -2,13 +2,12 @@ zeek_add_plugin(
Zeek Zeek
TCP TCP
SOURCES SOURCES
TCP.cc TCP.cc
TCP_Endpoint.cc TCP_Endpoint.cc
TCP_Reassembler.cc TCP_Reassembler.cc
ContentLine.cc ContentLine.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
types.bif types.bif
functions.bif functions.bif)
)

View file

@ -2,12 +2,11 @@ zeek_add_plugin(
Zeek Zeek
XMPP XMPP
SOURCES SOURCES
Plugin.cc Plugin.cc
XMPP.cc XMPP.cc
BIFS BIFS
events.bif events.bif
PAC PAC
xmpp.pac xmpp.pac
xmpp-analyzer.pac xmpp-analyzer.pac
xmpp-protocol.pac xmpp-protocol.pac)
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(Zeek ZIP SOURCES ZIP.cc Plugin.cc)
Zeek
ZIP
SOURCES
ZIP.cc
Plugin.cc
)

View file

@ -1,13 +1,14 @@
zeek_add_subdir_library( zeek_add_subdir_library(
comm comm
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
SOURCES SOURCES
Data.cc Data.cc
Manager.cc Manager.cc
Store.cc Store.cc
BIFS BIFS
comm.bif comm.bif
data.bif data.bif
messaging.bif messaging.bif
store.bif store.bif)
)

View file

@ -1,16 +1,17 @@
zeek_add_subdir_library( zeek_add_subdir_library(
file_analysis file_analysis
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
SOURCES SOURCES
Manager.cc Manager.cc
File.cc File.cc
FileTimer.cc FileTimer.cc
FileReassembler.cc FileReassembler.cc
Analyzer.cc Analyzer.cc
AnalyzerSet.cc AnalyzerSet.cc
Component.cc Component.cc
BIFS BIFS
file_analysis.bif file_analysis.bif)
)
add_subdirectory(analyzer) add_subdirectory(analyzer)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
FileDataEvent FileDataEvent
SOURCES SOURCES
DataEvent.cc DataEvent.cc
Plugin.cc Plugin.cc
INCLUDE_DIRS INCLUDE_DIRS
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}")
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
FileEntropy FileEntropy
SOURCES SOURCES
Entropy.cc Entropy.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,9 +2,8 @@ zeek_add_plugin(
Zeek Zeek
FileExtract FileExtract
SOURCES SOURCES
Extract.cc Extract.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
functions.bif functions.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
FileHash FileHash
SOURCES SOURCES
Hash.cc Hash.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -2,15 +2,14 @@ zeek_add_plugin(
Zeek Zeek
PE PE
SOURCES SOURCES
PE.cc PE.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
PAC PAC
pe.pac pe.pac
pe-analyzer.pac pe-analyzer.pac
pe-file-headers.pac pe-file-headers.pac
pe-file-idata.pac pe-file-idata.pac
pe-file.pac pe-file.pac
pe-file-types.pac pe-file-types.pac)
)

View file

@ -2,16 +2,15 @@ zeek_add_plugin(
Zeek Zeek
X509 X509
SOURCES SOURCES
X509Common.cc X509Common.cc
X509.cc X509.cc
OCSP.cc OCSP.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
types.bif types.bif
functions.bif functions.bif
ocsp_events.bif ocsp_events.bif
PAC PAC
x509-extension.pac x509-extension.pac
x509-signed_certificate_timestamp.pac x509-signed_certificate_timestamp.pac)
)

View file

@ -1,18 +1,18 @@
######################################################################## # ##############################################################################
## Fuzzing targets # Fuzzing targets
if ( NOT ZEEK_ENABLE_FUZZERS ) if (NOT ZEEK_ENABLE_FUZZERS)
return() return()
endif () endif ()
if ( NOT DEFINED ZEEK_FUZZING_ENGINE AND DEFINED ENV{LIB_FUZZING_ENGINE} ) if (NOT DEFINED ZEEK_FUZZING_ENGINE AND DEFINED ENV{LIB_FUZZING_ENGINE})
if ( "$ENV{LIB_FUZZING_ENGINE}" STREQUAL "" ) if ("$ENV{LIB_FUZZING_ENGINE}" STREQUAL "")
# Empty LIB_FUZZING_ENGINE, assume libFuzzer # Empty LIB_FUZZING_ENGINE, assume libFuzzer
set(ZEEK_FUZZING_ENGINE "-fsanitize=fuzzer" CACHE INTERNAL "" FORCE) set(ZEEK_FUZZING_ENGINE "-fsanitize=fuzzer" CACHE INTERNAL "" FORCE)
else () else ()
STRING(SUBSTRING "$ENV{LIB_FUZZING_ENGINE}" 0 1 _first_char) string(SUBSTRING "$ENV{LIB_FUZZING_ENGINE}" 0 1 _first_char)
if ( "${_first_char}" STREQUAL "-" OR EXISTS "$ENV{LIB_FUZZING_ENGINE}" ) if ("${_first_char}" STREQUAL "-" OR EXISTS "$ENV{LIB_FUZZING_ENGINE}")
# Looks like a linker flag or valid file, use it # Looks like a linker flag or valid file, use it
set(ZEEK_FUZZING_ENGINE "$ENV{LIB_FUZZING_ENGINE}" CACHE INTERNAL "" FORCE) set(ZEEK_FUZZING_ENGINE "$ENV{LIB_FUZZING_ENGINE}" CACHE INTERNAL "" FORCE)
else () else ()
@ -23,37 +23,36 @@ if ( NOT DEFINED ZEEK_FUZZING_ENGINE AND DEFINED ENV{LIB_FUZZING_ENGINE} )
endif () endif ()
# The bind library is handled a bit hack-ishly since it defaults to linking it # The bind library is handled a bit hack-ishly since it defaults to linking it
# as static library by default on Linux, but at least on one common distro, # as static library by default on Linux, but at least on one common distro, that
# that static library wasn't compiled with -fPIC and so not usable in the # static library wasn't compiled with -fPIC and so not usable in the shared
# shared library we're trying to build. So instead, the fuzzer executable, not # library we're trying to build. So instead, the fuzzer executable, not the
# the shared lib, links it. # shared lib, links it.
string(REGEX MATCH ".*\\.a$" _have_static_bind_lib "${BIND_LIBRARY}") string(REGEX MATCH ".*\\.a$" _have_static_bind_lib "${BIND_LIBRARY}")
macro(SETUP_FUZZ_TARGET _fuzz_target _fuzz_source) macro (SETUP_FUZZ_TARGET _fuzz_target _fuzz_source)
add_executable(${_fuzz_target} ${_fuzz_source} ${ARGN}) add_executable(${_fuzz_target} ${_fuzz_source} ${ARGN})
target_link_libraries(${_fuzz_target} zeek_fuzzer_shared) target_link_libraries(${_fuzz_target} zeek_fuzzer_shared)
if ( _have_static_bind_lib ) if (_have_static_bind_lib)
target_link_libraries(${_fuzz_target} ${BIND_LIBRARY}) target_link_libraries(${_fuzz_target} ${BIND_LIBRARY})
endif () endif ()
target_link_libraries(${_fuzz_target} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) target_link_libraries(${_fuzz_target} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
if ( DEFINED ZEEK_FUZZING_ENGINE ) if (DEFINED ZEEK_FUZZING_ENGINE)
target_link_libraries(${_fuzz_target} ${ZEEK_FUZZING_ENGINE}) target_link_libraries(${_fuzz_target} ${ZEEK_FUZZING_ENGINE})
else () else ()
target_link_libraries(${_fuzz_target} target_link_libraries(${_fuzz_target} $<TARGET_OBJECTS:zeek_fuzzer_standalone>)
$<TARGET_OBJECTS:zeek_fuzzer_standalone>)
endif () endif ()
endmacro() endmacro ()
macro(ADD_FUZZ_TARGET _name) macro (ADD_FUZZ_TARGET _name)
set(_fuzz_target zeek-${_name}-fuzzer) set(_fuzz_target zeek-${_name}-fuzzer)
set(_fuzz_source ${_name}-fuzzer.cc) set(_fuzz_source ${_name}-fuzzer.cc)
setup_fuzz_target(${_fuzz_target} ${_fuzz_source}) setup_fuzz_target(${_fuzz_target} ${_fuzz_source})
endmacro () endmacro ()
macro(ADD_GENERIC_ANALYZER_FUZZ_TARGET _name) macro (ADD_GENERIC_ANALYZER_FUZZ_TARGET _name)
set(_fuzz_target zeek-${_name}-fuzzer) set(_fuzz_target zeek-${_name}-fuzzer)
set(_fuzz_source generic-analyzer-fuzzer.cc) set(_fuzz_source generic-analyzer-fuzzer.cc)
setup_fuzz_target(${_fuzz_target} ${_fuzz_source}) setup_fuzz_target(${_fuzz_target} ${_fuzz_source})
@ -68,9 +67,9 @@ target_sources(zeek_fuzzer_shared PRIVATE FuzzBuffer.cc)
set(zeek_fuzzer_shared_deps) set(zeek_fuzzer_shared_deps)
foreach(_dep ${zeekdeps} ) foreach (_dep ${zeekdeps})
if ( "${_dep}" STREQUAL "${BIND_LIBRARY}" ) if ("${_dep}" STREQUAL "${BIND_LIBRARY}")
if ( NOT _have_static_bind_lib ) if (NOT _have_static_bind_lib)
set(zeek_fuzzer_shared_deps ${zeek_fuzzer_shared_deps} ${_dep}) set(zeek_fuzzer_shared_deps ${zeek_fuzzer_shared_deps} ${_dep})
endif () endif ()
else () else ()
@ -78,9 +77,8 @@ foreach(_dep ${zeekdeps} )
endif () endif ()
endforeach () endforeach ()
target_link_libraries(zeek_fuzzer_shared PUBLIC target_link_libraries(zeek_fuzzer_shared PUBLIC ${zeek_fuzzer_shared_deps}
${zeek_fuzzer_shared_deps} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
add_fuzz_target(packet) add_fuzz_target(packet)
add_fuzz_target(dns) add_fuzz_target(dns)
@ -104,26 +102,27 @@ add_generic_analyzer_fuzz_target(radius)
add_generic_analyzer_fuzz_target(rdp) add_generic_analyzer_fuzz_target(rdp)
add_generic_analyzer_fuzz_target(rdpeudp) add_generic_analyzer_fuzz_target(rdpeudp)
add_generic_analyzer_fuzz_target(rfb) add_generic_analyzer_fuzz_target(rfb)
add_generic_analyzer_fuzz_target(mount) #rpc add_generic_analyzer_fuzz_target(mount) # rpc
add_generic_analyzer_fuzz_target(nfs) #rpc add_generic_analyzer_fuzz_target(nfs) # rpc
add_generic_analyzer_fuzz_target(portmapper) #rpc add_generic_analyzer_fuzz_target(portmapper) # rpc
add_generic_analyzer_fuzz_target(sip) add_generic_analyzer_fuzz_target(sip)
add_generic_analyzer_fuzz_target(smb) add_generic_analyzer_fuzz_target(smb)
add_generic_analyzer_fuzz_target(snmp) add_generic_analyzer_fuzz_target(snmp)
add_generic_analyzer_fuzz_target(ssh) add_generic_analyzer_fuzz_target(ssh)
add_generic_analyzer_fuzz_target(syslog) add_generic_analyzer_fuzz_target(syslog)
#add_generic_analyzer_fuzz_target(finger) # no pcap files # add_generic_analyzer_fuzz_target(finger) # no pcap files
#add_generic_analyzer_fuzz_target(gssapi) # only samples are embedded in smb # add_generic_analyzer_fuzz_target(gssapi) # only samples are embedded in smb
#add_generic_analyzer_fuzz_target(ident) # no pcap files # add_generic_analyzer_fuzz_target(ident) # no pcap files
#add_generic_analyzer_fuzz_target(krb) # should these just be handled by smb? # add_generic_analyzer_fuzz_target(krb) # should these just be handled by
#add_generic_analyzer_fuzz_target(krb_tcp) # should these just be handled by smb? # smb? add_generic_analyzer_fuzz_target(krb_tcp) # should these just be handled
#add_generic_analyzer_fuzz_target(rsh) # login - no pcap files # by smb? add_generic_analyzer_fuzz_target(rsh) # login - no pcap files
#add_generic_analyzer_fuzz_target(rlogin) # login - no pcap files # add_generic_analyzer_fuzz_target(rlogin) # login - no pcap files
#add_generic_analyzer_fuzz_target(telnet) # login - no pcap files # add_generic_analyzer_fuzz_target(telnet) # login - no pcap files
#add_generic_analyzer_fuzz_target(netbios) # no pcap files # add_generic_analyzer_fuzz_target(netbios) # no pcap files
#add_generic_analyzer_fuzz_target(ntlm) # only samples are embedded in dce-rpc or smb # add_generic_analyzer_fuzz_target(ntlm) # only samples are embedded in
#add_generic_analyzer_fuzz_target(xdr) # rpc - no pcap files # dce-rpc or smb add_generic_analyzer_fuzz_target(xdr) # rpc - no pcap files
#add_generic_analyzer_fuzz_target(sip_tcp) # unnecessary? # add_generic_analyzer_fuzz_target(sip_tcp) # unnecessary?
#add_generic_analyzer_fuzz_target(socks) # can this one be tested by adding SOCKS pkts to the HTTP corpus? # add_generic_analyzer_fuzz_target(socks) # can this one be tested by adding
#add_generic_analyzer_fuzz_target(xmpp) # no pcap files # SOCKS pkts to the HTTP corpus? add_generic_analyzer_fuzz_target(xmpp) # no
# pcap files

View file

@ -1,12 +1,11 @@
zeek_add_subdir_library( zeek_add_subdir_library(
input input
SOURCES SOURCES
Component.cc Component.cc
Manager.cc Manager.cc
ReaderBackend.cc ReaderBackend.cc
ReaderFrontend.cc ReaderFrontend.cc
BIFS BIFS
input.bif input.bif)
)
add_subdirectory(readers) add_subdirectory(readers)

View file

@ -1,4 +1,3 @@
add_subdirectory(ascii) add_subdirectory(ascii)
add_subdirectory(benchmark) add_subdirectory(benchmark)
add_subdirectory(binary) add_subdirectory(binary)
@ -6,4 +5,4 @@ add_subdirectory(config)
add_subdirectory(raw) add_subdirectory(raw)
if (USE_SQLITE) if (USE_SQLITE)
add_subdirectory(sqlite) add_subdirectory(sqlite)
endif() endif ()

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
AsciiReader AsciiReader
SOURCES SOURCES
Ascii.cc Ascii.cc
Plugin.cc Plugin.cc
BIFS BIFS
ascii.bif ascii.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
BenchmarkReader BenchmarkReader
SOURCES SOURCES
Benchmark.cc Benchmark.cc
Plugin.cc Plugin.cc
BIFS BIFS
benchmark.bif benchmark.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
BinaryReader BinaryReader
SOURCES SOURCES
Binary.cc Binary.cc
Plugin.cc Plugin.cc
BIFS BIFS
binary.bif binary.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
ConfigReader ConfigReader
SOURCES SOURCES
Config.cc Config.cc
Plugin.cc Plugin.cc
BIFS BIFS
config.bif config.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
RawReader RawReader
SOURCES SOURCES
Raw.cc Raw.cc
Plugin.cc Plugin.cc
BIFS BIFS
raw.bif raw.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
SQLiteReader SQLiteReader
SOURCES SOURCES
SQLite.cc SQLite.cc
Plugin.cc Plugin.cc
BIFS BIFS
sqlite.bif sqlite.bif)
)

View file

@ -1,12 +1,11 @@
zeek_add_subdir_library( zeek_add_subdir_library(
iosource iosource
SOURCES SOURCES
BPF_Program.cc BPF_Program.cc
Component.cc Component.cc
Manager.cc Manager.cc
Packet.cc Packet.cc
PktDumper.cc PktDumper.cc
PktSrc.cc PktSrc.cc)
)
add_subdirectory(pcap) add_subdirectory(pcap)

View file

@ -1,11 +1,4 @@
zeek_add_plugin( zeek_add_plugin(Zeek Pcap SOURCES Source.cc Dumper.cc Plugin.cc)
Zeek
Pcap
SOURCES
Source.cc
Dumper.cc
Plugin.cc
)
# Treat BIFs as builtin (alternative mode). # Treat BIFs as builtin (alternative mode).
bif_target(pcap.bif) bif_target(pcap.bif)

View file

@ -1,12 +1,11 @@
zeek_add_subdir_library( zeek_add_subdir_library(
logging logging
SOURCES SOURCES
Component.cc Component.cc
Manager.cc Manager.cc
WriterBackend.cc WriterBackend.cc
WriterFrontend.cc WriterFrontend.cc
BIFS BIFS
logging.bif logging.bif)
)
add_subdirectory(writers) add_subdirectory(writers)

View file

@ -1,6 +1,5 @@
add_subdirectory(ascii) add_subdirectory(ascii)
add_subdirectory(none) add_subdirectory(none)
if (USE_SQLITE) if (USE_SQLITE)
add_subdirectory(sqlite) add_subdirectory(sqlite)
endif() endif ()

View file

@ -1,9 +1,8 @@
zeek_add_plugin( zeek_add_plugin(
Zeek Zeek
AsciiWriter AsciiWriter
SOURCES SOURCES
Ascii.cc Ascii.cc
Plugin.cc Plugin.cc
BIFS BIFS
ascii.bif ascii.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
NoneWriter NoneWriter
SOURCES SOURCES
None.cc None.cc
Plugin.cc Plugin.cc
BIFS BIFS
none.bif none.bif)
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
SQLiteWriter SQLiteWriter
SOURCES SOURCES
SQLite.cc SQLite.cc
Plugin.cc Plugin.cc
BIFS BIFS
sqlite.bif sqlite.bif)
)

View file

@ -1,11 +1,12 @@
zeek_add_subdir_library( zeek_add_subdir_library(
packet_analysis packet_analysis
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
SOURCES SOURCES
Analyzer.cc Analyzer.cc
Dispatcher.cc Dispatcher.cc
Manager.cc Manager.cc
Component.cc Component.cc)
)
add_subdirectory(protocol) add_subdirectory(protocol)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
ARP ARP
SOURCES SOURCES
ARP.cc ARP.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(Zeek AYIYA SOURCES AYIYA.cc Plugin.cc)
Zeek
AYIYA
SOURCES
AYIYA.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer Ethernet SOURCES Ethernet.cc Plugin.cc)
PacketAnalyzer
Ethernet
SOURCES
Ethernet.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer FDDI SOURCES FDDI.cc Plugin.cc)
PacketAnalyzer
FDDI
SOURCES
FDDI.cc
Plugin.cc
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
Zeek Zeek
Geneve Geneve
SOURCES SOURCES
Geneve.cc Geneve.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer GRE SOURCES GRE.cc Plugin.cc)
PacketAnalyzer
GRE
SOURCES
GRE.cc
Plugin.cc
)

View file

@ -2,13 +2,12 @@ zeek_add_plugin(
Zeek Zeek
GTPv1 GTPv1
SOURCES SOURCES
GTPv1.cc GTPv1.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif
functions.bif functions.bif
PAC PAC
gtpv1.pac gtpv1.pac
gtpv1-protocol.pac gtpv1-protocol.pac
gtpv1-analyzer.pac gtpv1-analyzer.pac)
)

View file

@ -2,9 +2,8 @@ zeek_add_plugin(
Zeek Zeek
ICMP ICMP
SOURCES SOURCES
ICMP.cc ICMP.cc
ICMPSessionAdapter.cc ICMPSessionAdapter.cc
Plugin.cc Plugin.cc
BIFS BIFS
events.bif events.bif)
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer IEEE802_11 SOURCES IEEE802_11.cc Plugin.cc)
PacketAnalyzer
IEEE802_11
SOURCES
IEEE802_11.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer IEEE802_11_Radio SOURCES IEEE802_11_Radio.cc Plugin.cc)
PacketAnalyzer
IEEE802_11_Radio
SOURCES
IEEE802_11_Radio.cc
Plugin.cc
)

View file

@ -2,8 +2,7 @@ zeek_add_plugin(
PacketAnalyzer PacketAnalyzer
IP IP
SOURCES SOURCES
IP.cc IP.cc
IPBasedAnalyzer.cc IPBasedAnalyzer.cc
SessionAdapter.cc SessionAdapter.cc
Plugin.cc Plugin.cc)
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer IPTunnel SOURCES IPTunnel.cc Plugin.cc)
PacketAnalyzer
IPTunnel
SOURCES
IPTunnel.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer LinuxSLL SOURCES LinuxSLL.cc Plugin.cc)
PacketAnalyzer
LinuxSLL
SOURCES
LinuxSLL.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer LinuxSLL2 SOURCES LinuxSLL2.cc Plugin.cc)
PacketAnalyzer
LinuxSLL2
SOURCES
LinuxSLL2.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer LLC SOURCES LLC.cc Plugin.cc)
PacketAnalyzer
LLC
SOURCES
LLC.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer MPLS SOURCES MPLS.cc Plugin.cc)
PacketAnalyzer
MPLS
SOURCES
MPLS.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer NFLog SOURCES NFLog.cc Plugin.cc)
PacketAnalyzer
NFLog
SOURCES
NFLog.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer Novell_802_3 SOURCES Novell_802_3.cc Plugin.cc)
PacketAnalyzer
Novell_802_3
SOURCES
Novell_802_3.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer Null SOURCES Null.cc Plugin.cc)
PacketAnalyzer
Null
SOURCES
Null.cc
Plugin.cc
)

View file

@ -1,4 +1,3 @@
include(ZeekPlugin) include(ZeekPlugin)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer PPPSerial SOURCES PPPSerial.cc Plugin.cc)
PacketAnalyzer
PPPSerial
SOURCES
PPPSerial.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer PPPoE SOURCES PPPoE.cc Plugin.cc)
PacketAnalyzer
PPPoE
SOURCES
PPPoE.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer Root SOURCES Root.cc Plugin.cc)
PacketAnalyzer
Root
SOURCES
Root.cc
Plugin.cc
)

View file

@ -1,7 +1 @@
zeek_add_plugin( zeek_add_plugin(PacketAnalyzer Skip SOURCES Skip.cc Plugin.cc)
PacketAnalyzer
Skip
SOURCES
Skip.cc
Plugin.cc
)

Some files were not shown because too many files have changed in this diff Show more