From owner-svn-src-all@freebsd.org Sat Jul 11 04:20:57 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 94F97997804; Sat, 11 Jul 2015 04:20:57 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6AB2D9FC; Sat, 11 Jul 2015 04:20:57 +0000 (UTC) (envelope-from jmg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t6B4Kvnn018696; Sat, 11 Jul 2015 04:20:57 GMT (envelope-from jmg@FreeBSD.org) Received: (from jmg@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t6B4KvnP018695; Sat, 11 Jul 2015 04:20:57 GMT (envelope-from jmg@FreeBSD.org) Message-Id: <201507110420.t6B4KvnP018695@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmg set sender to jmg@FreeBSD.org using -f From: John-Mark Gurney Date: Sat, 11 Jul 2015 04:20:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r285381 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jul 2015 04:20:57 -0000 Author: jmg Date: Sat Jul 11 04:20:56 2015 New Revision: 285381 URL: https://svnweb.freebsd.org/changeset/base/285381 Log: some additional improvements to the documentation... Sponsored by: Netflix, Inc. Modified: head/share/man/man9/crypto.9 Modified: head/share/man/man9/crypto.9 ============================================================================== --- head/share/man/man9/crypto.9 Sat Jul 11 03:57:36 2015 (r285380) +++ head/share/man/man9/crypto.9 Sat Jul 11 04:20:56 2015 (r285381) @@ -17,7 +17,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 8, 2015 +.Dd July 10, 2015 .Dt CRYPTO 9 .Os .Sh NAME @@ -40,6 +40,8 @@ .Ft void .Fn crypto_kdone "struct cryptkop *" .Ft int +.Fn crypto_find_driver "const char *" +.Ft int .Fn crypto_newsession "uint64_t *" "struct cryptoini *" int .Ft int .Fn crypto_freesession uint64_t @@ -157,15 +159,28 @@ was a fatal error in verifying the argum For session initialization and teardown there is no callback mechanism used. .Pp The +.Fn crypto_find_driver +function may be called to return the specific id of the provided name. +If the specified driver could not be found, the returned id is -1. +.Pp +The .Fn crypto_newsession routine is called by consumers of cryptographic services (such as the .Xr ipsec 4 stack) that wish to establish a new session with the framework. -On success, the first argument will contain the Session Identifier (SID). The second argument contains all the necessary information for the driver to establish the session. -The third argument indicates whether a -hardware driver (1) should be used or not (0). +The third argument is either a specific driver id, or one or both +of +.Dv CRYPTOCAP_F_HARDWARE , +to select hardware devices, +or +.Dv CRYPTOCAP_F_SOFTWARE , +to select software devices. +If both are specified, a hardware device will be returned +before a software device will be. +On success, the value pointed to by the first argument will be the +Session IDentifier (SID). The various fields in the .Vt cryptoini structure are: