Commit Graph

229 Commits

Author SHA1 Message Date
Guy Harris
b83e04bd09 Add a routine to print "text protocols", and add FTP/HTTP/SMTP/RTSP support.
"Text protocols" are protocols that have the general feel of FTP, with
command lines with a command name and space-separated arguments and
response lines beginning with a 3-digit reply code.  They can also
include HTTP-style headers and an entity body.

We add support for the FTP control channel, HTTP, SMTP, and RTSP.  We
also change the SIP printer to use it.
2014-10-19 11:21:44 -07:00
Guy Harris
a6f81d534d 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).
2014-10-01 15:32:11 -07:00
Denis Ovsienko
02a01bbaae merge bootp.h into print-bootp.c 2014-08-13 19:06:25 +01:00
Denis Ovsienko
35043f3507 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.
2014-05-04 20:48:03 +04:00
Guy Harris
a0ec52b035 We no longer have win32/Include/errno.h. 2014-05-02 14:23:03 -07:00
Guy Harris
2ff7ca8e01 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.
2014-05-01 17:33:46 -07:00
Guy Harris
6b9e3a5a85 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.
2014-04-30 15:28:06 -07:00
Guy Harris
dbddfda2c8 More getting rid of old u_intN_t. 2014-04-23 00:45:13 -07:00
Vyacheslav Trushkin
a97e56cb11 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
2014-04-21 18:53:40 +04:00
Denis Ovsienko
a20d558376 merge decnet.h into print-decnet.c 2014-04-02 12:28:24 +04:00
Guy Harris
75abb8218e Add support for Apple's DLT_PKTAP. 2014-03-30 13:29:51 -07:00
Denis Ovsienko
9eb56b6235 NDOize BGP decoder 2014-03-26 19:50:33 +04:00
Francois-Xavier Le Bail
1943325f56 Makefile.in: add strdup.o target ; remove getaddrinfo.o nonexistent target 2014-03-25 10:41:50 +01:00
Francois-Xavier Le Bail
6c78ecd7a8 Makefile.in: 'distclean' target: add files and directories to remove 2014-03-17 16:26:02 +01:00
Denis Ovsienko
b011ece874 remove unused print-netbios.c
The file had no purpose as the draft code in it wasn't compiled.
2014-03-04 13:31:52 +04:00
Denis Ovsienko
31892539e3 dismiss decode_prefix.h
The only purpose of that header file was to provide two declarations
that now fit interface.h same well.
2014-02-26 16:38:53 +04:00
Guy Harris
35d9d59de0 We don't use missing/sockstorage.h, so get rid of it. 2014-01-17 12:52:22 -08:00
Denis Ovsienko
cae43a9b0c clean LIBNETDISSECT_SRC definition up
Use one file per line syntax and sort the files by name.
2014-01-17 11:52:54 +04:00
Guy Harris
3b149607b9 Use AC_CHECK_TOOL to find ar.
On some platforms, such as at least some versions of HP-UX, AR isn't
automatically set by make.
2014-01-16 14:40:46 -08:00
Denis Ovsienko
db8077a114 add a decoder for Loopback/CTP
tcpdump used to print an empty line for a Loopback (CTP) packet, which
many Cisco switches send by default every 10 seconds. This commit adds
a decoder for the protocol and a test case, which uses the sample
capture from Wireshark wiki (configuration_test_protocol_aka_loop.pcap).
2014-01-09 16:59:33 +04:00
Guy Harris
1e506551d1 Include rpl.h in the tarball. 2014-01-08 15:21:40 -08:00
Denis Ovsienko
fe3253b9b8 remove tcpdump's own CVS keywords
Remove lots of $Header's and a few $Id's that all belong to the former
CVS repository of tcpdump itself. These keywords have been frozen since
the migration to git in late 2008.
2014-01-03 00:59:08 +04:00
Michael Richardson
ad7a38341c Merge branch 'master' of git+ssh://bpf.tcpdump.org/tcpdump/master/git/tcpdump
Conflicts:
	enc.h
2014-01-01 21:32:05 -05:00
Michael Richardson
adfd0d8304 move all print-* files into libnetdissect, even though ndo work has not finished 2014-01-01 21:31:18 -05:00
Guy Harris
5af9c5ca76 Move stuff from igrp.h to print-igrp.c. 2013-12-31 02:35:24 -08:00
Guy Harris
393e348df5 Move the contents of arcnet.h to print-arcnet.c.
It's not used by any other file.
2013-12-30 23:33:54 -08:00
Guy Harris
27d428c0a1 Pull a bunch of headers into the only source file that includes them.
For headers included in only one source file, put the header contents in
the source file in question, and get rid of a bunch of stuff from the
header not used in the source file.
2013-12-30 22:52:15 -08:00
Guy Harris
5301862d30 Commit more changes from the previous two. 2013-12-30 15:52:13 -08:00
Denis Ovsienko
d00d1670ce AHCP: add version 1 decoder
Add new decoder for UDP port 5359 and a sample packet capture produced
on a couple of Linux hosts (a server and a client). Besides that, an
existing Babel capture contained AHCP packets and the current AHCP tests
cover 0, 1 and 2 "-v" flags.
2013-11-13 15:49:50 +04:00
Guy Harris
f4eb0472b1 That's README.md, not README.ad. 2013-10-16 12:13:32 -07:00
Guy Harris
47b3d285dc README got renamed to README.ad. 2013-10-16 12:12:54 -07:00
Petar
05ec05a87b IP packet information printing from NFLOG packet
Added nflog.h to Makefile.in

