summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorHugo Landau <hlandau@openssl.org>2023-08-01 10:02:08 +0100
committerMatt Caswell <matt@openssl.org>2023-08-08 14:33:42 +0100
commit398922463fd2fb0df52443932ca3e140554e5334 (patch)
treee722a9a6a697c109cd0b40bdde0578f08480a125 /include
parent741170bef340b31a32a94a4ea86cc0d7744c01b2 (diff)
QUIC: Move string conversion functions into a source file
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/21547)
Diffstat (limited to 'include')
-rw-r--r--include/internal/quic_error.h28
-rw-r--r--include/internal/quic_wire.h42
2 files changed, 2 insertions, 68 deletions
diff --git a/include/internal/quic_error.h b/include/internal/quic_error.h
index 9495c3e67d..46bda1376d 100644
--- a/include/internal/quic_error.h
+++ b/include/internal/quic_error.h
@@ -46,33 +46,7 @@
# define QUIC_ERR_CRYPTO_NO_APP_PROTO \
QUIC_ERR_CRYPTO_ERR(TLS1_AD_NO_APPLICATION_PROTOCOL)
-static ossl_inline ossl_unused const char *
-ossl_quic_err_to_string(uint64_t error_code)
-{
- switch (error_code) {
-#define X(name) case QUIC_ERR_##name: return #name;
- X(NO_ERROR)
- X(INTERNAL_ERROR)
- X(CONNECTION_REFUSED)
- X(FLOW_CONTROL_ERROR)
- X(STREAM_LIMIT_ERROR)
- X(STREAM_STATE_ERROR)
- X(FINAL_SIZE_ERROR)
- X(FRAME_ENCODING_ERROR)
- X(TRANSPORT_PARAMETER_ERROR)
- X(CONNECTION_ID_LIMIT_ERROR)
- X(PROTOCOL_VIOLATION)
- X(INVALID_TOKEN)
- X(APPLICATION_ERROR)
- X(CRYPTO_BUFFER_EXCEEDED)
- X(KEY_UPDATE_ERROR)
- X(AEAD_LIMIT_REACHED)
- X(NO_VIABLE_PATH)
-#undef X
- default:
- return NULL;
- }
-}
+const char *ossl_quic_err_to_string(uint64_t error_code);
# endif
diff --git a/include/internal/quic_wire.h b/include/internal/quic_wire.h
index 4f059120b3..f9f80fbc44 100644
--- a/include/internal/quic_wire.h
+++ b/include/internal/quic_wire.h
@@ -87,47 +87,7 @@
# define OSSL_QUIC_FRAME_TYPE_IS_CONN_CLOSE(x) \
(((x) & ~(uint64_t)1) == OSSL_QUIC_FRAME_TYPE_CONN_CLOSE_TRANSPORT)
-static ossl_unused ossl_inline const char *
-ossl_quic_frame_type_to_string(uint64_t frame_type)
-{
- switch (frame_type) {
-#define X(name) case OSSL_QUIC_FRAME_TYPE_##name: return #name;
- X(PADDING)
- X(PING)
- X(ACK_WITHOUT_ECN)
- X(ACK_WITH_ECN)
- X(RESET_STREAM)
- X(STOP_SENDING)
- X(CRYPTO)
- X(NEW_TOKEN)
- X(MAX_DATA)
- X(MAX_STREAM_DATA)
- X(MAX_STREAMS_BIDI)
- X(MAX_STREAMS_UNI)
- X(DATA_BLOCKED)
- X(STREAM_DATA_BLOCKED)
- X(STREAMS_BLOCKED_BIDI)
- X(STREAMS_BLOCKED_UNI)
- X(NEW_CONN_ID)
- X(RETIRE_CONN_ID)
- X(PATH_CHALLENGE)
- X(PATH_RESPONSE)
- X(CONN_CLOSE_TRANSPORT)
- X(CONN_CLOSE_APP)
- X(HANDSHAKE_DONE)
- X(STREAM)
- X(STREAM_FIN)
- X(STREAM_LEN)
- X(STREAM_LEN_FIN)
- X(STREAM_OFF)
- X(STREAM_OFF_FIN)
- X(STREAM_OFF_LEN)
- X(STREAM_OFF_LEN_FIN)
-#undef X
- default:
- return NULL;
- }
-}
+const char *ossl_quic_frame_type_to_string(uint64_t frame_type);
static ossl_unused ossl_inline int
ossl_quic_frame_type_is_ack_eliciting(uint64_t frame_type)