help with a module, please..
vxp
vxp at digital-security.org
Fri Sep 10 20:09:42 PDT 2004
hi
this is another one of my possibly lame questions..
so i wrote a module, it compiles with a few warnings (was too lazy to put
func prototypes, so it outputs warnings about that).
among other things, the compilation produces an icmp.ko (name of my mod)
but when i try to do kldload ./icmp.ko it tells me:
digital-security# kldload icmp.kld
kldload: can't load icmp.kld: No such file or directory
digital-security# ls -l icmp.*
-rw-r--r-- 1 vxp vxp 12702 Sep 10 21:28 icmp.c
-rw-r--r-- 1 vxp vxp 5276 Sep 10 21:31 icmp.kld
-rwxr-xr-x 1 vxp vxp 7548 Sep 10 21:31 icmp.ko
-rw-r--r-- 1 vxp vxp 5148 Sep 10 21:31 icmp.o
digital-security#
what gives? :)
may be i screwed up, somehow, in my load_handler?
static int
load_handler(module_t mod, int what, void *arg)
{
variable declarations here..
case MOD_LOAD:
blah blah blah
break;
case MOD_UNLOAD:
blah blah blah
break;
default:
err = EINVAL;
break;
}
return(err);
}
static moduledata_t icmp_mod = {
"RebootByICMP",
load_handler,
NULL
};
DECLARE_MODULE(icmp, icmp_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE);
any help appreciated :)
can post full src, if needed..
thanks,
Val
More information about the freebsd-hackers
mailing list