mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Renamed
This commit is contained in:
parent
cd934c460b
commit
da89e7ee6e
6 changed files with 10 additions and 12 deletions
|
@ -375,15 +375,15 @@ type endpoint_stats: record {
|
||||||
|
|
||||||
## Record containing information about a tag.
|
## Record containing information about a tag.
|
||||||
##
|
##
|
||||||
## .. zeek:see:: get_tags_by_category
|
## .. zeek:see:: get_plugin_components
|
||||||
type tag_component: record {
|
type PluginComponent: record {
|
||||||
name: string;
|
name: string;
|
||||||
canonical_name: string;
|
canonical_name: string;
|
||||||
tag: string;
|
tag: string;
|
||||||
enabled: bool;
|
enabled: bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
type tag_component_vec : vector of tag_component;
|
type PluginComponent_vec : vector of PluginComponent;
|
||||||
|
|
||||||
## Arguments given to Zeek from the command line. In order to use this, Zeek
|
## Arguments given to Zeek from the command line. In order to use this, Zeek
|
||||||
## must use a ``--`` command line argument immediately followed by a script
|
## must use a ``--`` command line argument immediately followed by a script
|
||||||
|
|
|
@ -317,7 +317,7 @@ static std::unordered_map<std::string, unsigned int> func_attrs = {
|
||||||
{"global_ids", ATTR_IDEMPOTENT},
|
{"global_ids", ATTR_IDEMPOTENT},
|
||||||
{"global_options", ATTR_IDEMPOTENT},
|
{"global_options", ATTR_IDEMPOTENT},
|
||||||
{"gsub", ATTR_FOLDABLE},
|
{"gsub", ATTR_FOLDABLE},
|
||||||
{"get_tags_by_category", ATTR_NO_ZEEK_SIDE_EFFECTS},
|
{"get_plugin_components", ATTR_NO_ZEEK_SIDE_EFFECTS},
|
||||||
{"has_event_group", ATTR_NO_ZEEK_SIDE_EFFECTS},
|
{"has_event_group", ATTR_NO_ZEEK_SIDE_EFFECTS},
|
||||||
{"has_module_events", ATTR_NO_ZEEK_SIDE_EFFECTS},
|
{"has_module_events", ATTR_NO_ZEEK_SIDE_EFFECTS},
|
||||||
{"have_spicy", ATTR_IDEMPOTENT},
|
{"have_spicy", ATTR_IDEMPOTENT},
|
||||||
|
|
|
@ -5653,7 +5653,7 @@ function find_in_zeekpath%(p: string%): string
|
||||||
##
|
##
|
||||||
## Returns: A vector of records containing the tags of all plugin components
|
## Returns: A vector of records containing the tags of all plugin components
|
||||||
## that belong to the specified category.
|
## that belong to the specified category.
|
||||||
function get_tags_by_category%(category: string%): tag_component_vec
|
function get_plugin_components%(category: string%): PluginComponent_vec
|
||||||
%{
|
%{
|
||||||
std::string cat = category->CheckString();
|
std::string cat = category->CheckString();
|
||||||
auto type = CategoryStringToEnum(cat);
|
auto type = CategoryStringToEnum(cat);
|
||||||
|
@ -5664,12 +5664,12 @@ function get_tags_by_category%(category: string%): tag_component_vec
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static auto vec_type = zeek::id::find_type<zeek::VectorType>("tag_component_vec");
|
static auto vec_type = zeek::id::find_type<zeek::VectorType>("PluginComponent_vec");
|
||||||
static auto rec_type = zeek::id::find_type<zeek::RecordType>("tag_component");
|
static auto rec_type = zeek::id::find_type<zeek::RecordType>("PluginComponent");
|
||||||
|
|
||||||
if ( ! vec_type || ! rec_type )
|
if ( ! vec_type || ! rec_type )
|
||||||
{
|
{
|
||||||
reporter->Error("Required types not found (tag_component or component_vec)");
|
reporter->Error("Required types not found (PluginComponent or PluginComponent_vec)");
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
|
||||||
[name=FTP, canonical_name=FTP, tag=ANALYZER_FTP, enabled=T]
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
event zeek_init()
|
event zeek_init()
|
||||||
{
|
{
|
||||||
local result = get_tags_by_category("ANALYZER");
|
local result = get_plugin_components("ANALYZER");
|
||||||
|
|
||||||
for (i in result)
|
for (i in result)
|
||||||
{
|
{
|
|
@ -345,7 +345,7 @@ global known_BiFs = set(
|
||||||
"get_reporter_stats",
|
"get_reporter_stats",
|
||||||
"get_resp_seq",
|
"get_resp_seq",
|
||||||
"get_script_comments",
|
"get_script_comments",
|
||||||
"get_tags_by_category",
|
"get_plugin_components",
|
||||||
"get_thread_stats",
|
"get_thread_stats",
|
||||||
"get_timer_stats",
|
"get_timer_stats",
|
||||||
"getenv",
|
"getenv",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue