Commit Graph

37 Commits

Author SHA1 Message Date
Guy Harris
0f328b4aa1 More nd_ification of structures.
We don't need to use & to get a pointer to an nd_uintN_t/nd_intN_t type,
as they're arrays.
2017-12-11 00:17:47 -08:00
Francois-Xavier Le Bail
19ea00958b BFD: Update to print optional authentication field
Moreover:
Add test files with 'Simple Password', 'Keyed MD5' and
'Meticulous Keyed SHA1' authentications.
Update specification from draft to RFC 5881 for BFD_CONTROL_PORT and
BFD_ECHO_PORT in udp.h.
Add specification RFC 5881 in print-bfd.c.
2016-08-17 11:46:54 +02: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
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
Herwin Weststrate
266720f258 Translate UDP/1700 as RADIUS
Used for Cisco CoA/Disconnect, as shown on https://supportforums.cisco.com/discussion/11719766/ise-112-change-authorization-avaya-switches-5520. The RFC says port 3799, but Cisco does this otherwise, which means this is not an officially reserved port for RADIUS.
2015-12-15 18:42:04 +01:00
Francois-Xavier Le Bail
a14ec7492f Fix a trailing tab 2015-10-05 14:41:18 +02: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
Denis Ovsienko
77718832a0 update reference for UDP port 3799 2015-07-24 15:01:02 +01:00
Guy Harris
09533cc93e Clean up the port definitions.
From Bill Parker: sort the port definitions, add some additional
ports, and use #ifndef/#endif around all definitions.

From me: use consistent indentation, add the RFCs for NetBIOS-over-TCP
to the #defines for the NBT ports, and don't keep the IPv6 ports
separate.
2015-07-14 13:39:22 -07:00
Denis Ovsienko
3ba4165c4b refine use of nameser.h
Move the port number #define's to the TCP and UDP files such that they
don't require nameser.h anymore. Update the TCP printer to disregard the
multicast DNS port as it is UDP-only.
2015-07-13 10:15:32 +01:00
Denis Ovsienko
b486819cab add/update some references in comments 2015-03-05 12:50:39 +00: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
Herwin Weststrate
6db4fd5348 Added support for RADIUS Change of Authorization messages
Defined in RFC 5176
2014-10-10 11:39:08 +02:00
Denis Ovsienko
02a01bbaae merge bootp.h into print-bootp.c 2014-08-13 19:06:25 +01:00
Guy Harris
dbddfda2c8 More getting rid of old u_intN_t. 2014-04-23 00:45:13 -07: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
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
Denis Ovsienko
001fc8411f Merge pull request #310 from ffatghub/master
vxlan: use IANA assigned port
2013-05-10 02:34:44 -07:00
fra
e31377a8f5 IANA (www.iana.org/assignments/service-names-port-numbers/
service-names-port-numbers.txt) has assigned an official port for
VXLAN (4789).  tcpdump uses this by default but we keep the -T
vxlan option as well (e.g. Linux is allowing different ports).
2013-05-09 21:04:23 +02:00
Denis Ovsienko
a248bf041a use macros for VAT and WB port numbers 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
769d730e80 Add support for VXLAN (draft-mahalingam-dutt-dcops-vxlan-03) 2013-02-25 17:56:44 +01:00
Juliusz Chroboczek
2e2e33875f For Babel, recognise both UDP/6696 and UDP/6697.
IANA has reallocated the Babel port; it is now 6696.  This patch makes
tcpdump recognise both the old and the new Babel ports.
2011-08-27 16:55:32 -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
hannes
e7dc0250ec from Carles Kishimoto <carles.kishimoto@gmail.com>: add support for the SFLOW protocol 2007-08-08 17:20:58 +00:00
hannes
f89e58426d From Carles Kishimoto <carles.kishimoto@gmail.com>:
add initial support for the Light Weight Access Point Protocol
as per draft-ohara-capwap-lwapp-04
2007-07-24 16:07:29 +00:00
hannes
cb08bf9e3e add basic skeleton for printing olsr packets as per rfc3626
add a line break in verbose mode fro the ip printer.
2007-03-27 10:44:09 +00:00
hannes
b9a93a401e from Carles Kishimoto <Carles.Kishimoto@bsc.es>:
basic support for Ciscos prop. VQP protocol
2006-03-03 22:31:16 +00:00
hannes
960aee5c35 use the offical LMP port number as per rfc4204 2006-02-09 23:33:36 +00:00
mcr
ca59357767 added ESP-in-UDP printer from RFC3948. 2005-04-06 21:33:27 +00:00
hannes
5d697464b4 add basic support for the SIP protocol 2004-07-27 17:04:20 +00:00
hannes
d89459c923 add support for the Link Management Protocol (LMP) as per
draft-ietf-ccamp-lmp-10
2004-04-19 21:17:13 +00:00
hannes
00a6f199f0 - move UDP port numbers to udp.h
- then the number defines# are acessible from outside

- make a differentiation between BFD_ECHO_PORT and BFD_CONTROL_PORT
2003-10-27 22:44:37 +00:00
guy
fcc82f451d The "__attribute__((packed))" tag on structures causes some files not to
compile with Sun C, as "interface.h" isn't being included before the
structures are being declared.

Furthermore, in the files that Sun C *can* compile, it doesn't cause Sun
C to generate code that's safe with unaligned accesses, as
"__attribute__" is defined as a do-nothing macro with compilers that
don't support it.

Therefore, we get rid of that tag on the structures to which it was
added, and instead use "EXTRACT_16BIT()" and "EXTRACT_32BIT()" to fetch
16-bit and 32-bit big-endian quantities from packets.  We also fix some
other references to multi-byte quantities to get rid of code that tries
to do unaligned loads on platforms that don't support them.

We also throw in a hack that makes those macros use
"__attribute__((packed))" on structures containing only one 16-bit or
32-bit integer to get the compiler to generate unaligned-safe code
rather than doing it by hand.  (GCC on SPARC produces the same code that
doing it by hand does; I don't know if GCC on any other big-endian
strict-alignment processor generates better code for that case.  On
little-endian processors, as "ntohs()" and "ntohl()" might be functions,
that might actually produce worse code.)

Fix some places to use "%u" rather than "%d" to print unsigned
quantities.
2002-12-11 07:13:49 +00:00
itojun
10afb02ac8 put __attribute__((packed)) to packet headers. s/u_short/u_int16_t/ and so
forth while i'm here
2002-11-09 17:19:16 +00:00
itojun
fb75d3cd5a always use u_intXX_t for protocol format declaration. char/short/int may not
come with exact size.  while at it, correct signedness of ip/udp header field.
nuke most of the use of bitfield.
TODO: bitfield in namser.h
2000-10-03 02:54:54 +00:00
guy
7b50febe28 Add "tcp.h" and "udp.h" headers, to declare the TCP and UDP stuff needed
by dissectors, and have dissectors include them rather than
<netinet/udp.h>, <netinet/udp_var.h>, or <netinet/tcp.h>, if they
actually need that stuff.

Remove all unnecessary includes of <netinet/udp*.h> or <netinet/tcp*.h>
files.
2000-09-23 08:26:30 +00:00