Commit Graph

77 Commits

Author SHA1 Message Date
guy
010fcafbc5 From Shinsuke Suzuki <suz@kame.net>: a patch to sync ICMPv6-Type number
with the current IANA assignment (Apr 13 2004).  It consists of the
following four parts:

	- added inverse-neighbor-discovery (RFC3122)
	- shift MTRACE-related type numbers, since it collides
	  with inverse-neighbor-discovery.
	- added MLDv2 (draft-vida-mld-v2-08.txt)
	- shifted Mobile-IPv6 numbers from interim value to the
	  official one. (draft-ietf-mobile-ipv6-24.txt)
2004-06-16 00:06:28 +00:00
guy
33ede7fbea Add bounds checking. 2004-03-24 00:06:26 +00:00
guy
d3d2f39461 "icmp6_rrenum_print()" doesn't use its "icmp6len" argument (and, as that
just reflects the payload length, the snapshot length has been trimmed
to correspond to it, so it doesn't need to check it merely to avoid
running past the end of the IPv6 payload); get rid of it.

Pass "icmp6_print()" the IPv6 payload length (i.e., the length of the
ICMPv6 packet), rather than having it compre the length itself.

Make the length argument to "icmp6_cksum()" unsigned, to match the value
passed to it.

Fix the lengths passed to "sctp_print()", "tcp_print()", and
"udp_print()" (we update "len" in the header-processing loop to
correspond to the remaining payload, so we just pass it to those
routines).
2003-11-19 01:27:54 +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
itojun
e2826164d4 unsigned/signed mixup 2003-10-28 03:16:35 +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
itojun
ba8e54bc85 verify/warn icmpv6 checksum. from jinmei@kame 2003-05-02 08:13:54 +00:00
guy
16b938c9e4 From Kazushi Sugyo: print the sequence number in ICMPv6 echo request and
reply packets.
2003-03-13 07:36:56 +00:00
guy
c243fe7be4 From Kazushi Sugyo: update to draft-ietf-mobileip-ipv6-20. 2003-02-05 02:36:25 +00:00
guy
3c252e8be0 Fix up some errors from the previous checkin.
Fix up some const and unsigned issues.

Make static some routines unused outside the file in which they're
defined.
2002-12-11 22:29:21 +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
guy
a38d83eb90 From Kazushi Sugyo: patches for draft-ietf-mobile-ipv6-18. 2002-09-05 00:52:30 +00:00
guy
79877e90f4 Get rid of some unnecessary includes (<time.h>, <netdb.h>, and <ctype.h>
are included by <tcpdump-stdinc.h>, so we don't have to include them
explicitly; <errno.h> isn't needed by print routines).
2002-08-06 04:42:04 +00:00
risso
3d932490b8 Added support for Win32, based on WinPcap. 2002-08-01 08:52:55 +00:00
guy
86cfeae8ab From Kazushi Sugyo <sugyo@pb.jp.nec.com>:
Here is a patch for draft-ietf-mobileip-ipv6-17.
	- print-mobility.c: Mobility header(MIPv6 defines a new IPv6 protocol)
	  printing
	- added Routing header type 2
	- ICMPv6 Home Agent Address Discovery and Mobile Prefix Sol., Adv.
	  message update
2002-06-27 08:21:39 +00:00
itojun
111ff8a61d whitespace cleanup 2002-06-11 17:08:37 +00:00
itojun
2f3fdf1a15 typo, from openbsd 2002-05-30 22:01:34 +00:00
itojun
f0bcafc716 -Wunused 2002-04-02 02:57:39 +00:00
guy
88937a62d9 Updates from Kazushi Sugyo <sugyo@pb.jp.nec.com> for
draft-ietf-mobileip-ipv6-15.
2002-03-28 10:02:34 +00:00
guy
670490dedc Support for Home Agent Information in ICMPv6, from Kazushi Sugyo
<sugyo@pb.jp.nec.com>.
2001-12-09 05:22:27 +00:00
itojun
ac5533eb9e need string.h 2001-06-27 02:48:43 +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
8346a95c66 move router preference decls into icmp6.h 2001-06-01 23:01:04 +00:00
itojun
5d12078039 sync with 2292bis-02/ND_RA_FLAG_HOME_AGENT 2001-06-01 22:59:45 +00:00
itojun
cc7b519792 reject nd6 opts with bad length 2001-06-01 04:08:57 +00:00
itojun
28230fe9af cleanup. do not use recurse for nd option priting. 2001-06-01 03:49:02 +00:00
itojun
ea3df106b5 decode draft-ietf-ipngwg-router-preference, specific route information.
(note: nd option type 9 is not officially assigned yet)
2001-06-01 03:32:27 +00:00
fenner
339f6a65b2 Don't print multiple lines for a single packet unless -vv 2001-05-10 05:30:20 +00:00
itojun
96920d5c73 support draft-draves-ipngwg-router-selection-01.txt router preference.
from jinmei
2001-05-09 02:43:40 +00:00
fenner
f968977edf Quiet down gcc -Wall 2001-05-09 01:08:03 +00:00
itojun
9f850d29f7 typo in message. from netbsd-current 2001-02-20 01:13:56 +00:00
itojun
a85f215bc4 meet 2292bis-02 for RA option decls 2001-01-28 09:09:36 +00:00
itojun
64a0e95995 sync with 2292bis-02: ND_OPT_ADVINTERVAL 2001-01-28 09:02:14 +00:00
itojun
d10c8baa8b sync RR flag bit name with draft-ietf-ipngwg-rfc2292bis-02.txt. 2001-01-22 02:31:18 +00:00
itojun
f3b1a28284 add mobile-ip6 option handling. patches@tcpdump.org #113
from Timo Koskiahde.
2000-12-13 07:57:04 +00:00
itojun
c237b80b77 simplify case statement 2000-11-12 15:16:16 +00:00
itojun
5243609316 always print router renumber sequence number, even without -v. 2000-11-08 13:03:12 +00:00
itojun
a620483952 print sequence number in router renumber message. 2000-11-08 13:01:37 +00:00
itojun
ce233ff12b rrenum minor tweaks (endian conversion for reserved field printing) 2000-11-08 10:10:59 +00:00
itojun
f91a43ad6c RFC2894 (router renumber) decoding. more to go. 2000-11-08 09:28:43 +00:00
itojun
e35056d284 remove #ifdef no longer necessary (due to inclusion of icmp6.h into tcpdump kit) 2000-11-08 07:03:04 +00:00
itojun
01ebeb4600 no need to check struct defs in netinet/icmp6.h 2000-10-07 05:58:06 +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
b0385536d7 move ah/esp struct declratiaon into separate header (ah.h and esp.h).
they are from KAME.

use ah.h and esp.h where necessary.
2000-10-06 11:32:17 +00:00
itojun
3b1019f08e unused variable 2000-10-06 06:18:35 +00:00
itojun
061c146d5d typo. from jinmei@kame.net 2000-10-03 02:55:39 +00:00
itojun
64b4695379 typo in comment. from jinmei@kame.net 2000-10-03 02:19:04 +00:00
itojun
bbb665b76f grab upper layer protocol by chasing extension header chain.
from jinmei@kame.net
2000-10-03 02:17:50 +00:00
guy
8fed70e6bd Get "udp.h" from the tcpdump source tree, not from a system header file. 2000-09-29 05:46:11 +00:00