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-llc.c | |
parent | 162800efb308901e0c302517be01226130e39b19 (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-llc.c')
-rw-r--r-- | packet-llc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/packet-llc.c b/packet-llc.c index dc1948e3bc..463a5aa4e6 100644 --- a/packet-llc.c +++ b/packet-llc.c @@ -2,7 +2,7 @@ * Routines for IEEE 802.2 LLC layer * Gilbert Ramirez <gram@xiexie.org> * - * $Id: packet-llc.c,v 1.55 2000/04/17 00:32:39 guy Exp $ + * $Id: packet-llc.c,v 1.56 2000/05/11 08:15:22 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -287,15 +287,15 @@ dissect_llc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { } if (tree) { - ti = proto_tree_add_item(tree, proto_llc, offset, 0, NULL); + ti = proto_tree_add_item(tree, proto_llc, NullTVB, offset, 0, NULL); llc_tree = proto_item_add_subtree(ti, ett_llc); - proto_tree_add_item(llc_tree, hf_llc_dsap, offset, + proto_tree_add_item(llc_tree, hf_llc_dsap, NullTVB, offset, 1, pd[offset] & SAP_MASK); - proto_tree_add_item(llc_tree, hf_llc_dsap_ig, offset, + proto_tree_add_item(llc_tree, hf_llc_dsap_ig, NullTVB, offset, 1, pd[offset] & DSAP_GI_BIT); - proto_tree_add_item(llc_tree, hf_llc_ssap, offset+1, + proto_tree_add_item(llc_tree, hf_llc_ssap, NullTVB, offset+1, 1, pd[offset+1] & SAP_MASK); - proto_tree_add_item(llc_tree, hf_llc_ssap_cr, offset+1, + proto_tree_add_item(llc_tree, hf_llc_ssap_cr, NullTVB, offset+1, 1, pd[offset+1] & SSAP_CR_BIT); } else llc_tree = NULL; @@ -333,7 +333,7 @@ dissect_llc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { etype); } if (tree) { - proto_tree_add_item(llc_tree, hf_llc_oui, offset+3, 3, + proto_tree_add_item(llc_tree, hf_llc_oui, NullTVB, offset+3, 3, oui); } switch (oui) { @@ -362,7 +362,7 @@ dissect_llc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { Ethernet? */ if (tree) { proto_tree_add_item(llc_tree, - hf_llc_pid, offset+6, 2, etype); + hf_llc_pid, NullTVB, offset+6, 2, etype); } if (XDLC_IS_INFORMATION(control)) { switch (etype) { @@ -396,7 +396,7 @@ dissect_llc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { case OUI_CABLE_BPDU: /* DOCSIS cable modem spanning tree BPDU */ if (tree) { proto_tree_add_item(llc_tree, - hf_llc_pid, offset+6, 2, etype); + hf_llc_pid, NullTVB, offset+6, 2, etype); } dissect_bpdu(pd, offset+8, fd, tree); break; @@ -404,7 +404,7 @@ dissect_llc(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) { default: if (tree) { proto_tree_add_item(llc_tree, - hf_llc_pid, offset+6, 2, etype); + hf_llc_pid, NullTVB, offset+6, 2, etype); } dissect_data(pd, offset+8, fd, tree); break; |