PERFORCE change 66292 for review

Sam Leffler sam at FreeBSD.org
Thu Dec 2 17:56:26 PST 2004


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

Change 66292 by sam at sam_ebb on 2004/12/03 01:55:58

	add a way to check if a cipher is loaded/available

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_crypto.c#4 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_crypto.h#4 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_crypto.c#4 (text+ko) ====

@@ -190,6 +190,12 @@
 	ciphers[cip->ic_cipher] = NULL;
 }
 
+int
+ieee80211_crypto_available(u_int cipher)
+{
+	return cipher < IEEE80211_CIPHER_MAX && ciphers[cipher] != NULL;
+}
+
 /* XXX well-known names! */
 static const char *cipher_modnames[] = {
 	"wlan_wep",	/* IEEE80211_CIPHER_WEP */

==== //depot/projects/wifi/sys/net80211/ieee80211_crypto.h#4 (text+ko) ====

@@ -166,6 +166,7 @@
 
 extern	void ieee80211_crypto_register(const struct ieee80211_cipher *);
 extern	void ieee80211_crypto_unregister(const struct ieee80211_cipher *);
+extern	int ieee80211_crypto_available(u_int cipher);
 
 extern	struct ieee80211_key *ieee80211_crypto_encap(struct ieee80211com *,
 		struct ieee80211_node *, struct mbuf *);


More information about the p4-projects mailing list