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.
diff --git a/print-rip.c b/print-rip.c
index 9b0cfb1..5b2220e 100644
--- a/print-rip.c
+++ b/print-rip.c
@@ -21,7 +21,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.50 2002-08-01 08:53:26 risso Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.51 2002-09-05 00:00:18 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -154,13 +154,21 @@
 {
 	register const struct rip *rp;
 	register const struct rip_netinfo *ni;
-	register int i, j, trunc;
+	register u_int i, j;
+	register int trunc;
 
-	i = min(length, snapend - dat) - sizeof(*rp);
-	if (i < 0) {
+	if (snapend < dat) {
 		printf(" [|rip]");
 		return;
 	}
+	i = snapend - dat;
+	if (i > length)
+		i = length;
+	if (i < sizeof(*rp)) {
+		printf(" [|rip]");
+		return;
+	}
+	i -= sizeof(*rp);
 
 	rp = (struct rip *)dat;
 	switch (rp->rip_vers) {
@@ -190,7 +198,7 @@
 			break;
 		case RIPCMD_RESPONSE:
 			j = length / sizeof(*ni);
-			if (j * sizeof(*ni) != length - 4)
+			if (j * sizeof(*ni) + 4 != length)
 				printf(" RIPv%d-resp [items %d] [%d]:",
 				       rp->rip_vers, j, length);
 			else
@@ -198,11 +206,12 @@
 				       rp->rip_vers, j);
 			trunc = (i / sizeof(*ni)) != j;
 			ni = (struct rip_netinfo *)(rp + 1);
-			for (; (i -= sizeof(*ni)) >= 0; ++ni) {
+			for (; i >= sizeof(*ni); ++ni) {
 				if (rp->rip_vers == 1)
 					rip_entry_print_v1(rp->rip_vers, ni);
 				else
 					rip_entry_print_v2(rp->rip_vers, ni);
+				i -= sizeof(*ni);
 			}
 			if (trunc)
 				printf("[|rip]");