Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/ktls.h
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Lines | struct ktls_session { | ||||
union { | union { | ||||
void *cipher; | void *cipher; | ||||
struct m_snd_tag *snd_tag; | struct m_snd_tag *snd_tag; | ||||
}; | }; | ||||
struct tls_session_params params; | struct tls_session_params params; | ||||
u_int wq_index; | u_int wq_index; | ||||
volatile u_int refcount; | volatile u_int refcount; | ||||
int mode; | int mode; | ||||
bool reset_pending; | |||||
struct task reset_tag_task; | struct task reset_tag_task; | ||||
struct task disable_ifnet_task; | |||||
struct inpcb *inp; | struct inpcb *inp; | ||||
bool reset_pending; | |||||
bool disable_ifnet_pending; | |||||
} __aligned(CACHE_LINE_SIZE); | } __aligned(CACHE_LINE_SIZE); | ||||
void ktls_check_rx(struct sockbuf *sb); | void ktls_check_rx(struct sockbuf *sb); | ||||
int ktls_enable_rx(struct socket *so, struct tls_enable *en); | int ktls_enable_rx(struct socket *so, struct tls_enable *en); | ||||
int ktls_enable_tx(struct socket *so, struct tls_enable *en); | int ktls_enable_tx(struct socket *so, struct tls_enable *en); | ||||
void ktls_destroy(struct ktls_session *tls); | void ktls_destroy(struct ktls_session *tls); | ||||
void ktls_frame(struct mbuf *m, struct ktls_session *tls, int *enqueue_cnt, | void ktls_frame(struct mbuf *m, struct ktls_session *tls, int *enqueue_cnt, | ||||
uint8_t record_type); | uint8_t record_type); | ||||
Show All 21 Lines | |||||
static inline void | static inline void | ||||
ktls_free(struct ktls_session *tls) | ktls_free(struct ktls_session *tls) | ||||
{ | { | ||||
if (refcount_release(&tls->refcount)) | if (refcount_release(&tls->refcount)) | ||||
ktls_destroy(tls); | ktls_destroy(tls); | ||||
} | } | ||||
#ifdef KERN_TLS | |||||
extern int ktls_ifnet_max_rexmit; | |||||
void ktls_disable_ifnet(void *arg); | |||||
#else | |||||
#define ktls_ifnet_max_rexmit 1 | |||||
inline void | |||||
ktls_disable_ifnet(void *arg __unused) | |||||
{ | |||||
} | |||||
#endif | |||||
#endif /* !_KERNEL */ | #endif /* !_KERNEL */ | ||||
#endif /* !_SYS_KTLS_H_ */ | #endif /* !_SYS_KTLS_H_ */ |