Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src Pull up revision 1.1.1.1 (new) (requested by darrenr):



details:   https://anonhg.NetBSD.org/src/rev/c316b2102614
branches:  netbsd-1-4
changeset: 469937:c316b2102614
user:      he <he%NetBSD.org@localhost>
date:      Mon Dec 20 21:01:49 1999 +0000

description:
Pull up revision 1.1.1.1 (new) (requested by darrenr):
  Update IPF to version 3.3.5.

diffstat:

 dist/ipf/ipsend/44arp.c          |   111 +
 dist/ipf/ipsend/Crashable        |    21 +
 dist/ipf/ipsend/Makefile         |   177 +++
 dist/ipf/ipsend/README           |     8 +
 dist/ipf/ipsend/arp.c            |   130 ++
 dist/ipf/ipsend/dlcommon.c       |  1361 ++++++++++++++++++++++++
 dist/ipf/ipsend/dltest.h         |    34 +
 dist/ipf/ipsend/hpux.c           |   114 ++
 dist/ipf/ipsend/in_var.h         |   179 +++
 dist/ipf/ipsend/ip.c             |   349 ++++++
 dist/ipf/ipsend/ip_var.h         |   125 ++
 dist/ipf/ipsend/ipresend.c       |   168 ++
 dist/ipf/ipsend/ipsend.5         |   403 +++++++
 dist/ipf/ipsend/ipsend.c         |   402 +++++++
 dist/ipf/ipsend/ipsend.h         |    71 +
 dist/ipf/ipsend/ipsopt.c         |   197 +++
 dist/ipf/ipsend/iptest.c         |   227 ++++
 dist/ipf/ipsend/iptests.c        |  1341 +++++++++++++++++++++++
 dist/ipf/ipsend/larp.c           |    93 +
 dist/ipf/ipsend/linux.h          |    19 +
 dist/ipf/ipsend/lsock.c          |   258 ++++
 dist/ipf/ipsend/resend.c         |   144 ++
 dist/ipf/ipsend/sbpf.c           |   142 ++
 dist/ipf/ipsend/sdlpi.c          |   135 ++
 dist/ipf/ipsend/sirix.c          |    96 +
 dist/ipf/ipsend/slinux.c         |    93 +
 dist/ipf/ipsend/snit.c           |   161 ++
 dist/ipf/ipsend/sock.c           |   401 +++++++
 dist/ipf/ipsend/tcpip.h          |    93 +
 dist/ipf/ipsend/ultrix.c         |    88 +
 dist/ipf/man/Makefile            |    22 +
 dist/ipf/man/ipf.4               |   257 ++++
 dist/ipf/man/ipf.8               |   134 ++
 dist/ipf/man/ipfilter.5          |    12 +
 dist/ipf/man/ipl.4               |    81 +
 dist/ipf/man/ipmon.8             |   150 ++
 dist/ipf/man/ipnat.4             |    98 +
 dist/ipf/perl/Ipfanaly.pl        |   639 +++++++++++
 dist/ipf/perl/Isbgraph           |   297 +++++
 dist/ipf/perl/LICENSE            |     6 +
 dist/ipf/perl/Services           |  2146 ++++++++++++++++++++++++++++++++++++++
 dist/ipf/perl/logfilter.pl       |   181 +++
 dist/ipf/perl/plog               |   653 +++++++++++
 dist/ipf/rules/BASIC.NAT         |    45 +
 dist/ipf/rules/BASIC_1.FW        |    99 +
 dist/ipf/rules/BASIC_2.FW        |    72 +
 dist/ipf/rules/example.1         |     5 +
 dist/ipf/rules/example.10        |    13 +
 dist/ipf/rules/example.11        |    27 +
 dist/ipf/rules/example.12        |    18 +
 dist/ipf/rules/example.13        |    18 +
 dist/ipf/rules/example.2         |     6 +
 dist/ipf/rules/example.3         |    41 +
 dist/ipf/rules/example.4         |     5 +
 dist/ipf/rules/example.5         |    26 +
 dist/ipf/rules/example.6         |     6 +
 dist/ipf/rules/example.7         |    13 +
 dist/ipf/rules/example.8         |    11 +
 dist/ipf/rules/example.9         |    13 +
 dist/ipf/rules/example.sr        |    62 +
 dist/ipf/rules/firewall          |    39 +
 dist/ipf/rules/ftp-proxy         |    45 +
 dist/ipf/rules/ftppxy            |     6 +
 dist/ipf/rules/nat-setup         |    77 +
 dist/ipf/rules/nat.eg            |    14 +
 dist/ipf/rules/server            |    11 +
 dist/ipf/rules/tcpstate          |    13 +
 dist/ipf/samples/Makefile        |    12 +
 dist/ipf/samples/ipfilter-pb.gif |   Bin 
 dist/ipf/samples/proxy.c         |   113 ++
 dist/ipf/samples/userauth.c      |    59 +
 dist/ipf/test/Makefile           |    43 +
 dist/ipf/test/expected/f1        |    20 +
 dist/ipf/test/expected/f10       |   126 ++
 dist/ipf/test/expected/f11       |    72 +
 dist/ipf/test/expected/f12       |    60 +
 dist/ipf/test/expected/f14       |    48 +
 dist/ipf/test/expected/f2        |    42 +
 dist/ipf/test/expected/f3        |    48 +
 dist/ipf/test/expected/f4        |    48 +
 dist/ipf/test/expected/f5        |  1392 ++++++++++++++++++++++++
 dist/ipf/test/expected/f6        |  1392 ++++++++++++++++++++++++
 dist/ipf/test/expected/f7        |    60 +
 dist/ipf/test/expected/f8        |    42 +
 dist/ipf/test/expected/f9        |   126 ++
 dist/ipf/test/expected/i1        |    13 +
 dist/ipf/test/expected/i10       |     4 +
 dist/ipf/test/expected/i11       |     4 +
 dist/ipf/test/expected/i2        |     6 +
 dist/ipf/test/expected/i3        |     8 +
 dist/ipf/test/expected/i4        |     7 +
 dist/ipf/test/expected/i5        |     5 +
 dist/ipf/test/expected/i6        |     4 +
 dist/ipf/test/expected/i7        |     3 +
 dist/ipf/test/expected/i8        |     2 +
 dist/ipf/test/expected/i9        |     5 +
 dist/ipf/test/expected/n1        |    96 +
 dist/ipf/test/expected/n2        |    80 +
 dist/ipf/test/expected/n3        |    12 +
 dist/ipf/test/expected/n4        |    30 +
 dist/ipf/test/input/f1           |     4 +
 dist/ipf/test/input/f10          |     6 +
 dist/ipf/test/input/f11          |    11 +
 dist/ipf/test/input/f12          |    35 +
 dist/ipf/test/input/f13          |    39 +
 dist/ipf/test/input/f14          |     5 +
 dist/ipf/test/input/f2           |     6 +
 dist/ipf/test/input/f3           |     5 +
 dist/ipf/test/input/f4           |     5 +
 dist/ipf/test/input/f5           |    28 +
 dist/ipf/test/input/f6           |    28 +
 dist/ipf/test/input/f7           |     9 +
 dist/ipf/test/input/f8           |     6 +
 dist/ipf/test/input/f9           |     6 +
 dist/ipf/test/input/n1           |    31 +
 dist/ipf/test/input/n2           |    19 +
 dist/ipf/test/input/n3           |     5 +
 dist/ipf/test/input/n4           |     5 +
 dist/ipf/test/regress/f1         |     4 +
 dist/ipf/test/regress/f10        |    18 +
 dist/ipf/test/regress/f11        |     6 +
 dist/ipf/test/regress/f12        |     6 +
 dist/ipf/test/regress/f13        |     6 +
 dist/ipf/test/regress/f14        |     8 +
 dist/ipf/test/regress/f2         |     6 +
 dist/ipf/test/regress/f3         |     8 +
 dist/ipf/test/regress/f4         |     8 +
 dist/ipf/test/regress/f5         |    48 +
 dist/ipf/test/regress/f6         |    48 +
 dist/ipf/test/regress/f7         |     6 +
 dist/ipf/test/regress/f8         |     6 +
 dist/ipf/test/regress/f9         |    18 +
 dist/ipf/test/regress/i1         |    13 +
 dist/ipf/test/regress/i10        |     4 +
 dist/ipf/test/regress/i11        |     4 +
 dist/ipf/test/regress/i2         |     6 +
 dist/ipf/test/regress/i3         |     8 +
 dist/ipf/test/regress/i4         |     7 +
 dist/ipf/test/regress/i5         |     5 +
 dist/ipf/test/regress/i6         |     4 +
 dist/ipf/test/regress/i7         |     3 +
 dist/ipf/test/regress/i8         |     2 +
 dist/ipf/test/regress/i9         |     5 +
 dist/ipf/test/regress/n1         |     3 +
 dist/ipf/test/regress/n2         |     4 +
 dist/ipf/test/regress/n3         |     2 +
 dist/ipf/test/regress/n4         |     5 +
 sys/netinet/ip_raudio_pxy.c      |   302 +++++
 sys/netinet/ip_rcmd_pxy.c        |   158 ++
 sys/netinet/ipl.h                |    18 +
 150 files changed, 17486 insertions(+), 0 deletions(-)

