]> The Tcpdump Group git mirrors - tcpdump/log
tcpdump
6 years agoUpdate .gitignore for other configurations 703/head
Daniel Miller [Tue, 2 Oct 2018 03:14:14 +0000 (22:14 -0500)] 
Update .gitignore for other configurations

6 years agoAdd files generated by CMake on Windows to .gitignore
Daniel Miller [Tue, 2 Oct 2018 03:08:01 +0000 (22:08 -0500)] 
Add files generated by CMake on Windows to .gitignore

6 years agoSLIP: Remove printing the raw hex dump of the compressed header
Francois-Xavier Le Bail [Tue, 25 Sep 2018 20:21:09 +0000 (22:21 +0200)] 
SLIP: Remove printing the raw hex dump of the compressed header

ndo_nflag has not this function. We don't currently have an appropriate
flag for this use. Not sure printing the header in hex is currently useful.

Update the output of a test accordingly.

6 years agoAdd a nd_print_trunc() call
Francois-Xavier Le Bail [Mon, 24 Sep 2018 19:42:08 +0000 (21:42 +0200)] 
Add a nd_print_trunc() call

6 years agoICMPv6: Fix some truncation codes
Francois-Xavier Le Bail [Sun, 23 Sep 2018 16:51:23 +0000 (18:51 +0200)] 
ICMPv6: Fix some truncation codes

6 years agoIP6OPTS: Fix some truncation codes
Francois-Xavier Le Bail [Sun, 23 Sep 2018 16:06:00 +0000 (18:06 +0200)] 
IP6OPTS: Fix some truncation codes

Moreover:
Update the output of some tests accordingly.
Fix style.

6 years agoUpdate a test file.
Guy Harris [Mon, 24 Sep 2018 02:15:10 +0000 (19:15 -0700)] 
Update a test file.

The bug fix in ccd4a6b3b9165e575b8d425ea8ea96a8cb146df0 means we
correctly set the packet length to be the PDU length, so we can check
the checksum.

6 years agoClean up some narrowing warnings.
Guy Harris [Mon, 24 Sep 2018 01:09:56 +0000 (18:09 -0700)] 
Clean up some narrowing warnings.

Cast pointer differences, widen some variables, make some function
returns unsigned as they never return a negative number.

Fix a format while we're at it.

6 years agoFix the variable for the packet length.
Guy Harris [Mon, 24 Sep 2018 01:02:37 +0000 (18:02 -0700)] 
Fix the variable for the packet length.

The length passed in is a u_int, so we should assign it to a u_int, not
a u_short.

6 years agoSLIP: Add some bounds checks
Francois-Xavier Le Bail [Sat, 22 Sep 2018 14:20:43 +0000 (16:20 +0200)] 
SLIP: Add some bounds checks

This should fix GitHub issues #676 and #677.

6 years agoUpdate a comment
Francois-Xavier Le Bail [Sat, 22 Sep 2018 13:19:44 +0000 (15:19 +0200)] 
Update a comment

6 years agoIP: Simplify an expression
Francois-Xavier Le Bail [Sat, 22 Sep 2018 10:46:36 +0000 (12:46 +0200)] 
IP: Simplify an expression

6 years agoMerge pull request #701 from loganaden/master
Guy Harris [Sat, 22 Sep 2018 03:29:09 +0000 (20:29 -0700)] 
Merge pull request #701 from loganaden/master

Update my email address

6 years agoUpdate my email address 701/head
Loganaden Velvindron [Sat, 22 Sep 2018 03:23:04 +0000 (07:23 +0400)] 
Update my email address

6 years agoReorganize the dissection code a bit.
Guy Harris [Tue, 18 Sep 2018 07:07:24 +0000 (00:07 -0700)] 
Reorganize the dissection code a bit.

Get rid of the global nfserr variable and, instead, have it be local to
interp_reply().  That means one less global variable, which may be good
if any multi-threaded program tries to use libnetdissect in more than
one thread (there are still global variables that would have to be
removed), and gets rid of some cases where we didn't need to set it.

Don't bundle multiple operations inside an if clause.  This squelches
some warnings from MSVC, and makes the code a bit more uniform and a bit
easier to understand (and, in the process of doing that, found a bug
that was fixed in 596aca3d9384e739961df0b5c9ffd9d8161d6c9b).

