rename ip_reassemble -> ip_reassembly
This commit is contained in:
@@ -138,22 +138,22 @@ static int parse_packet_io_config(struct packet_io_config *pkt_io_cfg, toml_tabl
|
||||
|
||||
// return 0: success
|
||||
// retuun -1: failed
|
||||
static int parse_ip_reassemble_config(struct ip_reassemble_config *ip_reass_cfg, toml_table_t *conf_file_handle)
|
||||
static int parse_ip_reassembly_config(struct ip_reassembly_config *ip_reass_cfg, toml_table_t *conf_file_handle)
|
||||
{
|
||||
const char *ptr;
|
||||
toml_table_t *ip_reass_table;
|
||||
|
||||
ip_reass_table = toml_table_in(conf_file_handle, "ip_reassemble");
|
||||
ip_reass_table = toml_table_in(conf_file_handle, "ip_reassembly");
|
||||
if (ip_reass_table == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble section");
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassembly section");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ptr = toml_raw_in(ip_reass_table, "enable");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble.enable");
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassembly.enable");
|
||||
return -1;
|
||||
}
|
||||
ip_reass_cfg->enable = atoi(ptr);
|
||||
@@ -161,7 +161,7 @@ static int parse_ip_reassemble_config(struct ip_reassemble_config *ip_reass_cfg,
|
||||
ptr = toml_raw_in(ip_reass_table, "timeout");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble.timeout");
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassembly.timeout");
|
||||
return -1;
|
||||
}
|
||||
ip_reass_cfg->timeout = atoi(ptr);
|
||||
@@ -169,7 +169,7 @@ static int parse_ip_reassemble_config(struct ip_reassemble_config *ip_reass_cfg,
|
||||
ptr = toml_raw_in(ip_reass_table, "bucket_entries");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble.bucket_entries");
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassembly.bucket_entries");
|
||||
return -1;
|
||||
}
|
||||
ip_reass_cfg->bucket_entries = atoi(ptr);
|
||||
@@ -177,7 +177,7 @@ static int parse_ip_reassemble_config(struct ip_reassemble_config *ip_reass_cfg,
|
||||
ptr = toml_raw_in(ip_reass_table, "bucket_num");
|
||||
if (ptr == NULL)
|
||||
{
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassemble.bucket_num");
|
||||
CONFIG_LOG_ERROR("config file missing ip_reassembly.bucket_num");
|
||||
return -1;
|
||||
}
|
||||
ip_reass_cfg->bucket_num = atoi(ptr);
|
||||
@@ -395,7 +395,7 @@ int config_load(struct config *cfg, const char *cfg_file)
|
||||
goto error_out;
|
||||
}
|
||||
|
||||
if (parse_ip_reassemble_config(&cfg->ip_reass_cfg, conf_file_handle) != 0)
|
||||
if (parse_ip_reassembly_config(&cfg->ip_reass_cfg, conf_file_handle) != 0)
|
||||
{
|
||||
goto error_out;
|
||||
}
|
||||
@@ -430,7 +430,7 @@ void config_dump(struct config *cfg)
|
||||
|
||||
struct device_config *dev_cfg = &cfg->dev_cfg;
|
||||
struct packet_io_config *pkt_io_cfg = &cfg->pkt_io_cfg;
|
||||
struct ip_reassemble_config *ip_reass_cfg = &cfg->ip_reass_cfg;
|
||||
struct ip_reassembly_config *ip_reass_cfg = &cfg->ip_reass_cfg;
|
||||
struct session_manager_config *sess_mgr_cfg = &cfg->sess_mgr_cfg;
|
||||
|
||||
// device config
|
||||
@@ -455,10 +455,10 @@ void config_dump(struct config *cfg)
|
||||
}
|
||||
|
||||
// ip reassemble config
|
||||
CONFIG_LOG_DEBUG("ip_reassemble->enable : %d", ip_reass_cfg->enable);
|
||||
CONFIG_LOG_DEBUG("ip_reassemble->timeout : %d", ip_reass_cfg->timeout);
|
||||
CONFIG_LOG_DEBUG("ip_reassemble->bucket_entries : %d", ip_reass_cfg->bucket_entries);
|
||||
CONFIG_LOG_DEBUG("ip_reassemble->bucket_num : %d", ip_reass_cfg->bucket_num);
|
||||
CONFIG_LOG_DEBUG("ip_reassembly->enable : %d", ip_reass_cfg->enable);
|
||||
CONFIG_LOG_DEBUG("ip_reassembly->timeout : %d", ip_reass_cfg->timeout);
|
||||
CONFIG_LOG_DEBUG("ip_reassembly->bucket_entries : %d", ip_reass_cfg->bucket_entries);
|
||||
CONFIG_LOG_DEBUG("ip_reassembly->bucket_num : %d", ip_reass_cfg->bucket_num);
|
||||
|
||||
// session manager config
|
||||
CONFIG_LOG_DEBUG("session_manager->max_tcp_session_num : %ld", sess_mgr_cfg->max_tcp_session_num);
|
||||
|
||||
Reference in New Issue
Block a user