From 619179cfcdb087acb0864d273c4fbd3b7396974c Mon Sep 17 00:00:00 2001 From: Simon Zhang Date: Mon, 13 Jan 2020 00:59:08 +0800 Subject: tls: refactor picotls ctx_read process to improve CPS Type: refactor Signed-off-by: Simon Zhang Change-Id: I2bb675b4df3c4151f4b0791efcfe05b1d0f87a33 Signed-off-by: Simon Zhang --- src/plugins/tlspicotls/tls_picotls.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plugins/tlspicotls/tls_picotls.h') diff --git a/src/plugins/tlspicotls/tls_picotls.h b/src/plugins/tlspicotls/tls_picotls.h index 835f4a6b071..b8e802eb551 100644 --- a/src/plugins/tlspicotls/tls_picotls.h +++ b/src/plugins/tlspicotls/tls_picotls.h @@ -7,6 +7,12 @@ #include #include +#define TLS_RX_LEN(x) ((x)->rx_content + (x)->rx_len) +#define TLS_RX_OFFSET(x) ((x)->rx_content + (x)->rx_offset) +#define TLS_RX_IS_LEFT(x) ((x)->rx_len != (x)->rx_offset) +#define TLS_RX_LEFT_LEN(x) ((x)->rx_len - (x)->rx_offset) + + typedef struct tls_ctx_picotls_ { tls_ctx_t ctx; -- cgit 1.2.3-korg