]> The Tcpdump Group git mirrors - tcpdump/log
tcpdump
10 years agoAdded RFC4675 attributes to RADIUS dissector 405/head
Herwin Weststrate [Mon, 6 Oct 2014 11:54:23 +0000 (13:54 +0200)] 
Added RFC4675 attributes to RADIUS dissector

10 years agoFix indentation.
Guy Harris [Thu, 2 Oct 2014 00:55:59 +0000 (17:55 -0700)] 
Fix indentation.

10 years agoLeave it up to ip6_print() to handle non-IPv6-capable systems.
Guy Harris [Wed, 1 Oct 2014 22:32:11 +0000 (15:32 -0700)] 
Leave it up to ip6_print() to handle non-IPv6-capable systems.

Always define and declare ip6_print(), always compile print-ip6.c, and
always call it if we recognize a payload as IPv6.  If INET6 isn't
defined, ip6_print() will just print the length and note that printing
isn't supported.

That way, we don't do weird dissection of IPv6 packets on systems
without IPv6 support, due to, for example, ethertype_print() returning 0
("not dissected") for IPv6 packets on those systems (IPv6-over-Frame
Relay was dissected weirdly due to this).

10 years agoAdd some more parentheses, Just In Case.
Guy Harris [Wed, 1 Oct 2014 20:12:13 +0000 (13:12 -0700)] 
Add some more parentheses, Just In Case.

I'm not sure whether

Performing a byte swapping operation on "p" implies that it came
from an external source, and is therefore tainted.

from Coverity means that it thinks we're byte-swapping the pointer
*itself*, or that we're byte-swapping what it points to, but, just in
case it's the former, let's try throwing some more parentheses in.

(If it's the latter, well, yes, it's packet data, so it comes from an
external source, but Coverity didn't seem to point out any place where
we were using the data it points to without checking its value in cases
where we have to.)

10 years agoAdd PPI printing fixes.
Guy Harris [Tue, 23 Sep 2014 23:19:14 +0000 (16:19 -0700)] 
Add PPI printing fixes.

10 years agoFix PPI header and payload printing.
Guy Harris [Tue, 23 Sep 2014 23:08:42 +0000 (16:08 -0700)] 
Fix PPI header and payload printing.

Header printing (-e) had a stray ", " before the header; remove it.

Payload printing was skipping only the fixed portion of the PPI header,
not the entire header.

10 years agoClean up tag printing.
Guy Harris [Mon, 8 Sep 2014 18:50:57 +0000 (11:50 -0700)] 
Clean up tag printing.

Always show the tag as "Tag[XXX]" and always put a space between that
and the rest of the value, with no comma.

If the tag is present but unused, always show it as "Tag[Unused]".

10 years agoMerge git://github.com/the-tcpdump-group/tcpdump
Guy Harris [Mon, 8 Sep 2014 18:48:37 +0000 (11:48 -0700)] 
Merge git://github.com/the-tcpdump-group/tcpdump

10 years agoMerge pull request #404 from qnet-herwin/print_radius_tag
Denis Ovsienko [Sat, 6 Sep 2014 19:26:04 +0000 (20:26 +0100)] 
Merge pull request #404 from qnet-herwin/print_radius_tag

10 years agoAdd in the 4.6.2 changes.
Guy Harris [Fri, 5 Sep 2014 10:42:43 +0000 (03:42 -0700)] 
Add in the 4.6.2 changes.

10 years agoClarify what abort_on_misalignment() does.
Guy Harris [Wed, 3 Sep 2014 21:03:53 +0000 (14:03 -0700)] 
Clarify what abort_on_misalignment() does.

It doesn't request byte misalignment repair, it requests that byte
misalignment kill the program with SIGBUS; on platforms that don't
support aligned loads, we should be fetching possibly-misaligned data
using some safe instruction sequence, not by doing misaligned loads and
relying on them to trap to the kernel and be (slowly) emulated.

10 years agoMerge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump
Michael Richardson [Wed, 3 Sep 2014 01:16:41 +0000 (21:16 -0400)] 
Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump

