summaryrefslogtreecommitdiff
path: root/print-domain.c
Commit message (Collapse)AuthorAgeFilesLines
* DNS: Remove nd_print_invalid() call in truncation caseFrancois-Xavier Le Bail2020-04-111-1/+0
|
* DNS: Update printing the EDNS options and their data with -vvjacobgb242020-04-101-30/+219
| | | | | | (pull request #808) Format of EDNS options matches format of TCP options.
* DNS: Add printing the EDNS optionsCasey Deccio2020-04-101-0/+43
| | | | (pull request #762)
* Use more HTTPS in URLsFrancois-Xavier Le Bail2019-08-191-1/+1
| | | | [skip ci]
* Use %zu as the print format for size_tFrancois-Xavier Le Bail2019-08-081-1/+1
|
* DNS: Use PRIsize format instead of using a castFrancois-Xavier Le Bail2019-08-041-1/+1
|
* Use nd_ipv6 rather than struct in6_addrFrancois-Xavier Le Bail2019-06-101-3/+3
|
* DNS: Add a length checkFrancois-Xavier Le Bail2019-06-091-0/+8
| | | | Update the output of three tests accordingly.
* Add support for decoding DNS URI RR (typecode 256, RFC7553)Wang Jian2019-04-131-0/+9
|
* DNS: Rename a printerFrancois-Xavier Le Bail2019-04-031-11/+11
| | | | | | | | Rename ns_nprint() to fqdn_print(), with _print suffix like in most similar cases. Moreover: Move a misplaced comment.
* Squelch a compiler warning.Guy Harris2019-03-261-1/+1
| | | | Response codes are unsigned; make the argument to ns_rcode() unsigned.
* Use the new GET_ macros instead of the EXTRACT_ onesFrancois-Xavier Le Bail2019-03-261-48/+49
| | | | | | | The exceptions are currently: Some EXTRACT_ in print-juniper.c, not used on packet buffer pointer. An EXTRACT_BE_U_3 in addrtoname.c, not always used on packet buffer pointer.
* Extract extend DNS rcode from OPT record and print it.Mark Andrews2019-02-131-2/+59
|
* Add more nd_print_trunc() callsFrancois-Xavier Le Bail2018-05-101-1/+1
| | | | | | | Update the output of some tests accordingly. Moreover: Add a ndo_protocol field assignment.
* Rename the fn_printX() functions to nd_printX()Francois-Xavier Le Bail2018-04-301-3/+3
| | | | | | | The functions are: nd_print, nd_printztn, nd_printn and nd_printzp. Trying to make it clearer that they currently have to be used only on part of the packet buffer. Update some comments.
* Add the ndo_protocol field in the netdissect_options structureFrancois-Xavier Le Bail2018-03-161-0/+1
| | | | | Update this field in printer entry functions. It will be used for some printings.
* Use nd_ipv6 rather than struct in6_addr in packet-layout structures.Guy Harris2018-01-301-2/+2
| | | | Also, use it, and nd_ipv4, in sizeof() operations.
* 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
|
* Clean up signed vs. unsigned.Guy Harris2018-01-111-17/+17
|
* Update ND_PRINT() as a variadic macroFrancois-Xavier Le Bail2018-01-071-78/+78
|
* Use ND_TTEST_SIZE()/ND_TCHECK_SIZE() macros (1/n)Francois-Xavier Le Bail2018-01-031-1/+1
|
* DNS: Coding style updateFrancois-Xavier Le Bail2018-01-021-2/+2
|
* DNS: Address two clang warningsFrancois-Xavier Le Bail2017-12-301-0/+4
| | | | | | | | | | | | | | The warnings were: ./print-domain.c:258:18: warning: no previous extern declaration for non-static variable 'ns_type2str' [-Wmissing-variable-declarations] const struct tok ns_type2str[] = { ^ ./print-domain.c:323:18: warning: no previous extern declaration for non-static variable 'ns_class2str' [-Wmissing-variable-declarations] const struct tok ns_class2str[] = { ^
* C99 type, not BSD type; use uint16_t.Guy Harris2017-12-131-1/+1
|
* Remove all storage class specifier 'register'Francois-Xavier Le Bail2017-12-131-19/+19
| | | | | | Let the compiler do the optimizations (or not) based on build options. Avoid 'value has been optimized out' messages in gdb using '-O0'.
* Use nd_ types for DNS.Guy Harris2017-12-131-49/+66
| | | | | Make some types unsigned, and fix some loops to no longer depend on a zero count rolling over to -1 when decremented.
* Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)Francois-Xavier Le Bail2017-12-111-6/+6
| | | | | ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l) ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
* Use more the ND_TCHECK_1() macroFrancois-Xavier Le Bail2017-12-041-3/+3
|
* Use more the EXTRACT_U_1() macro (31/n)Francois-Xavier Le Bail2017-11-271-1/+1
| | | | | | In ND_PRINT() macro call(s) (step 9). *(p)
* Use more ND_TCHECK_n()/ND_TTEST_n() macrosFrancois-Xavier Le Bail2017-11-241-3/+3
|
* Rename EXTRACT_ macrosFrancois-Xavier Le Bail2017-11-221-44/+44
| | | | | | | | | | | | | | | | Now all the macros have a name meaning a count in bytes. With _S_: signed, _U_: unsigned e.g.: EXTRACT_BE_32BITS -> EXTRACT_BE_U_4 EXTRACT_LE_32BITS -> EXTRACT_LE_U_4 ... EXTRACT_BE_INT32 -> EXTRACT_BE_S_4 and have: EXTRACT_8BITS -> EXTRACT_U_1 EXTRACT_INT8 -> EXTRACT_S_1
* Rename ND_TCHECK_/ND_TTEST_ macrosFrancois-Xavier Le Bail2017-11-221-17/+17
| | | | | | | | Now all the macros have a name meaning a count in bytes. e.g.: ND_TCHECK_32BITS -> ND_TCHECK_4 ND_TTEST_32BITS -> ND_TTEST_4
* More EXTRACT_8BITS() changes. Use ND_CHECK_nBITS() more as well.Guy Harris2017-11-191-31/+41
|
* Rename EXTRACT_nBITS() macros to EXTRACT_BE_nBITS()Francois-Xavier Le Bail2017-11-181-32/+32
| | | | | It indicates clearly that these macros are used to extract big-endian integral values.
* DNS: Rename entry functionFrancois-Xavier Le Bail2017-11-161-1/+1
| | | | | | | Most printer entry functions are based on the file name (without print-). Do the same for DNS (ns_print -> domain_print) This change allows easier update by script.
* CVE-2017-12995/Check for DNS compression pointers that don't point backwards.Guy Harris2017-09-131-18/+19
| | | | | | | | | | | | | | | | | | | | | This is what BIND 9.11.0-P2 does; it not only detects pointers that loop, as "point backwards" means "point before anything we've processed so far, including what we're processing right now", so the pointer can't point to itself (as that's what we're processing right now). This fixes an infinite loop discovered by Forcepoint's security researchers Otto Airamo & Antti Levomäki. Add a test using the capture file supplied by the reporter(s). Also, add some infinite-pointer-loop captures. More checks should be done. We might, for example, want to make sure the upper 2 bits of the label length/pointer byte are 00 or 11, and that if we encounter a pointer and jump backwards to what we think is a label the label ends before the beginning of the last label we processed, to make sure the pointer doesn't point backwards into the *middle* of a label, and also make sure the entire name is <= 255 bytes long.
* CVE-2016-7993/Clean up relative time stamp printing.Guy Harris2017-01-181-1/+1
| | | | | | | | | | | | | Have separate routines for signed and unsigned relative time stamps. Have the routine for signed time stamps handle the case of -2^31, where you can't negate it and have the result fit in a 32-bit signed integer. There are currently no users of the signed relative time stamp routine, but it's there in case anybody needs it (and is passing 32-bit quantitites, so that there's a risk that a packet might contain -2^31 as the time stamp). Fixes an array overflow found with American Fuzzy Lop by Hanno Böck.
* Move the printer summaries from INSTALL.txt to each printerFrancois-Xavier Le Bail2016-08-141-0/+2
| | | | | | | | with the tag '\summary:' for greping. Remark: Currently some printers have no summary line. Moreover: Summarize all printers with a single line in INSTALL.txt
* Don't require IPv6 library support in order to support IPv6 addresses.Guy Harris2015-09-171-6/+3
| | | | | | | | | | | | | 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.
* Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'Francois-Xavier Le Bail2015-09-101-1/+1
| | | | Get the full log via: git log --follow netdissect-stdinc.h
* Remove obsolete commentsFrancois-Xavier Le Bail2015-09-071-1/+1
|
* Printers must include 'netdissect.h', not 'interface.h'Francois-Xavier Le Bail2015-09-051-1/+1
|
* For DNS messages, represent the "DNSSEC OK" bit as "DO" instead of "OK" Duane Wessels2015-06-181-1/+1
| | | "DO" is a better description of the DNSSEC OK bit in the EDNS0 OPT record. See RFC 3225 section 3. There may be other bits allocated in the future that call themselves "Something OK".
* Fix a bunch of de-constifications.Guy Harris2015-04-261-1/+1
|
* dismiss NETDISSECT_REWORKED macroDenis Ovsienko2015-03-221-1/+0
| | | | | | | The purpose of this macro was to enable the file-by-file switch to NDO, after which only tcpdump.c had a use of it and the definitions guarded by it. Update tcpdump.c not to require them any more and dismiss the unused definitions.
* u_intN_t is dead, long live uintN_t.Guy Harris2014-04-231-1/+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.
* NDOize the rest of util.cDenis Ovsienko2014-04-141-3/+3
|
* NDOize some generic codeDenis Ovsienko2014-04-031-1/+1
|
* NDOize BOOTP, DHCPv6, DNS, PIM and sFlow decodersDenis Ovsienko2014-03-251-179/+183
| | | | Also add/remove tabs in a few involved functions to justify indentation.