Skip to content

Commits on Nov 27, 2020

  1. 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.
    infrastation committed Nov 27, 2020

Commits on Jan 20, 2020

  1. 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.
    guyharris committed Jan 20, 2020

Commits on Nov 11, 2019

  1. Clean up rounding up.

    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.
    guyharris committed Nov 11, 2019

Commits on Aug 9, 2019

  1. 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.
    guyharris committed Aug 9, 2019

Commits on Jun 10, 2019

Commits on Jun 1, 2019

  1. 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.
    guyharris committed Jun 1, 2019

Commits on Apr 3, 2019

  1. DNS: Rename a printer

    Rename ns_nprint() to fqdn_print(), with _print suffix like in most
    similar cases.
    
    Moreover:
    Move a misplaced comment.
    fxlb committed Apr 3, 2019

Commits on Mar 26, 2019

  1. 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.
    fxlb committed Mar 26, 2019
  2. Add the ndo parameter to some functions

    This parameter will be needed at the next step.
    fxlb committed Mar 26, 2019

Commits on Sep 11, 2018

  1. Add the nd_print_invalid() function

    It prints " (invalid)", used for malformed or corrupted packets.
    
    Moreover:
    Update CONTRIBUTING.
    fxlb committed Sep 11, 2018

Commits on May 18, 2018

  1. Fix space printing with istr[]

    Because istr[] is assign to " (invalid)", avoid adding a space before it.
    
    Moreover:
    Avoid also useless '\n'
    fxlb committed May 18, 2018

Commits on May 6, 2018

  1. Add more nd_print_trunc() calls

    Update the output of some tests accordingly.
    fxlb committed May 6, 2018

Commits on May 2, 2018

  1. Remove the safeputs() function

    Use the nd_printzp() function instead.
    fxlb committed May 2, 2018

Commits on Apr 30, 2018

Commits on Mar 16, 2018

  1. Add the ndo_protocol field in the netdissect_options structure

    Update this field in printer entry functions.
    It will be used for some printings.
    fxlb committed Mar 16, 2018

Commits on Jan 31, 2018

  1. Have ip{6}addr_string take a u_char * as the second argument.

    Fix warnings that introduces.
    guyharris committed Jan 31, 2018

Commits on Jan 29, 2018

  1. 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).
    guyharris committed Jan 29, 2018

Commits on Jan 26, 2018

  1. 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.
    fxlb committed Jan 26, 2018

Commits on Jan 21, 2018

  1. 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.
    guyharris committed Jan 21, 2018

Commits on Jan 11, 2018

Commits on Jan 7, 2018

Commits on Dec 11, 2017

  1. 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)
    fxlb committed Dec 11, 2017

Commits on Dec 10, 2017

  1. Use more the EXTRACT_U_1() macro (53/n)

    Assignment, p[n], (more)
    fxlb committed Dec 10, 2017

Commits on Dec 9, 2017

  1. Use more the EXTRACT_U_1() macro (52/n)

    Assignment, p[n]
    fxlb committed Dec 9, 2017

Commits on Dec 3, 2017

  1. Use more the EXTRACT_U_1() macro (46/n)

    In: if (... p[n] ...) ...
    fxlb committed Dec 3, 2017
  2. Use more the EXTRACT_U_1() macro (43/n)

    In: if (... p[n] ...) ...
    fxlb committed Dec 3, 2017

Commits on Dec 2, 2017

  1. Simplify some expressions

    This will also help some future scripted code updates.
    fxlb committed Dec 2, 2017

Commits on Dec 1, 2017

  1. Use more the EXTRACT_U_1() macro (39/n)

    In some macros and functions call, p[n]
    fxlb committed Dec 1, 2017

Commits on Nov 26, 2017

  1. Use more the EXTRACT_U_1() macro (28/n)

    In ND_PRINT() macro call(s) (step 7).
    
    p[n] ...
    fxlb committed Nov 26, 2017

Commits on Nov 25, 2017

Commits on Nov 24, 2017

  1. Use more ND_TCHECK_n() macros

    fxlb committed Nov 24, 2017
Older