summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-atm.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2012-09-27 04:36:40 +0000
committerMichael Mann <mmann78@netscape.net>2012-09-27 04:36:40 +0000
commit65ef9e9d6b691cd54540b94fb8393c02443fd9d4 (patch)
treecfeec151dcb3ccb5ee66094cd6ac3b1cadb82580 /epan/dissectors/packet-atm.c
parent0063cc00c803c80e80ff809da781987846478354 (diff)
downloadwireshark-65ef9e9d6b691cd54540b94fb8393c02443fd9d4.tar.gz
replaced decode_numeric_bitfield calls with filterable item or removed it if it didn't mathematically do anything.
svn path=/trunk/; revision=45166
Diffstat (limited to 'epan/dissectors/packet-atm.c')
-rw-r--r--epan/dissectors/packet-atm.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c
index 31dfde1682..937b9d1387 100644
--- a/epan/dissectors/packet-atm.c
+++ b/epan/dissectors/packet-atm.c
@@ -49,6 +49,9 @@ static int proto_aal1 = -1;
static int proto_aal3_4 = -1;
static int proto_oamaal = -1;
+static int hf_atm_lan_destination_route_desc = -1;
+static int hf_atm_lan_destination_lan_id = -1;
+static int hf_atm_lan_destination_bridge_num = -1;
static int hf_atm_le_control_flag_v2_capable = -1;
static int hf_atm_le_control_flag_selective_multicast = -1;
static int hf_atm_le_control_flag_v2_required = -1;
@@ -213,7 +216,6 @@ dissect_lan_destination(tvbuff_t *tvb, int offset, const char *type, proto_tree
proto_tree *dest_tree;
guint16 tag;
proto_tree *rd_tree;
- guint16 route_descriptor;
td = proto_tree_add_text(tree, tvb, offset, 8, "%s LAN destination",
type);
@@ -233,16 +235,10 @@ dissect_lan_destination(tvbuff_t *tvb, int offset, const char *type, proto_tree
case TAG_ROUTE_DESCRIPTOR:
offset += 4;
- route_descriptor = tvb_get_ntohs(tvb, offset);
- proto_tree_add_text(dest_tree, tvb, offset, 2, "Route descriptor: 0x%02X",
- route_descriptor);
+ proto_tree_add_item(dest_tree, hf_atm_lan_destination_route_desc, tvb, offset, 2, ENC_LITTLE_ENDIAN);
rd_tree = proto_item_add_subtree(td, ett_atm_lane_lc_lan_dest_rd);
- proto_tree_add_text(rd_tree, tvb, offset, 2, "%s",
- decode_numeric_bitfield(route_descriptor, 0xFFF0, 2*8,
- "LAN ID = %u"));
- proto_tree_add_text(rd_tree, tvb, offset, 2, "%s",
- decode_numeric_bitfield(route_descriptor, 0x000F, 2*8,
- "Bridge number = %u"));
+ proto_tree_add_item(rd_tree, hf_atm_lan_destination_lan_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
+ proto_tree_add_item(rd_tree, hf_atm_lan_destination_bridge_num, tvb, offset, 2, ENC_LITTLE_ENDIAN);
break;
}
}
@@ -1941,6 +1937,15 @@ proto_register_atm(void)
{ "CID", "atm.cid", FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }},
+ { &hf_atm_lan_destination_route_desc,
+ { "Route descriptor", "atm.lan_destination.route_desc", FT_UINT16, BASE_HEX, NULL, 0x0,
+ NULL, HFILL }},
+ { &hf_atm_lan_destination_lan_id,
+ { "LAN ID", "atm.lan_destination.lan_id", FT_UINT16, BASE_DEC, NULL, 0xFFF0,
+ NULL, HFILL }},
+ { &hf_atm_lan_destination_bridge_num,
+ { "Bridge number", "atm.lan_destination.bridge_num", FT_UINT16, BASE_DEC, NULL, 0x000F,
+ NULL, HFILL }},
{ &hf_atm_le_control_flag_v2_capable,
{ "V2 capable", "atm.le_control.flag.v2_capable", FT_BOOLEAN, 16, TFS(&tfs_yes_no), 0x0002,
NULL, HFILL }},