summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBoris Pismenny <borisp@mellanox.com>2019-04-13 17:20:35 +0300
committerMatt Caswell <matt@openssl.org>2019-05-07 14:24:16 +0100
commit7c3a7561b536264b282f604efc959edad18807d7 (patch)
tree7d66adca5bf7f54f8c944a58bef2abffec32102f /include
parent72fb59c72186c327e047cd29d8a66a4a323b9f3b (diff)
ssl: Add SSL_sendfile
This commit adds the SSL_sendfile call, which allows KTLS sockets to transmit file using zero-copy semantics. Signed-off-by: Boris Pismenny <borisp@mellanox.com> Reviewed-by: Paul Dale <paul.dale@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8727)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/err.h1
-rw-r--r--include/openssl/ssl.h2
-rw-r--r--include/openssl/sslerr.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/include/openssl/err.h b/include/openssl/err.h
index 8fcdfb4b7a..7398029bee 100644
--- a/include/openssl/err.h
+++ b/include/openssl/err.h
@@ -177,6 +177,7 @@ typedef struct err_state_st {
# define SYS_F_STAT 22
# define SYS_F_FCNTL 23
# define SYS_F_FSTAT 24
+# define SYS_F_SENDFILE 25
/* reasons */
# define ERR_R_SYS_LIB ERR_LIB_SYS/* 2 */
diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h
index f4b17f1beb..60712d069e 100644
--- a/include/openssl/ssl.h
+++ b/include/openssl/ssl.h
@@ -1848,6 +1848,8 @@ __owur int SSL_read_early_data(SSL *s, void *buf, size_t num,
size_t *readbytes);
__owur int SSL_peek(SSL *ssl, void *buf, int num);
__owur int SSL_peek_ex(SSL *ssl, void *buf, size_t num, size_t *readbytes);
+__owur ossl_ssize_t SSL_sendfile(SSL *s, int fd, off_t offset, size_t size,
+ int flags);
__owur int SSL_write(SSL *ssl, const void *buf, int num);
__owur int SSL_write_ex(SSL *s, const void *buf, size_t num, size_t *written);
__owur int SSL_write_early_data(SSL *s, const void *buf, size_t num,
diff --git a/include/openssl/sslerr.h b/include/openssl/sslerr.h
index 7f776f97f7..385fda37a4 100644
--- a/include/openssl/sslerr.h
+++ b/include/openssl/sslerr.h
@@ -217,6 +217,7 @@ int ERR_load_SSL_strings(void);
# define SSL_F_SSL_RENEGOTIATE_ABBREVIATED 546
# define SSL_F_SSL_SCAN_CLIENTHELLO_TLSEXT 320
# define SSL_F_SSL_SCAN_SERVERHELLO_TLSEXT 321
+# define SSL_F_SSL_SENDFILE 639
# define SSL_F_SSL_SESSION_DUP 348
# define SSL_F_SSL_SESSION_NEW 189
# define SSL_F_SSL_SESSION_PRINT_FP 190