bugfix: export tcp_segment_get_data() symbol
This commit is contained in:
@@ -10,25 +10,25 @@ static void signal_handler(int signo)
|
||||
{
|
||||
if (signo == SIGINT)
|
||||
{
|
||||
printf("SIGINT received, notify threads to exit");
|
||||
printf("SIGINT received, notify threads to exit\n");
|
||||
stellar_loopbreak(st);
|
||||
}
|
||||
|
||||
if (signo == SIGQUIT)
|
||||
{
|
||||
printf("SIGQUIT received, notify threads to exit");
|
||||
printf("SIGQUIT received, notify threads to exit\n");
|
||||
stellar_loopbreak(st);
|
||||
}
|
||||
|
||||
if (signo == SIGTERM)
|
||||
{
|
||||
printf("SIGTERM received, notify threads to exit");
|
||||
printf("SIGTERM received, notify threads to exit\n");
|
||||
stellar_loopbreak(st);
|
||||
}
|
||||
|
||||
if (signo == SIGHUP)
|
||||
{
|
||||
printf("SIGHUP received, reload log level !!!");
|
||||
printf("SIGHUP received, reload log level\n");
|
||||
stellar_reload_log_level(st);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,7 +464,6 @@ static void stellar_thread_join(struct stellar *st)
|
||||
struct stellar_runtime *runtime = &st->runtime;
|
||||
struct stellar_config *config = &st->config;
|
||||
|
||||
STELLAR_LOG_FATAL("wait worker thread exit ...");
|
||||
for (uint16_t i = 0; i < config->pkt_io_opts.nr_threads; i++)
|
||||
{
|
||||
struct stellar_thread *thread = &runtime->threads[i];
|
||||
@@ -511,7 +510,7 @@ struct stellar *stellar_new(const char *stellar_cfg_file, const char *plugin_cfg
|
||||
STELLAR_LOG_ERROR("unable to init log");
|
||||
goto error_out;
|
||||
}
|
||||
STELLAR_LOG_FATAL("start stellar (version: %s)\n %s", version, logo_str);
|
||||
STELLAR_LOG_FATAL("stellar start (version: %s)\n %s", version, logo_str);
|
||||
STELLAR_LOG_FATAL("stellar config file : %s", st->stellar_cfg_file);
|
||||
STELLAR_LOG_FATAL("plugin config file : %s", st->plugin_cfg_file);
|
||||
STELLAR_LOG_FATAL("log config file : %s", st->log_cfg_file);
|
||||
@@ -596,8 +595,8 @@ void stellar_run(struct stellar *st)
|
||||
// only available in dump file mode, automatically exits when all sessions have been released
|
||||
if (packet_io_isbreak(runtime->packet_io) && all_session_have_freed(runtime, config))
|
||||
{
|
||||
stellar_stat_output(runtime->stat); // flush stat
|
||||
STELLAR_LOG_FATAL("all sessions have been released, notify threads to exit");
|
||||
stellar_stat_output(runtime->stat); // flush stat
|
||||
ATOMIC_SET(&runtime->need_exit, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ static void *dumpfile_thread(void *arg)
|
||||
FILE *fp = NULL;
|
||||
if (strcmp(handle->dumpfile_path, "-") == 0)
|
||||
{
|
||||
PACKET_IO_LOG_ERROR("dumpfile list is empty");
|
||||
PACKET_IO_LOG_ERROR("dumpfile list is empty, read from stdin");
|
||||
fp = stdin;
|
||||
}
|
||||
else
|
||||
@@ -255,10 +255,9 @@ static void *dumpfile_thread(void *arg)
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
PACKET_IO_LOG_FATAL("dumpfile io thread read all pcap files");
|
||||
|
||||
erro_out:
|
||||
PACKET_IO_LOG_FATAL("dumpfile io thread processed all pcap files");
|
||||
|
||||
while (ATOMIC_READ(&handle->io_thread_need_exit) == 0)
|
||||
{
|
||||
if (all_packet_processed(handle))
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
add_library(tcp_reassembly tcp_reassembly.cpp)
|
||||
target_include_directories(tcp_reassembly PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_include_directories(tcp_reassembly PUBLIC ${CMAKE_SOURCE_DIR}/deps/list)
|
||||
target_include_directories(tcp_reassembly PUBLIC ${CMAKE_SOURCE_DIR}/include)
|
||||
target_link_libraries(tcp_reassembly interval_tree log)
|
||||
|
||||
add_subdirectory(test)
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "list.h"
|
||||
#include "interval_tree.h"
|
||||
#include "tcp_reassembly.h"
|
||||
#include "stellar/stellar.h"
|
||||
|
||||
#define TCP_REASSEMBLY_LOG_DEBUG(format, ...) LOG_DEBUG("tcp_reassembly", format, ##__VA_ARGS__)
|
||||
#define TCP_REASSEMBLY_LOG_ERROR(format, ...) LOG_ERROR("tcp_reassembly", format, ##__VA_ARGS__)
|
||||
|
||||
@@ -33,9 +33,6 @@ void tcp_reassembly_inc_recv_next(struct tcp_reassembly *assembler, uint32_t off
|
||||
void tcp_reassembly_set_recv_next(struct tcp_reassembly *assembler, uint32_t seq);
|
||||
uint32_t tcp_reassembly_get_recv_next(struct tcp_reassembly *assembler);
|
||||
|
||||
const char *tcp_segment_get_data(const struct tcp_segment *seg);
|
||||
uint16_t tcp_segment_get_len(const struct tcp_segment *seg);
|
||||
|
||||
/*
|
||||
* The next routines deal with comparing 32 bit unsigned ints
|
||||
* and worry about wraparound (automatic with unsigned arithmetic).
|
||||
|
||||
Reference in New Issue
Block a user