Commit Graph

2704 Commits

Author SHA1 Message Date
Jamal Hadi Salim
38efca1a71 Restore forces2 pcap and associated output
Signed-off-by: Jamal Hadi Salim <hadi@mojatatu.com>
2011-07-26 13:26:31 -04:00
Michael Richardson
6b9177b5fb Changes for 4.2 of tcpdump 2011-07-24 20:15:39 -04:00
Jamal Hadi Salim
95e85c82a5 Fwd: pcap files
On Tue, Jun 28, 2011 at 3:52 PM, Michael Richardson <mcr@sandelman.ca> wrote:

> I'm not aware of a new file.

The email i responded to had 4 attachments sent by Evangelos.
Those were supposed to replace the files with those exact names.

> Please send github tree, ideally.

You mentioned github to me last time and offered to get me to
learn it in 5 minutes;->  I havent had time and the old school stuff i do
still works.
How about i send you patch #1 to delete the old files (as attached)
and another to re-add with new ones.
Alternatively: I could send one that overrides the existing ones.

cheers,
jamal
> --
> ]       He who is tired of Weird Al is tired of life!           |  firewalls  [
> ]   Michael Richardson, Sandelman Software Works, Ottawa, ON    |net architect[
> ] mcr@sandelman.ottawa.on.ca http://www.sandelman.ottawa.on.ca/ |device driver[
>   Kyoto Plus: watch the video <http://www.youtube.com/watch?v=kzx1ycLXQSE>
>                       then sign the petition.
>

commit d93443f24bfb5fd982ff33deb66979bae811db57
Author: Jamal Hadi Salim <jhs@mojatatu.com>
Date:   Tue Jun 28 16:15:49 2011 -0400

    [PATCH] Remove test files using old ForCES ports

    Signed-off-by: Jamal Hadi Salim <hadi@mojatatu.com>
2011-07-03 16:22:00 -04:00
Michael Richardson
021e25ed81 ignore more cruft 2011-07-03 16:14:31 -04:00
Michael Richardson
e7b58ef90b removed unneeded pcap file 2011-07-03 16:14:19 -04:00
Guy Harris
2c0a8eb4eb Note that ndo_error doesn't, and *ndo_error shouldn't, return.
Tcpdump's ndo_error() doesn't return.  Any other ndo_error routine
supplied to netdissect shouldn't, either, as printers expect it not to.
2011-06-24 18:24:11 -07:00
Guy Harris
4cc892cbff Use "-H", not "-h", for the 802.11s option, and improve error reporting.
I was rudely surprised to find that "tcpdump -h" wasn't printing a usage
message, and I'm the person who *added* the "-h" option.  Make it "-H",
and add an explicit "-h" option to print a usage message, so nobody else
makes the same mistake.  Also, don't clear opterr, so that if you give
an illegal command-line option, you get an explanatory error message.
2011-06-21 18:15:50 -07:00
Hannes Gredler
2a579ee5cc from Weesan Lee <weesan@juniper.net>: display pim bidir support 2011-06-21 16:17:34 +02:00
Guy Harris
879217e502 Handle ICMP6 checksums more like TCP checksums.
Instead of printing the result of icmp6_cksum() if it's non-zero, print
the checksum field value and the value it should have had.  That means
that what we print is the same regardless of whether we're running on a
big-endian or little-endian machine.
2011-06-17 01:17:47 -07:00
Guy Harris
d9b4befd18 Fix some warnings. 2011-06-17 01:11:17 -07:00
Guy Harris
57bfcb4ebe Add a routine to do the "checksum with pseudo-header" stuff for IPv4.
Clean up some other stuff while we're at it.
2011-06-17 01:09:16 -07:00
Guy Harris
d18bb2331d Use nextproto6_cksum() for XXX-over-IPv6 checksums.
Get rid of duplicated checksums with IPv6 pseudo-headers.
2011-06-17 00:51:47 -07:00
Guy Harris
7074f77080 Handle UDP checksums more like TCP checksums.
Instead of printing the result of udp_cksum() if it's non-zero, print
the checksum field value and the value it should have had.  That means
that what we print is the same regardless of whether we're running on a
big-endian or little-endian machine.

