Commit Graph

81 Commits

Author SHA1 Message Date
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
mcr
8c59e1bd93 use new ip_print_demux() routine in ISAKMP UDP-ESP encap
printer.
2005-04-07 00:28:17 +00:00
mcr
ca59357767 added ESP-in-UDP printer from RFC3948. 2005-04-06 21:33:27 +00:00
guy
3844af7c24 FALSE isn't necessarily defined. 2004-12-27 01:13:44 +00:00
guy
af0a039080 Have our own headers to declare the format of ONC (Sun) RPC messages on
the wire; the definitions in many systems use u_long, which is 64 bits
long on many platforms - that's OK for in-memory structures, but it
doesn't match what's on the wire.  Use headers based on the Sun ones,
but use u_int32_t for fields, and otherwise make the structures match
what's on the wire, and change some names to avoid collision with
<rpc/rpc.h>, which print-sunrpc.c includes to declare "getrpcbynumber()"
and the structure it returns.

Record whether "getrpcbynumber()" is found, and use it only if it's
found, rather than basing the decisison on whether we're building for
Win32 or not.
2004-12-27 00:41:29 +00:00
hannes
115ce6fc62 add support for syslog 2004-10-29 11:42:52 +00:00
hannes
5d697464b4 add basic support for the SIP protocol 2004-07-27 17:04:20 +00:00
hannes
21480b97d8 add baseline LSP-PING support per draft-ietf-mpls-lsp-ping-05 2004-06-06 19:20:03 +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
efe5ca00c7 display cosmetics for printing NTP packets 2004-01-28 14:54:49 +00:00
guy
fe0fcd92e3 Fix a signed-vs-unsigned comparison warning. 2003-11-19 00:19:56 +00:00
guy
d6cf0925b2 Cut off "snapend" at the length of the IPv4 or IPv6 payload, so we don't
run past the end of that payload.

Check that the IPv4 total length isn't less than the header length.

Use "%u", not "%d", to print unsigned values.

Properly update "len" in the header-processing loop for IPv6.

Doing so means we can trust the length passed to the TCP and UDP
dissectors when constructing the IPv6 pseudo-header; do so (but fix the
length we pass to the UDP-over-IPv6 checksum routine).

That length is unsigned; make the corresponding arguments to the TCP and
UDP checksum routines unsigned.
2003-11-19 00:17:32 +00:00
guy
8a42f11ab0 Get rid of unused arguments to "dhcp6_print()". 2003-11-18 23:26:37 +00:00
guy
bbc1cfa669 Have the configure script arrange that the Makefile define _U_
appropriately, and that GNUmakefile and the MSVC++ project file define
it apppriately, as we do with libpcap, rather than defining it in
"interface.h".

Undo the rcsid-shuffling and addition of extra #includes, as we no
longer need to arrange that "interface.h" be included before using _U_
in an RCS ID or copyright.
2003-11-16 09:36:07 +00:00
guy
3824a6c041 From Neil Spring:
use "_U_" in the definitions of "rcsid[]", to eliminate
	complaints about those variables being unused;

	move the definitions after the include of "interface.h", or add
	an include of "interface.h", so that "_U_" is defined.

Include "config.h" before including "tcpdump-stdinc.h" in
"missing/datalinks.c".
2003-11-15 00:39:12 +00:00
guy
f4d64fe38b In mDNS, report IN-class records with the "cache flush" bit set as such,
rather than as "Class 32769".
2003-11-05 06:02:58 +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
hannes
1899f7d7d1 support for bi-directional fault detection (BFD) Control packets
as per draft-katz-ward-bfd-01.txt
2003-10-27 10:13:44 +00:00
guy
cd8e2f4ca0 Updates from Bruce Simpson:
Fix numerous bugs in my AODV submission, red faces all round,
	mainly due to misunderstanding of EXTRACT_STRING() macro
	arguments (because these are macros, type checking didn't
	happen).

	AODV HELLO extensions are now correctly printed.

	The code is closer to FreeBSD's style guidelines.

Don't use "u_char" and "u_long", use "u_int8_t" and "u_int32_t".
"u_long" is definitely wrong as it's 64 bits on some platforms; "u_char"
is safe, but the official tcpdump style uses "u_int8_t".

At least according to the (long-since-expired) draft-perkins-aodv6-01,
the V6 AODV messages have different message type values from the V4 ones
in draft-ietf-manet-aodv-13.  However, draft-ietf-manet-aodv-13 says
that the only differences are in the addresses; we support both.

Clean up the way we tell the AODV6 dissector that we're running atop
IPv6 a bit.

Use "udpipaddr_print()" if we're printing AODV packets as a result of
saying "anything that matches this filter is AODV", rather than doing it
ourselves under the assumption that it's running over IPv4.
2003-09-12 22:05:56 +00:00
guy
073489bc82 From Bruce M. Simpson <bms@spc.org>: RFC 3561 AODV support. 2003-08-06 06:49:38 +00:00
fenner
aa57a76df4 Make the port arguments to udpipaddr_print() ints so that there can be
an out-of-range flag value.
Seperate out the truncation checks into two: are the ports available,
 then do all the other checks, then check to see if the full UDP header
 is available.
