PERFORCE change 111106 for review

Sam Leffler sam at FreeBSD.org
Mon Dec 4 20:40:58 PST 2006


http://perforce.freebsd.org/chv.cgi?CH=111106

Change 111106 by sam at 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);


More information about the p4-projects mailing list