Classes | |
| struct | RenderedRuleLine |
Functions | |
| std::string | trim (std::string s) |
| std::string | lower (std::string s) |
| std::vector< std::string > | split_csv_values (const std::string &raw) |
| std::optional< std::string > | resolve_nft_binary () |
| std::string | shell_quote (const std::string &in) |
| std::string | normalize_chain_type (const std::string &type, const std::string &hook) |
| std::string | default_priority_for (const std::string &type) |
| std::string | normalize_chain_name (std::string name) |
| std::string | normalize_table_name (std::string name) |
| std::string | render_value_set (const std::vector< std::string > &values) |
| std::string | render_statement (const json &stmt) |
| std::string | render_rule (const json &rule) |
| std::string | convert_legacy_parameters (const std::string ¶ms) |
| std::optional< RenderedRuleLine > | render_legacy_rule (const json &legacy_rule) |
| void | ensure_table_and_chain (std::ostringstream &script, std::set< std::string > &recreated_tables, std::set< std::string > &created_chains, const std::string &family, const std::string &table, const std::string &chain, const std::string &type, const std::string &hook, const std::string &priority, const std::string &policy) |
| bool | render_json_config_to_nft (const json &j, const fs::path &script_path) |
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::convert_legacy_parameters | ( | const std::string & | params | ) |
Definition at line 206 of file Firewall.cpp.
References convert_legacy_parameters(), lower(), and trim().
Referenced by convert_legacy_parameters(), and render_legacy_rule().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::default_priority_for | ( | const std::string & | type | ) |
Definition at line 99 of file Firewall.cpp.
References default_priority_for(), and lower().
Referenced by default_priority_for(), and render_json_config_to_nft().
| void bsc::fw::anonymous_namespace{Firewall.cpp}::ensure_table_and_chain | ( | std::ostringstream & | script, |
| std::set< std::string > & | recreated_tables, | ||
| std::set< std::string > & | created_chains, | ||
| const std::string & | family, | ||
| const std::string & | table, | ||
| const std::string & | chain, | ||
| const std::string & | type, | ||
| const std::string & | hook, | ||
| const std::string & | priority, | ||
| const std::string & | policy ) |
Definition at line 271 of file Firewall.cpp.
References ensure_table_and_chain().
Referenced by ensure_table_and_chain(), and render_json_config_to_nft().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::lower | ( | std::string | s | ) |
Definition at line 31 of file Firewall.cpp.
References lower().
Referenced by convert_legacy_parameters(), default_priority_for(), lower(), normalize_chain_name(), normalize_chain_type(), normalize_table_name(), render_json_config_to_nft(), render_legacy_rule(), and render_rule().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::normalize_chain_name | ( | std::string | name | ) |
Definition at line 107 of file Firewall.cpp.
References lower(), normalize_chain_name(), and trim().
Referenced by normalize_chain_name(), and render_legacy_rule().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::normalize_chain_type | ( | const std::string & | type, |
| const std::string & | hook ) |
Definition at line 90 of file Firewall.cpp.
References lower(), and normalize_chain_type().
Referenced by normalize_chain_type(), and render_json_config_to_nft().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::normalize_table_name | ( | std::string | name | ) |
Definition at line 115 of file Firewall.cpp.
References lower(), normalize_table_name(), and trim().
Referenced by normalize_table_name(), and render_legacy_rule().
| bool bsc::fw::anonymous_namespace{Firewall.cpp}::render_json_config_to_nft | ( | const json & | j, |
| const fs::path & | script_path ) |
Definition at line 302 of file Firewall.cpp.
References default_priority_for(), ensure_table_and_chain(), bsc::logging::Logger::info(), bsc::logging::Logger::instance(), lower(), normalize_chain_type(), render_json_config_to_nft(), render_legacy_rule(), render_rule(), and trim().
Referenced by render_json_config_to_nft().
| std::optional< RenderedRuleLine > bsc::fw::anonymous_namespace{Firewall.cpp}::render_legacy_rule | ( | const json & | legacy_rule | ) |
Definition at line 232 of file Firewall.cpp.
References convert_legacy_parameters(), lower(), normalize_chain_name(), normalize_table_name(), render_legacy_rule(), render_statement(), and trim().
Referenced by render_json_config_to_nft(), and render_legacy_rule().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::render_rule | ( | const json & | rule | ) |
Definition at line 169 of file Firewall.cpp.
References lower(), render_rule(), render_statement(), and trim().
Referenced by render_json_config_to_nft(), and render_rule().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::render_statement | ( | const json & | stmt | ) |
Definition at line 134 of file Firewall.cpp.
References render_statement(), render_value_set(), split_csv_values(), and trim().
Referenced by render_legacy_rule(), render_rule(), and render_statement().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::render_value_set | ( | const std::vector< std::string > & | values | ) |
Definition at line 120 of file Firewall.cpp.
References render_value_set().
Referenced by render_statement(), and render_value_set().
| std::optional< std::string > bsc::fw::anonymous_namespace{Firewall.cpp}::resolve_nft_binary | ( | ) |
Definition at line 52 of file Firewall.cpp.
References resolve_nft_binary().
Referenced by resolve_nft_binary().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::shell_quote | ( | const std::string & | in | ) |
Definition at line 77 of file Firewall.cpp.
References shell_quote().
Referenced by shell_quote().
| std::vector< std::string > bsc::fw::anonymous_namespace{Firewall.cpp}::split_csv_values | ( | const std::string & | raw | ) |
Definition at line 37 of file Firewall.cpp.
References split_csv_values(), and trim().
Referenced by render_statement(), and split_csv_values().
| std::string bsc::fw::anonymous_namespace{Firewall.cpp}::trim | ( | std::string | s | ) |
Definition at line 24 of file Firewall.cpp.
References trim().
Referenced by convert_legacy_parameters(), normalize_chain_name(), normalize_table_name(), render_json_config_to_nft(), render_legacy_rule(), render_rule(), render_statement(), split_csv_values(), and trim().