From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 03:09:42 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEB7216A4CE for ; Sat, 11 Sep 2004 03:09:42 +0000 (GMT) Received: from digital-security.org (digital-security.org [216.254.116.252]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E83C43D31 for ; Sat, 11 Sep 2004 03:09:42 +0000 (GMT) (envelope-from vxp@digital-security.org) Received: from digital-security.org ([216.254.116.252] helo=ownage.digital-security.org ident=vxp) by digital-security.org with esmtp (Exim 4.41 (FreeBSD)) id 1C5wmS-0000d4-3W for freebsd-hackers@freebsd.org; Fri, 10 Sep 2004 21:34:21 -0400 Date: Fri, 10 Sep 2004 21:34:19 -0400 (EDT) From: vxp To: freebsd-hackers@freebsd.org Message-ID: <20040910212926.V2370@digital-security.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Score: -3.4 (---) X-Spam-Report: Spam detection software, running on the system "ownage.digital-security.org", hasmessageblock similar future email. If you have any questions, see the administrator of that system for details.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 otheri try to do kldload ./icmp.ko it tells me: digital-security# kldload icmp.kld kldload: can't load icmp.kld: No such file or directory21:28 vxp vxp 7548 Sep 10 21:31 icmp.ko -rw-r--r-- 1 vxp vxp 5148 Sep 10 21:31 icmp.o digital-security# [...] Content analysis details: (-3.4 points, 3.0 required) pts rule name description --------------------------------------------------1% [score: 0.0000] 1.5 AWL AWL: Auto-whitelist adjustment Subject: help with a module, please.. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2004 03:09:42 -0000 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