Commit Graph

14 Commits

Author SHA1 Message Date
guy
edb0e92cdc Add a few more GCC warnings on GCC >= 2 for ".devel" builds.
From Neil T. Spring: fixes for many of those warnings:

	addrtoname.c, configure.in: Linux needs netinet/ether.h for
	ether_ntohost

	print-*.c: change char *foo = "bar" to const char *foo = "bar"
	to appease -Wwrite-strings; should affect no run-time behavior.

	print-*.c: make some variables unsigned.

	print-bgp.c: plen ('prefix len') is unsigned, no reason to
	validate by comparing to zero.

	print-cnfp.c, print-rx.c: use intoa, provided by addrtoname,
	instead of inet_ntoa.

	print-domain.c: unsigned int l; (l=foo()) < 0 is guaranteed to
	be false, so check for (u_int)-1, which represents failure,
	explicitly.

	print-isakmp.c: complete initialization of attrmap objects.

	print-lwres.c: "if(x); print foo;" seemed much more likely to be
	intended to be "if(x) { print foo; }".

	print-smb.c: complete initialization of some structures.

In addition, add some fixes for the signed vs. unsigned comparison
warnings:

	extract.h: cast the result of the byte-extraction-and-combining,
	as, at least for the 16-bit version, C's integral promotions
	will turn "u_int16_t" into "int" if there are other "int"s
	nearby.

	print-*.c: make some more variables unsigned, or add casts to an
	unsigned type of signed values known not to be negative, or add
	casts to "int" of unsigned values known to fit in an "int", and
	make other changes needed to handle the aforementioned variables
	now being unsigned.

	print-isakmp.c: clean up the handling of error/status indicators
	in notify messages.

	print-ppp.c: get rid of a check that an unsigned quantity is >=
	0.

	print-radius.c: clean up some of the bounds checking.

	print-smb.c: extract the word count into a "u_int" to avoid the
	aforementioned problems with C's integral promotions.

	print-snmp.c: change a check that an unsigned variable is >= 0
	to a check that it's != 0.

Also, fix some formats to use "%u" rather than "%d" for unsigned
quantities.
2002-09-05 00:00:07 +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
eba1a41534 From Rick Watson <watsonrick@users.sourceforge.net>: use
unaligned-extraction macros to fetch 16-bit and 32-bit big-endian
quantities.
2002-05-25 09:41:06 +00:00
guy
ebec80a51b Squelch a compiler warning. 2001-11-10 21:37:58 +00:00
guy
de390b1f7e L2TP dissector changes, from Motonori Shindo:
o completely TCHECK()-ified
  o PPP disconnect cause info AVP support added (RFC3145)
  o use u_int16_t/u_int32_t instead of u_short/u_int
  o use tok2str() to better support discrete array
  o fixed bug (Authen Name AVP is now decoded as a string)
  o code clean up
2001-11-05 10:03:27 +00:00
itojun
1d0f632354 more detailed output in ppp/pppoe/l2tp.
From: Motonori Shindo <mshindo@mshindo.net>
2000-08-18 07:44:45 +00:00
assar
1deef47516 updates/bug fixes from Motonori Shindo <mshindo@mshindo.net> 2000-07-01 03:48:44 +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
80e8a9bd28 Include stdio.h and fix up printf formats. 1999-12-15 06:55:43 +00:00
fenner
b9ac23ce92 Switch to config.h instead of passing defines in DEFS. 1999-11-21 09:36:43 +00:00
assar
bf782e5566 fixes to make ansi-pedantic compilers happier. no char types for bit fields and minor type correctness 1999-11-17 04:14:50 +00:00
itojun
70fbff8d34 HP-UX 10.20 build fix <http://www.sics.se/~assar/tcpdump_patches/13>
#ifdef h_errno, snprintf -> sprintf, arpa/inet.h for [hn]to[hn][sl]
1999-10-30 23:45:50 +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