aboutsummaryrefslogtreecommitdiffstats
path: root/packet-rx.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-rx.c
parent162800efb308901e0c302517be01226130e39b19 (diff)
downloadwireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.tar.gz
wireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.tar.bz2
wireshark-292e38e2c61edcd14bfa30ca3c72bacda1bcbe32.zip
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-rx.c')
-rw-r--r--packet-rx.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/packet-rx.c b/packet-rx.c
index 28bdf78ba8..7889c2456f 100644
--- a/packet-rx.c
+++ b/packet-rx.c
@@ -4,7 +4,7 @@
* Based on routines from tcpdump patches by
* Ken Hornstein <kenh@cmf.nrl.navy.mil>
*
- * $Id: packet-rx.c,v 1.10 2000/04/14 06:42:51 guy Exp $
+ * $Id: packet-rx.c,v 1.11 2000/05/11 08:15:43 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -114,46 +114,46 @@ dissect_rx(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
if (tree) {
- ti = proto_tree_add_protocol_format(tree, proto_rx, offset,
+ ti = proto_tree_add_protocol_format(tree, proto_rx, NullTVB, offset,
sizeof(struct rx_header), "RX Protocol (%s)",
val_to_str(rxh->type,rx_types,"unknown (%d)"));
rx_tree = proto_item_add_subtree(ti, ett_rx);
- proto_tree_add_item(rx_tree, hf_rx_epoch,
+ proto_tree_add_item(rx_tree, hf_rx_epoch, NullTVB,
offset, 4, pntohl(&rxh->epoch));
- proto_tree_add_item(rx_tree, hf_rx_cid,
+ proto_tree_add_item(rx_tree, hf_rx_cid, NullTVB,
offset+4, 4, pntohl(&rxh->cid));
- proto_tree_add_item(rx_tree, hf_rx_callnumber,
+ proto_tree_add_item(rx_tree, hf_rx_callnumber, NullTVB,
offset+8, 4, pntohl(&rxh->callNumber));
- proto_tree_add_item(rx_tree, hf_rx_seq,
+ proto_tree_add_item(rx_tree, hf_rx_seq, NullTVB,
offset+12, 4, pntohl(&rxh->seq));
- proto_tree_add_item(rx_tree, hf_rx_serial,
+ proto_tree_add_item(rx_tree, hf_rx_serial, NullTVB,
offset+16, 4, pntohl(&rxh->serial));
- proto_tree_add_item(rx_tree, hf_rx_type,
+ proto_tree_add_item(rx_tree, hf_rx_type, NullTVB,
offset+20, 1, rxh->type);
- rx_flags = proto_tree_add_item(rx_tree, hf_rx_flags,
+ rx_flags = proto_tree_add_item(rx_tree, hf_rx_flags, NullTVB,
offset+21, 1, rxh->flags);
rx_tree_flags = proto_item_add_subtree(rx_flags, ett_rx_flags);
- proto_tree_add_item(rx_tree_flags, hf_rx_flags_free_packet,
+ proto_tree_add_item(rx_tree_flags, hf_rx_flags_free_packet, NullTVB,
offset+21, 1, rxh->flags);
- proto_tree_add_item(rx_tree_flags, hf_rx_flags_more_packets,
+ proto_tree_add_item(rx_tree_flags, hf_rx_flags_more_packets, NullTVB,
offset+21, 1, rxh->flags);
- proto_tree_add_item(rx_tree_flags, hf_rx_flags_last_packet,
+ proto_tree_add_item(rx_tree_flags, hf_rx_flags_last_packet, NullTVB,
offset+21, 1, rxh->flags);
- proto_tree_add_item(rx_tree_flags, hf_rx_flags_request_ack,
+ proto_tree_add_item(rx_tree_flags, hf_rx_flags_request_ack, NullTVB,
offset+21, 1, rxh->flags);
- proto_tree_add_item(rx_tree_flags, hf_rx_flags_clientinit,
+ proto_tree_add_item(rx_tree_flags, hf_rx_flags_clientinit, NullTVB,
offset+21, 1, rxh->flags);
- proto_tree_add_item(rx_tree, hf_rx_userstatus,
+ proto_tree_add_item(rx_tree, hf_rx_userstatus, NullTVB,
offset+22, 1, rxh->userStatus);
- proto_tree_add_item(rx_tree, hf_rx_securityindex,
+ proto_tree_add_item(rx_tree, hf_rx_securityindex, NullTVB,
offset+23, 1, rxh->securityIndex);
- proto_tree_add_item(rx_tree, hf_rx_spare,
+ proto_tree_add_item(rx_tree, hf_rx_spare, NullTVB,
offset+24, 2, pntohs(&rxh->spare));
- proto_tree_add_item(rx_tree, hf_rx_serviceid,
+ proto_tree_add_item(rx_tree, hf_rx_serviceid, NullTVB,
offset+26, 2, pntohs(&rxh->serviceId));
}