4 * Copyright (C) 2000 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
8 #pragma ident "@(#)Id: mlso_rule.c,v 2.4 2002/08/10 14:00:15 darrenr Exp"
10 #include <sys/systm.h>
11 #include <sys/types.h>
12 #include <sys/param.h>
13 #include <sys/errno.h>
16 #include <sys/modctl.h>
20 #include <sys/cmn_err.h>
23 #include <sys/dditypes.h>
24 #include <sys/stream.h>
26 #include <sys/autoconf.h>
27 #include <sys/byteorder.h>
28 #include <sys/socket.h>
30 #include <sys/stropts.h>
31 #include <sys/sockio.h>
34 # include <net/if_types.h>
37 #include <net/route.h>
38 #include <netinet/in.h>
39 #include <netinet/in_systm.h>
40 #include <netinet/if_ether.h>
41 #include <netinet/ip.h>
42 #include <netinet/ip_var.h>
43 #include <netinet/tcp.h>
44 #include <netinet/udp.h>
45 #include <netinet/tcpip.h>
46 #include <netinet/ip_icmp.h>
48 #include <sys/sunddi.h>
49 #include "ip_compat.h"
53 char _depends_on
[] = "drv/ipf";
56 extern struct mod_ops mod_miscops
;
57 static struct modlmisc ipfrulemod
= {
62 static struct modlinkage modlink1
= {
73 ipfruleinst
= mod_install(&modlink1
);
75 cmn_err(CE_NOTE
, "IP Filter Rules: _init() = %d", ipfruleinst
);
78 if (ipfruleinst
== 0) {
79 if (fr_running
>= 0) {
80 ipfruleinst
= ipfrule_add();
85 "IP Filter Rules: ipfrule_add failed");
92 cmn_err(CE_CONT
, "IP Filter Rules: loaded\n");
101 ipfruleinst
= mod_remove(&modlink1
);
103 cmn_err(CE_NOTE
, "IP Filter Rules: _fini() = %d", ipfruleinst
);
105 if (ipfruleinst
== 0) {
106 ipfruleinst
= ipfrule_remove();
112 if (ipfruleinst
== 0)
113 cmn_err(CE_CONT
, "IP Filter Rules: unloaded\n");
119 struct modinfo
*modinfop
;
123 ipfruleinst
= mod_info(&modlink1
, modinfop
);
125 cmn_err(CE_NOTE
, "IP Filter Rules: _info(%x) = %x",
126 modinfop
, ipfruleinst
);