Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions iocore/aio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@


add_library(aio STATIC)
add_library(ts::aio ALIAS aio)

target_sources(aio PRIVATE AIO.cc Inline.cc)
target_include_directories(aio PRIVATE ${CMAKE_SOURCE_DIR}/iocore/eventsystem ${CMAKE_SOURCE_DIR}/iocore/io_uring)

target_link_libraries(aio PUBLIC ts::tscore)
19 changes: 15 additions & 4 deletions iocore/cache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,12 @@ add_library(inkcache STATIC
RamCacheLRU.cc
Store.cc
)
add_library(ts::inkcache ALIAS inkcache)

if(BUILD_REGRESSION_TESTING)
target_sources(inkcache PRIVATE CacheTest.cc)
endif()
target_link_libraries(inkcache PRIVATE ZLIB::ZLIB)
if(HAVE_LZMA_H)
target_link_libraries(inkcache PRIVATE LibLZMA::LibLZMA)
endif()

target_include_directories(inkcache PRIVATE
${CMAKE_SOURCE_DIR}/iocore/eventsystem
${CMAKE_SOURCE_DIR}/iocore/io_uring
Expand All @@ -52,3 +51,15 @@ target_include_directories(inkcache PRIVATE
${CMAKE_SOURCE_DIR}/proxy/hdrs
${CMAKE_SOURCE_DIR}/lib
)

target_link_libraries(inkcache
PUBLIC
ts::tscore
PRIVATE
fastlz
ZLIB::ZLIB
)

if(HAVE_LZMA_H)
target_link_libraries(inkcache PRIVATE LibLZMA::LibLZMA)
endif()
4 changes: 4 additions & 0 deletions iocore/dns/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ add_library(inkdns STATIC
Inline.cc
SplitDNS.cc
)
add_library(ts::inkdns ALIAS inkdns)

target_include_directories(inkdns PRIVATE
${CMAKE_SOURCE_DIR}/iocore/eventsystem
${CMAKE_SOURCE_DIR}/iocore/dns
Expand All @@ -34,3 +36,5 @@ target_include_directories(inkdns PRIVATE
${CMAKE_SOURCE_DIR}/proxy/http
${CMAKE_SOURCE_DIR}/proxy/hdrs
)

target_link_libraries(inkdns PUBLIC ts::tscore)
4 changes: 4 additions & 0 deletions iocore/hostdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ add_library(inkhostdb STATIC
HostFile.cc
HostDBInfo.cc
)
add_library(ts::inkhostdb ALIAS inkhostdb)

target_include_directories(inkhostdb PRIVATE
${CMAKE_SOURCE_DIR}/iocore/eventsystem
${CMAKE_SOURCE_DIR}/iocore/io_uring
Expand All @@ -35,3 +37,5 @@ target_include_directories(inkhostdb PRIVATE
${CMAKE_SOURCE_DIR}/proxy/http
${CMAKE_SOURCE_DIR}/proxy/hdrs
)

target_link_libraries(inkhostdb PUBLIC ts::tscore)
1 change: 1 addition & 0 deletions iocore/hostdb/test_HostFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,5 @@ HostDBRecord::alloc(swoc::TextView query_name, unsigned int rr_count, size_t srv
void
HostDBRecord::free()
{
delete this;
}
3 changes: 2 additions & 1 deletion iocore/io_uring/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ include_directories(
add_executable(test_iouring
unit_tests/test_diskIO.cc)
target_link_libraries(test_iouring
PUBLIC
ts::tscore
PRIVATE
inkuring
libswoc
ts::tscore
tscpputil
uring
)
Expand Down
10 changes: 9 additions & 1 deletion iocore/net/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ add_library(inknet STATIC
NetVCOptions.cc
NetVConnection.cc
PollCont.cc
PreWarmManager.cc
ProxyProtocol.cc
Socks.cc
SSLCertLookup.cc
Expand Down Expand Up @@ -97,7 +98,7 @@ if(BUILD_REGRESSION_TESTING)
target_sources(inknet PRIVATE NetVCTest.cc)
endif()

target_link_libraries(inknet PUBLIC inkevent records)

target_compile_options(inknet PUBLIC -Wno-deprecated-declarations)
target_include_directories(inknet PUBLIC
${CMAKE_SOURCE_DIR}/iocore/eventsystem
Expand All @@ -117,6 +118,13 @@ target_include_directories(inknet PUBLIC
${YAML_INCLUDE_DIRS}
)

target_link_libraries(inknet
PUBLIC
ts::inkevent
ts::records
ts::tscore
)

# Fails to link because of circular dep with proxy (ParentSelection)
# add_executable(test_net unit_tests/test_ProxyProtocol.cc)
# target_link_libraries(test_net records_p inknet inkevent tscore yaml-cpp libswoc)
Expand Down
1 change: 1 addition & 0 deletions iocore/net/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ libinknet_a_SOURCES = \
P_UnixUDPConnection.h \
PollCont.h \
PollCont.cc \
PreWarmManager.cc \
ProxyProtocol.h \
ProxyProtocol.cc \
Socks.cc \
Expand Down
9 changes: 8 additions & 1 deletion iocore/net/P_SNIActionPerformer.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,12 @@ class OutboundSNIPolicy : public ActionItem
class ServerMaxEarlyData : public ActionItem
{
public:
ServerMaxEarlyData(uint32_t value) : server_max_early_data(value) {}
ServerMaxEarlyData(uint32_t value)
#if TS_HAS_TLS_EARLY_DATA
: server_max_early_data(value)
#endif
{
}
~ServerMaxEarlyData() override {}

int
Expand All @@ -472,6 +477,8 @@ class ServerMaxEarlyData : public ActionItem
return SSL_TLSEXT_ERR_OK;
}

#if TS_HAS_TLS_EARLY_DATA
private:
uint32_t server_max_early_data = 0;
#endif
};
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions iocore/net/TLSTunnelSupport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@
limitations under the License.
*/

#include "SSLTypes.h"
#include "PreWarmManager.h"
#include "TLSTunnelSupport.h"
#include "tscore/ink_assert.h"
#include "tscore/Diags.h"

#include "swoc/IPEndpoint.h"

#include <memory>

int TLSTunnelSupport::_ex_data_index = -1;

void
Expand Down Expand Up @@ -77,3 +81,10 @@ TLSTunnelSupport::set_tunnel_destination(const std::string_view &destination, SN
Warning("Invalid destination \"%.*s\" in SNI configuration.", int(destination.size()), destination.data());
}
}

PreWarm::SPtrConstDst
TLSTunnelSupport::create_dst(int pid) const
{
return std::make_shared<const PreWarm::Dst>(get_tunnel_host(), get_tunnel_port(),
is_upstream_tls() ? SNIRoutingType::PARTIAL_BLIND : SNIRoutingType::FORWARD, pid);
}
4 changes: 4 additions & 0 deletions iocore/net/TLSTunnelSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#pragma once

#include <openssl/ssl.h>

#include "PreWarmManager.h"
#include "tscore/ink_memory.h"
#include "tscore/ink_inet.h"
#include "YamlSNIConfig.h"
Expand Down Expand Up @@ -54,6 +56,8 @@ class TLSTunnelSupport
YamlSNIConfig::TunnelPreWarm prewarm);
YamlSNIConfig::TunnelPreWarm get_tunnel_prewarm_configuration() const;

PreWarm::SPtrConstDst create_dst(int pid) const;

protected:
void _clear();

Expand Down
2 changes: 2 additions & 0 deletions iocore/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ target_include_directories(inkutils PRIVATE
${CMAKE_SOURCE_DIR}/proxy/http
${CMAKE_SOURCE_DIR}/proxy/hdrs
)

target_link_libraries(inkutils PUBLIC ts::tscore)
6 changes: 5 additions & 1 deletion mgmt/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ add_library(configmanager STATIC
FileManager.cc
AddConfigFilesHere.cc
)
add_library(ts::configmanager ALIAS configmanager)

include_directories(
${CMAKE_SOURCE_DIR}/mgmt
${CMAKE_SOURCE_DIR}/proxy
${CMAKE_SOURCE_DIR}/proxy/hdrs
${CMAKE_SOURCE_DIR}/proxy/http
${IOCORE_INCLUDE_DIRS}
)
)

target_link_libraries(configmanager PUBLIC ts::tscore)
9 changes: 9 additions & 0 deletions mgmt/rpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,19 @@ add_library(jsonrpc_protocol STATIC
jsonrpc/JsonRPCManager.cc
jsonrpc/Context.cc
)
add_library(ts::jsonrpc_protocol ALIAS jsonrpc_protocol)

target_link_libraries(jsonrpc_protocol PUBLIC ts::tscore)

add_library(jsonrpc_server STATIC
server/RPCServer.cc
server/CommBase.cc
server/IPCSocketServer.cc
config/JsonRPCConfig.cc
)
add_library(ts::jsonrpc_server ALIAS jsonrpc_server)

target_link_libraries(jsonrpc_server PUBLIC ts::tscore)

add_library(rpcpublichandlers STATIC
handlers/common/RecordsUtils.cc
Expand All @@ -47,3 +53,6 @@ add_library(rpcpublichandlers STATIC
handlers/server/Server.cc
handlers/plugins/Plugins.cc
)
add_library(ts::rpcpublichandlers ALIAS rpcpublichandlers)

target_link_libraries(rpcpublichandlers PUBLIC ts::tscore)
1 change: 0 additions & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function(add_atsplugin name)
target_link_libraries(${name} PRIVATE traffic_server)
set_target_properties(${name} PROPERTIES PREFIX "")
set_target_properties(${name} PROPERTIES SUFFIX ".so")
set_target_properties(${name} PROPERTIES LINK_FLAGS "-Wl,-rpath,${CMAKE_INSTALL_PREFIX}/lib")
install(TARGETS ${name} DESTINATION libexec/trafficserver)
endfunction()

Expand Down
2 changes: 1 addition & 1 deletion plugins/experimental/slice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ add_atsplugin(slice
util.cc
)

target_link_libraries(access_control PRIVATE PCRE::PCRE)
target_link_libraries(slice PRIVATE ts::tscore)

if(BUILD_TESTING)
add_subdirectory(unit-tests)
Expand Down
2 changes: 2 additions & 0 deletions plugins/header_rewrite/conditions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ ConditionMethod::initialize(Parser &p)

match->set(p.get_arg());
_matcher = match;

require_resources(RSRC_CLIENT_REQUEST_HEADERS);
}

bool
Expand Down
2 changes: 2 additions & 0 deletions plugins/s3_auth/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ project(s3_auth)

add_atsplugin(s3_auth s3_auth.cc aws_auth_v4.cc)

target_link_libraries(s3_auth PRIVATE ts::tscore)

add_subdirectory(unit_tests)
2 changes: 2 additions & 0 deletions proxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ target_include_directories(proxy PUBLIC
${CMAKE_SOURCE_DIR}/lib/yamlcpp/include
)

target_link_libraries(proxy PUBLIC ts::tscore)

add_subdirectory(hdrs)
add_subdirectory(shared)
add_subdirectory(http)
Expand Down
3 changes: 2 additions & 1 deletion proxy/http/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ add_library(http STATIC
ConnectingEntry.cc
ForwardedConfig.cc
PreWarmConfig.cc
PreWarmManager.cc
)
add_library(ts::http ALIAS http)

Expand All @@ -56,6 +55,8 @@ target_include_directories(http
${YAMLCPP_INCLUDE_DIR}
)

target_link_libraries(http PUBLIC ts::tscore)

if(TS_USE_QUIC)
target_link_libraries(http PRIVATE ts::http3)
endif()
Expand Down
Loading