rename ip_reassemble -> ip_reassembly

This commit is contained in:
luwenpeng
2024-03-08 13:55:17 +08:00
parent d7370e0e19
commit 9d562ffee6
15 changed files with 297 additions and 297 deletions

View File

@@ -15,7 +15,7 @@
#include "packet_io.h"
#include "timestamp.h"
#include "id_generator.h"
#include "ip_reassemble.h"
#include "ip_reassembly.h"
#include "session_manager.h"
#define STELLAR_LOG_STATE(format, ...) LOG_STATE("stellar", format, ##__VA_ARGS__)
@@ -32,7 +32,7 @@ struct thread_context
uint64_t need_exit;
uint64_t is_runing;
struct session_manager *sess_mgr;
struct ip_reassemble_manager *ip_mgr;
struct ip_reassembly *ip_mgr;
};
struct stellar_context
@@ -50,7 +50,7 @@ struct stellar_context *stellar_ctx = &stellar_context;
// config
struct device_config *dev_cfg = &stellar_context.config.dev_cfg;
struct packet_io_config *pkt_io_cfg = &stellar_context.config.pkt_io_cfg;
struct ip_reassemble_config *ip_reass_cfg = &stellar_context.config.ip_reass_cfg;
struct ip_reassembly_config *ip_reass_cfg = &stellar_context.config.ip_reass_cfg;
struct session_manager_config *sess_mgr_cfg = &stellar_context.config.sess_mgr_cfg;
static const char *log_config_file = "./conf/log.toml";
@@ -137,7 +137,7 @@ static void *main_loop(void *arg)
uint16_t thd_idx = threads_ctx->index;
struct packet_io *packet_io = stellar_ctx->packet_io;
struct session_manager *sess_mgr = threads_ctx->sess_mgr;
struct ip_reassemble_manager *ip_mgr = threads_ctx->ip_mgr;
struct ip_reassembly *ip_mgr = threads_ctx->ip_mgr;
if (packet_io_init(packet_io, thd_idx) != 0)
{
@@ -163,7 +163,7 @@ static void *main_loop(void *arg)
// ip fragment reassemble
if (pkt->frag_layer)
{
struct packet *temp = ip_reassemble_packet(ip_mgr, pkt);
struct packet *temp = ip_reassembly_packet(ip_mgr, pkt);
// forward the original fragment packet
packet_io_send(packet_io, thd_idx, pkt);
if (temp == NULL)
@@ -214,7 +214,7 @@ static int thread_context_init(struct stellar_context *ctx, uint8_t nr_threads)
return -1;
}
threads_ctx->ip_mgr = ip_reassemble_manager_create(ip_reass_cfg);
threads_ctx->ip_mgr = ip_reassembly_create(ip_reass_cfg);
if (threads_ctx->ip_mgr == NULL)
{
STELLAR_LOG_ERROR("unable to create ip reassemble manager");
@@ -234,7 +234,7 @@ static void thread_context_free(struct stellar_context *ctx, uint8_t nr_threads)
{
STELLAR_LOG_STATE("wait worker thread %d free context", i);
session_manager_destroy(threads_ctx->sess_mgr);
ip_reassemble_manager_destory(threads_ctx->ip_mgr);
ip_reassembly_destory(threads_ctx->ip_mgr);
}
}
}