Also, just as we did with TCP:

Check -v and -K, and the fragmented flag, up front; then check the IP
version etc..  Don't check for IPv6 if we already know it's IPv4.  Fetch
the checksum field only once.

Update some test files for the new output format.
2011-06-16 22:10:36 -07:00
Guy Harris
9bfe2abe60 Get rid of $Id$ - you can't get that with Git. 2011-06-16 21:52:31 -07:00
Guy Harris
730d36df2c Clean up the checksum checking.
Check -v and -K, and the fragmented flag, up front; then check the IP
version etc..  Don't check for IPv6 if we already know it's IPv4.  Fetch
the checksum field only once.
2011-06-16 21:50:26 -07:00
Hannes Gredler
917f5f341f add support for the RPKI/Router Protocol as per draft-ietf-sidr-rpki-rtr-12 2011-06-16 17:17:20 +02:00
Guy Harris
94a4b46080 Go with Wireshark's Internet checksum routine.
The Wireshark routine is based on the BSD in-kernel portable checksum
routine (thus BSD-licensed); it takes a vector of pointers and lengths
and checksums the concatenation of the buffers in question (just as the
BSD in-kernel routine checksums a chain of mbufs).

This simplifies the "with a pseudo-header" checksums; hopefully it'll
fix up the problems being seen on some big-endian platforms, which might
be due to hand-calculating some or all of the checksum and doing so
incorrectly.  It also gets rid of some code that might be dereferencing
unaligned pointers.
2011-06-13 14:08:51 -07:00
Guy Harris
26d81cbe26 Update sflow test output to reflect recent changes to print-sflow.c. 2011-06-12 18:39:11 -07:00
Guy Harris
d53e50ef24 Fix some problems with the tests.
Get rid of some no-longer-necessary uudecodes (Git can store binary
files such as pcap files, so we no longer need to uuencode them, and the
uuencoded files are no longer around), and handle the "-X" and "-XX"
flag tests (where we had to rename the "should be" output files to avoid
collisions on case-insensitive file systems such as the default local
file system on the desktop UN*X with the biggest market share).
2011-06-12 18:08:55 -07:00
Rick Jones
96c2a764eb The ifSpeed field of a generic interface counter in sFlow is 64 bits.
The "overlay" definition in print-sflow.c is correct, but the actual
extract for printing is using EXTRACT_32BITS rather than EXTRACT_64BITS,
which leads to an incorrect report for speed.

Reviewed-By: Guy Harris <guy@alum.mit.edu>
2011-06-02 10:56:08 -07:00
Guy Harris
017bac571b Don't use "struct netdissect_options" in interface.h.
Use it in netdissect.h, where it's defined; otherwise, we get a bunch of
warnings when compiling modules that include interface.h but don't yet
include netdissect.h.
2011-05-05 02:25:42 -07:00
Michael Richardson
5b0329a9e7 From: Darren Reed <darren.reed@oracle.com>
To: tcpdump-workers@lists.tcpdump.org
Date: Sat, 09 Apr 2011 12:51:14 +1000
Subject: [tcpdump-workers] Printing PPI packets

Printing PPI packets with tcpdump does not turn out
to be that hard.

My simple tests have produced the output as below.

It would be worthwhile having some changes made into
the tcpdump code base that were similar to the attached
that print them out.
2011-05-03 18:58:32 -04:00
Michael Richardson
acd66dee76 removed need for uudecode 2011-04-30 18:51:51 -04:00
Michael Richardson
9a7206907f added babal test cases 2011-04-28 18:51:09 -04:00
Michael Richardson
1987fcf0ae Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump 2011-04-28 18:27:59 -04:00
Michael Richardson
f827ce45ad updated forces test cases 2011-04-28 18:27:24 -04:00
Andrew Nording
bcfc120d7a Fix endianness of some parameters.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2011-04-28 12:38:55 -07:00
Guy Harris
1ac5009987 Add error checking and support for DCB Exchange protocol (DCBX) version 1.01.
From Kaladhar Musunuru <kaladharm@sourceforge.net>:

