Commit Graph

141 Commits

Author SHA1 Message Date
Oleksij Rempel
9d987198f6 add test for rx-stbc flag
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
2013-06-06 20:38:15 +02:00
fxlb
e3e04d2c8c DHCPv6 decoder fix
- fix the tests for DH6OPT_SIP_SERVER_D, DH6OPT_DOMAIN_LIST and DH6OPT_NTP_SERVER,
- add missing ")".
2013-05-31 15:25:29 +02:00
Denis Ovsienko
fd35562d7e add OpenFlow 1.0 decoder (no SSL)
The new file openflow-1.0.h is a verbatim copy of the file openflow.h
from the openflow-1.0.0.tar.gz distribution. The new file
print-openflow-1.0.c contains a set of functions for OpenFlow 1.0 (wire
protocol 0x01) decoding. Of these functions only
of10_header_body_print() is exported and used by the minimal OpenFlow
decoder.

It is intended that future (1.1, 1.2, 1.3.0) OpenFlow version decoders
are implemented the same way (in modules of their own), since different
versions of OpenFlow specification reuse the same symbols for different
numeric values. This way, print-openflow-1.1.c would include
openflow-1.1.h and so on.

The new test case "of10_p3295-vv" was produced using a Pica8 P-3295
switch and Trema controller running a purpose-built sample application.
2013-05-29 13:03:23 +04:00
Denis Ovsienko
cac189b9e3 initial support for Babel sub-TLVs decoding
Babel sub-TLVs are a work in progress, a backward-compatible extension
to Babel version 2 protocol encoding. This update implements encoding
explained by Juliusz Chroboczek to decode ChanInfo sub-TLV of the Update
TLV.
2013-05-29 13:03:23 +04:00
Denis Ovsienko
d0b48b5108 fix iteration over Babel Pad1 TLVs
The Pad1 TLV consists only of the Type field (RFC6126 Section 4.4.1),
thus the check for Pad1 type must be done before the Length field is
consumed, if ever. This change brings tcpdump decoder into line with the
spec and Babel implementation's own TLV iterator.
2013-05-29 13:03:23 +04:00
Denis Ovsienko
dbd9d385cc add a test case for Babel protocol with Pad1 TLVs
The packet capture consists of two datagrams produced with a modified
version of Quagga-RE babeld, such that each TLV of the datagrams is
followed with one Pad1 TLV. This encoding is not what a Babel speaker
would typically send, but it is otherwise valid and up to the spec
(RFC6126 Sections 4.2 onwards).

The current version of the decoder has a bug iterating over Pad1.
2013-05-29 13:03:23 +04:00
Jorge Boncompte [DTI2]
1ed68a5cfe add a test case por PPPoE session ID filtering 2013-05-17 17:09:00 +02:00
fxlb
c86e4bd09c DHCPv6 decoder update (RFC3646, DNS options)
- Add decoder for option 24 (DOMAIN_LIST)
- Rename option 23 as DNS_SERVERS
- Rename option 24 as DOMAIN_LIST
- In dhcp6opt_print() constify dh6o
2013-05-06 17:44:01 +02:00
fxlb
b674109a41 DHCPv6 decoder update
- In dhcp6opt_print() constify tp
- Add decoder for option 21 (SIP_SERVER_D - RFC3319)
2013-04-29 14:33:18 +02:00
Denis Ovsienko
b766ec9d3b fix bug #303 (DLT_IEEE802_11_RADIO ext. bitmaps)
This bug was discovered and pinned down by Wim Torfs.

The code in question handles DLT_IEEE802_11_RADIO datalink type, which
consists of a variable-sized header, a variable number of fields and the
actual 802.11 frame. The integers contained in the fields are aligned,
properly extracting them is exactly the purpose of the existing "cpack"
module. The issue with the current code is that it sets alignment base
for cpack at the end of the variable-sized header, in other words,
64-bit integers would be properly extracted only so long as the header
is 64-bit long, which only happens when the total number of bitmaps in
it is odd (the minimum number of bitmaps is one). Once this condition
isn't met, as is with two bitmaps, decoding becomes incorrect. The
reporter's point that the alignment base must be the beginning of the
variable-sized header is accurate.

This commit adds a new cpack_advance() function to fast-forward the
"c_next" pointer of a cpack_state context by an arbitrary number of
octets. The ieee802_11_radio_print() function now uses it to skip the
header and all its bitmaps, and the alignment base is now the header
start.
2013-04-28 18:26:53 +04:00
Wim Torfs
3e3cc1fce3 new test for DLT_IEEE802_11_RADIO w/ext. bitmap
I modified the mac80211 and ath9k kernel module such that extra
information regarding rssi, etc are available, which is why I needed the
extra bitmap. Capturing the packets is simply a matter of using tcpdump
-i wlan0 -w dumpfile.
2013-04-28 18:26:26 +04:00
fxlb
af7a65c643 DHCPv6 decoder update
- Rename option 31 as SNTP_SERVERS (see RFC4075)
- Add decoder for option 56 (NTP_SERVER) from RFC5908
2013-04-25 17:44:14 +02:00
Gregory Detal
e2c6675ddb Fix MPTCP support
Added:
 * option length check
 * option type and TCP flags check
 * more information printed

