diff options
Diffstat (limited to 'usr.sbin/ipftest/misc.c')
-rw-r--r-- | usr.sbin/ipftest/misc.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/usr.sbin/ipftest/misc.c b/usr.sbin/ipftest/misc.c index 7de936cd95a..ba2ec314100 100644 --- a/usr.sbin/ipftest/misc.c +++ b/usr.sbin/ipftest/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.8 1999/02/05 05:58:47 deraadt Exp $ */ +/* $OpenBSD: misc.c,v 1.9 1999/12/15 05:20:27 kjell Exp $ */ /* * Copyright (C) 1993-1998 by Darren Reed. * @@ -6,6 +6,15 @@ * provided that this notice is preserved and due credit is given * to the original author and the contributors. */ +#if (SOLARIS2 >= 7) +# define _SYS_VARARGS_H +# define _VARARGS_H +#endif +#if defined(__STDC__) +# include <stdarg.h> +#else +# include <varargs.h> +#endif #include <stdio.h> #include <assert.h> #include <string.h> @@ -36,11 +45,7 @@ #include <netdb.h> #include <arpa/nameser.h> #include <resolv.h> -#if defined(__OpenBSD__) -# include <netinet/ip_fil_compat.h> -#else -# include <netinet/ip_compat.h> -#endif +#include <netinet/ip_fil_compat.h> #include <netinet/tcpip.h> #include <netinet/ip_fil.h> #include "ipf.h" @@ -48,7 +53,7 @@ #if !defined(lint) static const char sccsid[] = "@(#)misc.c 1.3 2/4/96 (C) 1995 Darren Reed"; -static const char rcsid[] = "@(#)$Id: misc.c,v 1.8 1999/02/05 05:58:47 deraadt Exp $"; +static const char rcsid[] = "@(#)$Id: misc.c,v 1.9 1999/12/15 05:20:27 kjell Exp $"; #endif extern int opts; @@ -60,9 +65,9 @@ ip_t *ip; tcphdr_t *tcp; tcp = (struct tcphdr *)((char *)ip + (ip->ip_hl << 2)); - printf("ip %d(%d) %d ", ip->ip_len, ip->ip_hl << 2, ip->ip_p); + printf("ip %d(%d) %d", ip->ip_len, ip->ip_hl << 2, ip->ip_p); if (ip->ip_off & IP_OFFMASK) - printf("@%d", ip->ip_off << 3); + printf(" @%d", ip->ip_off << 3); (void)printf(" %s", inet_ntoa(ip->ip_src)); if (!(ip->ip_off & IP_OFFMASK)) if (ip->ip_p == IPPROTO_TCP || ip->ip_p == IPPROTO_UDP) @@ -75,7 +80,8 @@ ip_t *ip; putchar('\n'); } -#ifdef __STDC__ + +#if defined(__STDC__) void verbose(char *fmt, ...) #else void verbose(fmt, va_alist) |