Changeset View
Changeset View
Standalone View
Standalone View
sys/sys/ktls.h
| Show All 22 Lines | |||||
| * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||||
| * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||||
| * SUCH DAMAGE. | * SUCH DAMAGE. | ||||
| */ | */ | ||||
| #ifndef _SYS_KTLS_H_ | #ifndef _SYS_KTLS_H_ | ||||
| #define _SYS_KTLS_H_ | #define _SYS_KTLS_H_ | ||||
| #ifdef _KERNEL | #ifdef _KERNEL | ||||
| #include <sys/mbuf.h> | |||||
| #include <sys/_null.h> | #include <sys/_null.h> | ||||
| #include <sys/refcount.h> | #include <sys/refcount.h> | ||||
| #include <sys/_task.h> | #include <sys/_task.h> | ||||
| #include <machine/param.h> | #include <machine/param.h> | ||||
| #endif | #endif | ||||
| struct tls_record_layer { | struct tls_record_layer { | ||||
| ▲ Show 20 Lines • Show All 239 Lines • ▼ Show 20 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); | ||||
| } | |||||
| static inline void | |||||
| ktls_release_snd_tag(struct ktls_session *tls) | |||||
| { | |||||
| struct m_snd_tag *mst; | |||||
| mst = tls->snd_tag; | |||||
| tls->snd_tag = NULL; | |||||
| if (mst != NULL) | |||||
| m_snd_tag_rele(mst); | |||||
| } | } | ||||
| void ktls_session_to_xktls_onedir(const struct ktls_session *ks, | void ktls_session_to_xktls_onedir(const struct ktls_session *ks, | ||||
| bool export_keys, struct xktls_session_onedir *xktls_od); | bool export_keys, struct xktls_session_onedir *xktls_od); | ||||
| void ktls_session_copy_keys(const struct ktls_session *ktls, | void ktls_session_copy_keys(const struct ktls_session *ktls, | ||||
| uint8_t *data, size_t *sz); | uint8_t *data, size_t *sz); | ||||
| #endif /* !_KERNEL */ | #endif /* !_KERNEL */ | ||||
| #endif /* !_SYS_KTLS_H_ */ | #endif /* !_SYS_KTLS_H_ */ | ||||