diff options
-rw-r--r-- | sys/arch/alpha/conf/files.alpha | 3 | ||||
-rw-r--r-- | sys/arch/arm/conf/files.arm | 3 | ||||
-rw-r--r-- | sys/arch/i386/conf/files.i386 | 3 | ||||
-rw-r--r-- | sys/arch/i386/i386/ns_cksum.c | 204 | ||||
-rw-r--r-- | sys/arch/m68k/conf/files.m68k | 3 | ||||
-rw-r--r-- | sys/arch/m68k/m68k/ns_cksum.c | 204 | ||||
-rw-r--r-- | sys/arch/m88k/conf/files.m88k | 4 | ||||
-rw-r--r-- | sys/arch/mips64/conf/files.mips64 | 3 | ||||
-rw-r--r-- | sys/arch/sparc/conf/files.sparc | 5 | ||||
-rw-r--r-- | sys/arch/vax/conf/files.vax | 3 | ||||
-rw-r--r-- | sys/arch/vax/vax/ns_cksum.c | 160 | ||||
-rw-r--r-- | sys/kern/Make.tags.inc | 4 | ||||
-rw-r--r-- | sys/kern/Makefile | 4 | ||||
-rw-r--r-- | sys/netinet/in_proto.c | 18 |
14 files changed, 14 insertions, 607 deletions
diff --git a/sys/arch/alpha/conf/files.alpha b/sys/arch/alpha/conf/files.alpha index 867b870c4c3..7bb99cfd002 100644 --- a/sys/arch/alpha/conf/files.alpha +++ b/sys/arch/alpha/conf/files.alpha @@ -1,4 +1,4 @@ -# $OpenBSD: files.alpha,v 1.67 2005/05/09 21:54:58 brad Exp $ +# $OpenBSD: files.alpha,v 1.68 2005/07/14 02:09:46 uwe Exp $ # $NetBSD: files.alpha,v 1.32 1996/11/25 04:03:21 cgd Exp $ # # alpha-specific configuration info @@ -289,7 +289,6 @@ file dev/clock_subr.c # file arch/alpha/alpha/in_cksum.c inet -file netns/ns_cksum.c ns # XXX file arch/alpha/alpha/promcons.c diff --git a/sys/arch/arm/conf/files.arm b/sys/arch/arm/conf/files.arm index c080f51a262..5ca86bc4e4e 100644 --- a/sys/arch/arm/conf/files.arm +++ b/sys/arch/arm/conf/files.arm @@ -1,4 +1,4 @@ -# $OpenBSD: files.arm,v 1.7 2005/05/10 21:32:20 brad Exp $ +# $OpenBSD: files.arm,v 1.8 2005/07/14 02:09:46 uwe Exp $ # $NetBSD: files.arm,v 1.76 2003/11/05 12:53:15 scw Exp $ # CPU types. Make sure to update <arm/cpuconf.h> if you change this list. @@ -33,7 +33,6 @@ # generic networking files file arch/arm/arm/in_cksum_arm.S inet -file netns/ns_cksum.c ns # DDB file arch/arm/arm/db_disasm.c ddb diff --git a/sys/arch/i386/conf/files.i386 b/sys/arch/i386/conf/files.i386 index a61bfa4fbf7..e0fe53ec639 100644 --- a/sys/arch/i386/conf/files.i386 +++ b/sys/arch/i386/conf/files.i386 @@ -1,4 +1,4 @@ -# $OpenBSD: files.i386,v 1.135 2005/06/02 20:09:39 tholo Exp $ +# $OpenBSD: files.i386,v 1.136 2005/07/14 02:09:46 uwe Exp $ # # new style config file for i386 architecture # @@ -30,7 +30,6 @@ file arch/i386/i386/mem.c file arch/i386/i386/i686_mem.c mtrr file arch/i386/i386/k6_mem.c mtrr file arch/i386/i386/microtime.s -file arch/i386/i386/ns_cksum.c ns file arch/i386/i386/p4tcc.c !small_kernel & i686_cpu file arch/i386/i386/pmap.c file arch/i386/i386/powernow.c !small_kernel diff --git a/sys/arch/i386/i386/ns_cksum.c b/sys/arch/i386/i386/ns_cksum.c deleted file mode 100644 index c5fb8caba3a..00000000000 --- a/sys/arch/i386/i386/ns_cksum.c +++ /dev/null @@ -1,204 +0,0 @@ -/* $OpenBSD: ns_cksum.c,v 1.6 2003/06/02 23:27:47 millert Exp $ */ -/* $NetBSD: ns_cksum.c,v 1.5 1996/05/03 19:42:20 christos Exp $ */ - -/* - * Copyright (c) 1982, 1988 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ns_cksum.c 7.7 (Berkeley) 4/29/91 - */ - -#include <sys/param.h> -#include <sys/mbuf.h> -#include <netns/ns_var.h> - -/* - * Checksum routine for Network Systems Protocol Packets (Big-Endian). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) { if ((x) > 65535) (x) -= 65535; } -#define FOLD(x) {l_util.l = (x); (x) = l_util.s[0] + l_util.s[1]; ADDCARRY(x);} - -u_short -ns_cksum(m, len) - register struct mbuf *m; - register int len; -{ - register u_short *w; - register int sum = 0; - register int mlen = 0; - register int sum2; - - union { - u_short s[2]; - long l; - } l_util; - - for (;m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - /* - * Each trip around loop adds in - * word from one mbuf segment. - */ - w = mtod(m, u_short *); - if (mlen == -1) { - /* - * There is a byte left from the last segment; - * ones-complement add it into the checksum. - */ -#if BYTE_ORDER == BIG_ENDIAN - sum += *(u_char *)w; -#else - sum += *(u_char *)w << 8; -#endif - sum += sum; - w = (u_short *)(1 + (char *)w); - mlen = m->m_len - 1; - len--; - FOLD(sum); - } else - mlen = m->m_len; - if (len < mlen) - mlen = len; - len -= mlen; - /* - * We can do a 16 bit ones complement sum using - * 32 bit arithmetic registers for adding, - * with carries from the low added - * into the high (by normal carry-chaining) - * so long as we fold back before 16 carries have occurred. - */ - if (1 & (int) w) - goto uuuuglyy; -#ifndef TINY -/* -DTINY reduces the size from 1250 to 550, but slows it down by 22% */ - while ((mlen -= 32) >= 0) { - sum += w[0]; sum += sum; sum += w[1]; sum += sum; - sum += w[2]; sum += sum; sum += w[3]; sum += sum; - sum += w[4]; sum += sum; sum += w[5]; sum += sum; - sum += w[6]; sum += sum; sum += w[7]; sum += sum; - FOLD(sum); - sum += w[8]; sum += sum; sum += w[9]; sum += sum; - sum += w[10]; sum += sum; sum += w[11]; sum += sum; - sum += w[12]; sum += sum; sum += w[13]; sum += sum; - sum += w[14]; sum += sum; sum += w[15]; sum += sum; - FOLD(sum); - w += 16; - } - mlen += 32; -#endif - while ((mlen -= 8) >= 0) { - sum += w[0]; sum += sum; sum += w[1]; sum += sum; - sum += w[2]; sum += sum; sum += w[3]; sum += sum; - FOLD(sum); - w += 4; - } - mlen += 8; - while ((mlen -= 2) >= 0) { - sum += *w++; sum += sum; - } - goto commoncase; -uuuuglyy: -#if BYTE_ORDER == BIG_ENDIAN -#define ww(n) (((u_char *)w)[n + n + 1]) -#define vv(n) (((u_char *)w)[n + n]) -#else -#if BYTE_ORDER == LITTLE_ENDIAN -#define vv(n) (((u_char *)w)[n + n + 1]) -#define ww(n) (((u_char *)w)[n + n]) -#endif -#endif - sum2 = 0; -#ifndef TINY - while ((mlen -= 32) >= 0) { - sum += ww(0); sum += sum; sum += ww(1); sum += sum; - sum += ww(2); sum += sum; sum += ww(3); sum += sum; - sum += ww(4); sum += sum; sum += ww(5); sum += sum; - sum += ww(6); sum += sum; sum += ww(7); sum += sum; - FOLD(sum); - sum += ww(8); sum += sum; sum += ww(9); sum += sum; - sum += ww(10); sum += sum; sum += ww(11); sum += sum; - sum += ww(12); sum += sum; sum += ww(13); sum += sum; - sum += ww(14); sum += sum; sum += ww(15); sum += sum; - FOLD(sum); - sum2 += vv(0); sum2 += sum2; sum2 += vv(1); sum2 += sum2; - sum2 += vv(2); sum2 += sum2; sum2 += vv(3); sum2 += sum2; - sum2 += vv(4); sum2 += sum2; sum2 += vv(5); sum2 += sum2; - sum2 += vv(6); sum2 += sum2; sum2 += vv(7); sum2 += sum2; - FOLD(sum2); - sum2 += vv(8); sum2 += sum2; sum2 += vv(9); sum2 += sum2; - sum2 += vv(10); sum2 += sum2; sum2 += vv(11); sum2 += sum2; - sum2 += vv(12); sum2 += sum2; sum2 += vv(13); sum2 += sum2; - sum2 += vv(14); sum2 += sum2; sum2 += vv(15); sum2 += sum2; - FOLD(sum2); - w += 16; - } - mlen += 32; -#endif - while ((mlen -= 8) >= 0) { - sum += ww(0); sum += sum; sum += ww(1); sum += sum; - sum += ww(2); sum += sum; sum += ww(3); sum += sum; - FOLD(sum); - sum2 += vv(0); sum2 += sum2; sum2 += vv(1); sum2 += sum2; - sum2 += vv(2); sum2 += sum2; sum2 += vv(3); sum2 += sum2; - FOLD(sum2); - w += 4; - } - mlen += 8; - while ((mlen -= 2) >= 0) { - sum += ww(0); sum += sum; - sum2 += vv(0); sum2 += sum2; - w++; - } - sum += (sum2 << 8); -commoncase: - if (mlen == -1) { -#if BYTE_ORDER == BIG_ENDIAN - sum += *(u_char *)w << 8; -#else - sum += *(u_char *)w; -#endif - } - FOLD(sum); - } - if (mlen == -1) { - /* We had an odd number of bytes to sum; assume a garbage - byte of zero and clean up */ - sum += sum; - FOLD(sum); - } - /* - * sum has already been kept to low sixteen bits. - * just examine result and exit. - */ - if(sum==0xffff) sum = 0; - return (sum); -} diff --git a/sys/arch/m68k/conf/files.m68k b/sys/arch/m68k/conf/files.m68k index 5535198928b..a17fd1b5fb3 100644 --- a/sys/arch/m68k/conf/files.m68k +++ b/sys/arch/m68k/conf/files.m68k @@ -1,4 +1,4 @@ -# $OpenBSD: files.m68k,v 1.12 2005/05/01 21:36:56 brad Exp $ +# $OpenBSD: files.m68k,v 1.13 2005/07/14 02:09:46 uwe Exp $ # $NetBSD: files.m68k,v 1.18 1997/06/06 23:15:28 veego Exp $ # file arch/m68k/m68k/db_disasm.c ddb @@ -9,7 +9,6 @@ file netinet/in4_cksum.c inet file arch/m68k/m68k/kgdb_m68k.c kgdb file arch/m68k/m68k/m68k_machdep.c file arch/m68k/m68k/mappedcopy.c mappedcopy -file arch/m68k/m68k/ns_cksum.c ns file arch/m68k/m68k/oc_cksum.s inet file arch/m68k/m68k/process_machdep.c file arch/m68k/m68k/sig_machdep.c diff --git a/sys/arch/m68k/m68k/ns_cksum.c b/sys/arch/m68k/m68k/ns_cksum.c deleted file mode 100644 index 7ef9d75502b..00000000000 --- a/sys/arch/m68k/m68k/ns_cksum.c +++ /dev/null @@ -1,204 +0,0 @@ -/* $OpenBSD: ns_cksum.c,v 1.4 2003/06/02 23:27:48 millert Exp $ */ -/* $NetBSD: ns_cksum.c,v 1.5 1996/04/01 01:38:15 briggs Exp $ */ - -/* - * Copyright (c) 1982, 1988 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ns_cksum.c 7.7 (Berkeley) 4/29/91 - */ - -#include <sys/param.h> -#include <sys/mbuf.h> -#include <netns/ns_var.h> - -/* - * Checksum routine for Network Systems Protocol Packets (Big-Endian). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -#define ADDCARRY(x) { if ((x) > 65535) (x) -= 65535; } -#define FOLD(x) {l_util.l = (x); (x) = l_util.s[0] + l_util.s[1]; ADDCARRY(x);} - -u_short -ns_cksum(m, len) - register struct mbuf *m; - register int len; -{ - register u_short *w; - register int sum = 0; - register int mlen = 0; - register int sum2; - - union { - u_short s[2]; - long l; - } l_util; - - for (;m && len; m = m->m_next) { - if (m->m_len == 0) - continue; - /* - * Each trip around loop adds in - * word from one mbuf segment. - */ - w = mtod(m, u_short *); - if (mlen == -1) { - /* - * There is a byte left from the last segment; - * ones-complement add it into the checksum. - */ -#if BYTE_ORDER == BIG_ENDIAN - sum += *(u_char *)w; -#else - sum += *(u_char *)w << 8; -#endif - sum += sum; - w = (u_short *)(1 + (char *)w); - mlen = m->m_len - 1; - len--; - FOLD(sum); - } else - mlen = m->m_len; - if (len < mlen) - mlen = len; - len -= mlen; - /* - * We can do a 16 bit ones complement sum using - * 32 bit arithmetic registers for adding, - * with carries from the low added - * into the high (by normal carry-chaining) - * so long as we fold back before 16 carries have occurred. - */ - if (1 & (int) w) - goto uuuuglyy; -#ifndef TINY -/* -DTINY reduces the size from 1250 to 550, but slows it down by 22% */ - while ((mlen -= 32) >= 0) { - sum += w[0]; sum += sum; sum += w[1]; sum += sum; - sum += w[2]; sum += sum; sum += w[3]; sum += sum; - sum += w[4]; sum += sum; sum += w[5]; sum += sum; - sum += w[6]; sum += sum; sum += w[7]; sum += sum; - FOLD(sum); - sum += w[8]; sum += sum; sum += w[9]; sum += sum; - sum += w[10]; sum += sum; sum += w[11]; sum += sum; - sum += w[12]; sum += sum; sum += w[13]; sum += sum; - sum += w[14]; sum += sum; sum += w[15]; sum += sum; - FOLD(sum); - w += 16; - } - mlen += 32; -#endif - while ((mlen -= 8) >= 0) { - sum += w[0]; sum += sum; sum += w[1]; sum += sum; - sum += w[2]; sum += sum; sum += w[3]; sum += sum; - FOLD(sum); - w += 4; - } - mlen += 8; - while ((mlen -= 2) >= 0) { - sum += *w++; sum += sum; - } - goto commoncase; -uuuuglyy: -#if BYTE_ORDER == BIG_ENDIAN -#define ww(n) (((u_char *)w)[n + n + 1]) -#define vv(n) (((u_char *)w)[n + n]) -#else -#if BYTE_ORDER == LITTLE_ENDIAN -#define vv(n) (((u_char *)w)[n + n + 1]) -#define ww(n) (((u_char *)w)[n + n]) -#endif -#endif - sum2 = 0; -#ifndef TINY - while ((mlen -= 32) >= 0) { - sum += ww(0); sum += sum; sum += ww(1); sum += sum; - sum += ww(2); sum += sum; sum += ww(3); sum += sum; - sum += ww(4); sum += sum; sum += ww(5); sum += sum; - sum += ww(6); sum += sum; sum += ww(7); sum += sum; - FOLD(sum); - sum += ww(8); sum += sum; sum += ww(9); sum += sum; - sum += ww(10); sum += sum; sum += ww(11); sum += sum; - sum += ww(12); sum += sum; sum += ww(13); sum += sum; - sum += ww(14); sum += sum; sum += ww(15); sum += sum; - FOLD(sum); - sum2 += vv(0); sum2 += sum2; sum2 += vv(1); sum2 += sum2; - sum2 += vv(2); sum2 += sum2; sum2 += vv(3); sum2 += sum2; - sum2 += vv(4); sum2 += sum2; sum2 += vv(5); sum2 += sum2; - sum2 += vv(6); sum2 += sum2; sum2 += vv(7); sum2 += sum2; - FOLD(sum2); - sum2 += vv(8); sum2 += sum2; sum2 += vv(9); sum2 += sum2; - sum2 += vv(10); sum2 += sum2; sum2 += vv(11); sum2 += sum2; - sum2 += vv(12); sum2 += sum2; sum2 += vv(13); sum2 += sum2; - sum2 += vv(14); sum2 += sum2; sum2 += vv(15); sum2 += sum2; - FOLD(sum2); - w += 16; - } - mlen += 32; -#endif - while ((mlen -= 8) >= 0) { - sum += ww(0); sum += sum; sum += ww(1); sum += sum; - sum += ww(2); sum += sum; sum += ww(3); sum += sum; - FOLD(sum); - sum2 += vv(0); sum2 += sum2; sum2 += vv(1); sum2 += sum2; - sum2 += vv(2); sum2 += sum2; sum2 += vv(3); sum2 += sum2; - FOLD(sum2); - w += 4; - } - mlen += 8; - while ((mlen -= 2) >= 0) { - sum += ww(0); sum += sum; - sum2 += vv(0); sum2 += sum2; - w++; - } - sum += (sum2 << 8); -commoncase: - if (mlen == -1) { -#if BYTE_ORDER == BIG_ENDIAN - sum += *(u_char *)w << 8; -#else - sum += *(u_char *)w; -#endif - } - FOLD(sum); - } - if (mlen == -1) { - /* We had an odd number of bytes to sum; assume a garbage - byte of zero and clean up */ - sum += sum; - FOLD(sum); - } - /* - * sum has already been kept to low sixteen bits. - * just examine result and exit. - */ - if(sum==0xffff) sum = 0; - return (sum); -} diff --git a/sys/arch/m88k/conf/files.m88k b/sys/arch/m88k/conf/files.m88k index b29195bd99a..b08877e4a96 100644 --- a/sys/arch/m88k/conf/files.m88k +++ b/sys/arch/m88k/conf/files.m88k @@ -1,4 +1,4 @@ -# $OpenBSD: files.m88k,v 1.12 2005/05/05 14:28:32 miod Exp $ +# $OpenBSD: files.m88k,v 1.13 2005/07/14 02:09:46 uwe Exp $ file arch/m88k/m88k/cmmu.c file arch/m88k/m88k/db_disasm.c ddb @@ -20,5 +20,3 @@ file arch/m88k/m88k/trap.c file arch/m88k/m88k/vectors_88100.S m88100 file arch/m88k/m88k/vectors_88110.S m88110 file arch/m88k/m88k/vm_machdep.c - -file netns/ns_cksum.c ns diff --git a/sys/arch/mips64/conf/files.mips64 b/sys/arch/mips64/conf/files.mips64 index 7d0a26a8747..b54b74857d2 100644 --- a/sys/arch/mips64/conf/files.mips64 +++ b/sys/arch/mips64/conf/files.mips64 @@ -1,4 +1,4 @@ -# $OpenBSD: files.mips64,v 1.6 2005/05/02 16:54:19 deraadt Exp $ +# $OpenBSD: files.mips64,v 1.7 2005/07/14 02:09:46 uwe Exp $ file arch/mips64/mips64/disksubr.c disk file arch/mips64/mips64/mem.c @@ -32,4 +32,3 @@ file arch/mips64/mips64/lcore_ddb.S ddb|debug file netinet/in_cksum.c inet file netinet/in4_cksum.c inet -file netns/ns_cksum.c ns diff --git a/sys/arch/sparc/conf/files.sparc b/sys/arch/sparc/conf/files.sparc index 4b01ee5618d..afbcec9527b 100644 --- a/sys/arch/sparc/conf/files.sparc +++ b/sys/arch/sparc/conf/files.sparc @@ -1,4 +1,4 @@ -# $OpenBSD: files.sparc,v 1.68 2005/07/08 12:36:36 miod Exp $ +# $OpenBSD: files.sparc,v 1.69 2005/07/14 02:09:46 uwe Exp $ # $NetBSD: files.sparc,v 1.44 1997/08/31 21:29:16 pk Exp $ # @(#)files.sparc 8.1 (Berkeley) 7/19/93 @@ -317,9 +317,6 @@ file arch/sparc/sparc/sunos_machdep.c compat_sunos # SunOS Binary Compatibility (COMPAT_SUNOS) include "../../../compat/sunos/files.sunos" -# Miscellaneous -file netns/ns_cksum.c ns - # Magma Serial/Parallel boards device magma {} attach magma at sbus diff --git a/sys/arch/vax/conf/files.vax b/sys/arch/vax/conf/files.vax index 57aeaa78efc..cb50137de57 100644 --- a/sys/arch/vax/conf/files.vax +++ b/sys/arch/vax/conf/files.vax @@ -1,4 +1,4 @@ -# $OpenBSD: files.vax,v 1.31 2005/05/10 04:04:39 brad Exp $ +# $OpenBSD: files.vax,v 1.32 2005/07/14 02:09:46 uwe Exp $ # $NetBSD: files.vax,v 1.60 1999/08/27 20:04:32 ragge Exp $ # # new style config file for vax architecture @@ -346,7 +346,6 @@ file arch/vax/vax/rootfil.c file arch/vax/vax/autoconf.c file arch/vax/vax/in_cksum.c inet file arch/vax/vax/in4_cksum.c inet -file arch/vax/vax/ns_cksum.c ns file arch/vax/vax/disksubr.c disk | tape file arch/vax/vax/db_machdep.c ddb file arch/vax/vax/db_disasm.c ddb diff --git a/sys/arch/vax/vax/ns_cksum.c b/sys/arch/vax/vax/ns_cksum.c deleted file mode 100644 index 53a97ec32ac..00000000000 --- a/sys/arch/vax/vax/ns_cksum.c +++ /dev/null @@ -1,160 +0,0 @@ -/* $OpenBSD: ns_cksum.c,v 1.5 2003/06/02 23:27:59 millert Exp $ */ -/* $NetBSD: ns_cksum.c,v 1.3 1996/10/13 03:35:55 christos Exp $ */ -/* - * Copyright (c) 1985, 1986 Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * @(#)ns_cksum.c 7.6 (Berkeley) 12/16/90 - */ - -#include <sys/param.h> -#include <sys/mbuf.h> - - -/* - * Checksum routine for Network Systems Protocol Packets (VAX Version). - * - * This routine is very heavily used in the network - * code and should be modified for each CPU to be as fast as possible. - */ - -u_short -ns_cksum(m, len) - register struct mbuf *m; - register int len; -{ - register u_short *w asm("r9"); /* on vax, known to be r9 */ - register int sum asm("r8"); /* on vax, known to be r8 */ - register int low asm("r7"); /* on vax, known to be r7 */ - register int mlen; /* want 0, shuts lint up about low */ - - sum = 0; - low = 0; - mlen = 0; - for (;;) { - /* - * Each trip around loop adds in - * word from one mbuf segment. - */ - w = mtod(m, u_short *); - if (mlen == -1) { - /* - * There is a byte left from the last segment; - * add it into the checksum. Don't have to worry - * about a carry-out here because we make sure - * that high part of (32 bit) sum is small below. - */ - sum += *(u_char *)w << 8; - sum += sum; - w = (u_short *)((char *)w + 1); - mlen = m->m_len - 1; - len--; - } else - mlen = m->m_len; - m = m->m_next; - if (len < mlen) - mlen = len; - len -= mlen; - /* - * Force to long boundary so we do longword aligned - * memory operations. It is too hard to do byte - * adjustment, do only word adjustment. - */ - if (((int)w&0x2) && mlen >= 2) { - sum += *w++; - sum += sum; - mlen -= 2; - } - /* - * - * We can do a 16 bit ones complement sum using - * 32 bit arithmetic registers for adding, - * with carries from the low added - * into the high (by normal carry-chaining) - * so long as we fold back before 16 carries have occurred. - * - */ - while ((mlen -= 32) >= 0) { - /*asm("bicpsw $1"); clears carry */ -#undef ADD -#define ADD asm("movw (r9)+,r7; addl2 r7,r8; addl2 r8,r8") -#define FOLD { asm("ashl $-16,r8,r0; addw2 r0,r8; adwc $0,r8; movzwl r8,r8"); } - FOLD; - ADD; ADD; ADD; ADD; ADD; ADD; ADD; ADD; - FOLD; - ADD; ADD; ADD; ADD; ADD; ADD; ADD; ADD; - } - mlen += 32; - while ((mlen -= 8) >= 0) { - /*asm("bicpsw $1"); clears carry */ - FOLD; - ADD; ADD; ADD; ADD; - } - mlen += 8; - /* - * Now eliminate the possibility of carry-out's by - * folding back to a 16 bit number (adding high and - * low parts together.) Then mop up trailing words - * and maybe an odd byte. - */ - FOLD; - while ((mlen -= 2) >= 0) { - ADD; - } - if (mlen == -1) { - sum += *(u_char *)w; - } - if (len == 0) - break; - /* - * Locate the next block with some data. - * If there is a word split across a boundary we - * will wrap to the top with mlen == -1 and - * then add it in shifted appropriately. - */ - for (;;) { - if (m == 0) { - printf("idpcksum: out of data\n"); - goto done; - } - if (m->m_len) - break; - m = m->m_next; - } - } -done: - /* - * Add together high and low parts of sum - * and carry to get cksum. - * Have to be careful to not drop the last - * carry here. - */ - FOLD; - - if(sum==0xffff) sum = 0; - return (sum); -} diff --git a/sys/kern/Make.tags.inc b/sys/kern/Make.tags.inc index 2e14f7e9c94..92739a337c9 100644 --- a/sys/kern/Make.tags.inc +++ b/sys/kern/Make.tags.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Make.tags.inc,v 1.8 2004/11/22 17:08:38 pat Exp $ +# $OpenBSD: Make.tags.inc,v 1.9 2005/07/14 02:09:46 uwe Exp $ # Common files for "make tags". # Included by the Makefile for each architecture. @@ -21,12 +21,10 @@ COMM= $S/adosfs/*.[ch] \ $S/msdosfs/*.[ch] \ $S/net/*.[ch] \ $S/netatalk/*.[ch] \ - $S/netccitt/*.[ch] \ $S/netinet/*.[ch] \ $S/netinet6/*.[ch] \ $S/netipx/*.[ch] \ $S/netnatm/*.[ch] \ - $S/netns/*.[ch] \ $S/nfs/*.[ch] \ $S/scsi/*.[ch] \ $S/ufs/*/*.[ch] \ diff --git a/sys/kern/Makefile b/sys/kern/Makefile index c5e8c6a7772..b6049283caa 100644 --- a/sys/kern/Makefile +++ b/sys/kern/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.12 2005/05/26 22:06:24 fgsch Exp $ +# $OpenBSD: Makefile,v 1.13 2005/07/14 02:09:46 uwe Exp $ # Makefile for kernel tags files, init_sysent, etc. @@ -42,7 +42,7 @@ DGEN= adosfs \ miscfs miscfs/deadfs miscfs/fdesc miscfs/fifofs miscfs/kernfs \ miscfs/portal miscfs/procfs miscfs/specfs \ msdosfs \ - net netccitt netinet netns \ + net netinet \ nfs \ scsi \ sys \ diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index 61b3c1ca6ac..41a27a99ce8 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in_proto.c,v 1.43 2005/01/14 14:51:27 mcbride Exp $ */ +/* $OpenBSD: in_proto.c,v 1.44 2005/07/14 02:09:46 uwe Exp $ */ /* $NetBSD: in_proto.c,v 1.14 1996/02/18 18:58:32 christos Exp $ */ /* @@ -143,15 +143,10 @@ #include <netinet/in_gif.h> #endif -#ifdef NSIP -#include <netns/ns_var.h> -#include <netns/idp_var.h> -#endif /* NSIP */ - #ifdef IPXIP #include <netipx/ipx.h> #include <netipx/ipx_ip.h> -#endif /* NSIP */ +#endif /* IPXIP */ #ifdef MROUTING #include <netinet/ip_mroute.h> @@ -258,14 +253,7 @@ struct protosw inetsw[] = { rip_usrreq, ipxipprotoinit,0, 0, 0, }, -#endif /* NSIP */ -#ifdef NSIP -{ SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR, - idpip_input, rip_output, nsip_ctlinput, 0, - rip_usrreq, - 0, 0, 0, 0, -}, -#endif /* NSIP */ +#endif /* IPXIP */ #ifdef IPSEC { SOCK_RAW, &inetdomain, IPPROTO_AH, PR_ATOMIC|PR_ADDR, ah4_input, rip_output, ah4_ctlinput, rip_ctloutput, |