10 years agothese changes to aclocal let tcpdump, when build out of source tree,
Michael Richardson [Wed, 3 Sep 2014 01:16:24 +0000 (21:16 -0400)] 
these changes to aclocal let tcpdump, when build out of source tree,
to find a libpcap that is adjacent to it, also built out of source tree

10 years agocomma in AC_MSG_ERROR confuses configure
Michael Richardson [Wed, 3 Sep 2014 01:05:21 +0000 (21:05 -0400)] 
comma in AC_MSG_ERROR confuses configure

10 years agoPrint square brackets around the tag value in RADIUS strings 404/head
Herwin Weststrate [Mon, 1 Sep 2014 14:25:04 +0000 (16:25 +0200)] 
Print square brackets around the tag value in RADIUS strings

Before, VLAN attributes that had a tag 1 looked like this:

  Tunnel Medium Attribute (65), length: 6, Value: Tag[1]802
  Tunnel Private Group Attribute (81), length: 4, Value: Tag 14

With the Tunnel-Medium-Type attribute (65), it is clear where the tag ends and the value begins. With this patch, the value for a string type (like Tunnel-Private-Group-Id) looks similar:

  Tunnel Private Group Attribute (81), length: 4, Value: Tag[1]4

10 years agoDocument --with-sandbox-capsicum.
Guy Harris [Sun, 31 Aug 2014 20:37:10 +0000 (13:37 -0700)] 
Document --with-sandbox-capsicum.

10 years agoClean up configure check for libsmi.
Guy Harris [Sun, 31 Aug 2014 18:57:04 +0000 (11:57 -0700)] 
Clean up configure check for libsmi.

First, check for smi.h.  If we don't have it, don't check for anything
else.

If we do have it, check for libsmi containing smiInit.  If we don't have
it, don't check for anything else.

If we do have it, check, with our test program, whether we can use it.

If that succeeds, prepend -lsmi to LIBS, and set USE_LIBSMI.  Otherwise,
don't do either of those.

Check, in source, *only* for USE_LIBSMI.  If it's set, use libsmi,
otherwise don't - don't even include smi.h, even if we happened to have
found it, and don't print the libsmi version string.

10 years agoUpdate a URL.
Guy Harris [Sat, 16 Aug 2014 06:03:20 +0000 (23:03 -0700)] 
Update a URL.

10 years agoMore #defines for CDP lengths and offsets.
Guy Harris [Fri, 15 Aug 2014 22:38:31 +0000 (15:38 -0700)] 
More #defines for CDP lengths and offsets.

10 years agoAdd TLV length checks, fix another length check.
Guy Harris [Fri, 15 Aug 2014 22:13:15 +0000 (15:13 -0700)] 
Add TLV length checks, fix another length check.

10 years agoUse tabs consistently.
Guy Harris [Fri, 15 Aug 2014 22:03:46 +0000 (15:03 -0700)] 
Use tabs consistently.

10 years agoUpdate to reflect the output format changes and bug fixes for CDP.
Guy Harris [Fri, 15 Aug 2014 01:21:23 +0000 (18:21 -0700)] 
Update to reflect the output format changes and bug fixes for CDP.

10 years agoQualify "length" when printing it.
Guy Harris [Fri, 15 Aug 2014 01:19:00 +0000 (18:19 -0700)] 
Qualify "length" when printing it.

In the "the TLV length is too short" message, we're printing the length
of the entire TLV; report it as "TLV length".  If we pass that test,
we've subtracted out the lengths of the T and the L, leaving only the
length of the V, so report it as "value length".

10 years agoMerge git://github.com/the-tcpdump-group/tcpdump
Guy Harris [Fri, 15 Aug 2014 00:21:09 +0000 (17:21 -0700)] 
Merge git://github.com/the-tcpdump-group/tcpdump

10 years agoMerge pull request #403 from superjamie/cdp-checksum-and-cleanup
Guy Harris [Fri, 15 Aug 2014 00:19:17 +0000 (17:19 -0700)] 
Merge pull request #403 from superjamie/cdp-checksum-and-cleanup

