1167756Ssam#- 2167756Ssam# Copyright (c) 2006, Sam Leffler 3167756Ssam# All rights reserved. 4167756Ssam# 5167756Ssam# Redistribution and use in source and binary forms, with or without 6167756Ssam# modification, are permitted provided that the following conditions 7167756Ssam# are met: 8167756Ssam# 1. Redistributions of source code must retain the above copyright 9167756Ssam# notice, this list of conditions and the following disclaimer. 10167756Ssam# 2. Redistributions in binary form must reproduce the above copyright 11167756Ssam# notice, this list of conditions and the following disclaimer in the 12167756Ssam# documentation and/or other materials provided with the distribution. 13167756Ssam# 14167756Ssam# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15167756Ssam# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16167756Ssam# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17167756Ssam# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18167756Ssam# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19167756Ssam# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20167756Ssam# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21167756Ssam# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22167756Ssam# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23167756Ssam# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24167756Ssam# SUCH DAMAGE. 25167756Ssam# 26167756Ssam# $FreeBSD$ 27167756Ssam# 28167756Ssam 29167756Ssam#include <sys/malloc.h> 30167756Ssam#include <opencrypto/cryptodev.h> 31167756Ssam 32167756SsamINTERFACE cryptodev; 33167756Ssam 34167756SsamMETHOD int newsession { 35167756Ssam device_t dev; 36167756Ssam uint32_t *sid; 37167756Ssam struct cryptoini *cri; 38167756Ssam}; 39167756Ssam 40167756SsamMETHOD int freesession { 41167756Ssam device_t dev; 42167756Ssam uint64_t sid; 43167756Ssam}; 44167756Ssam 45167756SsamMETHOD int process { 46167756Ssam device_t dev; 47167756Ssam struct cryptop *op; 48167756Ssam int flags; 49167756Ssam}; 50167756Ssam 51167756SsamMETHOD int kprocess { 52167756Ssam device_t dev; 53167756Ssam struct cryptkop *op; 54167756Ssam int flags; 55167756Ssam}; 56