summaryrefslogtreecommitdiff
path: root/missing
Commit message (Collapse)AuthorAgeFilesLines
* Put "}" at beginning of line with "else" to keep a consistent styleFrancois-Xavier Le Bail2023-04-211-2/+1
| | | | [skip ci]
* Do not substitute strdup().Denis Ovsienko2023-02-191-52/+0
| | | | | | | | | | | | libpcap has been using strdup() for a long time too, but never substituted it under the assumption the function is available in all supported OSes, see libpcap commit cb71eef from 2006. The only exception to that is Windows, which can have a different name for the function, but both libpcap and tcpdump for that already use a separate workaround, which does not involve the substitution. Let's take this as a proof that strdup() substitution in tcpdump is dead code, and remove it.
* Fix spaces before tabs in indentationFrancois-Xavier Le Bail2023-02-153-3/+3
|
* Remove unused missing/snprintf.c. [skip ci]Denis Ovsienko2023-01-311-510/+0
| | | | | | | | | The file could be compiled on demand using "make snprintf.o", although with many warnings, but tcpdump build would never use the file regardless of the variety of the build. Some of the code there has been commented out since commit 45aef49 in 2001, and the rest became unused after commit 1ed63b5 in 2019.
* Get rid of the Windows ether_ntohost().Guy Harris2022-01-192-249/+0
| | | | | | | We don't use it, and there's no Windows tradition of an "ethers file" that I know of, so I'm not sure there's a reason to use it. Fixes GitHub issue #971.
* Put a space between type and '*' in pointer declarators (style)Francois-Xavier Le Bail2021-12-302-2/+2
|
* Fixup the previous commit for GCC. [skip ci]Denis Ovsienko2021-07-241-2/+2
| | | | | | | Apparently, it does not like pragmas in the middle of a statement: ./missing/getopt_long.c: In function 'getopt_internal': ./missing/getopt_long.c:572:3: error: 'else' without a previous 'if'
* Suppress "casting away const" warnings in missing/getopt_long.c.Guy Harris2021-07-241-0/+24
| | | | | | | | | | | | | | | | | It's explicitly cheating in some places; just cast away the warnings. Add a Clang version testing macro to compiler-tests.h. Move the diagnostic control #defines from netdissect-stdinc.h to diag-control.h, libpcap-style, so that they can be used by code that doesn't use (or need) netdissect-stdinc.h. This also means that we can limit the inclusion of diag-control.h, and the definition of those Do them more libpcap-style, with separate DIAG_OFF/DIAG_ON pairs for particular issues, rather than having DIAG_OFF() and DIAG_ON() macros that take -W option names as arguments; that way, if we need to define them for compilers that don't have the GCC/Clang syntax for those pragmas, e.g. MSVC, we can do so.
* Lose underscores in some macro names. [skip ci]Denis Ovsienko2020-09-131-3/+3
|
* Remove the unused DLT_LANE8023 link-layer dissectorFrancois-Xavier Le Bail2020-08-061-3/+0
| | | | | | | DLT_LANE8023 was never defined in libpcap. It was, perhaps, defined in some SuSE libpcap update, but no evidence of this. It is not defined in OpenSuSE Leap 15.2 (information from Guy).
* Remove more old-compiler compensation.Guy Harris2019-08-083-119/+4
| | | | | | | | | | | | We require an environment with a C99-compatible snprintf(), so we don't need to work around older implementations. Make the configuration process fail if we don't have snprintf() and vsnprintf(). We require at least VS 2015, so we don't have to check for _MSC_VER >= 1400. Make the build fail if we don't have at least VS 2015. We apparently do, however, have to use __inline, as the VS 2015 documentation doesn't meaning plain old "inline". Update a comment.
* Move getopt_long.h to missing.Guy Harris2018-09-141-0/+66
| | | | That's what we did for win_ether_ntohost.h.
* Revert "Clean up the code a bit."Guy Harris2018-09-141-24/+8
| | | | | | This reverts commit a5eca2cbbfa991c0ae26d0b039bf303fa92734ac. MSVC doesn't complain about it, so leave it alone.
* Clean up the code a bit.Guy Harris2018-09-141-8/+24
| | | | | | | | | | | | | | | | | | | | | | | | | This eliminates a warning from MSVC, and makes the flow a little clearer. (Yes, it duplicates some code, but compilers have been pretty good at merging common code sequences, so it might just turn it into the equivalent of if (optopt == (int)':') goto label; oli = strchr(ostr, optopt); if (!oli) { label: /* * Unknown option character. */ if (!*place) ++optind; ... } although it does mean that the same C code exists in two places.)
* Stick with one version of pcap_dump_ftell.c.Denis Ovsienko2018-07-281-1/+5
| | | | | | | | | | | | | | | It looks like CMake after commit 3e9e2b6 started to use the newly added missing/pcap_dump_ftell.c to make pcap_dump_ftell() available in tcpdump if libpcap does not have it. However, autotools continued to use the previously existing ./pcap_dump_ftell.c for the same purpose. Remove the previously existing file and amend autotools files to cover pcap_dump_ftell() the same way as the other functions in the missing/ directory files. Amend missing/pcap_dump_ftell.c not to use pcap_dump_file(), as it may be unavailable. This has been tested to work with libpcap 0.6.1.
* Add nd_{v}snprintf() routines/wrappers.Guy Harris2018-01-294-42/+11
| | | | | | | | Some versions of the MSVC runtime library have a non-C99-compliant vsnprintf(), which we want to avoid. On Windows, use snprintf() and vsnprintf() for VS 2015 and later, where they both exist in C99-compliant forms, and wrap _{v}snprintf_s() otherwise (they're guaranteed to do the null termination that we want).
* Pick up Windows snprintf and strdup replacements from libpcap.Guy Harris2018-01-281-0/+31
|
* Create the missing/pcap_dump_ftell.c that's expected by autotools and CMake.Guy Harris2018-01-261-0/+42
|
* Oops, forgot to add missing/win_ether_ntohost.h.Guy Harris2018-01-231-0/+33
|
* On Windows, we have our own ether_ntohost(); declare it.Guy Harris2018-01-231-0/+216
| | | | | | | | | Move the source to our own ether_ntohost() to the "missing" directory, just as we do in libpcap for the Windows snprintf() wrapper around _snprintf(). Add a header file for it, and include it in both the wrapper and in addrtoname.c on Windows.
* Always include <config.h> rather than "config.h".Guy Harris2018-01-213-3/+3
| | | | | | | | This can prevent bizarre failures if, for example, you've done a configuration in the top-level source directory, leaving behind one config.h file, and then do an out-of-tree build in another directory, with different configuration options. This way, we always pick up the same config.h, in the build directory.
* Remove all storage class specifier 'register'Francois-Xavier Le Bail2017-12-134-10/+10
| | | | | | Let the compiler do the optimizations (or not) based on build options. Avoid 'value has been optimized out' messages in gdb using '-O0'.
* Updates for getservent.cAli Abdulkadir2017-11-151-11/+11
| | | | | | - fixed none _WIN32 implementation - on windows, see if a services file exists in the same directory as tcpdump and use that
* Made up for missing getservent() and endservent()Ali Abdulkadir2017-10-241-0/+143
|
* Don't require IPv6 library support in order to support IPv6 addresses.Guy Harris2015-09-175-711/+0
| | | | | | | | | | | | | Have our own routines to convert between IPv4/IPv6 addresses and strings; that helps if, for example, we want to build binary versions of tcpdump for Windows that can run both on NT 5 (W2K/WXP), which doesn't have inet_ntop() or inet_pton(), and NT 6 (Vista/7/8/10), which do. It also means that we don't require IPv6 library support on UN*X to print addresses (if somebody wants to build tcpdump for older UN*Xes lacking IPv6 support in the system library or in add-on libraries). Get rid of files in the missing directory that we don't need, and various no-longer-necessary autoconf tests.
* libnetdissect code must include 'netdissect.h', not 'interface.h'Francois-Xavier Le Bail2015-09-115-5/+5
| | | | | | | Moreover: Remove netdissect.h include in interface.h Move thiszone declaration in netdissect.h Update a comment
* Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'Francois-Xavier Le Bail2015-09-108-8/+8
| | | | Get the full log via: git log --follow netdissect-stdinc.h
* Do case-insensitive comparisons assuming ASCII strings.Guy Harris2015-06-111-1/+2
| | | | | | | | Do the case-insensitive comparisons in a locale-independent fashion that only maps ASCII letters, in the standard English-language fashion; that way, we don't get bitten by, for example, Turkish having separate "i with dot" and "i without dot" letters, with lower-case "i with dot" being mapped to upper-case "I with dot" rather than being mapped to "I".
* Delete trailing spaces/tabsFrancois-Xavier Le Bail2015-06-043-3/+3
|
* Fix a warning for 'strsep' function on SolarisFrancois-Xavier Le Bail2015-01-261-0/+2
| | | | | The warning was: ./missing/strsep.c:54:1: warning: no previous prototype for 'strsep' [-Wmissing-prototypes]
* opterr should default to 1, so illegal options are reported.Guy Harris2014-05-071-1/+1
|
* Include <errno.h> on both Windows and UN*X.Guy Harris2014-05-041-1/+0
| | | | | | | 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.
* Update inet_pton.cGisle Vanem2014-05-021-4/+2
| | | Removed <errno.h> here since it's already included in ./tcpdump-stdinc.h. The local 'win32/Include/errno.h' is deleted.
* Oops, forgot to fix missing/getopt_long.c to include getopt_long.h.Guy Harris2014-05-011-1/+1
|
* Define optarg, optind, opterr, and optopt.Gisle Vanem2014-05-011-0/+3
| | | | | That's necessary on Windows, where you're not going to get them defined by getopt().
* Put in missing getopt_long() files.Guy Harris2014-05-011-0/+609
|
* fix missing/inet_ntop.c againGisle Vanem2014-05-011-1/+7
| | | | | | | | | | | | | All tests that should print IPv6-addresses failed since 'INET6' wasn't set when my missing/inet_ntop.c was compiled. Due to "config.h" was not included. Also got rid of 2 warnings: Missing/inet_ntop.c:146:23: warning: 'cur.len' may be used uninitialized in this function [-Wmaybe-uninitialized] The tests also failed since the inet_ntop_v6() was returning hex-chars in upper-case. So this patch returns string in lower-case.
* More getting rid of old u_intN_t.Guy Harris2014-04-231-2/+2
|
* get rid of "no previous prototype" warnings for 'strlcat' and 'strlcpy'Francois-Xavier Le Bail2014-04-012-0/+4
|
* missing/inet_ntop.c fix (GH #358)Gisle Vanem2014-01-241-1/+0
| | | | The extra 'return (NULL)' is dead code.
* We don't use missing/sockstorage.h, so get rid of it.Guy Harris2014-01-171-38/+0
|
* remove tcpdump's own CVS keywordsDenis Ovsienko2014-01-0312-65/+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.
* Get rid of unnecessary configure script tests and missing/XXX.h headers.Guy Harris2011-02-013-121/+0
| | | | | | | | This also fixes configure-script problems on OSes that have IPv6 support but don't have <netinet6/in6.h> - no standard I could find requires that header for IPv6 support (the Single UNIX Specification speaks of <netinet/in.h> for both IPv4 and IPv6, and RFCs 2292 and 3542 don't mention <netinet6/in6.h>, just <netinet/in.h> and <netinet6/ip6.h>).
* Our bittypes.h is needed only on Windows. Move it to win32/Include.Guy Harris2010-04-041-117/+0
|
* Nothing in missing/getaddrinfo.c is used in tcpdump, and it's a pain toGuy Harris2009-07-082-1118/+0
| | | | make it build on Tru64 UNIX, so get rid of it.
* Cast argument to isdigit to unsigned char, so if the characters 8th bitGuy Harris2009-07-021-1/+1
| | | | is set, it doesn't get treated as a negative number.
* From Gisle Vanem:guy2005-02-091-4/+119
| | | | | | | | | | | 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.
* "_int64" is signed. "unsigned _int64" is unsigned.guy2004-09-191-1/+1
|
* It's "%I64[doux]", not "%i64[doux]", to print 64-bit integral data typesguy2004-06-201-4/+4
| | | | with Windows printf.
* Second stage of adding support for 64-bit integral data types - thisguy2004-04-171-0/+32
| | | | | | | | | | causes the configure script to attempt to define the PRI[doux]64 macros if they're not defined by including <inttypes.h>, and causes "missing/bittypes.h" to attempt to define them, if undefined, in a fashion that should, with any luck, work on MSVC++ and various flavors of GNU C on Windows. Fix the spelling of "Mac OS X".