make rc4 crypto support a module so other modules can depend on it

Submitted by:	imp
Reviewed by:	imp
This commit is contained in:
Sam Leffler 2003-01-15 19:55:17 +00:00
parent 06e65af2b0
commit 50b25cd7d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=109318
2 changed files with 30 additions and 0 deletions

View File

@ -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);

8
sys/modules/rc4/Makefile Normal file
View File

@ -0,0 +1,8 @@
# $FreeBSD$
.PATH: ${.CURDIR}/../../crypto/rc4
KMOD= rc4
SRCS= rc4.c
.include <bsd.kmod.mk>