6 years agoFix dissection of NFSv3 WRITE and LINK replies.
Guy Harris [Sun, 16 Sep 2018 15:33:38 +0000 (08:33 -0700)] 
Fix dissection of NFSv3 WRITE and LINK replies.

Don't report them all as truncated if -v isn't specified.

6 years agoThat wasn't correct.
Guy Harris [Sun, 16 Sep 2018 07:12:57 +0000 (00:12 -0700)] 
That wasn't correct.

6 years agoClean up the name resolution a bit.
Guy Harris [Sun, 16 Sep 2018 02:14:24 +0000 (19:14 -0700)] 
Clean up the name resolution a bit.

If we're not doing name-to-address resolution, don't bother with the
address-to-name table.

6 years agoDon't warn about declarations after statements.
Guy Harris [Sat, 15 Sep 2018 20:16:02 +0000 (13:16 -0700)] 
Don't warn about declarations after statements.

We now allow them, and require a compiler that supports them, so there's
no need to warn about them.

6 years agoDon't warn about declarations after statements.
Guy Harris [Sat, 15 Sep 2018 20:12:49 +0000 (13:12 -0700)] 
Don't warn about declarations after statements.

We now allow them, and require a compiler that supports them, so there's
no need to warn about them.

6 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Sat, 15 Sep 2018 15:38:43 +0000 (17:38 +0200)] 
Add more nd_print_trunc() calls

6 years agoFix data types.
Guy Harris [Sat, 15 Sep 2018 08:41:59 +0000 (01:41 -0700)] 
Fix data types.

If you're accumulating the lengths of strings, as returned by strlen(),
and passing the result to malloc(), it should be accumulated in a
size_t.

6 years agoMove getopt_long.h to missing.
Guy Harris [Sat, 15 Sep 2018 02:21:06 +0000 (19:21 -0700)] 
Move getopt_long.h to missing.

That's what we did for win_ether_ntohost.h.

6 years agoRevert "Clean up the code a bit."
Guy Harris [Sat, 15 Sep 2018 01:05:55 +0000 (18:05 -0700)] 
Revert "Clean up the code a bit."

This reverts commit a5eca2cbbfa991c0ae26d0b039bf303fa92734ac.

MSVC doesn't complain about it, so leave it alone.

6 years agoClean up the code a bit.
Guy Harris [Sat, 15 Sep 2018 00:48:45 +0000 (17:48 -0700)] 
Clean up the code a bit.

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.)

6 years agoBGP: Fix an error string
Francois-Xavier Le Bail [Fri, 14 Sep 2018 19:37:53 +0000 (21:37 +0200)] 
BGP: Fix an error string

"[|" is the prefix for a truncated string. This is not the case here.

6 years agoRemove some useless tests
Francois-Xavier Le Bail [Fri, 14 Sep 2018 15:34:47 +0000 (17:34 +0200)] 
Remove some useless tests

Because packet length (length) >= capture length (caplen).

(see the sanity checks in print.c, pretty_print_packet() function)

6 years agoSee if a newer MSVC will produce fewer warnings.
Guy Harris [Fri, 14 Sep 2018 02:19:38 +0000 (19:19 -0700)] 
See if a newer MSVC will produce fewer warnings.

Some of the narrowing warnings are false positives; newer versions of
Clang do a better job than older ones of determining the range of values
of expressions, and don't warn if the range is such that it can be
safely narrowed, so maybe the same is true of MSVC.

6 years agoDo parallel builds, run as a developer.
Guy Harris [Fri, 14 Sep 2018 00:14:23 +0000 (17:14 -0700)] 
Do parallel builds, run as a developer.

Tell msbuild to build in parallel.  Use Windows syntax for command-line
flags.  Create the .devel file.

6 years agoTry to find the 64-bit libraries in a 64-bit build.
Guy Harris [Thu, 13 Sep 2018 23:26:39 +0000 (16:26 -0700)] 
Try to find the 64-bit libraries in a 64-bit build.

6 years agoDo both 32-bit and 64-bit builds.
Guy Harris [Thu, 13 Sep 2018 23:09:51 +0000 (16:09 -0700)] 
Do both 32-bit and 64-bit builds.

