Date: Tue, 5 Dec 2006 04:40:57 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 111106 for review Message-ID: <200612050440.kB54evAJ049245@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111106 Change 111106 by sam@sam_ebb on 2006/12/05 04:40:06 add crypto_getcaps for obtaining a driver's capabilities/flags; this will be used to identify s/w drivers Affected files ... .. //depot/projects/crypto/sys/opencrypto/crypto.c#4 edit .. //depot/projects/crypto/sys/opencrypto/cryptodev.h#3 edit Differences ... ==== //depot/projects/crypto/sys/opencrypto/crypto.c#4 (text+ko) ==== @@ -600,6 +600,16 @@ } /* + * Return the device/driver capabilities. + */ +int +crypto_getcaps(int hid) +{ + struct cryptocap *cap = crypto_checkdriver(hid); + return cap != NULL ? cap->cc_flags : 0; +} + +/* * Register support for a key-related algorithm. This routine * is called once for each algorithm supported a driver. */ ==== //depot/projects/crypto/sys/opencrypto/cryptodev.h#3 (text+ko) ==== @@ -384,6 +384,7 @@ extern int32_t crypto_get_driverid(device_t dev, int flags); extern int crypto_find_driver(const char *); extern device_t crypto_find_device_byhid(int hid); +extern int crypto_getcaps(int hid); extern int crypto_register(u_int32_t driverid, int alg, u_int16_t maxoplen, u_int32_t flags); extern int crypto_kregister(u_int32_t, int, u_int32_t);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612050440.kB54evAJ049245>