-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MINOR: quic: Export QUIC traces code from quic_conn.c
To accelerate the compilation of quic_conn.c file, export the code in relation with the traces from quic_conn.c to quic_trace.c. Also add some headers (quic_trace-t.h and quic_trace.h).
- Loading branch information
1 parent
f537039
commit b67f651
Showing
5 changed files
with
715 additions
and
647 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* include/haproxy/quic_trace-t.h | ||
* Definitions for QUIC traces internal types, constants and flags. | ||
* | ||
* Copyright (C) 2023 | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version | ||
* 2 of the License, or (at your option) any later version. | ||
* | ||
*/ | ||
|
||
#ifndef _HAPROXY_QUIC_TRACE_T_H | ||
#define _HAPROXY_QUIC_TRACE_T_H | ||
|
||
#include <inttypes.h> | ||
#include <stdlib.h> | ||
|
||
#include <haproxy/quic_tls-t.h> | ||
|
||
/* Used only for QUIC TLS key phase traces */ | ||
struct quic_kp_trace { | ||
const unsigned char *rx_sec; | ||
size_t rx_seclen; | ||
const struct quic_tls_kp *rx; | ||
const unsigned char *tx_sec; | ||
size_t tx_seclen; | ||
const struct quic_tls_kp *tx; | ||
}; | ||
|
||
/* Only for debug purpose */ | ||
struct enc_debug_info { | ||
unsigned char *payload; | ||
size_t payload_len; | ||
unsigned char *aad; | ||
size_t aad_len; | ||
uint64_t pn; | ||
}; | ||
|
||
#endif /* _HAPROXY_QUIC_TRACE_T_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* include/haproxy/quic_trace.h | ||
* This file contains QUIC traces definitions. | ||
* | ||
* Copyright (C) 2023 | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation, version 2.1 | ||
* exclusively. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, write to the Free Software | ||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
*/ | ||
#ifndef _HAPROXY_QUIC_TRACE_H | ||
#define _HAPROXY_QUIC_TRACE_H | ||
|
||
#include <haproxy/quic_trace-t.h> | ||
|
||
/* Initializes a enc_debug_info struct (only for debug purpose) */ | ||
static inline void enc_debug_info_init(struct enc_debug_info *edi, | ||
unsigned char *payload, size_t payload_len, | ||
unsigned char *aad, size_t aad_len, uint64_t pn) | ||
{ | ||
edi->payload = payload; | ||
edi->payload_len = payload_len; | ||
edi->aad = aad; | ||
edi->aad_len = aad_len; | ||
edi->pn = pn; | ||
} | ||
|
||
#endif /* _HAPROXY_QUIC_TRACE_H */ |
Oops, something went wrong.