mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Redesign subdir-libs and plugin scaffolding
This commit is contained in:
parent
ca43ada578
commit
9aeed5284d
109 changed files with 1664 additions and 1292 deletions
367
CMakeLists.txt
367
CMakeLists.txt
|
@ -9,8 +9,10 @@ endif()
|
|||
|
||||
project(Zeek C CXX)
|
||||
|
||||
option(ZEEK_STANDALONE "Is Zeek compiled stand-alone or embedded in a parent project." ON)
|
||||
option(ENABLE_ZEEK_UNIT_TESTS "Should the doctest unit tests be built?" ON)
|
||||
option(ZEEK_STANDALONE "Build Zeek as stand-alone binary?" ON)
|
||||
option(ENABLE_ZEEK_UNIT_TESTS "Build the C++ (doctest) unit tests?" ON)
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON
|
||||
CACHE INTERNAL "Write JSON compile commands database")
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_BINARY_DIR})
|
||||
list(APPEND CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR})
|
||||
|
@ -114,6 +116,255 @@ include(cmake/CommonCMakeConfig.cmake)
|
|||
include(cmake/FindClangTidy.cmake)
|
||||
include(cmake/CheckCompilerArch.cmake)
|
||||
|
||||
########################################################################
|
||||
## Main targets and utilities.
|
||||
|
||||
# Variable for referring back to Zeek's top-level source dir. Used for plugins
|
||||
# to tell them where to find the Zeek headers.
|
||||
set(ZEEK_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
|
||||
# Tell dynamic plugins where to find scripts such as
|
||||
# zeek-plugin-create-package.sh. Needed by ZeekPluginConfig.cmake.in.
|
||||
set(ZEEK_PLUGIN_SCRIPTS_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
# Our C++17 base target for propagating compiler and linker flags.
|
||||
# Note: for now, we only use it for passing library dependencies around.
|
||||
add_library(zeek_internal INTERFACE)
|
||||
add_library(Zeek::Internal ALIAS zeek_internal)
|
||||
set_target_properties(zeek_internal PROPERTIES EXPORT_NAME Internal)
|
||||
install(TARGETS zeek_internal EXPORT ZeekTargets)
|
||||
target_compile_features(zeek_internal INTERFACE cxx_std_17)
|
||||
|
||||
# Target for bundling the creation of auto-generated files.
|
||||
add_custom_target(zeek_autogen_files)
|
||||
|
||||
# Define our main targets and place the output files under src (for historic
|
||||
# reasons and backwards compatibility).
|
||||
if (ZEEK_STANDALONE)
|
||||
add_executable(zeek_exe)
|
||||
target_link_libraries(zeek_exe PRIVATE $<BUILD_INTERFACE:zeek_internal>)
|
||||
add_dependencies(zeek_exe zeek_autogen_files)
|
||||
set_target_properties(zeek_exe PROPERTIES RUNTIME_OUTPUT_NAME zeek)
|
||||
if (NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
|
||||
set_target_properties(zeek_exe PROPERTIES RUNTIME_OUTPUT_DIRECTORY src)
|
||||
endif()
|
||||
install(TARGETS zeek_exe RUNTIME DESTINATION bin)
|
||||
# Export symbols from zeek executable for use by plugins
|
||||
set_target_properties(zeek_exe PROPERTIES ENABLE_EXPORTS ON)
|
||||
if ( MSVC )
|
||||
set(WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
endif ()
|
||||
# Tell zeek_target_link_libraries to add library dependencies as PRIVATE.
|
||||
set(zeek_exe_access PRIVATE)
|
||||
# Also build the static library when asked for via Conan.
|
||||
if (CONAN_EXPORTED)
|
||||
add_library(zeek_lib STATIC)
|
||||
endif ()
|
||||
else ()
|
||||
add_library(zeek_lib STATIC)
|
||||
endif()
|
||||
|
||||
if (TARGET zeek_lib)
|
||||
target_link_libraries(zeek_lib PRIVATE $<BUILD_INTERFACE:zeek_internal>)
|
||||
add_dependencies(zeek_lib zeek_autogen_files)
|
||||
set_target_properties(zeek_lib PROPERTIES RUNTIME_OUTPUT_NAME libzeek)
|
||||
if (NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
|
||||
set_target_properties(zeek_lie PROPERTIES LIBRARY_OUTPUT_DIRECTORY src)
|
||||
endif()
|
||||
install(TARGETS zeek_lib LIBRARY DESTINATION lib)
|
||||
# Tell zeek_target_link_libraries to add library dependencies as PRIVATE.
|
||||
set(zeek_lib_access PRIVATE)
|
||||
endif()
|
||||
|
||||
# When building our fuzzers, we also need one extra top-level target that
|
||||
# bundles all of our object libraries and other dependencies.
|
||||
if ( ZEEK_ENABLE_FUZZERS )
|
||||
add_library(zeek_fuzzer_shared SHARED)
|
||||
target_link_libraries(zeek_fuzzer_shared PUBLIC $<BUILD_INTERFACE:zeek_internal>)
|
||||
# Tell zeek_target_link_libraries to add library dependencies as PUBLIC.
|
||||
set(zeek_fuzzer_shared_access PUBLIC)
|
||||
endif ()
|
||||
|
||||
# Convenience function for adding library dependencies to the main target(s).
|
||||
function(zeek_target_link_libraries lib_target)
|
||||
foreach (name zeek_exe zeek_lib zeek_fuzzer_shared)
|
||||
if (TARGET ${name})
|
||||
target_link_libraries(${name} ${${name}_access} ${lib_target})
|
||||
endif ()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
function(zeek_include_directories)
|
||||
foreach (name zeek_exe zeek_lib zeek_fuzzer_shared)
|
||||
if (TARGET ${name})
|
||||
target_include_directories(${name} ${${name}_access} ${ARGN})
|
||||
endif ()
|
||||
endforeach ()
|
||||
endfunction ()
|
||||
|
||||
# Convenience function for adding a dependency to the main target(s).
|
||||
function(zeek_add_dependencies dep)
|
||||
foreach (name zeek_exe zeek_lib zeek_fuzzer_shared)
|
||||
if (TARGET ${name})
|
||||
add_dependencies(${name} ${dep})
|
||||
endif ()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
||||
# Interface library for propagating extra flags and include paths to dynamically
|
||||
# loaded plugins.
|
||||
add_library(zeek_dynamic_plugin_base INTERFACE)
|
||||
target_link_libraries(zeek_dynamic_plugin_base
|
||||
INTERFACE
|
||||
$<BUILD_INTERFACE:zeek_internal>)
|
||||
target_include_directories(zeek_dynamic_plugin_base
|
||||
INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>)
|
||||
add_library(Zeek::DynamicPluginBase ALIAS zeek_dynamic_plugin_base)
|
||||
set_target_properties(
|
||||
zeek_dynamic_plugin_base PROPERTIES
|
||||
EXPORT_NAME DynamicPluginBase)
|
||||
install(TARGETS zeek_dynamic_plugin_base EXPORT ZeekTargets)
|
||||
|
||||
# Tell dynamic plugins where to find scripts such as
|
||||
# zeek-plugin-create-package.sh.
|
||||
set(ZEEK_PLUGIN_SCRIPTS_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
# On macOS, we need to tell the linker that the modules are allowed to have
|
||||
# undefined symbols.
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
target_link_options(
|
||||
zeek_dynamic_plugin_base
|
||||
INTERFACE
|
||||
-undefined
|
||||
dynamic_lookup
|
||||
-Wl,-bind_at_load)
|
||||
endif ()
|
||||
|
||||
function(add_zeek_dynamic_plugin_build_interface_include_directories)
|
||||
foreach ( path ${ARGV} )
|
||||
target_include_directories(
|
||||
zeek_dynamic_plugin_base
|
||||
INTERFACE
|
||||
$<BUILD_INTERFACE:${path}>
|
||||
)
|
||||
endforeach ()
|
||||
endfunction()
|
||||
|
||||
add_zeek_dynamic_plugin_build_interface_include_directories(
|
||||
${PROJECT_SOURCE_DIR}/src/include
|
||||
${PROJECT_SOURCE_DIR}/auxil/binpac/lib
|
||||
${PROJECT_SOURCE_DIR}/auxil/broker/include
|
||||
${PROJECT_SOURCE_DIR}/auxil/paraglob/include
|
||||
${PROJECT_SOURCE_DIR}/auxil/rapidjson/include
|
||||
${CMAKE_BINARY_DIR}/src
|
||||
${CMAKE_BINARY_DIR}/src/include
|
||||
${CMAKE_BINARY_DIR}/auxil/binpac/lib
|
||||
${CMAKE_BINARY_DIR}/auxil/broker/include
|
||||
)
|
||||
|
||||
# Convenience function for adding an OBJECT library that feeds directly into the
|
||||
# main target(s).
|
||||
#
|
||||
# Usage:
|
||||
# zeek_add_subdir_library(
|
||||
# <name>
|
||||
# SOURCES ...
|
||||
# [INCLUDE_DIRS ...]
|
||||
# [DEPENDENCIES ...]
|
||||
# [INTERNAL_DEPENDENCIES ...]
|
||||
# [BIFS ...]
|
||||
# )
|
||||
function(zeek_add_subdir_library name)
|
||||
# Parse arguments.
|
||||
set(fn_varargs INCLUDE_DIRS DEPENDENCIES INTERNAL_DEPENDENCIES SOURCES BIFS)
|
||||
cmake_parse_arguments(FN_ARGS "" "" "${fn_varargs}" ${ARGN})
|
||||
if (NOT FN_ARGS_SOURCES)
|
||||
message(FATAL_ERROR "zeek_add_subdir_library called without any SOURCES")
|
||||
endif()
|
||||
|
||||
# Create target and add the sources.
|
||||
set(target_name "zeek_${name}_obj")
|
||||
add_library(${target_name} OBJECT ${FN_ARGS_SOURCES})
|
||||
add_dependencies(${target_name} zeek_autogen_files)
|
||||
target_link_libraries(${target_name} PRIVATE $<BUILD_INTERFACE:zeek_internal>)
|
||||
add_clang_tidy_files(${FN_ARGS_SOURCES})
|
||||
|
||||
# Take care of compiling BIFs.
|
||||
if (FN_ARGS_BIFS)
|
||||
foreach ( bif ${FN_ARGS_BIFS} )
|
||||
# Generate the target and add the extra dependency.
|
||||
bif_target(${bif})
|
||||
endforeach ()
|
||||
endif()
|
||||
|
||||
# Optionally add include directories and extra dependencies.
|
||||
if ( FN_ARGS_INCLUDE_DIRS )
|
||||
target_include_directories(
|
||||
${target_name}
|
||||
BEFORE
|
||||
PRIVATE
|
||||
${FN_ARGS_INCLUDE_DIRS})
|
||||
endif ()
|
||||
if ( FN_ARGS_DEPENDENCIES )
|
||||
target_link_libraries(${target_name} PRIVATE ${FN_ARGS_DEPENDENCIES})
|
||||
endif ()
|
||||
if ( FN_ARGS_INTERNAL_DEPENDENCIES )
|
||||
add_dependencies(${target_name} ${FN_ARGS_INTERNAL_DEPENDENCIES})
|
||||
endif ()
|
||||
|
||||
# Feed into the main Zeek target(s).
|
||||
zeek_target_link_libraries(${target_name})
|
||||
endfunction()
|
||||
|
||||
########################################################################
|
||||
## Utility function for forcing CMake to re-run if files change on disk.
|
||||
|
||||
function(zeek_watch_files)
|
||||
set_property(
|
||||
DIRECTORY
|
||||
APPEND
|
||||
PROPERTY CMAKE_CONFIGURE_DEPENDS ${ARGN}
|
||||
)
|
||||
endfunction()
|
||||
|
||||
########################################################################
|
||||
## Create empty __load__.zeek stubs (override pre-existing ones).
|
||||
|
||||
function(zeek_create_load_script_stubs)
|
||||
set(file_comment "# Warning, this is an autogenerated file!\n")
|
||||
foreach ( fpath ${ARGN} )
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/${fpath}" "${file_comment}")
|
||||
zeek_watch_files("${CMAKE_BINARY_DIR}/${fpath}")
|
||||
endforeach ()
|
||||
endfunction ()
|
||||
|
||||
# Note: these files are filled from BifCl.cmake via `file(APPEND ...)`
|
||||
zeek_create_load_script_stubs(
|
||||
scripts/builtin-plugins/__load__.zeek
|
||||
scripts/base/bif/plugins/__load__.zeek
|
||||
scripts/base/bif/__load__.zeek
|
||||
)
|
||||
|
||||
########################################################################
|
||||
## Create empty __all__*.cc stubs (override pre-existing ones).
|
||||
|
||||
function(zeek_create_bif_autogen_stubs)
|
||||
set(file_comment "// Warning, this is an autogenerated file!\n")
|
||||
foreach ( fpath ${ARGN} )
|
||||
file(WRITE "${CMAKE_BINARY_DIR}/${fpath}" "${file_comment}")
|
||||
zeek_watch_files("${CMAKE_BINARY_DIR}/${fpath}")
|
||||
endforeach ()
|
||||
endfunction ()
|
||||
|
||||
# Note: these files are filled from BifCl.cmake via `file(APPEND ...)`.
|
||||
zeek_create_bif_autogen_stubs(
|
||||
src/__all__.bif.cc
|
||||
src/__all__.bif.init.cc
|
||||
src/__all__.bif.register.cc
|
||||
)
|
||||
|
||||
########################################################################
|
||||
## Project/Build Configuration
|
||||
|
||||
|
@ -247,8 +498,9 @@ set(VERSION_C_IDENT "${VERSION}_plugin_${API_VERSION}")
|
|||
string(REGEX REPLACE "-[0-9]*$" "_git" VERSION_C_IDENT "${VERSION_C_IDENT}")
|
||||
string(REGEX REPLACE "[^a-zA-Z0-9_\$]" "_" VERSION_C_IDENT "${VERSION_C_IDENT}")
|
||||
|
||||
if(${ENABLE_DEBUG})
|
||||
if(ENABLE_DEBUG)
|
||||
set(VERSION_C_IDENT "${VERSION_C_IDENT}_debug")
|
||||
target_compile_definitions(zeek_internal INTERFACE DEBUG)
|
||||
endif()
|
||||
|
||||
if ( NOT BINARY_PACKAGING_MODE )
|
||||
|
@ -425,6 +677,22 @@ if ( NOT MSVC )
|
|||
endif ()
|
||||
FindRequiredPackage(ZLIB)
|
||||
|
||||
# Forward user-defined hint for OpenSSL to the plugins. Use a cache variable to
|
||||
# make sure this variable survives CMake re-runs.
|
||||
# Note: This variable is picked up in ZeekPluginConfig.cmake.in.
|
||||
if (OPENSSL_ROOT_DIR)
|
||||
set(ZeekOpenSSLHint "${OPENSSL_ROOT_DIR}" CACHE INTERNAL "" FORCE)
|
||||
elseif (DEFINED ENV{OPENSSL_ROOT_DIR})
|
||||
set(ZeekOpenSSLHint "$ENV{OPENSSL_ROOT_DIR}" CACHE INTERNAL "" FORCE)
|
||||
endif ()
|
||||
|
||||
# Forward PKG_CONFIG_PATH to the plugins. Use a cache variable to make sure this
|
||||
# variable survives CMake re-runs.
|
||||
# Note: This variable is picked up in ZeekPluginConfig.cmake.in.
|
||||
if (DEFINED ENV{PKG_CONFIG_PATH})
|
||||
set(ZeekPkgConfigPath "$ENV{PKG_CONFIG_PATH}" CACHE INTERNAL "" FORCE)
|
||||
endif ()
|
||||
|
||||
# Installation directory for the distribution's Python modules. An
|
||||
# override via configure's --python-dir wins, specifying a directory
|
||||
# explicitly. Next is --python-prefix, which includes a versioned
|
||||
|
@ -457,11 +725,28 @@ if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/auxil/binpac/CMakeLists.txt)
|
|||
|
||||
add_subdirectory(auxil/binpac)
|
||||
set(ENABLE_STATIC_ONLY ${ENABLE_STATIC_ONLY_SAVED})
|
||||
|
||||
# FIXME: avoid hard-coding a path for multi-config generator support.
|
||||
# See the TODO in ZeekPluginConfig.cmake.in.
|
||||
set(BINPAC_EXE_PATH "${CMAKE_BINARY_DIR}/auxil/binpac/src/binpac${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
endif ()
|
||||
FindRequiredPackage(BinPAC)
|
||||
|
||||
# Add an alias (used by our plugin setup).
|
||||
add_executable(Zeek::BinPAC ALIAS binpac)
|
||||
|
||||
if ( NOT BIFCL_EXE_PATH )
|
||||
add_subdirectory(auxil/bifcl)
|
||||
add_subdirectory(auxil/bifcl)
|
||||
add_executable(Zeek::BifCl ALIAS bifcl)
|
||||
# FIXME: avoid hard-coding a path for multi-config generator support.
|
||||
# See the TODO in ZeekPluginConfig.cmake.in.
|
||||
set(BIFCL_EXE_PATH "${CMAKE_BINARY_DIR}/auxil/bifcl/bifcl${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
set(_bifcl_exe_path "included")
|
||||
else ( )
|
||||
add_executable(Zeek::BifCl IMPORTED)
|
||||
set_property(TARGET Zeek::BifCl PROPERTY
|
||||
IMPORTED_LOCATION "${BIFCL_EXE_PATH}")
|
||||
set(_bifcl_exe_path "BIFCL_EXE_PATH")
|
||||
endif ()
|
||||
|
||||
if ( NOT GEN_ZAM_EXE_PATH )
|
||||
|
@ -513,14 +798,13 @@ if ( MSVC )
|
|||
endif ()
|
||||
set(zeekdeps ${zeekdeps} paraglob)
|
||||
|
||||
# Note: Broker gets some special attention in ZeekConfig.cmake.in.
|
||||
if ( Broker_ROOT )
|
||||
find_package(Broker REQUIRED PATHS "${Broker_ROOT}")
|
||||
set(zeekdeps ${zeekdeps} ${BROKER_LIBRARY})
|
||||
set(broker_includes ${BROKER_INCLUDE_DIR})
|
||||
elseif ( BROKER_ROOT_DIR )
|
||||
find_package(Broker REQUIRED PATHS "${BROKER_ROOT_DIR}")
|
||||
set(zeekdeps ${zeekdeps} ${BROKER_LIBRARY})
|
||||
find_package(Broker REQUIRED CONFIG)
|
||||
list(APPEND zeekdeps ${BROKER_LIBRARY})
|
||||
set(broker_includes ${BROKER_INCLUDE_DIR})
|
||||
set(ZEEK_HAS_EXTERNAL_BROKER ON)
|
||||
set(ZEEK_HAS_STATIC_BROKER OFF)
|
||||
else ()
|
||||
if ( ZEEK_SANITIZERS )
|
||||
set(BROKER_SANITIZERS ${ZEEK_SANITIZERS})
|
||||
|
@ -539,11 +823,26 @@ else ()
|
|||
set(ENABLE_STATIC_ONLY ${ENABLE_STATIC_ONLY_SAVED})
|
||||
|
||||
if ( BUILD_STATIC_BROKER )
|
||||
set(zeekdeps ${zeekdeps} broker_static)
|
||||
list(APPEND zeekdeps broker_static)
|
||||
else()
|
||||
set(zeekdeps ${zeekdeps} broker)
|
||||
list(APPEND zeekdeps broker)
|
||||
endif()
|
||||
set(broker_includes ${CMAKE_CURRENT_SOURCE_DIR}/auxil/broker/include ${CMAKE_CURRENT_BINARY_DIR}/auxil/broker/include)
|
||||
|
||||
set(
|
||||
broker_includes
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/auxil/broker/include
|
||||
${CMAKE_CURRENT_BINARY_DIR}/auxil/broker/include)
|
||||
|
||||
if (BUILD_STATIC_BROKER)
|
||||
set(ZEEK_HAS_STATIC_BROKER ON)
|
||||
else ()
|
||||
set(ZEEK_HAS_STATIC_BROKER OFF)
|
||||
endif ()
|
||||
set(ZEEK_HAS_EXTERNAL_BROKER OFF)
|
||||
|
||||
# Tell plugins where to find the Broker CMake package in the source tree.
|
||||
# This variable is picked up in ZeekPluginConfig.cmake.in.
|
||||
set(ZEEK_PLUGIN_BROKER_PATH "${CMAKE_CURRENT_BINARY_DIR}/auxil/broker")
|
||||
endif ()
|
||||
|
||||
if ( NOT DISABLE_SPICY )
|
||||
|
@ -909,7 +1208,7 @@ CheckOptionalBuildSources(auxil/zeek-client ZeekClient INSTALL_ZEEK_CLIENT)
|
|||
if ( NOT DISABLE_SPICY )
|
||||
# The `zeek` binary implicitly depends on the driver object file built
|
||||
# as part of `spicy`; make that dependency explicit.
|
||||
add_dependencies(zeek spicyz)
|
||||
zeek_add_dependencies(spicyz)
|
||||
|
||||
if ( NOT SPICY_ROOT_DIR )
|
||||
# Make sure we build targets of spicy-plugin after the `spicy` target.
|
||||
|
@ -957,6 +1256,41 @@ if ("${PROJECT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}")
|
|||
ConfigurePackaging(${VERSION})
|
||||
endif ()
|
||||
|
||||
# Refers back to the "distribution prefix". This is the source tree when
|
||||
# referring to Zeek from the build directory and the "share" directory under the
|
||||
# install preifx otherwise.
|
||||
set(ZEEK_DIST_PREFIX
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_DATAROOTDIR}/foo/bar>)
|
||||
|
||||
# Generate extra config file for the dynamic plugins.
|
||||
configure_file(src/ZeekPluginConfig.cmake.in ZeekPluginConfig.cmake @ONLY)
|
||||
|
||||
# Write the CMake package and version files.
|
||||
configure_package_config_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/src/ZeekConfig.cmake.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfig.cmake"
|
||||
INSTALL_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Zeek")
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/ZeekConfigVersion.cmake"
|
||||
VERSION ${ZEEK_VERSION_NUMBER}
|
||||
COMPATIBILITY ExactVersion)
|
||||
|
||||
# Write the CMake targets file.
|
||||
export(EXPORT ZeekTargets FILE ZeekTargets.cmake NAMESPACE Zeek::)
|
||||
|
||||
# TODO: Check whether installing these does not break any of our packages.
|
||||
# install(
|
||||
# FILES
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/ZeekConfig.cmake"
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/ZeekConfigVersion.cmake"
|
||||
# DESTINATION
|
||||
# "${CMAKE_INSTALL_LIBDIR}/cmake/Zeek")
|
||||
# install(
|
||||
# EXPORT ZeekTargets
|
||||
# DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Zeek"
|
||||
# NAMESPACE Zeek::)
|
||||
|
||||
########################################################################
|
||||
## Build Summary
|
||||
|
||||
|
@ -970,11 +1304,6 @@ else ()
|
|||
set(_install_btest_tools_msg "no pcaps")
|
||||
endif ()
|
||||
|
||||
set(_bifcl_exe_path "included")
|
||||
if ( BIFCL_EXE_PATH )
|
||||
set(_bifcl_exe_path ${BIFCL_EXE_PATH})
|
||||
endif ()
|
||||
|
||||
set(_binpac_exe_path "included")
|
||||
if ( BINPAC_EXE_PATH )
|
||||
set(_binpac_exe_path ${BINPAC_EXE_PATH})
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit a2dd0b3d210401bc0873ed8e80a591d88cf3fba1
|
||||
Subproject commit 4fc4c31592c4823d675314bc981931de9e246057
|
|
@ -1 +1 @@
|
|||
Subproject commit 6bf782aa51d31cc9e08a36073e107c5f869d91f7
|
||||
Subproject commit a618f2ce0831c311f9bcff5d020b85fc44345221
|
2
cmake
2
cmake
|
@ -1 +1 @@
|
|||
Subproject commit 23d5b121a1492feb15455d6ecaf3940a237beb26
|
||||
Subproject commit f258c75659cec6e5dbd91ea18e21bc5dfad284a2
|
|
@ -20,16 +20,6 @@ execute_process(COMMAND "${CMAKE_COMMAND}" -E create_symlink
|
|||
".."
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/include/zeek")
|
||||
|
||||
# This collects generated bif and pac files from subdirectories.
|
||||
set(bro_ALL_GENERATED_OUTPUTS CACHE INTERNAL "automatically generated files" FORCE)
|
||||
|
||||
# This collects bif inputs that we'll load automatically.
|
||||
set(bro_AUTO_BIFS CACHE INTERNAL "BIFs for automatic inclusion" FORCE)
|
||||
set(bro_REGISTER_BIFS CACHE INTERNAL "BIFs for automatic registering" FORCE)
|
||||
|
||||
set(bro_BASE_BIF_SCRIPTS CACHE INTERNAL "Zeek script stubs for BIFs in base distribution of Zeek" FORCE)
|
||||
set(bro_PLUGIN_BIF_SCRIPTS CACHE INTERNAL "Zeek script stubs for BIFs in Zeek plugins" FORCE)
|
||||
|
||||
# Poor man's JSON escaping as this is rendered into a C string.
|
||||
string(REPLACE "\"" "\\\"" ZEEK_BUILD_INFO_ESCAPED "${ZEEK_BUILD_INFO}")
|
||||
string(REPLACE "\n" "\\n" ZEEK_BUILD_INFO_ESCAPED "${ZEEK_BUILD_INFO_ESCAPED}")
|
||||
|
@ -66,16 +56,6 @@ else()
|
|||
set(SIGN_COMPARE_FLAG "-Wno-sign-compare")
|
||||
endif()
|
||||
|
||||
# BIF parser/scanner
|
||||
bison_target(BIFParser builtin-func.y
|
||||
${CMAKE_CURRENT_BINARY_DIR}/bif_parse.cc
|
||||
HEADER ${CMAKE_CURRENT_BINARY_DIR}/bif_parse.h
|
||||
#VERBOSE ${CMAKE_CURRENT_BINARY_DIR}/bif_parse.output
|
||||
COMPILE_FLAGS "${BISON_FLAGS}")
|
||||
flex_target(BIFScanner builtin-func.l ${CMAKE_CURRENT_BINARY_DIR}/bif_lex.cc)
|
||||
add_flex_bison_dependency(BIFScanner BIFParser)
|
||||
set_property(SOURCE bif_lex.cc APPEND_STRING PROPERTY COMPILE_FLAGS "${SIGN_COMPARE_FLAG}")
|
||||
|
||||
# Rule parser/scanner
|
||||
bison_target(RuleParser rule-parse.y
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rup.cc
|
||||
|
@ -119,6 +99,21 @@ 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}")
|
||||
|
||||
# Add a dependency for the generated files to zeek_autogen_files.
|
||||
add_custom_target(
|
||||
zeek_bison_outputs
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/parse.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/re-parse.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/re-parse.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/re-scan.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rule-parse.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rule-parse.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/rule-scan.cc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/scan.cc
|
||||
)
|
||||
add_dependencies(zeek_autogen_files zeek_bison_outputs)
|
||||
|
||||
########################################################################
|
||||
## bifcl-dependent targets
|
||||
|
||||
|
@ -164,6 +159,8 @@ set(BINPAC_AUXSRC
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/binpac_zeek.h
|
||||
)
|
||||
|
||||
set(BINPAC_OUTPUTS "")
|
||||
|
||||
binpac_target(binpac-lib.pac)
|
||||
list(APPEND BINPAC_OUTPUTS "${BINPAC_OUTPUT_CC}")
|
||||
|
||||
|
@ -185,12 +182,6 @@ gen_zam_target(${GEN_ZAM_SRC})
|
|||
|
||||
option(USE_SQLITE "Should Zeek use SQLite?" ON)
|
||||
|
||||
set(bro_SUBDIR_LIBS CACHE INTERNAL "subdir libraries" FORCE)
|
||||
set(bro_SUBDIR_DEPS CACHE INTERNAL "subdir dependencies" FORCE)
|
||||
set(bro_PLUGIN_LIBS CACHE INTERNAL "plugin libraries" FORCE)
|
||||
set(bro_PLUGIN_DEPS CACHE INTERNAL "plugin dependencies" FORCE)
|
||||
set(bro_PLUGIN_LINK_LIBS CACHE INTERNAL "plugin link libraries" FORCE)
|
||||
|
||||
add_subdirectory(analyzer)
|
||||
add_subdirectory(packet_analysis)
|
||||
add_subdirectory(broker)
|
||||
|
@ -276,6 +267,14 @@ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
|
|||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
zeek_debugcmd_gen
|
||||
DEPENDS
|
||||
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdConstants.h
|
||||
${CMAKE_CURRENT_BINARY_DIR}/DebugCmdInfoConstants.cc
|
||||
)
|
||||
add_dependencies(zeek_autogen_files zeek_debugcmd_gen)
|
||||
|
||||
set(_gen_zeek_script_cpp ${CMAKE_CURRENT_BINARY_DIR}/../CPP-gen.cc)
|
||||
add_custom_command(OUTPUT ${_gen_zeek_script_cpp}
|
||||
COMMAND ${CMAKE_COMMAND} -E touch ${_gen_zeek_script_cpp})
|
||||
|
@ -453,16 +452,18 @@ set(THIRD_PARTY_SRCS
|
|||
)
|
||||
|
||||
# Highwayhash. Highwayhash is a bit special since it has architecture dependent code...
|
||||
|
||||
set(HH_SRCS
|
||||
../auxil/highwayhash/highwayhash/sip_hash.cc
|
||||
../auxil/highwayhash/highwayhash/sip_tree_hash.cc
|
||||
../auxil/highwayhash/highwayhash/scalar_sip_tree_hash.cc
|
||||
../auxil/highwayhash/highwayhash/arch_specific.cc
|
||||
../auxil/highwayhash/highwayhash/instruction_sets.cc
|
||||
../auxil/highwayhash/highwayhash/nanobenchmark.cc
|
||||
../auxil/highwayhash/highwayhash/os_specific.cc
|
||||
../auxil/highwayhash/highwayhash/hh_portable.cc
|
||||
set(hhash_dir ${PROJECT_SOURCE_DIR}/auxil/highwayhash/highwayhash)
|
||||
zeek_add_subdir_library(
|
||||
hhash
|
||||
SOURCES
|
||||
${hhash_dir}/sip_hash.cc
|
||||
${hhash_dir}/sip_tree_hash.cc
|
||||
${hhash_dir}/scalar_sip_tree_hash.cc
|
||||
${hhash_dir}/arch_specific.cc
|
||||
${hhash_dir}/instruction_sets.cc
|
||||
${hhash_dir}/nanobenchmark.cc
|
||||
${hhash_dir}/os_specific.cc
|
||||
${hhash_dir}/hh_portable.cc
|
||||
)
|
||||
|
||||
if (${COMPILER_ARCHITECTURE} STREQUAL "arm")
|
||||
|
@ -475,22 +476,28 @@ if (${COMPILER_ARCHITECTURE} STREQUAL "arm")
|
|||
" test_arm_neon)
|
||||
|
||||
if (test_arm_neon)
|
||||
list(APPEND HH_SRCS ../auxil/highwayhash/highwayhash/hh_neon.cc)
|
||||
target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_neon.cc)
|
||||
endif ()
|
||||
|
||||
set_source_files_properties(${HH_SRCS} PROPERTIES COMPILE_FLAGS
|
||||
-mfloat-abi=hard -march=armv7-a -mfpu=neon)
|
||||
target_compile_options(
|
||||
zeek_hhash_obj
|
||||
PRIVATE
|
||||
-mfloat-abi=hard
|
||||
-march=armv7-a
|
||||
-mfpu=neon
|
||||
)
|
||||
elseif (${COMPILER_ARCHITECTURE} STREQUAL "aarch64")
|
||||
list(APPEND HH_SRCS
|
||||
../auxil/highwayhash/highwayhash/hh_neon.cc
|
||||
)
|
||||
target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_neon.cc)
|
||||
elseif (${COMPILER_ARCHITECTURE} STREQUAL "power")
|
||||
set_source_files_properties(../auxil/highwayhash/highwayhash/hh_vsx.cc PROPERTIES COMPILE_FLAGS
|
||||
target_sources(zeek_hhash_obj PRIVATE ${hhash_dir}/hh_vsx.cc)
|
||||
set_source_files_properties(${hhash_dir}/hh_vsx.cc PROPERTIES COMPILE_FLAGS
|
||||
-mvsx)
|
||||
list(APPEND HH_SRCS
|
||||
../auxil/highwayhash/highwayhash/hh_vsx.cc
|
||||
)
|
||||
elseif(${COMPILER_ARCHITECTURE} STREQUAL "x86_64")
|
||||
target_sources(
|
||||
zeek_hhash_obj
|
||||
PRIVATE
|
||||
${hhash_dir}/hh_avx2.cc
|
||||
${hhash_dir}/hh_sse41.cc)
|
||||
if (MSVC)
|
||||
set(_avx_flag /arch:AVX2)
|
||||
# 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
|
||||
|
@ -500,15 +507,10 @@ elseif(${COMPILER_ARCHITECTURE} STREQUAL "x86_64")
|
|||
set(_sse_flag -msse4.1)
|
||||
endif()
|
||||
|
||||
set_source_files_properties(../auxil/highwayhash/highwayhash/hh_avx2.cc PROPERTIES COMPILE_FLAGS
|
||||
set_source_files_properties(${hhash_dir}/hh_avx2.cc PROPERTIES COMPILE_FLAGS
|
||||
${_avx_flag})
|
||||
set_source_files_properties(../auxil/highwayhash/highwayhash/hh_sse41.cc PROPERTIES COMPILE_FLAGS
|
||||
set_source_files_properties(${hhash_dir}/hh_sse41.cc PROPERTIES COMPILE_FLAGS
|
||||
${_sse_flag})
|
||||
|
||||
list(APPEND HH_SRCS
|
||||
../auxil/highwayhash/highwayhash/hh_avx2.cc
|
||||
../auxil/highwayhash/highwayhash/hh_sse41.cc
|
||||
)
|
||||
endif ()
|
||||
|
||||
set(zeek_SRCS
|
||||
|
@ -538,86 +540,53 @@ set(zeek_SRCS
|
|||
collect_headers(zeek_HEADERS ${zeek_SRCS})
|
||||
|
||||
add_library(zeek_objs OBJECT ${zeek_SRCS})
|
||||
target_link_libraries(zeek_objs PRIVATE $<BUILD_INTERFACE:zeek_internal>)
|
||||
add_dependencies(zeek_objs zeek_autogen_files)
|
||||
add_clang_tidy_files(${zeek_SRCS})
|
||||
zeek_target_link_libraries(zeek_objs)
|
||||
|
||||
if (ZEEK_STANDALONE)
|
||||
add_executable(zeek main.cc
|
||||
$<TARGET_OBJECTS:zeek_objs>
|
||||
${zeek_HEADERS}
|
||||
${bro_SUBDIR_LIBS}
|
||||
${bro_PLUGIN_LIBS}
|
||||
)
|
||||
if (TARGET zeek_exe)
|
||||
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
|
||||
# correctly at runtime. See https://npcap.com/guide/npcap-devguide.html#npcap-feature-native
|
||||
# for why this is necessary.
|
||||
if ( MSVC AND HAVE_WPCAP )
|
||||
set(zeekdeps ${zeekdeps} delayimp.lib)
|
||||
set_target_properties(zeek PROPERTIES LINK_FLAGS "/DELAYLOAD:wpcap.dll")
|
||||
set_target_properties(zeek_exe PROPERTIES LINK_FLAGS "/DELAYLOAD:wpcap.dll")
|
||||
endif()
|
||||
|
||||
target_link_libraries(zeek ${bro_PLUGIN_LINK_LIBS} ${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
|
||||
set_target_properties(zeek PROPERTIES ENABLE_EXPORTS TRUE)
|
||||
set_target_properties(zeek_exe PROPERTIES ENABLE_EXPORTS TRUE)
|
||||
|
||||
if ( MSVC )
|
||||
set(WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||
endif ()
|
||||
|
||||
install(TARGETS zeek RUNTIME DESTINATION bin)
|
||||
|
||||
set(BRO_EXE zeek
|
||||
CACHE STRING "Zeek executable binary" FORCE)
|
||||
|
||||
set(BRO_EXE_PATH ${CMAKE_CURRENT_BINARY_DIR}/zeek
|
||||
CACHE STRING "Path to Zeek executable binary" FORCE)
|
||||
endif()
|
||||
|
||||
if (NOT ZEEK_STANDALONE OR CONAN_EXPORTED)
|
||||
add_library(libzeek STATIC $<TARGET_OBJECTS:zeek_objs>
|
||||
${zeek_HEADERS}
|
||||
${bro_SUBDIR_LIBS}
|
||||
${bro_PLUGIN_LIBS})
|
||||
if (TARGET zeek_lib)
|
||||
target_sources(zeek_lib PRIVATE ${zeek_HEADERS})
|
||||
|
||||
target_link_libraries(libzeek PUBLIC ${zeekdeps}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${CMAKE_DL_LIBS}
|
||||
${bro_SUBDIR_LIBS}
|
||||
${bro_PLUGIN_LIBS})
|
||||
|
||||
target_include_directories(libzeek PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/zeek/src
|
||||
${CMAKE_SOURCE_DIR}/zeek/src/include
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/zeek/src
|
||||
${CMAKE_BINARY_DIR}/zeek/src/include)
|
||||
|
||||
install(TARGETS libzeek LIBRARY DESTINATION lib)
|
||||
target_link_libraries(
|
||||
zeek_lib
|
||||
PUBLIC
|
||||
${zeekdeps}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
# Target to create all the autogenerated files.
|
||||
add_custom_target(generate_outputs_stage1)
|
||||
add_dependencies(generate_outputs_stage1 ${bro_ALL_GENERATED_OUTPUTS})
|
||||
|
||||
# Target to create the joint includes files that pull in the bif code.
|
||||
bro_bif_create_includes(generate_outputs_stage2a ${CMAKE_CURRENT_BINARY_DIR} "${bro_AUTO_BIFS}")
|
||||
bro_bif_create_register(generate_outputs_stage2b ${CMAKE_CURRENT_BINARY_DIR} "${bro_REGISTER_BIFS}")
|
||||
add_dependencies(generate_outputs_stage2a generate_outputs_stage1)
|
||||
add_dependencies(generate_outputs_stage2b generate_outputs_stage1)
|
||||
|
||||
# Global target to trigger creation of autogenerated code.
|
||||
add_custom_target(generate_outputs)
|
||||
add_dependencies(generate_outputs generate_outputs_stage2a generate_outputs_stage2b)
|
||||
|
||||
# Build __load__.zeek files for standard *.bif.zeek.
|
||||
bro_bif_create_loader(bif_loader "${bro_BASE_BIF_SCRIPTS}")
|
||||
add_dependencies(bif_loader ${bro_PLUGIN_DEPS} ${bro_SUBDIR_DEPS})
|
||||
add_dependencies(zeek_objs bif_loader)
|
||||
|
||||
# Build __load__.zeek files for plugins/*.bif.zeek.
|
||||
bro_bif_create_loader(bif_loader_plugins "${bro_PLUGIN_BIF_SCRIPTS}")
|
||||
add_dependencies(bif_loader_plugins ${bro_PLUGIN_DEPS} ${bro_SUBDIR_DEPS})
|
||||
add_dependencies(zeek_objs bif_loader_plugins)
|
||||
zeek_include_directories(
|
||||
${CMAKE_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}/zeek/src
|
||||
${CMAKE_BINARY_DIR}/zeek/src/include
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/zeek/src
|
||||
${CMAKE_SOURCE_DIR}/zeek/src/include
|
||||
)
|
||||
|
||||
# Install *.bif.zeek.
|
||||
install(DIRECTORY ${PROJECT_BINARY_DIR}/scripts/base/bif DESTINATION ${ZEEK_SCRIPT_INSTALL_PATH}/base)
|
||||
|
|
34
src/ZeekConfig.cmake.in
Normal file
34
src/ZeekConfig.cmake.in
Normal file
|
@ -0,0 +1,34 @@
|
|||
@PACKAGE_INIT@
|
||||
|
||||
include(CMakeFindDependencyMacro)
|
||||
|
||||
# Note: ZeekPluginConfig only exists on the build interface to pull in
|
||||
# additional variables and dependencies for building dynamic plugins.
|
||||
if ( EXISTS "${CMAKE_CURRENT_LIST_DIR}/ZeekPluginConfig.cmake" )
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/ZeekPluginConfig.cmake")
|
||||
endif ()
|
||||
|
||||
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_dependency(Threads REQUIRED)
|
||||
|
||||
find_dependency(OpenSSL REQUIRED)
|
||||
|
||||
# In our MSVC build, we have these extra dependencies from Conan.
|
||||
if ( MSVC )
|
||||
find_dependency(libpcap)
|
||||
find_dependency(ZLIB)
|
||||
find_dependency(c-ares)
|
||||
endif ()
|
||||
|
||||
if ( NOT "@ZEEK_HAS_STATIC_BROKER@" )
|
||||
# Always force using the package config file since users might still have
|
||||
# a legacy FindBroker.cmake in their system.
|
||||
find_dependency(Broker REQUIRED CONFIG)
|
||||
endif ()
|
||||
|
||||
foreach ( dep @ZEEK_INSTALL_DEPENDENCIES@ )
|
||||
find_dependency(${dep} REQUIRED)
|
||||
endforeach ( )
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/ZeekTargets.cmake")
|
57
src/ZeekPluginConfig.cmake.in
Normal file
57
src/ZeekPluginConfig.cmake.in
Normal file
|
@ -0,0 +1,57 @@
|
|||
# Note: this config is used for builtin dynamic plugins outside of the source
|
||||
# tree of Zeek. Plugins refer back to the Zeek source tree since they need
|
||||
# access to some parts of Zeek that we don't install.
|
||||
|
||||
# Pull in some path magic that Zeek uses as well.
|
||||
include(MacDependencyPaths)
|
||||
|
||||
# For finding zeek-plugin-create-package.sh and zeek-plugin-install-package.sh.
|
||||
set(ZEEK_PLUGIN_SCRIPTS_PATH "@ZEEK_PLUGIN_SCRIPTS_PATH@")
|
||||
|
||||
# For finding Zeek sources.
|
||||
set(ZEEK_SOURCE_DIR "@ZEEK_SOURCE_DIR@")
|
||||
|
||||
# Provide a hint to ZeekConfig.cmake where to find Broker from the build tree.
|
||||
# Note: the straightforward way would be setting `Broker_ROOT` instead, but
|
||||
# plugins may still use CMake < 3.12.
|
||||
if (NOT "@ZEEK_HAS_EXTERNAL_BROKER@")
|
||||
set(Broker_DIR "@ZEEK_PLUGIN_BROKER_PATH@" CACHE
|
||||
PATH "Directory for finding Broker's package file" FORCE)
|
||||
endif ()
|
||||
|
||||
# Provide hint to the plugins where to find standard packages by passing along
|
||||
# user-defined values.
|
||||
set(ZeekOpenSSLHint "@ZeekOpenSSLHint@")
|
||||
if (ZeekOpenSSLHint AND NOT OPENSSL_ROOT_DIR)
|
||||
set(OPENSSL_ROOT_DIR "${ZeekOpenSSLHint}" CACHE
|
||||
PATH "Directory hint for finding OpenSSL" FORCE)
|
||||
endif ()
|
||||
|
||||
# Force PKG_CONFIG_PATH environment variable to reflect what we've used when
|
||||
# building Zeek.
|
||||
set(ZeekPkgConfigPath "@ZeekPkgConfigPath@")
|
||||
if (ZeekPkgConfigPath)
|
||||
set(ENV{PKG_CONFIG_PATH} "${ZeekPkgConfigPath}")
|
||||
endif ()
|
||||
|
||||
# For having a binpac target available. Guarded to shield against including this
|
||||
# file multiple times.
|
||||
if (NOT TARGET Zeek::BinPAC)
|
||||
add_executable(Zeek::BinPAC IMPORTED)
|
||||
set_property(TARGET Zeek::BinPAC PROPERTY
|
||||
IMPORTED_LOCATION "@BINPAC_EXE_PATH@")
|
||||
endif ()
|
||||
|
||||
# For having a bifcl target available. Guarded to shield against including this
|
||||
# file multiple times.
|
||||
if (NOT TARGET Zeek::BifCl)
|
||||
add_executable(Zeek::BifCl IMPORTED)
|
||||
set_property(TARGET Zeek::BifCl PROPERTY
|
||||
IMPORTED_LOCATION "@BIFCL_EXE_PATH@")
|
||||
endif ()
|
||||
|
||||
# TODO: using BIFCL_EXE_PATH and BINPAC_EXE_PATH does not play well with
|
||||
# multi-configuration generators. We currently hard-code these paths in
|
||||
# the main CMakeLists.txt instead of dynamically fetching the right thing.
|
||||
# A better solution would be either using find_program here or
|
||||
# `file(GENERATE ...)` from the main CMake file.
|
|
@ -1,20 +1,14 @@
|
|||
|
||||
include(ZeekSubdir)
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
add_subdirectory(protocol)
|
||||
|
||||
set(analyzer_SRCS
|
||||
Analyzer.cc
|
||||
Manager.cc
|
||||
Component.cc
|
||||
zeek_add_subdir_library(
|
||||
analyzer
|
||||
INTERNAL_DEPENDENCIES ${BIF_BUILD_TARGET}
|
||||
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES
|
||||
Analyzer.cc
|
||||
Component.cc
|
||||
Manager.cc
|
||||
)
|
||||
|
||||
# Treat BIFs as builtin (alternative mode).
|
||||
bif_target(analyzer.bif)
|
||||
|
||||
bro_add_subdir_library(analyzer ${analyzer_SRCS})
|
||||
add_dependencies(bro_analyzer generate_outputs)
|
||||
add_subdirectory(protocol)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
add_subdirectory(bittorrent)
|
||||
add_subdirectory(conn-size)
|
||||
add_subdirectory(dce-rpc)
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek BitTorrent)
|
||||
zeek_plugin_cc(BitTorrent.cc BitTorrentTracker.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(bittorrent.pac bittorrent-analyzer.pac bittorrent-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
BitTorrent
|
||||
SOURCES
|
||||
BitTorrent.cc
|
||||
BitTorrentTracker.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
bittorrent.pac
|
||||
bittorrent-analyzer.pac
|
||||
bittorrent-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek ConnSize)
|
||||
zeek_plugin_cc(ConnSize.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
ConnSize
|
||||
SOURCES
|
||||
ConnSize.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
functions.bif
|
||||
)
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek DCE_RPC)
|
||||
zeek_plugin_cc(DCE_RPC.cc Plugin.cc)
|
||||
zeek_plugin_bif(consts.bif types.bif events.bif)
|
||||
zeek_plugin_pac(
|
||||
dce_rpc.pac
|
||||
dce_rpc-protocol.pac
|
||||
dce_rpc-analyzer.pac
|
||||
dce_rpc-auth.pac
|
||||
endpoint-atsvc.pac
|
||||
endpoint-epmapper.pac
|
||||
)
|
||||
zeek_plugin_end()
|
||||
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
DCE_RPC
|
||||
SOURCES
|
||||
DCE_RPC.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
consts.bif
|
||||
types.bif
|
||||
events.bif
|
||||
PAC
|
||||
dce_rpc.pac
|
||||
dce_rpc-protocol.pac
|
||||
dce_rpc-analyzer.pac
|
||||
dce_rpc-auth.pac
|
||||
endpoint-atsvc.pac
|
||||
endpoint-epmapper.pac
|
||||
)
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek DHCP)
|
||||
zeek_plugin_cc(DHCP.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(types.bif)
|
||||
zeek_plugin_pac(dhcp.pac dhcp-protocol.pac dhcp-analyzer.pac dhcp-options.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
DHCP
|
||||
SOURCES
|
||||
DHCP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
types.bif
|
||||
PAC
|
||||
dhcp.pac
|
||||
dhcp-protocol.pac
|
||||
dhcp-analyzer.pac
|
||||
dhcp-options.pac
|
||||
)
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek DNP3)
|
||||
zeek_plugin_cc(DNP3.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(dnp3.pac dnp3-analyzer.pac dnp3-protocol.pac dnp3-objects.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
DNP3
|
||||
SOURCES
|
||||
DNP3.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
dnp3.pac
|
||||
dnp3-analyzer.pac
|
||||
dnp3-protocol.pac
|
||||
dnp3-objects.pac
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek DNS)
|
||||
zeek_plugin_cc(DNS.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
DNS
|
||||
SOURCES
|
||||
DNS.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek File)
|
||||
zeek_plugin_cc(File.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
File
|
||||
SOURCES
|
||||
File.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek Finger)
|
||||
zeek_plugin_cc(Finger.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
Finger
|
||||
SOURCES
|
||||
Finger.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek FTP)
|
||||
zeek_plugin_cc(FTP.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
FTP
|
||||
SOURCES
|
||||
FTP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
functions.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek Gnutella)
|
||||
zeek_plugin_cc(Gnutella.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
Gnutella
|
||||
SOURCES
|
||||
Gnutella.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek GSSAPI)
|
||||
zeek_plugin_cc(GSSAPI.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(
|
||||
gssapi.pac
|
||||
gssapi-protocol.pac
|
||||
gssapi-analyzer.pac
|
||||
../asn1/asn1.pac
|
||||
)
|
||||
zeek_plugin_end()
|
||||
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
GSSAPI
|
||||
SOURCES
|
||||
GSSAPI.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
gssapi.pac
|
||||
gssapi-protocol.pac
|
||||
gssapi-analyzer.pac
|
||||
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac
|
||||
)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek HTTP)
|
||||
zeek_plugin_cc(HTTP.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
HTTP
|
||||
SOURCES
|
||||
HTTP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
functions.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek Ident)
|
||||
zeek_plugin_cc(Ident.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
Ident
|
||||
SOURCES
|
||||
Ident.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek IMAP)
|
||||
zeek_plugin_cc(Plugin.cc)
|
||||
zeek_plugin_cc(IMAP.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(imap.pac imap-analyzer.pac imap-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
IMAP
|
||||
SOURCES
|
||||
Plugin.cc
|
||||
IMAP.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
imap.pac
|
||||
imap-analyzer.pac
|
||||
imap-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek IRC)
|
||||
zeek_plugin_cc(IRC.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
IRC
|
||||
SOURCES
|
||||
IRC.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,26 +1,29 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek KRB)
|
||||
zeek_plugin_cc(Plugin.cc)
|
||||
zeek_plugin_cc(KRB.cc)
|
||||
zeek_plugin_cc(KRB_TCP.cc)
|
||||
zeek_plugin_bif(types.bif)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(krb.pac krb-protocol.pac krb-analyzer.pac
|
||||
krb-asn1.pac
|
||||
krb-defs.pac
|
||||
krb-types.pac
|
||||
krb-padata.pac
|
||||
../asn1/asn1.pac
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
KRB
|
||||
SOURCES
|
||||
Plugin.cc
|
||||
KRB.cc
|
||||
KRB_TCP.cc
|
||||
BIFS
|
||||
types.bif
|
||||
events.bif
|
||||
PAC
|
||||
krb.pac
|
||||
krb-protocol.pac
|
||||
krb-analyzer.pac
|
||||
krb-asn1.pac
|
||||
krb-defs.pac
|
||||
krb-types.pac
|
||||
krb-padata.pac
|
||||
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac
|
||||
PAC
|
||||
krb_TCP.pac
|
||||
krb-protocol.pac
|
||||
krb-analyzer.pac
|
||||
krb-asn1.pac
|
||||
krb-defs.pac
|
||||
krb-types.pac
|
||||
krb-padata.pac
|
||||
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac
|
||||
)
|
||||
zeek_plugin_pac(krb_TCP.pac krb-protocol.pac krb-analyzer.pac
|
||||
krb-asn1.pac
|
||||
krb-defs.pac
|
||||
krb-types.pac
|
||||
krb-padata.pac
|
||||
../asn1/asn1.pac
|
||||
)
|
||||
zeek_plugin_end()
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek Login)
|
||||
zeek_plugin_cc(Login.cc RSH.cc Telnet.cc Rlogin.cc NVT.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
Login
|
||||
SOURCES
|
||||
Login.cc
|
||||
RSH.cc
|
||||
Telnet.cc
|
||||
Rlogin.cc
|
||||
NVT.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
functions.bif
|
||||
)
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
# This is not an actual analyzer, but used by others. We still maintain it here
|
||||
# along with the other analyzers because conceptually it's also parsing a
|
||||
# protocol just like them. The current structure is merely a left-over from when
|
||||
# this code was written.
|
||||
|
||||
# This is not an actual analyzer, but used by others. We still
|
||||
# maintain it here along with the other analyzers because conceptually
|
||||
# it's also parsing a protocol just like them. The current structure
|
||||
# is merely a left-over from when this code was written.
|
||||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek MIME)
|
||||
zeek_plugin_cc(MIME.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
MIME
|
||||
SOURCES
|
||||
MIME.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek Modbus)
|
||||
zeek_plugin_cc(Modbus.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(modbus.pac modbus-analyzer.pac modbus-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
Modbus
|
||||
SOURCES
|
||||
Modbus.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
modbus.pac
|
||||
modbus-analyzer.pac
|
||||
modbus-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,26 +1,27 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek MQTT)
|
||||
zeek_plugin_cc(MQTT.cc Plugin.cc)
|
||||
zeek_plugin_bif(types.bif events.bif)
|
||||
zeek_plugin_pac(mqtt.pac
|
||||
mqtt-protocol.pac
|
||||
commands/connect.pac
|
||||
commands/connack.pac
|
||||
commands/publish.pac
|
||||
commands/puback.pac
|
||||
commands/pubrec.pac
|
||||
commands/pubrel.pac
|
||||
commands/pubcomp.pac
|
||||
commands/subscribe.pac
|
||||
commands/suback.pac
|
||||
commands/unsuback.pac
|
||||
commands/unsubscribe.pac
|
||||
commands/disconnect.pac
|
||||
commands/pingreq.pac
|
||||
commands/pingresp.pac
|
||||
)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
MQTT
|
||||
SOURCES
|
||||
MQTT.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
types.bif
|
||||
events.bif
|
||||
PAC
|
||||
mqtt.pac
|
||||
mqtt-protocol.pac
|
||||
commands/connect.pac
|
||||
commands/connack.pac
|
||||
commands/publish.pac
|
||||
commands/puback.pac
|
||||
commands/pubrec.pac
|
||||
commands/pubrel.pac
|
||||
commands/pubcomp.pac
|
||||
commands/subscribe.pac
|
||||
commands/suback.pac
|
||||
commands/unsuback.pac
|
||||
commands/unsubscribe.pac
|
||||
commands/disconnect.pac
|
||||
commands/pingreq.pac
|
||||
commands/pingresp.pac
|
||||
)
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek MySQL)
|
||||
zeek_plugin_cc(MySQL.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(mysql.pac mysql-analyzer.pac mysql-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
MySQL
|
||||
SOURCES
|
||||
MySQL.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
mysql.pac
|
||||
mysql-analyzer.pac
|
||||
mysql-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek NCP)
|
||||
zeek_plugin_cc(NCP.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif consts.bif)
|
||||
zeek_plugin_pac(ncp.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
NCP
|
||||
SOURCES
|
||||
NCP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
consts.bif
|
||||
PAC
|
||||
ncp.pac
|
||||
)
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR}/../dce-rpc)
|
||||
include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR}/../smb)
|
||||
|
||||
zeek_plugin_begin(Zeek NetBIOS)
|
||||
zeek_plugin_cc(NetbiosSSN.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_end()
|
||||
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
NetBIOS
|
||||
SOURCES
|
||||
NetbiosSSN.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
functions.bif
|
||||
)
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek NTLM)
|
||||
zeek_plugin_cc(NTLM.cc Plugin.cc)
|
||||
zeek_plugin_bif(types.bif events.bif)
|
||||
zeek_plugin_pac(
|
||||
ntlm.pac
|
||||
ntlm-protocol.pac
|
||||
ntlm-analyzer.pac
|
||||
)
|
||||
zeek_plugin_end()
|
||||
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
NTLM
|
||||
SOURCES
|
||||
NTLM.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
types.bif
|
||||
events.bif
|
||||
PAC
|
||||
ntlm.pac
|
||||
ntlm-protocol.pac
|
||||
ntlm-analyzer.pac
|
||||
)
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek NTP)
|
||||
zeek_plugin_cc(NTP.cc Plugin.cc)
|
||||
zeek_plugin_bif(types.bif events.bif)
|
||||
zeek_plugin_pac(ntp.pac ntp-analyzer.pac ntp-mode7.pac ntp-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
NTP
|
||||
SOURCES
|
||||
NTP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
types.bif
|
||||
events.bif
|
||||
PAC
|
||||
ntp.pac
|
||||
ntp-analyzer.pac
|
||||
ntp-mode7.pac
|
||||
ntp-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek PIA)
|
||||
zeek_plugin_cc(PIA.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
PIA
|
||||
SOURCES
|
||||
PIA.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek POP3)
|
||||
zeek_plugin_cc(POP3.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
POP3
|
||||
SOURCES
|
||||
POP3.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek RADIUS)
|
||||
zeek_plugin_cc(RADIUS.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(radius.pac radius-analyzer.pac radius-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
RADIUS
|
||||
SOURCES
|
||||
RADIUS.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
radius.pac
|
||||
radius-analyzer.pac
|
||||
radius-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,11 +1,20 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek RDP)
|
||||
zeek_plugin_cc(RDPEUDP.cc RDP.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(types.bif)
|
||||
zeek_plugin_pac(rdp.pac rdp-analyzer.pac rdp-protocol.pac ../asn1/asn1.pac)
|
||||
zeek_plugin_pac(rdpeudp.pac rdpeudp-analyzer.pac rdpeudp-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
RDP
|
||||
SOURCES
|
||||
RDPEUDP.cc
|
||||
RDP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
types.bif
|
||||
PAC
|
||||
rdp.pac
|
||||
rdp-analyzer.pac
|
||||
rdp-protocol.pac
|
||||
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac
|
||||
PAC
|
||||
rdpeudp.pac
|
||||
rdpeudp-analyzer.pac
|
||||
rdpeudp-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek RFB)
|
||||
zeek_plugin_cc(RFB.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(rfb.pac rfb-analyzer.pac rfb-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
RFB
|
||||
SOURCES
|
||||
RFB.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
rfb.pac
|
||||
rfb-analyzer.pac
|
||||
rfb-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek RPC)
|
||||
zeek_plugin_cc(RPC.cc NFS.cc MOUNT.cc Portmap.cc XDR.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
RPC
|
||||
SOURCES
|
||||
RPC.cc
|
||||
NFS.cc
|
||||
MOUNT.cc
|
||||
Portmap.cc
|
||||
XDR.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek SIP)
|
||||
zeek_plugin_cc(Plugin.cc)
|
||||
zeek_plugin_cc(SIP.cc)
|
||||
zeek_plugin_cc(SIP_TCP.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(sip.pac sip-analyzer.pac sip-protocol.pac)
|
||||
zeek_plugin_pac(sip_TCP.pac sip-protocol.pac sip-analyzer.pac)
|
||||
zeek_plugin_end()
|
||||
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
SIP
|
||||
SOURCES
|
||||
Plugin.cc
|
||||
SIP.cc
|
||||
SIP_TCP.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
sip.pac
|
||||
sip-analyzer.pac
|
||||
sip-protocol.pac
|
||||
PAC
|
||||
sip_TCP.pac
|
||||
sip-protocol.pac
|
||||
sip-analyzer.pac
|
||||
)
|
||||
|
|
|
@ -1,90 +1,89 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR}/../dce-rpc)
|
||||
|
||||
zeek_plugin_begin(Zeek SMB)
|
||||
zeek_plugin_cc(SMB.cc Plugin.cc)
|
||||
zeek_plugin_bif(
|
||||
smb1_com_check_directory.bif
|
||||
smb1_com_close.bif
|
||||
smb1_com_create_directory.bif
|
||||
smb1_com_echo.bif
|
||||
smb1_com_logoff_andx.bif
|
||||
smb1_com_negotiate.bif
|
||||
smb1_com_nt_create_andx.bif
|
||||
smb1_com_nt_cancel.bif
|
||||
smb1_com_query_information.bif
|
||||
smb1_com_read_andx.bif
|
||||
smb1_com_session_setup_andx.bif
|
||||
smb1_com_transaction.bif
|
||||
smb1_com_transaction_secondary.bif
|
||||
smb1_com_transaction2.bif
|
||||
smb1_com_transaction2_secondary.bif
|
||||
smb1_com_tree_connect_andx.bif
|
||||
smb1_com_tree_disconnect.bif
|
||||
smb1_com_write_andx.bif
|
||||
smb1_events.bif
|
||||
|
||||
smb2_com_close.bif
|
||||
smb2_com_create.bif
|
||||
smb2_com_negotiate.bif
|
||||
smb2_com_read.bif
|
||||
smb2_com_session_setup.bif
|
||||
smb2_com_set_info.bif
|
||||
smb2_com_tree_connect.bif
|
||||
smb2_com_tree_disconnect.bif
|
||||
smb2_com_write.bif
|
||||
smb2_com_transform_header.bif
|
||||
smb2_events.bif
|
||||
|
||||
events.bif
|
||||
consts.bif
|
||||
|
||||
types.bif)
|
||||
zeek_plugin_pac(
|
||||
smb.pac
|
||||
smb-common.pac
|
||||
smb-strings.pac
|
||||
smb-time.pac
|
||||
smb-pipe.pac
|
||||
smb-gssapi.pac
|
||||
smb-mailslot.pac
|
||||
|
||||
smb1-protocol.pac
|
||||
smb1-com-check-directory.pac
|
||||
smb1-com-close.pac
|
||||
smb1-com-create-directory.pac
|
||||
smb1-com-echo.pac
|
||||
smb1-com-locking-andx.pac
|
||||
smb1-com-logoff-andx.pac
|
||||
smb1-com-negotiate.pac
|
||||
smb1-com-nt-cancel.pac
|
||||
smb1-com-nt-create-andx.pac
|
||||
smb1-com-nt-transact.pac
|
||||
smb1-com-query-information.pac
|
||||
smb1-com-read-andx.pac
|
||||
smb1-com-session-setup-andx.pac
|
||||
smb1-com-transaction-secondary.pac
|
||||
smb1-com-transaction.pac
|
||||
smb1-com-transaction2.pac
|
||||
smb1-com-transaction2-secondary.pac
|
||||
smb1-com-tree-connect-andx.pac
|
||||
smb1-com-tree-disconnect.pac
|
||||
smb1-com-write-andx.pac
|
||||
|
||||
smb2-protocol.pac
|
||||
smb2-com-close.pac
|
||||
smb2-com-create.pac
|
||||
smb2-com-ioctl.pac
|
||||
smb2-com-lock.pac
|
||||
smb2-com-negotiate.pac
|
||||
smb2-com-read.pac
|
||||
smb2-com-session-setup.pac
|
||||
smb2-com-set-info.pac
|
||||
smb2-com-tree-connect.pac
|
||||
smb2-com-tree-disconnect.pac
|
||||
smb2-com-write.pac
|
||||
smb2-com-transform-header.pac
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
SMB
|
||||
SOURCES
|
||||
SMB.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
# SMB 1.
|
||||
smb1_com_check_directory.bif
|
||||
smb1_com_close.bif
|
||||
smb1_com_create_directory.bif
|
||||
smb1_com_echo.bif
|
||||
smb1_com_logoff_andx.bif
|
||||
smb1_com_negotiate.bif
|
||||
smb1_com_nt_create_andx.bif
|
||||
smb1_com_nt_cancel.bif
|
||||
smb1_com_query_information.bif
|
||||
smb1_com_read_andx.bif
|
||||
smb1_com_session_setup_andx.bif
|
||||
smb1_com_transaction.bif
|
||||
smb1_com_transaction_secondary.bif
|
||||
smb1_com_transaction2.bif
|
||||
smb1_com_transaction2_secondary.bif
|
||||
smb1_com_tree_connect_andx.bif
|
||||
smb1_com_tree_disconnect.bif
|
||||
smb1_com_write_andx.bif
|
||||
smb1_events.bif
|
||||
# SMB 2.
|
||||
smb2_com_close.bif
|
||||
smb2_com_create.bif
|
||||
smb2_com_negotiate.bif
|
||||
smb2_com_read.bif
|
||||
smb2_com_session_setup.bif
|
||||
smb2_com_set_info.bif
|
||||
smb2_com_tree_connect.bif
|
||||
smb2_com_tree_disconnect.bif
|
||||
smb2_com_write.bif
|
||||
smb2_com_transform_header.bif
|
||||
smb2_events.bif
|
||||
# Common boilerplate.
|
||||
events.bif
|
||||
consts.bif
|
||||
types.bif
|
||||
PAC
|
||||
# Common boilerplate.
|
||||
smb.pac
|
||||
smb-common.pac
|
||||
smb-strings.pac
|
||||
smb-time.pac
|
||||
smb-pipe.pac
|
||||
smb-gssapi.pac
|
||||
smb-mailslot.pac
|
||||
# SMB 1.
|
||||
smb1-protocol.pac
|
||||
smb1-com-check-directory.pac
|
||||
smb1-com-close.pac
|
||||
smb1-com-create-directory.pac
|
||||
smb1-com-echo.pac
|
||||
smb1-com-locking-andx.pac
|
||||
smb1-com-logoff-andx.pac
|
||||
smb1-com-negotiate.pac
|
||||
smb1-com-nt-cancel.pac
|
||||
smb1-com-nt-create-andx.pac
|
||||
smb1-com-nt-transact.pac
|
||||
smb1-com-query-information.pac
|
||||
smb1-com-read-andx.pac
|
||||
smb1-com-session-setup-andx.pac
|
||||
smb1-com-transaction-secondary.pac
|
||||
smb1-com-transaction.pac
|
||||
smb1-com-transaction2.pac
|
||||
smb1-com-transaction2-secondary.pac
|
||||
smb1-com-tree-connect-andx.pac
|
||||
smb1-com-tree-disconnect.pac
|
||||
smb1-com-write-andx.pac
|
||||
# SMB 2.
|
||||
smb2-protocol.pac
|
||||
smb2-com-close.pac
|
||||
smb2-com-create.pac
|
||||
smb2-com-ioctl.pac
|
||||
smb2-com-lock.pac
|
||||
smb2-com-negotiate.pac
|
||||
smb2-com-read.pac
|
||||
smb2-com-session-setup.pac
|
||||
smb2-com-set-info.pac
|
||||
smb2-com-tree-connect.pac
|
||||
smb2-com-tree-disconnect.pac
|
||||
smb2-com-write.pac
|
||||
smb2-com-transform-header.pac
|
||||
)
|
||||
zeek_plugin_end()
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek SMTP)
|
||||
zeek_plugin_cc(SMTP.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
SMTP
|
||||
SOURCES
|
||||
SMTP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
functions.bif
|
||||
)
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek SNMP)
|
||||
zeek_plugin_cc(SNMP.cc Plugin.cc)
|
||||
zeek_plugin_bif(types.bif)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(snmp.pac snmp-protocol.pac snmp-analyzer.pac ../asn1/asn1.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
SNMP
|
||||
SOURCES
|
||||
SNMP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
types.bif
|
||||
events.bif
|
||||
PAC
|
||||
snmp.pac
|
||||
snmp-protocol.pac
|
||||
snmp-analyzer.pac
|
||||
${PROJECT_SOURCE_DIR}/src/analyzer/protocol/asn1/asn1.pac
|
||||
)
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek SOCKS)
|
||||
zeek_plugin_cc(SOCKS.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(socks.pac socks-protocol.pac socks-analyzer.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
SOCKS
|
||||
SOURCES
|
||||
SOCKS.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
socks.pac
|
||||
socks-protocol.pac
|
||||
socks-analyzer.pac
|
||||
)
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek SSH)
|
||||
zeek_plugin_cc(SSH.cc Plugin.cc)
|
||||
zeek_plugin_bif(types.bif)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(ssh.pac ssh-analyzer.pac ssh-protocol.pac consts.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
SSH
|
||||
SOURCES
|
||||
SSH.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
types.bif
|
||||
events.bif
|
||||
PAC
|
||||
ssh.pac
|
||||
ssh-analyzer.pac
|
||||
ssh-protocol.pac
|
||||
consts.pac
|
||||
)
|
||||
|
|
|
@ -1,20 +1,35 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek SSL)
|
||||
zeek_plugin_cc(SSL.cc DTLS.cc Plugin.cc)
|
||||
zeek_plugin_bif(types.bif)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_bif(consts.bif)
|
||||
zeek_plugin_pac(tls-handshake.pac tls-handshake-protocol.pac tls-handshake-analyzer.pac ssl-defs.pac
|
||||
proc-certificate.pac
|
||||
tls-handshake-signed_certificate_timestamp.pac
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
SSL
|
||||
SOURCES
|
||||
SSL.cc
|
||||
DTLS.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
types.bif
|
||||
events.bif
|
||||
functions.bif
|
||||
consts.bif
|
||||
PAC
|
||||
tls-handshake.pac
|
||||
tls-handshake-protocol.pac
|
||||
tls-handshake-analyzer.pac
|
||||
ssl-defs.pac
|
||||
proc-certificate.pac
|
||||
tls-handshake-signed_certificate_timestamp.pac
|
||||
PAC
|
||||
ssl.pac
|
||||
ssl-dtls-analyzer.pac
|
||||
ssl-analyzer.pac
|
||||
ssl-dtls-protocol.pac
|
||||
ssl-protocol.pac
|
||||
ssl-defs.pac
|
||||
proc-certificate.pac
|
||||
PAC
|
||||
dtls.pac
|
||||
ssl-dtls-analyzer.pac
|
||||
dtls-analyzer.pac
|
||||
ssl-dtls-protocol.pac
|
||||
dtls-protocol.pac
|
||||
ssl-defs.pac
|
||||
)
|
||||
zeek_plugin_pac(ssl.pac ssl-dtls-analyzer.pac ssl-analyzer.pac ssl-dtls-protocol.pac ssl-protocol.pac ssl-defs.pac
|
||||
proc-certificate.pac
|
||||
)
|
||||
zeek_plugin_pac(dtls.pac ssl-dtls-analyzer.pac dtls-analyzer.pac ssl-dtls-protocol.pac dtls-protocol.pac ssl-defs.pac)
|
||||
zeek_plugin_end()
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek Syslog)
|
||||
zeek_plugin_cc(Syslog.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(syslog.pac syslog-analyzer.pac syslog-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
Syslog
|
||||
SOURCES
|
||||
Syslog.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
syslog.pac
|
||||
syslog-analyzer.pac
|
||||
syslog-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek TCP)
|
||||
zeek_plugin_cc(TCP.cc TCP_Endpoint.cc TCP_Reassembler.cc ContentLine.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(types.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
TCP
|
||||
SOURCES
|
||||
TCP.cc
|
||||
TCP_Endpoint.cc
|
||||
TCP_Reassembler.cc
|
||||
ContentLine.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
types.bif
|
||||
functions.bif
|
||||
)
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek XMPP)
|
||||
zeek_plugin_cc(Plugin.cc)
|
||||
zeek_plugin_cc(XMPP.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(xmpp.pac xmpp-analyzer.pac xmpp-protocol.pac)
|
||||
zeek_plugin_end()
|
||||
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
XMPP
|
||||
SOURCES
|
||||
Plugin.cc
|
||||
XMPP.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
xmpp.pac
|
||||
xmpp-analyzer.pac
|
||||
xmpp-protocol.pac
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek ZIP)
|
||||
zeek_plugin_cc(ZIP.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
ZIP
|
||||
SOURCES
|
||||
ZIP.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,20 +1,13 @@
|
|||
include(ZeekSubdir)
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
zeek_add_subdir_library(
|
||||
comm
|
||||
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES
|
||||
Data.cc
|
||||
Manager.cc
|
||||
Store.cc
|
||||
BIFS
|
||||
comm.bif
|
||||
data.bif
|
||||
messaging.bif
|
||||
store.bif
|
||||
)
|
||||
|
||||
set(comm_SRCS
|
||||
Data.cc
|
||||
Manager.cc
|
||||
Store.cc
|
||||
)
|
||||
|
||||
bif_target(comm.bif)
|
||||
bif_target(data.bif)
|
||||
bif_target(messaging.bif)
|
||||
bif_target(store.bif)
|
||||
|
||||
bro_add_subdir_library(brokercomm ${comm_SRCS})
|
||||
add_dependencies(bro_brokercomm generate_outputs)
|
||||
|
|
|
@ -1,23 +1,16 @@
|
|||
include(ZeekSubdir)
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
zeek_add_subdir_library(
|
||||
file_analysis
|
||||
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES
|
||||
Manager.cc
|
||||
File.cc
|
||||
FileTimer.cc
|
||||
FileReassembler.cc
|
||||
Analyzer.cc
|
||||
AnalyzerSet.cc
|
||||
Component.cc
|
||||
BIFS
|
||||
file_analysis.bif
|
||||
)
|
||||
|
||||
add_subdirectory(analyzer)
|
||||
|
||||
set(file_analysis_SRCS
|
||||
Manager.cc
|
||||
File.cc
|
||||
FileTimer.cc
|
||||
FileReassembler.cc
|
||||
Analyzer.cc
|
||||
AnalyzerSet.cc
|
||||
Component.cc
|
||||
)
|
||||
|
||||
bif_target(file_analysis.bif)
|
||||
|
||||
bro_add_subdir_library(file_analysis ${file_analysis_SRCS})
|
||||
add_dependencies(bro_file_analysis generate_outputs)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek FileDataEvent)
|
||||
zeek_plugin_cc(DataEvent.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
FileDataEvent
|
||||
SOURCES
|
||||
DataEvent.cc
|
||||
Plugin.cc
|
||||
INCLUDE_DIRS
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek FileEntropy)
|
||||
zeek_plugin_cc(Entropy.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
FileEntropy
|
||||
SOURCES
|
||||
Entropy.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek FileExtract)
|
||||
zeek_plugin_cc(Extract.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
FileExtract
|
||||
SOURCES
|
||||
Extract.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
functions.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek FileHash)
|
||||
zeek_plugin_cc(Hash.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
FileHash
|
||||
SOURCES
|
||||
Hash.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek PE)
|
||||
zeek_plugin_cc(PE.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_pac(
|
||||
pe.pac
|
||||
pe-analyzer.pac
|
||||
pe-file-headers.pac
|
||||
pe-file-idata.pac
|
||||
pe-file.pac
|
||||
pe-file-types.pac
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
PE
|
||||
SOURCES
|
||||
PE.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
PAC
|
||||
pe.pac
|
||||
pe-analyzer.pac
|
||||
pe-file-headers.pac
|
||||
pe-file-idata.pac
|
||||
pe-file.pac
|
||||
pe-file-types.pac
|
||||
)
|
||||
zeek_plugin_end()
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek X509)
|
||||
zeek_plugin_cc(X509Common.cc X509.cc OCSP.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif types.bif functions.bif ocsp_events.bif)
|
||||
zeek_plugin_pac(x509-extension.pac x509-signed_certificate_timestamp.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
X509
|
||||
SOURCES
|
||||
X509Common.cc
|
||||
X509.cc
|
||||
OCSP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
types.bif
|
||||
functions.bif
|
||||
ocsp_events.bif
|
||||
PAC
|
||||
x509-extension.pac
|
||||
x509-signed_certificate_timestamp.pac
|
||||
)
|
||||
|
|
|
@ -64,12 +64,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
|
|||
|
||||
add_library(zeek_fuzzer_standalone OBJECT standalone-driver.cc)
|
||||
|
||||
add_library(zeek_fuzzer_shared SHARED
|
||||
$<TARGET_OBJECTS:zeek_objs>
|
||||
${bro_SUBDIR_LIBS}
|
||||
${bro_PLUGIN_LIBS}
|
||||
FuzzBuffer.cc
|
||||
)
|
||||
target_sources(zeek_fuzzer_shared PRIVATE FuzzBuffer.cc)
|
||||
|
||||
set(zeek_fuzzer_shared_deps)
|
||||
|
||||
|
@ -83,8 +78,7 @@ foreach(_dep ${zeekdeps} )
|
|||
endif ()
|
||||
endforeach ()
|
||||
|
||||
target_link_libraries(zeek_fuzzer_shared
|
||||
${bro_PLUGIN_LINK_LIBS}
|
||||
target_link_libraries(zeek_fuzzer_shared PUBLIC
|
||||
${zeek_fuzzer_shared_deps}
|
||||
${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
|
||||
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
|
||||
include(ZeekSubdir)
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
zeek_add_subdir_library(
|
||||
input
|
||||
SOURCES
|
||||
Component.cc
|
||||
Manager.cc
|
||||
ReaderBackend.cc
|
||||
ReaderFrontend.cc
|
||||
BIFS
|
||||
input.bif
|
||||
)
|
||||
|
||||
add_subdirectory(readers)
|
||||
|
||||
set(input_SRCS
|
||||
Component.cc
|
||||
Manager.cc
|
||||
ReaderBackend.cc
|
||||
ReaderFrontend.cc
|
||||
)
|
||||
|
||||
bif_target(input.bif)
|
||||
|
||||
bro_add_subdir_library(input ${input_SRCS})
|
||||
add_dependencies(bro_input generate_outputs)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek AsciiReader)
|
||||
zeek_plugin_cc(Ascii.cc Plugin.cc)
|
||||
zeek_plugin_bif(ascii.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
AsciiReader
|
||||
SOURCES
|
||||
Ascii.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
ascii.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek BenchmarkReader)
|
||||
zeek_plugin_cc(Benchmark.cc Plugin.cc)
|
||||
zeek_plugin_bif(benchmark.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
BenchmarkReader
|
||||
SOURCES
|
||||
Benchmark.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
benchmark.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek BinaryReader)
|
||||
zeek_plugin_cc(Binary.cc Plugin.cc)
|
||||
zeek_plugin_bif(binary.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
BinaryReader
|
||||
SOURCES
|
||||
Binary.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
binary.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek ConfigReader)
|
||||
zeek_plugin_cc(Config.cc Plugin.cc)
|
||||
zeek_plugin_bif(config.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
ConfigReader
|
||||
SOURCES
|
||||
Config.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
config.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek RawReader)
|
||||
zeek_plugin_cc(Raw.cc Plugin.cc)
|
||||
zeek_plugin_bif(raw.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
RawReader
|
||||
SOURCES
|
||||
Raw.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
raw.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek SQLiteReader)
|
||||
zeek_plugin_cc(SQLite.cc Plugin.cc)
|
||||
zeek_plugin_bif(sqlite.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
SQLiteReader
|
||||
SOURCES
|
||||
SQLite.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
sqlite.bif
|
||||
)
|
||||
|
|
|
@ -1,21 +1,12 @@
|
|||
|
||||
include(ZeekSubdir)
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
zeek_add_subdir_library(
|
||||
iosource
|
||||
SOURCES
|
||||
BPF_Program.cc
|
||||
Component.cc
|
||||
Manager.cc
|
||||
Packet.cc
|
||||
PktDumper.cc
|
||||
PktSrc.cc
|
||||
)
|
||||
|
||||
add_subdirectory(pcap)
|
||||
|
||||
set(iosource_SRCS
|
||||
BPF_Program.cc
|
||||
Component.cc
|
||||
Manager.cc
|
||||
Packet.cc
|
||||
PktDumper.cc
|
||||
PktSrc.cc
|
||||
)
|
||||
|
||||
bro_add_subdir_library(iosource ${iosource_SRCS})
|
||||
add_dependencies(bro_iosource generate_outputs)
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
zeek_add_plugin(
|
||||
Zeek
|
||||
Pcap
|
||||
SOURCES
|
||||
Source.cc
|
||||
Dumper.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek Pcap)
|
||||
zeek_plugin_cc(Source.cc Dumper.cc Plugin.cc)
|
||||
# Treat BIFs as builtin (alternative mode).
|
||||
bif_target(pcap.bif)
|
||||
zeek_plugin_end()
|
||||
|
|
|
@ -10,6 +10,7 @@ const non_fd_timeout: interval;
|
|||
|
||||
#include "zeek/iosource/BPF_Program.h"
|
||||
#include "zeek/iosource/Manager.h"
|
||||
#include "zeek/iosource/PktSrc.h"
|
||||
%%}
|
||||
|
||||
## Precompiles a PCAP filter and binds it to a given identifier.
|
||||
|
|
|
@ -1,23 +1,12 @@
|
|||
|
||||
include(ZeekSubdir)
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
zeek_add_subdir_library(
|
||||
logging
|
||||
SOURCES
|
||||
Component.cc
|
||||
Manager.cc
|
||||
WriterBackend.cc
|
||||
WriterFrontend.cc
|
||||
BIFS
|
||||
logging.bif
|
||||
)
|
||||
|
||||
include_directories(BEFORE ${CAF_INCLUDE_DIRS})
|
||||
|
||||
add_subdirectory(writers)
|
||||
|
||||
set(logging_SRCS
|
||||
Component.cc
|
||||
Manager.cc
|
||||
WriterBackend.cc
|
||||
WriterFrontend.cc
|
||||
)
|
||||
|
||||
bif_target(logging.bif)
|
||||
|
||||
bro_add_subdir_library(logging ${logging_SRCS})
|
||||
add_dependencies(bro_logging generate_outputs)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek AsciiWriter)
|
||||
zeek_plugin_cc(Ascii.cc Plugin.cc)
|
||||
zeek_plugin_bif(ascii.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
AsciiWriter
|
||||
SOURCES
|
||||
Ascii.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
ascii.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek NoneWriter)
|
||||
zeek_plugin_cc(None.cc Plugin.cc)
|
||||
zeek_plugin_bif(none.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
NoneWriter
|
||||
SOURCES
|
||||
None.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
none.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek SQLiteWriter)
|
||||
zeek_plugin_cc(SQLite.cc Plugin.cc)
|
||||
zeek_plugin_bif(sqlite.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
SQLiteWriter
|
||||
SOURCES
|
||||
SQLite.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
sqlite.bif
|
||||
)
|
||||
|
|
|
@ -1,19 +1,11 @@
|
|||
|
||||
include(ZeekSubdir)
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
zeek_add_subdir_library(
|
||||
packet_analysis
|
||||
INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
|
||||
SOURCES
|
||||
Analyzer.cc
|
||||
Dispatcher.cc
|
||||
Manager.cc
|
||||
Component.cc
|
||||
)
|
||||
|
||||
add_subdirectory(protocol)
|
||||
|
||||
set(packet_analysis_SRCS
|
||||
Analyzer.cc
|
||||
Dispatcher.cc
|
||||
Manager.cc
|
||||
Component.cc
|
||||
)
|
||||
|
||||
bro_add_subdir_library(packet_analysis ${packet_analysis_SRCS})
|
||||
add_dependencies(bro_packet_analysis generate_outputs)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek ARP)
|
||||
zeek_plugin_cc(ARP.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
ARP
|
||||
SOURCES
|
||||
ARP.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
zeek_plugin_begin(Zeek AYIYA)
|
||||
zeek_plugin_cc(AYIYA.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
AYIYA
|
||||
SOURCES
|
||||
AYIYA.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer Ethernet)
|
||||
zeek_plugin_cc(Ethernet.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
Ethernet
|
||||
SOURCES
|
||||
Ethernet.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer FDDI)
|
||||
zeek_plugin_cc(FDDI.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
FDDI
|
||||
SOURCES
|
||||
FDDI.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
zeek_plugin_begin(Zeek Geneve)
|
||||
zeek_plugin_cc(Geneve.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
Geneve
|
||||
SOURCES
|
||||
Geneve.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer GRE)
|
||||
zeek_plugin_cc(GRE.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
GRE
|
||||
SOURCES
|
||||
GRE.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek GTPv1)
|
||||
zeek_plugin_cc(GTPv1.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_pac(gtpv1.pac gtpv1-protocol.pac gtpv1-analyzer.pac)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
GTPv1
|
||||
SOURCES
|
||||
GTPv1.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
functions.bif
|
||||
PAC
|
||||
gtpv1.pac
|
||||
gtpv1-protocol.pac
|
||||
gtpv1-analyzer.pac
|
||||
)
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek ICMP)
|
||||
zeek_plugin_cc(ICMP.cc ICMPSessionAdapter.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
ICMP
|
||||
SOURCES
|
||||
ICMP.cc
|
||||
ICMPSessionAdapter.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer IEEE802_11)
|
||||
zeek_plugin_cc(IEEE802_11.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
IEEE802_11
|
||||
SOURCES
|
||||
IEEE802_11.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer IEEE802_11_Radio)
|
||||
zeek_plugin_cc(IEEE802_11_Radio.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
IEEE802_11_Radio
|
||||
SOURCES
|
||||
IEEE802_11_Radio.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer IP)
|
||||
zeek_plugin_cc(IP.cc IPBasedAnalyzer.cc SessionAdapter.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
IP
|
||||
SOURCES
|
||||
IP.cc
|
||||
IPBasedAnalyzer.cc
|
||||
SessionAdapter.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer IPTunnel)
|
||||
zeek_plugin_cc(IPTunnel.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
IPTunnel
|
||||
SOURCES
|
||||
IPTunnel.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer LinuxSLL)
|
||||
zeek_plugin_cc(LinuxSLL.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
LinuxSLL
|
||||
SOURCES
|
||||
LinuxSLL.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer LinuxSLL2)
|
||||
zeek_plugin_cc(LinuxSLL2.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
LinuxSLL2
|
||||
SOURCES
|
||||
LinuxSLL2.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer MPLS)
|
||||
zeek_plugin_cc(MPLS.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
MPLS
|
||||
SOURCES
|
||||
MPLS.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer NFLog)
|
||||
zeek_plugin_cc(NFLog.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
NFLog
|
||||
SOURCES
|
||||
NFLog.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer Null)
|
||||
zeek_plugin_cc(Null.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
Null
|
||||
SOURCES
|
||||
Null.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer PPPSerial)
|
||||
zeek_plugin_cc(PPPSerial.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
PPPSerial
|
||||
SOURCES
|
||||
PPPSerial.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer PPPoE)
|
||||
zeek_plugin_cc(PPPoE.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
PPPoE
|
||||
SOURCES
|
||||
PPPoE.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer Root)
|
||||
zeek_plugin_cc(Root.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
Root
|
||||
SOURCES
|
||||
Root.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer Skip)
|
||||
zeek_plugin_cc(Skip.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
Skip
|
||||
SOURCES
|
||||
Skip.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer TCP_PKT)
|
||||
zeek_plugin_cc(TCP.cc TCPSessionAdapter.cc Plugin.cc Stats.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
TCP_PKT
|
||||
SOURCES
|
||||
TCP.cc
|
||||
TCPSessionAdapter.cc
|
||||
Plugin.cc
|
||||
Stats.cc
|
||||
)
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
include(ZeekPlugin)
|
||||
|
||||
zeek_plugin_begin(Zeek Teredo)
|
||||
zeek_plugin_cc(Teredo.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_bif(functions.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
Teredo
|
||||
SOURCES
|
||||
Teredo.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
functions.bif
|
||||
)
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(Zeek UDP)
|
||||
zeek_plugin_cc(UDP.cc UDPSessionAdapter.cc Plugin.cc)
|
||||
zeek_plugin_bif(events.bif)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
Zeek
|
||||
UDP
|
||||
SOURCES
|
||||
UDP.cc
|
||||
UDPSessionAdapter.cc
|
||||
Plugin.cc
|
||||
BIFS
|
||||
events.bif
|
||||
)
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
|
||||
include(ZeekPlugin)
|
||||
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
zeek_plugin_begin(PacketAnalyzer VLAN)
|
||||
zeek_plugin_cc(VLAN.cc Plugin.cc)
|
||||
zeek_plugin_end()
|
||||
zeek_add_plugin(
|
||||
PacketAnalyzer
|
||||
VLAN
|
||||
SOURCES
|
||||
VLAN.cc
|
||||
Plugin.cc
|
||||
)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue