aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2013-07-19 05:41:57 +0000
committerCy Schubert <cy@FreeBSD.org>2013-07-19 05:41:57 +0000
commit850b82f47b140aa967bbebc32bf25b0efb1067b2 (patch)
tree8b721d864d3d4012cdeec53e571db7574ee038b8
parente8e48c1c7b41ecab29b107b5ee35cdea9fdc5c20 (diff)
downloadsrc-850b82f47b140aa967bbebc32bf25b0efb1067b2.tar.gz
src-850b82f47b140aa967bbebc32bf25b0efb1067b2.zip
As per the developers handbook (5.3.1 step 1), prepare the vendor trees for
import of new ipfilter vendor sources by flattening them. To keep the tags consistent with dist, the tags are also flattened. Approved by: glebius (Mentor)
Notes
Notes: svn path=/vendor-sys/ipfilter/dist/; revision=253467
-rw-r--r--netinet/IPFILTER.LICENCE (renamed from sys/contrib/ipfilter/netinet/IPFILTER.LICENCE)0
-rw-r--r--netinet/QNX_OCL.txt (renamed from sys/contrib/ipfilter/netinet/QNX_OCL.txt)0
-rw-r--r--netinet/fil.c (renamed from sys/contrib/ipfilter/netinet/fil.c)0
-rw-r--r--netinet/ip_auth.c (renamed from sys/contrib/ipfilter/netinet/ip_auth.c)0
-rw-r--r--netinet/ip_auth.h (renamed from sys/contrib/ipfilter/netinet/ip_auth.h)0
-rw-r--r--netinet/ip_compat.h (renamed from sys/contrib/ipfilter/netinet/ip_compat.h)0
-rw-r--r--netinet/ip_fil.c (renamed from sys/contrib/ipfilter/netinet/ip_fil.c)0
-rw-r--r--netinet/ip_fil.h (renamed from sys/contrib/ipfilter/netinet/ip_fil.h)0
-rw-r--r--netinet/ip_fil_freebsd.c (renamed from sys/contrib/ipfilter/netinet/ip_fil_freebsd.c)0
-rw-r--r--netinet/ip_frag.c (renamed from sys/contrib/ipfilter/netinet/ip_frag.c)0
-rw-r--r--netinet/ip_frag.h (renamed from sys/contrib/ipfilter/netinet/ip_frag.h)0
-rw-r--r--netinet/ip_ftp_pxy.c (renamed from sys/contrib/ipfilter/netinet/ip_ftp_pxy.c)0
-rw-r--r--netinet/ip_h323_pxy.c (renamed from sys/contrib/ipfilter/netinet/ip_h323_pxy.c)0
-rw-r--r--netinet/ip_htable.c (renamed from sys/contrib/ipfilter/netinet/ip_htable.c)0
-rw-r--r--netinet/ip_htable.h (renamed from sys/contrib/ipfilter/netinet/ip_htable.h)0
-rw-r--r--netinet/ip_ipsec_pxy.c (renamed from sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c)0
-rw-r--r--netinet/ip_irc_pxy.c (renamed from sys/contrib/ipfilter/netinet/ip_irc_pxy.c)0
-rw-r--r--netinet/ip_log.c (renamed from sys/contrib/ipfilter/netinet/ip_log.c)0
-rw-r--r--netinet/ip_lookup.c (renamed from sys/contrib/ipfilter/netinet/ip_lookup.c)0
-rw-r--r--netinet/ip_lookup.h (renamed from sys/contrib/ipfilter/netinet/ip_lookup.h)0
-rw-r--r--netinet/ip_nat.c (renamed from sys/contrib/ipfilter/netinet/ip_nat.c)0
-rw-r--r--netinet/ip_nat.h (renamed from sys/contrib/ipfilter/netinet/ip_nat.h)0
-rw-r--r--netinet/ip_netbios_pxy.c (renamed from sys/contrib/ipfilter/netinet/ip_netbios_pxy.c)0
-rw-r--r--netinet/ip_pool.c (renamed from sys/contrib/ipfilter/netinet/ip_pool.c)0
-rw-r--r--netinet/ip_pool.h (renamed from sys/contrib/ipfilter/netinet/ip_pool.h)0
-rw-r--r--netinet/ip_pptp_pxy.c (renamed from sys/contrib/ipfilter/netinet/ip_pptp_pxy.c)0
-rw-r--r--netinet/ip_proxy.c (renamed from sys/contrib/ipfilter/netinet/ip_proxy.c)0
-rw-r--r--netinet/ip_proxy.h (renamed from sys/contrib/ipfilter/netinet/ip_proxy.h)0
-rw-r--r--netinet/ip_raudio_pxy.c (renamed from sys/contrib/ipfilter/netinet/ip_raudio_pxy.c)0
-rw-r--r--netinet/ip_rcmd_pxy.c (renamed from sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c)0
-rw-r--r--netinet/ip_rpcb_pxy.c (renamed from sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c)0
-rw-r--r--netinet/ip_rules.c (renamed from sys/contrib/ipfilter/netinet/ip_rules.c)0
-rw-r--r--netinet/ip_rules.h (renamed from sys/contrib/ipfilter/netinet/ip_rules.h)0
-rw-r--r--netinet/ip_scan.c (renamed from sys/contrib/ipfilter/netinet/ip_scan.c)0
-rw-r--r--netinet/ip_scan.h (renamed from sys/contrib/ipfilter/netinet/ip_scan.h)0
-rw-r--r--netinet/ip_state.c (renamed from sys/contrib/ipfilter/netinet/ip_state.c)0
-rw-r--r--netinet/ip_state.h (renamed from sys/contrib/ipfilter/netinet/ip_state.h)0
-rw-r--r--netinet/ip_sync.c (renamed from sys/contrib/ipfilter/netinet/ip_sync.c)0
-rw-r--r--netinet/ip_sync.h (renamed from sys/contrib/ipfilter/netinet/ip_sync.h)0
-rw-r--r--netinet/ipl.h (renamed from sys/contrib/ipfilter/netinet/ipl.h)0
-rw-r--r--netinet/mlfk_ipl.c (renamed from sys/contrib/ipfilter/netinet/mlfk_ipl.c)0
-rw-r--r--netinet/y (renamed from sys/contrib/ipfilter/netinet/y)0
-rw-r--r--netinet/y.pub (renamed from sys/contrib/ipfilter/netinet/y.pub)0
-rw-r--r--sys/contrib/ipfilter/netinet/mlf_ipl.c385
-rw-r--r--sys/contrib/ipfilter/netinet/mln_ipl.c377
45 files changed, 0 insertions, 762 deletions
diff --git a/sys/contrib/ipfilter/netinet/IPFILTER.LICENCE b/netinet/IPFILTER.LICENCE
index 41c151ccdedb..41c151ccdedb 100644
--- a/sys/contrib/ipfilter/netinet/IPFILTER.LICENCE
+++ b/netinet/IPFILTER.LICENCE
diff --git a/sys/contrib/ipfilter/netinet/QNX_OCL.txt b/netinet/QNX_OCL.txt
index 6aa33eaf6b06..6aa33eaf6b06 100644
--- a/sys/contrib/ipfilter/netinet/QNX_OCL.txt
+++ b/netinet/QNX_OCL.txt
diff --git a/sys/contrib/ipfilter/netinet/fil.c b/netinet/fil.c
index 3183dd1fb852..3183dd1fb852 100644
--- a/sys/contrib/ipfilter/netinet/fil.c
+++ b/netinet/fil.c
diff --git a/sys/contrib/ipfilter/netinet/ip_auth.c b/netinet/ip_auth.c
index 11bd07bafa27..11bd07bafa27 100644
--- a/sys/contrib/ipfilter/netinet/ip_auth.c
+++ b/netinet/ip_auth.c
diff --git a/sys/contrib/ipfilter/netinet/ip_auth.h b/netinet/ip_auth.h
index 818497bca141..818497bca141 100644
--- a/sys/contrib/ipfilter/netinet/ip_auth.h
+++ b/netinet/ip_auth.h
diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/netinet/ip_compat.h
index 901d21b3ea09..901d21b3ea09 100644
--- a/sys/contrib/ipfilter/netinet/ip_compat.h
+++ b/netinet/ip_compat.h
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/netinet/ip_fil.c
index 00e8565ec246..00e8565ec246 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil.c
+++ b/netinet/ip_fil.c
diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/netinet/ip_fil.h
index 8236cef27f29..8236cef27f29 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil.h
+++ b/netinet/ip_fil.h
diff --git a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c b/netinet/ip_fil_freebsd.c
index fbecdad8e24f..fbecdad8e24f 100644
--- a/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
+++ b/netinet/ip_fil_freebsd.c
diff --git a/sys/contrib/ipfilter/netinet/ip_frag.c b/netinet/ip_frag.c
index fd738f247e3c..fd738f247e3c 100644
--- a/sys/contrib/ipfilter/netinet/ip_frag.c
+++ b/netinet/ip_frag.c
diff --git a/sys/contrib/ipfilter/netinet/ip_frag.h b/netinet/ip_frag.h
index d3e89005d259..d3e89005d259 100644
--- a/sys/contrib/ipfilter/netinet/ip_frag.h
+++ b/netinet/ip_frag.h
diff --git a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c b/netinet/ip_ftp_pxy.c
index c352027a410e..c352027a410e 100644
--- a/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c
+++ b/netinet/ip_ftp_pxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_h323_pxy.c b/netinet/ip_h323_pxy.c
index 7fc62276c597..7fc62276c597 100644
--- a/sys/contrib/ipfilter/netinet/ip_h323_pxy.c
+++ b/netinet/ip_h323_pxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_htable.c b/netinet/ip_htable.c
index 1bed371b4ac4..1bed371b4ac4 100644
--- a/sys/contrib/ipfilter/netinet/ip_htable.c
+++ b/netinet/ip_htable.c
diff --git a/sys/contrib/ipfilter/netinet/ip_htable.h b/netinet/ip_htable.h
index 2c0881230117..2c0881230117 100644
--- a/sys/contrib/ipfilter/netinet/ip_htable.h
+++ b/netinet/ip_htable.h
diff --git a/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c b/netinet/ip_ipsec_pxy.c
index e88a6b98b514..e88a6b98b514 100644
--- a/sys/contrib/ipfilter/netinet/ip_ipsec_pxy.c
+++ b/netinet/ip_ipsec_pxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c b/netinet/ip_irc_pxy.c
index 5bb252a25dac..5bb252a25dac 100644
--- a/sys/contrib/ipfilter/netinet/ip_irc_pxy.c
+++ b/netinet/ip_irc_pxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_log.c b/netinet/ip_log.c
index aed828eae435..aed828eae435 100644
--- a/sys/contrib/ipfilter/netinet/ip_log.c
+++ b/netinet/ip_log.c
diff --git a/sys/contrib/ipfilter/netinet/ip_lookup.c b/netinet/ip_lookup.c
index e33a6fe5cbe0..e33a6fe5cbe0 100644
--- a/sys/contrib/ipfilter/netinet/ip_lookup.c
+++ b/netinet/ip_lookup.c
diff --git a/sys/contrib/ipfilter/netinet/ip_lookup.h b/netinet/ip_lookup.h
index 3886df16303d..3886df16303d 100644
--- a/sys/contrib/ipfilter/netinet/ip_lookup.h
+++ b/netinet/ip_lookup.h
diff --git a/sys/contrib/ipfilter/netinet/ip_nat.c b/netinet/ip_nat.c
index 3df185038f0a..3df185038f0a 100644
--- a/sys/contrib/ipfilter/netinet/ip_nat.c
+++ b/netinet/ip_nat.c
diff --git a/sys/contrib/ipfilter/netinet/ip_nat.h b/netinet/ip_nat.h
index f25c0d8f86d8..f25c0d8f86d8 100644
--- a/sys/contrib/ipfilter/netinet/ip_nat.h
+++ b/netinet/ip_nat.h
diff --git a/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c b/netinet/ip_netbios_pxy.c
index 1a0b2a2e49ed..1a0b2a2e49ed 100644
--- a/sys/contrib/ipfilter/netinet/ip_netbios_pxy.c
+++ b/netinet/ip_netbios_pxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_pool.c b/netinet/ip_pool.c
index eab33108a567..eab33108a567 100644
--- a/sys/contrib/ipfilter/netinet/ip_pool.c
+++ b/netinet/ip_pool.c
diff --git a/sys/contrib/ipfilter/netinet/ip_pool.h b/netinet/ip_pool.h
index 9968ef012f5b..9968ef012f5b 100644
--- a/sys/contrib/ipfilter/netinet/ip_pool.h
+++ b/netinet/ip_pool.h
diff --git a/sys/contrib/ipfilter/netinet/ip_pptp_pxy.c b/netinet/ip_pptp_pxy.c
index 3924d4b829ed..3924d4b829ed 100644
--- a/sys/contrib/ipfilter/netinet/ip_pptp_pxy.c
+++ b/netinet/ip_pptp_pxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.c b/netinet/ip_proxy.c
index 04e9f89d5c9c..04e9f89d5c9c 100644
--- a/sys/contrib/ipfilter/netinet/ip_proxy.c
+++ b/netinet/ip_proxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_proxy.h b/netinet/ip_proxy.h
index e37002238674..e37002238674 100644
--- a/sys/contrib/ipfilter/netinet/ip_proxy.h
+++ b/netinet/ip_proxy.h
diff --git a/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c b/netinet/ip_raudio_pxy.c
index 76e8b9f8cbbc..76e8b9f8cbbc 100644
--- a/sys/contrib/ipfilter/netinet/ip_raudio_pxy.c
+++ b/netinet/ip_raudio_pxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c b/netinet/ip_rcmd_pxy.c
index 0af3f9b00ed1..0af3f9b00ed1 100644
--- a/sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c
+++ b/netinet/ip_rcmd_pxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c b/netinet/ip_rpcb_pxy.c
index da76fde4d155..da76fde4d155 100644
--- a/sys/contrib/ipfilter/netinet/ip_rpcb_pxy.c
+++ b/netinet/ip_rpcb_pxy.c
diff --git a/sys/contrib/ipfilter/netinet/ip_rules.c b/netinet/ip_rules.c
index f080ec5b8324..f080ec5b8324 100644
--- a/sys/contrib/ipfilter/netinet/ip_rules.c
+++ b/netinet/ip_rules.c
diff --git a/sys/contrib/ipfilter/netinet/ip_rules.h b/netinet/ip_rules.h
index 37e364613d50..37e364613d50 100644
--- a/sys/contrib/ipfilter/netinet/ip_rules.h
+++ b/netinet/ip_rules.h
diff --git a/sys/contrib/ipfilter/netinet/ip_scan.c b/netinet/ip_scan.c
index 54acb2aa4297..54acb2aa4297 100644
--- a/sys/contrib/ipfilter/netinet/ip_scan.c
+++ b/netinet/ip_scan.c
diff --git a/sys/contrib/ipfilter/netinet/ip_scan.h b/netinet/ip_scan.h
index 4772d28c012b..4772d28c012b 100644
--- a/sys/contrib/ipfilter/netinet/ip_scan.h
+++ b/netinet/ip_scan.h
diff --git a/sys/contrib/ipfilter/netinet/ip_state.c b/netinet/ip_state.c
index a63f9245b1c8..a63f9245b1c8 100644
--- a/sys/contrib/ipfilter/netinet/ip_state.c
+++ b/netinet/ip_state.c
diff --git a/sys/contrib/ipfilter/netinet/ip_state.h b/netinet/ip_state.h
index 71dae1d0abe9..71dae1d0abe9 100644
--- a/sys/contrib/ipfilter/netinet/ip_state.h
+++ b/netinet/ip_state.h
diff --git a/sys/contrib/ipfilter/netinet/ip_sync.c b/netinet/ip_sync.c
index b145539336cd..b145539336cd 100644
--- a/sys/contrib/ipfilter/netinet/ip_sync.c
+++ b/netinet/ip_sync.c
diff --git a/sys/contrib/ipfilter/netinet/ip_sync.h b/netinet/ip_sync.h
index 8104db3f2c3d..8104db3f2c3d 100644
--- a/sys/contrib/ipfilter/netinet/ip_sync.h
+++ b/netinet/ip_sync.h
diff --git a/sys/contrib/ipfilter/netinet/ipl.h b/netinet/ipl.h
index 614250acf3d0..614250acf3d0 100644
--- a/sys/contrib/ipfilter/netinet/ipl.h
+++ b/netinet/ipl.h
diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/netinet/mlfk_ipl.c
index 7718bd97cd50..7718bd97cd50 100644
--- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c
+++ b/netinet/mlfk_ipl.c
diff --git a/sys/contrib/ipfilter/netinet/y b/netinet/y
index d9aa6718e895..d9aa6718e895 100644
--- a/sys/contrib/ipfilter/netinet/y
+++ b/netinet/y
diff --git a/sys/contrib/ipfilter/netinet/y.pub b/netinet/y.pub
index a225f3922a01..a225f3922a01 100644
--- a/sys/contrib/ipfilter/netinet/y.pub
+++ b/netinet/y.pub
diff --git a/sys/contrib/ipfilter/netinet/mlf_ipl.c b/sys/contrib/ipfilter/netinet/mlf_ipl.c
deleted file mode 100644
index 3cda6c19e749..000000000000
--- a/sys/contrib/ipfilter/netinet/mlf_ipl.c
+++ /dev/null
@@ -1,385 +0,0 @@
-/*
- * Copyright (C) 1993-1997 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- */
-/*
- * 29/12/94 Added code from Marc Huber <huber@fzi.de> to allow it to allocate
- * its own major char number! Way cool patch!
- */
-
-
-#include <sys/param.h>
-
-#if defined(__FreeBSD__) && (__FreeBSD__ > 1)
-# ifdef IPFILTER_LKM
-# include <osreldate.h>
-# define ACTUALLY_LKM_NOT_KERNEL
-# else
-# include <sys/osreldate.h>
-# endif
-#endif
-#include <sys/systm.h>
-#if defined(__FreeBSD_version) && (__FreeBSD_version >= 220000)
-# include <sys/conf.h>
-# include <sys/kernel.h>
-# ifdef DEVFS
-# include <sys/devfsext.h>
-# if defined(IPFILTER) && defined(_KERNEL)
-# include "opt_devfs.h"
-# endif
-# endif /*DEVFS*/
-#endif
-#include <sys/conf.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/proc.h>
-#include <sys/uio.h>
-#include <sys/kernel.h>
-#include <sys/vnode.h>
-#include <sys/namei.h>
-#include <sys/malloc.h>
-#include <sys/mount.h>
-#include <sys/exec.h>
-#include <sys/mbuf.h>
-#if BSD >= 199506
-# include <sys/sysctl.h>
-#endif
-#if (__FreeBSD_version >= 199511)
-#include <net/if.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <net/route.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcpip.h>
-#endif
-#if (__FreeBSD__ > 1)
-# include <sys/sysent.h>
-#endif
-#include <sys/lkm.h>
-#include "netinet/ipl.h"
-#include "netinet/ip_compat.h"
-#include "netinet/ip_fil.h"
-#include "netinet/ip_state.h"
-#include "netinet/ip_nat.h"
-#include "netinet/ip_auth.h"
-#include "netinet/ip_frag.h"
-
-
-#if !defined(VOP_LEASE) && defined(LEASE_CHECK)
-#define VOP_LEASE LEASE_CHECK
-#endif
-
-#ifndef MIN
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-
-extern int lkmenodev __P((void));
-
-static char *ipf_devfiles[] = { IPL_NAME, IPL_NAT, IPL_STATE, IPL_AUTH,
- NULL };
-static int if_ipl_unload __P((struct lkm_table *, int));
-static int if_ipl_load __P((struct lkm_table *, int));
-static int if_ipl_remove __P((void));
-int xxxinit __P((struct lkm_table *, int, int));
-
-
-struct cdevsw ipldevsw =
-{
- iplopen, /* open */
- iplclose, /* close */
- iplread, /* read */
- (void *)nullop, /* write */
- iplioctl, /* ioctl */
- (void *)nullop, /* stop */
- (void *)nullop, /* reset */
- (void *)NULL, /* tty */
- (void *)nullop, /* select */
- (void *)nullop, /* mmap */
- NULL /* strategy */
-};
-
-#ifdef SYSCTL_INT
-SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &fr_flags, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_pass, CTLFLAG_RW, &fr_pass, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &fr_active, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpidletimeout, CTLFLAG_RW,
- &fr_tcpidletimeout, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpclosewait, CTLFLAG_RW,
- &fr_tcpclosewait, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcplastack, CTLFLAG_RW,
- &fr_tcplastack, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcptimeout, CTLFLAG_RW,
- &fr_tcptimeout, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_tcpclosed, CTLFLAG_RW,
- &fr_tcpclosed, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_udptimeout, CTLFLAG_RW,
- &fr_udptimeout, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_icmptimeout, CTLFLAG_RW,
- &fr_icmptimeout, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_defnatage, CTLFLAG_RW,
- &fr_defnatage, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_ipfrttl, CTLFLAG_RW,
- &fr_ipfrttl, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, ipl_unreach, CTLFLAG_RW,
- &ipl_unreach, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, ipl_inited, CTLFLAG_RD,
- &ipl_inited, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_authsize, CTLFLAG_RD,
- &fr_authsize, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_authused, CTLFLAG_RD,
- &fr_authused, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_defaultauthage, CTLFLAG_RW,
- &fr_defaultauthage, 0, "");
-#endif
-
-#ifdef DEVFS
-void *ipf_devfs[IPL_LOGMAX + 1];
-#endif
-
-#if !defined(__FreeBSD_version) || (__FreeBSD_version < 220000)
-int ipl_major = 0;
-
-MOD_DEV(IPL_VERSION, LM_DT_CHAR, -1, &ipldevsw);
-
-extern struct cdevsw cdevsw[];
-extern int vd_unuseddev __P((void));
-extern int nchrdev;
-#else
-int ipl_major = CDEV_MAJOR;
-
-static struct cdevsw ipl_cdevsw = {
- iplopen, iplclose, iplread, nowrite, /* 79 */
- iplioctl, nostop, noreset, nodevtotty,
- noselect, nommap, nostrategy, "ipl",
- NULL, -1
-};
-#endif
-
-
-static int iplaction __P((struct lkm_table *, int));
-static void ipl_drvinit __P((void *));
-
-
-static int iplaction(lkmtp, cmd)
-struct lkm_table *lkmtp;
-int cmd;
-{
-#if !defined(__FreeBSD_version) || (__FreeBSD_version < 220000)
- int i = ipl_major;
- struct lkm_dev *args = lkmtp->private.lkm_dev;
-#endif
- int err = 0;
-
- switch (cmd)
- {
- case LKM_E_LOAD :
- if (lkmexists(lkmtp))
- return EEXIST;
-
-#if !defined(__FreeBSD_version) || (__FreeBSD_version < 220000)
- for (i = 0; i < nchrdev; i++)
- if (cdevsw[i].d_open == lkmenodev ||
- cdevsw[i].d_open == iplopen)
- break;
- if (i == nchrdev) {
- printf("IP Filter: No free cdevsw slots\n");
- return ENODEV;
- }
-
- ipl_major = i;
- args->lkm_offset = i; /* slot in cdevsw[] */
-#endif
- printf("IP Filter: loaded into slot %d\n", ipl_major);
- err = if_ipl_load(lkmtp, cmd);
- if (!err)
- ipl_drvinit((void *)NULL);
- return err;
- break;
- case LKM_E_UNLOAD :
- err = if_ipl_unload(lkmtp, cmd);
- if (!err) {
- printf("IP Filter: unloaded from slot %d\n",
- ipl_major);
-# ifdef DEVFS
- if (ipf_devfs[IPL_LOGIPF])
- devfs_remove_dev(ipf_devfs[IPL_LOGIPF]);
- if (ipf_devfs[IPL_LOGNAT])
- devfs_remove_dev(ipf_devfs[IPL_LOGNAT]);
- if (ipf_devfs[IPL_LOGSTATE])
- devfs_remove_dev(ipf_devfs[IPL_LOGSTATE]);
- if (ipf_devfs[IPL_LOGAUTH])
- devfs_remove_dev(ipf_devfs[IPL_LOGAUTH]);
-# endif
- }
- return err;
- case LKM_E_STAT :
- break;
- default:
- err = EIO;
- break;
- }
- return 0;
-}
-
-
-static int if_ipl_remove __P((void))
-{
- char *name;
- struct nameidata nd;
- int error, i;
-
- for (i = 0; (name = ipf_devfiles[i]); i++) {
- NDINIT(&nd, DELETE, LOCKPARENT, UIO_SYSSPACE, name, curproc);
- if ((error = namei(&nd)))
- return (error);
- VOP_LEASE(nd.ni_vp, curproc, curproc->p_ucred, LEASE_WRITE);
- VOP_LOCK(nd.ni_vp);
- VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE);
- (void) VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
- }
-
- return 0;
-}
-
-
-static int if_ipl_unload(lkmtp, cmd)
-struct lkm_table *lkmtp;
-int cmd;
-{
- int error = 0;
-
- error = ipldetach();
- if (!error)
- error = if_ipl_remove();
- return error;
-}
-
-
-static int if_ipl_load(lkmtp, cmd)
-struct lkm_table *lkmtp;
-int cmd;
-{
- struct nameidata nd;
- struct vattr vattr;
- int error = 0, fmode = S_IFCHR|0600, i;
- char *name;
-
- error = iplattach();
- if (error)
- return error;
- (void) if_ipl_remove();
-
- for (i = 0; (name = ipf_devfiles[i]); i++) {
- NDINIT(&nd, CREATE, LOCKPARENT, UIO_SYSSPACE, name, curproc);
- if ((error = namei(&nd)))
- return error;
- if (nd.ni_vp != NULL) {
- VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
- if (nd.ni_dvp == nd.ni_vp)
- vrele(nd.ni_dvp);
- else
- vput(nd.ni_dvp);
- vrele(nd.ni_vp);
- return (EEXIST);
- }
- VATTR_NULL(&vattr);
- vattr.va_type = VCHR;
- vattr.va_mode = (fmode & 07777);
- vattr.va_rdev = (ipl_major << 8) | i;
- VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE);
- error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
- if (error)
- return error;
- }
- return 0;
-}
-
-
-#if defined(__FreeBSD_version) && (__FreeBSD_version < 220000)
-/*
- * strlen isn't present in 2.1.* kernels.
- */
-size_t strlen(string)
-char *string;
-{
- register char *s;
-
- for (s = string; *s; s++)
- ;
- return (size_t)(s - string);
-}
-
-
-int xxxinit(lkmtp, cmd, ver)
-struct lkm_table *lkmtp;
-int cmd, ver;
-{
- DISPATCH(lkmtp, cmd, ver, iplaction, iplaction, iplaction);
-}
-#else
-# ifdef IPFILTER_LKM
-# include <sys/exec.h>
-
-MOD_DECL(if_ipl);
-
-
-static struct lkm_dev _module = {
- LM_DEV,
- LKM_VERSION,
- IPL_VERSION,
- CDEV_MAJOR,
- LM_DT_CHAR,
- { (void *)&ipl_cdevsw }
-};
-
-
-int if_ipl __P((struct lkm_table *, int, int));
-
-
-int if_ipl(lkmtp, cmd, ver)
-struct lkm_table *lkmtp;
-int cmd, ver;
-{
- DISPATCH(lkmtp, cmd, ver, iplaction, iplaction, iplaction);
-}
-# endif
-static ipl_devsw_installed = 0;
-
-static void ipl_drvinit __P((void *unused))
-{
- dev_t dev;
-# ifdef DEVFS
- void **tp = ipf_devfs;
-# endif
-
- if (!ipl_devsw_installed ) {
- dev = makedev(CDEV_MAJOR, 0);
- cdevsw_add(&dev, &ipl_cdevsw, NULL);
- ipl_devsw_installed = 1;
-
-# ifdef DEVFS
- tp[IPL_LOGIPF] = devfs_add_devswf(&ipl_cdevsw, IPL_LOGIPF,
- DV_CHR, 0, 0, 0600, "ipf");
- tp[IPL_LOGNAT] = devfs_add_devswf(&ipl_cdevsw, IPL_LOGNAT,
- DV_CHR, 0, 0, 0600, "ipnat");
- tp[IPL_LOGSTATE] = devfs_add_devswf(&ipl_cdevsw, IPL_LOGSTATE,
- DV_CHR, 0, 0, 0600,
- "ipstate");
- tp[IPL_LOGAUTH] = devfs_add_devswf(&ipl_cdevsw, IPL_LOGAUTH,
- DV_CHR, 0, 0, 0600,
- "ipauth");
-# endif
- }
-}
-
-# if defined(IPFILTER_LKM) || \
- defined(__FreeBSD_version) && (__FreeBSD_version >= 220000)
-SYSINIT(ipldev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,ipl_drvinit,NULL)
-# endif /* IPFILTER_LKM */
-#endif /* _FreeBSD_version */
diff --git a/sys/contrib/ipfilter/netinet/mln_ipl.c b/sys/contrib/ipfilter/netinet/mln_ipl.c
deleted file mode 100644
index fe035da0cbb7..000000000000
--- a/sys/contrib/ipfilter/netinet/mln_ipl.c
+++ /dev/null
@@ -1,377 +0,0 @@
-/*
- * (C)opyright 1993,1994,1995 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- */
-/*
- * 29/12/94 Added code from Marc Huber <huber@fzi.de> to allow it to allocate
- * its own major char number! Way cool patch!
- */
-
-
-#include <sys/param.h>
-
-#if defined(__FreeBSD__) && (__FreeBSD__ > 1)
-# ifdef IPFILTER_LKM
-# include <osreldate.h>
-# define ACTUALLY_LKM_NOT_KERNEL
-# else
-# include <sys/osreldate.h>
-# endif
-#endif
-#include <sys/systm.h>
-#if defined(__FreeBSD_version) && (__FreeBSD_version >= 220000)
-# include <sys/conf.h>
-# include <sys/kernel.h>
-# ifdef DEVFS
-# include <sys/devfsext.h>
-# endif /*DEVFS*/
-#endif
-#include <sys/conf.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <sys/proc.h>
-#include <sys/uio.h>
-#include <sys/kernel.h>
-#include <sys/vnode.h>
-#include <sys/namei.h>
-#include <sys/malloc.h>
-#include <sys/mount.h>
-#include <sys/exec.h>
-#include <sys/mbuf.h>
-#if BSD >= 199506
-# include <sys/sysctl.h>
-#endif
-#if (__FreeBSD_version >= 199511)
-#include <net/if.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <net/route.h>
-#include <netinet/ip_var.h>
-#include <netinet/tcp.h>
-#include <netinet/tcpip.h>
-#endif
-#if (__FreeBSD__ > 1)
-# include <sys/sysent.h>
-#endif
-#include <sys/lkm.h>
-#include "netinet/ipl.h"
-#include "netinet/ip_compat.h"
-#include "netinet/ip_fil.h"
-
-#ifndef IPL_NAME
-#define IPL_NAME "/dev/ipl"
-#endif
-#define IPL_NAT "/dev/ipnat"
-#define IPL_STATE "/dev/ipstate"
-
-#if !defined(VOP_LEASE) && defined(LEASE_CHECK)
-#define VOP_LEASE LEASE_CHECK
-#endif
-
-#ifndef MIN
-#define MIN(a,b) (((a)<(b))?(a):(b))
-#endif
-
-extern int lkmenodev __P((void));
-
-
-static int ipl_unload __P((void));
-static int ipl_load __P((void));
-static int ipl_remove __P((void));
-int xxxinit __P((struct lkm_table *, int, int));
-
-
-struct cdevsw ipldevsw =
-{
- iplopen, /* open */
- iplclose, /* close */
- iplread, /* read */
- (void *)nullop, /* write */
- iplioctl, /* ioctl */
- (void *)nullop, /* stop */
- (void *)nullop, /* reset */
- (void *)NULL, /* tty */
- (void *)nullop, /* select */
- (void *)nullop, /* mmap */
- NULL /* strategy */
-};
-
-#ifdef SYSCTL_INT
-SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &fr_flags, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_pass, CTLFLAG_RW, &fr_pass, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_active, CTLFLAG_RD, &fr_active, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, ipl_unreach, CTLFLAG_RW,
- &ipl_unreach, 0, "");
-SYSCTL_INT(_net_inet_ipf, OID_AUTO, ipl_inited, CTLFLAG_RD,
- &ipl_inited, 0, "");
-#endif
-
-#if !defined(__FreeBSD_version) || (__FreeBSD_version < 220000)
-int ipl_major = 0;
-
-MOD_DEV(IPL_VERSION, LM_DT_CHAR, -1, &ipldevsw);
-
-extern struct cdevsw cdevsw[];
-extern int vd_unuseddev __P((void));
-extern int nchrdev;
-#else
-int ipl_major = CDEV_MAJOR;
-
-static struct cdevsw ipl_cdevsw = {
- iplopen, iplclose, iplread, nowrite, /* 79 */
- iplioctl, nostop, noreset, nodevtotty,
- noselect, nommap, nostrategy, "ipl",
- NULL, -1
-};
-#endif
-
-
-static int iplaction __P((struct lkm_table *, int));
-
-
-static int iplaction(lkmtp, cmd)
-struct lkm_table *lkmtp;
-int cmd;
-{
- int i = ipl_major;
- struct lkm_dev *args = lkmtp->private.lkm_dev;
- int err = 0;
-
- switch (cmd)
- {
- case LKM_E_LOAD :
- if (lkmexists(lkmtp))
- return EEXIST;
-
-#if !defined(__FreeBSD_version) || (__FreeBSD_version < 220000)
- for (i = 0; i < nchrdev; i++)
- if (cdevsw[i].d_open == lkmenodev ||
- cdevsw[i].d_open == iplopen)
- break;
- if (i == nchrdev) {
- printf("IP Filter: No free cdevsw slots\n");
- return ENODEV;
- }
-
- ipl_major = i;
- args->lkm_offset = i; /* slot in cdevsw[] */
-#endif
- printf("IP Filter: loaded into slot %d\n", ipl_major);
- return ipl_load();
- break;
- case LKM_E_UNLOAD :
- printf("IP Filter: unloaded from slot %d\n", ipl_major);
- return ipl_unload();
- case LKM_E_STAT :
- break;
- default:
- err = EIO;
- break;
- }
- return 0;
-}
-
-
-static int ipl_remove __P((void))
-{
- struct nameidata nd;
- int error;
-
- NDINIT(&nd, DELETE, LOCKPARENT, UIO_SYSSPACE, IPL_NAME, curproc);
- if ((error = namei(&nd)))
- return (error);
- VOP_LEASE(nd.ni_vp, curproc, curproc->p_ucred, LEASE_WRITE);
- VOP_LOCK(nd.ni_vp);
- VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE);
- (void) VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
-
- NDINIT(&nd, DELETE, LOCKPARENT, UIO_SYSSPACE, IPL_NAT, curproc);
- if ((error = namei(&nd)))
- return (error);
- VOP_LEASE(nd.ni_vp, curproc, curproc->p_ucred, LEASE_WRITE);
- VOP_LOCK(nd.ni_vp);
- VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE);
- (void) VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
-
- NDINIT(&nd, DELETE, LOCKPARENT, UIO_SYSSPACE, IPL_STATE, curproc);
- if ((error = namei(&nd)))
- return (error);
- VOP_LEASE(nd.ni_vp, curproc, curproc->p_ucred, LEASE_WRITE);
- VOP_LOCK(nd.ni_vp);
- VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE);
- (void) VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
- return 0;
-}
-
-
-static int ipl_unload()
-{
- int error = 0;
-
- error = ipldetach();
- if (!error)
- error = ipl_remove();
- return error;
-}
-
-
-static int ipl_load()
-{
- struct nameidata nd;
- struct vattr vattr;
- int error = 0, fmode = S_IFCHR|0600;
-
- error = iplattach();
- if (error)
- return error;
- (void) ipl_remove();
-
- NDINIT(&nd, CREATE, LOCKPARENT, UIO_SYSSPACE, IPL_NAME, curproc);
- if (error = namei(&nd))
- return error;
- if (nd.ni_vp != NULL) {
- VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
- if (nd.ni_dvp == nd.ni_vp)
- vrele(nd.ni_dvp);
- else
- vput(nd.ni_dvp);
- vrele(nd.ni_vp);
- return (EEXIST);
- }
- VATTR_NULL(&vattr);
- vattr.va_type = VCHR;
- vattr.va_mode = (fmode & 07777);
- vattr.va_rdev = ipl_major<<8;
- VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE);
- error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
- if (error)
- return error;
-
- NDINIT(&nd, CREATE, LOCKPARENT, UIO_SYSSPACE, IPL_NAT, curproc);
- if (error = namei(&nd))
- return error;
- if (nd.ni_vp != NULL) {
- VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
- if (nd.ni_dvp == nd.ni_vp)
- vrele(nd.ni_dvp);
- else
- vput(nd.ni_dvp);
- vrele(nd.ni_vp);
- return (EEXIST);
- }
- VATTR_NULL(&vattr);
- vattr.va_type = VCHR;
- vattr.va_mode = (fmode & 07777);
- vattr.va_rdev = (ipl_major<<8)|1;
- VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE);
- error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
- if (error)
- return error;
-
- NDINIT(&nd, CREATE, LOCKPARENT, UIO_SYSSPACE, IPL_STATE, curproc);
- if (error = namei(&nd))
- return error;
- if (nd.ni_vp != NULL) {
- VOP_ABORTOP(nd.ni_dvp, &nd.ni_cnd);
- if (nd.ni_dvp == nd.ni_vp)
- vrele(nd.ni_dvp);
- else
- vput(nd.ni_dvp);
- vrele(nd.ni_vp);
- return (EEXIST);
- }
- VATTR_NULL(&vattr);
- vattr.va_type = VCHR;
- vattr.va_mode = (fmode & 07777);
- vattr.va_rdev = (ipl_major<<8)|2;
- VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE);
- error = VOP_MKNOD(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &vattr);
- if (error)
- return error;
- return 0;
-}
-
-
-#if defined(__FreeBSD_version) && (__FreeBSD_version < 220000)
-/*
- * strlen isn't present in 2.1.* kernels.
- */
-size_t strlen(string)
-char *string;
-{
- register char *s;
-
- for (s = string; *s; s++)
- ;
- return (size_t)(s - string);
-}
-
-
-int xxxinit(lkmtp, cmd, ver)
-struct lkm_table *lkmtp;
-int cmd, ver;
-{
- DISPATCH(lkmtp, cmd, ver, iplaction, iplaction, iplaction);
-}
-#else
-# ifdef IPFILTER_LKM
-# include <sys/exec.h>
-
-MOD_DECL(if_ipl);
-
-static struct lkm_dev _module = {
- LM_DEV,
- LKM_VERSION,
- IPL_VERSION,
- CDEV_MAJOR,
- LM_DT_CHAR,
- (void *)&ipl_cdevsw
-};
-
-int if_ipl(lkmtp, cmd, ver)
-struct lkm_table *lkmtp;
-int cmd, ver;
-{
- DISPATCH(lkmtp, cmd, ver, iplaction, iplaction, iplaction);
-}
-# else
-
-#ifdef DEVFS
-static void *ipf_devfs_token[3];
-#endif
-static ipl_devsw_installed = 0;
-
-static void ipl_drvinit __P((void *unused))
-{
- dev_t dev;
-#ifdef DEVFS
- void **tp = ipf_devfs_token;
-#endif
-
- if (!ipl_devsw_installed ) {
- dev = makedev(CDEV_MAJOR, 0);
- cdevsw_add(&dev, &ipl_cdevsw, NULL);
- ipl_devsw_installed = 1;
-
-#ifdef DEVFS
- tp[IPL_LOGIPF] = devfs_add_devswf(&ipl_cdevsw, IPL_LOGIPF,
- DV_CHR, 0, 0, 0600,
- "ipf", IPL_LOGIPF);
- tp[IPL_LOGNAT] = devfs_add_devswf(&ipl_cdevsw, IPL_LOGNAT,
- DV_CHR, 0, 0, 0600,
- "ipnat", IPL_LOGNAT);
- tp[IPL_LOGSTATE] = devfs_add_devswf(&ipl_cdevsw, IPL_LOGSTATE,
- DV_CHR, 0, 0, 0600,
- "ipstate", IPL_LOGSTATE);
-#endif
- }
-}
-
-SYSINIT(ipldev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,ipl_drvinit,NULL)
-# endif /* IPFILTER_LKM */
-#endif /* _FreeBSD_version */