refactor: rename stellar dir to core
This commit is contained in:
@@ -7,4 +7,4 @@ add_subdirectory(ip_reassembly)
|
|||||||
add_subdirectory(tcp_reassembly)
|
add_subdirectory(tcp_reassembly)
|
||||||
add_subdirectory(session)
|
add_subdirectory(session)
|
||||||
add_subdirectory(plugin)
|
add_subdirectory(plugin)
|
||||||
add_subdirectory(stellar)
|
add_subdirectory(core)
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
set(SOURCE stellar_config.cpp stellar_stat.cpp stellar_core.cpp)
|
set(SOURCE stellar_config.cpp stellar_stat.cpp stellar_core.cpp)
|
||||||
set(LIBRARY session_manager plugin_manager ip_reassembly packet_io packet pthread fieldstat4 toml)
|
set(LIBRARY session_manager plugin_manager ip_reassembly packet_io packet pthread fieldstat4 toml)
|
||||||
|
|
||||||
add_library(stellar_core STATIC ${SOURCE})
|
add_library(core STATIC ${SOURCE})
|
||||||
target_link_libraries(stellar_core PUBLIC ${LIBRARY})
|
target_link_libraries(core PUBLIC ${LIBRARY})
|
||||||
target_include_directories(stellar_core PUBLIC ${CMAKE_SOURCE_DIR}/src/utils)
|
target_include_directories(core PUBLIC ${CMAKE_SOURCE_DIR}/src/utils)
|
||||||
|
|
||||||
add_library(stellar_devel SHARED ${SOURCE})
|
add_library(stellar_devel SHARED ${SOURCE})
|
||||||
set_target_properties(stellar_devel PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/version.map")
|
set_target_properties(stellar_devel PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/version.map")
|
||||||
@@ -11,7 +11,7 @@ target_link_libraries(stellar_devel PRIVATE -Wl,--whole-archive ${LIBRARY} -Wl,-
|
|||||||
target_include_directories(stellar_devel PUBLIC ${CMAKE_SOURCE_DIR}/src/utils)
|
target_include_directories(stellar_devel PUBLIC ${CMAKE_SOURCE_DIR}/src/utils)
|
||||||
|
|
||||||
add_executable(stellar main.cpp)
|
add_executable(stellar main.cpp)
|
||||||
target_link_libraries(stellar PRIVATE -Wl,--whole-archive stellar_core ${LIBRARY} -Wl,--no-whole-archive)
|
target_link_libraries(stellar PRIVATE -Wl,--whole-archive core ${LIBRARY} -Wl,--no-whole-archive)
|
||||||
target_link_libraries(stellar PRIVATE "-rdynamic")
|
target_link_libraries(stellar PRIVATE "-rdynamic")
|
||||||
set_target_properties(stellar PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/version.map")
|
set_target_properties(stellar PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/version.map")
|
||||||
|
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
#include <sys/prctl.h>
|
#include <sys/prctl.h>
|
||||||
|
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "logo.h"
|
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "packet_io.h"
|
#include "packet_io.h"
|
||||||
#include "packet_private.h"
|
#include "packet_private.h"
|
||||||
@@ -31,6 +30,13 @@ static __attribute__((__used__)) const char *version = STELLAR_GIT_VERSION;
|
|||||||
static __attribute__((__used__)) const char *version = "Unknown";
|
static __attribute__((__used__)) const char *version = "Unknown";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static const char logo_str[] =
|
||||||
|
" _ _ _\n"
|
||||||
|
" ___ | |_ ___ | | | | __ _ _ __\n"
|
||||||
|
" / __| | __| / _ \\ | | | | / _` | | '__|\n"
|
||||||
|
" \\__ \\ | |_ | __/ | | | | | (_| | | |\n"
|
||||||
|
" |___/ \\__| \\___| |_| |_| \\__,_| |_|\n";
|
||||||
|
|
||||||
struct schedule_data
|
struct schedule_data
|
||||||
{
|
{
|
||||||
uint64_t last_free_expired_session_timestamp;
|
uint64_t last_free_expired_session_timestamp;
|
||||||
@@ -5,7 +5,6 @@
|
|||||||
#include "packet_private.h"
|
#include "packet_private.h"
|
||||||
#include "packet_helper.h"
|
#include "packet_helper.h"
|
||||||
#include "packet_parser.h"
|
#include "packet_parser.h"
|
||||||
#include "packet_builder.h"
|
|
||||||
|
|
||||||
#define PACKET_CRAFT_LOG_DEBUG(format, ...) LOG_DEBUG("packet craft", format, ##__VA_ARGS__)
|
#define PACKET_CRAFT_LOG_DEBUG(format, ...) LOG_DEBUG("packet craft", format, ##__VA_ARGS__)
|
||||||
#define PACKET_CRAFT_LOG_ERROR(format, ...) LOG_ERROR("packet craft", format, ##__VA_ARGS__)
|
#define PACKET_CRAFT_LOG_ERROR(format, ...) LOG_ERROR("packet craft", format, ##__VA_ARGS__)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
#include "packet_private.h"
|
#include "packet_private.h"
|
||||||
#include "packet_dump.h"
|
#include "packet_dump.h"
|
||||||
#include "packet_parser.h"
|
#include "packet_parser.h"
|
||||||
#include "packet_builder.h"
|
|
||||||
|
|
||||||
#define PRINT_GREEN(fmt, ...) printf("\033[0;32m" fmt "\033[0m\n", ##__VA_ARGS__)
|
#define PRINT_GREEN(fmt, ...) printf("\033[0;32m" fmt "\033[0m\n", ##__VA_ARGS__)
|
||||||
#define PRINT_RED(fmt, ...) printf("\033[0;31m" fmt "\033[0m\n", ##__VA_ARGS__)
|
#define PRINT_RED(fmt, ...) printf("\033[0;31m" fmt "\033[0m\n", ##__VA_ARGS__)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
#include "toml/toml.h"
|
#include "toml/toml.h"
|
||||||
#include "uthash/utlist.h"
|
#include "uthash/utlist.h"
|
||||||
|
|
||||||
#include "stellar/stellar_core.h"
|
#include "core/stellar_core.h"
|
||||||
#include "session/session_utils.h"
|
#include "session/session_utils.h"
|
||||||
#include "tuple/tuple.h"
|
#include "tuple/tuple.h"
|
||||||
#include "packet/packet_private.h"
|
#include "packet/packet_private.h"
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ add_library(snowflake snowflake.cpp)
|
|||||||
target_include_directories(snowflake PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
target_include_directories(snowflake PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||||
target_include_directories(snowflake PUBLIC ${CMAKE_SOURCE_DIR}/src/utils)
|
target_include_directories(snowflake PUBLIC ${CMAKE_SOURCE_DIR}/src/utils)
|
||||||
target_include_directories(snowflake PUBLIC ${CMAKE_SOURCE_DIR}/include/stellar)
|
target_include_directories(snowflake PUBLIC ${CMAKE_SOURCE_DIR}/include/stellar)
|
||||||
target_link_libraries(snowflake stellar_core)
|
target_link_libraries(snowflake core)
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
#pragma once
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* _ _ _
|
|
||||||
* ___ | |_ ___ | | | | __ _ _ __
|
|
||||||
* / __| | __| / _ \ | | | | / _` | | '__|
|
|
||||||
* \__ \ | |_ | __/ | | | | | (_| | | |
|
|
||||||
* |___/ \__| \___| |_| |_| \__,_| |_|
|
|
||||||
*/
|
|
||||||
|
|
||||||
static const char logo_str[] =
|
|
||||||
" _ _ _\n"
|
|
||||||
" ___ | |_ ___ | | | | __ _ _ __\n"
|
|
||||||
" / __| | __| / _ \\ | | | | / _` | | '__|\n"
|
|
||||||
" \\__ \\ | |_ | __/ | | | | | (_| | | |\n"
|
|
||||||
" |___/ \\__| \\___| |_| |_| \\__,_| |_|\n";
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
Reference in New Issue
Block a user