Codebase list bifcl / 0cc4930
New upstream version 1.5.0 Hilko Bengen 2 years ago
12 changed file(s) with 166 addition(s) and 41 deletion(s). Raw diff Collapse all Expand all
0
1 1.5.0 | 2020-12-04 11:14:48 -0800
2
3 * Release 1.5.0.
4
5 1.4.0-19 | 2020-12-02 11:04:01 -0800
6
7 * Update minimum required CMake to 3.5 (Jon Siwek, Corelight)
8
9 * Postpone initialization of constants for subdir BIFs (Jon Siwek, Corelight)
10
11 1.4.0-11 | 2020-08-26 11:20:13 -0700
12
13 * Rename bro-bif.h to zeek-bif.h (Tim Wojtulewicz, Corelight)
14
15 1.4.0-9 | 2020-08-21 08:30:47 -0700
16
17 * Move __RegisterBif from zeek::detail::plugin to zeek::plugin::detail (Tim Wojtulewicz, Corelight)
18
19 * SOURCE_LOCAL is part of the zeek::util::detail namespace now (Tim Wojtulewicz, Corelight)
20
21 1.4.0-6 | 2020-08-01 09:14:45 -0700
22
23 * Move Connection to zeek namespace (Tim Wojtulewicz, Corelight)
24
25 * Move BifReturnVal to zeek::detail namespace (Tim Wojtulewicz, Corelight)
26
27 * Move event code to zeek namespace, rename mgr to event_mgr (Tim Wojtulewicz, Corelight)
28
29 * Move BroFile to zeek namespace, rename to File (Tim Wojtulewicz, Corelight)
30
31 * Move base analyzer classes to zeek namespace (Tim Wojtulewicz, Corelight)
032
133 1.4.0 | 2020-07-23 10:10:53 -0700
234
00
1 cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
1 cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
22 project(BifCl C CXX)
33
44 include(cmake/CommonCMakeConfig.cmake)
0 1.4.0
0 1.5.0
234234 fprintf(fp_func_h, "#ifndef BRO_IN_NETVAR\n");
235235 fprintf(fp_func_h, "#ifndef %s\n", guard);
236236 fprintf(fp_func_h, "#define %s\n", guard);
237 fprintf(fp_func_h, "#include \"bro-bif.h\"\n");
237 fprintf(fp_func_h, "#include \"zeek-bif.h\"\n");
238238 fprintf(fp_func_h, "#endif\n");
239239 fprintf(fp_func_h, "#endif\n");
240240 fprintf(fp_func_h, "\n");
279279 fprintf(fp_func_register, "\n");
280280 fprintf(fp_func_register, "namespace plugin { namespace %s {\n", plugin_canon);
281281 fprintf(fp_func_register, "void __bif_%s_init(zeek::plugin::Plugin* plugin);\n", name);
282 fprintf(fp_func_register, "zeek::detail::plugin::__RegisterBif __register_bifs_%s_%s(\"%s\", __bif_%s_init);\n", plugin_canon, name, plugin, name);
282 fprintf(fp_func_register, "zeek::plugin::detail::__RegisterBif __register_bifs_%s_%s(\"%s\", __bif_%s_init);\n", plugin_canon, name, plugin, name);
283283 fprintf(fp_func_register, "} }\n");
284284 }
285285 }
1515 extern int line_number;
1616 extern char* input_filename;
1717 extern char* plugin;
18 extern int alternative_mode;
1819
1920 #define print_line_directive(fp) fprintf(fp, "\n#line %d \"%s\"\n", line_number, input_filename)
2021
219220 static void print_event_c_prototype_header(FILE* fp, bool smart)
220221 {
221222 if ( smart )
222 fprintf(fp, "namespace zeek { %s void %s(analyzer::Analyzer* analyzer%s",
223 fprintf(fp, "namespace zeek { %s void %s(zeek::analyzer::Analyzer* analyzer%s",
223224 decl.generate_c_namespace_start.c_str(),
224225 decl.enqueue_c_barename.c_str(),
225226 args.size() ? ", " : "" );
226227 else
227 fprintf(fp, "%s [[deprecated(\"Remove in 4.1. Use %s.\")]] void %s(analyzer::Analyzer* analyzer%s",
228 fprintf(fp, "%s [[deprecated(\"Remove in 4.1. Use %s.\")]] void %s(zeek::analyzer::Analyzer* analyzer%s",
228229 decl.generate_c_namespace_start.c_str(),
229230 decl.enqueue_c_fullname.c_str(),
230231 decl.generate_bare_name.c_str(),
239240 static void print_event_c_prototype_impl(FILE* fp, bool smart)
240241 {
241242 if ( smart )
242 fprintf(fp, "void %s(analyzer::Analyzer* analyzer%s",
243 fprintf(fp, "void %s(zeek::analyzer::Analyzer* analyzer%s",
243244 decl.enqueue_c_fullname.c_str(),
244245 args.size() ? ", " : "" );
245246 else
246 fprintf(fp, "void %s(analyzer::Analyzer* analyzer%s",
247 fprintf(fp, "void %s(zeek::analyzer::Analyzer* analyzer%s",
247248 decl.generate_c_fullname.c_str(),
248249 args.size() ? ", " : "" );
249250
265266
266267 BuiltinFuncArg* connection_arg = 0;
267268
268 fprintf(fp, "\tmgr.Enqueue(%s, zeek::Args{\n", decl.c_fullname.c_str());
269 fprintf(fp, "\tzeek::event_mgr.Enqueue(%s, zeek::Args{\n", decl.c_fullname.c_str());
269270
270271 for ( int i = 0; i < (int) args.size(); ++i )
271272 {
287288 }
288289 }
289290
290 fprintf(fp, "\t },\n\t SOURCE_LOCAL, analyzer->GetID()");
291 fprintf(fp, "\t },\n\t zeek::util::detail::SOURCE_LOCAL, analyzer->GetID()");
291292
292293 if ( connection_arg )
293294 // Pass the connection to the EventMgr as the "cookie"
534535 builtin_types[typeidx].c_type, decl.bare_name.c_str(),
535536 decl.c_namespace_end.c_str());
536537
538 if ( alternative_mode && ! plugin )
539 fprintf(fp_netvar_init, "\tzeek::detail::bif_initializers.emplace_back([]()\n");
540
537541 fprintf(fp_netvar_init, "\t{\n");
538542 fprintf(fp_netvar_init, "\tconst auto& v = zeek::id::find_const%s(\"%s\");\n",
539543 builtin_types[typeidx].cast_smart, decl.bro_fullname.c_str());
542546 fprintf(fp_netvar_init, "\t%s = v.get()%s;\n",
543547 decl.c_fullname.c_str(), accessor);
544548 fprintf(fp_netvar_init, "\t}\n");
549
550 if ( alternative_mode && ! plugin )
551 fprintf(fp_netvar_init, "\t);\n");
545552
546553 record_bif_item(decl.bro_fullname.c_str(), "CONSTANT");
547554 }
630637 // (e.g. ones at global scope that may be used to implement
631638 // the BIF itself).
632639 fprintf(fp_func_h,
633 "namespace zeek { %sextern BifReturnVal %s_bif(zeek::detail::Frame* frame, const zeek::Args*);%s }\n",
640 "namespace zeek { %sextern zeek::detail::BifReturnVal %s_bif(zeek::detail::Frame* frame, const zeek::Args*);%s }\n",
634641 decl.c_namespace_start.c_str(), decl.bare_name.c_str(), decl.c_namespace_end.c_str());
635642
636643 // This is the deprecated, legacy, version of the BIF that
637644 // forwards to the "canonical" version. It also does have
638645 // a "bro_" prefix in the name itself, but no "_bif" suffix.
639646 fprintf(fp_func_h,
640 "%s [[deprecated(\"Remove in v4.1. Use zeek::%s_bif.\")]] inline BifReturnVal bro_%s(zeek::detail::Frame* frame, const zeek::Args* args)",
647 "%s [[deprecated(\"Remove in v4.1. Use zeek::%s_bif.\")]] inline zeek::detail::BifReturnVal bro_%s(zeek::detail::Frame* frame, const zeek::Args* args)",
641648 decl.c_namespace_start.c_str(), decl.c_fullname.c_str(), decl.bare_name.c_str());
642649 fprintf(fp_func_h, " { return zeek::%s_bif(frame, args); } %s\n",
643650 decl.c_fullname.c_str(), decl.c_namespace_end.c_str());
644651
645652 fprintf(fp_func_def,
646 "BifReturnVal zeek::%s_bif(zeek::detail::Frame* frame, const zeek::Args* %s)",
653 "zeek::detail::BifReturnVal zeek::%s_bif(zeek::detail::Frame* frame, const zeek::Args* %s)",
647654 decl.c_fullname.c_str(), arg_list_name);
648655
649656 record_bif_item(decl.bro_fullname.c_str(), "FUNCTION");
654661 {
655662 // TODO: add namespace for events here
656663 fprintf(fp_netvar_h,
657 "%sextern EventHandlerPtr %s; %s\n",
664 "%sextern zeek::EventHandlerPtr %s; %s\n",
658665 decl.c_namespace_start.c_str(), decl.bare_name.c_str(), decl.c_namespace_end.c_str());
659666
660667 fprintf(fp_netvar_def,
661 "%sEventHandlerPtr %s; %s\n",
662 decl.c_namespace_start.c_str(), decl.bare_name.c_str(), decl.c_namespace_end.c_str());
668 "%szeek::EventHandlerPtr %s; %s\n",
669 decl.c_namespace_start.c_str(), decl.bare_name.c_str(), decl.c_namespace_end.c_str());
663670
664671 fprintf(fp_netvar_init,
665672 "\t%s = event_registry->Register(\"%s\");\n",
133133
134134 set(HAVE_KQUEUE true)
135135 set(LIBKQUEUE_LIBRARIES libkqueue_a CACHE STRING "libkqueue libs" FORCE)
136 set(LIBKQUEUE_INCLUDE_DIRS "${kqueue_src}/include" CACHE STRING "libkqueue includes" FORCE)
136 set(LIBKQUEUE_INCLUDE_DIRS "${kqueue_src}/include;${kqueue_build}/include" CACHE INTERNAL "libkqueue includes" FORCE)
137137
138138 include_directories(BEFORE ${LIBKQUEUE_INCLUDE_DIRS})
139139 set(zeekdeps ${zeekdeps} ${LIBKQUEUE_LIBRARIES})
4040 # symlink).
4141 get_filename_component(PYTHON_EXECUTABLE "${PYTHON_EXECUTABLE}" REALPATH)
4242 get_filename_component(PYTHON_EXECUTABLE_DIR "${PYTHON_EXECUTABLE}" DIRECTORY)
43 get_filename_component(PYTHON_EXECUTABLE_NAME "${PYTHON_EXECUTABLE}" NAME)
4344
4445 if ( EXISTS ${PYTHON_EXECUTABLE}-config )
4546 set(PYTHON_CONFIG ${PYTHON_EXECUTABLE}-config CACHE PATH "" FORCE)
46 elseif ( EXISTS ${PYTHON_EXECUTABLE_DIR}/python-config )
47 # Avoid assumption that python-config is associated with python3 if
48 # python3 co-exists in a directory that also contains python2 stuff
49 elseif ( EXISTS ${PYTHON_EXECUTABLE_DIR}/python-config AND
50 NOT EXISTS ${PYTHON_EXECUTABLE_DIR}/python2 AND
51 NOT EXISTS ${PYTHON_EXECUTABLE_DIR}/python2.7 AND
52 NOT EXISTS ${PYTHON_EXECUTABLE_DIR}/python2-config AND
53 NOT EXISTS ${PYTHON_EXECUTABLE_DIR}/python2.7-config )
4754 set(PYTHON_CONFIG ${PYTHON_EXECUTABLE_DIR}/python-config CACHE PATH "" FORCE)
4855 endif ()
4956 else ()
50 find_program(PYTHON_CONFIG
51 NAMES python-config python3.7-config python3.6-config python3.5-config
52 python3.4-config python-config2.7 python-config2.6 python-config2.6
53 python-config2.4 python-config2.3)
57 find_program(PYTHON_CONFIG NAMES
58 python3-config
59 python3.9-config
60 python3.8-config
61 python3.7-config
62 python3.6-config
63 python3.5-config
64 python-config
65 )
5466 endif ()
5567
5668 # The OpenBSD python packages have python-config's that don't reliably
5769 # report linking flags that will work.
5870 if (PYTHON_CONFIG AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
59 execute_process(COMMAND "${PYTHON_CONFIG}" --ldflags
71 # Try `--ldflags --embed` first and fallback to `--ldflags` if it fails.
72 # Python 3.8+ introduced the `--embed` flag in relation to this:
73 # https://docs.python.org/3.8/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build
74 # Note that even if this FindPythonDev script could technically apply to
75 # either embedded or extension use cases, the `--embed` flag only adds
76 # a `-lpython` and it's generally safe to link libpython in both cases.
77 # The only downside to doing that against an extension when it's not
78 # strictly necessary is losing the ability to mix-and-match debug/release
79 # modes between Python and extensions and that's not a feature to typically
80 # care about.
81 execute_process(COMMAND "${PYTHON_CONFIG}" --ldflags --embed
82 RESULT_VARIABLE _python_config_result
6083 OUTPUT_VARIABLE PYTHON_LIBRARIES
6184 OUTPUT_STRIP_TRAILING_WHITESPACE
6285 ERROR_QUIET)
86
87 if ( NOT ${_python_config_result} EQUAL 0 )
88 execute_process(COMMAND "${PYTHON_CONFIG}" --ldflags
89 RESULT_VARIABLE _python_config_result
90 OUTPUT_VARIABLE PYTHON_LIBRARIES
91 OUTPUT_STRIP_TRAILING_WHITESPACE
92 ERROR_QUIET)
93 endif ()
94
6395 string(STRIP "${PYTHON_LIBRARIES}" PYTHON_LIBRARIES)
6496
6597 execute_process(COMMAND "${PYTHON_CONFIG}" --includes
77109 PYTHON_LIBRARIES
78110 )
79111 else ()
80 find_package(PythonLibs)
81 if (PYTHON_INCLUDE_PATH AND NOT PYTHON_INCLUDE_DIR)
82 set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}")
112 if ( ${CMAKE_VERSION} VERSION_LESS "3.12.0" )
113 find_package(PythonLibs)
114
115 if ( PYTHON_INCLUDE_PATH AND NOT PYTHON_INCLUDE_DIR )
116 set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}")
117 endif ()
118 else ()
119 # Expect this branch to be used mostly in macOS where the system
120 # default Python 3 installation is not easily/consistently detected
121 # by CMake. CMake 3.12+ is required, but it's expected that macOS
122 # users are getting a recent version from homebrew/etc anyway.
123 find_package(Python3 COMPONENTS Development)
124
125 if ( Python3_INCLUDE_DIRS AND NOT PYTHON_INCLUDE_DIR )
126 set(PYTHON_INCLUDE_DIR "${Python3_INCLUDE_DIRS}")
127 endif ()
128
129 if ( Python3_LIBRARIES AND NOT PYTHON_LIBRARIES )
130 set(PYTHON_LIBRARIES "${Python3_LIBRARIES}")
131 endif ()
83132 endif ()
133
84134 find_package_handle_standard_args(PythonDev DEFAULT_MSG
85135 PYTHON_INCLUDE_DIR
86136 PYTHON_LIBRARIES
3434 string(REGEX MATCH ${_regex} _match ${_srclines})
3535 if (_match)
3636 set(_shell ${CMAKE_MATCH_1})
37 if (${_shell} STREQUAL "python" AND PYTHON_EXECUTABLE)
37 if ( (${_shell} STREQUAL "python" OR ${_shell} STREQUAL "python3") AND PYTHON_EXECUTABLE )
3838 set(${_shell}_interp ${PYTHON_EXECUTABLE})
3939 else ()
4040 find_program(${_shell}_interp ${_shell})
00 if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
1 set(bro_LINKER_FLAGS "${bro_LINKER_FLAGS} -rdynamic")
21
32 elseif (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
4 set(bro_LINKER_FLAGS "${bro_LINKER_FLAGS} -rdynamic")
53
64 elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
75 set(HAVE_DARWIN true)
11 # can find internal/private libraries or libraries external to the build
22 # directory that were explicitly linked against
33 if (NOT BINARY_PACKAGING_MODE)
4 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
5 SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
6
74 include(GNUInstallDirs)
85
9 if ( NOT CMAKE_INSTALL_LIBDIR STREQUAL "lib" )
10 # Ideally, we'd consistently use just one lib dir (e.g. lib/ or lib64/),
11 # which requires every sub-project and external/embedded dependency
12 # agrees and/or offers ability to install at that canonical location.
13 set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
14 endif ()
6 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
7 set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
158 endif ()
2727 ZEEK_EXE_PATH
2828 CMAKE_CXX_FLAGS
2929 CMAKE_C_FLAGS
30 PCAP_INCLUDE_DIR
31 ZLIB_INCLUDE_DIR
32 OPENSSL_INCLUDE_DIR
33 LibKrb5_INCLUDE_DIR
34 GooglePerftools_INCLUDE_DIR
3035 CAF_INCLUDE_DIRS)
3136
3237 if ( NOT BRO_PLUGIN_BRO_PLUGIN_INSTALL_PATH )
5055 set(CMAKE_MODULE_PATH ${BRO_PLUGIN_BRO_CMAKE} ${CMAKE_MODULE_PATH})
5156 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${bro_cache_CMAKE_C_FLAGS}")
5257 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${bro_cache_CMAKE_CXX_FLAGS}")
58
59 if ( bro_cache_PCAP_INCLUDE_DIR )
60 include_directories(BEFORE ${bro_cache_PCAP_INCLUDE_DIR})
61 endif ()
62 if ( bro_cache_ZLIB_INCLUDE_DIR )
63 include_directories(BEFORE ${bro_cache_ZLIB_INCLUDE_DIR})
64 endif ()
65 if ( bro_cache_OPENSSL_INCLUDE_DIR )
66 include_directories(BEFORE ${bro_cache_OPENSSL_INCLUDE_DIR})
67 endif ()
68 if ( bro_cache_LibKrb5_INCLUDE_DIR )
69 include_directories(BEFORE ${bro_cache_LibKrb5_INCLUDE_DIR})
70 endif ()
71 if ( bro_cache_GooglePerftools_INCLUDE_DIR )
72 include_directories(BEFORE ${bro_cache_GooglePerftools_INCLUDE_DIR})
73 endif ()
5374
5475 # Zeek 3.2+ has auxil/ instead of aux/
5576 include_directories(BEFORE
106127 " to the installation path of Zeek headers")
107128 endif ()
108129
130 # Add potential custom library paths to our search path. This
131 # works transparently across future find_library() calls.
132 #
133 # The zeek-config call is currently an outlier ... we need it
134 # because existing plugin configure scripts need to keep
135 # working with possible alternative libdirs, but do not
136 # determine the libdir themselves. zeek-config is the only way
137 # to determine it post-installation in those cases.
138 #
139 # XXX In the future the FindZeek module should make
140 # zeek-config calls to establish the various settings
141 # consistently within cmake. This would simplify configure
142 # scripts and make cmake use with Zeek more standard.
143 if ( NOT BRO_CONFIG_LIB_DIR )
144 execute_process(
145 COMMAND ${BRO_CONFIG_PREFIX}/bin/zeek-config --lib_dir
146 OUTPUT_VARIABLE BRO_CONFIG_LIB_DIR
147 OUTPUT_STRIP_TRAILING_WHITESPACE)
148 endif ()
149
150 if ( BRO_CONFIG_LIB_DIR )
151 set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${BRO_CONFIG_LIB_DIR})
152 endif ()
153
109154 set(BRO_PLUGIN_BRO_CONFIG_INCLUDE_DIR "${BRO_CONFIG_INCLUDE_DIR}"
110155 CACHE INTERNAL "" FORCE)
111156 set(BRO_PLUGIN_BRO_INSTALL_PREFIX "${BRO_CONFIG_PREFIX}"
254299
255300 add_dependencies(${_plugin_lib} bro-plugin-${_plugin_name_canon})
256301
257 set(_dist_tarball_name ${_plugin_name_canon}.tar.gz)
302 set(_dist_tarball_name ${_plugin_name_canon}.tgz)
258303 set(_dist_output ${CMAKE_CURRENT_BINARY_DIR}/${_dist_tarball_name})
259304
260305 # Create binary install package.
22 DEFINE_BIF_TYPE(TYPE_ANY, "any", "any", "zeek::Val*", "zeek::IntrusivePtr<zeek::Val>", "%s", "%s", "", "zeek::IntrusivePtr{zeek::AdoptRef{}, %s}", "std::move(%s)")
33 DEFINE_BIF_TYPE(TYPE_BOOL, "bool", "bool", "int", "int", "%s->AsBool()", "%s->AsBool()", "", "zeek::val_mgr->Bool(%s)", "zeek::val_mgr->Bool(%s)")
44 DEFINE_BIF_TYPE(TYPE_CONN_ID, "conn_id", "conn_id", "zeek::Val*", "zeek::IntrusivePtr<zeek::Val>", "%s", "%s", "", "zeek::IntrusivePtr{zeek::AdoptRef{}, %s}", "std::move(%s)")
5 DEFINE_BIF_TYPE(TYPE_CONNECTION, "connection", "connection", "Connection*", "Connection*", "%s->AsRecordVal()->GetOrigin()", "%s->AsRecordVal()->GetOrigin()", "", "%s->ConnVal()", "%s->ConnVal()")
5 DEFINE_BIF_TYPE(TYPE_CONNECTION, "connection", "connection", "zeek::Connection*", "zeek::Connection*", "%s->AsRecordVal()->GetOrigin()", "%s->AsRecordVal()->GetOrigin()", "", "%s->ConnVal()", "%s->ConnVal()")
66 DEFINE_BIF_TYPE(TYPE_COUNT, "count", "count", "bro_uint_t", "bro_uint_t", "%s->AsCount()", "%s->AsCount()", "", "zeek::val_mgr->Count(%s)", "zeek::val_mgr->Count(%s)")
77 DEFINE_BIF_TYPE(TYPE_DOUBLE, "double", "double", "double", "double", "%s->AsDouble()", "%s->AsDouble()", "", "zeek::make_intrusive<zeek::DoubleVal>(%s)", "zeek::make_intrusive<zeek::DoubleVal>(%s)")
8 DEFINE_BIF_TYPE(TYPE_FILE, "file", "file", "BroFile*", "zeek::IntrusivePtr<zeek::Val>", "%s->AsFile()", "%s", "", "zeek::make_intrusive<zeek::Val>(zeek::IntrusivePtr{zeek::AdoptRef{}, %s})", "std::move(%s)")
8 DEFINE_BIF_TYPE(TYPE_FILE, "file", "file", "zeek::File*", "zeek::IntrusivePtr<zeek::Val>", "%s->AsFile()", "%s", "", "zeek::make_intrusive<zeek::Val>(zeek::IntrusivePtr{zeek::AdoptRef{}, %s})", "std::move(%s)")
99 DEFINE_BIF_TYPE(TYPE_INT, "int", "int", "bro_int_t", "bro_int_t", "%s->AsInt()", "%s->AsInt()", "", "zeek::val_mgr->Int(%s)", "zeek::val_mgr->Int(%s)")
1010 DEFINE_BIF_TYPE(TYPE_INTERVAL, "interval", "interval", "double", "double", "%s->AsInterval()", "%s->AsInterval()", "", "zeek::make_intrusive<zeek::IntervalVal>(%s, Seconds)", "zeek::make_intrusive<zeek::IntervalVal>(%s, Seconds)")
1111 DEFINE_BIF_TYPE(TYPE_PATTERN, "pattern", "pattern", "RE_Matcher*", "zeek::IntrusivePtr<zeek::PatternVal>", "%s->AsPattern()", "%s", "<zeek::PatternVal>", "zeek::make_intrusive<zeek::PatternVal>(%s)", "std::move(%s)")