Commit Graph

39 Commits

Author SHA1 Message Date
Guy (Core OS) Harris
7e6045579a From Francois-Xavier Le Bail: use hyphens, rather than spaces, in DHCPv6
option names, so that the "-v" display, which prints options separated
by spaces, isn't ambiguous.  (The BOOTP dissector has hyphens in the
BOOTP/DHCP option names.)
2009-06-03 13:58:27 -07:00
Guy Harris
4049e2eafc Don't use structures to define the layout of DHCP options. For one
thing, there's no guarantee that __attribute__ ((__packed__)) works.
2009-05-24 15:47:38 -07:00
guy
488187db5c From Francis Dupont: update the DHCPv6 printer to handle newer features. 2008-02-06 10:26:09 +00:00
guy
3fa6ec70c3 From Shinsuke Suzuki:
Some of the options in print-dhcp6.c are declared as
"unassigned ones". but it is no longer true due to an
IETF standardization activities.

Here's the patch to catch up with the latest IANA
assignment, including an removal of the old Prefix-
Delegation option used in the NTT-communications.
(AFAIK they no longer uses this old option).
2006-10-25 22:02:36 +00:00
guy
f59615e6d1 Squelch some signed-vs-unsigned comparison warnings. 2004-07-06 22:16:03 +00:00
itojun
de60933267 DHCPv6 authentication stuff. jinmei@kame 2004-07-05 07:49:30 +00:00
guy
22cc33aea8 From Shinsuke Suzuki <suz@kame.net>: a patch to support some DHCPv6
options.  It includes the following two features:

	- decode the names of all the DHCPv6 Options defined in
	  RFC3315
	- support DHCPv6-Lifetime option, as defined in
	  draft-ietf-dhc-lifetime-00.txt

Note that the latter doesn't have an official DHCPv6 type number, so
it's subject to change.
2004-06-16 00:12:35 +00:00
itojun
b8fdb599f3 use official assigned numbers for DHCPv6 prefix delegation options. suz@kame 2004-01-21 03:53:08 +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
7d83ad1ef8 Escape question marks, to avoid warnings about trigraphs. 2003-11-15 01:08:37 +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
9a5f197f7a update from suz@kame.net
* RFC3315: DHCPv6
* supported DHCPv6 options:
*  RFC3319,
*  draft-ietf-dhc-dhcpv6-opt-dnsconfig-04.txt,
*  draft-ietf-dhc-dhcpv6-opt-prefix-delegation-05.txt
*  draft-ietf-dhc-dhcpv6-opt-timeconfig-02.txt,
2003-10-29 03:54:14 +00:00
itojun
58b83f6ad4 use snprintf 2003-08-13 02:26:52 +00:00
itojun
96d5cdd506 decode dhcp6 relay message. from jinmei@kame 2003-07-16 16:15:53 +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
1f583a0234 Get rid of an argument to "printf()" that didn't have a matching format
item.
2002-08-02 04:05:51 +00:00
risso
3d932490b8 Added support for Win32, based on WinPcap. 2002-08-01 08:52:55 +00:00
itojun
7935031d5e avoid trigraph 2002-06-15 02:49:54 +00:00
itojun
9e8f54ad61 dhcpv6 i-d revision 26, by jinmei@kame 2002-06-14 15:45:59 +00:00
itojun
111ff8a61d whitespace cleanup 2002-06-11 17:08:37 +00:00
guy
4c6bada758 Get rid of unneeded incomplete definitions of "struct mbuf" and "struct
rtentry", and unneded includes of <sys/uio.h>, <sys/file.h>, and
<sys/ioctl.h>.
2002-06-01 23:50:30 +00:00
guy
639ccfcfab Fix a cast to use the correct type. 2002-01-19 08:05:54 +00:00
itojun
0e716cf968 use draft 22 declaration for dhcp6 (which is under dhcwg last call - hope
it does not change again).
2002-01-10 09:05:07 +00:00
fenner
c672f00276 Eliminate some unused parameters.
Use const more.
Use EXTRACT_* macros more.
Use TCHECK* more.
Use tok2str() to replace some home-grown workalikes.
smb:
 - Get rid of private types, use tcpdump-defined types
 - Rename fdata and fdata1 to smb_fdata and smb_fdata1 to avoid conflict
   with IRIX library function.
2001-09-17 21:57:50 +00:00
itojun
d35a11b05c tidy up prototypes 2001-01-28 09:49:49 +00:00
fenner
c09e6737ee Eliminate __P(). 2000-10-24 00:56:48 +00:00
guy
8b67f77134 Get rid of unneeded includes of <net/if.h>. 2000-09-28 06:42:55 +00:00
itojun
06cd36d1c9 correct spacing. 2000-07-31 02:47:27 +00:00
assar
3cd171317f remove non-STDC code 2000-07-01 03:38:59 +00:00
itojun
53f55314c5 correct dhcp6 solitation plen/id handling. plen is 7 bit, id is 9 bit! 2000-05-17 05:00:12 +00:00
itojun
a1a0ad776c sync with draft-ietf-dhc-dhcp6v6exts-12. 2000-05-15 04:29:32 +00:00
itojun
22454ddf83 correct protocol flag processing. 2000-05-13 18:34:09 +00:00
itojun
d4c1726c51 support new IPv6 dhcp spec (15 draft). no backward compatibility in
packet format specification.
From: jinmei@kame.net
2000-05-13 18:28:46 +00:00
itojun
6e67dba79f s/u_short/u_int16_t/ for KAME-origin source codes 2000-04-28 11:14:47 +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
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