6 years agoAdd a nd_print_trunc() call
Francois-Xavier Le Bail [Thu, 13 Sep 2018 19:42:20 +0000 (21:42 +0200)] 
Add a nd_print_trunc() call

6 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Thu, 13 Sep 2018 19:16:44 +0000 (21:16 +0200)] 
Add more nd_print_trunc() calls

6 years agoAdd more nd_print_trunc() calls
Francois-Xavier Le Bail [Thu, 13 Sep 2018 19:05:16 +0000 (21:05 +0200)] 
Add more nd_print_trunc() calls

6 years agoSLL: Remove two useless tests
Francois-Xavier Le Bail [Thu, 13 Sep 2018 17:24:27 +0000 (19:24 +0200)] 
SLL: Remove two useless tests

Because packet length (length) >= capture length (caplen).

(see the sanity checks in print.c, pretty_print_packet() function)

6 years agoFix style
Francois-Xavier Le Bail [Thu, 13 Sep 2018 12:48:20 +0000 (14:48 +0200)] 
Fix style

6 years agoEthernet: Remove two useless tests
Francois-Xavier Le Bail [Thu, 13 Sep 2018 12:24:23 +0000 (14:24 +0200)] 
Ethernet: Remove two useless tests

Because packet length (len) >= capture length (caplen).

(see the sanity checks in print.c, pretty_print_packet() function)

6 years agoEthernet: Remove two useless tests
Francois-Xavier Le Bail [Wed, 12 Sep 2018 17:25:14 +0000 (19:25 +0200)] 
Ethernet: Remove two useless tests

Because packet length (length) >= capture length (caplen), when
caplen >= ETHER_HDRLEN, length >= caplen cannot be < ETHER_HDRLEN.

Same for the other test (length < 4).

(see the sanity checks in print.c, pretty_print_packet() function)

Moreover:
Clean up indentation.

6 years agoAdd the nd_print_invalid() function
Francois-Xavier Le Bail [Tue, 11 Sep 2018 10:27:55 +0000 (12:27 +0200)] 
Add the nd_print_invalid() function

It prints " (invalid)", used for malformed or corrupted packets.

Moreover:
Update CONTRIBUTING.

6 years agoMake the invalid snaplen message clearer
Francois-Xavier Le Bail [Mon, 10 Sep 2018 08:07:34 +0000 (10:07 +0200)] 
Make the invalid snaplen message clearer

6 years agoMore status exit codes for a program using libnetdissect
Francois-Xavier Le Bail [Sun, 9 Sep 2018 12:27:22 +0000 (14:27 +0200)] 
More status exit codes for a program using libnetdissect

It can now use status exit codes 0 to 10.

6 years agoUpdate a comment with the new macros names
Francois-Xavier Le Bail [Sun, 9 Sep 2018 11:41:36 +0000 (13:41 +0200)] 
Update a comment with the new macros names

6 years agoAdd the debug macro ND_DEBUG
Francois-Xavier Le Bail [Tue, 4 Sep 2018 19:50:33 +0000 (21:50 +0200)] 
Add the debug macro ND_DEBUG

6 years agoDon't assume ARM supports unaligned accesses.
Guy Harris [Thu, 6 Sep 2018 03:26:39 +0000 (20:26 -0700)] 
Don't assume ARM supports unaligned accesses.

Prior to ARMv6, it didn't support it.  ARMv6 supports it, if the "don't
act like ARMv5" bit isn't set in the system control register, but has
another bit in the system control register to cause unaligned accesses
to fault rather than succeed.  ARMv7 and later don't have "act like
ARMv5" mode, but still has the "fault on unaligned access" bit.

At least some OSes might set the "fault on unaligned access" bit; if
your OS *doesn't* set it, feel free to modify the #if to check for your
OS and for ARM.

6 years agoClean up white space.
Guy Harris [Wed, 5 Sep 2018 19:51:24 +0000 (12:51 -0700)] 
Clean up white space.

6 years agoFix test output files to match Juniper dissector changes.
Guy Harris [Wed, 5 Sep 2018 19:40:35 +0000 (12:40 -0700)] 
Fix test output files to match Juniper dissector changes.

6 years agoClean up indentation.
Guy Harris [Wed, 5 Sep 2018 19:05:35 +0000 (12:05 -0700)] 
Clean up indentation.

