summaryrefslogtreecommitdiff
path: root/tcpdump-stdinc.h
Commit message (Collapse)AuthorAgeFilesLines
* Include <errno.h> on both Windows and UN*X.Guy Harris2014-05-041-1/+2
| | | | | | | 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.
* UNALIGNED is used in structures and must *always* be defined.Guy Harris2014-05-041-3/+2
| | | | | | | | | | | | | | | | | | | "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
* BGP assumes octets, not bytes; no need to use NBBY, just use 8.Guy Harris2014-05-031-4/+0
| | | | | | | | 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.
* Update tcpdump-stdinc.hGisle Vanem2014-05-021-3/+0
| | | Probably safe to assume MSVC has a `<stdint.h>` too.
* Update tcpdump-stdinc.hGisle Vanem2014-05-021-10/+19
| | | 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.
* We still need u_intN_t.Guy Harris2014-04-231-2/+2
| | | | | | | | | | | | | | | | | | 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.
* More getting rid of old u_intN_t.Guy Harris2014-04-231-1/+78
|
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-6/+1
| | | | | | | | | 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.
* justify min()/max() macros declarations and usageDenis Ovsienko2014-03-141-0/+7
| | | | | | | | | | | 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
* Do our own isascii(), isprint(), isgraph(), and toascii().Guy Harris2014-02-021-7/+0
| | | | | | | | | 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 tcpdump's own CVS keywordsDenis Ovsienko2014-01-031-3/+0
| | | | | | 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.
* whitespace changesMichael Richardson2014-01-011-1/+1
|
* adopt MacOS deprecation workaround from FreeRADIUSDenis Ovsienko2013-10-181-0/+46
| | | | | | | | | | 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.
* mind MSVC's UNALIGNED macro (GH #335 pt.2)Denis Ovsienko2013-10-141-0/+4
| | | | | This change addresses a compile warning that Gisle Vanem troubleshooted in MSVC build (<winnt.h> defines UNALIGNED).
* NFS: replace ino_t with u_int32_t (GH #335 pt. 1)Denis Ovsienko2013-10-121-2/+0
| | | | | | | | | | | | | | | | 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.
* Use __inline with MSVC for all source files.Guy Harris2013-06-091-0/+7
|
* Mark various IPv4 and IPv6 headers as unaligned.Guy Harris2010-08-311-2/+35
| | | | | | | | | | | | | 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.
* OS X has its own optimized ntoh[ls]; use them, don't define our own.Guy Harris2010-04-041-1/+1
|
* Added the definition of NBBY for Visual Studio compilers.test22010-03-091-0/+4
|
* added "make check"mcr2007-11-241-6/+6
| | | | | | | 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.
* add TRUE, FALSE defshannes2006-05-191-1/+9
|
* Removed the inclusion of IP6_misc.h. It's no more needed and it upsets ↵risso2005-07-091-2/+2
| | | | cygnus gcc.
* Added again some #define's for MSVC compilers that were wrongly removed.risso2005-05-041-1/+15
|
* From Alexander Dupuy: don't define our own [hn]to[nh][sl] macros ifguy2005-04-271-2/+2
| | | | | | __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.
* From Albert Chin:guy2005-04-201-2/+9
| | | | | | | | | | | | | | 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.
* Some UN*Xes need INET_ADDRSTRLEN defined as well, for "inet_ntop_v4()".guy2005-03-271-5/+5
|
* Add declarations of __ntohl() and __ntohs() to squelch compiler warningsguy2005-03-271-1/+4
| | | | on Solaris 7 x86 with GCC 2.8.1.
* From Gisle Vanem:guy2005-02-091-18/+44
| | | | | | | | | | | 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.
* Assume that u_int64_t is defined, along with PRI[dux]64, as per theguy2004-04-171-1/+4
| | | | | | | recent configure script changes. On UN*X, include <inttypes.h> in "tcpdump-stdinc.h" if it defines the PRI[duxo]64 macros.
* Give it a proper RCS ID.guy2003-11-161-0/+2
|
* Add a new "ipproto.h" header file, with definitions of IP protocol typeguy2003-06-071-1/+0
| | | | | | | 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.
* Modified the license at the beginning of the files created by the Politecno ↵risso2003-05-151-17/+26
| | | | di Torino developers from the 4-clause BSD code to the modified BSD license
* From Hank Leininger <tcpdump-workers@progressive-comp.com>: fix a typo.guy2003-03-221-2/+2
|
* From Gisle Vanem: make print-esp.c work with more (maybe all?) OpenSSLguy2003-03-021-2/+27
| | | | | versions, and changes to make it work on DOS/Windows with various compilers and C support libraries.
* Give the file an SCCS and RCS ID.guy2002-08-051-0/+2
|
* Only include in "tcpdump-stdinc.h" the headers that are actually neededguy2002-08-021-12/+16
| | | | | | | | | 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".
* Added support for Win32, based on WinPcap.risso2002-08-011-0/+87