diff options
author | sam <sam@FreeBSD.org> | 2003-01-15 19:55:17 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2003-01-15 19:55:17 +0000 |
commit | 1f74260ee21c17a2a92b6e82137994d7e8403dbb (patch) | |
tree | 9683effb3d327cdca67b4aa6c9f4c0a2cfa0dfbb /sys/crypto/rc4/rc4.c | |
parent | 545a86200e280acc73fc5585f66f7e71675851b4 (diff) | |
download | FreeBSD-src-1f74260ee21c17a2a92b6e82137994d7e8403dbb.zip FreeBSD-src-1f74260ee21c17a2a92b6e82137994d7e8403dbb.tar.gz |
make rc4 crypto support a module so other modules can depend on it
Submitted by: imp
Reviewed by: imp
Diffstat (limited to 'sys/crypto/rc4/rc4.c')
-rw-r--r-- | sys/crypto/rc4/rc4.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sys/crypto/rc4/rc4.c b/sys/crypto/rc4/rc4.c index 5cea08a..ae8360a 100644 --- a/sys/crypto/rc4/rc4.c +++ b/sys/crypto/rc4/rc4.c @@ -37,6 +37,9 @@ * $FreeBSD$ */ +#include <sys/param.h> +#include <sys/kernel.h> +#include <sys/module.h> #include <sys/types.h> #include <crypto/rc4/rc4.h> @@ -102,3 +105,22 @@ rc4_crypt(struct rc4_state *const state, } } +static int +rc4_modevent(module_t mod, int type, void *unused) +{ + switch (type) { + case MOD_LOAD: + return 0; + case MOD_UNLOAD: + return 0; + } + return EINVAL; +} + +static moduledata_t rc4_mod = { + "rc4", + rc4_modevent, + 0 +}; +DECLARE_MODULE(rc4, rc4_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST); +MODULE_VERSION(rc4, 1); |