]> The Tcpdump Group git mirrors - tcpdump/log
tcpdump
10 years agoIntroduce --time-stamp-precision 377/head
Michal Sekletar [Wed, 19 Mar 2014 13:14:25 +0000 (14:14 +0100)] 
Introduce --time-stamp-precision

A while ago we introduced new API in libpcap which made possible to
request time stamps with higher precision (nanoseconds). This commit
aims to move things forward and implement missing bits. It introduces
new long option --time-stamp-precision. Note that there is no equivalent
short option.

When used for a live capture tcpdump will ask the kernel for time stamp
with desired precision and tcpdump will print fraction part of the time
stamp using respective format. We currently support only microsecond and
nanosecond precision. In the future we might support even more granular
time stamp precision, but we should be fine to support only
microseconds and nanoseconds for now. libpcap doesn't provide anything
else at the moment anyway.

When used in combination with -r/-w options then we obtain time stamps
appropriately scaled up or down from libpcap. Also note that distinct
magic number is used for savefiles containing nanosecond time stamps.

10 years agodelete trailing spaces/tabs
Francois-Xavier Le Bail [Mon, 12 May 2014 08:20:58 +0000 (10:20 +0200)] 
delete trailing spaces/tabs

10 years agoSquelch warnings on OS X.
Guy Harris [Wed, 7 May 2014 19:23:29 +0000 (12:23 -0700)] 
Squelch warnings on OS X.

10 years agoalso tell OpenSSL and libsmi versions
Gisle Vanem [Wed, 7 May 2014 19:07:35 +0000 (23:07 +0400)] 
also tell OpenSSL and libsmi versions

10 years agoopterr should default to 1, so illegal options are reported.
Guy Harris [Wed, 7 May 2014 19:05:29 +0000 (12:05 -0700)] 
opterr should default to 1, so illegal options are reported.

10 years agodate update
Francois-Xavier Le Bail [Wed, 7 May 2014 15:37:23 +0000 (17:37 +0200)] 
date update

10 years agoDocument --version.
Guy Harris [Tue, 6 May 2014 21:29:35 +0000 (14:29 -0700)] 
Document --version.

10 years agoAdd --version to the usage message.
Guy Harris [Tue, 6 May 2014 21:28:38 +0000 (14:28 -0700)] 
Add --version to the usage message.

10 years agoAdd a --version option, to print just version information.
Guy Harris [Tue, 6 May 2014 21:25:43 +0000 (14:25 -0700)] 
Add a --version option, to print just version information.

Also, use #defines starting at 128 (outside the ASCII range) for long
options having no short-option equivalent, and have -h/--help exit with
an exit status of 0 (you just asked for usage information, and you got
it - no fault, no error).

10 years agoEscape the second - in --number.
Guy Harris [Tue, 6 May 2014 21:16:56 +0000 (14:16 -0700)] 
Escape the second - in --number.

10 years agoMerge pull request #387 from fxlb/packet-number
Guy Harris [Tue, 6 May 2014 21:15:34 +0000 (14:15 -0700)] 
Merge pull request #387 from fxlb/packet-number

Print an optional packet number in the beginning of line

10 years agoman: add new '--number' option 387/head
Francois-Xavier Le Bail [Tue, 6 May 2014 20:32:59 +0000 (22:32 +0200)] 
man: add new '--number' option

10 years agoPrint an optional packet number in the beginning of line
Francois-Xavier Le Bail [Tue, 6 May 2014 10:07:55 +0000 (12:07 +0200)] 
Print an optional packet number in the beginning of line

The new option is '--number'.

10 years agoprint-ether: print 'ethertype IEEE1905.1' instead of 'ethertype Unknown'
Francois-Xavier Le Bail [Mon, 5 May 2014 09:02:52 +0000 (11:02 +0200)] 
print-ether: print 'ethertype IEEE1905.1' instead of 'ethertype Unknown'

not a full decoder, uses default print
reference: http://standards.ieee.org/develop/regauth/ethertype/eth.txt

