Commits on Feb 5, 2022
Commits on Dec 10, 2020
Commits on Nov 27, 2020
-
Lose some more unnecessary #include lines. [skip ci]
This trivial change compiles fine with GCC 7.5.0 on Linux and Clang 10.0.1 on FreeBSD, so let's not run the full round of CI this time.
Commits on Sep 28, 2020
Commits on Jan 20, 2020
-
More bounds checking when fetching addresses and converting to strings.
Replace more calls to ipaddr_string()/ip6addr_string() with calls to GET_IPADDR_STRING()/GET_IP6ADDR_STRING() macros performing bounds checking. Add similar bounds-checking inline functions and macros to wrap linkaddr_string(), etheraddr_string(), and isonsap_string() and convert calls to them to use the macros as well. Shuffle the inline functions in addrtoname.h around a bit, so that the inline functions, external declarations, and macros are all in the same order.
Commits on Nov 11, 2019
-
Have roundup2() cast the power-of-2 argument to u_int; that way, you don't have to explicitly define it as an unsigned value in order to avoid compiler or UBSan complaints about signed integers. Use it instead of rolling our own rounding-to-a-power-of-2.
Commits on Aug 9, 2019
-
Remove more old-compiler compensation.
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.
Commits on Jun 10, 2019
Commits on Jun 1, 2019
-
If decode_prefix6() returns a negative number, don't print buf.
If it returns a negative number, it hasn't necessarily filled in buf, so just return immediately; this is similar to the IPv4 code path, wherein we just return a negative number, and print nothing, on an error. This should fix GitHub issue #763.
Commits on Apr 3, 2019
-
Rename ns_nprint() to fqdn_print(), with _print suffix like in most similar cases. Moreover: Move a misplaced comment.
Commits on Mar 26, 2019
-
Use the new GET_ macros instead of the EXTRACT_ ones
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.
-
Add the ndo parameter to some functions
This parameter will be needed at the next step.
Commits on Sep 11, 2018
-
Add the nd_print_invalid() function
It prints " (invalid)", used for malformed or corrupted packets. Moreover: Update CONTRIBUTING.
Commits on May 18, 2018
-
Fix space printing with istr[]
Because istr[] is assign to " (invalid)", avoid adding a space before it. Moreover: Avoid also useless '\n'
Commits on May 6, 2018
-
Add more nd_print_trunc() calls
Update the output of some tests accordingly.
Commits on May 2, 2018
Commits on Apr 30, 2018
Commits on Mar 16, 2018
-
Add the ndo_protocol field in the netdissect_options structure
Update this field in printer entry functions. It will be used for some printings.
Commits on Jan 31, 2018
-
Have ip{6}addr_string take a u_char * as the second argument.
Fix warnings that introduces.
Commits on Jan 29, 2018
-
Add nd_{v}snprintf() routines/wrappers.
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).
Commits on Jan 26, 2018
-
Remove function specifier 'inline' in printers
It was mostly used with large functions. Moreover: Put some function definition names at the beginning of line. Fix a space.
Commits on Jan 21, 2018
-
Always include <config.h> rather than "config.h".
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.
Commits on Jan 11, 2018
Commits on Jan 7, 2018
Commits on Dec 11, 2017
-
Replace ND_TTEST2()/ND_TCHECK2() macros by macros using pointers (1/n)
ND_TTEST2(var, l) -> ND_TTEST_LEN(p, l) ND_TCHECK2(var, l) -> ND_TCHECK_LEN(p, l)
Commits on Dec 10, 2017
Commits on Dec 9, 2017
Commits on Dec 3, 2017
Commits on Dec 2, 2017
-
This will also help some future scripted code updates.
Commits on Dec 1, 2017
-
Use more the EXTRACT_U_1() macro (39/n)
In some macros and functions call, p[n]
Commits on Nov 26, 2017
-
Use more the EXTRACT_U_1() macro (28/n)
In ND_PRINT() macro call(s) (step 7). p[n] ...