diffs (truncated from 18085 to 300 lines):

diff -r 1ced02cdb55a -r c316b2102614 dist/ipf/ipsend/44arp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/ipf/ipsend/44arp.c   Mon Dec 20 21:01:49 1999 +0000
@@ -0,0 +1,111 @@
+/*     $NetBSD: 44arp.c,v 1.1.1.1.2.2 1999/12/20 21:01:49 he Exp $     */
+
+/*
+ * Based upon 4.4BSD's /usr/sbin/arp
+ */
+#include <unistd.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/param.h>
+#include <sys/file.h>
+#include <sys/socket.h>
+#include <sys/sysctl.h>
+#include <net/if.h>
+#include <net/if_dl.h>
+#include <net/if_types.h>
+#include <net/route.h>
+#include <netinet/in.h>
+#include <netinet/if_ether.h>
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <errno.h>
+#include <nlist.h>
+#include <stdio.h>
+#include <netinet/in.h>
+#include <netinet/ip_var.h>
+#include <netinet/tcp.h>
+#if __FreeBSD_version >= 300000
+# include <net/if_var.h>
+#endif
+#include "ipsend.h"
+#include "iplang/iplang.h"
+
+
+/*
+ * lookup host and return
+ * its IP address in address
+ * (4 bytes)
+ */
+int    resolve(host, address) 
+char   *host, *address;
+{
+        struct hostent *hp;
+        u_long add;
+
+       add = inet_addr(host);
+       if (add == -1)
+           {
+               if (!(hp = gethostbyname(host)))
+                   {
+                       fprintf(stderr, "unknown host: %s\n", host);
+                       return -1;
+                   }
+               bcopy((char *)hp->h_addr, (char *)address, 4);
+               return 0;
+       }
+       bcopy((char*)&add, address, 4);
+       return 0;
+}
+
+
+int    arp(addr, eaddr)
+char   *addr, *eaddr;
+{
+       int     mib[6];
+       size_t  needed;
+       char    *lim, *buf, *next;
+       struct  rt_msghdr       *rtm;
+       struct  sockaddr_inarp  *sin;
+       struct  sockaddr_dl     *sdl;
+
+#ifdef IPSEND
+       if (arp_getipv4(ip, ether) == 0)
+               return 0;
+#endif
+
+       mib[0] = CTL_NET;
+       mib[1] = PF_ROUTE;
+       mib[2] = 0;
+       mib[3] = AF_INET;
+       mib[4] = NET_RT_FLAGS;
+       mib[5] = RTF_LLINFO;
+       if (sysctl(mib, 6, NULL, &needed, NULL, 0) == -1)
+           {
+               perror("route-sysctl-estimate");
+               exit(-1);
+           }
+       if ((buf = malloc(needed)) == NULL)
+           {
+               perror("malloc");
+               exit(-1);
+           }
+       if (sysctl(mib, 6, buf, &needed, NULL, 0) == -1)
+           {
+               perror("actual retrieval of routing table");
+               exit(-1);
+           }
+       lim = buf + needed;
+       for (next = buf; next < lim; next += rtm->rtm_msglen)
+           {
+               rtm = (struct rt_msghdr *)next;
+               sin = (struct sockaddr_inarp *)(rtm + 1);
+               sdl = (struct sockaddr_dl *)(sin + 1);
+               if (addr && !bcmp(addr, (char *)&sin->sin_addr,
+                                 sizeof(struct in_addr)))
+                   {
+                       bcopy(LLADDR(sdl), eaddr, sdl->sdl_alen);
+                       return 0;
+                   }
+           }
+       return -1;
+}
diff -r 1ced02cdb55a -r c316b2102614 dist/ipf/ipsend/Crashable
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/ipf/ipsend/Crashable Mon Dec 20 21:01:49 1999 +0000
@@ -0,0 +1,21 @@
+Test 1:
+       Solaris 2.4 - upto and including 101945-34, > 34 ?
+       Solaris 2.5 - 11/95
+       Linux 1.2.13, < 1.3.45(?)
+       3com/sonix bridge
+       Instant Internet
+       KA9Q NOS
+       Netblazer 40i, Version 3.2 OS
+       Irix 6.x
+       HP-UX 9.0
+       HP-UX 10.1
+       LivingstonsComOS
+       MacOS 7.x, 8.x
+
+Test 6:
+       SunOS 4.1.x
+       ULtrix 4.3
+
+Test 7:
+       SunOS 4.1.x
+       Linux <= 1.3.84
diff -r 1ced02cdb55a -r c316b2102614 dist/ipf/ipsend/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/dist/ipf/ipsend/Makefile  Mon Dec 20 21:01:49 1999 +0000
@@ -0,0 +1,177 @@
+#
+# Copyright (C) 1993-1998 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.
+#
+IPFT=ipft_ef.o ipft_hx.o ipft_pc.o ipft_sn.o ipft_td.o ipft_tx.o opt.o
+OBJS=ipsend.o ip.o ipsopt.o y.tab.o lex.yy.o
+ROBJS=ipresend.o ip.o resend.o $(IPFT)
+TOBJS=iptest.o iptests.o ip.o
+BPF=sbpf.o
+NIT=snit.o
+SUNOS4=sock.o arp.o inet_addr.o
+BSD=sock.o 44arp.o
+LINUX=lsock.o slinux.o larp.o
+LINUXK=
+TOP=..
+SUNOS5=dlcommon.o sdlpi.o arp.o inet_addr.o
+ULTRIX=ultrix.o sock.o arp.o inet_addr.o
+HPUX=hpux.o sock.o arp.o inet_addr.o
+
+#CC=gcc
+DEBUG=-g
+CFLAGS=$(DEBUG) -I. -Iipf
+#
+MFLAGS="BINDEST=$(BINDEST)" "SBINDEST=$(SBINDEST)" "MANDIR=$(MANDIR)" \
+       "IPFLKM=$(IPFLKM)" \
+       "IPFLOG=$(IPFLOG)" "LOGFAC=$(LOGFAC)" "POLICY=$(POLICY)" \
+       "SOLARIS2=$(SOLARIS2)" "DEBUG=$(DEBUG)" "DCPU=$(CPU)" \
+       "CPUDIR=$(CPUDIR)"
+#
+all:
+       @echo "Use one of these targets:"
+       @echo " sunos4-nit (standard SunOS 4.1.x)"
+       @echo " sunos4-bpf (SunOS4.1.x with BPF in the kernel)"
+       @echo " bsd-bpf (4.4BSD variant with BPF in the kernel)"
+       @echo " linux10 (Linux 1.0 kernels)"
+       @echo " linux12 (Linux 1.2 kernels)"
+       @echo " linux20 (Linux 2.0 kernels)"
+       @echo " sunos5 (Solaris 2.x)"
+
+ipf:
+       -if [ ! -d iplang ] ; then ln -s ../iplang iplang; fi
+       -if [ ! -d netinet ] ; then ln -s ../netinet netinet; fi
+       -if [ ! -d ipf ] ; then ln -s .. ipf; fi
+
+y.tab.o: iplang/iplang_y.y
+       -if [ -h iplang ] ; then \
+               (cd iplang; ${MAKE} $(MFLAGS) 'DESTDIR=../ipsend' ) \
+       else \
+               (cd iplang; ${MAKE} $(MFLAGS) 'DESTDIR=..' ) \
+       fi
+
+lex.yy.o: iplang/iplang_l.l
+       -if [ -h iplang ] ; then \
+               (cd iplang; ${MAKE} $(MFLAGS) 'DESTDIR=../ipsend' ) \
+       else \
+               (cd iplang; ${MAKE} $(MFLAGS) 'DESTDIR=..' ) \
+       fi
+
+.c.o:
+       $(CC) $(CFLAGS) $(LINUXK) -c $< -o $@
+
+install:
+       -$(INSTALL) -cs -g wheel -m 755 -o root ipsend ipresend iptest $(BINDEST)
+
+bpf sunos4-bpf :
+       make ipsend "OBJS=$(OBJS)" "UNIXOBJS=$(BPF) $(SUNOS4)" "CC=$(CC)" \
+               "CFLAGS=$(CFLAGS) -DDOSOCKET -DIPSEND" "LLIB=-ll"
+       make ipresend "ROBJS=$(ROBJS)" "UNIXOBJS=$(BPF) $(SUNOS4)" "CC=$(CC)" \
+               "CFLAGS=$(CFLAGS) -DDOSOCKET"
+       make iptest "TOBJS=$(TOBJS)" "UNIXOBJS=$(BPF) $(SUNOS4)" "CC=$(CC)" \
+               "CFLAGS=$(CFLAGS) -DDOSOCKET"
+
+nit sunos4 sunos4-nit :
+       make ipsend "OBJS=$(OBJS)" "UNIXOBJS=$(NIT) $(SUNOS4)" "CC=$(CC)" \
+               "CFLAGS=$(CFLAGS) -DDOSOCKET -DIPSEND" "LLIB=-ll"
+       make ipresend "ROBJS=$(ROBJS)" "UNIXOBJS=$(NIT) $(SUNOS4)" "CC=$(CC)" \
+               "CFLAGS=$(CFLAGS) -DDOSOCKET"
+       make iptest "TOBJS=$(TOBJS)" "UNIXOBJS=$(NIT) $(SUNOS4)" "CC=$(CC)" \
+               "CFLAGS=$(CFLAGS) -DDOSOCKET"
+
+dlpi sunos5 :
+       make ipsend "OBJS=$(OBJS)" "UNIXOBJS=$(SUNOS5)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS) -Dsolaris -DIPSEND" "LIBS=-lsocket -lnsl" \
+               "LLIB=-ll"
+       make ipresend "ROBJS=$(ROBJS)" "UNIXOBJS=$(SUNOS5)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS) -Dsolaris" "LIBS=-lsocket -lnsl"
+       make iptest "TOBJS=$(TOBJS)" "UNIXOBJS=$(SUNOS5)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS) -Dsolaris" "LIBS=-lsocket -lnsl"
+
+bsd-bpf :
+       make ipsend "OBJS=$(OBJS)" "UNIXOBJS=$(BPF) $(BSD)" "CC=$(CC)" \
+               "CFLAGS=$(CFLAGS) -DDOSOCKET -DIPSEND" "LLIB=-ll"
+       make ipresend "ROBJS=$(ROBJS)" "UNIXOBJS=$(BPF) $(BSD)" "CC=$(CC)" \
+               "CFLAGS=$(CFLAGS) -DDOSOCKET"
+       make iptest "TOBJS=$(TOBJS)" "UNIXOBJS=$(BPF) $(BSD)" "CC=$(CC)" \
+               "CFLAGS=$(CFLAGS) -DDOSOCKET"
+
+linuxrev :
+       make ipsend "OBJS=$(OBJS)" "UNIXOBJS=$(LINUX)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS) $(INC) -DDOSOCKET -DIPSEND" $(LINUXK)
+       make ipresend "ROBJS=$(ROBJS)" "UNIXOBJS=$(LINUX)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS) $(INC) -DDOSOCKET" $(LINUXK)
+       make iptest "TOBJS=$(TOBJS)" "UNIXOBJS=$(LINUX)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS) $(INC) -DDOSOCKET" $(LINUXK)
+
+linux10:
+       make linuxrev 'LINUXK="LINUXK=-DLINUX=0100"' \
+               "INC=-I/usr/src/linux/include" "LLIB=-lfl"
+
+linux12:
+       make linuxrev 'LINUXK="LINUXK=-DLINUX=0102"' "INC=-I/usr/src/linux" \
+               "LLIB=-lfl"
+
+linux20:
+       make linuxrev 'LINUXK="LINUXK=-DLINUX=0200"' \
+               "INC=-I/usr/src/linux/include" "LLIB=-lfl" "ELIB=-lelf"
+
+ultrix :
+       make ipsend "OBJS=$(OBJS)" "UNIXOBJS=$(ULTRIX)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS) -DIPSEND" "LIBS=" "LLIB=-ll"
+       make ipresend "ROBJS=$(ROBJS)" "UNIXOBJS=$(ULTRIX)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS)" "LIBS="
+       make iptest "TOBJS=$(TOBJS)" "UNIXOBJS=$(ULTRIX)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS)" "LIBS="
+
+hpux9 :
+       make ipsend "OBJS=$(OBJS)" "UNIXOBJS=$(HPUX)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS) -DIPSEND" "LIBS="
+       make ipresend "ROBJS=$(ROBJS)" "UNIXOBJS=$(HPUX)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS)" "LIBS="
+       make iptest "TOBJS=$(TOBJS)" "UNIXOBJS=$(HPUX)" "CC=$(CC)" \
+               CFLAGS="$(CFLAGS)" "LIBS="
+
+ipsend: ipf $(OBJS) $(UNIXOBJS)
+       $(CC) $(OBJS) $(UNIXOBJS) -o $@ $(LIBS) $(LLIB) $(ELIB)
+
+ipresend: $(ROBJS) $(UNIXOBJS)
+       $(CC) $(ROBJS) $(UNIXOBJS) -o $@ $(LIBS) $(ELIB)
+
+iptest: $(TOBJS) $(UNIXOBJS)
+       $(CC) $(TOBJS) $(UNIXOBJS) -o $@ $(LIBS) $(ELIB)
+
+ipft_ef.o: ipf/ipft_ef.c ipf/ipt.h ipf/ipf.h ipf/ip_compat.h
+       $(CC) $(CFLAGS) $(LINUXK) -c ipf/ipft_ef.c -o $@
+
+ipft_hx.o: ipf/ipft_hx.c ipf/ipt.h ipf/ipf.h ipf/ip_compat.h
+       $(CC) $(CFLAGS) $(LINUXK) -c ipf/ipft_hx.c -o $@
+
+ipft_pc.o: ipf/ipft_pc.c ipf/ipt.h ipf/ipf.h ipf/ip_compat.h
+       $(CC) $(CFLAGS) $(LINUXK) -c ipf/ipft_pc.c -o $@
+
+ipft_sn.o: ipf/ipft_sn.c ipf/ipt.h ipf/ipf.h ipf/ip_compat.h
+       $(CC) $(CFLAGS) $(LINUXK) -c ipf/ipft_sn.c -o $@



Home | Main Index | Thread Index | Old Index