| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's _WIN32, with a leading underscore, not WIN32. See, for example:
https://sourceforge.net/p/predef/wiki/OperatingSystems/
and
https://msdn.microsoft.com/en-us/library/b0084kay.aspx
*Some* environments may also define WIN32, but we shouldn't depend on
that.
|
|
|
|
|
|
|
| |
We need <errno.h> on UN*X in some files that include tcpdump-stdinc.h,
such as missing/inet_pton.c.
Remove includes of <errno.h> from files that include tcpdump-stdinc.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"Always" means "even on compilers that don't define __GNUC__". If we
don't want
#if X
{nothing}
#else
#undef UNALIGNED
#define UNALIGNED __attribute__((packed))
#endif
because it's backwards, just do
#if !(X)
#undef UNALIGNED
#define UNALIGNED __attribute__((packed))
#endif
|
|
|
|
|
|
|
|
| |
Everywhere else in the BGP dissector, we just use a constant 8 for the
number of bits per octet; get rid of the one place where we use NBBY.
This gets rid of the one and only place we use NBBY; get rid of our own
definition of it.
|
|
|
| |
Probably safe to assume MSVC has a `<stdint.h>` too.
|
|
|
| |
Put WinPcap's header "bittypes.h" before potentially defining basic types like "uint8_t". Define EAFNOSUPPORT unless defined in system's <errno.h>. The local Win32/Include/errno.h is gone.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some libpcap headers use them, and even if we change libpcap to use
uintN_t, we don't require that tcpdump 4.x go with libpcap 1.x - we
allow people to install the latest tcpdump even if they have an older
libpcap and don't want to install a newer one.
However, we now define them in terms of the C99 uintN_t types, rather
than trying to guess what's appropriate; using unsigned long long for
u_int64_t meant that, on some platforms, u_int64_t didn't match
PRI[doux]64, and using unsigned long obviously won't work on ILP32
platforms.
Also, we already had calls to the autoconf macros for C99 types; get rid
of the ones we added.
Also also, clean up a comment in tcpdump-stdinc.h.
|
| |
|
|
|
|
|
|
|
|
|
| |
And, as we require at least autoconf 2.61, and as autoconf 2.61 and
later have AC_TYPE_UINTn_T and AC_TYPE_INTn_T macros, we use them to
define the uintN_t and intN_t macros if the system doesn't define them
for us.
This lets us get rid of bitypes.h as well.
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves the macros to tcpdump-stdinc.h to make sure these are
available without interface.h. It also dismisses two redundant macros
MIN() and SMBMIN(). It is intended to fix the following Solaris compile
error:
Undefined first referenced
symbol in file
MIN print-zeromq.o
|
|
|
|
|
|
|
|
|
| |
We do *not* want the behavior of isprint() and isgraph() to be
locale-dependent - we want both of them to return "true" only for ASCII
characters.
We have to do our own isascii() and toascii() on non-UN*X systems
anyway, so let's just do all of them ourselves.
|
|
|
|
|
|
| |
Remove lots of $Header's and a few $Id's that all belong to the former
CVS repository of tcpdump itself. These keywords have been frozen since
the migration to git in late 2008.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A MacOS build of tcpdump used to produce deprecation warnings on OpenSSL
function calls. Alan DeKok explained that this is the effect of Apple's
modifications to OpenSSL and that the very same problem has already been
solved in FreeRADIUS server source code with pre-processor macros.
Copy the macros into tcpdump header file and make use of them around the
functions that call OpenSSL functions.
|
|
|
|
|
| |
This change addresses a compile warning that Gisle Vanem troubleshooted
in MSVC build (<winnt.h> defines UNALIGNED).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NFS file handle is an opaque server-issued sequence of bytes. Parse_fh()
function implements heuristics to decode file handles generated by some
NFS servers, among other information extracting the node (inode) number.
It decodes only 32-bit node numbers.
NFS implementations use ino_t C type to represent the node number. The
type size may vary across implementations/encodings and may be missing
during compile time.
Tcpdump used to have its own typedef for ino_t. Gisle Vanem points that
it caused a problem with MSVC v.16.00.40219.01 for 80x86, which defines
the same type in <sys/types.h>. This change fixes tcpdump code to use
u_int32_t and removes the typedef.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents GCC on SPARC from generating code that assumes those
structures are aligned naturally, which they are not guaranteed to be.
Move some #defines from interface.h to tcpdump-stdinc.h to make them
available to code that doesn't include interface.h.
Move the declaration of nextproto6_cksum() to ip6.h, so that only files
that use it get it declared, and thus so that you don't need to define
"struct ip6_hdr" in everything that includes interface.h. Don't include
ip6.h in tcpdump-stdinc.h.
|
| |
|
| |
|
|
|
|
|
|
|
| |
when optimization is not on, glibc6 doesn't define ntohs(), and our attempt
to optimize it for x86 doesn't work --- the functions need to be static, not
extern.
added decryption of IKE v2 payloads, when keys are provided by -E.
|
| |
|
|
|
|
| |
cygnus gcc.
|
| |
|
|
|
|
|
|
| |
__ntohl is defined; __ntohl is defined in some OSes as a special asm
function that does the same sort of fast byte swapping, and that gets in
the way of our so defining it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. On AIX, AC_LBL_C_INLINE detected the compiler supported
the inline keyword which is wrong. AC_C_INLINE from
autoconf-2.59 worked.
2. AC_CHECK_TYPE from autoconf-2.5x is no longer broken.
Replaced AC_LBL_CHECK_TYPE with it, mainly to use
<sys/bitypes.h> for Tru64 UNIX where some of the u_int#_t
types are defined.
3. Tru64 UNIX 4.0D doesn't support %llx; however, it does support %lx.
4. Added <stdint.h> to interface.h for int#_t types on
Tru64 UNIX 4.0D (required for missing/snprintf.c).
5. Reworked includes in tcpdump-stdinc.h for int#_t types.
|
| |
|
|
|
|
| |
on Solaris 7 x86 with GCC 2.8.1.
|
|
|
|
|
|
|
|
|
|
|
| |
the _errno() stuff isn't needed for current versions of MinGW;
get rid of some definitions not needed with MSVC++ and other
non-MinGW32/non-Watcom compilers;
add IPv6 capability to inet_pton.c, courtesy of Paul Vixie;
add inline ntoh{ls}/hton{ls} functions for GCC/i386.
|
|
|
|
|
|
|
| |
recent configure script changes.
On UN*X, include <inttypes.h> in "tcpdump-stdinc.h" if it defines the
PRI[duxo]64 macros.
|
| |
|
|
|
|
|
|
|
| |
values. Use that rather than private definitions in various files.
Add "gmpls.h" to the list of files in FILES, and add it and "ipfc.h" to
the list of files in INSTALL.
|
|
|
|
| |
di Torino developers from the 4-clause BSD code to the modified BSD license
|
| |
|
|
|
|
|
| |
versions, and changes to make it work on DOS/Windows with various
compilers and C support libraries.
|
| |
|
|
|
|
|
|
|
|
|
| |
by most files in tcpdump.
Include <net/if.h> in "addrtoname.c", as it's needed there (but not
needed in other files, so it doesn't belong in "tcpdump-stdinc.h".
Put in explanatory comments in "tcpdump-stdinc.h".
|
|
|