From 0fc9e4e31d67122e255fb7e1618483ed6e9836f3 Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 24 Feb 1996 13:41:57 +0000 Subject: [PATCH] Make the ipfw LKM work again. This concludes this round of updates to ipfw, have at it! --- lkm/ipfw/Makefile | 6 +-- lkm/ipfw/ipfw_lkm.c | 91 --------------------------------------- sys/modules/ipfw/Makefile | 6 +-- 3 files changed, 6 insertions(+), 97 deletions(-) delete mode 100644 lkm/ipfw/ipfw_lkm.c diff --git a/lkm/ipfw/Makefile b/lkm/ipfw/Makefile index d60aa3369687..da140b96f492 100644 --- a/lkm/ipfw/Makefile +++ b/lkm/ipfw/Makefile @@ -1,10 +1,10 @@ -# $Id: Makefile,v 1.2 1995/01/12 13:57:51 ugen Exp $ +# $Id: Makefile,v 1.3 1995/05/30 06:06:07 rgrimes Exp $ .PATH: ${.CURDIR}/../../sys/netinet KMOD= ipfw_mod -SRCS= ipfw_lkm.c ip_fw.c +SRCS= ip_fw.c NOMAN= -CFLAGS+= -DIPFIREWALL -DIPACCT +CFLAGS+= -DIPFIREWALL # #If you want it verbose #CFLAGS+= -DIPFIREWALL_VERBOSE diff --git a/lkm/ipfw/ipfw_lkm.c b/lkm/ipfw/ipfw_lkm.c deleted file mode 100644 index fb042525ffcd..000000000000 --- a/lkm/ipfw/ipfw_lkm.c +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 1994 Ugen J.S.Antsilevich - * - * Redistribution and use in source forms, with and without modification, - * are permitted provided that this entire comment appears intact. - * - * Redistribution in binary form may occur without any restrictions. - * Obviously, it would be nice if you gave credit where credit is due - * but requiring it would be too onerous. - * - * This software is provided ``AS IS'' without any warranties of any kind. - */ - -/* - * LKM init functions and stuff. - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - - -#include -#include -#include -#include - -MOD_MISC(ipfw); - -static int -ipfw_load(struct lkm_table *lkmtp, int cmd) -{ -int s=splnet(); -#ifdef IPFIREWALL - if (ip_fw_chk_ptr!=NULL || ip_fw_ctl_ptr!=NULL) { - uprintf("IpFw/IpAcct already loaded.\n"); - return 1; - } -#endif -#ifdef IPACCT - if (ip_acct_cnt_ptr!=NULL || ip_acct_ctl_ptr!=NULL) { - uprintf("IpFw/IpAcct already loaded.\n"); - return 1; - } -#endif -#ifdef IPFIREWALL - ip_fw_chk_ptr=&ip_fw_chk; - ip_fw_ctl_ptr=&ip_fw_ctl; -#endif -#ifdef IPACCT - ip_acct_cnt_ptr=&ip_acct_cnt; - ip_acct_ctl_ptr=&ip_acct_ctl; -#endif - uprintf("IpFw/IpAcct 1994(c) Ugen J.S.Antsilevich\n"); - splx(s); - return 0; -} - -static int -ipfw_unload(struct lkm_table *lkmtp, int cmd) -{ -int s=splnet(); -#ifdef IPFIREWALL - ip_fw_ctl_ptr=NULL; - ip_fw_chk_ptr=NULL; -#endif -#ifdef IPACCT - ip_acct_ctl_ptr=NULL; - ip_acct_cnt_ptr=NULL; -#endif - uprintf("IpFw/IpAcct removed.\n"); - splx(s); - return 0; -} - -int -ipfw_mod(struct lkm_table *lkmtp, int cmd, int ver) -{ - DISPATCH(lkmtp, cmd, ver, ipfw_load, ipfw_unload, lkm_nullcmd); -} diff --git a/sys/modules/ipfw/Makefile b/sys/modules/ipfw/Makefile index d60aa3369687..da140b96f492 100644 --- a/sys/modules/ipfw/Makefile +++ b/sys/modules/ipfw/Makefile @@ -1,10 +1,10 @@ -# $Id: Makefile,v 1.2 1995/01/12 13:57:51 ugen Exp $ +# $Id: Makefile,v 1.3 1995/05/30 06:06:07 rgrimes Exp $ .PATH: ${.CURDIR}/../../sys/netinet KMOD= ipfw_mod -SRCS= ipfw_lkm.c ip_fw.c +SRCS= ip_fw.c NOMAN= -CFLAGS+= -DIPFIREWALL -DIPACCT +CFLAGS+= -DIPFIREWALL # #If you want it verbose #CFLAGS+= -DIPFIREWALL_VERBOSE