summaryrefslogtreecommitdiffstats
path: root/include/net/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tls.h')
-rw-r--r--include/net/tls.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/net/tls.h b/include/net/tls.h
index 584609174fe0..41b2d41bb1b8 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -107,9 +107,7 @@ struct tls_device {
107enum { 107enum {
108 TLS_BASE, 108 TLS_BASE,
109 TLS_SW, 109 TLS_SW,
110#ifdef CONFIG_TLS_DEVICE
111 TLS_HW, 110 TLS_HW,
112#endif
113 TLS_HW_RECORD, 111 TLS_HW_RECORD,
114 TLS_NUM_CONFIG, 112 TLS_NUM_CONFIG,
115}; 113};
@@ -162,6 +160,7 @@ struct tls_sw_context_tx {
162 int async_capable; 160 int async_capable;
163 161
164#define BIT_TX_SCHEDULED 0 162#define BIT_TX_SCHEDULED 0
163#define BIT_TX_CLOSING 1
165 unsigned long tx_bitmask; 164 unsigned long tx_bitmask;
166}; 165};
167 166
@@ -272,6 +271,8 @@ struct tls_context {
272 unsigned long flags; 271 unsigned long flags;
273 272
274 /* cache cold stuff */ 273 /* cache cold stuff */
274 struct proto *sk_proto;
275
275 void (*sk_destruct)(struct sock *sk); 276 void (*sk_destruct)(struct sock *sk);
276 void (*sk_proto_close)(struct sock *sk, long timeout); 277 void (*sk_proto_close)(struct sock *sk, long timeout);
277 278
@@ -355,13 +356,17 @@ int tls_sk_attach(struct sock *sk, int optname, char __user *optval,
355 unsigned int optlen); 356 unsigned int optlen);
356 357
357int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx); 358int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx);
359void tls_sw_strparser_arm(struct sock *sk, struct tls_context *ctx);
360void tls_sw_strparser_done(struct tls_context *tls_ctx);
358int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size); 361int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, size_t size);
359int tls_sw_sendpage(struct sock *sk, struct page *page, 362int tls_sw_sendpage(struct sock *sk, struct page *page,
360 int offset, size_t size, int flags); 363 int offset, size_t size, int flags);
361void tls_sw_close(struct sock *sk, long timeout); 364void tls_sw_cancel_work_tx(struct tls_context *tls_ctx);
362void tls_sw_free_resources_tx(struct sock *sk); 365void tls_sw_release_resources_tx(struct sock *sk);
366void tls_sw_free_ctx_tx(struct tls_context *tls_ctx);
363void tls_sw_free_resources_rx(struct sock *sk); 367void tls_sw_free_resources_rx(struct sock *sk);
364void tls_sw_release_resources_rx(struct sock *sk); 368void tls_sw_release_resources_rx(struct sock *sk);
369void tls_sw_free_ctx_rx(struct tls_context *tls_ctx);
365int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, 370int tls_sw_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
366 int nonblock, int flags, int *addr_len); 371 int nonblock, int flags, int *addr_len);
367bool tls_sw_stream_read(const struct sock *sk); 372bool tls_sw_stream_read(const struct sock *sk);