summaryrefslogtreecommitdiff
path: root/ipsend/iptests.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipsend/iptests.c')
-rw-r--r--ipsend/iptests.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/ipsend/iptests.c b/ipsend/iptests.c
index 56cc34b9f87dd..1ac04f577a91e 100644
--- a/ipsend/iptests.c
+++ b/ipsend/iptests.c
@@ -1,12 +1,12 @@
/*
- * 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>
@@ -20,7 +20,7 @@ typedef int boolean_t;
#endif
#include <sys/time.h>
#if !defined(__osf__)
-# ifdef __NetBSD__
+# ifdef __NetBSD__
# include <machine/lock.h>
# endif
# define _KERNEL
@@ -49,8 +49,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>
@@ -65,9 +66,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>
@@ -76,7 +74,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 :-/ */
@@ -84,12 +84,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
@@ -100,6 +94,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>
@@ -120,11 +120,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;
@@ -471,11 +471,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;
@@ -567,11 +567,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 };
@@ -768,11 +768,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;
@@ -933,11 +933,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;
@@ -1283,11 +1283,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;
@@ -1365,11 +1365,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