Signed-off-by: Gregory Detal <gregory.detal@uclouvain.be>
2013-04-19 09:22:04 +02:00
Gregory Detal
578dd316f3 Multipath TCP (RFC 6824) support
This commit adds the support of Multipath TCP (MPTCP). MPTCP is a new
extension to TCP standardized at the IETF. MPTCP allows to use several IP
addresses at the same time by distributing data across several subflows (TCP
connections) while still presenting the standard TCP socket API to the
application. Its benefits are better resource utilization, better throughput
and smoother reaction to failures.
2013-04-14 18:20:26 -04:00
Denis Ovsienko
0e2f72760d improve ZeroMQ support (ZMTP/1.0 inside PGM/EPGM)
This change adds new code to decode ZeroMQ datagrams, couples it with
the PGM decoder and extends the -T option to make all this work.

There are two new test cases based on existing captures of ZMTP/1.0
inside [E]PGM to decode the ZMTP/1.0 part of these.

This functionality enables decoding of the traffic zeromq library
produces for "pgm://" and "epgm://" protocol schemas.
2013-04-14 18:20:26 -04:00
Denis Ovsienko
b10f46c2d6 use existing PGM decoder for UDP-encapsulated PGM
The original PGM uses its own IP protocol number. "EPGM" or "PGM/UDP"
stands for UDP-encapsulated PGM, which has no assigned UDP port number
and can be decoded only by means of -T option, which now accepts "pgm"
protocol type for this purpose. There is also a sample capture of EPGM
now (similar to the one of native PGM, but produced using the "epgm://"
protocol schema) and a respective test case.
2013-04-14 18:20:26 -04:00
Denis Ovsienko
fac122dea6 add a test case for native PGM
This commit adds a capture of a few PGM (IP protocol 113) packets
produced with version 2.2.0 of zeromq library built with PGM support
(using the "pgm://" protocol schema). Each of the three ODATA packets in
the capture contains a ZeroMQ datagram in the "Data" (application data)
field. There is a new test case covering the PGM part of the capture.
2013-04-14 18:20:26 -04:00
Ruben Kerkhof
5080a9a012 Add tests for wrong agent-id 2013-03-22 14:15:35 +01:00
Michael Richardson
85cf448c65 Merge pull request #51 from orebokech/msnlb-printer
Add MS NLB heartbeat ethertype, a basic printer, and 2 test files
2013-02-25 07:26:26 -08:00
Romain Francoise
850e47990a Add two MS NLB test captures
msnlb1.pcap contains two heartbeat packets from a single cluster (two
nodes). msnlb2.pcap is the same capture with a lower snaplen to exercice
the truncation code path.
2013-02-23 18:50:06 +01:00
Bill Fenner
a945058fa7 Merge branch 'master' of git://github.com/mcr/tcpdump
Conflicts:
	tests/TESTLIST
2013-02-22 11:51:33 -08:00
Michael Richardson
cf6018bf77 Merge pull request #49 from ajithadapa/master
Support SPB BPDUv4 version
2013-02-12 16:25:18 -08:00
Denis Ovsienko
ad7171ca02 ZeroMQ initial support (ZMTP/1.0 framing)
This change adds support for ZMTP/1.0 (ZeroMQ Message Transport Protocol
1.0) framing in TCP packets, as defined in http://rfc.zeromq.org/spec:13
and implemented in zeromq library.

Since there is no assigned port number for ZeroMQ, the user is left
responsible for making only the related TCP packets captured and
enforcing ZMTP/1.0 decoding through the "-T zmtp1" option.

Each ZMTP/1.0 frame of a packet will produce a single additional line of
output. The "-v" flag will add up to 8 lines (128 bytes) worth of
hex+ASCII dump of the frame body, and "-vv" and higher will dump the
full frame body, however long.

Beware that this code handles neither IP fragmentation nor TCP
segmentation and will incorrectly decode segments not starting at a
frame boundary.