Print CDP checksum in hex, print the actual checksum, cleanup

10 years agoCheck for TLV length too small.
Guy Harris [Fri, 15 Aug 2014 00:14:32 +0000 (17:14 -0700)] 
Check for TLV length too small.

The TLV length includes the T and the L, so it must be at least 4.

This means we don't need the "avoid infinite loop" check later; that
check was wrong, as per GitHub issue #401 and #402; this fixes #402,
which has a different patch for that bug.

10 years agoPrint checksum in hex, and print the actual checksum, plus cleanup 403/head
Jamie Bainbridge [Thu, 14 Aug 2014 10:47:57 +0000 (20:47 +1000)] 
Print checksum in hex, and print the actual checksum, plus cleanup

10 years agomerge bootp.h into print-bootp.c
Denis Ovsienko [Wed, 13 Aug 2014 18:06:25 +0000 (19:06 +0100)] 
merge bootp.h into print-bootp.c

10 years agoMerge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump
Michael Richardson [Sat, 19 Jul 2014 17:50:32 +0000 (13:50 -0400)] 
Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump

10 years agonote changes
Michael Richardson [Sat, 19 Jul 2014 13:28:50 +0000 (09:28 -0400)] 
note changes

10 years agoupdate tcpdump.1.in for missing line
Francois-Xavier Le Bail [Fri, 11 Jul 2014 09:03:57 +0000 (11:03 +0200)] 
update tcpdump.1.in for missing line

10 years agoupdate tcpdump.1.in for good aligment in tcpdump.1.txt
Francois-Xavier Le Bail [Fri, 11 Jul 2014 08:45:05 +0000 (10:45 +0200)] 
update tcpdump.1.in for good aligment in tcpdump.1.txt

10 years agoMerge git://github.com/the-tcpdump-group/tcpdump
Guy Harris [Thu, 10 Jul 2014 20:04:00 +0000 (13:04 -0700)] 
Merge git://github.com/the-tcpdump-group/tcpdump

10 years agoAdd support for FreeBSD capsicum sandboxing.
Loganaden Velvindron [Thu, 10 Jul 2014 19:19:39 +0000 (12:19 -0700)] 
Add support for FreeBSD capsicum sandboxing.

10 years agoadd a short option '#', same as long option '--number' (print a packet number)
Francois-Xavier Le Bail [Thu, 10 Jul 2014 12:47:11 +0000 (14:47 +0200)] 
add a short option '#', same as long option '--number' (print a packet number)

10 years agoClean up the first-item handling a bit.
Guy Harris [Tue, 8 Jul 2014 10:26:18 +0000 (03:26 -0700)] 
Clean up the first-item handling a bit.

This makes it look a bit more like the handling of other items.

10 years agoSquelch a Coverity warning.
Guy Harris [Tue, 8 Jul 2014 10:23:09 +0000 (03:23 -0700)] 
Squelch a Coverity warning.

If you pass in a value of oidlen and oidsize such that we can't store
*anything* into OID, this would be a problem; that *shouldn't* ever
happen, but this makes the code a bit more obviously correct.

10 years agoMerge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump
Michael Richardson [Tue, 8 Jul 2014 02:05:39 +0000 (22:05 -0400)] 
Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump

10 years agoadded some comments about ndo functions
Michael Richardson [Tue, 8 Jul 2014 02:05:14 +0000 (22:05 -0400)] 
added some comments about ndo functions

10 years agomake sure to include tcpdump-stdinc.h; it is required
Michael Richardson [Tue, 8 Jul 2014 02:04:30 +0000 (22:04 -0400)] 
make sure to include tcpdump-stdinc.h; it is required

10 years agoGet rid of fetch whose result isn't used.
Guy Harris [Mon, 7 Jul 2014 21:22:08 +0000 (14:22 -0700)] 
Get rid of fetch whose result isn't used.

Put in a comment to indicate what we're processing (and that we fetch
the entire array as a 32-bit number and extract the nibbles from it).

