You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2024/04/22 22:51:10 UTC
(trafficserver) branch master updated: cleanup: Resolve some of dependencies on private headers (#11267)
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new e99abc80cf cleanup: Resolve some of dependencies on private headers (#11267)
e99abc80cf is described below
commit e99abc80cfe2b96434b4df1b0e039e4eee8368db
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Mon Apr 22 16:51:04 2024 -0600
cleanup: Resolve some of dependencies on private headers (#11267)
* cleanup: Resolve some of dependencies on private headers
* Fix an error around epoll
* Include memory for shared_ptr
---
include/iocore/eventsystem/VIO.h | 4 +-
include/iocore/net/EventIO.h | 12 ++-
include/iocore/net/NetEvent.h | 17 +++-
include/iocore/net/QUICMultiCertConfigLoader.h | 4 +-
include/iocore/net/SSLMultiCertConfigLoader.h | 106 +++++++++++++++++++++++
include/iocore/net/SSLTypes.h | 22 +++++
include/iocore/net/TLSBasicSupport.h | 2 +-
include/iocore/net/TLSCertSwitchSupport.h | 2 +-
include/iocore/net/TLSSessionResumptionSupport.h | 5 +-
include/iocore/net/quic/Mock.h | 2 -
include/iocore/net/quic/QUICConfig.h | 2 +-
include/iocore/net/quic/QUICStream.h | 1 -
include/proxy/FetchSM.h | 1 -
src/iocore/dns/DNSEventIO.cc | 1 +
src/iocore/net/EventIO.cc | 1 +
src/iocore/net/P_SSLCertLookup.h | 13 +--
src/iocore/net/P_SSLUtils.h | 75 +---------------
src/iocore/net/P_UnixNetState.h | 54 ------------
src/iocore/net/P_UnixNetVConnection.h | 1 -
src/iocore/net/P_UnixPollDescriptor.h | 10 +--
src/iocore/net/QUICNetVConnection.cc | 1 +
src/iocore/net/QUICPacketHandler.cc | 1 +
src/iocore/net/SSLConfig.cc | 1 +
src/iocore/net/SSLStats.cc | 1 +
src/iocore/net/SSLUtils.cc | 1 +
src/proxy/http3/test/test_QPACK.cc | 1 +
26 files changed, 176 insertions(+), 165 deletions(-)
diff --git a/include/iocore/eventsystem/VIO.h b/include/iocore/eventsystem/VIO.h
index 8099b212c1..5b1ff63193 100644
--- a/include/iocore/eventsystem/VIO.h
+++ b/include/iocore/eventsystem/VIO.h
@@ -25,9 +25,7 @@
#pragma once
#define I_VIO_h
-#if !defined(I_IOBuffer_h)
-#error "include IOBuffer.h"
-#endif
+#include "IOBuffer.h"
class Continuation;
class VConnection;
diff --git a/include/iocore/net/EventIO.h b/include/iocore/net/EventIO.h
index 633c3038ee..c4eee7e752 100644
--- a/include/iocore/net/EventIO.h
+++ b/include/iocore/net/EventIO.h
@@ -22,7 +22,11 @@
*/
#pragma once
-#include "../../../src/iocore/net/P_UnixPollDescriptor.h"
+
+#include "tscore/ink_config.h"
+#include "tscore/ink_platform.h"
+
+struct PollDescriptor;
using EventLoop = PollDescriptor *;
@@ -51,6 +55,12 @@ using EventLoop = PollDescriptor *;
#else
#define INK_EV_EDGE_TRIGGER 0
#endif
+#include <sys/event.h>
+#define INK_EVP_IN 0x001
+#define INK_EVP_PRI 0x002
+#define INK_EVP_OUT 0x004
+#define INK_EVP_ERR 0x010
+#define INK_EVP_HUP 0x020
#define EVENTIO_READ INK_EVP_IN
#define EVENTIO_WRITE INK_EVP_OUT
#define EVENTIO_ERROR (0x010 | 0x002 | 0x020) // ERR PRI HUP
diff --git a/include/iocore/net/NetEvent.h b/include/iocore/net/NetEvent.h
index 202d578f20..620ab033ef 100644
--- a/include/iocore/net/NetEvent.h
+++ b/include/iocore/net/NetEvent.h
@@ -25,13 +25,28 @@
#include <atomic>
+#include "tscore/List.h"
+#include "iocore/eventsystem/VIO.h"
#include "iocore/eventsystem/EventSystem.h"
-#include "../../../src/iocore/net/P_UnixNetState.h"
#include "iocore/net/EventIO.h"
#include "iocore/net/ReadWriteEventIO.h"
class NetHandler;
+class Event;
+class NetEvent;
+
+struct NetState {
+ int enabled = 0;
+ VIO vio;
+ Link<NetEvent> ready_link;
+ SLink<NetEvent> enable_link;
+ int in_enabled_list = 0;
+ int triggered = 0;
+
+ NetState() : vio(VIO::NONE) {}
+};
+
// this class is used to NetHandler to hide some detail of NetEvent.
// To combine the `UDPConenction` and `NetEvent`. NetHandler should
// callback to net_read_io or net_write_io when net event happen.
diff --git a/include/iocore/net/QUICMultiCertConfigLoader.h b/include/iocore/net/QUICMultiCertConfigLoader.h
index fb6e62127b..11b28d9206 100644
--- a/include/iocore/net/QUICMultiCertConfigLoader.h
+++ b/include/iocore/net/QUICMultiCertConfigLoader.h
@@ -23,8 +23,8 @@
#pragma once
-#include "../../../src/iocore/net/P_SSLCertLookup.h"
-#include "../../../src/iocore/net/P_SSLUtils.h"
+#include "iocore/net/SSLMultiCertConfigLoader.h"
+#include "iocore/eventsystem/ConfigProcessor.h"
class QUICCertConfig
{
diff --git a/include/iocore/net/SSLMultiCertConfigLoader.h b/include/iocore/net/SSLMultiCertConfigLoader.h
new file mode 100644
index 0000000000..655f03cf34
--- /dev/null
+++ b/include/iocore/net/SSLMultiCertConfigLoader.h
@@ -0,0 +1,106 @@
+/** @file
+ *
+ * A brief file description
+ *
+ * @section license License
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <string>
+#include <set>
+#include <vector>
+
+#include <openssl/ssl.h>
+
+#include "tscore/Diags.h"
+#include "iocore/net/SSLTypes.h"
+#include "tsutil/ts_errata.h"
+
+struct SSLConfigParams;
+struct SSLCertLookup;
+struct SSLMultiCertConfigParams;
+struct SSLLoadingContext;
+
+/**
+ @brief Load SSL certificates from ssl_multicert.config and setup SSLCertLookup for SSLCertificateConfig
+ */
+class SSLMultiCertConfigLoader
+{
+public:
+ struct CertLoadData {
+ std::vector<std::string> cert_names_list, key_list, ca_list, ocsp_list;
+ std::vector<SSLCertContextType> cert_type_list;
+ };
+ SSLMultiCertConfigLoader(const SSLConfigParams *p) : _params(p) {}
+ virtual ~SSLMultiCertConfigLoader(){};
+
+ swoc::Errata load(SSLCertLookup *lookup);
+
+ virtual SSL_CTX *default_server_ssl_ctx();
+
+ virtual std::vector<SSLLoadingContext> init_server_ssl_ctx(CertLoadData const &data,
+ const SSLMultiCertConfigParams *sslMultCertSettings);
+
+ static bool load_certs(SSL_CTX *ctx, const std::vector<std::string> &cert_names_list,
+ const std::vector<std::string> &key_names_list, CertLoadData const &data, const SSLConfigParams *params,
+ const SSLMultiCertConfigParams *sslMultCertSettings);
+
+ bool load_certs_and_cross_reference_names(std::vector<X509 *> &cert_list, CertLoadData &data, const SSLConfigParams *params,
+ const SSLMultiCertConfigParams *sslMultCertSettings,
+ std::set<std::string> &common_names,
+ std::unordered_map<int, std::set<std::string>> &unique_names,
+ SSLCertContextType *certType);
+
+ static bool set_session_id_context(SSL_CTX *ctx, const SSLConfigParams *params,
+ const SSLMultiCertConfigParams *sslMultCertSettings);
+
+ static int check_server_cert_now(X509 *cert, const char *certname);
+ static void clear_pw_references(SSL_CTX *ssl_ctx);
+
+ bool update_ssl_ctx(const std::string &secret_name);
+
+protected:
+ const SSLConfigParams *_params;
+
+ bool _store_single_ssl_ctx(SSLCertLookup *lookup, const shared_SSLMultiCertConfigParams &sslMultCertSettings, shared_SSL_CTX ctx,
+ SSLCertContextType ctx_type, std::set<std::string> &names);
+
+private:
+ virtual const char *_debug_tag() const;
+ virtual const DbgCtl &_dbg_ctl() const;
+ virtual bool _store_ssl_ctx(SSLCertLookup *lookup, shared_SSLMultiCertConfigParams ssl_multi_cert_params);
+ bool _prep_ssl_ctx(const shared_SSLMultiCertConfigParams &sslMultCertSettings, SSLMultiCertConfigLoader::CertLoadData &data,
+ std::set<std::string> &common_names, std::unordered_map<int, std::set<std::string>> &unique_names);
+ virtual void _set_handshake_callbacks(SSL_CTX *ctx);
+ virtual bool _setup_session_cache(SSL_CTX *ctx);
+ virtual bool _setup_dialog(SSL_CTX *ctx, const SSLMultiCertConfigParams *sslMultCertSettings);
+ virtual bool _set_verify_path(SSL_CTX *ctx, const SSLMultiCertConfigParams *sslMultCertSettings);
+ virtual bool _setup_session_ticket(SSL_CTX *ctx, const SSLMultiCertConfigParams *sslMultCertSettings);
+ virtual bool _setup_client_cert_verification(SSL_CTX *ctx);
+ virtual bool _set_cipher_suites_for_legacy_versions(SSL_CTX *ctx);
+ virtual bool _set_cipher_suites(SSL_CTX *ctx);
+ virtual bool _set_curves(SSL_CTX *ctx);
+ virtual bool _set_info_callback(SSL_CTX *ctx);
+ virtual bool _set_npn_callback(SSL_CTX *ctx);
+ virtual bool _set_alpn_callback(SSL_CTX *ctx);
+ virtual bool _set_keylog_callback(SSL_CTX *ctx);
+ virtual bool _enable_ktls(SSL_CTX *ctx);
+ virtual bool _enable_early_data(SSL_CTX *ctx);
+};
diff --git a/include/iocore/net/SSLTypes.h b/include/iocore/net/SSLTypes.h
index 977fa5a35f..9c42eb7f94 100644
--- a/include/iocore/net/SSLTypes.h
+++ b/include/iocore/net/SSLTypes.h
@@ -23,9 +23,31 @@
#pragma once
+#include <openssl/ssl.h>
+#include <memory>
+
enum class SNIRoutingType {
NONE = 0,
BLIND,
FORWARD,
PARTIAL_BLIND,
};
+
+/** Used to discern the context type when BoringSSL is used for the SSL implementation.
+ */
+enum class SSLCertContextType {
+ GENERIC, ///< Generic Context (can be either EC or RSA)
+ RSA, ///< RSA-based Context
+ EC ///< EC-based Context
+};
+
+#ifndef OPENSSL_IS_BORINGSSL
+using ssl_curve_id = int;
+#else
+using ssl_curve_id = uint16_t;
+#endif
+
+struct SSLMultiCertConfigParams;
+
+using shared_SSLMultiCertConfigParams = std::shared_ptr<SSLMultiCertConfigParams>;
+using shared_SSL_CTX = std::shared_ptr<SSL_CTX>;
diff --git a/include/iocore/net/TLSBasicSupport.h b/include/iocore/net/TLSBasicSupport.h
index 97a9de4e20..4bb23a87f6 100644
--- a/include/iocore/net/TLSBasicSupport.h
+++ b/include/iocore/net/TLSBasicSupport.h
@@ -27,7 +27,7 @@
#include <openssl/ssl.h>
#include "tscore/ink_hrtime.h"
-#include "../../../src/iocore/net/P_SSLUtils.h"
+#include "iocore/net/SSLTypes.h"
class TLSBasicSupport
{
diff --git a/include/iocore/net/TLSCertSwitchSupport.h b/include/iocore/net/TLSCertSwitchSupport.h
index ebfe2eb544..02dd23afb0 100644
--- a/include/iocore/net/TLSCertSwitchSupport.h
+++ b/include/iocore/net/TLSCertSwitchSupport.h
@@ -25,7 +25,7 @@
#pragma once
#include <openssl/ssl.h>
-#include "../../../src/iocore/net/P_SSLCertLookup.h"
+#include "iocore/net/SSLTypes.h"
class TLSCertSwitchSupport
{
diff --git a/include/iocore/net/TLSSessionResumptionSupport.h b/include/iocore/net/TLSSessionResumptionSupport.h
index a1ff716a3b..bd9e89c2be 100644
--- a/include/iocore/net/TLSSessionResumptionSupport.h
+++ b/include/iocore/net/TLSSessionResumptionSupport.h
@@ -27,8 +27,9 @@
#include <openssl/ssl.h>
#include "tscore/ink_inet.h"
-#include "../../../src/iocore/net/P_SSLCertLookup.h"
-#include "../../../src/iocore/net/P_SSLUtils.h"
+#include "iocore/net/SSLTypes.h"
+
+struct ssl_ticket_key_block;
class TLSSessionResumptionSupport
{
diff --git a/include/iocore/net/quic/Mock.h b/include/iocore/net/quic/Mock.h
index 001a1d1e30..8e34d4ffff 100644
--- a/include/iocore/net/quic/Mock.h
+++ b/include/iocore/net/quic/Mock.h
@@ -23,8 +23,6 @@
#pragma once
-#include "../../../../src/iocore/net/P_Net.h"
-
#include "iocore/net/quic/QUICApplication.h"
#include "iocore/net/quic/QUICStreamManager.h"
#include "iocore/net/quic/QUICEvents.h"
diff --git a/include/iocore/net/quic/QUICConfig.h b/include/iocore/net/quic/QUICConfig.h
index ca77da8c4b..6b7575e143 100644
--- a/include/iocore/net/quic/QUICConfig.h
+++ b/include/iocore/net/quic/QUICConfig.h
@@ -27,7 +27,7 @@
#include <quiche.h>
#include "iocore/eventsystem/ConfigProcessor.h"
-#include "../../../../src/iocore/net/P_SSLCertLookup.h"
+#include "iocore/net/SSLTypes.h"
class QUICConfigParams : public ConfigInfo
{
diff --git a/include/iocore/net/quic/QUICStream.h b/include/iocore/net/quic/QUICStream.h
index 2280ecdecb..92e1ab81c2 100644
--- a/include/iocore/net/quic/QUICStream.h
+++ b/include/iocore/net/quic/QUICStream.h
@@ -25,7 +25,6 @@
#include "tscore/List.h"
-#include "../../../../src/iocore/eventsystem/P_VConnection.h"
#include "iocore/eventsystem/Event.h"
#include "iocore/net/quic/QUICConnection.h"
diff --git a/include/proxy/FetchSM.h b/include/proxy/FetchSM.h
index 621c538ccc..3e472dcd11 100644
--- a/include/proxy/FetchSM.h
+++ b/include/proxy/FetchSM.h
@@ -29,7 +29,6 @@
#pragma once
-#include "../../src/iocore/net/P_Net.h"
#include "proxy/http/HttpSM.h"
#include "proxy/http/HttpTunnel.h"
diff --git a/src/iocore/dns/DNSEventIO.cc b/src/iocore/dns/DNSEventIO.cc
index d0debe8f78..794be573ea 100644
--- a/src/iocore/dns/DNSEventIO.cc
+++ b/src/iocore/dns/DNSEventIO.cc
@@ -18,6 +18,7 @@
limitations under the License.
*/
+#include "iocore/net/EventIO.h"
#include "iocore/dns/DNSEventIO.h"
#include "P_DNSConnection.h"
diff --git a/src/iocore/net/EventIO.cc b/src/iocore/net/EventIO.cc
index 0ec7ff2078..acc16e2cdb 100644
--- a/src/iocore/net/EventIO.cc
+++ b/src/iocore/net/EventIO.cc
@@ -23,6 +23,7 @@
#include "iocore/net/EventIO.h"
#include "tscore/ink_assert.h"
+#include "P_UnixPollDescriptor.h"
int
EventIO::start_common(EventLoop l, int afd, int e)
diff --git a/src/iocore/net/P_SSLCertLookup.h b/src/iocore/net/P_SSLCertLookup.h
index 15ca84828d..fb9ab9723e 100644
--- a/src/iocore/net/P_SSLCertLookup.h
+++ b/src/iocore/net/P_SSLCertLookup.h
@@ -29,6 +29,7 @@
#include <unordered_map>
#include "iocore/eventsystem/ConfigProcessor.h"
+#include "iocore/net/SSLTypes.h"
struct SSLConfigParams;
struct SSLContextStorage;
@@ -42,14 +43,6 @@ enum class SSLCertContextOption {
OPT_TUNNEL ///< Just tunnel, don't terminate.
};
-/** Used to discern the context type when BoringSSL is used for the SSL implementation.
- */
-enum class SSLCertContextType {
- GENERIC, ///< Generic Context (can be either EC or RSA)
- RSA, ///< RSA-based Context
- EC ///< EC-based Context
-};
-
/**
@brief Gather user provided settings from ssl_multicert.config in to this single struct
*/
@@ -84,9 +77,7 @@ struct ssl_ticket_key_block {
ssl_ticket_key_t keys[];
};
-using shared_SSLMultiCertConfigParams = std::shared_ptr<SSLMultiCertConfigParams>;
-using shared_SSL_CTX = std::shared_ptr<SSL_CTX>;
-using shared_ssl_ticket_key_block = std::shared_ptr<ssl_ticket_key_block>;
+using shared_ssl_ticket_key_block = std::shared_ptr<ssl_ticket_key_block>;
/** A certificate context.
diff --git a/src/iocore/net/P_SSLUtils.h b/src/iocore/net/P_SSLUtils.h
index e06a0448b2..b40b583444 100644
--- a/src/iocore/net/P_SSLUtils.h
+++ b/src/iocore/net/P_SSLUtils.h
@@ -35,23 +35,17 @@
#include "tscore/Diags.h"
#include "records/RecCore.h"
#include "P_SSLCertLookup.h"
+#include "iocore/net/SSLTypes.h"
#include <set>
#include <memory>
#include <unordered_map>
#include <vector>
-struct SSLConfigParams;
class SSLNetVConnection;
using ssl_error_t = int;
-#ifndef OPENSSL_IS_BORINGSSL
-using ssl_curve_id = int;
-#else
-using ssl_curve_id = uint16_t;
-#endif
-
// Return the SSL Curve ID associated to the specified SSL connection
ssl_curve_id SSLGetCurveNID(SSL *ssl);
@@ -66,73 +60,6 @@ struct SSLLoadingContext {
explicit SSLLoadingContext(SSL_CTX *c, SSLCertContextType ctx_type) : ctx(c), ctx_type(ctx_type) {}
};
-/**
- @brief Load SSL certificates from ssl_multicert.config and setup SSLCertLookup for SSLCertificateConfig
- */
-class SSLMultiCertConfigLoader
-{
-public:
- struct CertLoadData {
- std::vector<std::string> cert_names_list, key_list, ca_list, ocsp_list;
- std::vector<SSLCertContextType> cert_type_list;
- };
- SSLMultiCertConfigLoader(const SSLConfigParams *p) : _params(p) {}
- virtual ~SSLMultiCertConfigLoader(){};
-
- swoc::Errata load(SSLCertLookup *lookup);
-
- virtual SSL_CTX *default_server_ssl_ctx();
-
- virtual std::vector<SSLLoadingContext> init_server_ssl_ctx(CertLoadData const &data,
- const SSLMultiCertConfigParams *sslMultCertSettings);
-
- static bool load_certs(SSL_CTX *ctx, const std::vector<std::string> &cert_names_list,
- const std::vector<std::string> &key_names_list, CertLoadData const &data, const SSLConfigParams *params,
- const SSLMultiCertConfigParams *sslMultCertSettings);
-
- bool load_certs_and_cross_reference_names(std::vector<X509 *> &cert_list, CertLoadData &data, const SSLConfigParams *params,
- const SSLMultiCertConfigParams *sslMultCertSettings,
- std::set<std::string> &common_names,
- std::unordered_map<int, std::set<std::string>> &unique_names,
- SSLCertContextType *certType);
-
- static bool set_session_id_context(SSL_CTX *ctx, const SSLConfigParams *params,
- const SSLMultiCertConfigParams *sslMultCertSettings);
-
- static int check_server_cert_now(X509 *cert, const char *certname);
- static void clear_pw_references(SSL_CTX *ssl_ctx);
-
- bool update_ssl_ctx(const std::string &secret_name);
-
-protected:
- const SSLConfigParams *_params;
-
- bool _store_single_ssl_ctx(SSLCertLookup *lookup, const shared_SSLMultiCertConfigParams &sslMultCertSettings, shared_SSL_CTX ctx,
- SSLCertContextType ctx_type, std::set<std::string> &names);
-
-private:
- virtual const char *_debug_tag() const;
- virtual const DbgCtl &_dbg_ctl() const;
- virtual bool _store_ssl_ctx(SSLCertLookup *lookup, shared_SSLMultiCertConfigParams ssl_multi_cert_params);
- bool _prep_ssl_ctx(const shared_SSLMultiCertConfigParams &sslMultCertSettings, SSLMultiCertConfigLoader::CertLoadData &data,
- std::set<std::string> &common_names, std::unordered_map<int, std::set<std::string>> &unique_names);
- virtual void _set_handshake_callbacks(SSL_CTX *ctx);
- virtual bool _setup_session_cache(SSL_CTX *ctx);
- virtual bool _setup_dialog(SSL_CTX *ctx, const SSLMultiCertConfigParams *sslMultCertSettings);
- virtual bool _set_verify_path(SSL_CTX *ctx, const SSLMultiCertConfigParams *sslMultCertSettings);
- virtual bool _setup_session_ticket(SSL_CTX *ctx, const SSLMultiCertConfigParams *sslMultCertSettings);
- virtual bool _setup_client_cert_verification(SSL_CTX *ctx);
- virtual bool _set_cipher_suites_for_legacy_versions(SSL_CTX *ctx);
- virtual bool _set_cipher_suites(SSL_CTX *ctx);
- virtual bool _set_curves(SSL_CTX *ctx);
- virtual bool _set_info_callback(SSL_CTX *ctx);
- virtual bool _set_npn_callback(SSL_CTX *ctx);
- virtual bool _set_alpn_callback(SSL_CTX *ctx);
- virtual bool _set_keylog_callback(SSL_CTX *ctx);
- virtual bool _enable_ktls(SSL_CTX *ctx);
- virtual bool _enable_early_data(SSL_CTX *ctx);
-};
-
// Create a new SSL server context fully configured (cert and keys are optional).
// Used by TS API (TSSslServerContextCreate and TSSslServerCertUpdate)
SSL_CTX *SSLCreateServerContext(const SSLConfigParams *params, const SSLMultiCertConfigParams *sslMultiCertSettings,
diff --git a/src/iocore/net/P_UnixNetState.h b/src/iocore/net/P_UnixNetState.h
deleted file mode 100644
index aca5d9da4e..0000000000
--- a/src/iocore/net/P_UnixNetState.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/** @file
-
- A brief file description
-
- @section license License
-
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
-
-/****************************************************************************
-
- UnixNetState.h
-
-
- NetState
-
- State information for a particular channel of a NetVConnection
- This information is private to the Net module. It is only here
- because the C++ compiler needs it to define NetVConnection.
-
-
- ****************************************************************************/
-#pragma once
-
-#include "tscore/List.h"
-#include "iocore/eventsystem/VIO.h"
-
-class Event;
-class NetEvent;
-
-struct NetState {
- int enabled = 0;
- VIO vio;
- Link<NetEvent> ready_link;
- SLink<NetEvent> enable_link;
- int in_enabled_list = 0;
- int triggered = 0;
-
- NetState() : vio(VIO::NONE) {}
-};
diff --git a/src/iocore/net/P_UnixNetVConnection.h b/src/iocore/net/P_UnixNetVConnection.h
index 919ba216ff..00f8beed51 100644
--- a/src/iocore/net/P_UnixNetVConnection.h
+++ b/src/iocore/net/P_UnixNetVConnection.h
@@ -36,7 +36,6 @@
#include "tscore/ink_sock.h"
#include "iocore/net/ConnectionTracker.h"
#include "iocore/net/NetVConnection.h"
-#include "P_UnixNetState.h"
#include "P_Connection.h"
#include "P_NetAccept.h"
#include "iocore/net/NetEvent.h"
diff --git a/src/iocore/net/P_UnixPollDescriptor.h b/src/iocore/net/P_UnixPollDescriptor.h
index d4c981f4b4..fabfb1635c 100644
--- a/src/iocore/net/P_UnixPollDescriptor.h
+++ b/src/iocore/net/P_UnixPollDescriptor.h
@@ -30,15 +30,7 @@
#pragma once
#include "tscore/ink_platform.h"
-
-#if TS_USE_KQUEUE
-#include <sys/event.h>
-#define INK_EVP_IN 0x001
-#define INK_EVP_PRI 0x002
-#define INK_EVP_OUT 0x004
-#define INK_EVP_ERR 0x010
-#define INK_EVP_HUP 0x020
-#endif
+#include "iocore/net/EventIO.h"
#define POLL_DESCRIPTOR_SIZE 32768
diff --git a/src/iocore/net/QUICNetVConnection.cc b/src/iocore/net/QUICNetVConnection.cc
index bfd0421357..ba484f2922 100644
--- a/src/iocore/net/QUICNetVConnection.cc
+++ b/src/iocore/net/QUICNetVConnection.cc
@@ -21,6 +21,7 @@
limitations under the License.
*/
+#include "P_SSLUtils.h"
#include "P_QUICNetVConnection.h"
#include "P_QUICPacketHandler.h"
#include "iocore/net/QUICMultiCertConfigLoader.h"
diff --git a/src/iocore/net/QUICPacketHandler.cc b/src/iocore/net/QUICPacketHandler.cc
index d45091cb54..9646553e32 100644
--- a/src/iocore/net/QUICPacketHandler.cc
+++ b/src/iocore/net/QUICPacketHandler.cc
@@ -28,6 +28,7 @@
#include "P_QUICPacketHandler.h"
#include "P_QUICNetProcessor.h"
#include "P_QUICClosedConCollector.h"
+#include "P_SSLCertLookup.h"
#include "iocore/net/quic/QUICConnectionTable.h"
#include "iocore/net/QUICMultiCertConfigLoader.h"
#include <quiche.h>
diff --git a/src/iocore/net/SSLConfig.cc b/src/iocore/net/SSLConfig.cc
index e9a9fcef67..b3b0dff2c2 100644
--- a/src/iocore/net/SSLConfig.cc
+++ b/src/iocore/net/SSLConfig.cc
@@ -47,6 +47,7 @@
#include "P_SSLClientUtils.h"
#include "P_SSLCertLookup.h"
#include "P_TLSKeyLogger.h"
+#include "iocore/net/SSLMultiCertConfigLoader.h"
#include "iocore/net/SSLDiags.h"
#include "SSLSessionCache.h"
#include "SSLSessionTicket.h"
diff --git a/src/iocore/net/SSLStats.cc b/src/iocore/net/SSLStats.cc
index 2407bb7aad..b913d367e8 100644
--- a/src/iocore/net/SSLStats.cc
+++ b/src/iocore/net/SSLStats.cc
@@ -25,6 +25,7 @@
#include <openssl/err.h>
+#include "iocore/net/SSLMultiCertConfigLoader.h"
#include "P_SSLConfig.h"
#include "P_SSLUtils.h"
#include "../../records/P_RecProcess.h"
diff --git a/src/iocore/net/SSLUtils.cc b/src/iocore/net/SSLUtils.cc
index 7845e9ca69..ea7f385e5a 100644
--- a/src/iocore/net/SSLUtils.cc
+++ b/src/iocore/net/SSLUtils.cc
@@ -41,6 +41,7 @@
#include "P_SSLConfig.h"
#include "P_TLSKeyLogger.h"
#include "BoringSSLUtils.h"
+#include "iocore/net/SSLMultiCertConfigLoader.h"
#include "iocore/net/ProxyProtocol.h"
#include "iocore/net/SSLAPIHooks.h"
#include "SSLSessionCache.h"
diff --git a/src/proxy/http3/test/test_QPACK.cc b/src/proxy/http3/test/test_QPACK.cc
index da6b5d1db7..8093a5c2ac 100644
--- a/src/proxy/http3/test/test_QPACK.cc
+++ b/src/proxy/http3/test/test_QPACK.cc
@@ -25,6 +25,7 @@
#include <cstdio>
#include <cstdlib>
#include <fstream>
+#include <iostream>
#include "proxy/hdrs/XPACK.h"
#include "proxy/http3/QPACK.h"
#include "proxy/hdrs/HTTP.h"