1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Import IP Filter 4.1.10

This commit is contained in:
Guido van Rooij 2005-12-30 11:34:54 +00:00
parent 984f8800d4
commit e246b3be6f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/ipfilter/dist/; revision=153877
315 changed files with 2051 additions and 1524 deletions

View File

@ -8,7 +8,8 @@ SBINDEST=/sbin
MANDIR=/usr/share/man
SEARCHDIRS!=echo $(BINDEST) $(SBINDEST) /bin /usr/bin /sbin /usr/sbin /usr/local/bin /usr/local/sbin | awk '{for(i=1;i<NF;i++){print $$i;}}' - | sort -u
CC=cc -Wall -Wuninitialized -Wstrict-prototypes -O
CC=gcc -Wall -Wuninitialized -Wstrict-prototypes -O
#UFLAGS=-fprofile-arcs -ftest-coverage
CFLAGS=-g -I$(TOP)
#
# For NetBSD/FreeBSD
@ -45,7 +46,7 @@ MODOBJS=ip_fil.o fil.o ml_ipl.o ip_nat.o ip_frag.o ip_state.o ip_proxy.o \
ip_scan.o ip_sync.o
# ip_trafcon.o
DFLAGS=$(IPFLKM) $(IPFLOG) $(LOOKUP) $(SYNC) $(DEF) $(DLKM) $(IPFBPF)
IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o
IPF=ipf.o ipfcomp.o ipf_y.o ipf_l.o bpf_filter_u.o
IPT=ipftest.o fil_u.o ip_frag_u.o ip_state_u.o ip_nat_u.o \
ip_proxy_u.o ip_auth_u.o ip_htable_u.o ip_lookup_u.o ip_pool_u.o \
ip_scan_u.o ip_sync_u.o ip_rules_u.o ip_fil_u.o ip_log_u.o \
@ -66,7 +67,8 @@ LIBSRC=$(TOP)/lib
RANLIB=ranlib
AROPTS=cq
HERE!=pwd
CCARGS=-I. $(DEBUG) $(CFLAGS)
CCARGS=-I. $(DEBUG) $(CFLAGS) $(UFLAGS)
KCARGS=-I. $(DEBUG) $(CFLAGS)
#
# Extra is option kernel things we always want in user space.
#
@ -77,6 +79,9 @@ include $(TOP)/lib/Makefile
build all: machine $(OBJ)/libipf.a ipf ipfs ipfstat ipftest ipmon ipnat \
ippool ipscan ipsyncm ipsyncs $(LKM) $(LKMR)
-sh -c 'for i in ipf ipftest ipmon ippool ipnat ipscan ipsyncm ipsyncs; do /bin/rm -f $(TOP)/$$i; ln -s `pwd`/$$i $(TOP); done'
-/bin/rm -f ../tools ./tools
-ln -s ../tools .
-ln -s ../tools ..
machine: Makefile.kmod
if [ -f Makefile.kmod ] ; then \
@ -135,7 +140,7 @@ fil_u.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/ip_compat.h \
fil.o: $(TOP)/fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ipl.h \
$(TOP)/ip_rules.h
$(CC) $(CCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) $(COMPIPF) \
$(CC) $(KCARGS) $(POLICY) $(DFLAGS) $(IPFBPF) $(COMPIPF) \
-c $(TOP)/fil.c -o $@
ipf.o: $(TOOL)/ipf.c $(TOP)/ip_fil.h $(TOP)/ipf.h $(TOP)/opts.h
@ -240,8 +245,8 @@ ipfrule.ko.5: ip_rulesx.o $(MLR)
ld -Bshareable -d -warn-common -o $(LKMR:S/.5$//) $(.TARGET:S/.ko/.kld/)
ipfrule.ko: ip_rulesx.o $(MLR)
gensetdefs ip_rulesx.o $(MLR)
$(CC) $(CCARGS) -c setdef0.c
$(CC) $(CCARGS) -c setdef1.c
$(CC) $(KCARGS) -c setdef0.c
$(CC) $(KCARGS) -c setdef1.c
ld -Bshareable -o $@ setdef0.o ip_rulesx.o $(MLR) setdef1.o
ipf.ko.5 ipl.ko.5: $(MODOBJS)
@ -250,59 +255,59 @@ ipf.ko.5 ipl.ko.5: $(MODOBJS)
ipf.ko ipl.ko: $(MODOBJS)
gensetdefs $(MODOBJS)
$(CC) $(CCARGS) -c setdef0.c
$(CC) $(CCARGS) -c setdef1.c
$(CC) $(KCARGS) -c setdef0.c
$(CC) $(KCARGS) -c setdef1.c
ld -Bshareable -o $@ setdef0.o $(MODOBJS) setdef1.o
ip_nat.o: $(TOP)/ip_nat.c $(TOP)/ip_nat.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_nat.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_nat.c -o $@
ip_frag.o: $(TOP)/ip_frag.c $(TOP)/ip_frag.h $(TOP)/ip_compat.h $(TOP)/ip_fil.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_frag.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_frag.c -o $@
ip_state.o: $(TOP)/ip_state.c $(TOP)/ip_state.h $(TOP)/ip_compat.h \
$(TOP)/ip_fil.h $(TOP)/ip_nat.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_state.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_state.c -o $@
ip_proxy.o: $(TOP)/ip_proxy.c $(TOP)/ip_proxy.h $(TOP)/ip_compat.h \
$(TOP)/ip_fil.h $(PROXYLIST) $(TOP)/ip_nat.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_proxy.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_proxy.c -o $@
ip_auth.o: $(TOP)/ip_auth.c $(TOP)/ip_auth.h $(TOP)/ip_compat.h \
$(TOP)/ip_fil.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_auth.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_auth.c -o $@
ip_fil.c:
/bin/rm -f ip_fil.c
ln -s $(TOP)/ip_fil_`uname -s|tr A-Z a-z`.c ip_fil.c
ip_fil.o: ip_fil.c $(TOP)/ip_fil.h $(TOP)/ip_compat.h $(TOP)/ip_nat.h
$(CC) $(CCARGS) $(DFLAGS) $(COMPIPF) -c ip_fil.c -o $@
$(CC) $(KCARGS) $(DFLAGS) $(COMPIPF) -c ip_fil.c -o $@
ip_log.o: $(TOP)/ip_log.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_log.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_log.c -o $@
ip_scan.o: $(TOP)/ip_scan.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(TOP)/ip_scan.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_scan.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_scan.c -o $@
ip_sync.o: $(TOP)/ip_sync.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h $(TOP)/ip_sync.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_sync.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_sync.c -o $@
ip_pool.o: $(TOP)/ip_pool.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
$(TOP)/ip_lookup.h $(TOP)/ip_pool.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_pool.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_pool.c -o $@
ip_htable.o: $(TOP)/ip_htable.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
$(TOP)/ip_lookup.h $(TOP)/ip_htable.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_htable.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_htable.c -o $@
ip_lookup.o: $(TOP)/ip_lookup.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
$(TOP)/ip_pool.h $(TOP)/ip_htable.h $(TOP)/ip_lookup.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_lookup.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_lookup.c -o $@
ip_trafcon.o: $(TOP)/ip_trafcon.c $(TOP)/ip_compat.h $(TOP)/ip_fil.h \
$(TOP)/ip_trafcon.h
$(CC) $(CCARGS) $(DFLAGS) -c $(TOP)/ip_trafcon.c -o $@
$(CC) $(KCARGS) $(DFLAGS) -c $(TOP)/ip_trafcon.c -o $@
vnode_if.h: $(VNODESHDIR)/vnode_if.src
mkdir -p ../sys
@ -449,6 +454,7 @@ clean:
${RM} -f ipnat_y.c ipnat_y.h ipnat_l.c ipnat_l.h
${RM} -f ipmon_y.c ipmon_y.h ipmon_l.c ipmon_l.h
${RM} -f ipsyncm ipsyncs ipfs ip_rules.c ip_rules.h
${RM} -f *.da *.gcov *.bb *.bbg tools
${MAKE} -f Makefile.ipsend ${MFLAGS} clean
if [ -f Makefile.kmod ] ; then \
@ -508,3 +514,10 @@ install:
fi \
done
(cd $(TOP)/man; make INSTALL=$(INSTALL) MANDIR=$(MANDIR) install; cd $(TOP))
coverage:
ksh -c 'for i in *.da; do j=$${i%%.da}.c; gcov $$j 2>&1 | egrep -v "y.tab.c|Could|Creating|_l\.c|\.h"; done' | sort -n > report
sort -n report | perl -e 'while(<>) { next if (/^0.00/); s/\%//g; @F=split;$$lc+=$$F[2];$$t += $$F[0]/100*$$F[2];} printf "%d of %d = %d%%\n", $$t, $$lc,$$t/$$lc*100;' >> report
clean-coverage:
/bin/rm -f *.gcov *.da

View File

@ -1,5 +1,5 @@
#
# Id: Makefile.ipsend,v 2.8 2002/05/22 16:15:36 darrenr Exp
# $Id: Makefile.ipsend,v 2.8 2002/05/22 16:15:36 darrenr Exp $
#
BINDEST=/usr/sbin

View File

@ -31,6 +31,14 @@ else
major=x
fi
if [ ! -f ip_rules.c -o ! -f ip_rules.h ] ; then
echo "Please do a build of ipfilter and then run the following"
echo "command to build extra files:"
echo
echo "make ip_rules.c"
exit 1
fi
echo -n "Installing "
for j in auth frag nat proxy scan state sync pool htable lookup rules; do
for i in ip_$j.[ch]; do

View File

@ -1,5 +1,3 @@
.\" $NetBSD$
.\"
*** ip6_input.c.orig Sun Feb 13 14:32:01 2000
--- ip6_input.c Wed Apr 26 22:31:34 2000
***************

View File

@ -1,5 +1,3 @@
.\" $NetBSD$
.\"
*** ip6_input.c.orig Sat Jul 15 07:14:34 2000
--- ip6_input.c Thu Oct 19 17:14:37 2000
***************

View File

@ -1,5 +1,3 @@
.\" $NetBSD$
.\"
*** ip6_input.c.orig Sat Jul 15 07:14:34 2000
--- ip6_input.c Thu Oct 19 17:14:37 2000
***************

View File

@ -10,6 +10,85 @@
# and especially those who have found the time to port IP Filter to new
# platforms.
#
4.1.10 - Released 6 December 2005
Expand regression testing to cover more features
Add "coverage" build target for BSD
Fix building 64bit sparc target for Solaris
Add IPv6 mobility header to list of accepted keywords for V6 headers
Resolve locking problems on Solaris when sending RST/icmp packets
#ifdef's for IPFILTER_BPF need to check if words are defined before
using them in comparisons
Add checking for SACK permitted option in TCP SYN packets
Fix loading anonymous pools from inline rule configuration groups
Add -C command line option to ipftest
Include extra "const" from NetBSD
Don't require SIOCKSTLCK for SIOCSTPUT
Fix some use of "sticky" on NAT rules
Fix statistical counting of deleting state for TCP connections
Fix compile problems caused by changes to is_opt/is_optmsk in ip_sync.c
Fix TCP out-of-window (OOW) problems:
- window scaling turned off if one chose for its scale factor
- Microsoft Windows TCP sends the "next packet" to the right of the window
when using SACK and filling in a hole
4.1.9 - Released 13 August 2005
make ipfilter fix IPv4 header checksums for outgoing packets if BRIDGE_IPF
is defined when compiled.
move the definition of SIOCPROXY from ip_nat.h to ip_proxy.h
make the BSD/upgrade script more instructive about the requiements for
ip_rules.[ch] when it is run
register for interface events on FreeBSD (>5.2.1) and NetBSD so that
"ipf -y" is not not requried to tell ipfilter about interface changes.
for "quick" rules that do "keep state", move the state adding into the rule
evaluation so that we can detect it failing as rules are evaluated and
continue on to the next rather than wait until we're done and it's too late
to recover for more rule processing.
mark ICMP packets advertising an MTU that's too small as being bad
rework ipv6 header parsing to get better code reuse and fix logic errors
in dealing with ipv6 packets containing fragment headers. Also, where a
protocol handler was doing both v4 & v6, make a seperate function for each.
build for both amd64 and i86pc (32bit) on Solaris10 and later, if possible
include start of work to get IPFilter working on AIX 5.3
Use FI_ICMPERR flag rather than try to compute its equivalent all the time
Rewrork IPv6 extension header parsing to get better code reuse
Add missing timeout on Linux
Fix for locking when reading from ipsync (Frank Volf)
Fix insertion/appending of rules that use a collection number
Somehow turning up the spl knob to splnet disappeared on platforms that still
use the spl interface.
fix problems with "ipf -T" not listing multiple variables properly
4.1.8 - Released 29 March 2005
include path from Phil Dibowitz for sorting ipfstat -t output by source or

View File

@ -1,5 +1,3 @@
.\" $NetBSD$
.\"
To build a kernel for use with the loadable kernel module, follow these
steps:

View File

@ -5,7 +5,7 @@
# provided that this notice is preserved and due credit is given
# to the original author and the contributors.
#
# Id: Makefile,v 2.76.2.13 2004/11/08 18:42:40 darrenr Exp
# $Id: Makefile,v 2.76.2.18 2005/12/04 23:41:22 darrenr Exp $
#
SHELL=/bin/sh
BINDEST=/usr/local/bin
@ -192,6 +192,15 @@ freebsd5: include
else \
echo "#define INET6" > opt_inet6.h; \
fi
if [ "x$(IPFBPF)" = "x" ] ; then \
echo "#undef NBPF" > opt_bpf.h; \
echo "#undef NBPFILTER" > opt_bpf.h; \
echo "#undef DEV_BPF" > opt_bpf.h; \
else \
echo "#define NBPF" > opt_bpf.h; \
echo "#define NBPFILTER" > opt_bpf.h; \
echo "#define DEV_BPF" > opt_bpf.h; \
fi
if [ x$(ENABLE_PFIL) = x ] ; then \
echo "#undef PFIL_HOOKS" > opt_pfil.h; \
else \
@ -237,6 +246,11 @@ osf tru64: null include
(cd OSF/`OSF/cpurev`; make build TRU64=`uname -v` TOP=../.. "DEBUG=-g" $(MFLAGS) "MACHASSERT=$(MACHASSERT)" "OSREV=`../cpurev`"; cd ..)
(cd OSF/`OSF/cpurev`; make -f Makefile.ipsend build TRU64=`uname -v` TOP=../.. $(MFLAGS) "OSREV=`../cpurev`"; cd ..)
aix: null include
make setup "TARGOS=AIX" "CPUDIR=`AIX/cpurev`"
(cd AIX/`AIX/cpurev`; make build AIX=`uname -v` TOP=../.. "DEBUG=-g" $(MFLAGS) "OSREV=`../cpurev`" BITS=`../bootbits.sh`; cd ..)
# (cd AIX/`AIX/cpurev`; make -f Makefile.ipsend build AIX=`uname -v` TOP=../.. $(MFLAGS) "OSREV=`../cpurev`"; cd ..)
bsd: include
make setup "TARGOS=BSD" "CPUDIR=$(CPUDIR)"
(cd BSD/$(CPUDIR); make build TOP=../.. $(MFLAGS) 'DLKM=-D_LKM' "ML=mln_ipl.c" "MLR=mln_rule.o"; cd ..)
@ -277,6 +291,7 @@ clean: clean-include
(cd HPUX; $(MAKE) BITS=32 TOP=.. clean)
(cd Linux; $(MAKE) TOP=.. clean)
(cd OSF; $(MAKE) TOP=.. clean)
(cd AIX; $(MAKE) TOP=.. clean)
if [ "`uname -s`" = "IRIX" ]; then (cd IRIX; $(MAKE) clean); fi
[ -d test ] && (cd test; $(MAKE) clean)
(cd ipsend; $(MAKE) clean)
@ -295,6 +310,9 @@ clean-hpux: clean-include
clean-osf: clean-include
(cd OSF; make clean)
clean-aix: clean-include
(cd AIX; make clean)
clean-linux: clean-include
(cd Linux; make clean)
@ -347,6 +365,10 @@ install-sunos4: solaris
install-sunos5: solaris null
(cd SunOS5; $(MAKE) CPU=$(CPU) TOP=.. install)
install-aix:
(cd AIX/`AIX/cpurev`; make install "TOP=../.." $(MFLAGS); cd ..)
# (cd AIX/`AIX/cpurev`; make -f Makefile.ipsend INSTALL=$(INSTALL) install "TOP=../.." $(MFLAGS); cd ..)
install-hpux: hpux
(cd HPUX/`HPUX/cpurev`; $(MAKE) CPU=$(CPU) TOP=../.. "BITS=`getconf KERNEL_BITS`" install)
@ -355,7 +377,6 @@ install-irix: irix
install-osf install-tru64:
(cd OSF/`OSF/cpurev`; make install "TOP=../.." $(MFLAGS); cd ..)
(cd OSF/`OSF/cpurev`; make -f Makefile.ipsend INSTALL=$(INSTALL) install "TOP=../.." $(MFLAGS); cd ..)
do-cvs:
find . -type d -name CVS -print | xargs /bin/rm -rf
@ -378,3 +399,4 @@ mdb:
-DIPFILTER_SCAN -DIPFILTER_LKM -DSOLARIS2=10 -n ipf_mdb -k \
-I/home/dr146992/pfil -I/home/dr146992/ipf -f \
/usr/include/netinet/in_systm.h,/usr/include/sys/ethernet.h,/usr/include/netinet/in.h,/usr/include/netinet/ip.h,/usr/include/netinet/ip_var.h,/usr/include/netinet/tcp.h,/usr/include/netinet/tcpip.h,/usr/include/netinet/ip_icmp.h,/usr/include/netinet/udp.h,ip_compat.h,ip_fil.h,ip_nat.h,ip_state.h,ip_proxy.h,ip_scan.h

View File

@ -4,7 +4,7 @@ After you have installed IpFilter.
You will need to change three files:
/etc/rc.local
/etc/sysconfig
/etc/rc.conf
/etc/natrules
You will have to:

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*-
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*-
* Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
* The Regents of the University of California. All rights reserved.
@ -42,7 +40,7 @@
#if !(defined(lint) || defined(KERNEL) || defined(_KERNEL))
static const char rcsid[] =
"@(#) $Header: /devel/CVS/IP-Filter/bpf_filter.c,v 2.2 2003/08/19 16:49:58 darrenr Exp $ (LBL)";
"@(#) $Header: /devel/CVS/IP-Filter/bpf_filter.c,v 2.2.2.1 2005/06/18 02:41:30 darrenr Exp $ (LBL)";
#endif
#include <sys/param.h>
@ -53,7 +51,7 @@ static const char rcsid[] =
#include <netinet/in.h>
#include <net/if.h>
#include "ip_compat.h"
#include "netinet/ip_compat.h"
#include "bpf-ipf.h"

View File

@ -1,12 +1,10 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001, 2003 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* @(#)ipf.h 1.12 6/5/96
* Id: ipf.h,v 2.71.2.6 2005/02/21 05:05:29 darrenr Exp
* $Id: ipf.h,v 2.71.2.7 2005/06/12 07:18:31 darrenr Exp $
*/
#ifndef __IPF_H__
@ -265,6 +263,7 @@ extern void printpacket6 __P((struct ip *));
extern struct ip_pool_s *printpool __P((struct ip_pool_s *, copyfunc_t,
char *, int));
extern struct ip_pool_node *printpoolnode __P((struct ip_pool_node *, int));
extern void printproto __P((struct protoent *, int, struct ipnat *));
extern void printportcmp __P((int, struct frpcmp *));
extern void optprint __P((u_short *, u_long, u_long));
#ifdef USE_INET6

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Copyright (C) 1997-1998 by Darren Reed.
*

View File

@ -1,12 +1,10 @@
/* $NetBSD$ */
%{
/*
* Copyright (C) 1997-1998 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: iplang_l.l,v 2.8 2003/07/28 01:15:31 darrenr Exp
* $Id: iplang_l.l,v 2.8 2003/07/28 01:15:31 darrenr Exp $
*/
#include <stdio.h>
#include <string.h>

View File

@ -1,12 +1,10 @@
/* $NetBSD$ */
%{
/*
* Copyright (C) 1997-1998 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: iplang_y.y,v 2.9.2.2 2004/12/09 19:41:10 darrenr Exp
* $Id: iplang_y.y,v 2.9.2.3 2005/10/17 17:25:04 darrenr Exp $
*/
#include <stdio.h>
@ -1290,8 +1288,14 @@ void prep_packet()
if (ifp->if_fd == -1)
ifp->if_fd = initdevice(ifp->if_name, 5);
gwip = sending.snd_gw;
if (!gwip.s_addr)
if (!gwip.s_addr) {
if (aniphead == NULL) {
fprintf(stderr,
"no destination address defined for sending\n");
return;
}
gwip = aniphead->ah_ip->ip_dst;
}
(void) send_ip(ifp->if_fd, ifp->if_MTU, (ip_t *)ipbuffer, gwip, 2);
}

View File

@ -1,12 +1,10 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* @(#)ip_fil.h 1.35 6/5/96
* Id: ipmon.h,v 2.8 2003/07/25 22:16:20 darrenr Exp
* $Id: ipmon.h,v 2.8 2003/07/25 22:16:20 darrenr Exp $
*/

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1995 by Darren Reed.
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1995-1998 Darren Reed.
*
@ -34,7 +32,7 @@
#ifndef lint
static const char sccsid[] = "@(#)ipsd.c 1.3 12/3/95 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: ipsd.c,v 2.2 2001/06/09 17:09:25 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipsd.c,v 2.2 2001/06/09 17:09:25 darrenr Exp $";
#endif
extern char *optarg;

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1995-1998 Darren Reed.
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1995-1998 Darren Reed.
*
@ -35,7 +33,7 @@
#ifndef lint
static const char sccsid[] = "@(#)ipsdr.c 1.3 12/3/95 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: ipsdr.c,v 2.2 2001/06/09 17:09:25 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipsdr.c,v 2.2 2001/06/09 17:09:25 darrenr Exp $";
#endif
extern char *optarg;

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Copyright (C) 1997-1998 by Darren Reed.
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1995-1998 Darren Reed. (from tcplog)
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1992-1998 Darren Reed. (from tcplog)
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1992-1998 Darren Reed. (from tcplog)
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1992-1998 Darren Reed. (from tcplog)
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Based upon 4.4BSD's /usr/sbin/arp
*/

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* arp.c (C) 1995-1998 Darren Reed
*
@ -7,11 +5,11 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)arp.c 1.4 1/11/96 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: arp.c,v 2.8 2003/12/01 02:01:15 darrenr Exp";
static const char rcsid[] = "@(#)$Id: arp.c,v 2.8.2.1 2005/06/12 07:18:38 darrenr Exp $";
#endif
#include <sys/types.h>
#include <sys/socket.h>
#if !defined(ultrix) && !defined(hpux) && !defined(__hpux) && !defined(__osf__)
#if !defined(ultrix) && !defined(hpux) && !defined(__hpux) && !defined(__osf__) && !defined(_AIX51)
#include <sys/sockio.h>
#endif
#include <sys/ioctl.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Common (shared) DLPI test routines.
* Mostly pretty boring boilerplate sorta stuff.

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Common DLPI Test Suite header file
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1997-1998 Darren Reed. (from tcplog)
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/* @(#)in_var.h 1.3 88/08/19 SMI; from UCB 7.1 6/5/86 */
/*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* ip.c (C) 1995-1998 Darren Reed
*
@ -7,7 +5,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "%W% %G% (C)1995";
static const char rcsid[] = "@(#)Id: ip.c,v 2.8.2.1 2004/10/19 12:31:48 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ip.c,v 2.8.2.1 2004/10/19 12:31:48 darrenr Exp $";
#endif
#include <sys/param.h>
#include <sys/types.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/* @(#)ip_var.h 1.11 88/08/19 SMI; from UCB 7.1 6/5/86 */
/*

View File

@ -1,5 +1,3 @@
.\" $NetBSD$
.\"
.TH IPRESEND 1
.SH NAME
ipresend \- resend IP packets out to network

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* ipresend.c (C) 1995-1998 Darren Reed
*
@ -8,7 +6,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "%W% %G% (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: ipresend.c,v 2.4 2004/01/08 13:34:31 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipresend.c,v 2.4 2004/01/08 13:34:31 darrenr Exp $";
#endif
#include <sys/param.h>
#include <sys/types.h>

View File

@ -1,5 +1,3 @@
.\" $NetBSD$
.\"
.TH IPSEND 1
.SH NAME
ipsend \- sends IP packets

View File

@ -1,5 +1,3 @@
.\" $NetBSD$
.\"
.TH IPSEND 5
.SH NAME
ipsend \- IP packet description language

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* ipsend.c (C) 1995-1998 Darren Reed
*
@ -7,7 +5,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ipsend.c 1.5 12/10/95 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: ipsend.c,v 2.8.2.2 2004/11/13 16:50:10 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipsend.c,v 2.8.2.2 2004/11/13 16:50:10 darrenr Exp $";
#endif
#include <sys/param.h>
#include <sys/types.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* ipsend.h (C) 1997-1998 Darren Reed
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Copyright (C) 1995-1998 by Darren Reed.
*
@ -8,7 +6,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ipsopt.c 1.2 1/11/96 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: ipsopt.c,v 2.4.4.1 2004/03/23 12:58:05 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipsopt.c,v 2.4.4.1 2004/03/23 12:58:05 darrenr Exp $";
#endif
#include <sys/param.h>
#include <sys/types.h>

View File

@ -1,5 +1,3 @@
.\" $NetBSD$
.\"
.TH IPTEST 1
.SH NAME
iptest \- automatically generate a packets to test IP functionality

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* ipsend.c (C) 1995-1998 Darren Reed
*
@ -8,7 +6,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "%W% %G% (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: iptest.c,v 2.6 2004/01/08 13:34:31 darrenr Exp";
static const char rcsid[] = "@(#)$Id: iptest.c,v 2.6 2004/01/08 13:34:31 darrenr Exp $";
#endif
#include <sys/param.h>
#include <sys/types.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
*
@ -8,7 +6,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "%W% %G% (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: iptests.c,v 2.8.2.3 2004/04/16 23:33:04 darrenr Exp";
static const char rcsid[] = "@(#)$Id: iptests.c,v 2.8.2.4 2005/06/12 07:18:39 darrenr Exp $";
#endif
#include <sys/param.h>
#include <sys/types.h>
@ -32,7 +30,7 @@ static const char rcsid[] = "@(#)Id: iptests.c,v 2.8.2.3 2004/04/16 23:33:04 dar
# include <sys/proc.h>
#endif
#if !defined(ultrix) && !defined(hpux) && !defined(linux) && \
!defined(__sgi) && !defined(__osf__)
!defined(__sgi) && !defined(__osf__) && !defined(_AIX51)
# include <kvm.h>
#endif
#ifndef ultrix

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* larp.c (C) 1995-1998 Darren Reed
*
@ -8,7 +6,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)larp.c 1.1 8/19/95 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: larp.c,v 2.4 2003/12/01 02:01:16 darrenr Exp";
static const char rcsid[] = "@(#)$Id: larp.c,v 2.4 2003/12/01 02:01:16 darrenr Exp $";
#endif
#include <sys/param.h>
#include <sys/types.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Copyright (C) 1995-1998 by Darren Reed.
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* lsock.c (C) 1995-1998 Darren Reed
*
@ -8,7 +6,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)lsock.c 1.2 1/11/96 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: lsock.c,v 2.3 2001/06/09 17:09:26 darrenr Exp";
static const char rcsid[] = "@(#)$Id: lsock.c,v 2.3 2001/06/09 17:09:26 darrenr Exp $";
#endif
#include <stdio.h>
#include <unistd.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* resend.c (C) 1995-1998 Darren Reed
*
@ -8,7 +6,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)resend.c 1.3 1/11/96 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: resend.c,v 2.8 2004/01/08 13:34:31 darrenr Exp";
static const char rcsid[] = "@(#)$Id: resend.c,v 2.8 2004/01/08 13:34:31 darrenr Exp $";
#endif
#include <sys/param.h>
#include <sys/types.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1995-1998 Darren Reed. (from tcplog)
*
@ -46,7 +44,7 @@
#if !defined(lint)
static const char sccsid[] = "@(#)sbpf.c 1.3 8/25/95 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: sbpf.c,v 2.5 2002/02/24 07:30:03 darrenr Exp";
static const char rcsid[] = "@(#)$Id: sbpf.c,v 2.5 2002/02/24 07:30:03 darrenr Exp $";
#endif
/*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1992-1998 Darren Reed. (from tcplog)
*
@ -48,7 +46,7 @@
#if !defined(lint)
static const char sccsid[] = "@(#)sdlpi.c 1.3 10/30/95 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: sdlpi.c,v 2.8.2.1 2004/12/09 19:41:13 darrenr Exp";
static const char rcsid[] = "@(#)$Id: sdlpi.c,v 2.8.2.1 2004/12/09 19:41:13 darrenr Exp $";
#endif
#define CHUNKSIZE 8192

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1992-1998 Darren Reed.
* (C)opyright 1997 Marc Boucher.

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1992-1998 Darren Reed. (from tcplog)
*
@ -30,7 +28,7 @@
#if !defined(lint)
static const char sccsid[] = "@(#)slinux.c 1.2 8/25/95";
static const char rcsid[] = "@(#)Id: slinux.c,v 2.3 2001/06/09 17:09:26 darrenr Exp";
static const char rcsid[] = "@(#)$Id: slinux.c,v 2.3 2001/06/09 17:09:26 darrenr Exp $";
#endif
#define CHUNKSIZE 8192

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 1992-1998 Darren Reed. (from tcplog)
*
@ -41,7 +39,7 @@
#if !defined(lint)
static const char sccsid[] = "@(#)snit.c 1.5 1/11/96 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: snit.c,v 2.3 2001/06/09 17:09:26 darrenr Exp";
static const char rcsid[] = "@(#)$Id: snit.c,v 2.3 2001/06/09 17:09:26 darrenr Exp $";
#endif
#define CHUNKSIZE 8192

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* sock.c (C) 1995-1998 Darren Reed
*
@ -8,7 +6,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)sock.c 1.2 1/11/96 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: sock.c,v 2.8.4.1 2004/03/23 12:58:06 darrenr Exp";
static const char rcsid[] = "@(#)$Id: sock.c,v 2.8.4.1 2004/03/23 12:58:06 darrenr Exp $";
#endif
#include <sys/param.h>
#include <sys/types.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)opyright 2000 Darren Reed.
*

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Copyright (c) 1982, 1986, 1993
* The Regents of the University of California. All rights reserved.
@ -29,7 +27,7 @@
* SUCH DAMAGE.
*
* @(#)tcpip.h 8.1 (Berkeley) 6/10/93
* Id: tcpip.h,v 2.2.2.3 2004/05/26 15:45:48 darrenr Exp
* $Id: tcpip.h,v 2.2.2.3 2004/05/26 15:45:48 darrenr Exp $
*/
#ifndef _NETINET_TCPIP_H_

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: ipt.h,v 2.6 2003/02/16 02:33:09 darrenr Exp
* $Id: ipt.h,v 2.6 2003/02/16 02:33:09 darrenr Exp $
*/
#ifndef __IPT_H__

View File

@ -1,10 +1,8 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
* Id: kmem.h,v 2.5 2002/08/21 22:57:36 darrenr Exp
* $Id: kmem.h,v 2.5 2002/08/21 22:57:36 darrenr Exp $
*/
#ifndef __KMEM_H__

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* (C)Copyright March, 2000 - Darren Reed.
*/

View File

@ -68,6 +68,7 @@ LIBOBJS=$(DEST)/addicmp.o \
$(DEST)/printip.o \
$(DEST)/printpool.o \
$(DEST)/printpoolnode.o \
$(DEST)/printproto.o \
$(DEST)/printfr.o \
$(DEST)/printfraginfo.o \
$(DEST)/printhostmap.o \
@ -246,6 +247,8 @@ $(DEST)/printpool.o: $(LIBSRC)/printpool.c $(TOP)/ip_fil.h $(TOP)/ip_pool.h
$(DEST)/printpoolnode.o: $(LIBSRC)/printpoolnode.c $(TOP)/ip_fil.h \
$(TOP)/ip_pool.h $(TOP)/ip_lookup.h
$(CC) $(CCARGS) -c $(LIBSRC)/printpoolnode.c -o $@
$(DEST)/printproto.o: $(LIBSRC)/printproto.c $(TOP)/ip_fil.h
$(CC) $(CCARGS) -c $(LIBSRC)/printproto.c -o $@
$(DEST)/printhostmap.o: $(LIBSRC)/printhostmap.c $(TOP)/ip_fil.h
$(CC) $(CCARGS) -c $(LIBSRC)/printhostmap.c -o $@
$(DEST)/printifname.o: $(LIBSRC)/printifname.c $(INCDEP)

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: addicmp.c,v 1.10.2.1 2004/12/09 19:41:16 darrenr Exp
* $Id: addicmp.c,v 1.10.2.1 2004/12/09 19:41:16 darrenr Exp $
*/
#include <ctype.h>

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: addipopt.c,v 1.7 2002/01/28 06:50:45 darrenr Exp
* $Id: addipopt.c,v 1.7 2002/01/28 06:50:45 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: addkeep.c,v 1.12 2003/12/01 01:59:42 darrenr Exp
* $Id: addkeep.c,v 1.12 2003/12/01 01:59:42 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
#include "ipf.h"
int bcopywrap(from, to, size)

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: binprint.c,v 1.8 2002/05/14 15:18:56 darrenr Exp
* $Id: binprint.c,v 1.8 2002/05/14 15:18:56 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: buildopts.c,v 1.6 2002/01/28 06:50:45 darrenr Exp
* $Id: buildopts.c,v 1.6 2002/01/28 06:50:45 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: checkrev.c,v 1.12.2.1 2004/03/09 14:44:39 darrenr Exp
* $Id: checkrev.c,v 1.12.2.1 2004/03/09 14:44:39 darrenr Exp $
*/
#include <sys/ioctl.h>

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: count4bits.c,v 1.1 2002/06/15 04:46:39 darrenr Exp
* $Id: count4bits.c,v 1.1 2002/06/15 04:46:39 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: count6bits.c,v 1.4 2001/06/09 17:09:23 darrenr Exp
* $Id: count6bits.c,v 1.4 2001/06/09 17:09:23 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: debug.c,v 1.6 2001/06/09 17:09:24 darrenr Exp
* $Id: debug.c,v 1.6 2001/06/09 17:09:24 darrenr Exp $
*/
#if defined(__STDC__)

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: extras.c,v 1.12 2002/07/13 12:06:49 darrenr Exp
* $Id: extras.c,v 1.12 2002/07/13 12:06:49 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: facpri.c,v 1.6 2003/12/01 01:59:43 darrenr Exp
* $Id: facpri.c,v 1.6.2.1 2005/11/14 17:45:06 darrenr Exp $
*/
#include <stdio.h>
@ -22,7 +20,7 @@
#include "facpri.h"
#if !defined(lint)
static const char rcsid[] = "@(#)Id: facpri.c,v 1.6 2003/12/01 01:59:43 darrenr Exp";
static const char rcsid[] = "@(#)$Id: facpri.c,v 1.6.2.1 2005/11/14 17:45:06 darrenr Exp $";
#endif
@ -42,10 +40,10 @@ table_t facs[] = {
#else
{ "cron", LOG_CRON1 },
#endif
#ifdef LOG_FTP
#ifdef LOG_FTP
{ "ftp", LOG_FTP },
#endif
#ifdef LOG_AUTHPRIV
#ifdef LOG_AUTHPRIV
{ "authpriv", LOG_AUTHPRIV },
#endif
#ifdef LOG_AUDIT

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1999-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: facpri.h,v 1.3 2001/06/09 17:19:50 darrenr Exp
* $Id: facpri.h,v 1.3 2001/06/09 17:19:50 darrenr Exp $
*/
#ifndef __FACPRI_H__

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: fill6bits.c,v 1.5 2002/03/27 15:09:57 darrenr Exp
* $Id: fill6bits.c,v 1.5 2002/03/27 15:09:57 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: flags.c,v 1.4 2002/11/02 07:16:36 darrenr Exp
* $Id: flags.c,v 1.4 2002/11/02 07:16:36 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: genmask.c,v 1.7 2003/11/11 13:40:15 darrenr Exp
* $Id: genmask.c,v 1.7 2003/11/11 13:40:15 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
#include "ipf.h"
int gethost(name, hostp)

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
#include "ipf.h"
#include "kmem.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: getline.c,v 1.3 2001/06/09 17:09:24 darrenr Exp
* $Id: getline.c,v 1.3 2001/06/09 17:09:24 darrenr Exp $
*/
#include <stdio.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
@ -11,7 +9,7 @@
#include "kmem.h"
#if !defined(lint)
static const char rcsid[] = "@(#)Id: getnattype.c,v 1.3 2004/01/17 17:26:07 darrenr Exp";
static const char rcsid[] = "@(#)$Id: getnattype.c,v 1.3 2004/01/17 17:26:07 darrenr Exp $";
#endif

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
#include "ipf.h"
int getport(fr, name, port)

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
#include <ctype.h>
#include "ipf.h"

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
#include "ipf.h"
int getproto(name)
@ -14,6 +12,14 @@ char *name;
if (*s == '\0')
return atoi(name);
#ifdef _AIX51
/*
* For some bogus reason, "ip" is 252 in /etc/protocols on AIX 5
*/
if (!strcasecmp(name, "ip"))
return 0;
#endif
p = getprotobyname(name);
if (p != NULL)
return p->p_proto;

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
#include "ipf.h"
char *getsumd(sum)

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
#include <ctype.h>
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: hostmask.c,v 1.10 2002/01/28 06:50:46 darrenr Exp
* $Id: hostmask.c,v 1.10 2002/01/28 06:50:46 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: hostnum.c,v 1.10.2.1 2004/12/09 19:41:20 darrenr Exp
* $Id: hostnum.c,v 1.10.2.1 2004/12/09 19:41:20 darrenr Exp $
*/
#include <ctype.h>

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: icmpcode.c,v 1.7.2.1 2004/12/09 19:41:20 darrenr Exp
* $Id: icmpcode.c,v 1.7.2.1 2004/12/09 19:41:20 darrenr Exp $
*/
#include <ctype.h>

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* ++Copyright++ 1983, 1990, 1993
* -
@ -57,7 +55,7 @@
#if !defined(lint)
static const char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
static const char rcsid[] = "@(#)Id: inet_addr.c,v 1.8.2.3 2004/12/09 19:41:20 darrenr Exp";
static const char rcsid[] = "@(#)$Id: inet_addr.c,v 1.8.2.3 2004/12/09 19:41:20 darrenr Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: initparse.c,v 1.6 2002/01/28 06:50:46 darrenr Exp
* $Id: initparse.c,v 1.6 2002/01/28 06:50:46 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: ionames.c,v 1.7 2002/01/28 06:50:46 darrenr Exp
* $Id: ionames.c,v 1.7 2002/01/28 06:50:46 darrenr Exp $
*/
#include "ipf.h"

View File

@ -1,7 +1,5 @@
/* $NetBSD$ */
#include "ipf.h"
#include "ipl.h"
#include "netinet/ipl.h"
#include <sys/ioctl.h>
void ipf_dotuning(fd, tuneargs, iocfn)
@ -33,6 +31,7 @@ ioctlfunc_t iocfn;
printtunable(&tu);
}
} else if ((t = strchr(s, '=')) != NULL) {
tu.ipft_cookie = NULL;
*t++ = '\0';
strncpy(tu.ipft_name, s, sizeof(tu.ipft_name));
if (sscanf(t, "%lu", &tu.ipft_vlong) == 1) {
@ -45,13 +44,16 @@ ioctlfunc_t iocfn;
return;
}
} else {
tu.ipft_cookie = NULL;
strncpy(tu.ipft_name, s, sizeof(tu.ipft_name));
if ((*iocfn)(fd, SIOCIPFGET, &obj) == -1) {
perror("ioctl(SIOCIPFGET)");
return;
}
if (tu.ipft_cookie == NULL)
if (tu.ipft_cookie == NULL) {
fprintf(stderr, "Null cookie for %s\n", s);
return;
}
tu.ipft_name[sizeof(tu.ipft_name) - 1] = '\0';
printtunable(&tu);

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: ipft_ef.c,v 1.14 2004/01/08 13:34:31 darrenr Exp
* $Id: ipft_ef.c,v 1.14 2004/01/08 13:34:31 darrenr Exp $
*/
/*
@ -33,7 +31,7 @@ etherfind -n -t
#if !defined(lint)
static const char sccsid[] = "@(#)ipft_ef.c 1.6 2/4/96 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: ipft_ef.c,v 1.14 2004/01/08 13:34:31 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipft_ef.c,v 1.14 2004/01/08 13:34:31 darrenr Exp $";
#endif
static int etherf_open __P((char *));

View File

@ -1,5 +1,3 @@
/* $NetBSD$ */
/*
* Copyright (C) 1995-2001 by Darren Reed.
*
@ -7,7 +5,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ipft_hx.c 1.1 3/9/96 (C) 1996 Darren Reed";
static const char rcsid[] = "@(#)Id: ipft_hx.c,v 1.11.4.1 2004/12/09 19:41:20 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipft_hx.c,v 1.11.4.3 2005/12/04 10:07:21 darrenr Exp $";
#endif
#include <ctype.h>
@ -83,7 +81,7 @@ int cnt, *dir;
*s = '\0';
if (!*line)
continue;
if (!(opts & OPT_BRIEF)) {
if ((opts & OPT_DEBUG) != 0) {
printf("input: %s", line);
}
@ -108,7 +106,7 @@ int cnt, *dir;
s = line;
t = (char *)ip;
ip = (ip_t *)readhex(s, (char *)ip);
if (!(opts & OPT_BRIEF)) {
if ((opts & OPT_DEBUG) != 0) {
if (opts & OPT_ASCII) {
if (t < (char *)ip)
putchar('\t');
@ -124,6 +122,8 @@ int cnt, *dir;
fflush(stdout);
}
}
if (feof(tfp))
return 0;
return -1;
}

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: ipft_pc.c,v 1.10 2004/02/07 18:17:40 darrenr Exp
* $Id: ipft_pc.c,v 1.10.2.1 2005/12/04 09:55:10 darrenr Exp $
*/
#include "ipf.h"
#include "pcap-ipf.h"
@ -13,7 +11,7 @@
#include "ipt.h"
#if !defined(lint)
static const char rcsid[] = "@(#)Id: ipft_pc.c,v 1.10 2004/02/07 18:17:40 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipft_pc.c,v 1.10.2.1 2005/12/04 09:55:10 darrenr Exp $";
#endif
struct llc {
@ -162,10 +160,19 @@ static int pcap_close()
static int pcap_read_rec(rec)
struct pcap_pkthdr *rec;
{
int n, p;
int n, p, i;
char *s;
if (read(pfd, (char *)rec, sizeof(*rec)) != sizeof(*rec))
return -2;
s = (char *)rec;
n = sizeof(*rec);
while (n > 0) {
i = read(pfd, (char *)rec, sizeof(*rec));
if (i <= 0)
return -2;
s += i;
n -= i;
}
if (swapped) {
rec->ph_clen = SWAPLONG(rec->ph_clen);
@ -178,6 +185,8 @@ struct pcap_pkthdr *rec;
if (!n || n < 0)
return -3;
if (p < 0 || p > 65536)
return -4;
return p;
}
@ -224,7 +233,7 @@ int cnt, *dir;
struct pcap_pkthdr rec;
struct llc *l;
char *s, ty[4];
int i, n;
int i, j, n;
l = llcp;
@ -238,8 +247,14 @@ int cnt, *dir;
bufp = realloc(bufp, i);
s = bufp;
if (read(pfd, s, i) != i)
return -2;
for (j = i, n = 0; j > 0; ) {
n = read(pfd, s, j);
if (n <= 0)
return -2;
j -= n;
s += n;
}
s = bufp;
i -= l->lc_sz;
s += l->lc_to;

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: ipft_sn.c,v 1.7 2003/02/16 02:32:36 darrenr Exp
* $Id: ipft_sn.c,v 1.7 2003/02/16 02:32:36 darrenr Exp $
*/
/*
@ -16,7 +14,7 @@
#include "ipt.h"
#if !defined(lint)
static const char rcsid[] = "@(#)Id: ipft_sn.c,v 1.7 2003/02/16 02:32:36 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipft_sn.c,v 1.7 2003/02/16 02:32:36 darrenr Exp $";
#endif
struct llc {

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: ipft_td.c,v 1.15 2004/01/08 13:34:31 darrenr Exp
* $Id: ipft_td.c,v 1.15 2004/01/08 13:34:31 darrenr Exp $
*/
/*
@ -42,7 +40,7 @@ tcpdump -nqte
#if !defined(lint)
static const char sccsid[] = "@(#)ipft_td.c 1.8 2/4/96 (C)1995 Darren Reed";
static const char rcsid[] = "@(#)Id: ipft_td.c,v 1.15 2004/01/08 13:34:31 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipft_td.c,v 1.15 2004/01/08 13:34:31 darrenr Exp $";
#endif
static int tcpd_open __P((char *));

View File

@ -1,15 +1,13 @@
/* $NetBSD$ */
/*
* Copyright (C) 1995-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: ipft_tx.c,v 1.15.2.2 2004/12/09 19:41:21 darrenr Exp
* $Id: ipft_tx.c,v 1.15.2.6 2005/12/04 10:07:22 darrenr Exp $
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ipft_tx.c 1.7 6/5/96 (C) 1993 Darren Reed";
static const char rcsid[] = "@(#)Id: ipft_tx.c,v 1.15.2.2 2004/12/09 19:41:21 darrenr Exp";
static const char rcsid[] = "@(#)$Id: ipft_tx.c,v 1.15.2.6 2005/12/04 10:07:22 darrenr Exp $";
#endif
#include <ctype.h>
@ -31,8 +29,8 @@ static int text_open __P((char *)), text_close __P((void));
static int text_readip __P((char *, int, char **, int *));
static int parseline __P((char *, ip_t *, char **, int *));
static char _tcp_flagset[] = "FSRPAUEC";
static u_char _tcp_flags[] = { TH_FIN, TH_SYN, TH_RST, TH_PUSH,
static char myflagset[] = "FSRPAUEC";
static u_char myflags[] = { TH_FIN, TH_SYN, TH_RST, TH_PUSH,
TH_ACK, TH_URG, TH_ECN, TH_CWR };
struct ipread iptext = { text_open, text_close, text_readip, R_DO_CKSUM };
@ -161,7 +159,7 @@ int cnt, *dir;
*s = '\0';
if (!*line)
continue;
if (!(opts & OPT_BRIEF))
if ((opts & OPT_DEBUG) != 0)
printf("input: %s\n", line);
*ifn = NULL;
*dir = 0;
@ -172,6 +170,8 @@ int cnt, *dir;
return sizeof(ip_t);
#endif
}
if (feof(tfp))
return 0;
return -1;
}
@ -280,14 +280,12 @@ int *out;
ip->ip_dst.s_addr = tx_hostnum(*cpp, &r);
cpp++;
if (*cpp && ip->ip_p == IPPROTO_TCP) {
extern char _tcp_flagset[];
extern u_char _tcp_flags[];
char *s, *t;
tcp->th_flags = 0;
for (s = *cpp; *s; s++)
if ((t = strchr(_tcp_flagset, *s)))
tcp->th_flags |= _tcp_flags[t - _tcp_flagset];
if ((t = strchr(myflagset, *s)))
tcp->th_flags |= myflags[t - myflagset];
if (tcp->th_flags)
cpp++;
if (tcp->th_flags == 0)
@ -299,15 +297,22 @@ int *out;
char **s, *t;
int i;
t = strchr(*cpp, ',');
if (t != NULL)
*t = '\0';
for (s = tx_icmptypes, i = 0; !*s || strcmp(*s, "END");
s++, i++)
if (*s && !strncasecmp(*cpp, *s, strlen(*s))) {
s++, i++) {
if (*s && !strcasecmp(*cpp, *s)) {
ic->icmp_type = i;
if ((t = strchr(*cpp, ',')))
ic->icmp_code = atoi(t+1);
if (t != NULL)
ic->icmp_code = atoi(t + 1);
cpp++;
break;
}
}
if (t != NULL)
*t = ',';
}
if (*cpp && !strcasecmp(*cpp, "opt")) {

View File

@ -1,11 +1,9 @@
/* $NetBSD$ */
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Id: ipoptsec.c,v 1.2 2002/01/28 06:50:46 darrenr Exp
* $Id: ipoptsec.c,v 1.2 2002/01/28 06:50:46 darrenr Exp $
*/
#include "ipf.h"

Some files were not shown because too many files have changed in this diff Show More