diff options
Diffstat (limited to 'contrib/ipfilter/ipsend/iptests.c')
-rw-r--r-- | contrib/ipfilter/ipsend/iptests.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/contrib/ipfilter/ipsend/iptests.c b/contrib/ipfilter/ipsend/iptests.c index 22ef71f..0ca02db 100644 --- a/contrib/ipfilter/ipsend/iptests.c +++ b/contrib/ipfilter/ipsend/iptests.c @@ -1,14 +1,14 @@ /* $FreeBSD$ */ /* - * Copyright (C) 1993-1998 by Darren Reed. + * Copyright (C) 2012 by Darren Reed. * * See the IPFILTER.LICENCE file for details on licencing. * */ #if !defined(lint) static const char sccsid[] = "%W% %G% (C)1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: iptests.c,v 2.8.2.9 2007/09/13 07:19:34 darrenr Exp $"; +static const char rcsid[] = "@(#)$Id$"; #endif #include <sys/param.h> #include <sys/types.h> @@ -22,7 +22,7 @@ typedef int boolean_t; #endif #include <sys/time.h> #if !defined(__osf__) -# ifdef __NetBSD__ +# ifdef __NetBSD__ # include <machine/lock.h> # include <machine/mutex.h> # endif @@ -52,8 +52,9 @@ typedef int boolean_t; #endif #if defined(solaris) # include <sys/stream.h> +#else +# include <sys/socketvar.h> #endif -#include <sys/socketvar.h> #ifdef sun #include <sys/systm.h> #include <sys/session.h> @@ -68,9 +69,6 @@ typedef int boolean_t; #ifdef __hpux # define _NET_ROUTE_INCLUDED #endif -#ifdef __osf__ -# include "radix_ipf_local.h" -#endif #include <net/if.h> #if defined(linux) && (LINUX >= 0200) # include <asm/atomic.h> @@ -79,7 +77,9 @@ typedef int boolean_t; # if defined(__FreeBSD__) # include "radix_ipf.h" # endif -# include <net/route.h> +# if !defined(solaris) +# include <net/route.h> +# endif #else # define __KERNEL__ /* because there's a macro not wrapped by this */ # include <net/route.h> /* in this file :-/ */ @@ -87,12 +87,6 @@ typedef int boolean_t; #include <netinet/in.h> #include <arpa/inet.h> #include <netinet/ip.h> -#if !defined(linux) -# include <netinet/ip_var.h> -# if !defined(__hpux) -# include <netinet/in_pcb.h> -# endif -#endif #if defined(__SVR4) || defined(__svr4__) || defined(__sgi) # include <sys/sysmacros.h> #endif @@ -103,6 +97,12 @@ typedef int boolean_t; #ifdef __hpux # undef _NET_ROUTE_INCLUDED #endif +#if !defined(linux) +# include <netinet/ip_var.h> +# if !defined(__hpux) && !defined(solaris) +# include <netinet/in_pcb.h> +# endif +#endif #include "ipsend.h" #if !defined(linux) && !defined(__hpux) # include <netinet/tcp_timer.h> @@ -123,11 +123,11 @@ typedef int boolean_t; void ip_test1(dev, mtu, ip, gwip, ptest) -char *dev; -int mtu; -ip_t *ip; -struct in_addr gwip; -int ptest; + char *dev; + int mtu; + ip_t *ip; + struct in_addr gwip; + int ptest; { #ifdef USE_NANOSLEEP struct timespec ts; @@ -474,11 +474,11 @@ int ptest; void ip_test2(dev, mtu, ip, gwip, ptest) -char *dev; -int mtu; -ip_t *ip; -struct in_addr gwip; -int ptest; + char *dev; + int mtu; + ip_t *ip; + struct in_addr gwip; + int ptest; { #ifdef USE_NANOSLEEP struct timespec ts; @@ -570,11 +570,11 @@ int ptest; * test 3 (ICMP) */ void ip_test3(dev, mtu, ip, gwip, ptest) -char *dev; -int mtu; -ip_t *ip; -struct in_addr gwip; -int ptest; + char *dev; + int mtu; + ip_t *ip; + struct in_addr gwip; + int ptest; { static int ict1[10] = { 8, 9, 10, 13, 14, 15, 16, 17, 18, 0 }; static int ict2[8] = { 3, 9, 10, 13, 14, 17, 18, 0 }; @@ -771,11 +771,11 @@ int ptest; /* Perform test 4 (UDP) */ void ip_test4(dev, mtu, ip, gwip, ptest) -char *dev; -int mtu; -ip_t *ip; -struct in_addr gwip; -int ptest; + char *dev; + int mtu; + ip_t *ip; + struct in_addr gwip; + int ptest; { #ifdef USE_NANOSLEEP struct timespec ts; @@ -936,11 +936,11 @@ int ptest; /* Perform test 5 (TCP) */ void ip_test5(dev, mtu, ip, gwip, ptest) -char *dev; -int mtu; -ip_t *ip; -struct in_addr gwip; -int ptest; + char *dev; + int mtu; + ip_t *ip; + struct in_addr gwip; + int ptest; { #ifdef USE_NANOSLEEP struct timespec ts; @@ -1286,11 +1286,11 @@ skip_five_and_six: /* Perform test 6 (exhaust mbuf test) */ void ip_test6(dev, mtu, ip, gwip, ptest) -char *dev; -int mtu; -ip_t *ip; -struct in_addr gwip; -int ptest; + char *dev; + int mtu; + ip_t *ip; + struct in_addr gwip; + int ptest; { #ifdef USE_NANOSLEEP struct timespec ts; @@ -1368,11 +1368,11 @@ int ptest; static u_long tbuf[64]; void ip_test7(dev, mtu, ip, gwip, ptest) -char *dev; -int mtu; -ip_t *ip; -struct in_addr gwip; -int ptest; + char *dev; + int mtu; + ip_t *ip; + struct in_addr gwip; + int ptest; { ip_t *pip; #ifdef USE_NANOSLEEP |