10 years agoShorten a status text description.
Guy Harris [Mon, 7 Jul 2014 20:44:12 +0000 (13:44 -0700)] 
Shorten a status text description.

Instead of just copying-and-pasting from 802.11, edit the description a
bit; this squelches a Coverity warning (it thought we might have
forgotten a comma in the list), and also means we don't quite print out
as much.

(If Table 8-37 "Status codes" in 802.11-2012 had names for *all* the
status codes, we could use the names instead of the explanatory text,
but, for some unknown reason, it doesn't.)

10 years agoupdated VERSION file for trunk
Michael Richardson [Wed, 2 Jul 2014 22:10:32 +0000 (18:10 -0400)] 
updated VERSION file for trunk

10 years agoupdated VERSION file for branch tcpdump-4.6.0 tcpdump-4.6.0-bp
Michael Richardson [Wed, 2 Jul 2014 22:09:51 +0000 (18:09 -0400)] 
updated VERSION file for branch

10 years agoupdated CREDITS and CHANGES file for 4.6.0 release
Michael Richardson [Wed, 2 Jul 2014 21:31:14 +0000 (17:31 -0400)] 
updated CREDITS and CHANGES file for 4.6.0 release

10 years agoRPL: print DAO flags (acK, DagID)
Michael Richardson [Sun, 5 Jan 2014 16:59:29 +0000 (11:59 -0500)] 
RPL: print DAO flags (acK, DagID)
remove DAO messages from DIO test data

10 years agoBoost the maximum snapshot length to 262144, for USBPcap.
Guy Harris [Wed, 25 Jun 2014 20:41:22 +0000 (13:41 -0700)] 
Boost the maximum snapshot length to 262144, for USBPcap.

10 years agoDon't treat 65535 as the maximum snapshot length.
Guy Harris [Wed, 25 Jun 2014 20:18:18 +0000 (13:18 -0700)] 
Don't treat 65535 as the maximum snapshot length.

Make it 131072, instead; the MTU on the Linux loopback interface, in at
least some versions of the kernel, is 65536, and that doesn't count the
fake Ethernet header, so we need a value bigger than 65536.  We don't
want a value that's *too* large, so that it causes attempts to allocate
huge amounts of memory, however.

This (plus the corresponding change to libpcap) should fix GitHub issue

10 years agoDon't assume the NFS request is aligned on a 4-byte boundary.
Guy Harris [Wed, 25 Jun 2014 19:55:25 +0000 (12:55 -0700)] 
Don't assume the NFS request is aligned on a 4-byte boundary.

The XID is a multi-byte field, and, if it's not aligned, it must be
copied with UNALIGNED_MEMCPY().

This should fix GitHub issue #395.

10 years agoAllow builds if libpcap doesn't have pcap_set_tstamp_precision().
Guy Harris [Wed, 25 Jun 2014 19:06:35 +0000 (12:06 -0700)] 
Allow builds if libpcap doesn't have pcap_set_tstamp_precision().

Check for pcap_set_tstamp_precision() in the configure script and, if
it's not there, don't include the code that allows time stamp precisions
to be set.

10 years agoGive more details for --time-stamp-precision.
Guy Harris [Wed, 25 Jun 2014 18:45:29 +0000 (11:45 -0700)] 
Give more details for --time-stamp-precision.

10 years agoMerge pull request #377 from msekletar/master
Guy Harris [Wed, 25 Jun 2014 18:23:54 +0000 (11:23 -0700)] 
Merge pull request #377 from msekletar/master

timestamps: make possible to request high precision timestamps

10 years agoMerge pull request #396 from zorun/master
Denis Ovsienko [Sat, 21 Jun 2014 06:20:43 +0000 (10:20 +0400)] 
Merge pull request #396 from zorun/master

Babel: parse sub-TLVs even when they are larger than expected.

10 years agoMake the table of long options const.
Guy Harris [Fri, 20 Jun 2014 19:01:13 +0000 (12:01 -0700)] 
Make the table of long options const.

10 years agoBabel: parse sub-TLVs even when they are larger than expected. 396/head
Baptiste Jonglez [Fri, 20 Jun 2014 00:46:00 +0000 (09:46 +0900)] 
Babel: parse sub-TLVs even when they are larger than expected.

We can imagine appending additional data to sub-TLVs in the future: be
more forgiving when parsing them.

10 years agoPrint priv drop msg here too.
Wesley Shields [Fri, 13 Jun 2014 18:27:44 +0000 (14:27 -0400)] 
Print priv drop msg here too.

10 years agoMake droproot say something when successful.
Wesley Shields [Fri, 16 May 2014 14:32:55 +0000 (10:32 -0400)] 
Make droproot say something when successful.

I've seen people run into situations where they were using a command like this:

tcpdump -i eth0 -G 500 -w /root/%H%M%S.pcap

The first file would be created successfully but the second file would not
because their version of tcpdump was dropping privs. It was unclear to them
that this was going on and was causing confusion.

At least with this message in there it should become more evident that
privs are being altered and aid in debugging these kinds of problems.

10 years agodon't reinvent ND_TCHECK2()
Denis Ovsienko [Thu, 12 Jun 2014 10:59:03 +0000 (14:59 +0400)] 
don't reinvent ND_TCHECK2()

10 years agoPPP: reuse etheraddr_string()
Denis Ovsienko [Sat, 7 Jun 2014 18:26:01 +0000 (22:26 +0400)] 
PPP: reuse etheraddr_string()

Also rewrite a check in the same form as in the preceding switch case.

10 years agofix bittok2str_internal() w/o separator (GH #391)
Denis Ovsienko [Thu, 5 Jun 2014 20:56:05 +0000 (00:56 +0400)] 
fix bittok2str_internal() w/o separator (GH #391)

Simplify separator string handling in bittok2str_internal(): use empty
value for the first snprintf() call and set new value after each use.
This makes the terminating null char management unnecessary, especially
that it missed the case where there was no separator and no match (it
would return the previous content of the static buffer unchanged).

This change may affect the output of tcpdump in that before it could
print either "[]" or "[none]" or a string like "[S.]" for TCP flags
value 0. Now it prints "[none]" as that is exactly the value passed to
bittok2str_nosep() in tcp_print().

10 years agoupdate CREDITS
Denis Ovsienko [Thu, 5 Jun 2014 20:28:23 +0000 (00:28 +0400)] 
update CREDITS

10 years agoremove stale comment
Baptiste Jonglez [Tue, 3 Jun 2014 08:20:22 +0000 (12:20 +0400)] 
remove stale comment

10 years agoBabel: rewrite w/o print buffer rotation
Denis Ovsienko [Mon, 2 Jun 2014 11:02:32 +0000 (15:02 +0400)] 
Babel: rewrite w/o print buffer rotation

10 years agoAdd a decoder for the babel-rtt extension 371/head
Baptiste Jonglez [Tue, 4 Mar 2014 17:02:45 +0000 (18:02 +0100)] 
Add a decoder for the babel-rtt extension

Also add a simple testcase.

10 years agoCheck for pcap_free_datalinks().
Guy Harris [Mon, 19 May 2014 17:56:52 +0000 (10:56 -0700)] 
Check for pcap_free_datalinks().

Fixes GitHub issue #390.

Also, if all we do when checking for a function is set a HAVE_XXX
AC_CHECK_FUNC, as AC_CHECK_FUNCS will set the #define for you.

10 years agotcpdump.c: error message must use stderr
Francois-Xavier Le Bail [Sat, 17 May 2014 09:47:23 +0000 (11:47 +0200)] 
tcpdump.c: error message must use stderr

10 years agoTravis: add OSX support
Francois-Xavier Le Bail [Fri, 16 May 2014 14:09:42 +0000 (16:09 +0200)] 
Travis: add OSX support

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

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

11 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

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

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

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

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

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

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

11 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

11 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

11 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'.

11 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

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

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

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