The included sample capture stands for a short ZeroMQ session between a
REQ/REP socket pair doing 3 anonymous 2-way exchanges. It was produced
using version 2.1.9 of zeromq library patched to fix its bug #293, so
that all MBZ bits of the flags field are set to 0.
2013-02-11 15:16:35 +04:00
Ajith Adapa
cb85addfd6 Fixes-for-test-results 2013-02-07 11:07:29 +05:30
Ajith Adapa
6fa35c192e Merge remote branch 'upstream/master' 2013-02-07 10:54:02 +05:30
Tillmann Karras
d632d08fa7 Add some MLDv2 test packets
The added packets are: a join, a regular query and reply, and a leave.
2013-01-19 08:53:37 +01:00
fxlb
2c4de02c06 print-dhcp6.c: Fix bugs in DH6OPT_IA_NA, DH6OPT_IA_PD, DH6OPT_IA_TA, DH6OPT_IA_ADDR and DH6OPT_IA_PD_PREFIX option cases. Add test files 2012-11-26 17:39:09 +01:00
fxlb
9e2d0e4316 dhcpv6-AFTR-Name-RFC6334.out: update needed after adding TCHECK in print-dhcp6.c 2012-11-26 11:08:19 +01:00
FXLB
c9105c011c add dhcpv6-aftr-name test in tests/TESTLIST 2012-11-21 11:26:20 +01:00
FXLB
c9f3872e20 add tests/dhcpv6-AFTR-Name-RFC6334.out file 2012-11-21 11:18:53 +01:00
FXLB
150674f171 add tests/dhcpv6-AFTR-Name-RFC6334.pcap file 2012-11-21 10:25:36 +01:00
Marc Abramowitz
f8a96c9317 Do more verbose logging to the console of output when tests fail so that
I can figure out why some tests are failing in Travis CI.
2012-10-12 08:14:45 -07:00
Ajith Adapa
0b3ef304c3 Added-bpduv4-test-files 2012-10-04 20:48:22 +05:30
Bill Parker
c88b482ebc Added options to gitattributes 2012-09-04 09:58:28 -07:00
Denis Ovsienko
91830ddd6c update for current Babel auth spec
This change updates Babel decoder output format to match terminology of
draft-ovsienko-babel-hmac-authentication-00 and reverts recent addition
of DLen field to TLV type 12.
2012-08-21 18:36:56 +04:00
Denis Ovsienko
13223554b8 update Babel decoder for DLen in HD TLV
This change reflects a new Digest Length field added to Hash Digest TLV
in the current draft of Babel authentication spec. babel_print_v2() is
updated to fetch and validate the new field. Test files too.
2012-06-29 22:29:04 +04:00
Denis Ovsienko
33808c6690 decode RIPv2 authentication up to RFC4822
This change addresses a few issues in rip_entry_print_v2() and
rip_print():

1. In the case of Simple Password (RFC2453) authentication the last
(16th) character of a password was never printed. Other password
characters were printed regardless of existing isprint() test.

2. In the case of Cryptographic (RFC4822) authentication there were no
details available for fixed-size auth header and variable-size auth
trailer.

3. Depending on particular hash function used, a normal authentication
trailer "RTE" may be 20 or more bytes long. Iteration over packet RTEs
should stop once a trailer is decoded. Exact number of RTEs in a message
cannot be told from message size any more.

Test cases are added for Request and Response messages with Simple
Password, Keyed-MD5, HMAC-SHA-1, HMAC-SHA-256, HMAC-SHA-384 and
HMAC-SHA-512 authentication modes. Earlier test case is updated to match
new "number of routes" output format.
2012-06-12 14:10:05 +04:00
Denis Ovsienko
c4830eb85e fix RIP Request/full table decoding issues
RIP Request and Response messages have the same structure. Update a
switch block in rip_print() to proceed with decoding of both.

A Request message may contain an AFI 0 RTE standing for a full table
request, normally sent on a router start. Update rip_entry_print_v1()
and rip_entry_print_v2() to treat IPv4 and AFI 0 as two valid,
distinguishable cases.
2012-06-12 13:59:06 +04:00
Denis Ovsienko
78a8be4700 add decoding of Babel authentication TLVs
This change extends existing Babel protocol decoder to recognise
experimental authentication TLVs (types 11 and 12) and includes
a respective test case for the new code.
2012-06-06 17:57:20 +04:00
Ajith Adapa
5fc542f5b6 Adding the test files for SPB 2012-06-05 12:03:01 +05:30
Ajith Adapa
8872bb6fdf Added test files for spb. 2012-06-04 09:25:13 +05:30
Denis Ovsienko
8c31bfcebe add DNSSL (RFC6106) support
The most notable difference between RFC5006 and RFC6106 is the addition
of DNSSL RA option. This commit adds DNSSL handling code to make tcpdump
fully RFC6106-aware. This code has been tested against RA packets
generated by Quagga and radvd.
2012-04-13 16:32:40 +04:00
Michael Richardson
2a5efbae38 added missing test files to releasetar 2012-04-07 21:26:15 -04:00
Michael Richardson
3cc6f4ea2a updated test case outputs 2012-04-03 15:57:13 -04:00
Michael Richardson
02da8c74d9 added icmpv6 test case 2012-03-29 16:04:51 +02:00
Michael Richardson
4944846e5d error in passed calculation 2012-03-29 16:04:02 +02:00
Bill Fenner
4d4f42a37b Merge remote-tracking branch 'upstream/master' 2012-03-06 08:26:26 -08:00
Bill Fenner
a0da0ec38c Separate multiple nexthops.
Multiple nexthops in MP-BGP were not getting separated, so you are
left wondering "what kind of address is dead:beef::1fe80::1ff:fe01:0"?
Separate them with ", " so that it is more clear that they are
multiple nexthops.
2012-03-01 05:38:25 -08:00
Dagobert Michelsen
5d61759b24 Use expr instead of bashisms.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2012-02-28 15:31:38 -08:00
Bill Fenner
d0ab6a50a7 Add a test for IGMPv3 query response times 2012-02-25 07:21:38 -08:00