aboutsummaryrefslogtreecommitdiffstats
path: root/packet-rip.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-09-14 06:34:36 +0000
committerGuy Harris <guy@alum.mit.edu>2001-09-14 06:34:36 +0000
commitaac97da8115bcf3e080a10be5a80451ed0daad19 (patch)
treee737b489366d4fc174c5c09d6f1c68536844da3e /packet-rip.c
parent5d76f722a29adc0a214ff02e4a64e72f88a94a07 (diff)
Squelch a signed vs. unsigned comparison complaint.
Display the command in decimal, not hex, as that's how it's specified in the RFCs for RIP. svn path=/trunk/; revision=3932
Diffstat (limited to 'packet-rip.c')
-rw-r--r--packet-rip.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/packet-rip.c b/packet-rip.c
index 0a72e0ee38..944634e677 100644
--- a/packet-rip.c
+++ b/packet-rip.c
@@ -2,13 +2,12 @@
* Routines for RIPv1 and RIPv2 packet disassembly
* (c) Copyright Hannes R. Boehm <hannes@boehm.org>
*
- * $Id: packet-rip.c,v 1.25 2001/09/13 08:08:53 guy Exp $
+ * $Id: packet-rip.c,v 1.26 2001/09/14 06:34:36 guy Exp $
*
* Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@zing.org>
+ * By Gerald Combs <gerald@ethereal.com>
* Copyright 1998 Gerald Combs
*
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
@@ -96,7 +95,6 @@ dissect_rip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 command;
guint8 version;
guint16 family;
- guint reported_length;
if (check_col(pinfo->fd, COL_PROTOCOL))
col_set_str(pinfo->fd, COL_PROTOCOL, "RIP");
@@ -127,8 +125,7 @@ dissect_rip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = RIP_HEADER_LENGTH;
/* zero or more entries */
- reported_length = tvb_reported_length(tvb);
- while (offset < reported_length) {
+ while (tvb_reported_length_remaining(tvb, offset) > 0) {
family = tvb_get_ntohs(tvb, offset);
switch (family) {
case 2: /* IP */
@@ -208,7 +205,7 @@ proto_register_rip(void)
{
static hf_register_info hf[] = {
{ &hf_rip_command,
- { "Command", "rip.command", FT_UINT8, BASE_HEX,
+ { "Command", "rip.command", FT_UINT8, BASE_DEC,
VALS(command_vals), 0, "What type of RIP Command is this", HFILL }},
{ &hf_rip_version,