4 * Copyright (C) 1993-1998 by Darren Reed.
6 * See the IPFILTER.LICENCE file for details on licencing.
9 /* #pragma ident "@(#)solaris.c 1.12 6/5/96 (C) 1995 Darren Reed"*/
11 /*typedef unsigned int spustate_t;*/
14 #include <sys/types.h>
15 #include <sys/cmn_err.h>
16 #include <sys/kernel.h>
17 #include <sys/systm.h>
18 #include <sys/malloc.h>
20 #include <sys/callout.h>
21 #include <sys/moddefs.h>
24 #include <sys/param.h>
25 #include <sys/errno.h>
26 #include <sys/byteorder.h>
27 #include <sys/socket.h>
28 #include <sys/stropts.h>
31 #include <net/route.h>
32 #include <netinet/in.h>
33 #include <netinet/in_systm.h>
34 #include <netinet/if_ether.h>
35 #include <netinet/ip.h>
36 #include <netinet/ip_var.h>
37 #include <netinet/tcp.h>
38 #include <netinet/udp.h>
39 #include <netinet/tcpip.h>
40 #include <netinet/ip_icmp.h>
42 #include "ip_compat.h"
50 static drv_info_t ipf_drv_info
= {
51 "IP Filter Rules", /* type */
53 DRV_PSEUDO
|DRV_SAVE_CONF
|DRV_MP_SAFE
, /* flags */
57 NULL
, /* gio_private */
58 NULL
, /* cdio_private */
62 extern struct mod_operations gio_mod_ops
;
63 static drv_info_t ipf_drv_info
;
64 extern struct mod_conf_data ipf_conf_data
;
66 static struct mod_type_data ipf_drv_link
= {
67 IPL_VERSION
, (void *)NULL
70 static struct modlink ipf_mod_link
[] = {
71 { &gio_mod_ops
, (void *)&ipf_drv_link
},
72 { NULL
, (void *)NULL
}
75 struct modwrapper ipf_wrapper
= {
80 (void *)&ipf_conf_data
,
85 static int ipf_load(void *arg
)
93 printf("IP Filter Rules: ipfrule_add() = %d\n", i
);
96 cmn_err(CE_CONT
, "IP Filter Rules: Loaded\n");
101 static int ipf_unload(void *arg
)
105 i
= ipfrule_remove();
109 printf("IP Filter Rules: ipfrule_remove() = %d\n", i
);
112 cmn_err(CE_CONT
, "IP Filter Rules: Unloaded\n");