diff options
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | acconfig.h | 4 | ||||
-rw-r--r-- | configure.in | 9 | ||||
-rw-r--r-- | inet_ntop.c | 6 | ||||
-rw-r--r-- | inet_pton.c | 4 | ||||
-rw-r--r-- | inet_v6defs.h | 47 | ||||
-rw-r--r-- | packet.c | 6 | ||||
-rw-r--r-- | resolv.c | 7 |
8 files changed, 75 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am index a19930e25a..1caabf297f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ # Makefile.am # Automake file for Ethereal # -# $Id: Makefile.am,v 1.86 1999/10/14 05:41:28 itojun Exp $ +# $Id: Makefile.am,v 1.87 1999/10/14 06:55:07 guy Exp $ # # Ethereal - Network traffic analyzer # By Gerald Combs <gerald@zing.org> @@ -168,7 +168,7 @@ ethereal_DEPENDENCIES = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \ @STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\ wiretap/libwiretap.a gtk/libui.a ethereal_LDADD = @SNMP_O@ @SNPRINTF_O@ @STRERROR_O@ \ -@STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_ATON_O@ @INET_NTOP_O@\ +@STRNCASECMP_O@ @MKSTEMP_O@ @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@\ wiretap/libwiretap.a gtk/libui.a \ @SNMP_A@ diff --git a/acconfig.h b/acconfig.h index b28b7f024c..ad6c942f83 100644 --- a/acconfig.h +++ b/acconfig.h @@ -1,7 +1,7 @@ /* acconfig.h * #ifdefs to be controlled by "configure" * - * $Id: acconfig.h,v 1.11 1999/10/06 03:37:52 guy Exp $ + * $Id: acconfig.h,v 1.12 1999/10/14 06:55:11 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -31,6 +31,8 @@ #undef DATAFILE_DIR +#undef NEED_INET_V6DEFS_H + #undef NEED_SNPRINTF_H #undef NEED_STRERROR_H diff --git a/configure.in b/configure.in index dfd62b59eb..4bcc514ccf 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -# $Id: configure.in,v 1.51 1999/10/14 05:41:28 itojun Exp $ +# $Id: configure.in,v 1.52 1999/10/14 06:55:08 guy Exp $ dnl Process this file with autoconf to produce a configure script. AC_INIT(etypes.h) @@ -228,10 +228,11 @@ AC_SUBST(INET_PTON_C) AC_SUBST(INET_PTON_O) AC_CHECK_FUNC(inet_ntop, INET_NTOP_O="", - INET_ATON_O="inet_ntop.o") + INET_NTOP_O="inet_ntop.o") if test "$ac_cv_func_inet_ntop" = no ; then - INET_ATON_C="inet_ntop.c" - INET_ATON_O="inet_ntop.o" + INET_NTOP_C="inet_ntop.c" + INET_NTOP_O="inet_ntop.o" + AC_DEFINE(NEED_INET_V6DEFS_H) fi AC_SUBST(INET_NTOP_C) AC_SUBST(INET_NTOP_O) diff --git a/inet_ntop.c b/inet_ntop.c index 009ac4e305..ff80e4e1f8 100644 --- a/inet_ntop.c +++ b/inet_ntop.c @@ -16,9 +16,11 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$Id: inet_ntop.c,v 1.1 1999/10/14 05:41:29 itojun Exp $"; +static char rcsid[] = "$Id: inet_ntop.c,v 1.2 1999/10/14 06:55:08 guy Exp $"; #endif /* LIBC_SCCS and not lint */ +#include "config.h" + #include <sys/param.h> #include <sys/types.h> #include <sys/socket.h> @@ -40,6 +42,8 @@ static char rcsid[] = "$Id: inet_ntop.c,v 1.1 1999/10/14 05:41:29 itojun Exp $"; # include "snprintf.h" #endif +#include "inet_v6defs.h" + #ifndef NS_INADDRSZ #define NS_INADDRSZ 4 #endif diff --git a/inet_pton.c b/inet_pton.c index 8769a7beb6..5e2690779f 100644 --- a/inet_pton.c +++ b/inet_pton.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$Id: inet_pton.c,v 1.1 1999/10/14 05:41:29 itojun Exp $"; +static char rcsid[] = "$Id: inet_pton.c,v 1.2 1999/10/14 06:55:10 guy Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -28,6 +28,8 @@ static char rcsid[] = "$Id: inet_pton.c,v 1.1 1999/10/14 05:41:29 itojun Exp $"; #include <string.h> #include <errno.h> +#include "inet_v6defs.h" + #ifndef NS_INADDRSZ #define NS_INADDRSZ 4 #endif diff --git a/inet_v6defs.h b/inet_v6defs.h new file mode 100644 index 0000000000..3d124d8338 --- /dev/null +++ b/inet_v6defs.h @@ -0,0 +1,47 @@ +/* inet_pton.h + * + * $Id: inet_v6defs.h,v 1.1 1999/10/14 06:55:09 guy Exp $ + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@zing.org> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +/* + * Version of "inet_pton()" and "inet_ntop()", for the benefit of OSes that + * don't have it. + */ +extern int inet_pton(int af, const char *src, void *dst); +extern const char *inet_ntop(int af, const void *src, char *dst, + size_t size); + +/* + * Those OSes may also not have AF_INET6, so declare it here if it's not + * already declared, so that we can pass it to "inet_ntop()" and "inet_pton()". + */ +#ifndef AF_INET6 +#define AF_INET6 127 /* pick a value unlikely to duplicate an existing AF_ value */ +#endif + +/* + * And if __P isn't defined, define it here, so we can use it in + * "inet_ntop.c" and "inet_pton.c" (rather than having to change them + * not to use it). + */ +#ifndef __P +#define __P(args) args +#endif @@ -1,7 +1,7 @@ /* packet.c * Routines for packet disassembly * - * $Id: packet.c,v 1.47 1999/10/14 05:41:30 itojun Exp $ + * $Id: packet.c,v 1.48 1999/10/14 06:55:09 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -55,6 +55,10 @@ # include <netinet/in.h> #endif +#ifdef NEED_INET_V6DEFS_H +# include "inet_v6defs.h" +#endif + #include "packet.h" #include "print.h" #include "file.h" @@ -1,7 +1,7 @@ /* resolv.c * Routines for network object lookup * - * $Id: resolv.c,v 1.14 1999/10/14 05:41:33 itojun Exp $ + * $Id: resolv.c,v 1.15 1999/10/14 06:55:10 guy Exp $ * * Laurent Deniel <deniel@worldnet.fr> * @@ -39,7 +39,6 @@ #endif #endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif @@ -68,6 +67,10 @@ # include <setjmp.h> #endif +#ifdef NEED_INET_V6DEFS_H +# include "inet_v6defs.h" +#endif + #include "packet.h" #include "packet-ipv6.h" #include "globals.h" |