summaryrefslogtreecommitdiff
path: root/cmake/lib
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/lib')
-rw-r--r--cmake/lib/common.cmake124
-rw-r--r--cmake/lib/dev.cmake37
-rw-r--r--cmake/lib/irm.cmake34
-rw-r--r--cmake/lib/lib.cmake82
-rw-r--r--cmake/lib/ssm.cmake89
5 files changed, 0 insertions, 366 deletions
diff --git a/cmake/lib/common.cmake b/cmake/lib/common.cmake
deleted file mode 100644
index b0898950..00000000
--- a/cmake/lib/common.cmake
+++ /dev/null
@@ -1,124 +0,0 @@
-# Common library configuration
-
-set(LIB_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/lib")
-set(LIB_BINARY_DIR "${CMAKE_BINARY_DIR}/src/lib")
-
-# Protobuf files
-set_source_files_properties(
- "${LIB_SOURCE_DIR}/pb/model.proto"
- "${LIB_SOURCE_DIR}/pb/ipcp_config.proto"
- "${LIB_SOURCE_DIR}/pb/enroll.proto"
- "${LIB_SOURCE_DIR}/pb/cep.proto"
- "${LIB_SOURCE_DIR}/pb/irm.proto"
- "${LIB_SOURCE_DIR}/pb/ipcp.proto"
- PROPERTIES
- COMPILE_FLAGS "-I${LIB_SOURCE_DIR}/pb"
-)
-
-protobuf_generate_c(MODEL_PROTO_SRCS MODEL_PROTO_HDRS
- "${LIB_SOURCE_DIR}/pb/model.proto")
-protobuf_generate_c(IPCP_CONFIG_PROTO_SRCS IPCP_CONFIG_PROTO_HDRS
- "${LIB_SOURCE_DIR}/pb/ipcp_config.proto")
-protobuf_generate_c(ENROLL_PROTO_SRCS ENROLL_PROTO_HDRS
- "${LIB_SOURCE_DIR}/pb/enroll.proto")
-protobuf_generate_c(CEP_PROTO_SRCS CEP_PROTO_HDRS
- "${LIB_SOURCE_DIR}/pb/cep.proto")
-protobuf_generate_c(IRM_PROTO_SRCS IRM_PROTO_HDRS
- "${LIB_SOURCE_DIR}/pb/irm.proto")
-protobuf_generate_c(IPCP_PROTO_SRCS IPCP_PROTO_HDRS
- "${LIB_SOURCE_DIR}/pb/ipcp.proto")
-
-# Common library source files
-set(SOURCE_FILES_COMMON
- bitmap.c
- btree.c
- crc32.c
- crypt.c
- hash.c
- list.c
- lockfile.c
- logs.c
- md5.c
- notifier.c
- protobuf.c
- qoscube.c
- random.c
- rib.c
- serdes-irm.c
- serdes-oep.c
- sha3.c
- ssm/flow_set.c
- ssm/rbuff.c
- ssm/pool.c
- sockets.c
- tpm.c
- utils.c
-)
-
-# Convert relative paths to absolute
-set(SOURCE_FILES_COMMON_ABS)
-foreach(src ${SOURCE_FILES_COMMON})
- list(APPEND SOURCE_FILES_COMMON_ABS "${LIB_SOURCE_DIR}/${src}")
-endforeach()
-
-if (HAVE_OPENSSL)
- set(OPENSSL_SOURCES "${LIB_SOURCE_DIR}/crypt/openssl.c")
-else()
- set(OPENSSL_SOURCES "")
-endif()
-
-add_library(ouroboros-common SHARED
- ${SOURCE_FILES_COMMON_ABS}
- ${IRM_PROTO_SRCS}
- ${IPCP_PROTO_SRCS}
- ${IPCP_CONFIG_PROTO_SRCS}
- ${MODEL_PROTO_SRCS}
- ${ENROLL_PROTO_SRCS}
- ${OPENSSL_SOURCES})
-
-set_target_properties(ouroboros-common PROPERTIES
- VERSION ${PACKAGE_VERSION}
- SOVERSION ${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR})
-
-include(utils/AddCompileFlags)
-if (CMAKE_BUILD_TYPE MATCHES "Debug*")
- add_compile_flags(ouroboros-common -DCONFIG_OUROBOROS_DEBUG)
-endif ()
-
-target_include_directories(ouroboros-common PUBLIC
- ${LIB_SOURCE_DIR}
- ${LIB_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/include
- ${CMAKE_BINARY_DIR}/include
- ${CMAKE_BINARY_DIR}
- ${PROTOBUF_C_INCLUDE_DIRS}
- ${SYS_RND_HDR})
-
-if (LIBGCRYPT_INCLUDE_DIR)
- target_include_directories(ouroboros-common PUBLIC ${LIBGCRYPT_INCLUDE_DIR})
-endif ()
-
-if (OPENSSL_INCLUDE_DIR)
- target_include_directories(ouroboros-common PUBLIC ${OPENSSL_INCLUDE_DIR})
-endif ()
-
-
-target_link_libraries(ouroboros-common
- ${LIBRT_LIBRARIES}
- ${LIBPTHREAD_LIBRARIES}
- ${PROTOBUF_C_LIBRARY})
-
-if (OPENSSL_CRYPTO_LIBRARY)
- target_link_libraries(ouroboros-common ${OPENSSL_CRYPTO_LIBRARY})
-endif ()
-
-if (LIBGCRYPT_LIBRARIES)
- target_link_libraries(ouroboros-common ${LIBGCRYPT_LIBRARIES})
-endif ()
-
-if (FUSE_LIBRARIES)
- target_link_libraries(ouroboros-common ${FUSE_LIBRARIES})
-endif ()
-
-install(TARGETS ouroboros-common LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-
diff --git a/cmake/lib/dev.cmake b/cmake/lib/dev.cmake
deleted file mode 100644
index 21fe140d..00000000
--- a/cmake/lib/dev.cmake
+++ /dev/null
@@ -1,37 +0,0 @@
-set(SOURCE_FILES_DEV
- cep.c
- dev.c
-)
-
-# Convert relative paths to absolute
-set(SOURCE_FILES_DEV_ABS)
-foreach(src ${SOURCE_FILES_DEV})
- list(APPEND SOURCE_FILES_DEV_ABS "${LIB_SOURCE_DIR}/${src}")
-endforeach()
-
-add_library(ouroboros-dev SHARED
- ${SOURCE_FILES_DEV_ABS}
- ${CEP_PROTO_SRCS})
-
-set_target_properties(ouroboros-dev PROPERTIES
- VERSION ${PACKAGE_VERSION}
- SOVERSION ${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR})
-
-if (CMAKE_BUILD_TYPE MATCHES "Debug*")
- add_compile_flags(ouroboros-dev -DCONFIG_OUROBOROS_DEBUG)
-endif ()
-
-target_include_directories(ouroboros-dev PUBLIC
- ${LIB_SOURCE_DIR}
- ${LIB_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/include
- ${CMAKE_BINARY_DIR}/include
- ${CMAKE_BINARY_DIR}
- ${PROTOBUF_C_INCLUDE_DIRS}
- ${SYS_RND_HDR}
- ${LIBGCRYPT_INCLUDE_DIR}
- ${OPENSSL_INCLUDE_DIR})
-
-target_link_libraries(ouroboros-dev ouroboros-common)
-
-install(TARGETS ouroboros-dev LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/cmake/lib/irm.cmake b/cmake/lib/irm.cmake
deleted file mode 100644
index 5e336b31..00000000
--- a/cmake/lib/irm.cmake
+++ /dev/null
@@ -1,34 +0,0 @@
-set(SOURCE_FILES_IRM
- irm.c
-)
-
-# Convert relative paths to absolute
-set(SOURCE_FILES_IRM_ABS)
-foreach(src ${SOURCE_FILES_IRM})
- list(APPEND SOURCE_FILES_IRM_ABS "${LIB_SOURCE_DIR}/${src}")
-endforeach()
-
-add_library(ouroboros-irm SHARED ${SOURCE_FILES_IRM_ABS})
-
-set_target_properties(ouroboros-irm PROPERTIES
- VERSION ${PACKAGE_VERSION}
- SOVERSION ${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR})
-
-if (CMAKE_BUILD_TYPE MATCHES "Debug*")
- add_compile_flags(ouroboros-irm -DCONFIG_OUROBOROS_DEBUG)
-endif ()
-
-target_include_directories(ouroboros-irm PUBLIC
- ${LIB_SOURCE_DIR}
- ${LIB_BINARY_DIR}
- ${CMAKE_SOURCE_DIR}/include
- ${CMAKE_BINARY_DIR}/include
- ${CMAKE_BINARY_DIR}
- ${PROTOBUF_C_INCLUDE_DIRS}
- ${SYS_RND_HDR}
- ${LIBGCRYPT_INCLUDE_DIR}
- ${OPENSSL_INCLUDE_DIR})
-
-target_link_libraries(ouroboros-irm ouroboros-common)
-
-install(TARGETS ouroboros-irm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/cmake/lib/lib.cmake b/cmake/lib/lib.cmake
deleted file mode 100644
index 86b4418c..00000000
--- a/cmake/lib/lib.cmake
+++ /dev/null
@@ -1,82 +0,0 @@
-set(LIB_SOURCE_DIR "${CMAKE_SOURCE_DIR}/src/lib")
-set(LIB_BINARY_DIR "${CMAKE_BINARY_DIR}/src/lib")
-
-# Library configuration variables
-set(SYS_MAX_FLOWS 10240 CACHE STRING
- "Maximum number of total flows for this system")
-set(PROG_MAX_FLOWS 4096 CACHE STRING
- "Maximum number of flows in an application")
-set(PROG_RES_FDS 64 CACHE STRING
- "Number of reserved flow descriptors per application")
-set(PROG_MAX_FQUEUES 32 CACHE STRING
- "Maximum number of flow sets per application")
-
-if (NOT APPLE)
- set(PTHREAD_COND_CLOCK "CLOCK_MONOTONIC" CACHE STRING
- "Clock to use for condition variable timing")
-else ()
- set(PTHREAD_COND_CLOCK "CLOCK_REALTIME" CACHE INTERNAL
- "Clock to use for condition variable timing")
-endif ()
-
-set(SOCKET_TIMEOUT 500 CACHE STRING
- "Default timeout for responses from IPCPs (ms)")
-set(SHM_PREFIX "ouroboros" CACHE STRING
- "String to prepend to POSIX shared memory filenames")
-set(SHM_LOCKFILE_NAME "/${SHM_PREFIX}.lockfile" CACHE INTERNAL
- "Filename for the POSIX shared memory lockfile")
-
-set(QOS_DISABLE_CRC TRUE CACHE BOOL
- "Ignores ber setting on all QoS cubes")
-set(DELTA_T_MPL 60 CACHE STRING
- "Maximum packet lifetime (s)")
-set(DELTA_T_ACK 10 CACHE STRING
- "Maximum time to acknowledge a packet (s)")
-set(DELTA_T_RTX 120 CACHE STRING
- "Maximum time to retransmit a packet (s)")
-set(FRCT_REORDER_QUEUE_SIZE 256 CACHE STRING
- "Size of the reordering queue, must be a power of 2")
-set(FRCT_START_WINDOW 64 CACHE STRING
- "Start window, must be a power of 2")
-set(FRCT_LINUX_RTT_ESTIMATOR TRUE CACHE BOOL
- "Use Linux RTT estimator formula instead of the TCP RFC formula")
-set(FRCT_RTO_MDEV_MULTIPLIER 2 CACHE STRING
- "Multiplier for deviation term in the RTO: RTO = sRTT + (mdev << X)")
-set(FRCT_RTO_INC_FACTOR 0 CACHE STRING
- "Divisor for RTO increase after timeout: RTO += RTX >> X, 0: Karn/Partridge")
-set(FRCT_RTO_MIN 250 CACHE STRING
- "Minimum Retransmission Timeout (RTO) for FRCT (us)")
-set(FRCT_TICK_TIME 5000 CACHE STRING
- "Tick time for FRCT activity (retransmission, acknowledgments) (us)")
-set(RXM_BUFFER_ON_HEAP FALSE CACHE BOOL
- "Store packets for retransmission on the heap instead of in packet buffer")
-set(RXM_BLOCKING TRUE CACHE BOOL
- "Use blocking writes for retransmission")
-set(RXM_MIN_RESOLUTION 20 CACHE STRING
- "Minimum retransmission delay (ns), as a power to 2")
-set(RXM_WHEEL_MULTIPLIER 4 CACHE STRING
- "Factor for retransmission wheel levels as a power to 2")
-set(RXM_WHEEL_LEVELS 3 CACHE STRING
- "Number of levels in the retransmission wheel")
-set(RXM_WHEEL_SLOTS_PER_LEVEL 256 CACHE STRING
- "Number of slots per level in the retransmission wheel, must be a power of 2")
-set(ACK_WHEEL_SLOTS 256 CACHE STRING
- "Number of slots in the acknowledgment wheel, must be a power of 2")
-set(ACK_WHEEL_RESOLUTION 18 CACHE STRING
- "Minimum acknowledgment delay (ns), as a power to 2")
-set(TPM_DEBUG_REPORT_INTERVAL 0 CACHE STRING
- "Interval at wich the TPM will report long running threads (s), 0 disables")
-set(TPM_DEBUG_ABORT_TIMEOUT 0 CACHE STRING
- "TPM abort process after a thread reaches this timeout (s), 0 disables")
-set(KEY_ROTATION_BIT 20 CACHE STRING
- "Bit position in packet counter that triggers key rotation (default 20 = every 2^20 packets)")
-
-if (HAVE_FUSE)
- set(PROC_FLOW_STATS TRUE CACHE BOOL
- "Enable flow statistics tracking for application flows")
- if (PROC_FLOW_STATS)
- message(STATUS "Application flow statistics enabled")
- else ()
- message(STATUS "Application flow statistics disabled")
- endif ()
-endif ()
diff --git a/cmake/lib/ssm.cmake b/cmake/lib/ssm.cmake
deleted file mode 100644
index 71790a4a..00000000
--- a/cmake/lib/ssm.cmake
+++ /dev/null
@@ -1,89 +0,0 @@
-# Pool size configuration for Ouroboros secure shared memory
-# This file defines the allocation parameters for the
-# secure shared memory pool allocator
-
-# Shared memory pool naming configuration
-set(SSM_PREFIX "o7s.ssm" CACHE STRING
- "Prefix for secure shared memory pools")
-set(SSM_GSMP_SUFFIX ".gsmp" CACHE STRING
- "Suffix for Group Shared Memory Pool")
-set(SSM_PPP_SUFFIX ".ppp" CACHE STRING
- "Suffix for Process Private Pool")
-
-set(SSM_POOL_NAME "/${SHM_PREFIX}.pool" CACHE INTERNAL
- "Name for the main POSIX shared memory pool")
-set(SSM_POOL_BLOCKS 16384 CACHE STRING
- "Number of blocks in SSM packet pool, must be a power of 2")
-set(SSM_PK_BUFF_HEADSPACE 256 CACHE STRING
- "Bytes of headspace to reserve for future headers")
-set(SSM_PK_BUFF_TAILSPACE 32 CACHE STRING
- "Bytes of tailspace to reserve for future tails")
-set(SSM_RBUFF_SIZE 1024 CACHE STRING
- "Number of blocks in rbuff buffer, must be a power of 2")
-set(SSM_RBUFF_PREFIX "/${SHM_PREFIX}.rbuff." CACHE INTERNAL
- "Prefix for rbuff POSIX shared memory filenames")
-set(SSM_FLOW_SET_PREFIX "/${SHM_PREFIX}.set." CACHE INTERNAL
- "Prefix for the POSIX shared memory flow set")
-
-# Pool blocks per size class
-# This determines how many blocks of each size are preallocated in the pool
-# Higher values reduce allocation failures but increase memory usage
-set(SSM_POOL_256_BLOCKS 1024 CACHE STRING
- "Number of 256B blocks in pool")
-set(SSM_POOL_512_BLOCKS 768 CACHE STRING
- "Number of 512B blocks in pool")
-set(SSM_POOL_1K_BLOCKS 512 CACHE STRING
- "Number of 1KB blocks in pool")
-set(SSM_POOL_2K_BLOCKS 384 CACHE STRING
- "Number of 2KB blocks in pool")
-set(SSM_POOL_4K_BLOCKS 256 CACHE STRING
- "Number of 4KB blocks in pool")
-set(SSM_POOL_16K_BLOCKS 128 CACHE STRING
- "Number of 16KB blocks in pool")
-set(SSM_POOL_64K_BLOCKS 64 CACHE STRING
- "Number of 64KB blocks in pool")
-set(SSM_POOL_256K_BLOCKS 32 CACHE STRING
- "Number of 256KB blocks in pool")
-set(SSM_POOL_1M_BLOCKS 16 CACHE STRING
- "Number of 1MB blocks in pool")
-
-# Number of shards per size class for reducing contention
-set(SSM_POOL_SHARDS 4 CACHE STRING
- "Number of allocator shards per size class")
-
-# SSM packet buffer overhead - computed at compile time via sizeof()
-# Defined in config.h.in as sizeof(_ssm_memory_block) + sizeof(_ssm_pk_buff)
-# This makes it portable across platforms with different pid_t sizes and padding
-
-# Total shared memory pool size calculation
-math(EXPR SSM_POOL_TOTAL_SIZE
- "(1 << 8) * ${SSM_POOL_256_BLOCKS} + \
- (1 << 9) * ${SSM_POOL_512_BLOCKS} + \
- (1 << 10) * ${SSM_POOL_1K_BLOCKS} + \
- (1 << 11) * ${SSM_POOL_2K_BLOCKS} + \
- (1 << 12) * ${SSM_POOL_4K_BLOCKS} + \
- (1 << 14) * ${SSM_POOL_16K_BLOCKS} + \
- (1 << 16) * ${SSM_POOL_64K_BLOCKS} + \
- (1 << 18) * ${SSM_POOL_256K_BLOCKS} + \
- (1 << 20) * ${SSM_POOL_1M_BLOCKS}")
-
-set(SSM_POOL_TOTAL_SIZE ${SSM_POOL_TOTAL_SIZE} CACHE INTERNAL
- "Total shared memory pool size in bytes")
-
-include(utils/HumanReadable)
-format_bytes_human_readable(${SSM_POOL_TOTAL_SIZE} SSM_POOL_SIZE_DISPLAY)
-
-# Display configuration summary
-message(STATUS "Secure Shared Memory Pool Configuration:")
-message(STATUS " Pool prefix: ${SSM_PREFIX}")
-message(STATUS " Size classes: "
- "256B, 512B, 1KiB, 2KiB, 4KiB, 16KiB, 64KiB, 256KiB, 1MiB")
-message(STATUS " Max allocation: 1 MB")
-message(STATUS " Total pool size: ${SSM_POOL_SIZE_DISPLAY} "
- "(${SSM_POOL_TOTAL_SIZE} bytes)")
-message(STATUS " Shards per class: ${SSM_POOL_SHARDS}")
-message(STATUS " Blocks per class: ${SSM_POOL_256_BLOCKS}, "
- "${SSM_POOL_512_BLOCKS}, ${SSM_POOL_1K_BLOCKS}, "
- "${SSM_POOL_2K_BLOCKS}, ${SSM_POOL_4K_BLOCKS}, "
- "${SSM_POOL_16K_BLOCKS}, ${SSM_POOL_64K_BLOCKS}, "
- "${SSM_POOL_256K_BLOCKS}, ${SSM_POOL_1M_BLOCKS}")