Alphabetical order in Makefile.in
2013-08-14 09:38:49 +02:00
Guy Harris
c951c5012e Fix ForCES warnings, clean up a bit.
Move forces.h into print-forces.c, make a bunch of routines static, and
fix some warnings.
2013-07-23 13:12:54 -07:00
Michael Richardson
9eda8ebfde Merge pull request #324 from lykkja/geonet_and_calmfast
Geonet and calmfast
2013-07-02 12:41:24 -07:00
Denis Ovsienko
aa944dd81d OpenFlow 1.0: rewrite without openflow-1.0.h
The first revision of the header file was copied from the original
distribution tarball intact to use sizeof() instead of adding new
constants on one hand and provide structure definitions for a reference
on the other. But as soon as the structures had a portability issue and
were removed in commit a6c16ed, the remaining fragments of the header
don't justify for a file of its own.

This commit maps all relevant bits of the remaining contents of
openflow-1.0.h to constants in print-openflow-1.0.c (all being specific
to version 1.0 of OpenFlow) and removes the file.
2013-06-26 18:13:23 +04:00
Ola Martin Lykkja
80d038a7b1 Adding support for ISO CALM FAST and ETSI GeoNetworking 2013-06-25 23:43:19 +02:00
Guy Harris
a6c16ed8ab Fix build issues with the OpenFlow printer on some systems.
Don't assume we have <stdint.h>.  Instead, use the AC_TYPE_ macros to
ensure we have the C99 intN_t and uintN_t types; we already include
<inttypes.h> in tcpdump-stdinc.h iff we have it.

Get rid of the structure declarations in openflow-1.0.h, as they have
zero-length arrays (not supported by all the compilers people might be
using) and as

	1) they're only used in sizeof()

and

	2) after each one there's an assertion to check that sizeof()
returns a specific numerical value

so, instead, just #define various _LEN items to those numerical values
and use them.

Add an openflow.h header with a #define for the length of the basic
header, and move the declaration of of10_header_body_print() there.
2013-06-23 14:03:38 -07:00
Denis Ovsienko
05bf9bfc23 Merge remote-tracking branch 'bpf/master'
Conflicts:
	Makefile.in
2013-06-17 00:02:15 +04:00
Michael Richardson
feb50f8483 Merge remote-tracking branch 'mcrhub/master' 2013-05-31 11:06:16 -04:00
Petar
20ad83658d Added IP information printing from NFLOG packet 2013-05-31 12:16:13 +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
ceeea95918 add minimal OpenFlow decoding framework
This change registers OpenFlow TCP port number and adds processing of
respective packets with openflow_print(), a new function that
understands the minimal OpenFlow header format and can iterate over
messages within a snapshot that starts with the header.
2013-05-29 13:03:23 +04:00
Guy Harris
a332503d7d Get rid of acconfig.h. 2013-05-12 15:28:28 -07:00
Guy Harris
122e1529b7 Support dependency generation with some non-GCC compilers.
Also, if we don't support it with a given compiler, have "make depend"
not run mkdep, as it won't do anything useful.
2013-05-08 00:08:12 -07:00
Guy Harris
902a44da19 Put mptcp.h into the release tarball. 2013-05-05 15:51:57 -07: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
Francesco Fondelli
8eb218c755 - Add support for OTV (draft-hasmit-otv-04).
- Use the packettype infrastructure (-T vxlan) for VXLAN parsing (waiting for a well known dest port)
2013-02-26 13:44:11 +01:00
Francesco Fondelli
d268291346 Merge remote-tracking branch 'upstream/master' 2013-02-25 18:12:33 +01:00
Francesco Fondelli
769d730e80 Add support for VXLAN (draft-mahalingam-dutt-dcops-vxlan-03) 2013-02-25 17:56:44 +01:00
Romain Francoise
66c1d1031b Add MS NLB heartbeat ethertype, as well as a basic printer
The protocol is undocumented but Wireshark extracts some useful bits of
info from the packet, so it was used as a reference.
2013-02-23 18:48:52 +01:00