summaryrefslogtreecommitdiff
path: root/strtoaddr.c
Commit message (Collapse)AuthorAgeFilesLines
* Get rid of useless test.Guy Harris2019-09-031-2/+0
| | | | | | | | The test was always useless, but, as Coverity apparently didn't realize that isdigit() returns true only for '0'-'9', it didn't notice until we used ND_ASCII_ISDIGIT() instead. Addresses Coverity CID 1453475.
* Don't use <ctype.h> macros.Guy Harris2019-09-011-4/+6
| | | | | | | | | | | | | | Some of them are locale-dependent, and all of them run the risk of failing if you hand them a char with the 8th bit set. Move our replacements to a new netdissect-ctype.h file, and, for the ones that check for particular character types, add _ASCII to the name, to indicate that only ASCII characters pass the check. Do the same for the ones that map between cases, to indicate that they only map ASCII letters. For isspace(), explicitly check for the characters we care about, to make it clearer what we're doing.
* Always include <config.h> rather than "config.h".Guy Harris2018-01-211-1/+1
| | | | | | | | 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.
* Use quoted include netdissect-stdinc.h instead of angle-bracketed oneFrancois-Xavier Le Bail2018-01-211-1/+1
|
* Remove a duplicate #define.Denis Ovsienko2017-09-131-4/+0
|
* Get rid of last uses of/mentions of u_intN_t.Guy Harris2016-10-061-1/+1
| | | | It's now all C99-style uintN_t.
* We only handle 4-part addresses.Guy Harris2015-11-181-29/+15
| | | | | Get rid of the code to handle everything else; that code was dead, as Coverity noted. Add some comments to clarify what's going on.
* Don't require IPv6 library support in order to support IPv6 addresses.Guy Harris2015-09-171-0/+253
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.