Added support for DCB Exchange protocol (DCBX) version 1.01.
http://www.ieee802.org/1/files/public/docs2008/az-wadekar-dcbx-capability-exchange-discovery-protocol-1108-v1.01.pdf

DCBX protocol exchanges control state machine and generic feature state
machine parameters as Organizationally specific TLVs.  The OUI used for
the DCBX TLV 1.01 is 0x001B21.  Following TLVs are decoded:

- Control state
- Priority Groups (PG)
- Priority-based Flow Control (PFC)
- Application Protocol (APP)

From me:

Add a bunch of additional error checking, and sort the main switch
statement by TLV code (and thus by the order in the specification).
Also update/add indications of what standards document what items.
2011-04-28 11:24:12 -07:00
Juliusz Chroboczek
47b1a4a09b Babel dissector, from Juliusz Chroboczek and Grégoire Henry.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2011-04-27 16:14:43 -07:00
Guy Harris
6bfcf8d87e Try to handle radiotap Rate values > 127 better.
Use the same heuristic Wireshark uses, i.e. assume that FreeBSD only
reports MCS indices between 0 and 15, and that any other values with the
0x80 bit set are rate values.  (Yes, those do exist.)

Also note, as I did in Wireshark, that it might be possible to extract
from the XChannel and Flags field the additional information to convert
an MCS index from the Rate field into a rate.  (Whether that's possible
depends on what platforms using the FreeBSD convention do with the
channel width and guard interval information.)
2011-04-27 15:15:09 -07:00
Michael Richardson
2f9602c898 Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump 2011-04-27 17:47:50 -04:00
Juliusz Chroboczek
12b169509d Add printer for the Babel routing protocol (RFC 6126).
This version includes a couple of fixes from Wireshark.
2011-04-27 15:27:20 -04:00
Michael Richardson
76bbd5f9ea added sflow test cases 2011-04-27 15:21:21 -04:00
Guy Harris
54db122321 Support RX flags, MCS and the vendor namespace, and fix Rate.
Based on patches from an anonymous donor, support the radiotap RX flags and
MCS fields, and the vendor namespace, and, if Channel and XChannel are
both present, use XChannel, not Channel.

Do not try to look up a rate for an MCS value from the Rate field; you
cannot map an MCS value to a rate without also knowing the channel width
and guard interval length.
2011-04-27 12:08:27 -07:00
Rick Jones
5779709949 Handle the enterprise field of the sflow flow and counter record format.
Thanks to some traces sent my way by Gavin McCullagh, and a comparison
against the output of inMon's sflowtool, I can confidently say "Yes
Virginia, there is an enterprise other than zero."  Which means lest we
start trying to decode something as what it is not, we best actually
look at the enterprise field and make sure it is one we recognize.
2011-04-15 10:01:02 -07:00
Rick Jones
e6358eaba7 To enable printing of non-expanded samples I've shuffled a bunch of code
around and created a bunch of smaller routines to more easily support
printing of both expanded and non-expanded counter and flow samples.
I've done simple testing of non-expanded counter and flow, and expanded
counter, but I don't have expanded flow at present with which to test.
So, that part of the change is only compile/eyeball tested.

Reviewed-and-tweaked-by: Guy Harris <guy@alum.mit.edu>
2011-04-14 11:32:08 -07:00
Guy Harris
5b665ba92f Fix the handling of unknown tagged parameters in management frames.
Fetch the element length early in the process, rather than fetching it
each time we need it - even after we've advanced the pointer we are
using to fetch it (doing the latter means we fetch the wrong value when
we subtract it from the remaining length).
2011-04-05 09:53:57 -07:00
Guy Harris
dee11b5b10 Process the flags even if parsing the full radiotap header fails.
If we were able to get the flags, we should process them, so we know
whether there's Atheros padding after the 802.11 header or if there's an
FCS at the end of the packet, and properly process them; if we weren't
able to get the flags, they're 0, so we're not doing anything
differently, and that's the best we can do.
2011-04-04 21:32:58 -07:00
Guy Harris
5b08a20f21 Don't return value from a filed cpack_uint8() call.
If the cpack_uint8() call to fetch the flags for
IEEE80211_RADIOTAP_FLAGS fails, don't return u.u8, as we didn't fetch
anything into it.
2011-04-04 21:30:22 -07:00
Guy Harris
a9876473a2 Check the sample, flow, and counter lengths.
When dissecting a sample, or a flow or counter within the sample, make
sure we don't run past the length in the sample/flow/counter header.