This is a slightly modified version of Alexander's original patch to
 instead use udpipaddr_print() to print the addresses if the ports are not
 available.

Submitted-by:	Alexander Dupuy
Sourceforge bug #579811
2003-07-31 23:38:20 +00:00
guy
c90e936060 Add a new "ipproto.h" header file, with definitions of IP protocol type
values.  Use that rather than private definitions in various files.

Add "gmpls.h" to the list of files in FILES, and add it and "ipfc.h" to
the list of files in INSTALL.
2003-06-07 11:57:51 +00:00
guy
98512db448 From Motonori Shindo: allow "-T" to take "tftp" as an argument to force
decoding as TFTP.
2003-05-11 06:01:16 +00:00
hannes
3058667b3a basic preparations for mpls lsp ping decoding 2003-05-08 15:05:41 +00:00
guy
0661474e3e The source and destination port arguments to "bootp_print()" are no
longer used; get rid of them.
2003-05-01 18:02:12 +00:00
hannes
8df276dff3 initial checkin for a Label Distribution Protocol dissector 2002-12-13 00:40:34 +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
hannes
b34c1cc750 changed bootp decoder for multiline output, fixed segfault referencing NULL pointer 2002-12-04 19:09:29 +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
85a2f01d7c remove blank lines at EOF 2002-09-10 01:45:33 +00:00
guy
c422d3ab0f Get rid of the "-Wno-unused" flag, and fix up most of the
unused-parameter problems reported by GCC.  Add an _U_ tag to label
parameters as unused if the function is called through a pointer (so
that you can't change its signature by removing parameters) or if there
are unused parameters only because the function isn't complete.

Add some additional bounds checks the necessity for which was revealed
while cleaning up unused-parameter problems.

Make some routines static.

"lcp_print()", defined in "print-lcp.c", isn't called anywhere -
"print-ppp.c" has the code to dissect LCP.  Get rid of "print-lcp.c".
2002-09-05 21:25:34 +00:00
hannes
239977c8d2 tell the world that its LDP, rather than port 646; 2002-08-20 00:01:38 +00:00
itojun
5a5ccbf6d3 dissect traffic on port 5353 as multicast DNS. vlubet@apple.com 2002-08-16 22:40:33 +00:00
risso
3d932490b8 Added support for Win32, based on WinPcap. 2002-08-01 08:52:55 +00:00
fenner
a71d112b5c Calculate UDP/TCP pseudo-checksum properly in the presence of
source-route options.
2002-07-28 04:14:21 +00:00
itojun
111ff8a61d whitespace cleanup 2002-06-11 17:08:37 +00:00
itojun
ec910f17d3 print "addr > addr" correctly again. 2001-12-03 02:06:10 +00:00
itojun
01c8f1a4de correct address pair printing on truncated case. 2001-11-26 06:48:12 +00:00
fenner
a5562fdcfe Add --enable-smb to make it easier to re-enable the SMB printer. 2001-10-08 21:25:15 +00:00
itojun
459451d636 disable smb printing until we have boundary checks in *smb*.c (there's almost
no boundary check).
2001-10-04 09:18:45 +00:00
guy
0d10bc4402 HSRP dissector, from Julian Cowley <julian@lava.net>. 2001-09-17 06:22:31 +00:00
guy
38082cac36 Zephyr support, from Nickolai Zeldovich <kolya@MIT.EDU>. 2001-09-09 19:30:22 +00:00
fenner
c7415f9189 Use the passed in length instead of the IP header's length in the
pseudo-header checksum, to allow for IPSEC or other encapsulations.
Use in_cksum() instead of private versions.
2001-08-20 17:53:53 +00:00
guy
e4b93879cf Move all the "undefine so that the compiler doesn't whine about
redefinitions" stuff from files that include "nameser.h" to "nameser.h"
itself (we used to include <arpa/nameser.h>, over which we had no
control so we couldn't do that, but we now have our own "nameser.h").
Add T_OPT to the list of things we undefine, and undefine T_UNSPEC iff
T_UNSPEC is defined, not iff NOERROR is defined.

Replace the include of <arpa/nameser.h> in "print-rx.c" with an include
of "nameser.h", and "#if 0" it out pending a determination of whether
it's necessary (why would AFS's RX care about the internals of DNS
packets?) or not.
2001-06-26 06:19:03 +00:00
itojun
9c81ac1957 indent 2001-06-25 21:38:50 +00:00
fenner
a11713da52 Remove #if 0 sections
Finish converting over to having the caller print the IP address
 (except for UDP, TCP and SCTP).  This consists mostly of removing
 places where the IP address is printed, both in the big "case"
 in ip_print() and in the individual printers.
Also fix a couple of spacing bugs.
2001-06-15 22:17:31 +00:00
itojun
c0781576e1 avoid trigraph 2001-03-17 04:41:49 +00:00
fenner
dbcf4a6df0 Fix the spacing of the UDP checksum reporting. 2001-02-20 19:03:15 +00:00
itojun
4fcedd64bb BIND9 lwres dissector. 2001-01-29 09:18:46 +00:00