Commit Graph

22 Commits

Author SHA1 Message Date
Denis Ovsienko
3ea7a6988e IPv6: refresh options decoding (GH #47 pt. 3)
Brian Haley points that mobility (sub-)options decoded in
print-ip6opts.c are specific to draft-ietf-mobileip-ipv6 only. RFC3775
(and respectively RFC6275) uses different encoding and parameter space,
which print-mobility.c already handles.

Remove deprecated code and update some related macros.
2014-01-04 16:39:33 +04: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
Guy Harris
93f33e57f5 Print a space after the options if there are any options. 2012-02-28 15:45:48 -08:00
Matthew Luckie
329023dbb2 Get rid of extra blank after unknown options.
Reviewed-By: Guy Harris <guy@alum.mit.edu>
2012-02-28 15:41:12 -08:00
guy
655c706df5 Get rid of unused variables. 2005-04-20 22:18:50 +00:00
guy
988cd2bb0e Have various routines for printing non-final headers for IPv4/IPv6
return -1 if they run out of data.

Have the IPv4 and IPv6 dissectors check for non-positive return values
from those routines and quit if they see one.
2003-11-19 00:36:06 +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
8b4a9e519e From David Binderman <d.binderman@virgin.net>, in a Red Hat Bugzilla
entry for tcpdump: initialize "optlen" so as to eliminate a compiler
warning.
2003-01-10 08:11:00 +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
risso
3d932490b8 Added support for Win32, based on WinPcap. 2002-08-01 08:52:55 +00:00
itojun
111ff8a61d whitespace cleanup 2002-06-11 17:08:37 +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
itojun
63d81f5ab7 correct ip6 option parsing. notified by bill fenner. 2001-05-09 02:47:26 +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
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
64b4695379 typo in comment. from jinmei@kame.net 2000-10-03 02:19:04 +00:00
itojun
6e67dba79f s/u_short/u_int16_t/ for KAME-origin source codes 2000-04-28 11:14:47 +00:00
assar
fcf96ff8c7 fallback definitions for some constants 2000-04-09 19:15:59 +00:00
fenner
34ff77ff43 Unify rcsid[]'s. 2000-01-09 21:34:14 +00:00
fenner
b9ac23ce92 Switch to config.h instead of passing defines in DEFS. 1999-11-21 09:36:43 +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