Commit Graph

44 Commits

Author SHA1 Message Date
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
guy
3f9411c5ab For packets with a bad TCP checksum, show the value from the header, and
the value it should have had, as we do for packets with a bad IP
checksum, rather than showing the non-zero computed checksum.
2002-07-21 20:56:24 +00:00
guy
b92f17aa07 The BXXP protocol was replaced by the BEEP protocol; replace the BXXP
dissector with a BEEP dissector.
2001-12-10 08:21:22 +00:00
itojun
3de4db3a28 clarify some signedness mixup 2001-11-16 08:59:21 +00:00
itojun
b263fd495b remove a blank line 2001-11-05 08:23:40 +00:00
itojun
f84175e944 comment about DNS-over-TCP decoding. the packet could be unaligned (DNS
formatted payload does not start at the top of the packet), and
in that case, the decoded result could be garage
2001-10-19 09:32:01 +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
fenner
b37cd5e2a6 Add MSDP printer. 2001-09-17 20:06:17 +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
itojun
9c81ac1957 indent 2001-06-25 21:38:50 +00:00
fenner
5de6f0fd81 Move some stuff that tried to make up for system headers from print-tcp.c
to tcp.h, since don't use the system headers now anyway it was just
 making up for our own tcp.h.
2001-05-09 01:16:57 +00:00
guy
33fe8e7d3c PPTP support, from Motonori Shindo <mshindo@mshindo.net>. 2001-03-09 05:38:19 +00:00
itojun
cb3278cddc decode DNS over TCP 2001-02-03 05:04:49 +00:00
itojun
e39eb98adc remove extra space 2001-01-28 08:09:23 +00:00
itojun
a026f89efc use safeputchar() instead of cook up on its own. 2001-01-28 08:06:06 +00:00
guy
a329c9ae7c When adding the last byte of an odd number of bytes to a TCP or UDP
checksum, fetch it by casting the pointer to "const u_int8_t *" rather
than "const char *" - casting it to "const char *" causes it to be
sign-extended, perhaps causing 16 1 bits to be added in at the top and,
at least on big-endian platforms (where "htons()" does nothing, meaning
it won't trim off the extra 16 bits) with signed "char"s (e.g., SPARC),
causing the checksum to be computed incorrectly and causing it to
incorrectly be reported as bad.
2000-12-23 20:55:22 +00:00
itojun
8f002a3ccc do not try to compute tcp/udp checksum for fragmented datagram.
from: jinmei@kame.net
2000-11-17 19:08:14 +00:00
itojun
ce132b307b put stripped-down version of ip6.h and icmp6.h into tcpdump tree.
ip6.h is almost normal RFC2292 header.
icmp6.h has couple of extensions (not covered by RFC2292),
like MLD, ICMPv6 nodeinfo, and router renumber.

XXX how to synchronize with future kame changes?
2000-10-07 05:53:09 +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
itojun
cdaba7de64 do not use integer bitfield when we care about the resulting member size.
u_int x:4, y:4; will occupy sizeof(int) on some platforms, while it occupy
1 byte on some platforms.  use macro to decode th_off.
2000-10-03 02:26:53 +00:00
guy
674302314e BXXP support, from Richard Sharpe <sharpe@ns.aus.com>. 2000-09-30 03:35:55 +00:00
guy
cf53dc05f1 Get rid of includes of <netinet/in_systm.h>, and replace "n_short",
"n_long", and "n_time", defined in that file, with other types.
2000-09-29 04:58:33 +00:00
guy
536f512583 Add an "ip.h" header, to declare the IP stuff needed by dissectors, and
have dissectors include them rather than <netinet/ip.h> or
<netinet/ip_var.h>, if they actually need that stuff.

Put the declarations of the ICMP stuff directly into "print-icmp.c".

Remove all unnecessary includes of <netinet/ip*.h> files.

Copy the byte-order stuff from "nameser.h" into "tcp.h".
2000-09-23 08:54:24 +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
itojun
0aa3de7fa3 do not use ip_p for getting protocol # in tcp_cksum. we may have AH/ESP. 2000-08-01 17:35:05 +00:00
itojun
edde6f560a tcp checksum. requested from darren reed. code from netbsd. 2000-08-01 17:28:09 +00:00
assar
7d9a820fd1 add <ctype.h> 2000-07-30 05:56:11 +00:00
guy
674fea664d Changes from Kevin Steves to print, in an RST segment, the payload as
text, as per RFC 1122:

	4.2.2.12  RST Segment: RFC-793 Section 3.4

	   A TCP SHOULD allow a received RST segment to include data.

	   DISCUSSION
		It has been suggested that a RST segment could contain
		ASCII text that encoded and explained the cause of the
		RST.  No standard has yet been established for such
		data.

as some TCP implementations (e.g., HP-UX 11.0) do that.

Clean up the code that prints the payload of non-RST segments.
2000-07-29 09:06:23 +00:00
assar
c3da12efe5 replace bzero with memset 2000-07-29 08:03:05 +00:00
assar
3cd171317f remove non-STDC code 2000-07-01 03:38:59 +00:00
assar
52d9358548 support print the NFS-over-TCP
From Francisco Matias Cuenca-Acuna <mcuenca@george.rutgers.edu>
2000-06-01 01:09:32 +00:00
itojun
c8592c4742 -Wall -Werror clean. fix uninitialized variables. 2000-04-28 11:34:12 +00:00
itojun
a09002d6a8 cast result from ntohl() with u_int32_t, some platforms still mistakingly
use u_long for it.
use u_int{16,32}_t.
ECN support improvement (from net/openbsd).
2000-04-27 11:09:08 +00:00
itojun
2813c22cf1 add print-ascii.c and print-telnet.c from netbsd.
- add -X option for ascii printing.
- telnet command sequences (ff xx xx) will be dumped with -vvv -X.
1999-12-22 15:44:09 +00:00
itojun
c4521bbf47 * print-rt6.c: make IPv6 routing header printing work with new 2292bis
API.
* print-bgp.c: improve options printing.  ugly code exists for
  unaligned option parsing (need some fix).
* const poisoning in SMB decoder.
* make dump format back to original.  someone may want to add an
  option to do ascii printing, but keep the default behavior as is
  for scripts used in many places.
* -Wall -Werror clean checks.
1999-12-22 06:27:19 +00:00
fenner
f0d4fb1e2f - Print the IP source and destination if the TCP header is truncated before
the ports.
- Print the TCP port information if the TCP header is truncated after the
  ports.
- Print the sequence number if -vv even if you wouldn't normally.
1999-11-22 04:27:10 +00:00
assar
48345fa3a4 patches from Andrew Tridgell <tridge@linuxcare.com> to add decoding of SMB packets 1999-11-21 15:57:50 +00:00
fenner
b9ac23ce92 Switch to config.h instead of passing defines in DEFS. 1999-11-21 09:36:43 +00:00
assar
956ead6283 handle ECHO and re-do SACK. From kuznet@ms2.inr.ac.ru 1999-11-21 03:50:02 +00:00
itojun
c9d84d15c5 Bring in KAME IPv6 tcpdump. replaces esp/ah/isakmp decoder.
Hope I did not break anything.  Portability on IPv4-only node needs checking,
I'll do this very soon.  (sorry for rather jumbo commit)

XXx what is _FAVOR_BSD?
1999-10-30 05:11:06 +00:00
mcr
f6fa6a40d4 patches to help build on Linux 2.2 1999-10-17 21:37:10 +00:00
mcr
f555c163f9 Initial revision 1999-10-07 23:47:09 +00:00