diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-11 08:18:09 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2000-05-11 08:18:09 +0000 |
commit | 292e38e2c61edcd14bfa30ca3c72bacda1bcbe32 (patch) | |
tree | db4edef02456a48d0f6d505166ac7d70f6c0f644 /packet-aarp.c | |
parent | 162800efb308901e0c302517be01226130e39b19 (diff) | |
download | wireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.tar.gz |
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-aarp.c')
-rw-r--r-- | packet-aarp.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/packet-aarp.c b/packet-aarp.c index 8190707d42..0f4dab66a8 100644 --- a/packet-aarp.c +++ b/packet-aarp.c @@ -1,7 +1,7 @@ /* packet-aarp.c * Routines for Appletalk ARP packet disassembly * - * $Id: packet-aarp.c,v 1.18 2000/04/13 18:18:43 gram Exp $ + * $Id: packet-aarp.c,v 1.19 2000/05/11 08:14:49 gram Exp $ * * Simon Wilkinson <sxw@dcs.ed.ac.uk> * @@ -191,35 +191,35 @@ dissect_aarp(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { if (tree) { if ((op_str = match_strval(ar_op, op_vals))) - ti = proto_tree_add_protocol_format(tree, proto_aarp, offset, + ti = proto_tree_add_protocol_format(tree, proto_aarp, NullTVB, offset, MIN_AARP_HEADER_SIZE + 2*ar_hln + 2*ar_pln, "AppleTalk Address Resolution Protocol (%s)", op_str); else - ti = proto_tree_add_protocol_format(tree, proto_aarp, offset, + ti = proto_tree_add_protocol_format(tree, proto_aarp, NullTVB, offset, MIN_AARP_HEADER_SIZE + 2*ar_hln + 2*ar_pln, "AppleTalk Address Resolution Protocol (opcode 0x%04x)", ar_op); aarp_tree = proto_item_add_subtree(ti, ett_aarp); - proto_tree_add_item(aarp_tree, hf_aarp_hard_type, offset + AR_HRD, 2, + proto_tree_add_item(aarp_tree, hf_aarp_hard_type, NullTVB, offset + AR_HRD, 2, ar_hrd); - proto_tree_add_item(aarp_tree, hf_aarp_proto_type, offset + AR_PRO, 2, + proto_tree_add_item(aarp_tree, hf_aarp_proto_type, NullTVB, offset + AR_PRO, 2, ar_pro); - proto_tree_add_item(aarp_tree, hf_aarp_hard_size, offset + AR_HLN, 1, + proto_tree_add_item(aarp_tree, hf_aarp_hard_size, NullTVB, offset + AR_HLN, 1, ar_hln); - proto_tree_add_item(aarp_tree, hf_aarp_proto_size, offset + AR_PLN, 1, + proto_tree_add_item(aarp_tree, hf_aarp_proto_size, NullTVB, offset + AR_PLN, 1, ar_pln); - proto_tree_add_item(aarp_tree, hf_aarp_opcode, offset + AR_OP, 2, + proto_tree_add_item(aarp_tree, hf_aarp_opcode, NullTVB, offset + AR_OP, 2, ar_op); - proto_tree_add_bytes_format(aarp_tree, hf_aarp_src_ether, sha_offset, ar_hln, + proto_tree_add_bytes_format(aarp_tree, hf_aarp_src_ether, NullTVB, sha_offset, ar_hln, &pd[sha_offset], "Sender hardware address: %s", sha_str); - proto_tree_add_bytes_format(aarp_tree, hf_aarp_src_id, spa_offset, ar_pln, + proto_tree_add_bytes_format(aarp_tree, hf_aarp_src_id, NullTVB, spa_offset, ar_pln, &pd[spa_offset], "Sender ID: %s", spa_str); - proto_tree_add_bytes_format(aarp_tree, hf_aarp_dst_ether, tha_offset, ar_hln, + proto_tree_add_bytes_format(aarp_tree, hf_aarp_dst_ether, NullTVB, tha_offset, ar_hln, &pd[tha_offset], "Target hardware address: %s", tha_str); - proto_tree_add_bytes_format(aarp_tree, hf_aarp_dst_id, tpa_offset, ar_pln, + proto_tree_add_bytes_format(aarp_tree, hf_aarp_dst_id, NullTVB, tpa_offset, ar_pln, &pd[tpa_offset], "Target ID: %s", tpa_str); } |