This also means we count the sample length down as we process the
contents of the sample, so we only add what, if anything, remains of the
sample to the pointer into the packet, and subtract that from the
remaining data length in the packet, which means we properly handle
packets with multiple samples.
2011-04-04 19:03:56 -07:00
Guy Harris
8a52e408e9 Include <tcpdump-stdinc.h> when checking for headers.
Now that we're setting V_INCLS correctly, we don't need to include
"tcpdump-stdinc.h" - including <tcpdump-stdinc.h> works.

This also picks up configure changes from the previous configure.in
change.
2011-04-04 12:07:11 -07:00
Guy Harris
539ef30544 Properly define {u_}intN_t types when testing pcap/*.h headers.
pcap/bluetooth.h and pcap/usb.h require those types, so we check for
those types before checking those headers, and we include
"tcpdump-stdinc.h" in the tests, so the appropriate headers to define
those types get pulled in.
2011-04-04 12:02:02 -07:00
Guy Harris
f0296bc39c Expand srcdir in V_INCLS at configure time, not make time.
That way, if we temporarily set CPPFLAGS to include V_INCLS, it'll work
correctly.
2011-04-04 11:49:41 -07:00
Guy Harris
6a5c81baf7 Fix one place where we didn't save and restore CPPFLAGS when modifying it. 2011-04-04 11:34:14 -07:00
Guy Harris
df76679be7 Have empty.uu explicitly be a uuencoding of /dev/null.
That way, uudecode will write the decoded output there, rather than to a
file named "empty" that gets left around.  That also means we don't need
to redirect the output of uudecode to /dev/null, so don't do that.
2011-04-04 01:18:04 -07:00
Guy Harris
e6933ca143 Check for uudecode at make time by uudecoding a uuencoded empty file.
Doing it at make time means you don't have to re-run the configure
script if you add uudecode to your system, and doing it by uudecoding a
uuencoded empty file means we don't depend on uudecode supporting
"--help".
2011-04-04 00:44:41 -07:00
Guy Harris
1aaedce9e7 Don't assume uudecode supports a --help option; not all uudecodes do.
Instead, check for uudecode in the configure script, and set the
CHECK_UUDECODE configuration variable to "true" if we find it and to a
command that prints an error message and exits with 1 if we don't find
it, and substitute that variable into the Makefile as the first command
for "make check".
2011-04-03 15:43:21 -07:00
jamal
d3e9af76c3 RESEND: [PATCH 1/1] ForCES fix SCTP TML port
The old ports for SCTP TML ports were replaced at RFC editor
publication time. Caught by folks preparing for an Interop
tommorow.
While we could add a backward compat support it seems meaningless
if those ports will never ever be used in production.
I will send new test/pcaps at a later point and remove the existing
ones once this patch goes in.

cheers,
jamal

commit 40ecad0e866e7567716e6e57158c5274c0786a21
Author: Jamal Hadi Salim <hadi@mojatatu.com>
Date:   Thu Feb 3 22:00:23 2011 -0500

    Conform to new IANA assignment of ForCES SCTP TML

    Signed-off-by: Jamal Hadi Salim <hadi@mojatatu.com>
2011-03-31 09:41:04 +02:00
Michael Richardson
6e96a2d61e Updated VERSION 2011-03-28 22:56:33 +02:00
Guy Harris
4759718606 Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump 2011-03-08 09:11:51 -08:00