Commit Graph

352 Commits

Author SHA1 Message Date
Francois-Xavier Le Bail
52d28f3570 Add fptype.h to the release tarball 2020-02-25 11:40:23 +01:00
Francesco Fondelli
246ca110d1 Autosar SOME/IP protocol support 2020-02-19 10:05:32 +01:00
Guy Harris
52561ff053 Push the floating-point test into a separate file.
Hopefully, that will make sure we don't optimize away anything that
will, for example, cause us not to do things differently on 32-bit x86
using the x87 instructions.
2020-02-04 19:53:11 -08:00
Guy Harris
aa2650ec0e Do the floating-point tests closer to what we need.
It's All Very Complicated, so mirror what print-lmp.c does - just do a
calculation based on a particular input value and print the result using
the same format print-lmp.c does, and have tests/TESTrun see what that
result is.

Just do that inside tcpdump.c, so we don't need the fptype stuff.
2020-02-04 19:45:41 -08:00
Guy Harris
92e3315c9f Do some tests based on the type of floating-point arithmetic tcpdump does.
Add a --fp-type flag to tcpdump, which causes it to do a floating-point
operation and, based on the result of the operation, prints out
"FPTYPE{n}", where {n} is a number indicating the result.

Have tests/TESTrun run "./tcpdump --fp-type" and set a HAVE_ key based
on that.  Run some tests only for FPTYPE1.
2020-02-04 19:08:10 -08:00
Guy Harris
dc59375166 TESTrun.sh is dead; long live TESTrun. 2020-01-24 14:28:34 -08:00
Partha Ghosh
6f53130273 The ptp (precision time protocol) with UDP as the transport protocol.
- the print routines for ptp different ptp messages
- test completed for sync message, announce message, delay request message,
  delay response message and follow up message.
- integration of the ptp v2 code with the tcpdump code.

Signed-off-by: Partha S. Ghosh <psglinux@gmail.com>
2019-11-22 20:56:21 +01:00
Francois-Xavier Le Bail
dbd70580fa Makefile.in: Improve the way to add tests files in the realease tarball
We can now run "make releasetar" without cleaning out the current tests
directory.
2019-09-26 15:43:54 +02:00
Francois-Xavier Le Bail
062598cec8 Makefile.in: Remove two unused variables 2019-09-25 22:03:12 +02:00
Guy Harris
9a6a650241 Don't use <ctype.h> macros.
Some of them are locale-dependent, and all of them run the risk of
failing if you hand them a char with the 8th bit set.

Move our replacements to a new netdissect-ctype.h file, and, for the
ones that check for particular character types, add _ASCII to the name,
to indicate that only ASCII characters pass the check.  Do the same for
the ones that map between cases, to indicate that they only map ASCII
letters.

For isspace(), explicitly check for the characters we care about, to
make it clearer what we're doing.
2019-09-01 16:11:32 -07:00
Guy Harris
fe37243958 Have the scripts get the tests directory from $0.
That means we don't have to cook up a way to pass $(srcdir) to them - we
run them from $(srcdir), so they can pick it up from there.  If you run
them by running tests/TESTrun.sh from the command line, that will also
work; we assume that it's not found from $PATH.