10 years agoInclude <errno.h> on both Windows and UN*X.
Guy Harris [Sun, 4 May 2014 17:08:44 +0000 (10:08 -0700)] 
Include <errno.h> on both Windows and UN*X.

We need <errno.h> on UN*X in some files that include tcpdump-stdinc.h,
such as missing/inet_pton.c.

Remove includes of <errno.h> from files that include tcpdump-stdinc.h.

10 years agoAoE: add version 1 decoder (GH #298)
Denis Ovsienko [Sun, 4 May 2014 16:48:03 +0000 (20:48 +0400)] 
AoE: add version 1 decoder (GH #298)

The sample capture was produced with two Linux hosts (aoetools version
36, kernel module version 85, vblade version 21). One of the hosts
exported a 1MB block device containing a freshly created filesystem and
the other mounted it, wrote a small file and then unmounted.

10 years agoUNALIGNED is used in structures and must *always* be defined.
Guy Harris [Sun, 4 May 2014 16:29:25 +0000 (09:29 -0700)] 
UNALIGNED is used in structures and must *always* be defined.

"Always" means "even on compilers that don't define __GNUC__".  If we
don't want

#if X
{nothing}
#else
#undef UNALIGNED
#define UNALIGNED __attribute__((packed))
#endif

because it's backwards, just do

#if !(X)
#undef UNALIGNED
#define UNALIGNED __attribute__((packed))
#endif

11 years agoUpdate to autoconf 2.69.
Guy Harris [Sat, 3 May 2014 20:45:38 +0000 (13:45 -0700)] 
Update to autoconf 2.69.

11 years agoClean up protocol ID printing.
Guy Harris [Sat, 3 May 2014 19:36:06 +0000 (12:36 -0700)] 
Clean up protocol ID printing.

If getprotobynumber() doesn't return a valid protocol name, just print
the protocol number.

Don't bother with setprotoent() and endprotoent() - none of the other
dissectors using getprotobynumber() use them and, if it's a useful
optimization, we should do the optimization in a common routine for all
callers (or do some other optimization, e.g. reading the entire protocol
list and building a table in which we can do a quick lookup).

11 years agoBGP assumes octets, not bytes; no need to use NBBY, just use 8.
Guy Harris [Sat, 3 May 2014 18:44:54 +0000 (11:44 -0700)] 
BGP assumes octets, not bytes; no need to use NBBY, just use 8.

Everywhere else in the BGP dissector, we just use a constant 8 for the
number of bits per octet; get rid of the one place where we use NBBY.

This gets rid of the one and only place we use NBBY; get rid of our own
definition of it.

11 years agoDon't care about the Linux kernel version number.
Guy Harris [Sat, 3 May 2014 18:10:54 +0000 (11:10 -0700)] 
Don't care about the Linux kernel version number.

What OS-specific and OS-version-specific features tcpdump uses
*directly* should be checked for specifically; if it *requires* features
not available with systems using a 1.x kernel, the configure should fail
because of *that*, and if it doesn't require any such features, we
should allow building on/for systems with a 1.x kernel.

If there are issues with *libpcap* on systems with a 1.x kernel, then
that should be handled in the libpcap configure script - and, even if
it's impossible to capture traffic on such a system, you can build a
version of libpcap that can read files but not capture, which would give
you a tcpdump that could, at least, read files from other machines.

11 years agoMerge pull request #385 from qnet-herwin/cui
Guy Harris [Sat, 3 May 2014 17:42:45 +0000 (10:42 -0700)] 
Merge pull request #385 from qnet-herwin/cui

Added support to print radius attribute CUI

11 years agoWe no longer have win32/Include/errno.h.
Guy Harris [Fri, 2 May 2014 21:23:03 +0000 (14:23 -0700)] 
We no longer have win32/Include/errno.h.

11 years agoMerge git://github.com/the-tcpdump-group/tcpdump
Guy Harris [Fri, 2 May 2014 21:17:11 +0000 (14:17 -0700)] 
Merge git://github.com/the-tcpdump-group/tcpdump

11 years agoMerge pull request #386 from gvanem/master
Guy Harris [Fri, 2 May 2014 21:16:45 +0000 (14:16 -0700)] 
Merge pull request #386 from gvanem/master

tcpdump-stdinc.h cleanup

11 years agoFor all options with arguments, mention the argument.
Guy Harris [Fri, 2 May 2014 18:59:44 +0000 (11:59 -0700)] 
For all options with arguments, mention the argument.

In the detailed list of options, if an option takes an argument, list it
in the summary of the option.

Also, --list-interfaces corresponds to -D, not -d.

11 years agoAdd some long options.
Guy Harris [Fri, 2 May 2014 18:49:30 +0000 (11:49 -0700)] 
Add some long options.

Currently, they're all aliases for existing short options, but we're out
of letters, so we'll be adding some that won't have short options.

This means we can't have entries in the options table corresponding to
short options with no long options, as an entry in the long options
table with a null option name terminates the table.

11 years agoUpdate WinDump.dsp 386/head
Gisle Vanem [Fri, 2 May 2014 13:58:18 +0000 (06:58 -0700)] 
Update WinDump.dsp

Update for using win32/Src/ether_ntohost.c. (Untested .dsp file)

11 years agoUpdate WinDump.vcproj
Gisle Vanem [Fri, 2 May 2014 13:53:45 +0000 (06:53 -0700)] 
Update WinDump.vcproj

Update for using ./win32/Src/ether_ntohost.c. Hope the .vcproj is correct (untested).

11 years agoCreate ether_ntohost.c
Gisle Vanem [Fri, 2 May 2014 13:45:18 +0000 (06:45 -0700)] 
Create ether_ntohost.c

It's a major hassle to use 'pcap_next_etherent()' in Windump. So simply add a local 'ether_ntohost()' here.

11 years agoUse proper declaration
Gisle Vanem [Fri, 2 May 2014 13:36:14 +0000 (06:36 -0700)] 
Use proper declaration

'eproto_db' is in libpcap. Thus use a proper 'extern __declspec(dllimport)' declaration.

11 years agoUpdate TESTonce
Gisle Vanem [Fri, 2 May 2014 12:14:44 +0000 (05:14 -0700)] 
Update TESTonce

Adapt script for Strawberry Perl and possibly other Win32 Perls. The program is windump.exe on Windows.

11 years agoUpdate inet_pton.c
Gisle Vanem [Fri, 2 May 2014 12:06:38 +0000 (05:06 -0700)] 
Update inet_pton.c

Removed <errno.h> here since it's already included in ./tcpdump-stdinc.h. The local 'win32/Include/errno.h' is deleted.

11 years agoUpdate tcpdump-stdinc.h
Gisle Vanem [Fri, 2 May 2014 12:03:04 +0000 (05:03 -0700)] 
Update tcpdump-stdinc.h

Probably safe to assume MSVC has a `<stdint.h>` too.

11 years agoDelete errno.h
Gisle Vanem [Fri, 2 May 2014 11:32:18 +0000 (04:32 -0700)] 
Delete errno.h

Don't let this local errno.h mess with the system's <errno.h>. Ref. inclusion of <errno.h> in tcpdump-stdinc.h.

11 years agoUpdate tcpdump-stdinc.h
Gisle Vanem [Fri, 2 May 2014 11:30:57 +0000 (04:30 -0700)] 
Update tcpdump-stdinc.h

Put WinPcap's header "bittypes.h" before potentially defining basic types like "uint8_t". Define EAFNOSUPPORT unless defined in system's <errno.h>. The local Win32/Include/errno.h is gone.

11 years agoAdded support to print radius attribute CUI 385/head
Herwin Weststrate [Fri, 2 May 2014 08:36:45 +0000 (10:36 +0200)] 
Added support to print radius attribute CUI

Or Chargeable User Identity, specified in RFC 4372

11 years agoSort options and put in notes for unusable option letters.
Guy Harris [Fri, 2 May 2014 06:20:21 +0000 (23:20 -0700)] 
Sort options and put in notes for unusable option letters.

Sort the options alphabetically, and put in comments for the options
we're *currently* not using, to note that other versions of tcpdump use
them and that we should only use them for the same purposes.

11 years agoJust use #! /usr/bin/env perl.
Guy Harris [Fri, 2 May 2014 02:56:26 +0000 (19:56 -0700)] 
Just use #! /usr/bin/env perl.

That's a simpler way to deal with the Perl interpreter not being in
/usr/bin.

11 years agoDon't assume the Perl interpreter is in /usr/bin/perl.
Guy Harris [Fri, 2 May 2014 02:50:19 +0000 (19:50 -0700)] 
Don't assume the Perl interpreter is in /usr/bin/perl.

It's not necessarily there on all platforms.  Explicitly invoke the
interpreter to run the TESTonce script; that requires that, when you run
"make check", your path includes the directory in which the Perl
interpreter resides.

11 years agoSplit the OSPFv3 header and bodies into separate structures.
Guy Harris [Fri, 2 May 2014 02:48:10 +0000 (19:48 -0700)] 
Split the OSPFv3 header and bodies into separate structures.

Some compilers appear to put some padding before the ospf6_un union, so
the OSPFv3 packets aren't dissected correctly.  Pull the members of
that union into separate structures, and find the pointer to the OSPFv6
body by adding the header length to the pointer to the beginning of the
header.

11 years agoOops, forgot to fix missing/getopt_long.c to include getopt_long.h.
Guy Harris [Fri, 2 May 2014 02:17:42 +0000 (19:17 -0700)] 
Oops, forgot to fix missing/getopt_long.c to include getopt_long.h.

11 years agoRename our getopt.h to getopt_long.h.
Guy Harris [Fri, 2 May 2014 00:33:46 +0000 (17:33 -0700)] 
Rename our getopt.h to getopt_long.h.

That way, if we *do* have getopt_long(), we don't end up including our
getopt.h rather than the system's getopt.h.

11 years agoMerge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump
Guy Harris [Thu, 1 May 2014 23:13:22 +0000 (16:13 -0700)] 
Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump

11 years agoDefine optarg, optind, opterr, and optopt.
Gisle Vanem [Thu, 1 May 2014 19:27:34 +0000 (12:27 -0700)] 
Define optarg, optind, opterr, and optopt.

That's necessary on Windows, where you're not going to get them defined
by getopt().

11 years agoDefine optarg, optind, opterr, and optopt.
Gisle Vanem [Thu, 1 May 2014 19:27:34 +0000 (12:27 -0700)] 
Define optarg, optind, opterr, and optopt.

That's necessary on Windows, where you're not going to get them defined
by getopt(), and where the ref/def model rather than the common model is
used.

11 years agoIt's getopt_long.c, not getopt.c
Guy Harris [Thu, 1 May 2014 16:37:10 +0000 (09:37 -0700)] 
It's getopt_long.c, not getopt.c

11 years agoPut in missing getopt_long() files.
Guy Harris [Thu, 1 May 2014 16:36:26 +0000 (09:36 -0700)] 
Put in missing getopt_long() files.

11 years agofix missing/inet_ntop.c again
Gisle Vanem [Thu, 1 May 2014 10:39:17 +0000 (14:39 +0400)] 
fix missing/inet_ntop.c again

All tests that should print IPv6-addresses failed since 'INET6' wasn't
set when my missing/inet_ntop.c was compiled. Due to "config.h" was not
included.

Also got rid of 2 warnings:
 Missing/inet_ntop.c:146:23: warning: 'cur.len' may be used
 uninitialized in this function [-Wmaybe-uninitialized]

The tests also failed since the inet_ntop_v6() was returning hex-chars
in upper-case. So this patch returns string in lower-case.

11 years agoNot all platforms we support define AF_INET6.
Guy Harris [Wed, 30 Apr 2014 22:29:40 +0000 (15:29 -0700)] 
Not all platforms we support define AF_INET6.

11 years agoUse getopt_long().
Guy Harris [Wed, 30 Apr 2014 22:28:06 +0000 (15:28 -0700)] 
Use getopt_long().

This requires us to check for it in the configure script and to include
a version of getopt_long() for the benefit of platforms that don't have
it; we pick up the FreeBSD version and tweak it a bit (eliminating some
features specific to the BSD version of getopt_long(), as we want to use
it only in a fashion portable to Linux/*BSD/Solaris/etc.)

We also get rid of the version of getopt() we supply for Windows in
favor of the version of getopt_long() we provide.

11 years agoEnable check with various versions of gcc (e.g. CC=gcc-4.8 ./configure)
Francois-Xavier Le Bail [Mon, 28 Apr 2014 13:41:50 +0000 (15:41 +0200)] 
Enable check with various versions of gcc (e.g. CC=gcc-4.8 ./configure)

This change avoid:
    lmp-v : TEST SKIPPED (compiler is not GCC)

works also with: CC=/path/to/gcc ./configure

11 years agoMerge remote-tracking branch 'bpf/master'
Denis Ovsienko [Sun, 27 Apr 2014 05:05:54 +0000 (09:05 +0400)] 
Merge remote-tracking branch 'bpf/master'

11 years agoFields in PPI headers are little-endian, not big-endian.
Guy Harris [Sat, 26 Apr 2014 22:39:06 +0000 (15:39 -0700)] 
Fields in PPI headers are little-endian, not big-endian.

Fixes GitHub issue #382.

11 years agoCoverity: Put 'notification_email: [email protected]' in comment
Francois-Xavier Le Bail [Thu, 24 Apr 2014 12:55:44 +0000 (14:55 +0200)] 
Coverity: Put 'notification_email: [email protected]' in comment

11 years agomake NFLOG test case conditional
Denis Ovsienko [Wed, 23 Apr 2014 19:47:41 +0000 (23:47 +0400)] 
make NFLOG test case conditional

Not all libpcap copies have the support for NFLOG (added in 2013), thus
only run the test when tcpdump was compiled for it.

11 years agoMore fixes for uint8_t being shorter than u_int8_t.
Guy Harris [Wed, 23 Apr 2014 18:53:22 +0000 (11:53 -0700)] 
More fixes for uint8_t being shorter than u_int8_t.

Fix a typo while we're at it.

11 years agoWe still need u_intN_t.
Guy Harris [Wed, 23 Apr 2014 17:56:20 +0000 (10:56 -0700)] 
We still need u_intN_t.

Some libpcap headers use them, and even if we change libpcap to use
uintN_t, we don't require that tcpdump 4.x go with libpcap 1.x - we
allow people to install the latest tcpdump even if they have an older
libpcap and don't want to install a newer one.

However, we now define them in terms of the C99 uintN_t types, rather
than trying to guess what's appropriate; using unsigned long long for
u_int64_t meant that, on some platforms, u_int64_t didn't match
PRI[doux]64, and using unsigned long obviously won't work on ILP32
platforms.

Also, we already had calls to the autoconf macros for C99 types; get rid
of the ones we added.

Also also, clean up a comment in tcpdump-stdinc.h.

11 years agoSome indentation cleanups from the previous checkin.
Guy Harris [Wed, 23 Apr 2014 07:47:03 +0000 (00:47 -0700)] 
Some indentation cleanups from the previous checkin.

11 years agoMore getting rid of old u_intN_t.
Guy Harris [Wed, 23 Apr 2014 07:45:13 +0000 (00:45 -0700)] 
More getting rid of old u_intN_t.

11 years agou_intN_t is dead, long live uintN_t.
Guy Harris [Wed, 23 Apr 2014 07:20:40 +0000 (00:20 -0700)] 
u_intN_t is dead, long live uintN_t.

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.

11 years agoupdate CREDITS
Denis Ovsienko [Tue, 22 Apr 2014 05:51:20 +0000 (09:51 +0400)] 
update CREDITS

11 years agoShorten sizeof to u_int, to match the %u format used with it.
Guy Harris [Mon, 21 Apr 2014 21:02:29 +0000 (14:02 -0700)] 
Shorten sizeof to u_int, to match the %u format used with it.

On LP64 and LLP64 platforms, sizeof returns a 64-bit value, which is
larger than an int or unsigned int, so if you add the result of sizeof
to a value shorter than 64 bits, you can't print the result with %u.

As an M3UA parameter header is much shorter than 2^32 bytes, we can
safely just cast sizeof(struct m3ua_param_header) to u_int.

11 years agoM3UA: add safety checks
Denis Ovsienko [Mon, 21 Apr 2014 14:51:43 +0000 (18:51 +0400)] 
M3UA: add safety checks

Add M3UA headers diagrams and check that message/parameter length allows
for at least respective header. Use TCHECK and signal malformed
structures.

11 years agoM3UA: improve code style
Denis Ovsienko [Mon, 21 Apr 2014 11:07:15 +0000 (15:07 +0400)] 
M3UA: improve code style

Merge m3ua.h into the only file that includes it (print-m3ua.c). Make
M3UA functions follow naming pattern, constify some of their arguments
and switch to ND_PRINT(). Make use of tok2str() and ternary conditional.
Eliminate declarations in the middle of code (C89).

11 years agoM3UA support added (GH #342)
Vyacheslav Trushkin [Fri, 22 Nov 2013 09:28:37 +0000 (16:28 +0700)] 
M3UA support added (GH #342)

SCTP's payload protocol identifiers added.

M3UA tests provided by wireshark
http://wiki.wireshark.org/SampleCaptures#Sigtran_Protocol_Family
But RFC4666 tells that parameter 0x0002 aren't carried by M3UA, so
it's OK that tcpdump doesn't know about this identifier.

Conflicts:
Makefile.in
interface.h
print-sctp.c
sctpConstants.h

-----------------------------------------------------------------------
The change to sctp_print() does three things:
* makes detection of ForCES consider PPID, not just port number
* verifies chunk length of all SCTP_DATA chunks, not just of ForCES
* adds PPID-specific dispatching with a particular case of M3UA

-- Denis

11 years agoWhen parsing information elements, check for the full length beforehand.
Guy Harris [Sat, 19 Apr 2014 02:09:49 +0000 (19:09 -0700)] 
When parsing information elements, check for the full length beforehand.

When parsing information elements, first check to make sure we have the
element ID and length, and fetch the length; then check to make sure we
have the entire element, including the information.  Remove those checks
from the handlers for individual elements.

This squelches a Coverity warning (when we check to make sure the length
remaining in the packet is enough for the element ID; the element ID is
one byte, and the loop continues as long as the length is non-zero, so
that's always true in the loop), and simplifies some other code.

Also check for the right length for fixed-length elements while we're at
it.

11 years agoThe item_len argument to ikev1_id_print() *is* used.
Guy Harris [Sat, 19 Apr 2014 00:53:01 +0000 (17:53 -0700)] 
The item_len argument to ikev1_id_print() *is* used.

So don't mark it as unused; that *might* be what's causing Coverity to
think that sizeof(struct ikev1_pl_id) is always < item_len and thus that
the "data" variable can never be null.

11 years agoSquelch a Coverity warning.
Guy Harris [Sat, 19 Apr 2014 00:43:09 +0000 (17:43 -0700)] 
Squelch a Coverity warning.

Make the lsa_p_prefix field as large as the largest possible prefix, so
that Coverity doesn't complain about going past the end of an array.

11 years agoCoverity: fix 'notification_email' value
Francois-Xavier Le Bail [Fri, 18 Apr 2014 09:09:57 +0000 (11:09 +0200)] 
Coverity: fix 'notification_email' value

11 years agofix incorrect IPv6 UDP and ICMPv6 checksums with routing headers
Francois-Xavier Le Bail [Thu, 17 Apr 2014 13:18:41 +0000 (15:18 +0200)] 
fix incorrect IPv6 UDP and ICMPv6 checksums with routing headers

- in this case the destination address used in the pseudo-header is
  that of the final destination : the last address of the routing header

- add a pcap file

11 years agoadd PacketLife captures for HSRP and IS-IS
Denis Ovsienko [Thu, 17 Apr 2014 10:27:22 +0000 (14:27 +0400)] 
add PacketLife captures for HSRP and IS-IS

11 years agoEIGRP: add IPv4 test cases from PacketLife
Denis Ovsienko [Wed, 16 Apr 2014 08:29:54 +0000 (12:29 +0400)] 
EIGRP: add IPv4 test cases from PacketLife

11 years agoOSPFv3: add PacketLife sample captures
Denis Ovsienko [Tue, 15 Apr 2014 15:47:52 +0000 (19:47 +0400)] 
OSPFv3: add PacketLife sample captures

11 years agoCoverity: update .travis.yml for analysis by pushing in 'coverity_scan' branch
Francois-Xavier Le Bail [Tue, 15 Apr 2014 14:24:36 +0000 (16:24 +0200)] 
Coverity: update .travis.yml for analysis by pushing in 'coverity_scan' branch

11 years agoCoverity: customize the build script
Francois-Xavier Le Bail [Tue, 15 Apr 2014 14:14:01 +0000 (16:14 +0200)] 
Coverity: customize the build script

- add a 'Verify Coverity Scan run condition' step to avoid multiple runs with
  Travis matrix.
- add a 'Verify Coverity Scan script test mode' step. if true no uploading, to
  avoid reaching the quota. usual processing: false.
- send 'description' as VERSION#SHA (e.g.: 4.6.0-PRE-GIT#c661f8b)

11 years agoCoverity: add the build script used by Travis-CI and Coverity Scan
Francois-Xavier Le Bail [Tue, 15 Apr 2014 14:08:51 +0000 (16:08 +0200)] 
Coverity: add the build script used by Travis-CI and Coverity Scan

from https://scan.coverity.com/scripts/travisci_build_coverity_scan.sh

11 years agofix runaway ND_PRINT() parentheses
Gisle Vanem [Tue, 15 Apr 2014 13:14:51 +0000 (17:14 +0400)] 
fix runaway ND_PRINT() parentheses

11 years agoNFS: prepend %x format with 0x (mitigates GH #35)
Denis Ovsienko [Tue, 15 Apr 2014 08:43:47 +0000 (12:43 +0400)] 
NFS: prepend %x format with 0x (mitigates GH #35)

11 years agouse more PacketLife captures for test cases
Denis Ovsienko [Mon, 14 Apr 2014 10:12:46 +0000 (14:12 +0400)] 
use more PacketLife captures for test cases

Improve coverage for ISAKMP, IGMP and HDLC. Add initial coverage for STP
variants, DECnet, RADIUS, DTP, LACP, LLDP, CDP, VTP and UDLD.

11 years agoput Hannes' prior captures to work
Denis Ovsienko [Mon, 14 Apr 2014 10:00:57 +0000 (14:00 +0400)] 
put Hannes' prior captures to work

Add test cases for the .pcap files added in 2005 (complements commits
279c3bd80d7284 and 0dcd9ac).

11 years agoSMB: make use of tok2str() and ternary conditional
Denis Ovsienko [Mon, 14 Apr 2014 07:40:51 +0000 (11:40 +0400)] 
SMB: make use of tok2str() and ternary conditional

11 years agoNDOize the rest of util.c
Denis Ovsienko [Mon, 14 Apr 2014 06:53:46 +0000 (10:53 +0400)] 
NDOize the rest of util.c

11 years agoNFS: use tok2str()
Denis Ovsienko [Sun, 13 Apr 2014 15:28:05 +0000 (19:28 +0400)] 
NFS: use tok2str()

11 years agoPIM: add some v2 test cases
Denis Ovsienko [Sat, 12 Apr 2014 06:51:48 +0000 (10:51 +0400)] 
PIM: add some v2 test cases

The sample captures come from packetlife.net through courtesy of Jeremy
Stretch.

11 years agoremove unused function nfsreq_print()
Denis Ovsienko [Fri, 11 Apr 2014 14:31:40 +0000 (18:31 +0400)] 
remove unused function nfsreq_print()

11 years agoOSPFv3: fix SEGV on SPARCv9 (concurs with 8f6bca3)
Denis Ovsienko [Fri, 11 Apr 2014 09:18:20 +0000 (13:18 +0400)] 
OSPFv3: fix SEGV on SPARCv9 (concurs with 8f6bca3)

This bug arose on the OpenCSW build farm:

    ospf3_auth-vv                 : TEST FAILED

Dagobert Michelsen had helped to use the farm servers to debug.

11 years agoIEEE 802.11: use tok2str()
Denis Ovsienko [Fri, 11 Apr 2014 08:14:47 +0000 (12:14 +0400)] 
IEEE 802.11: use tok2str()

11 years agoPIM: refresh and use tok2str()
Denis Ovsienko [Thu, 10 Apr 2014 15:58:36 +0000 (19:58 +0400)] 
PIM: refresh and use tok2str()

Remove PIMv1 type 8 (Mode), which is missing from
draft-ietf-idmr-pim-spec-01 and is not decoded anyway.

List (w/o decoding) two PIMv2 types defined in 2007 and 2012.

11 years agoSCTP: use tok2str()
Denis Ovsienko [Thu, 10 Apr 2014 12:41:39 +0000 (16:41 +0400)] 
SCTP: use tok2str()

11 years agoDHCPv6: make use of tok2str()
Denis Ovsienko [Thu, 10 Apr 2014 10:47:31 +0000 (14:47 +0400)] 
DHCPv6: make use of tok2str()

11 years agoDHCPv6: axe a couple invariant expressions
Denis Ovsienko [Thu, 10 Apr 2014 10:23:17 +0000 (14:23 +0400)] 
DHCPv6: axe a couple invariant expressions

The "type > 65535" condition in dhcp6opt_name() was always false because
the function is given a 16-bit argument.

The "dh6->dh6_msgtype" condition in dhcp6_print() was always true
because name == NULL only when none of the preceding switch block cases
matched.

11 years agoPPTP: use tok2str() and ternary conditional
Denis Ovsienko [Wed, 9 Apr 2014 12:08:00 +0000 (16:08 +0400)] 
PPTP: use tok2str() and ternary conditional

11 years agoMerge remote-tracking branch 'bpf/master'
Denis Ovsienko [Sun, 6 Apr 2014 17:22:43 +0000 (21:22 +0400)] 
Merge remote-tracking branch 'bpf/master'

11 years agofix a couple typos
Denis Ovsienko [Sat, 5 Apr 2014 09:49:45 +0000 (13:49 +0400)] 
fix a couple typos

11 years ago.travis.yml: install libdnet-dev and libsmi2-dev devel libs
Francois-Xavier Le Bail [Fri, 4 Apr 2014 14:30:39 +0000 (16:30 +0200)] 
.travis.yml: install libdnet-dev and libsmi2-dev devel libs

11 years agoDeclare default_print() only if NETDISSECT_REWORKED isn't defined.
Guy Harris [Fri, 4 Apr 2014 08:01:31 +0000 (01:01 -0700)] 
Declare default_print() only if NETDISSECT_REWORKED isn't defined.

Routines using netdissect_options should be using ndo->ndo_default_print.

11 years agoDefine NETDISSECT_REWORKED in a bunch of files, and fix the issues it finds.
Guy Harris [Fri, 4 Apr 2014 07:53:03 +0000 (00:53 -0700)] 
Define NETDISSECT_REWORKED in a bunch of files, and fix the issues it finds.

The only one it found was that routines in sigsecret.c needed to refer
to ndo->ndo_sigsecret, not just sigsecret.

11 years agoprint-ppp: fix "p[2] & 0x200 is always 0" found by Coverity and a bad shift
Francois-Xavier Le Bail [Fri, 4 Apr 2014 06:23:08 +0000 (08:23 +0200)] 
print-ppp: fix "p[2] & 0x200 is always 0" found by Coverity and a bad shift

11 years agoDefine NETDISSECT_REWORKED and fix the issues it provokes.
Guy Harris [Fri, 4 Apr 2014 07:46:33 +0000 (00:46 -0700)] 
Define NETDISSECT_REWORKED and fix the issues it provokes.

I.e., use the flags from the netdissect_options structure.