aboutsummaryrefslogtreecommitdiffstats
path: root/packet-hsrp.c
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 08:18:09 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2000-05-11 08:18:09 +0000
commit292e38e2c61edcd14bfa30ca3c72bacda1bcbe32 (patch)
treedb4edef02456a48d0f6d505166ac7d70f6c0f644 /packet-hsrp.c
parent162800efb308901e0c302517be01226130e39b19 (diff)
Add tvbuff class.
Add exceptions routines. Convert proto_tree_add_*() routines to require tvbuff_t* argument. Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as the tvbuff_t* argument to proto_tree_add_*() routines. dissect_packet() creates a tvbuff_t, wraps the next dissect call in a TRY block, will print "Short Frame" on the proto_tree if a BoundsError exception is caught. The FDDI dissector is converted to use tvbuff's. svn path=/trunk/; revision=1939
Diffstat (limited to 'packet-hsrp.c')
-rw-r--r--packet-hsrp.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/packet-hsrp.c b/packet-hsrp.c
index 3babf80907..5ae1390d82 100644
--- a/packet-hsrp.c
+++ b/packet-hsrp.c
@@ -4,7 +4,7 @@
*
* Heikki Vatiainen <hessu@cs.tut.fi>
*
- * $Id: packet-hsrp.c,v 1.3 2000/04/08 07:07:17 guy Exp $
+ * $Id: packet-hsrp.c,v 1.4 2000/05/11 08:15:10 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -120,31 +120,31 @@ dissect_hsrp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
return;
}
- ti = proto_tree_add_item(tree, proto_hsrp, offset, END_OF_FRAME, NULL);
+ ti = proto_tree_add_item(tree, proto_hsrp, NullTVB, offset, END_OF_FRAME, NULL);
hsrp_tree = proto_item_add_subtree(ti, ett_hsrp);
- proto_tree_add_text(hsrp_tree, offset++, 1, "Version: %u", hsrp.version);
- proto_tree_add_text(hsrp_tree, offset++, 1, "Opcode: %u (%s)", hsrp.opcode,
+ proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Version: %u", hsrp.version);
+ proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Opcode: %u (%s)", hsrp.opcode,
val_to_str(hsrp.opcode, hsrp_opcode_vals, "Unknown"));
- proto_tree_add_text(hsrp_tree, offset++, 1, "State: %u (%s)", hsrp.state,
+ proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "State: %u (%s)", hsrp.state,
val_to_str(hsrp.state, hsrp_state_vals, "Unknown"));
- proto_tree_add_text(hsrp_tree, offset++, 1, "Hellotime: %u second%s (%sdefault)",
+ proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Hellotime: %u second%s (%sdefault)",
hsrp.hellotime, plurality(hsrp.hellotime, "", "s"),
(hsrp.hellotime == HSRP_DEFAULT_HELLOTIME) ? "" : "non-");
- proto_tree_add_text(hsrp_tree, offset++, 1, "Holdtime: %u second%s (%sdefault)",
+ proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Holdtime: %u second%s (%sdefault)",
hsrp.holdtime, plurality(hsrp.holdtime, "", "s"),
(hsrp.holdtime == HSRP_DEFAULT_HOLDTIME) ? "" : "non-");
- proto_tree_add_text(hsrp_tree, offset++, 1, "Priority: %u", hsrp.priority);
- proto_tree_add_text(hsrp_tree, offset++, 1, "Group: %u", hsrp.group);
- proto_tree_add_text(hsrp_tree, offset++, 1, "Reserved: 0x%x", hsrp.reserved);
+ proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Priority: %u", hsrp.priority);
+ proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Group: %u", hsrp.group);
+ proto_tree_add_text(hsrp_tree, NullTVB, offset++, 1, "Reserved: 0x%x", hsrp.reserved);
memcpy(auth_buf, hsrp.auth_data, sizeof(hsrp.auth_data));
auth_buf[sizeof(auth_buf)] = '\0';
- proto_tree_add_text(hsrp_tree, offset, 8, "Authentication Data: `%s'", auth_buf);
+ proto_tree_add_text(hsrp_tree, NullTVB, offset, 8, "Authentication Data: `%s'", auth_buf);
offset+=8;
- proto_tree_add_text(hsrp_tree, offset++, 4, "Virtual IP address: %s",
+ proto_tree_add_text(hsrp_tree, NullTVB, offset++, 4, "Virtual IP address: %s",
ip_to_str((guint8 *)&hsrp.virt_ip_addr));
}