TESTrun.sh and the other scripts run scripts with a path that includes
${testsdir}, so the other scripts are run with a path (they're not
intended to be run from the command line - you're supposed to use
TESTrun.sh, even if you're just running one test).
2019-08-18 20:24:18 -07:00
Guy Harris
5edd532e93 Clean up "make check".
No need to make a "tests" directory under the build directory any more,
so don't do so.

As we're not cd'ing in the command line run from the Makefile (just in a
command run for command substitution), there's no need to put it in a
parenthesized subshell.

Again, as we're not cd'ing to the tests directory, if SRCDIR isn't set,
assume the source directory is the current directory.

In the shell scripts we're running, look for TESTonce, the input files,
the output files, and the -E input files from ${srcdir}/tests.  Make
sure we set srcdir in those shell scripts.
2019-08-18 17:11:28 -07:00
Guy Harris
9b995599d8 Don't use a shell feature not present in older shells.
Older shells, such as /bin/sh in Solaris 10, don't support command
substitution with the $(command) syntax, but do support it with the
`command` syntax.  Use the latter.
2019-08-18 15:48:15 -07:00
Michael Richardson
1832cc80da make check needs to work in build directories 2019-08-18 18:04:07 -04:00
Michael Richardson
a9363a57cb make check needs to work in build directories 2019-08-18 13:32:07 -04:00
niks3089
e2f14ebc87 New ethertype protocol for Arista Networks 2019-05-23 11:06:14 +02:00
Andreas Jaggi
886fcf669f Add dissector for SSH version exchange 2019-05-08 22:15:55 +02:00
alexandr nedvedicky - Sun Microsystems - Prague Czech Republic
ed2c22b7b4 InfiniBand support for tcpdump.
InfiniBand support for tcpdump.
This is an in-house patch. Sent upstream for potential inclusion in future
versions of tcpdump.

(also adding print-ipoib.c to CMakeLists.txt, asked by @guyharris)

(s/u_int16_t/uint16_t asked by @guyharris)
2019-04-18 01:15:03 +02:00
Vivien Didelot
d5c16b1668 Remove MEDSA ethertype printer
MEDSA (which unofficially stands for Marvell EDSA) relies on the
unregistered 0xDADA ethertype value that was randomly choosen and
currently used by the kernel. But with EDSA this value is programmable,
hence can be changed anytime.

Now that a reliable DLT parser is implemented for both DSA and EDSA
tagged master interfaces, let's get rid for the MEDSA ethertype parser.
2019-04-16 12:27:08 -04:00
Vivien Didelot
43b5720499 Add support for decoding Marvell (E)DSA tags
Similarly to commit 6eaebfe adding support for the Broadcom tagging
format supported by the DSA kernel subsystem, this commit adds support
for the Marvell DSA and Ethertype DSA (EDSA) tagging formats.

Marvell DSA is a 4-byte proprietary tag placed between the ether source
address and the ether length/type. It contains data such as the switch
device and port IDs from which a frame came from, or to which port
a frame is targetting. It also contains additional FPri and IEEE bits.

EDSA is a 8-byte variant including a programmable ethertype, two null
bytes and a standard DSA tag.
2019-04-16 12:19:38 -04:00
Gerard Garcia
cda9bf8c5f Add printing support for vsockmon devices.
Print Linux 4.12 vsockmon captures:

  # modprobe vsockmon
  # ip link add type vsockmon
  # ip link set vsockmon0 up
  # tcpdump -i vsockmon0
  16:25:24.987917 VIRTIO 3.1025 > 2.1234 CONNECT, length 76
  16:25:24.987963 VIRTIO 2.1234 > 3.1025 CONNECT, length 76
  16:25:26.568271 VIRTIO 3.1025 > 2.1234 PAYLOAD, length 82
  16:25:26.568512 VIRTIO 2.1234 > 3.1025 CONTROL, length 76
  16:25:28.411335 VIRTIO 3.1025 > 2.1234 DISCONNECT, length 76
  16:25:28.411628 VIRTIO 2.1234 > 3.1025 DISCONNECT, length 76

For more information about vsock see:
http://wiki.qemu.org/Features/VirtioVsock
2019-04-16 15:12:13 +01:00
Guy Harris
202051bb55 Put IPv4/IPv6 protocol demultiplexing into a common routine.
That means less duplication of functionality - and less chance that
XXX-over-IPv4 will be handled but XXX-over-IPv6 won't be handled, or
*vice versa*.  (CARP and VRRP were being handled over IPv4 but not over
IPv6; this fixes that.)
2019-03-27 19:58:26 -07:00
Michael Richardson
35a1310799 Merge branch 'master' of https://github.com/kivinen/tcpdump into kivinen-master 2019-03-24 09:05:06 +01:00
Florian Fainelli
6eaebfe992 Add support for decoding Broadcom Ethernet switches tags
This adds support for decoding the Broadcom Ethernet switches tags which
are are 4byte in length and are located between the Ethernet MAC SA and
the Type/Length field (DSA_TAG_BRCM) as well as the pre-pended Broadcom
tag (DSA_TAG_BRCM_PREPEND) which are located in front of the standard
Ethernet header.

This makes use of the recently introduced ether_print_hdr_len() to allow
specifying the non-standard Ethernet header length of 12 + 4 + 2 bytes.
2019-01-28 10:56:18 -08:00
Tero Kivinen
32e24ead3b Updated 802.15.4 code 2018-11-18 04:35:46 +07:00
Guy Harris
89576203dd Move getopt_long.h to missing.
That's what we did for win_ether_ntohost.h.
2018-09-14 19:21:06 -07:00
Francois-Xavier Le Bail
34b59a8011 Remove the no more used gmt2local() function 2018-08-07 20:27:46 +02:00
Denis Ovsienko
40e217a816 Stick with one version of pcap_dump_ftell.c.
It looks like CMake after commit 3e9e2b6 started to use the newly added
missing/pcap_dump_ftell.c to make pcap_dump_ftell() available in tcpdump
if libpcap does not have it. However, autotools continued to use the
previously existing ./pcap_dump_ftell.c for the same purpose. Remove the
previously existing file and amend autotools files to cover
pcap_dump_ftell() the same way as the other functions in the missing/
directory files.

Amend missing/pcap_dump_ftell.c not to use pcap_dump_file(), as it may be
unavailable.

This has been tested to work with libpcap 0.6.1.
2018-07-28 13:36:17 +01:00
Francois-Xavier Le Bail
a53605c61b Add a malloc/free process with garbage collector
Use it in the PPP printer.
2018-03-14 13:59:26 +01:00
Francois-Xavier Le Bail
5ae22f41a8 Add a status exit code to the function ndo_error()
The status are defined in an enum in status-exit-codes.h.

Moreover:
Use ndo_error() instead of ndo_warning() for malloc() errors in print-esp.c.
2018-02-25 20:58:27 +01:00
Francois-Xavier Le Bail
fb154b00ba Build tcpdump with the libnetdissect library
No more link tcpdump with the printers object files.
2018-02-07 11:18:54 +01:00
Guy Harris
c499612a7f Add nd_{v}snprintf() routines/wrappers.
Some versions of the MSVC runtime library have a non-C99-compliant
vsnprintf(), which we want to avoid.  On Windows, use snprintf() and
vsnprintf() for VS 2015 and later, where they both exist in
C99-compliant forms, and wrap _{v}snprintf_s() otherwise (they're
guaranteed to do the null termination that we want).
2018-01-29 15:48:55 -08:00
Guy Harris
b3703ed9cf Pick up Windows snprintf and strdup replacements from libpcap. 2018-01-28 20:57:15 -08:00
Guy Harris
3e9e2b62b8 Create the missing/pcap_dump_ftell.c that's expected by autotools and CMake. 2018-01-26 00:10:48 -08:00
Guy Harris
0d9efb9596 On Windows, we have our own ether_ntohost(); declare it.
Move the source to our own ether_ntohost() to the "missing" directory,
just as we do in libpcap for the Windows snprintf() wrapper around
_snprintf().

Add a header file for it, and include it in both the wrapper and in
addrtoname.c on Windows.
2018-01-23 09:28:44 -08:00
Guy Harris
54587515ef Add libcrypto checks.
Put the optional libraries after libpcap, which is *not* optional.
2018-01-22 17:20:02 -08:00
Guy Harris
5632b98204 Add install and uninstall support for CMake. 2018-01-22 15:49:06 -08:00
Guy Harris
cc4797157d No need to replace vfprintf().
1988 called; it wants its pre-standard version of C back.  As the
comment in vfprintf.c said, "Stock 4.3 doesn't have vfprintf."; it's
been a while since 4.3BSD was the latest shiniest BSD-flavored OS.
2018-01-21 18:40:12 -08:00
Guy Harris
45fc519a2a Don't test for __attribute__ in the configure script.
Instead, use compiler test macros to check whether *particular*
attributes are supported, and set various #defines appropriately, in
header files.

Rename the UNALIGNED structure attribute to ND_UNALIGNED, and ask
whether we still need it.
2018-01-21 17:57:20 -08:00
Guy Harris
c29177f658 Fix path. 2018-01-21 14:57:49 -08:00
Guy Harris
1807273b16 Initial CMake support.
Work in progress; there's more to be done.
2018-01-21 13:22:15 -08:00
Guy Harris
09393e2faa Pull rpl.h into print-icmp6.c; nothing else uses it. 2017-12-14 20:30:09 -08:00
Guy Harris
7068209574 Use nd_ types in 802.x and FDDI headers.
Use EXTRACT_U_1() as required by those changes.  Remove
no-longer-necessary & operators from other EXTRACT_ calls.

While we're at it, add MAC_ADDR_LEN to netdissect.h, and use it instead
of ETHER_ADDR_LEN; eliminate ETHER_ADDR_LEN.

Move the maximum Ethernet length field value to ethertype.h, under the
name MAX_ETHERNET_LENGTH_VAL.

Move the Ethernet header structure, and the #define for the Ethernet
header length, to print-ether.c; in non-Ethernet dissectors that were
using the Ethernet header structure, just declare two nd_mac_addr
variables for the source and destination MAC addresses and use them
instead of the Ethernet header (we don't need the type field there).

These changes leave nothing in ether.h, so eliminate it.
2017-12-12 10:36:21 -08:00
Guy Harris
6779fd3ba7 Rename configure.in to configure.ac.
This matches what was done with libpcap; it's what autoconf prefers.
2017-11-30 10:20:37 -08:00
Guy Harris
de0c7fc746 Fix mkdep invocations.
CC is not guaranteed to be space-free; quote it.

DEPENDENCY_CFLAG is also not guaranteed to be space-free; quote it.
2017-11-28 22:06:37 -08:00
Ali Abdulkadir
2db7506730 add new files as dist targets 2017-10-24 08:17:28 +03:00
Ali Abdulkadir
18568bc044 Made up for missing getservent() and endservent() 2017-10-24 08:11:33 +03:00
Guy Harris
4943adfb5f Do the version number the way it's now done for libpcap.
Use the two-argument version of AC_INIT() - which requires autoconf 2.64
or later, so require that as a minimum - and get the version string from
the VERSION file.  Use AC_CONFIG_SRCDIR() to say that the source
directory needs tcpdump.c; the two-argument version of AC_INIT() doesn't
do that.

This means that we no longer have a version.c file.
2017-10-16 14:31:14 -07:00
Guy Harris
fdd0467bcd On UN*X, always use sigaction(), and always have signal handlers return void.
Some time between the mid 1980's and 1990 called; they want their
old-fashioned UNIX signal handling back.  ANSI C has had signal handlers
returning void sincer, well, 1989, and POSIX has had sigaction() since
close to forever.  No need to worry about really old UN*Xes here.

On Windows, it's also void (as per ANSI C); use signal().
2017-10-15 22:36:07 -07:00
Guy Harris
141c1c6f49 Suppress UBSan warnings from EXTRACT_.
Yes, the behavior of an access with an improperly-aligned pointer is
undefined according to the C standard, but if we're doing that in an
EXTRACT_ function/macro, we're doing it because we know it's safe and
because it's faster than picking the bytes out one by one and assembling
them, so suppress those warnings.

Pull over libpcap's funcattrs.h and use it to do a bunch of checks for
various function attributes; that defines __has_attribute(), so we can
use it to check for the "suppress sanitizer warnings" attribute.

While we're at it, use other things it defines to specify "this function
never returns", "this function is printf-like", and "this function
argument is a printf-style format argument", rather than using various
configure-script checks.  That should let us declare some function
attributes with Microsoft Visual Studio's compilers.
2017-08-18 20:11:43 -07:00
Sabrina Dubroca
25576378ef Add support for MACsec (IEEE 802.1AE-2006) 2017-05-18 15:47:57 +02:00
Tero Kivinen
13ebc79dfc IEEE 802.15.4 printer which understands frame version 2 frames, and also knows how to print some mac commands and IE contents. Also includes the zep printer to decode ZigBee Encapsulation Protocol frames 2017-03-26 04:48:28 +03:00
Francois-Xavier Le Bail
5b81f98410 Add a target in Makefile.in for Exuberant Ctags use
The target name is 'extags'.
Exuberant Ctags has no -d, -t options and -w is ignored.

Moreover:
Remove a non-existent file in TAGHDR to avoid an error on Debian:
make: *** No rule to make target '/usr/include/net/slip.h',
needed by 'extags'.
2016-10-21 10:23:02 +02:00
Francois-Xavier Le Bail
e353c59542 Add missing files in Makefile.in (EXTRA_DIST) 2016-10-20 13:25:48 +02:00
Francois-Xavier Le Bail
371a55f441 Add missing files in Makefile.in (EXTRA_DIST) 2016-10-17 22:32:50 +02:00
Guy Harris
91e08f888d Move some code around.
Move stuff to initialize and clean up libraries that are used by
netdissect code into nd_init() and nd_cleanup() routines in
libnetdissect; this includes Winsock (which is used on Windows by, for
example, the code to get names for IP addresses) and libsmi.

Call nd_init() when tcpdump starts up, and call nd_cleanup() when it
exits.

Move util.c routines to tcpdump.c, and make them static.

Use ndo->ndo_error to report a failure to open a file in print-esp.c.
2016-08-04 13:19:57 -07:00
Jean-Raphaël GAGLIONE
75b7aeef9c Printer for HNCP (RFCs 7787 and 7788).
This is joint work with Antonin Décimo.
2016-07-28 21:09:41 +02:00
Andrew Darqui
fc213645d4 Initial support for the REdis Serialization Protocol known as RESP.
This commit adds support for RESP as defined in: http://redis.io/topics/protocol.
It also supports inline commands and pipelining. Due to the popularity of RESP,
numerous services are emerging that use this protocol. You may decode RESP packets
on arbitrary ports using the "-T resp" option.

Example captures can be found in tests/resp_*.

A simple way to test this parser is to start redis-server and then run
redis-cli commands such as "redis-cli set key value".

Traditionally, redis-cli monitor is used to debug redis. Unfortunately,
the "monitor" command can cause significant load on a redis-server in
production. This parser may be used as a non-invasive alternative to
redis-cli monitor.
2016-04-26 11:00:21 +02:00
Francois-Xavier Le Bail
f0b959c53e Restore alphabetical order in Makefile.in and netdissect.h 2016-03-22 17:23:40 +01:00
bugyo
ba8a8cd5a3 Add printing function for Generic Protocol Extension for VXLAN
and Network Service Header.

This code stands for following internet drafts:

- VXLAN GPE: draft-ietf-nvo3-vxlan-gpe-01
- NSH: draft-ietf-sfc-nsh-01
2016-03-22 16:59:03 +01:00
ritsz
823644a72d Initial commit for support of Type 3 and Type 4 LISP packets.
Fixing Travis CI build for LISP commit

Adding testcases for lisp notify and register

Fixing build warnings

Added ND_TCHECK for relevant headers

Fixing ND_TCHECK2 issues

Adding support for multiple LOC records for same EID entry

Fixing review issues, adding detailed tests

Adding support for verbose outputs

Adding RFC information for UDP PORT defination

Removing Spaces in type names

Print EID record related flags in verbose mode

Using tok2str

Fixing -Wpedantic issues

Negative testcases, Packet structure comments, verbose mode flag printing

Printing Map Version

Print auth_data, decouple type and xtr_present extraction, handle malformed packets correctly

Tests for latest code changes

Printing useful info incase not built with IPv6 support
2015-10-04 12:47:13 +02:00
Guy Harris
11f73ad248 Don't require IPv6 library support in order to support IPv6 addresses.
Have our own routines to convert between IPv4/IPv6 addresses and
strings; that helps if, for example, we want to build binary versions of
tcpdump for Windows that can run both on NT 5 (W2K/WXP), which doesn't
have inet_ntop() or inet_pton(), and NT 6 (Vista/7/8/10), which do.  It
also means that we don't require IPv6 library support on UN*X to print
addresses (if somebody wants to build tcpdump for older UN*Xes lacking
IPv6 support in the system library or in add-on libraries).

Get rid of files in the missing directory that we don't need, and
various no-longer-necessary autoconf tests.
2015-09-17 14:56:44 -07:00
Guy Harris
4c19cf87e5 Call pcap_wsockinit(), not wsockinit(), and print a message if it fails.
Get rid of w32_fzs.h while we're at it.
2015-09-11 11:09:35 -07:00
Francois-Xavier Le Bail
99c91c3aec Rename 'tcpdump-stdinc.h' to 'netdissect-stdinc.h'
Get the full log via: git log --follow netdissect-stdinc.h
2015-09-10 08:50:40 +02:00
Francois-Xavier Le Bail
9d6b61de38 Fix display of timestamps with -ttt and -ttttt options
- Fix display of some nanoseconds timestamps
For example, bad print 00:-16:-2.000851566 is now 00:00:00.037851566

- Fix display of timestamp of a packet when it is lower than previous one
For example, bad print 00:00:-1.000999790 is now -00:00:00.000000210
2015-07-02 19:14:49 +02:00
Guy Harris
3dd9240cc3 Do case-insensitive comparisons assuming ASCII strings.
Do the case-insensitive comparisons in a locale-independent fashion that
only maps ASCII letters, in the standard English-language fashion; that
way, we don't get bitten by, for example, Turkish having separate "i
with dot" and "i without dot" letters, with lower-case "i with dot" being
mapped to upper-case "I with dot" rather than being mapped to "I".
2015-06-11 15:47:44 -07:00
Guy Harris
9614e9389e Make sure print.h shows up in the release tarball. 2015-04-26 18:04:26 -07:00
Andrew Lunn
d729eb478e Add support for the Marvell Extended Distributed Switch Architecture header
This header can be used with Marvell switches to direct packets in/out
of a specific port in a tree of interconnected switches. The header
uses its own Ethertype of 0xdada.

By default, only brief output is printed, showing the switch device,
port, and vlan the packet is to/from. However if -e is given, to print
the link-level header, all fields are printed.
2015-04-25 22:44:15 +02:00
Brooks Davis
115a063589 Disentangle packet dissection functionally in tcpdump from the internal
libnetdissect.  This greatly narrows the public interface and allows
libnetdissect to be more easily sandboxed.
2015-04-15 18:52:33 +00:00
Brooks Davis
7f17c777dc Move functions in util.c that are used in the dissectors into a
util-print.c.  The remaining functions are used only in the frontend.
2015-04-15 18:52:33 +00:00
Denis Ovsienko
ba05b1bf39 merge atmuni31.h into print-atm.c 2015-04-14 11:35:43 +01:00
Francois-Xavier Le Bail
d9fd6ef243 Makefile.in: delete a duplicated line 2014-11-17 11:16:09 +01:00
Jesse Gross
e240710e25 Add support for Generic Network Virtualization Encapsulation (Geneve).
Defined in http://tools.ietf.org/html/draft-gross-geneve-02
2014-11-05 21:44:29 -08:00
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