diff options
author | Elliott Hughes <enh@google.com> | 2015-10-19 18:07:04 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-10-20 14:06:47 -0700 |
commit | d8845d7191ca81aae8aab4c29410fc8a3d012687 (patch) | |
tree | 93eface1b79d0172beec96c422f5921661455849 /Win32 | |
parent | c442bf68e06f961ad0f8fc5a7d19e0984985ea30 (diff) | |
download | libpcap-d8845d7191ca81aae8aab4c29410fc8a3d012687.tar.gz |
Upgrade to libpcap 1.7.4.
Bug: http://b/24902618
Change-Id: I1bb6c1163b573eb01b4bed7c494a6d447e8d45cf
Diffstat (limited to 'Win32')
-rw-r--r-- | Win32/Include/Gnuc.h | 2 | ||||
-rw-r--r-- | Win32/Include/addrinfo.h | 12 | ||||
-rw-r--r-- | Win32/Include/arpa/nameser.h | 10 | ||||
-rw-r--r-- | Win32/Include/bittypes.h | 6 | ||||
-rw-r--r-- | Win32/Include/cdecl_ext.h | 4 | ||||
-rw-r--r-- | Win32/Include/ip6_misc.h | 2 | ||||
-rw-r--r-- | Win32/Include/net/if.h | 2 | ||||
-rw-r--r-- | Win32/Include/net/netdb.h | 4 | ||||
-rw-r--r-- | Win32/Include/sockstorage.h | 4 | ||||
-rw-r--r-- | Win32/Prj/libpcap.dsp | 14 | ||||
-rw-r--r-- | Win32/Src/gai_strerror.c | 2 | ||||
-rw-r--r-- | Win32/Src/getaddrinfo.c | 27 | ||||
-rw-r--r-- | Win32/Src/getnetent.c | 2 | ||||
-rw-r--r-- | Win32/Src/inet_aton.c | 19 | ||||
-rw-r--r-- | Win32/Src/inet_pton.c | 19 |
15 files changed, 53 insertions, 76 deletions
diff --git a/Win32/Include/Gnuc.h b/Win32/Include/Gnuc.h index 0bf4b735..aa495987 100644 --- a/Win32/Include/Gnuc.h +++ b/Win32/Include/Gnuc.h @@ -1,5 +1,3 @@ -/* @(#) $Header: /tcpdump/master/libpcap/Win32/Include/Gnuc.h,v 1.1 2002-08-01 08:33:05 risso Exp $ (LBL) */ - /* Define __P() macro, if necessary */ #ifndef __P diff --git a/Win32/Include/addrinfo.h b/Win32/Include/addrinfo.h index 8cb2e65e..ac4fcce1 100644 --- a/Win32/Include/addrinfo.h +++ b/Win32/Include/addrinfo.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +13,7 @@ * 3. Neither the name of the project 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 PROJECT 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 @@ -27,8 +27,6 @@ * SUCH DAMAGE. */ -/* $Id: addrinfo.h,v 1.1 2002-08-01 08:33:05 risso Exp $ */ - #ifndef HAVE_ADDRINFO /* @@ -94,13 +92,13 @@ extern const char *inet_ntop (int, const void *, char *, size_t); #ifndef EAI_BADHINTS #define EAI_BADHINTS 12 -#endif +#endif -#ifndef EAI_PROTOCOL +#ifndef EAI_PROTOCOL #define EAI_PROTOCOL 13 #endif -#ifndef EAI_MAX +#ifndef EAI_MAX #define EAI_MAX 14 #endif diff --git a/Win32/Include/arpa/nameser.h b/Win32/Include/arpa/nameser.h index 18f185cf..b20dc1e3 100644 --- a/Win32/Include/arpa/nameser.h +++ b/Win32/Include/arpa/nameser.h @@ -3,7 +3,7 @@ * - * Copyright (c) 1983, 1989, 1993 * The 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: @@ -19,7 +19,7 @@ * 4. 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 @@ -33,14 +33,14 @@ * SUCH DAMAGE. * - * Portions Copyright (c) 1993 by Digital Equipment Corporation. - * + * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies, and that * the name of Digital Equipment Corporation not be used in advertising or * publicity pertaining to distribution of the document or software without * specific, written prior permission. - * + * * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT @@ -69,7 +69,7 @@ # include <sys/types.h> #endif #include <sys/cdefs.h> -#else +#else #include <pcap-stdinc.h> #define __LITTLE_ENDIAN 1 #define __BYTE_ORDER __LITTLE_ENDIAN diff --git a/Win32/Include/bittypes.h b/Win32/Include/bittypes.h index 7c0cbdeb..95aa9faa 100644 --- a/Win32/Include/bittypes.h +++ b/Win32/Include/bittypes.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +13,7 @@ * 3. Neither the name of the project 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 PROJECT 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 @@ -34,7 +34,7 @@ typedef unsigned char u_int8_t; typedef signed char int8_t; #endif /* HAVE_U_INT8_T */ -#ifndef HAVE_U_INT16_T +#ifndef HAVE_U_INT16_T typedef unsigned short u_int16_t; typedef signed short int16_t; #endif /* HAVE_U_INT16_T */ diff --git a/Win32/Include/cdecl_ext.h b/Win32/Include/cdecl_ext.h index 9591db26..9d40b84c 100644 --- a/Win32/Include/cdecl_ext.h +++ b/Win32/Include/cdecl_ext.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +13,7 @@ * 3. Neither the name of the project 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 PROJECT 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 diff --git a/Win32/Include/ip6_misc.h b/Win32/Include/ip6_misc.h index 562fa618..0b578c33 100644 --- a/Win32/Include/ip6_misc.h +++ b/Win32/Include/ip6_misc.h @@ -17,8 +17,6 @@ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - * - * @(#) $Header: /tcpdump/master/libpcap/Win32/Include/ip6_misc.h,v 1.5 2006-01-22 18:02:18 gianluca Exp $ (LBL) */ /* diff --git a/Win32/Include/net/if.h b/Win32/Include/net/if.h index bf926b6e..58d3c16e 100644 --- a/Win32/Include/net/if.h +++ b/Win32/Include/net/if.h @@ -36,7 +36,7 @@ #ifndef _NET_IF_H_ #define _NET_IF_H_ - + /* * <net/if.h> does not depend on <sys/time.h> on most other systems. This * helps userland compatability. (struct timeval ifi_lastchange) diff --git a/Win32/Include/net/netdb.h b/Win32/Include/net/netdb.h index b9d45acf..f7685d25 100644 --- a/Win32/Include/net/netdb.h +++ b/Win32/Include/net/netdb.h @@ -57,7 +57,9 @@ #ifndef _NETDB_H_ #define _NETDB_H_ -#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_REENTRANT) +/* MingW64 defines _POSIX_THREAD_SAFE_FUNCTIONS. + */ +#if defined(_POSIX_THREAD_SAFE_FUNCTIONS) || defined(_REENTRANT) && !defined(__MINGW64_VERSION_MAJOR) #include <stdio.h> #include <netinet/in.h> #endif diff --git a/Win32/Include/sockstorage.h b/Win32/Include/sockstorage.h index 557eb4df..cbad1900 100644 --- a/Win32/Include/sockstorage.h +++ b/Win32/Include/sockstorage.h @@ -1,7 +1,7 @@ /* * Copyright (C) 1999 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +13,7 @@ * 3. Neither the name of the project 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 PROJECT 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 diff --git a/Win32/Prj/libpcap.dsp b/Win32/Prj/libpcap.dsp index 17e5a703..7082122c 100644 --- a/Win32/Prj/libpcap.dsp +++ b/Win32/Prj/libpcap.dsp @@ -7,19 +7,19 @@ CFG=libpcap - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "libpcap.mak". -!MESSAGE +!MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE +!MESSAGE !MESSAGE NMAKE /f "libpcap.mak" CFG="libpcap - Win32 Debug" -!MESSAGE +!MESSAGE !MESSAGE Possible choices for configuration are: -!MESSAGE +!MESSAGE !MESSAGE "libpcap - Win32 Release" (based on "Win32 (x86) Static Library") !MESSAGE "libpcap - Win32 Debug" (based on "Win32 (x86) Static Library") -!MESSAGE +!MESSAGE # Begin Project # PROP AllowPerConfigDependencies 0 @@ -74,7 +74,7 @@ LIB32=link.exe -lib # ADD BASE LIB32 /nologo # ADD LIB32 /nologo -!ENDIF +!ENDIF # Begin Target diff --git a/Win32/Src/gai_strerror.c b/Win32/Src/gai_strerror.c index edd970b9..a36c35d8 100644 --- a/Win32/Src/gai_strerror.c +++ b/Win32/Src/gai_strerror.c @@ -67,7 +67,7 @@ static char *ai_errlist[] = { #define EAI_MAX (sizeof(ai_errlist)/sizeof(ai_errlist[0])) #endif -/* on MingW, gai_strerror is available. +/* on MingW, gai_strerror is available. We need to compile gai_strerrorA only for Cygwin */ #ifndef gai_strerror diff --git a/Win32/Src/getaddrinfo.c b/Win32/Src/getaddrinfo.c index ebfe8c2c..d3ebda08 100644 --- a/Win32/Src/getaddrinfo.c +++ b/Win32/Src/getaddrinfo.c @@ -1,7 +1,7 @@ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -13,7 +13,7 @@ * 3. Neither the name of the project 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 PROJECT 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 @@ -49,15 +49,10 @@ * Mingw64 has its own implementation of getaddrinfo, mingw32 no */ #ifndef __MINGW64__ - + #ifdef HAVE_CONFIG_H #include <config.h> -#endif - -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/Win32/Src/getaddrinfo.c,v 1.3 2008-09-15 23:37:51 guy Exp $"; #endif #include <pcap-stdinc.h> @@ -76,17 +71,17 @@ static const char rcsid[] _U_ = #ifndef HAVE_PORTABLE_PROTOTYPE #include "cdecl_ext.h" -#endif +#endif #ifndef HAVE_U_INT32_T #include "bittypes.h" -#endif +#endif #ifndef HAVE_SOCKADDR_STORAGE #ifndef __MINGW32__ #include "sockstorage.h" #endif -#endif +#endif #ifdef NEED_ADDRINFO_H #include "addrinfo.h" @@ -114,7 +109,7 @@ static const char in_addrany[] = { 0, 0, 0, 0 }; static const char in6_addrany[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; -static const char in_loopback[] = { 127, 0, 0, 1 }; +static const char in_loopback[] = { 127, 0, 0, 1 }; static const char in6_loopback[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; @@ -132,7 +127,7 @@ static const struct afd { int a_socklen; int a_off; const char *a_addrany; - const char *a_loopback; + const char *a_loopback; int a_scoped; } afdl [] = { #ifdef INET6 @@ -335,7 +330,7 @@ getaddrinfo(hostname, servname, hints, res) pai->ai_canonname = NULL; pai->ai_addr = NULL; pai->ai_next = NULL; - + if (hostname == NULL && servname == NULL) return EAI_NONAME; if (hints) { @@ -825,7 +820,7 @@ explore_numeric(pai, hostname, servname, res) } while (cur && cur->ai_next) cur = cur->ai_next; - } else + } else ERR(EAI_FAMILY); /*xxx*/ } @@ -960,7 +955,7 @@ get_name(addr, afd, res, numaddr, pai, servname) GET_AI(cur, afd, numaddr); GET_PORT(cur, servname); } - + #ifdef USE_GETIPNODEBY if (hp) freehostent(hp); diff --git a/Win32/Src/getnetent.c b/Win32/Src/getnetent.c index d4cceb33..95281a54 100644 --- a/Win32/Src/getnetent.c +++ b/Win32/Src/getnetent.c @@ -85,7 +85,7 @@ again: net.n_net = inet_network(cp); net.n_addrtype = AF_INET; q = net.n_aliases = net_aliases; - if (p != NULL) + if (p != NULL) cp = p; while (cp && *cp) { if (*cp == ' ' || *cp == '\t') { diff --git a/Win32/Src/inet_aton.c b/Win32/Src/inet_aton.c index 3da6667c..db97bcea 100644 --- a/Win32/Src/inet_aton.c +++ b/Win32/Src/inet_aton.c @@ -2,27 +2,27 @@ * Copyright (c) 1995, 1996, 1997 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * 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. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Kungliga Tekniska * Högskolan and its contributors. - * + * * 4. Neither the name of the Institute 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 INSTITUTE 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 @@ -36,13 +36,6 @@ * SUCH DAMAGE. */ -/* $Id: inet_aton.c,v 1.2 2003-11-15 23:24:06 guy Exp $ */ - -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/Win32/Src/inet_aton.c,v 1.2 2003-11-15 23:24:06 guy Exp $"; -#endif - #include <sys/types.h> #include <pcap-stdinc.h> diff --git a/Win32/Src/inet_pton.c b/Win32/Src/inet_pton.c index 7933a4e6..7fe3813a 100644 --- a/Win32/Src/inet_pton.c +++ b/Win32/Src/inet_pton.c @@ -2,27 +2,27 @@ * Copyright (c) 1999 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * 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. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the Kungliga Tekniska * Högskolan and its contributors. - * + * * 4. Neither the name of the Institute 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 INSTITUTE 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 @@ -36,13 +36,6 @@ * SUCH DAMAGE. */ -/* $Id: inet_pton.c,v 1.3 2007-09-27 18:02:20 gianluca Exp $ */ - -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/libpcap/Win32/Src/inet_pton.c,v 1.3 2007-09-27 18:02:20 gianluca Exp $"; -#endif - #include <errno.h> #ifdef WIN32 |