6 years agoRemove trailing "_if" from protocol names.
Guy Harris [Wed, 5 Sep 2018 19:04:03 +0000 (12:04 -0700)] 
Remove trailing "_if" from protocol names.

"_if", in function names, is just a convention used for the top-level
routine for a given DLT_ value; it's not part of the protocol name for
the link-layer type.

6 years agoadd test for nfs write verf cookie
Viral Mehta [Fri, 24 Aug 2018 09:14:51 +0000 (05:14 -0400)] 
add test for nfs write verf cookie

test results:
[vmehta@centos72_base tcpdump]# make check | grep nfs
    unaligned-nfs-1                    : passed
    nfs-attr-oobr                      : passed
    hoobr_nfs_printfh                  : passed
    hoobr_nfs_xid_map_enter            : passed
    nfs-seg-fault-1                    : passed
    nfs-write-verf-cookie              : passed <- new test

6 years agoprint verifier cookie for write and commit operation
Viral Mehta [Thu, 23 Aug 2018 04:09:14 +0000 (00:09 -0400)] 
print verifier cookie for write and commit operation

6 years agoFix the fix.
Guy Harris [Tue, 4 Sep 2018 21:19:20 +0000 (14:19 -0700)] 
Fix the fix.

6 years agoFix the no-SSL-library version of that test.
Guy Harris [Tue, 4 Sep 2018 21:10:24 +0000 (14:10 -0700)] 
Fix the no-SSL-library version of that test.

6 years agoFix tests for BGP changes.
Guy Harris [Tue, 4 Sep 2018 18:34:41 +0000 (11:34 -0700)] 
Fix tests for BGP changes.

6 years agoFix dissection of RFC 4684 routing information.
Guy Harris [Tue, 4 Sep 2018 18:09:41 +0000 (11:09 -0700)] 
Fix dissection of RFC 4684 routing information.

RFC 4684, sadly, doesn't do a very good job of describing what a "route
target" is.  In practice, it appears to be a Route Target extended
community, as per RFC 4360 section 4 "Route Target Community".  Those do
*not* have the same format as an RFC 4364 Route Descriptor.

So just take the code to dissect an extended community, put it in a
subroutine, change it to directly print information rather than filling
in a static string buffer (C support for strings is spectacularly bad -
large variable-length objects are hard, let's go shopping!), and call
that routine when dissecting RFC 4684 routing information.

6 years agoFix spaces
Francois-Xavier Le Bail [Mon, 3 Sep 2018 12:03:25 +0000 (14:03 +0200)] 
Fix spaces

6 years agoTravis CI: Reduce git clone depth
Francois-Xavier Le Bail [Fri, 31 Aug 2018 14:03:51 +0000 (16:03 +0200)] 
Travis CI: Reduce git clone depth

6 years agoSquelch a warning on some platforms.
Guy Harris [Fri, 31 Aug 2018 06:42:53 +0000 (23:42 -0700)] 
Squelch a warning on some platforms.

Some platforms define the old V7 routine index() (renamed to strchr() in
System V; the latter name is what's used in ANSI C), and you get
"declaration of 'index' shadows a global declaration" warnings.

Call the variable if_index instead.

6 years agoRADIUS: constify a couple static arrays
Denis Ovsienko [Thu, 30 Aug 2018 14:25:59 +0000 (15:25 +0100)] 
RADIUS: constify a couple static arrays

[skip ci]

6 years agoFix spaces
Francois-Xavier Le Bail [Tue, 28 Aug 2018 15:15:19 +0000 (17:15 +0200)] 
Fix spaces

6 years agoCONTRIBUTING: Update about bounds checking
Francois-Xavier Le Bail [Thu, 23 Aug 2018 13:49:51 +0000 (15:49 +0200)] 
CONTRIBUTING: Update about bounds checking

6 years agoUse more the nd_print_trunc() call
Francois-Xavier Le Bail [Mon, 20 Aug 2018 14:20:27 +0000 (16:20 +0200)] 
Use more the nd_print_trunc() call

Update the output of some tests accordingly.

6 years agoEAP: Fixup the check for Code value.
Denis Ovsienko [Sat, 18 Aug 2018 18:00:36 +0000 (19:00 +0100)] 
EAP: Fixup the check for Code value.

Code value 0 is not assigned, and the code block guarded by the if() is
specific to Request (1) and Response (2) only. This change prevents the
printer from decoding some invalid EAP messages as if they were valid.

[skip ci]

6 years agoRADIUS: Deduplicate some printing code.
Denis Ovsienko [Sat, 18 Aug 2018 11:12:18 +0000 (12:12 +0100)] 
RADIUS: Deduplicate some printing code.

6 years agoEAP: simplify an if()
Denis Ovsienko [Fri, 17 Aug 2018 07:51:57 +0000 (08:51 +0100)] 
EAP: simplify an if()

[skip ci]

6 years agoTravis CI: Create .devel for both autotools and CMake
Francois-Xavier Le Bail [Tue, 14 Aug 2018 21:00:39 +0000 (23:00 +0200)] 
Travis CI: Create .devel for both autotools and CMake

That way, we do development builds for CMake as well, and get the
warnings turned up.

6 years agoTravis CI: Fold the 'cmake' output
Francois-Xavier Le Bail [Tue, 14 Aug 2018 20:57:34 +0000 (22:57 +0200)] 
Travis CI: Fold the 'cmake' output

This change allows to see better the possible warnings.

6 years agoTravis CI: Fix folding the 'configure' output
Francois-Xavier Le Bail [Tue, 14 Aug 2018 20:55:10 +0000 (22:55 +0200)] 
Travis CI: Fix folding the 'configure' output

6 years agoTravis CI: Simplify the script section
Francois-Xavier Le Bail [Tue, 14 Aug 2018 20:52:02 +0000 (22:52 +0200)] 
Travis CI: Simplify the script section

6 years agoNTP: Fix UTC/GMT timestamps printing according to RFC3339
Francois-Xavier Le Bail [Tue, 14 Aug 2018 12:12:56 +0000 (14:12 +0200)] 
NTP: Fix UTC/GMT timestamps printing according to RFC3339

Add the "Z" suffix for UTC.

According to the RFC3339:
      Z           A suffix which, when applied to a time, denotes a UTC
                  offset of 00:00; often spoken "Zulu" from the ICAO
                  phonetic alphabet representation of the letter "Z".

Update the output of some tests accordingly.

6 years agoTravis CI: Fix the openssl support in OSX build
fxlb [Sat, 11 Aug 2018 09:08:04 +0000 (11:08 +0200)] 
Travis CI: Fix the openssl support in OSX build

A directory name has changed.

Add OSX_SSL_DIR variable to track it.

6 years agoReport 32-bit timestamps with uppermost bit set as "Error converting time"
Francois-Xavier Le Bail [Thu, 9 Aug 2018 20:05:05 +0000 (22:05 +0200)] 
Report 32-bit timestamps with uppermost bit set as "Error converting time"

This is an update to packet header timestamps printing based on
Guy Harris's proposal.

Theses timestamps are outside the 1970-2038 range; This happens on some
fuzzed captures.

This will allow to have the same printing on Windows and UN*X.

Update needed before 2038.

6 years agoUpdate.
Guy Harris [Fri, 10 Aug 2018 20:56:15 +0000 (13:56 -0700)] 
Update.

-# is used to indicate which packets differ in how they're dissected,
not to ensure the reproducibility of the output.

We also set TZ to GMT0 to do all time-stamp printing in UTC.

6 years agoUpdate CONTRIBUTING and TESTLIST according to a recent change
Francois-Xavier Le Bail [Thu, 9 Aug 2018 18:34:56 +0000 (20:34 +0200)] 
Update CONTRIBUTING and TESTLIST according to a recent change

It's a follow-up to 018b2b8c96.

Thanks to Gisle Vanem to spot one of the inconsistencies.

Moreover:
Remove a useless '-#' option in TESTLIST.

6 years agoRefactor printing the time fractional part ({micro|nano}seconds)
Francois-Xavier Le Bail [Thu, 9 Aug 2018 11:25:23 +0000 (13:25 +0200)] 
Refactor printing the time fractional part ({micro|nano}seconds)

Add the ts_frac_print() function.

Avoid almost duplicate code.

6 years agoUse UTC/GMT time when building/checking tests files
Francois-Xavier Le Bail [Sat, 4 Aug 2018 06:46:17 +0000 (08:46 +0200)] 
Use UTC/GMT time when building/checking tests files

This will avoid some differences when checking in different time zones.

We now run the tests without the '-t' option. This will allow to get
problems/changes in time printing functions.

Update the output of the tests accordingly.

Moreover:
Add the '-#' option to better identify a packet when there is a difference
in output.

6 years agoExplicitly check to make sure the header length isn't too short.
Guy Harris [Wed, 8 Aug 2018 20:41:44 +0000 (13:41 -0700)] 
Explicitly check to make sure the header length isn't too short.

6 years agoAdd '-Wunreachable-code-return' warning option in devel mode for cmake
Francois-Xavier Le Bail [Tue, 7 Aug 2018 21:46:16 +0000 (23:46 +0200)] 
Add '-Wunreachable-code-return' warning option in devel mode for cmake

6 years agoSort the tested compiler warning options for cmake
Francois-Xavier Le Bail [Tue, 7 Aug 2018 21:36:44 +0000 (23:36 +0200)] 
Sort the tested compiler warning options for cmake

6 years agoRemove the no more used gmt2local() function
Francois-Xavier Le Bail [Tue, 7 Aug 2018 18:27:29 +0000 (20:27 +0200)] 
Remove the no more used gmt2local() function

6 years agoFix local time printing
Francois-Xavier Le Bail [Tue, 7 Aug 2018 15:11:43 +0000 (17:11 +0200)] 
Fix local time printing

Using seconds offset from GMT to local time to compute local time give
errors when printing times outside the same daylight saving time period.

Use the localtime() function for default and -tttt cases.
Use the gmtime() function for -ttt and -ttttt cases.

Rename ts_hmsfrac_print() to ts_date_hmsfrac_print().
Remove some variables now useless.
Update some comments.

6 years agoRADIUS: Decode more MIP6-Feature-Vector bits.
Denis Ovsienko [Mon, 6 Aug 2018 14:56:57 +0000 (14:56 +0000)] 
RADIUS: Decode more MIP6-Feature-Vector bits.

Add more allocations from and a link to the Mobility Capability registry.

6 years agoFix spaces
Francois-Xavier Le Bail [Mon, 6 Aug 2018 14:12:32 +0000 (16:12 +0200)] 
Fix spaces

6 years agoAdd a test for the RX/AFS protocol.
Denis Ovsienko [Fri, 3 Aug 2018 21:07:51 +0000 (22:07 +0100)] 
Add a test for the RX/AFS protocol.

The .pcap file is from https://wiki.wireshark.org/SampleCaptures, as
suggested on the openafs-devel mailing list.

6 years agoMerge pull request #636 from herwinw/radius
Denis Ovsienko [Fri, 3 Aug 2018 13:29:41 +0000 (14:29 +0100)] 
Merge pull request #636 from herwinw/radius

6 years agoImprove printout of MIP6-Feature-Vector 636/head
Denis Ovsienko [Thu, 2 Aug 2018 14:19:45 +0000 (16:19 +0200)] 
Improve printout of MIP6-Feature-Vector

6 years agoAdded RADIUS attributes from RFC 5447
Herwin Weststrate [Tue, 3 Oct 2017 18:10:23 +0000 (20:10 +0200)] 
Added RADIUS attributes from RFC 5447

* MIP6-Feature-Vector (124) (with extra attributes from RFC 6572)
* MIP6-Home-Link-Prefix (125)

6 years agoBGP: Add two comments
Francois-Xavier Le Bail [Thu, 2 Aug 2018 20:01:22 +0000 (22:01 +0200)] 
BGP: Add two comments

6 years agoFix some spelling in comments.
Denis Ovsienko [Wed, 1 Aug 2018 13:06:33 +0000 (14:06 +0100)] 
Fix some spelling in comments.

[skip ci]

6 years agoRefresh the CI status badges in README.md.
Denis Ovsienko [Wed, 1 Aug 2018 10:31:24 +0000 (10:31 +0000)] 
Refresh the CI status badges in README.md.

[skip ci]

6 years agoClean up indentation.
Guy Harris [Tue, 31 Jul 2018 16:58:38 +0000 (09:58 -0700)] 
Clean up indentation.

6 years agoAdd check for pcap timestamp warnings. (GH #693)
Greg Steinbrecher [Tue, 31 Jul 2018 12:54:04 +0000 (05:54 -0700)] 
Add check for pcap timestamp warnings. (GH #693)

Previously would silently accept any of "host", "adapter", or
"adapter_unsynced" regardless of whether the interface supported
the option.

6 years agoCLNP: Squelch a cppcheck warning (GH #629)
Denis Ovsienko [Mon, 30 Jul 2018 13:08:03 +0000 (14:08 +0100)] 
CLNP: Squelch a cppcheck warning (GH #629)

See also commit f944e1e39.

[print-isoclns.c:906] -> [print-isoclns.c:910]: (warning) Opposite inner
'if' condition leads to a dead code block.

[skip ci]

6 years agoDon't print timestamps to a buffer and then print the buffer.
Guy Harris [Mon, 30 Jul 2018 02:16:42 +0000 (19:16 -0700)] 
Don't print timestamps to a buffer and then print the buffer.

Just directly print them.  This means:

1) we don't have to worry about making a big enough buffer;

2) we don't get annoying warnings about string truncation
   due to invalid timestamp values;

3) we use a constant string as a format, so that the compiler
   can more easily do format string vs. format argument checks.

6 years agoIf none of those are defined, there's nothing to dissect.
Guy Harris [Mon, 30 Jul 2018 01:16:41 +0000 (18:16 -0700)] 
If none of those are defined, there's nothing to dissect.

Wrap everyting in the big #if.

6 years agoWrap unused definitions and declarations in #ifdef/#if.
Guy Harris [Mon, 30 Jul 2018 01:06:33 +0000 (18:06 -0700)] 
Wrap unused definitions and declarations in #ifdef/#if.

Some stuff is used only by certain dissectors; define/declare it only if
the dissectors that use it are being compiled.

6 years agoInclude pcap-missing.h, to get the declaration of pcap_datalink_val_to_name().
Guy Harris [Sun, 29 Jul 2018 22:08:16 +0000 (15:08 -0700)] 
Include pcap-missing.h, to get the declaration of pcap_datalink_val_to_name().

If we're building with an old version of libpcap that doesn't include
pcap_datalink_val_to_name(), we incorporate our own version, but we need
to have it declared before we use it.

6 years agoSurround some declarations/definitions with #ifdefs.
Guy Harris [Sun, 29 Jul 2018 21:59:40 +0000 (14:59 -0700)] 
Surround some declarations/definitions with #ifdefs.

Some variables are used only if certain pcap APIs are available; don't
define them if the APIs aren't available.

We don't define show_tstamp_types_and_exit() unless we have
pcap_set_tstamp_type(); don't declare it if we don't define it.

6 years agoUpdate the list of files in INSTALL.txt.
Denis Ovsienko [Sat, 28 Jul 2018 21:03:57 +0000 (22:03 +0100)] 
Update the list of files in INSTALL.txt.

[skip ci]

6 years agoRx: Fix remaining fall-through warnings (GH #618).
Denis Ovsienko [Sat, 28 Jul 2018 20:03:22 +0000 (21:03 +0100)] 
Rx: Fix remaining fall-through warnings (GH #618).

Benjamin Kaduk explains in the issue comments:

The first two ("bulk stat" and "callback"; lines 1023 and 1282) should
not fall through, but the other two ("list entry" in various forms,
lines 1741 and 1790) should fall through. The answer lies in the RPC-L
files at [1], [2] and [3] (also line 396), looking at the appropriate IN
or OUT arguments.

1: http://git.openafs.org/?p=openafs.git;a=blob;f=src/fsint/afsint.xg;h=9fe4980c6cffcae457789e363393825e29dcb7b1;hb=HEAD#l594
2: http://git.openafs.org/?p=openafs.git;a=blob;f=src/fsint/afscbint.xg;h=19760bc512c647595662c30e190303b3a20be983;hb=HEAD#l22
3: http://git.openafs.org/?p=openafs.git;a=blob;f=src/vlserver/vldbint.xg;h=ff34d12d45454de328439cab3ed896fd564f0c59;hb=HEAD#l341

6 years agoRemove a useless warning about the SMB decoder.
Denis Ovsienko [Sat, 28 Jul 2018 19:33:34 +0000 (20:33 +0100)] 
Remove a useless warning about the SMB decoder.

In the last couple years it had been proved that any decoder can
potentially have buffer overflows, hence let's not emphasize one of them
more than the others.